Copyright (C) 1983 by Xerox Corporation. All rights reserved. The following program was created in 1983 but has not been published within the meaning of the copyright law, is furnished under license, and may not be used, copied and/or disclosed except in accordance with the terms of said license.
IPOps.mesa
Last Edited by: Nichols, August 15, 1983 2:19 pm
Last Edited by: Taft, January 5, 1984 4:16 pm
John Larson, June 4, 1986 11:23:25 pm PDT
DIRECTORY
IPDefs USING [Datagram, DByte],
CommDriver USING [Buffer],
Pup USING [Host];
IPOps: CEDAR DEFINITIONS
~ BEGIN
maxTTL: INT ~ 120; -- maximum value for time to live
MoveBytes: UNSAFE PROC [toPtr: LONG POINTER, toOffset: INT, fromPtr: LONG POINTER, fromOffset: INT, length: INT];
Move data bytes around. Uses ByteBlt.
HeaderChecksum: PROC [data: IPDefs.Datagram] RETURNS [checksum: IPDefs.DByte];
Compute the header checksum for a datagram.
OnesComplementAddBlock: UNSAFE PROC [ptr: LONG POINTER, count: CARDINAL, initialSum: CARDINAL ← 0] RETURNS [sum: CARDINAL];
Computes (efficiently) the ones-complement sum of the 16-bit words in the block [ptr .. ptr+count)^.
Send: PROC [etherDest: Pup.Host, buffer: CommDriver.Buffer, bytes: CARDINAL];
Put the bits on the wire
END.