Take the 2-minute tour ×  I was learning server/client basics,
as part of my networking programming skills development.  So
basically I write server listening on some port, and client
connecting to it and data flow goes on...  Now I'm fascinated
how ping is able to receive response from remote machine,
without any service responding to it? Or I'm mistaking here?
share|improve this question See my updated answer for how ping
can access the received ICMP messages –  artistoex Oct 11 '12 at
20:13  3 Answers 3  As ping (more accurately, ICMP echo
requests) is part of the Internet Protocol, your network stack
(which is your operating system's implementation of the
protocol) answers these requests.  It's neither TCP nor UDP nor
any other transport protocol. In the internet header, there is a
protocol field which indicates what type of payload the IP
packet contains. For TCP packets that field indicates TCP. For
ping packets it indicates ICMP.  Btw. this is not the only use
of ICMP. E.g. when the TTL of a packet dr