SOIcmpCreateHandle

Syntax

#include <cafe.h>
#include <cafe/network.h>

int SOIcmpCreateHandle(int family);

Parameters

family Protocol family to be used.
AF_INET is the only supported protocol address family.

Return Values

An ICMP handle will be returned upon success. Upon failure, -1 is returned and errno is set appropriately.

Errors

SO_ELIBNOTREADY Socket library is not initialized.
SO_ENOMEM Insufficient memory in the stack.
SO_EAFNOSUPPORT Address family not supported.
SO_ENORESOURCES No more ICMP handles available.
SO_EFAULT An abnormal operation occurred in the stack. The corresponding handle should be closed for this type of serious error.

Description

Creates an ICMP handle in which echo requests may be made from. A Maximum of 32 handles may be created at the same time.

ICMP API Overview

Do Not Call From

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.

See Also

SOIcmpCloseHandle
SOIcmpPing
SOIcmpCancel
SOIcmpLastCodeType

Revision History

2014/01/24 Initial version.


CONFIDENTIAL