test_class.declarator: service
test_class.modifier: private
test_class.original_string: private AdVpnService service;
test_class.type: AdVpnService
test_class.var_name: service
test_class.declarator: thread
test_class.modifier: private
test_class.original_string: private AdVpnThread thread;
test_class.type: AdVpnThread
test_class.var_name: thread
test_class.declarator: config
test_class.modifier: private
test_class.original_string: private Configuration config;
test_class.type: Configuration
test_class.var_name: config
test_class.declarator: builder
test_class.modifier: private
test_class.original_string: private VpnService.Builder builder;
test_class.type: VpnService.Builder
test_class.var_name: builder
test_class.declarator: serversAdded
test_class.modifier: private
test_class.original_string: private List<InetAddress> serversAdded;
test_class.type: List<InetAddress>
test_class.var_name: serversAdded
test_class.file: app/src/test/java/org/jak_linux/dns66/vpn/AdVpnThreadTest.java
test_class.identifier: AdVpnThreadTest
test_case.body: @Test
      public void testHasIpV6Servers() throws Exception {
          Configuration.Item item0 = new Configuration.Item();
          Configuration.Item item1 = new Configuration.Item();
          config.ipV6Support = true;
          config.dnsServers.enabled = true;
          config.dnsServers.items.add(item0);
          config.dnsServers.items.add(item1);
          item0.location = "::1";
          item0.state = Configuration.Item.STATE_ALLOW;
          item1.location = "127.0.0.1";
          item1.state = Configuration.Item.STATE_ALLOW;
          List<InetAddress> servers = new ArrayList<>();
  
          assertTrue(thread.hasIpV6Servers(config, servers));
          config.ipV6Support = false;
          assertFalse(thread.hasIpV6Servers(config, servers));
          config.ipV6Support = true;
  
          item0.state = Configuration.Item.STATE_DENY;
          assertFalse(thread.hasIpV6Servers(config, servers));
  
          servers.add(Inet6Address.getByName("127.0.0.1"));
          assertFalse(thread.hasIpV6Servers(config, servers));
  
          servers.add(Inet6Address.getByName("::1"));
          assertTrue(thread.hasIpV6Servers(config, servers));
      }
test_case.class_method_signature: AdVpnThreadTest.testHasIpV6Servers()
test_case.full_signature: @Test public void testHasIpV6Servers()
test_case.identifier: testHasIpV6Servers
test_case.invocations: add add assertTrue hasIpV6Servers assertFalse hasIpV6Servers assertFalse hasIpV6Servers add getByName assertFalse hasIpV6Servers add getByName assertTrue hasIpV6Servers
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testHasIpV6Servers()
focal_class.declarator: TAG = "AdVpnThread"
focal_class.modifier: private static final
focal_class.original_string: private static final String TAG = "AdVpnThread";
focal_class.type: String
focal_class.var_name: TAG
focal_class.declarator: MIN_RETRY_TIME = 5
focal_class.modifier: private static final
focal_class.original_string: private static final int MIN_RETRY_TIME = 5;
focal_class.type: int
focal_class.var_name: MIN_RETRY_TIME
focal_class.declarator: MAX_RETRY_TIME = 2 * 60
focal_class.modifier: private static final
focal_class.original_string: private static final int MAX_RETRY_TIME = 2 * 60;
focal_class.type: int
focal_class.var_name: MAX_RETRY_TIME
focal_class.declarator: RETRY_RESET_SEC = 60
focal_class.modifier: private static final
focal_class.original_string: private static final long RETRY_RESET_SEC = 60;
focal_class.type: long
focal_class.var_name: RETRY_RESET_SEC
focal_class.declarator: DNS_MAXIMUM_WAITING = 1024
focal_class.modifier: private static final
focal_class.original_string: private static final int DNS_MAXIMUM_WAITING = 1024;
focal_class.type: int
focal_class.var_name: DNS_MAXIMUM_WAITING
focal_class.declarator: DNS_TIMEOUT_SEC = 10
focal_class.modifier: private static final
focal_class.original_string: private static final long DNS_TIMEOUT_SEC = 10;
focal_class.type: long
focal_class.var_name: DNS_TIMEOUT_SEC
focal_class.declarator: upstreamDnsServers = new ArrayList<>()
focal_class.modifier: final
focal_class.original_string: final ArrayList<InetAddress> upstreamDnsServers = new ArrayList<>();
focal_class.type: ArrayList<InetAddress>
focal_class.var_name: upstreamDnsServers
focal_class.declarator: vpnService
focal_class.modifier: private final
focal_class.original_string: private final VpnService vpnService;
focal_class.type: VpnService
focal_class.var_name: vpnService
focal_class.declarator: notify
focal_class.modifier: private final
focal_class.original_string: private final Notify notify;
focal_class.type: Notify
focal_class.var_name: notify
focal_class.declarator: deviceWrites = new LinkedList<>()
focal_class.modifier: private final
focal_class.original_string: private final Queue<byte[]> deviceWrites = new LinkedList<>();
focal_class.type: Queue<byte[]>
focal_class.var_name: deviceWrites
focal_class.declarator: dnsIn = new WospList()
focal_class.modifier: private final
focal_class.original_string: private final WospList dnsIn = new WospList();
focal_class.type: WospList
focal_class.var_name: dnsIn
focal_class.declarator: dnsPacketProxy = new DnsPacketProxy(this)
focal_class.modifier: private final
focal_class.original_string: private final DnsPacketProxy dnsPacketProxy = new DnsPacketProxy(this);
focal_class.type: DnsPacketProxy
focal_class.var_name: dnsPacketProxy
focal_class.declarator: vpnWatchDog = new VpnWatchdog()
focal_class.modifier: private final
focal_class.original_string: private final VpnWatchdog vpnWatchDog = new VpnWatchdog();
focal_class.type: VpnWatchdog
focal_class.var_name: vpnWatchDog
focal_class.declarator: thread = null
focal_class.modifier: private
focal_class.original_string: private Thread thread = null;
focal_class.type: Thread
focal_class.var_name: thread
focal_class.declarator: mBlockFd = null
focal_class.modifier: private
focal_class.original_string: private FileDescriptor mBlockFd = null;
focal_class.type: FileDescriptor
focal_class.var_name: mBlockFd
focal_class.declarator: mInterruptFd = null
focal_class.modifier: private
focal_class.original_string: private FileDescriptor mInterruptFd = null;
focal_class.type: FileDescriptor
focal_class.var_name: mInterruptFd
focal_class.declarator: pcap4jFactoryClearCacheCounter = 0
focal_class.modifier: private
focal_class.original_string: private int pcap4jFactoryClearCacheCounter = 0;
focal_class.type: int
focal_class.var_name: pcap4jFactoryClearCacheCounter
focal_class.file: app/src/main/java/org/jak_linux/dns66/vpn/AdVpnThread.java
focal_class.identifier: AdVpnThread
focal_class.interfaces: implements Runnable, DnsPacketProxy.EventLoop
focal_class.class_method_signature: AdVpnThread.AdVpnThread(VpnService vpnService, Notify notify)
focal_class.full_signature: public  AdVpnThread(VpnService vpnService, Notify notify)
focal_class.identifier: AdVpnThread
focal_class.modifiers: public
focal_class.parameters: (VpnService vpnService, Notify notify)
focal_class.signature:  AdVpnThread(VpnService vpnService, Notify notify)
focal_class.class_method_signature: AdVpnThread.getDnsServers(Context context)
focal_class.full_signature: private static List<InetAddress> getDnsServers(Context context)
focal_class.identifier: getDnsServers
focal_class.modifiers: private static
focal_class.parameters: (Context context)
focal_class.return: List<InetAddress>
focal_class.signature: List<InetAddress> getDnsServers(Context context)
focal_class.class_method_signature: AdVpnThread.startThread()
focal_class.full_signature: public void startThread()
focal_class.identifier: startThread
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void startThread()
focal_class.class_method_signature: AdVpnThread.stopThread()
focal_class.full_signature: public void stopThread()
focal_class.identifier: stopThread
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void stopThread()
focal_class.class_method_signature: AdVpnThread.run()
focal_class.full_signature: @Override public synchronized void run()
focal_class.identifier: run
focal_class.modifiers: @Override public synchronized
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void run()
focal_class.class_method_signature: AdVpnThread.runVpn()
focal_class.full_signature: private void runVpn()
focal_class.identifier: runVpn
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void runVpn()
focal_class.class_method_signature: AdVpnThread.doOne(FileInputStream inputStream, FileOutputStream outFd, byte[] packet)
focal_class.full_signature: private boolean doOne(FileInputStream inputStream, FileOutputStream outFd, byte[] packet)
focal_class.identifier: doOne
focal_class.modifiers: private
focal_class.parameters: (FileInputStream inputStream, FileOutputStream outFd, byte[] packet)
focal_class.return: boolean
focal_class.signature: boolean doOne(FileInputStream inputStream, FileOutputStream outFd, byte[] packet)
focal_class.class_method_signature: AdVpnThread.writeToDevice(FileOutputStream outFd)
focal_class.full_signature: private void writeToDevice(FileOutputStream outFd)
focal_class.identifier: writeToDevice
focal_class.modifiers: private
focal_class.parameters: (FileOutputStream outFd)
focal_class.return: void
focal_class.signature: void writeToDevice(FileOutputStream outFd)
focal_class.class_method_signature: AdVpnThread.readPacketFromDevice(FileInputStream inputStream, byte[] packet)
focal_class.full_signature: private void readPacketFromDevice(FileInputStream inputStream, byte[] packet)
focal_class.identifier: readPacketFromDevice
focal_class.modifiers: private
focal_class.parameters: (FileInputStream inputStream, byte[] packet)
focal_class.return: void
focal_class.signature: void readPacketFromDevice(FileInputStream inputStream, byte[] packet)
focal_class.class_method_signature: AdVpnThread.forwardPacket(DatagramPacket outPacket, IpPacket parsedPacket)
focal_class.full_signature: public void forwardPacket(DatagramPacket outPacket, IpPacket parsedPacket)
focal_class.identifier: forwardPacket
focal_class.modifiers: public
focal_class.parameters: (DatagramPacket outPacket, IpPacket parsedPacket)
focal_class.return: void
focal_class.signature: void forwardPacket(DatagramPacket outPacket, IpPacket parsedPacket)
focal_class.class_method_signature: AdVpnThread.handleRawDnsResponse(IpPacket parsedPacket, DatagramSocket dnsSocket)
focal_class.full_signature: private void handleRawDnsResponse(IpPacket parsedPacket, DatagramSocket dnsSocket)
focal_class.identifier: handleRawDnsResponse
focal_class.modifiers: private
focal_class.parameters: (IpPacket parsedPacket, DatagramSocket dnsSocket)
focal_class.return: void
focal_class.signature: void handleRawDnsResponse(IpPacket parsedPacket, DatagramSocket dnsSocket)
focal_class.class_method_signature: AdVpnThread.queueDeviceWrite(IpPacket ipOutPacket)
focal_class.full_signature: public void queueDeviceWrite(IpPacket ipOutPacket)
focal_class.identifier: queueDeviceWrite
focal_class.modifiers: public
focal_class.parameters: (IpPacket ipOutPacket)
focal_class.return: void
focal_class.signature: void queueDeviceWrite(IpPacket ipOutPacket)
focal_class.class_method_signature: AdVpnThread.newDNSServer(VpnService.Builder builder, String format, byte[] ipv6Template, InetAddress addr)
focal_class.full_signature:  void newDNSServer(VpnService.Builder builder, String format, byte[] ipv6Template, InetAddress addr)
focal_class.identifier: newDNSServer
focal_class.parameters: (VpnService.Builder builder, String format, byte[] ipv6Template, InetAddress addr)
focal_class.return: void
focal_class.signature: void newDNSServer(VpnService.Builder builder, String format, byte[] ipv6Template, InetAddress addr)
focal_class.class_method_signature: AdVpnThread.configurePackages(VpnService.Builder builder, Configuration config)
focal_class.full_signature:  void configurePackages(VpnService.Builder builder, Configuration config)
focal_class.identifier: configurePackages
focal_class.parameters: (VpnService.Builder builder, Configuration config)
focal_class.return: void
focal_class.signature: void configurePackages(VpnService.Builder builder, Configuration config)
focal_class.class_method_signature: AdVpnThread.configure()
focal_class.full_signature: private ParcelFileDescriptor configure()
focal_class.identifier: configure
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: ParcelFileDescriptor
focal_class.signature: ParcelFileDescriptor configure()
focal_class.class_method_signature: AdVpnThread.hasIpV6Servers(Configuration config, List<InetAddress> dnsServers)
focal_class.full_signature:  boolean hasIpV6Servers(Configuration config, List<InetAddress> dnsServers)
focal_class.identifier: hasIpV6Servers
focal_class.parameters: (Configuration config, List<InetAddress> dnsServers)
focal_class.return: boolean
focal_class.signature: boolean hasIpV6Servers(Configuration config, List<InetAddress> dnsServers)
focal_method.body: boolean hasIpV6Servers(Configuration config, List<InetAddress> dnsServers) {
          if (!config.ipV6Support)
              return false;
  
          if (config.dnsServers.enabled) {
              for (Configuration.Item item : config.dnsServers.items) {
                  if (item.state == Configuration.Item.STATE_ALLOW && item.location.contains(":"))
                      return true;
              }
          }
          for (InetAddress inetAddress : dnsServers) {
              if (inetAddress instanceof Inet6Address)
                  return true;
          }
  
          return false;
      }
focal_method.class_method_signature: AdVpnThread.hasIpV6Servers(Configuration config, List<InetAddress> dnsServers)
focal_method.full_signature:  boolean hasIpV6Servers(Configuration config, List<InetAddress> dnsServers)
focal_method.identifier: hasIpV6Servers
focal_method.invocations: contains
focal_method.parameters: (Configuration config, List<InetAddress> dnsServers)
focal_method.return: boolean
focal_method.signature: boolean hasIpV6Servers(Configuration config, List<InetAddress> dnsServers)