SetWANEvent vs SetPacketEvent

Home Forums Discussions Support Portal SetWANEvent vs SetPacketEvent

This topic contains 3 replies, has 3 voices, and was last updated by  Vadim Smirnov 5 years, 5 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #5055

    dipple
    Participant

    I need to monitor packets on adapters connected to the local network as well as adapters connected to the internet via Dialup. Do I need to set an event for both the SetWANEvent and SetPacketEvent?

    Is there anything special that I need to do in order to monitor / filter packets going through a dial up adapter versus an adapter connected to the local network?

    I have things working well with adapters on the local network, I am going to now test dialup connections and noticed the SetWANEvent method.

    Thank you

    #6134

    Vadim Smirnov
    Moderator

    The event you set into driver with SetWANEvent is signaled when the new dial-up (VPN, PPPoE and etc…) connection is established or dropped, so you could reinitialize your configuration information. It is rather similar to SetAdapterListChangeEvent than SetPacketEvent which is signaled when new packet is queued.

    #6135

    nat32support
    Participant

    @SerpentFly wrote:

    The event you set into driver with SetWANEvent is signaled when the new dial-up (VPN, PPPoE and etc…) connection is established or dropped, so you could reinitialize your configuration information. It is rather similar to SetAdapterListChangeEvent than SetPacketEvent which is signaled when new packet is queued.

    I’ve noticed that the WAN event can occur _before_ the RAS_LINKS table has been fully updated. I’ve solved the problem for now by sleeping for 1000 msec before copying the table for further use in my software.

    Is there any way of determining when the RAS_LINKS table is valid?

    #6136

    Vadim Smirnov
    Moderator

    Is there any way of determining when the RAS_LINKS table is valid?

    IP Helper API has addded certian new functions since Windows Vista which allows you to register callbacks on network interfaces changes. I think you can use these functions. An example, there is a callback on routing table changes and when new network connection appears in the system the routing table is definitely changed.

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

You must be logged in to reply to this topic.