<> <> <<>> DIRECTORY Arpa USING [Address], ArpaBuf USING [Buffer, Protocol] ; ArpaIP: CEDAR DEFINITIONS ~ { <> Handle: TYPE ~ REF Object; Object: TYPE; Buffer: TYPE ~ ArpaBuf.Buffer; Buffers: TYPE ~ ArpaBuf.Buffer; <> ChecksumProc: TYPE ~ PROC [b: Buffers]; <> <<>> RouteHint: TYPE ~ REF; <> nullRouteHint: READONLY RouteHint; <> CreateHandle: PROC [protocol: ArpaBuf.Protocol, recvProc: RecvProc, recvErrorProc: RecvProc _ NIL, acceptLongDatagrams: BOOL _ FALSE] RETURNS [handle: Handle]; <> <> <> <> <> DestroyHandle: PROC [handle: Handle]; <> <> <> <> RecvProc: TYPE ~ PROC [b: Buffers] RETURNS [rB: Buffers]; <> <> <> <> FreeBuffers: PROC [b: Buffers]; <> GetUserBytes: PROC [b: Buffer] RETURNS [bodyBytes: CARDINAL, optionsBytes: CARDINAL]; <> GetSource: PROC [b: Buffers] RETURNS [source: Arpa.Address]; <> <> AllocBuffers: PROC [howMany: CARDINAL _ 1] RETURNS [Buffers]; <> SetUserBytes: PROC [b: Buffer, bodyBytes: CARDINAL, optionsBytes: CARDINAL _ 0]; <> <> SetNoFragmentation: PROC [b: Buffers, inhibitFragmentation: BOOL _ TRUE]; <> <> Send: PROC [h: Handle, b: Buffers, dest: Arpa.Address, setChecksum: ChecksumProc _ NIL, hint: RouteHint _ NIL] RETURNS [newHint: RouteHint]; <> <> <> <> <> <> <> <> <<>> <> FetchOptionAddress: PROC [b: Buffer, pos: CARDINAL] RETURNS [address: Arpa.Address]; FetchOptionByte: PROC [b: Buffer, pos: CARDINAL] RETURNS [value: BYTE]; FetchOptionH: PROC [b: Buffer, pos: CARDINAL] RETURNS [value: CARD16]; FetchOptionF: PROC [b: Buffer, pos: CARDINAL] RETURNS [value: CARD32]; StoreOptionAddress: PROC [b: Buffer, pos: CARDINAL, address: Arpa.Address]; StoreOptionByte: PROC [b: Buffer, pos: CARDINAL, value: BYTE]; StoreOptionH: PROC [b: Buffer, pos: CARDINAL, value: CARD16]; StoreOptionF: PROC [b: Buffer, pos: CARDINAL, value: CARD32]; <> SendToSelf: PUBLIC PROC [h: Handle, b: Buffers, dest: Arpa.Address, setChecksum: ChecksumProc]; <> <> <> DispatchICMP: PROC [b: Buffers, protocol: ArpaBuf.Protocol]; <> <> <> OnesComplementAddBlock: UNSAFE PROC [ptr: LONG POINTER, count: CARDINAL, initialSum: CARDINAL _ 0] RETURNS [sum: CARDINAL]; <> MoveBytes: UNSAFE PROC [toPtr: LONG POINTER, toOffset: INT, fromPtr: LONG POINTER, fromOffset: INT, bytes: INT]; <> <> Error: ERROR [code: ATOM]; <> <<$protocolOutOfRange : bogus protocol specified to CreateHandle.>> <<$nilRecvProc : NIL recvProc in call to CreateHandle.>> <<$protocolAlreadyRegistered : we only allow one protocol module per protocol.>> <<$handleDestroyed : you can't send on a handle after calling Destroy, or Destroy a handle more than once.>> <<$notICMP : non-ICMP datagram passed to Dispatch>> <> }...