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?

1 Answer 1

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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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