home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.protocols.tcp-ip      TCP and IP network protocols.      14,669 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 12,978 of 14,669   
   Barry Margolin to lancer6238@yahoo.com   
   Re: Incorrect length reported in UDP hea   
   30 Jul 09 00:54:18   
   
   7d283189   
   From: barmar@alum.mit.edu   
      
   In article   
   <1994050b-7352-444f-9047-967e1652eefb@i8g2000pro.googlegroups.com>,   
    "lancer6238@yahoo.com"  wrote:   
      
   > Hi all,   
   >   
   > Is it common for UDP packets to have the length in its header reported   
   > wrongly? I'm writing a program that simply parses through the various   
   > headers in a packet, and I'm getting a lot of values larger than 1500   
   > in my variable "size_udp", which is obtained via   
   >   
   > size_udp = ntohs(udp->len);   
   >   
   > where udp points to the beginning of the UDP header and len is the   
   > length field in the UDP header.   
   >   
   > I'm not sure if I'm parsing incorrectly, or if it's inherent in UDP   
   > packets, as I do get correct size_udp values for other UDP packets as   
   > well.   
      
   The maximum size of a UDP datagram is 65535, not 1500.  A large UDP   
   datagram will be fragmented to fit into 1500-byte packets.   
      
   --   
   Barry Margolin, barmar@alum.mit.edu   
   Arlington, MA   
   *** PLEASE don't copy me on replies, I'll read them in the group ***   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca