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

Hi,

I can see the data in wireshark trace but the same is not received by application. here is the setup I am using:

Access Point Detail (Router) Subnet Mask : 255.255.255.0 Default Gateway : 192.168.1.1

Device connected to Access Point:

  1. Computer :- IP : 192.168.1.80 Subnet Mask : 255.255.255.0 Default Gateway : 192.168.1.1
  2. Adapter 1 :- IP : 192.168.1.81(IP assigned by DHCP) Subnet Mask : 255.255.255.0 Default Gateway : 192.168.1.1
  3. Adapter 2 :- IP : 192.168.4.32(Static IP) Subnet Mask : 255.255.255.0 Default Gateway : 192.168.4.1

So my application(Devloped in c++ and C#) running on PC(UDP) can only see the data coming form Adapter 1 and do not see any data from Adapter 2, whereas wireshark can see data from both the adapter. How can my application can receive data from both the adapter like wireshark does.

asked 26 Mar '14, 10:14

Shanky's gravatar image

Shanky
11112
accept rate: 0%

edited 26 Mar '14, 10:28

grahamb's gravatar image

grahamb ♦
19.8k330206


My Q+D answer:

Reading the data from the adapters depends completely on how you've coded your application so that it will get data from both adapters. That is,you have to use the proper library calls to open/read from each of the adapters.

How Wireshark reads from the adapters is not relevant with respect to your application program.

permanent link

answered 26 Mar '14, 10:27

Bill%20Meier's gravatar image

Bill Meier ♦♦
3.2k1850
accept rate: 17%

To expand a little on Bill's comment, your app will need to bind to both IP's or listen on the 0.0.0.0 (all IP's) address.

But this is nothing to do with Wireshark as that uses completely different methods to capture traffic as opposed to a socket using app.

(26 Mar '14, 10:30) grahamb ♦

To add my two cents...

What is the output of the following command if you run it in an elevated DoS DOS box (I assume Windows because of C#).

netstat -nab

Locate the line(s) with the port number of your application and post those lines here or draw your own conclusions from that output.

(26 Mar '14, 10:37) Kurt Knochner ♦

My Q+D answer:

Q+D ??

(26 Mar '14, 10:42) Kurt Knochner ♦

= Quick and Dirty

(26 Mar '14, 10:56) Bill Meier ♦♦

obvious, now that you mention it ;-)

(27 Mar '14, 11:46) Kurt Knochner ♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×752
×166
×17
×12

question asked: 26 Mar '14, 10:14

question was seen: 2,936 times

last updated: 27 Mar '14, 11:46

p​o​w​e​r​e​d by O​S​Q​A