Results 1 to 4 of 4

Thread: IP packets with header 0x45

  1. #1
    Join Date
    Jun 2011
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default IP packets with header 0x45

    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,

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: IP packets with header 0x45

    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?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jun 2011
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: IP packets with header 0x45

    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,

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: IP packets with header 0x45

    I just ran the Broadcast Sender example on my Linux box and captured this header:
    Qt Code:
    1. No. Time Source Destination Protocol Info
    2. 1 0.000000 192.168.1.6 255.255.255.255 UDP Source port: 59307 Destination port: 45454
    3.  
    4. Frame 1: 61 bytes on wire (488 bits), 61 bytes captured (488 bits)
    5. Ethernet II, Src: Giga-Byt_c3:63:3f (1c:6f:65:c3:63:3f), Dst: Broadcast (ff:ff:ff:ff:ff:ff)
    6. Internet Protocol, Src: 192.168.1.6 (192.168.1.6), Dst: 255.255.255.255 (255.255.255.255)
    7. Version: 4
    8. Header length: 20 bytes
    9. Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00)
    10. Total Length: 47
    11. Identification: 0x0000 (0)
    12. Flags: 0x02 (Don't Fragment)
    13. Fragment offset: 0
    14. Time to live: 64
    15. Protocol: UDP (17)
    16. Header checksum: 0x7910 [correct]
    17. Source: 192.168.1.6 (192.168.1.6)
    18. Destination: 255.255.255.255 (255.255.255.255)
    19. User Datagram Protocol, Src Port: 59307 (59307), Dst Port: 45454 (45454)
    20. Data (19 bytes)
    21.  
    22. 0000 ff ff ff ff ff ff 1c 6f 65 c3 63 3f 08 00 45 00 .......oe.c?..E.
    23. 0010 00 2f 00 00 40 00 40 11 79 10 c0 a8 01 06 ff ff ./..@.@.y.......
    24. 0020 ff ff e7 ab b1 8e 00 1b c1 da 42 72 6f 61 64 63 ..........Broadc
    25. 0030 61 73 74 20 6d 65 73 73 61 67 65 20 31 ast message 1
    To copy to clipboard, switch view to plain text mode 
    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?

Similar Threads

  1. udp broadcast filtering own packets
    By Cruz in forum Qt Programming
    Replies: 0
    Last Post: 27th June 2011, 13:11
  2. Replies: 2
    Last Post: 28th January 2010, 06:26
  3. How to customize horizontal header (diagonal header view)
    By vairamuthu.g in forum Qt Programming
    Replies: 4
    Last Post: 4th September 2008, 15:59
  4. Reading all UDP packets
    By moron in forum Qt Programming
    Replies: 3
    Last Post: 27th May 2008, 15:51
  5. Updation of GUI truncates Packets
    By arunvv in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 11th July 2007, 19:13

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.