#include <cafe.h> #include <cafe/network.h> int SOIcmpCreateHandle(int family);
Protocol family to be used.
An ICMP handle will be returned upon success.
-1 is returned and
errno is set appropriately.
||Socket library is not initialized.|
||Insufficient memory in the stack.|
||Address family not supported.|
||No more ICMP handles available.|
||An abnormal operation occurred in the stack. The corresponding handle should be closed for this type of serious error.|
Creates an ICMP handle in which echo requests may be made from. A Maximum of 32 handles may be created at the same time.
SOInitmust return successfully before the SOIcmp API can be used.
SOIcmpCreateHandleto create an ICMP handle. When finished,
SOIcmpCloseHandlemust be called to close the handle.
SOIcmpPingto send an echo request to a destination address. Broadcast and multicast addresses are not supported.
SOIcmpPingis a blocking call and only one ping may be pending per ICMP handle. You may have more pending pings by creating more ICMP handles and using them on different threads.
SOIcmpCancelon a separate thread to cancel a pending ping associated with an ICMP handle.
|Callbacks||Do not call this function from any callback function.|
|Interrupt handler||Do not call this function from any interrupt handler.|
|Exception handler||Do not call this function from any exception handler.|
2014/01/24 Initial version.