Next: Raw sockets, Previous: UDP sockets, Up: Client connections [Contents][Index]
The ICMP socket implementation is currently used in the tunnel server
which comes with the Serveez package. It implements a user protocol
receiving and sending ICMP packets by opening a raw socket with the
protocol IPPROTO_ICMP
.
The types of ICMP packets passed to the socket can be filtered using the
ICMP_FILTER
socket option (or by software as done here). ICMP
packets are always processed by the kernel too, even when passed to a
user socket.
Create an ICMP socket for receiving and sending.
Return NULL
on errors, otherwise an enqueued socket structure.
“If you are calling this function we will send an empty ICMP packet signaling that this connection is going down soon.” [ttn sez: huh?]
Send buf with length length via this ICMP socket sock. If length supersedes the maximum ICMP message size the buffer is split into smaller packets.