Steven

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: how many adapters can we capture and modify packets on? #6117
    Steven
    Participant

      I guess if I just create only one thread to capture all packets on different adapters, there should be a performance problem or sometimes network choke.

      Because in the Passthrou sample:


      WaitForSingleObject ( hEvent, INFINITE );
      ResetEvent(hEvent);

      while(api.ReadPacket(&Request))
      {

      }
      If I update this codes like:
      switch( WaitForMultipleObjects(2, hEvent, false, INFINITE ) )
      {
      case WAIT_OBJECT_0:
      set parameters on Request;
      break;
      case WAIT_OBJECT_0 + 1:
      set parameters on Request;
      break;

      }

      while(api.ReadPacket(&Request))
      {

      }

      if there are packets in a listened queue, the code always read packets until there is no packets in this queue; in the worst case, this code needs to read 500 packets before it deals with other adapters, so other packets in other queues on other adapters will generate similar network traffic jams.

      Am I right?? just post a discussion on how to fix the performance issue.

      Thanks.

      in reply to: how can I detect an active Internet connection? #6114
      Steven
      Participant

        Now I am doing a test:
        On my laptop, I have a stable Internet connection through wire calbe;
        for the test purpose, I add one wireless adapter on my laptop, which can find out one AccessPoint, but, which needs ID and password to provide all services.
        Anyway, the current routing table is like:

        ===========================================================================
        Interface List
        0x1 ……………………… MS TCP Loopback interface
        0x2 …00 06 1b cf c3 41 …… Intel(R) PRO/100 VE Network Connection – packet Scheduler Miniport
        0x30004 …00 03 2f 17 5e 8f …… GL242201 – packet Scheduler Miniport
        ===========================================================================
        ===========================================================================
        Active Routes:
        Network Destination Netmask Gateway Interface Metric
        0.0.0.0 0.0.0.0 172.19.0.2 172.19.3.182 30
        0.0.0.0 0.0.0.0 207.162.10.253 207.162.10.161 20
        127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
        172.19.0.0 255.255.128.0 172.19.3.182 172.19.3.182 30
        172.19.3.182 255.255.255.255 127.0.0.1 127.0.0.1 30
        172.19.255.255 255.255.255.255 172.19.3.182 172.19.3.182 30
        207.162.10.0 255.255.255.0 207.162.10.161 207.162.10.161 20
        207.162.10.161 255.255.255.255 127.0.0.1 127.0.0.1 20
        207.162.10.255 255.255.255.255 207.162.10.161 207.162.10.161 20
        224.0.0.0 240.0.0.0 172.19.3.182 172.19.3.182 30
        224.0.0.0 240.0.0.0 207.162.10.161 207.162.10.161 20
        255.255.255.255 255.255.255.255 172.19.3.182 172.19.3.182 1
        255.255.255.255 255.255.255.255 207.162.10.161 207.162.10.161 1
        Default Gateway: 207.162.10.253
        ===========================================================================
        Persistent Routes:
        None

        However, 172.19.3.182 is ip address on my wireless adapter, which can not really access to Internet; 207.162.10.161 on the wire adapter is working.

        But, in my application, I want to know how to detect which one can really access to Internet?????

      Viewing 2 posts - 1 through 2 (of 2 total)