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,880 of 14,669   
   Jorgen Grahn to dbtouch   
   Re: what is the correct payload size   
   26 May 09 22:28:50   
   
   bdf0d928   
   From: grahn+nntp@snipabacken.se   
      
   On Tue, 26 May 2009 12:59:30 -0700 (PDT), dbtouch  wrote:   
   > Greets,   
   >   
   > I am evaluating raw udp performance with a simple program: my question   
      
   Is that "raw performance" or "raw socket performance"?  You spend a   
   lot of effort doing it the hard way by using SOCK_RAW -- is that   
   because you think it will be faster, or because that's the interface   
   you want to benchmark?  I'm not sure it will be faster; a real UDP   
   socket can, for example, do the routing table lookup once rather than   
   for every single datagram, and it can let the NIC do the checksumming   
   if it knows it supports that.   
      
   > is that when I set ip header, what is iph->ip_len I should set if my   
   > packet size is 1024. How about iph->ip_off, what value I need set?   
      
   Your program seems to be Linux-specific. If it is, the raw(7) man page   
   gives the answer to many of your questions. If you are not, I think   
   you need to read Stevens' books for the incompabilities between raw   
   sockets on different Unixes. (Or stop using raw sockets.)   
      
   > Since I send raw udp packet, I think I do not need to set TCP header   
   > (am I right?) In my box, sizeof(struct ip) is 20(dec), so I hardcoded   
   > iph->ip_sum.   
      
   I cannot make sense of that.   
      
   > Please review my program.   
      
   Why? Doesn't it work? If so, what are the symptoms, as seen using   
   tcpdump, strace, valgrind and other debugging tools?   
      
   /Jorgen   
      
   --   
     // Jorgen Grahn           R'lyeh wgah'nagl fhtagn!   
      
   --- 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