Traceroute.Sockets.ICMPConn (traceroute v0.2.5)
View SourceOpens a singleton ICMP socket connection upon request and sends back received ICMP packets to the
process that registered for its protocol + port_or_identifier combination.
We should only ever have one open ICMP socket, because received ICMP packets are not routed to the
ICMP sockets that sent them, unlike TCP or UDP sockets. That's why we open only a single socket and send&receive
all ICMP packets through this socket. The routing of received packets happens in our application based on a
combintation of protocol (e.g. :tcp, :udp, :icmp) and identifier (port or ICMP packet identifier)
Summary
Functions
Returns a specification to start this module under a supervisor.
Returns the pid of the ICMPConn for a given ip_protocol: (:ipv4 | :ipv6).
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Returns the pid of the ICMPConn for a given ip_protocol: (:ipv4 | :ipv6).
Starts the GenServer for the given ip_protocol if no process for the given protocol exists already.