3

In my understanding, if you have a UDP socket client that is bound to a particular port, then a second UDP client on the same machine can't bind to the same port.

If this is the case, then how can a packet sniffing program like Wireshark run on the same machine you have a UDP client without issues?

6

Packet sniffing applications tap into the lower layers of the network stack, not at the top like your UDP-using applications that connect to UDP at the top of the network stack.

  • Are you saying that the packet sniffing applications work at the network/routing layer? – Fred Dec 13 '18 at 22:04
  • Even lower than that. Most can capture the Data-Link frames. – Ron Maupin Dec 13 '18 at 22:05
  • 1
    @Fred Usually the packet capturing happens right on top of the NIC, ie. between layer 2 and 3. – Zac67 Dec 13 '18 at 22:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.