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,889 of 14,669   
   Philip Paeps to Jorgen Grahn   
   Re: what is the correct payload size   
   27 May 09 12:52:43   
   
   From: philip+usenet@paeps.cx   
      
   Jorgen Grahn  wrote:   
   > On 27 May 2009 09:36:08 GMT, Philip Paeps  wrote:   
   > > dbtouch  wrote:   
   > > > 1. How to set the length of the datagram correctly?   
   > >   
   > > If you're using a raw socket and including the IP header, you will need to   
   > > set the the total length field to the length of the header plus the length   
   > > of any data and options.   
   >   
   > Unless the stack does it for you, as Linux raw(7) seems to indicate.   
      
   Heh - you're right.  The Linux kernel will always fill in the total length.  I   
   never knew that.  I always thought you had to provide a complete IP header   
   when setting IP_HDRINCL.  Makes sense for the kernel to deal with the checksum   
   and the total length though.  Good to know.   
      
   Note that for IPv6, IP_HDRINCL is gone for raw sockets.  RFC 3542 describes   
   socket options to access every field of the IPv6 header and any options or   
   hop-by-hop headers that may be behind it.  Very cool.  But totally irrelevant   
   in this thread. :-)   
      
   > But I agree with you about everything else, so I don't feel compelled to   
   > RTFM in detail ...   
      
   I think the OP should perhaps be doing more of that...   
      
    - Philip   
      
   --   
   Philip Paeps                                    Please don't email any replies   
   philip@paeps.cx                                     I follow the newsgroup.   
      
      any C++ coders here?   
      what's the question?   
      "any C++ coders here?"   
      >.>   
      
   --- 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