Copyright (C) 1983, 1984, 1985 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.
IPRouter.mesa
Last Edited by: HGM, October 7, 1984 2:00:25 am PDT
Last Edited by: Nichols, August 15, 1983 4:34 pm
Last Edited by: Taft, January 5, 1984 5:17 pm
Hal Murray June 26, 1985 11:56:29 pm PDT
John Larson, June 12, 1987 8:45:47 pm PDT
DIRECTORY
CommDriver USING [Buffer],
Rope USING [ROPE],
IPDefs USING [Datagram, Address, InternetHeader];
IPRouter: CEDAR DEFINITIONS =
BEGIN
BestAddress: PROC [addresses: LIST OF IPDefs.Address] RETURNS [IPDefs.Address];
GoodAddress: PROC [address: IPDefs.Address] RETURNS [yes: BOOL];
SortAddresses: PROC [list: LIST OF IPDefs.Address] RETURNS[result: LIST OF IPDefs.Address];
DatagramPointer: UNSAFE PROC [b: CommDriver.Buffer] RETURNS [d: LONG POINTER TO IPDefs.InternetHeader];
Given a buffer from the buffer pool, returns a pointer to where the datagram should begin.
SendDatagram: PROC [data: IPDefs.Datagram];
Allocate a buffer, do the routing, and send it.
Redirect: PROC [dest, gateway: IPDefs.Address, source: IPDefs.Address];
Traffic to dest's net should be sent to gateway.
SetStateChangeProc: PROC [proc: PROC [Rope.ROPE] ];
END.