PDA

View Full Version : IP packets with header 0x45



Pablo220372
27th June 2011, 21:05
Hello everybody,

I have a QT application on Linux that send UDP datagrams to another application on the same machine, actually, an application running on uIP stack. The problem is that QT send IP packets with 0x46 in the header, meaning ip headers with extensions, but uIP stack does not support these, only 0x45 and IPV6. Is there any way to set the QUdpSocket to send these kind of packets? or the problem is in setting Linux ? thanks for any support,

Regards,

wysota
27th June 2011, 21:33
Qt doesn't send any packets. Qt uses your system's network stack so it's your system that sends this packet. And what field do you mean that has this 0x46 value?

Pablo220372
27th June 2011, 21:57
Thx for your replay.

Actually, uIP stack accept ip packets with the first 8 bits, (0-3 version, 4-7 length) equal to 0x45. After checking my QT application sending UDP datagrams to uIP stack, it complains that the header is 0x46, meaning ip header with the field options included. So, I would need to find the way to set linux to send ip headers with the first 8 bits equal to 0x45. Do you thing is there any way to do that? thx in advance,

ChrisW67
27th June 2011, 23:30
I just ran the Broadcast Sender example on my Linux box and captured this header:


No. Time Source Destination Protocol Info
1 0.000000 192.168.1.6 255.255.255.255 UDP Source port: 59307 Destination port: 45454

Frame 1: 61 bytes on wire (488 bits), 61 bytes captured (488 bits)
Ethernet II, Src: Giga-Byt_c3:63:3f (1c:6f:65:c3:63:3f), Dst: Broadcast (ff:ff:ff:ff:ff:ff)
Internet Protocol, Src: 192.168.1.6 (192.168.1.6), Dst: 255.255.255.255 (255.255.255.255)
Version: 4
Header length: 20 bytes
Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00)
Total Length: 47
Identification: 0x0000 (0)
Flags: 0x02 (Don't Fragment)
Fragment offset: 0
Time to live: 64
Protocol: UDP (17)
Header checksum: 0x7910 [correct]
Source: 192.168.1.6 (192.168.1.6)
Destination: 255.255.255.255 (255.255.255.255)
User Datagram Protocol, Src Port: 59307 (59307), Dst Port: 45454 (45454)
Data (19 bytes)

0000 ff ff ff ff ff ff 1c 6f 65 c3 63 3f 08 00 45 00 .......oe.c?..E.
0010 00 2f 00 00 40 00 40 11 79 10 c0 a8 01 06 ff ff ./..@.@.y.......
0020 ff ff e7 ab b1 8e 00 1b c1 da 42 72 6f 61 64 63 ..........Broadc
0030 61 73 74 20 6d 65 73 73 61 67 65 20 31 ast message 1

As you can see the IP headers, which Qt has no direct influence over, do not contain the options field (lines 7/8 and second last byte on line 22 = 0x45).

Do you have a router/filter/firewall between sender and receiver that might be manipulating headers?