Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!think!barmar From: barmar@think.COM (Barry Margolin) Newsgroups: comp.protocols.tcp-ip Subject: Re: Serial TCP/IP - all the same? Message-ID: <26204@think.UUCP> Date: 23 Aug 88 05:32:10 GMT References: <759@stcns3.stc.oz> <977@rlgvax.UUCP> Sender: usenet@think.UUCP Reply-To: barmar@kulla.think.com.UUCP (Barry Margolin) Organization: Thinking Machines Corporation, Cambridge, MA Lines: 26 In article <977@rlgvax.UUCP> dennis@rlgvax.UUCP (Dennis.Bednar) writes: > Justification of the Rules: The justifications you gave explain why there must be SOME escape convention (which should go without saying), but not why that particular one was chosen. Why is this particular escape convention better than the old "double the special characters" convention or preceding a special character by the escape character? I don't think the doubled-character convention would actually work in SLIP because of the lack of a header (if a packet begins with FRMEND_data_char there would be three FRMEND characters in a row, and it would look like the FRMEND_data_char is actually the last character of the previous packet). But it would work to precede a FRMEND_data_char or FRMESC_data_char with a FRMESC: when forming a packet, you search for a FRMEND or FRMESC; if you find a FRMESC first you remove it from the stream, read the next character into the packet buffer, and then search again. The only advantage I see of the chosen scheme is that packetization and escape processing can occur as separate steps; was this the issue that resulted in this more complex scheme? Barry Margolin Thinking Machines Corp. barmar@think.com {uunet,harvard}!think!barmar