Thread: Reading UDP header

  1. #1
    Registered User
    Join Date
    Feb 2009
    Posts
    12

    Reading UDP header

    I am injecting packets using sendto
    and receiving packets using recvfrom

    Is there a way to read the UDP headers which are used by the lower layer.

    I don't really want to go into raw sockets to do that....

  2. #2
    Registered User
    Join Date
    Apr 2008
    Posts
    396
    if this is just to check things, you can use a 3rd party tool to monitor the traffic like wireshark or tcpdump.

  3. #3
    Registered User
    Join Date
    Jul 2007
    Posts
    131
    UDP headers are just [src port][dst port][lenght][checksum]. There pretty much isn't anything you already don't know, system calls don't give you, or you can't compute easily.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help with UDP
    By AlexS in forum C# Programming
    Replies: 0
    Last Post: 07-07-2009, 06:21 PM
  2. simultaneously waiting for data on FIFO and UDP using select call
    By yogesh3073 in forum Networking/Device Communication
    Replies: 2
    Last Post: 01-05-2007, 09:53 AM
  3. Header Files
    By Volair in forum C Programming
    Replies: 2
    Last Post: 12-09-2005, 10:51 AM
  4. Problems in reading binary file
    By serena in forum C Programming
    Replies: 3
    Last Post: 04-14-2005, 03:54 AM
  5. unblocked UDP reading
    By Mastadex in forum Linux Programming
    Replies: 7
    Last Post: 12-15-2004, 09:55 AM