IPV6_EVENT_HANDLER Type

C

typedef void (* IPV6_EVENT_HANDLER)(TCPIP_NET_HANDLE hNet, IPV6_EVENT_TYPE evType, const void* evParam, const void* usrParam);

Desscription

Type: IPV6_EVENT_HANDLER.

Once an IPv6 event occurs, the IPv6 service will call the registered handler. The handler has to be short and fast. It is meant for setting an event flag, not for lengthy processing.

evParam is a parameter that's associated to an IPv6 event.

  • For an address event (IPV6_EVENT_ADDRESS_ADDED, IPV6_EVENT_ADDRESS_REMOVED) it should typecast to (const IPV6_ADDR_STRUCT*)

  • For an IPV6_EVENT_ULA_ADDRESS_GENERATED ULA event it should typecast to (const IPV6_ADDR*)

  • For an IPV6_EVENT_ULA_ADDRESS_FAILED ULA event the evParam is an IPV6_ULA_RESULT error code

The evParam is invalid outside of the IPV6_EVENT_HANDLER context call and should not be stored by the caller. Info that's needed has to be copied into caller's own context.

usrParam is a user-supplied parameter.

Remarks

For address related events, the passed (const IPV6_ADDR_STRUCT*) parameter is invalid after the notification call.