From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,d33a6edf2f2ec76e X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1992-03-13 10:30:28 PST Path: sparky!uunet!mcsun!sun4nl!wn1.sci.kun.nl!sci.kun.nl!tmiller From: tmiller@sci.kun.nl (Todd M. Miller) Newsgroups: comp.sys.dec Subject: Re: DECnet phase IV routing messages over ethernet & DDCMP Message-ID: <1992Mar13.162249.24396@sci.kun.nl> Date: 13 Mar 92 16:22:49 GMT References: <1992Mar12.195537.18533@gordian.com> Sender: news@sci.kun.nl (NUnet News Owner) Organization: University of Nijmegen dan@gordian.com (Dan Lambright) writes: >I've been trying to interpret DECnet phase IV routing messages >over DDCMP and the ethernet. I was wondering if anyone out there could >answer some of these questions I have: Digital Data Communications Message Protocol(DDCMP) is no longer supported by DEC (according to nasty mail I got for mentioning it in comp.sys.ultrix), but in VMS I have relied on it. As many of the readers of this group know, it is the network protocol covering Rainbows, PRO's, Microvaxes, and VAXes that brings network access (and multiple sessions) over a cable or modem. For those interested, I present here an abridged version of "Technical Aspects of Data Communication" chapter 18 "DDCMP" by John E. McNamara, 1977. Although I have not tried, it seems to be everything you need to program a DDCMP DDCMP Message Queuing System: "In the DDCMP protocol, any pair of stations that exchange messages with each other number those messages sequentially starting with message number 1. Each successive data message is numbered using the next number sequence, modulo 256. Thus a long sequence of messages would be numbered 1,2,3,... 254,255,0,1,... The numbering applies to each direction separately. For example, station A might be sending its messages 6,7,8 to station B while station B is sending its messages 5,6,7 to station A. Thus, in a multipoint configuration where a control station is engaged in two-way communication with 10 tributary stations, there are 20 different message number sequences involved - one for messages from each of the 10 tributaries to the control station and one for messages from the control station to each of the 10 tributaries. Whenever a station transmits a message to another station, it assigns its next sequential message number to that message and places that number in the "Sequence" field of that message header. In addition to maintaining a counter for sequentially numbering the messages which it sends, the station also maintains a counter of the message numbers received from the other station. It updates that counter whenever a message is received with a message number exactly one higher than the previously received message number. The contents of the received message counter are inclueded in the "Response" field of the message being sent, to indicate to the other station the highest sequenced message that has been received. When a station receives a message containing an error, that station sends a negative acknowledge (NAK) message back to the transmitting station. DDCMP does not require an acknowledgement for each message, as the number in the response field of a normal header, or in either the special NAK or positive acknowledgement (ACK) message, specifies the sequence number of the last good message received. For example, if messages 4,5, and 6 have been received since the last time an acknowledgement was sent, and message 6 is bad, the NAK message specifies the number 5 which says "messages 4 & 5 are good and 6 is bad." When DDCMP operates in full-duplex mode, the line does not have to be turned around; the NAK is simply added to the messages for the transmitter. When a station receives a message that is out of sequence, it does not respond to that message. The transmitting station will detect this from the response field of the messages which it receives, and if the "reply wait" timer expires before the transmitting station receives an acknowledgement, the transmitting station will send a "REP" message. The REP message contains the sequence number of the most recent unacknowledged message sent to the distant station. If the receiving station has correctly received the message referred to in the REP message (as well as the messages proceding it), it replies to the REP by sending a positive acknowledgement (ACK). If it has not received the message referred to in sequence, it sends a NAK containing the number of the last message that it did receive correctly. The transmitting station will then retransmit all data messages after the message specified in the NAK. The numbering system for DDCMP messages permits there to be up to 255 unacknowledged messages outstanding, a useful feature when working on high delay circuits such as those using satellites. DDCMP Message Format: - - - ----- ---- -------- -------- ------- ----- ----------- ----- |S||S||C||Count||Flag||Repsonse||Sequence||Address||CRC 1||Information||CRC 2| |Y||Y||L|| 14 || 2 || 8 bits || 8 bits || 8 bits|| 16 ||up to 16363|| 16 | |N||N||A||bits ||bits| -------- -------- ------- | bits|| 8-bit || bits| | || ||S| ----- ---- ----- | characters| ----- | || ||S| ----------- - - - | Only Data & Maintenance Message types have info & CRC 2 fields | SYN is a sync character. Classes: 10000001 = Data Messages (SOH) 00000101 = Acknowledgement (ENQ) 00000101 = Negative Acknowledgement (DLE) Count: Used for Data and Maintenance messages to indicate the number of characters that will follow the header and form the information part of the message. In control messages, the first 8 bits designate the type of control message and the last 6 0's (except for NAK which uses the low 6 bits for a reason: BCC Header Error 000001 BCC Data Error 000010 Rep. Response 000011 Buffer Unavailable 000100 Reciever Overrun 000101 Message too Long 000110 Header Format Error 000111 Flag: Contains the quick sync and select flags, bits 0 and 1 respectively: Quick Sync is used to inform the receiving station that the message will be followed by sync characters; the receiver may wish to set its associated synchronous receiver hardware into "sync search" and syncs will be discarded until the first character of the next message arrives. The purpose of this is to permit the receiving station to engage any hardware sync-stripping logic it might have and prevent it from filling its buffers with sync characters. The select flag is used to indicate that this is the last message which the transmitting station is going to transmit and that the addressed station is now permitted to begin transmitting. This flag is useful in half-duplex or multipoint configurations, where transmitters need to get turned on and off. The Response field: The response field contains the number of the last message correctly received. This field is used in Data Message and in the positive and negative acknowledge types of Control Message. Its function should be evident from the preceding discussion of sequence control. The Sequence field: The sequence field is used in Data Messages and in the REP type of Control Message. In a Data Message, it contains the sequence number of the message as assigned by the transmitting station. In a REP message, it is used as part of the question: "Have you received all messages up through message number (specify) correctly?". The Address Field: The address field is used to identify the tributary station in multipoint systems and is used in message both to and from the tributary. In point to point operation, a station sends address "1" but ignores the address field on reception. In addition to the positive and negative acknowledgement and REP types of Control Message, there are also start and start acknowledge Control Messages. These are used to place the station which receives them in a known state. In particular, they intialize the message counters, timers, and other counters. The start ackknowledge message indicates that this has been accomplished. Maintenance Messages: These are typically bootstrap messages containing load programs in the information field. Known Drawbacks: The header is short and higher level operating systems must have a buffer of the appropriate size ready on relatively short notice. -- =============================================================================== Todd M. Miller tmiller@caos.caos.kun.nl CAOS/CAMM, KUN tmiller@sci.kun.nl Nijmegen, NL (031) 080-653383 (CAOS/CAMM)