home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / protocol / tcpip / 6035 < prev    next >
Encoding:
Text File  |  1993-01-21  |  1.9 KB  |  51 lines

  1. Newsgroups: comp.protocols.tcp-ip
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!news.sei.cmu.edu!fs7.ece.cmu.edu!crabapple.srv.cs.cmu.edu!cmaeda
  3. From: cmaeda+@cs.cmu.edu (Christopher Maeda)
  4. Subject: bug in ttcp: SO_RCVBUF, accept
  5. Message-ID: <C172rz.At9.1@cs.cmu.edu>
  6. Sender: news@cs.cmu.edu (Usenet News System)
  7. Nntp-Posting-Host: kona.mach.cs.cmu.edu
  8. Organization: School of Computer Science, Carnegie Mellon
  9. Date: Thu, 21 Jan 1993 08:11:53 GMT
  10. Lines: 39
  11.  
  12.  
  13. I noticed the following weird behavior using ttcp and the 4.3BSD TCP.
  14. (Actually a Mach 3.0 system but the binaries and the TCP code are
  15. 4.3BSD Unix).
  16.  
  17. I wanted ttcp to advertise receive windows larger than 4k so I invoked
  18. it as follows: 
  19.  
  20.     ttcp -r -s -b 32768 -l 16384
  21.  
  22. However, packet traces were showing that the receive windows were
  23. always 4k.  For the arguments above, ttcp does the following syscalls:
  24.  
  25.     fd = socket(AF_INET,SOCK_STREAM,0);
  26.     setsockopt(fd,SOL_SOCKET,SO_RCVBUF,...); /* 32k rcv window */
  27.     listen(fd,...);
  28.     fd = accept(fd,...)
  29.  
  30. In the TCP I'm using, the accept'ed connection doesn't pick up the
  31. modified sockbuf parameters from the parent socket and therefore the
  32. accept'ed connection has the 4k default receive window size.  If I
  33. change the order of calls to the following, the accept'ed connection
  34. advertises 32k receive windows.
  35.  
  36.     fd = socket(AF_INET,SOCK_STREAM,0);
  37.     listen(fd,...);
  38.     fd = accept(fd,...)
  39.     setsockopt(fd,SOL_SOCKET,SO_RCVBUF,...); /* 32k rcv window */
  40.  
  41. So my question is this.  Is the second syscall sequence what ttcp
  42. *should* have been doing or should the accept'ed socket have inherited
  43. the sockbuf parameters from the parent socket (and therefore my TCP is
  44. buggy).
  45.  
  46. -- 
  47. Chris Maeda, Grad Student and RetroGrouch <cmaeda@cs.cmu.edu>
  48. "A unix signature isn't a return address, it's the ASCII equivalent of
  49. a black velvet clown painting. It's a rectangle of carets surrounding
  50. a quote from a literary giant of weeniedom like Heinlein or Dr. Who."
  51.