Path: utzoo!news-server.csri.toronto.edu!rutgers!mcnc!decwrl!uunet!hayes!tnixon From: tnixon@hayes.uucp Newsgroups: comp.dcom.modems Subject: Re: LAP-M frame formatting Message-ID: <3853.27de1d8e@hayes.uucp> Date: 13 Mar 91 12:39:42 GMT References: <5098@mindlink.UUCP> Organization: Hayes Microcomputer Products, Norcross, GA Lines: 26 In article <5098@mindlink.UUCP>, Mike_Benna@mindlink.UUCP (Mike Benna) writes: > What I'd like to know is how the data stream can be formatted so that > the header doesn't need to contain the length of the subsequent data but > that the receiving modem can somehow determine the length of the data > portion of the frame. LAPM, like MNP3, LAPB, LAPD, and many other protocols, is based on the High-level data link control (HDLC) frame format specified in ISO 3309. This uses a particular sequence of bits (01111110), known as a "flag", to delimit frames. Whenever five 1 bits appear in sequence in the frame contents, a 0 bit is inserted for transparency, so a flag sequence never appears in the frame contents. Thus, there's no need for the receiver to know in advance the length of the information part of the frame; all it does it look for the closing flag. It then knows that the preceeding two or four bytes (depending on whether you're using 16- or 32-bit frame check sequences) is the FCS, and everything before that and after the frame header is the data. -- Toby Nixon, Principal Engineer | Voice +1-404-840-9200 Telex 151243420 Hayes Microcomputer Products Inc. | Fax +1-404-447-0178 CIS 70271,404 P.O. Box 105203 | UUCP uunet!hayes!tnixon AT&T !tnixon Atlanta, Georgia 30348 USA | Internet hayes!tnixon@uunet.uu.net