First time here? Check out the FAQ!
THIS IS A TEST INSTANCE. Feel free to ask and answer questions, but take care to avoid triggering too many notifications.
0

Destination address confusion with wireshark

Hello, being first time here, I am transmitting udp packets from microcontroller to pc my setup is below

at MCU Side IP Address: 192.168.0.100 Gateway: 192.168.0.250 Destination IP: 192.168.0.1 Subnet Mask:255.255.255.0

at PC Side IP Address: 192.168.0.250 Gateway: None Subnet Mask:255.255.255.0

Wireshark at Pc is capturing correct data but showing wrong destinatiin address why??? Destination address shown at wireshark is 1.0.168.192

sidk's avatar
1
sidk
asked 2019-01-20 02:53:29 +0000
Guy Harris's avatar
19.9k
Guy Harris
updated 2019-01-20 06:06:38 +0000
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

Wireshark at Pc is capturing correct data but showing wrong destinatiin address why??? Destination address shown at wireshark is 1.0.168.192

Because either 1) there's a bug in Wireshark, so that it isn't properly handling the destination address field in whatever packet that is, and is treating as being in the wrong byte order or 2) there's a bug in the software on the microcontroller, so that the destination address field is in the wrong byte order.

If that field is the destination field in the IP header, the chances are 99.99999999999999999999% that it's a bug in the software on the microcontroller.

Guy Harris's avatar
19.9k
Guy Harris
answered 2019-01-20 06:06:25 +0000
edit flag offensive 0 remove flag delete link

Comments

Ok i'll check my software again thanks for reply. But one more thing to share When in software i give the broadcast address it catches correct destination address that is 255.255.255.255. It only reverses the destination address to 1.0.168.192 that should be 192.168.0.1. Any suggestions please

sidk's avatar sidk (2019-01-20 07:42:44 +0000) edit

1.0.168.192 is a byte swapped version of 192.168.0.1 - but if you do the same to 255.255.255.255 you get 255.255.255.255, because all bytes are 255. So if the same happens to both you can't tell from the broadcast address for obvious reasons. My guess is that there is a swap32() missing in the code before writing the destination address to the wire.

Jasper's avatar Jasper (2019-01-20 12:13:04 +0000) edit
add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer