Documentation ¶
Overview ¶
Package ping implements a fast ping prober. It sends ICMP pings to a list of targets and reports statistics on packets sent, received and latency experienced.
This ping implementation supports two types of sockets: Raw and datagram ICMP sockets.
Raw sockets require root privileges and all the ICMP noise is copied on all raw sockets opened for ICMP. We have to deal with the unwanted ICMP noise.
On the other hand, datagram ICMP sockets are unprivileged and implemented in such a way that kernel copies only relevant packets on them. Kernel assigns a local port for such sockets and rewrites ICMP id of the outgoing packets to match that port number. Incoming ICMP packets' ICMP id is matched with the local port to find the correct destination socket.
More about these sockets: http://lwn.net/Articles/420800/ Note: On some linux distributions these sockets are not enabled by default; you can enable them by doing something like the following:
sudo sysctl -w net.ipv4.ping_group_range="0 5000"
Index ¶
Constants ¶
This section is empty.
Variables ¶
var NativeEndian binary.ByteOrder
NativeEndian is the machine native endian implementation of ByteOrder.
Functions ¶
This section is empty.