This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Capturing UDP packets from the same computer

0

Hello, I'm writing a program in C# and I'm sending UDP messages to my own computer. I want Wireshark to capture those packets, but it doesn't capture them. Maybe it's because those packets are not transmitted at all through my network card? and if so how can I still capture them using Wireshark? Thank you in advance, Hod

asked 13 Oct '10, 01:48

hodwolff's gravatar image

hodwolff
1111
accept rate: 0%


3 Answers:

0

Maybe it's because those packets are not transmitted at all through my network card?

That is correct. What the capture driver doesn't see won't show up in Wireshark.

and if so how can I still capture them using Wireshark?

That very much depends, see the Wiki on loopback interfaces.

answered 13 Oct '10, 04:28

Jaap's gravatar image

Jaap ♦
11.7k16101
accept rate: 14%

0

Can you rewrite the code to reference the local computers real IP instead of localhost or 127.0.0.1? That should force the traffic through the stack.

answered 13 Oct '10, 10:42

GeonJay's gravatar image

GeonJay
4705922
accept rate: 5%

It probably won't since the stack is usually smart(?) enough to see that (one of) it's own interface addresses is used, hence can loopback before hitting the capture driver.

(14 Oct '10, 01:28) Jaap ♦

0

I'm using Windows XP SP3 and writing in VS 2008. I've installed MS Loopback adapter on my copmuter but it still doesn't work. It seems like when I try to send a UDP packet I can't define the local IP address in that class - if I'm sending it to my network card or to the Loopback adapter the local address is the same as the remote address, so it doesn't work even when I'm sending to the loopback adapter. Can anyone help please? Thank you

answered 18 Oct '10, 06:05

hodwolff's gravatar image

hodwolff
1111
accept rate: 0%