Current location - Quotes Website - Collection of slogans - How to write the opposite port number in the ICMP message sent by ~ping program in network programming?
How to write the opposite port number in the ICMP message sent by ~ping program in network programming?
ICMP socket should use the original socket socket (af _ inet, sock _ raw, ...); Raw_prot of SOCK_RAW is used to represent the affiliated protocols of the network layer, not tcp_prot and udp_prot of the transport layer.