// GateForward.decl

// Last modified January 26, 1979  3:44 PM by Boggs

manifest
[
routeBcstInterval = 3000  //30 seconds

psRouteInfo = 2		// well known, registered socket

ptRouteRequest = 200b
ptRouteReply = 201b
ptRouteError = 202b
ptStatsRequest = 203b
ptStatsReply = 204b

gfStatsVersion = 1
]

//----------------------------------------------------------------------------
structure Queue:	// Singly linked list, usually maintained FIFO
//----------------------------------------------------------------------------
[
head word		// -> first thing; 0 if queue is empty
tail word		// -> last thing; undefined if queue is empty
]

//----------------------------------------------------------------------------
structure Stats:
//----------------------------------------------------------------------------
[
version word		// = gfStatsVersion
routeReqs word 2	// number of route info requests
numNets word		// number of networks
numTMEs word		// number of TMEs in this packet
//numNets net numbers, one word each
//numTMEs TMEs, 3 words each
]
manifest lenStats = size Stats/16  //size of fixed part only

//----------------------------------------------------------------------------
structure GF:		// 'global frame' for Gateway Forwarder
//----------------------------------------------------------------------------
[
tm word			// -> Transit Matrix
stats @Stats
routeBcstTimer word	// timer for broadcasting routing info
iQ @Queue		// forwarder input queue
tQ @Queue		// forwarder transmitted queue
]
manifest lenGF = size GF/16

//----------------------------------------------------------------------------
structure TME:		// Transit Matrix Entry
//----------------------------------------------------------------------------
[
sdNet word = [ sNet byte; dNet byte ]
count word 2
]
manifest lenTME = size TME/16

//----------------------------------------------------------------------------
structure TM: [ @HTP; TME↑0,1:@TME ]  // Transit Matrix hash table
//----------------------------------------------------------------------------