Ask Your Question
0

Destination address confusion with wireshark

asked 2019-01-20 02:53:29 +0000

sidk gravatar image

updated 2019-01-20 06:06:38 +0000

Guy Harris gravatar image

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

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-01-20 06:06:25 +0000

Guy Harris gravatar image

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.

edit flag offensive delete link more

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 gravatar imagesidk ( 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 gravatar imageJasper ( 2019-01-20 12:13:04 +0000 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-01-20 02:53:29 +0000

Seen: 1,732 times

Last updated: Jan 20 '19