* Constants and structures defined by the internet system,
* Per RFC 790, September 1981.
#define IPPROTO_IP 0 /* dummy for IP */
#define IPPROTO_ICMP 1 /* control message protocol */
#define IPPROTO_GGP 2 /* gateway^2 (deprecated) */
#define IPPROTO_TCP 6 /* tcp */
#define IPPROTO_EGP 8 /* exterior gateway protocol */
#define IPPROTO_PUP 12 /* pup */
#define IPPROTO_UDP 17 /* user datagram protocol */
#define IPPROTO_HMP 20 /* host monitoring protocol */
#define IPPROTO_IDP 22 /* xns idp */
#define IPPROTO_RDP 27 /* reliabe datagram protocol */
* historical and inaccurate. See protocol .h files if you care
#define IPPORT_RESERVED 1024
#define IMPLINK_LOWEXPER 156
#define IMPLINK_HIGHEXPER 158
#ifdef when_convince_berk
* Internet layers for getsockopt()/setsockopt()
* (gaps left in case we forgot something)
#define SOL_INPROTO 2 /* tcp/udp/hmp/rdp */
#define SOL_INRAW 4 /* ip */
#define SOL_INETHER 6 /* ARP, etc. */
#define SOL_INIFADDR 8 /* interface addrs */
* Internet address (a structure for historical reasons)
#define INADDR_ANY ((u_long) 0x00000000)
#define INADDR_BROADCAST ((u_long) 0xffffffff) /* must be masked */
* Socket address, internet style.
* Options for use with [gs]etsockopt at the IP level.
#define IP_OPTIONS 1 /* set/get IP per-packet options */
* Macros for number representation conversion.
extern struct domain inetdomain
;
extern struct protosw inetsw
[];
struct in_addr
in_makeaddr();
* Treat a sockaddr as a sockaddr_in, and retrieve the IP address
#define satoipa(x) (((struct sockaddr_in *) (x)) ->sin_addr)