Jump to main content

##

# TCPIP_ICMP_CallbackDeregister Function

## C

    bool TCPIP_ICMP_CallbackDeregister(
        ICMP_HANDLE hIcmp
    );

## Description

This function notifies a stack client to remove its former registered notification handler. After this operation the client will no longer be notified about the receiving of replies to the ICMP requests.

## Preconditions

The TCP/IP Stack must be initialized and up and running. A previous successful call to TCPIP_ICMP_CallbackRegister has been done.

## Parameters

Parameters | Description
--- | ---
hIcmp | An ICMP handle obtained by TCPIP_ICMP_CallbackRegister.

## Returns

- True - If the notification handler has bee successfully removed.
- False - If such a notification handler could not be found.

## Remarks

None.

## Example

    void MyICMPCallbackFunction(TCPIP_NET_HANDLE hNetIf, IPV4_ADDR * remoteIP, void * data);
    ICMP_HANDLE hIcmp = TCPIP_ICMP_CallbackRegister(&MyICMPCallbackFunction);
    if(hIcmp != 0)
    {
        // successfully registered my handler
        // send requests and process the incoming results
        // ...
        // later on, once we're done, remove the notification handler
        TCPIP_ICMP_CallbackDeregister(hIcmp);
    }