Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!mips!apple!netcomsv!gandrews From: gandrews@netcom.COM (Greg Andrews) Newsgroups: comp.sys.3b1 Subject: Re: Why 3 and 7? (was Re: patching uucico) Summary: Once again, the PROTOCOL limits the window size to 7. Message-ID: <1991Jun9.063022.229@netcom.COM> Date: 9 Jun 91 06:30:22 GMT References: <1991Jun8.020327.10713@netcom.COM> <1991Jun8.205320.2659@highspl> Organization: Netcom - Online Communication Services UNIX System {408 241-9760 guest} Lines: 56 In article <1991Jun8.205320.2659@highspl> burris@highspl (David Burris) writes: >> >> Well, uucp "g" can't go above a window size of 7, as I mentioned in my >> last article. > >Yes, the max is seven, though it doesn't seem it needs to be. The >value used for the window size is a char. There are two spots where >the code checks for != 0 and two spots where the code sets the window >size back to 3 if it is greater than 7. If one wanted to find the >spots to patch the checks for greater that 7, it could be patched to >window_size = BUFSIZ/64. Check your /usr/include/stdio.h file for >BUFSIZ. > Oh? A simple patch will allow packet ID numbers greater than 7? Take a look at the code that extracts the packet number from the received data bytes. Surprise! As has meen mentioned in a previous article (not mine), the uucp "g" protocol uses a SINGLE BYTE to send the packet information. There are five other bytes in the packet header, but they don't carry the info for the window. For data packets that byte contains three pieces of information: o The packet type (most significant two bits) o The packet identification number (next most significant three bits) o The ID number of the last acked packet (least significant three bits) So, for data packets, there are only three bits in the ID field. That means packets can only have eight ID numbers, zero through seven. A windowed protocol must NEVER have a window size equal to or greater than the packet numbering scheme. The window size must ALWAYS be at least one less than the packet numbering scheme. Since uucp "g" uses eight packet numbers (because the packet counter is three-bits wide), the window size cannot be larger than 7. You can patch your tests to check if the packet number is equal to 8, or 9 or 23 if you like, but all it will do is give you a BROKEN protocol. You can't use more than eight packet ID numbers, so you can't use a window larger than 7. Someone could certainly patch their system to insert an extra byte as the packet counter and use window sizes up to 255, but so what? It wouldn't be uucp "g" anymore. It would be a new protocol incompatible with all other uucp systems. >David Burris Aurora,Il. >burris@highspl ..!linac!highspl!burris -- .------------------------------------------------------------------------. | Greg Andrews | UUCP: {apple,amdahl,claris}!netcom!gandrews | | | Internet: gandrews@netcom.COM | `------------------------------------------------------------------------'