Internet (IP) addresses
InAddr:
TYPE ~
MACHINE
DEPENDENT
RECORD [
a: BYTE,
b: BYTE,
c: BYTE,
d: BYTE
];
... as it appears on the wire.
anyInAddr: InAddr ~ [0, 0, 0, 0];
loopbackInAddr: InAddr ~ [128, 0, 0, 0];
broadcastInAddr: InAddr ~ [255, 255, 255, 255];
IP protocol numbers
IPProtocol:
TYPE ~
MACHINE
DEPENDENT {
IP(0), -- dummy for IP
ICMP(1), -- control message protocol
IGMP(2), -- group control protocol
GGP(3), -- gateway 2 (deprecated)
TCP(6), -- transmission control protocol
EGP(8), -- exterior gateway protocol
PUP(12), -- pup
UDP(17), -- user datagram protocol
IDP(22), -- xns idp
ND(77), -- UNOFFICIAL obsolescent network disk protocol
RAW(255), -- raw IP packet
(CARD.LAST)
};
TCP / UDP Ports
IPPort: TYPE ~ Basics.HWORD;
unspecifiedPort: IPPort ~ [0, 0]; -- for Bind calls
reservedPort: IPPort ~ [4, 0];
-- all ports <= this are reserved to root
UDPPort: TYPE ~ IPPort;
Ports for network standard functions
echoPort: IPPort ~ [0, 7];
discardPort: IPPort ~ [0, 9];
syStatPort: IPPort ~ [0, 11];
dayTimePort: IPPort ~ [0, 13];
netStatPort: IPPort ~ [0, 15];
ftpPort: IPPort ~ [0, 11];
telnetPort: IPPort ~ [0, 23];
smtpPort: IPPort ~ [0, 25];
timeServerPort: IPPort ~ [0, 37];
nameServerPort: IPPort ~ [0, 42];
whoIsPort: IPPort ~ [0, 43];
mtpPort: IPPort ~ [0, 57];
Ports for host-specific functions
tftpPort: IPPort ~ [0, 69];
rjePort: IPPort ~ [0, 77];
fingerPort: IPPort ~ [0, 79];
ttyLinkPort: IPPort ~ [0, 87];
supdupPort: IPPort ~ [0, 95];
Unix TCP ports
execServerPort: TCPPort ~ [2, 0];
loginServerPort: TCPPort ~ [2, 1];
cmdServerPort: TCPPort ~ [2, 2];
efsServerPort: TCPPort ~ [2, 8];
Unix UDP ports
biffPort: UDPPort ~ [2, 0];
whoServerPort: UDPPort ~ [2, 1];
routeServerPort: UDPPort ~ [2, 8];
Socket Address (host, port)
SockAddrInPtr: TYPE ~ POINTER TO SockAddrIn;
SockAddrIn:
TYPE ~
MACHINE
DEPENDENT
RECORD [
family: UnixTypes.AddressFamily ¬ inet,
port: IPPort ¬ unspecifiedPort,
addr: InAddr ¬ anyInAddr,
zero: PACKED ARRAY [0..8) OF BYTE ¬ ALL[0]
];
}.