1*433d6423SLionel Sambuc /* 2*433d6423SLionel Sambuc server/ip/gen/in.h 3*433d6423SLionel Sambuc */ 4*433d6423SLionel Sambuc 5*433d6423SLionel Sambuc #ifndef __SERVER__IP__GEN__IN_H__ 6*433d6423SLionel Sambuc #define __SERVER__IP__GEN__IN_H__ 7*433d6423SLionel Sambuc 8*433d6423SLionel Sambuc #include <net/gen/in.h> 9*433d6423SLionel Sambuc #include <sys/types.h> 10*433d6423SLionel Sambuc 11*433d6423SLionel Sambuc #define IP_MIN_HDR_SIZE 20 12*433d6423SLionel Sambuc #define IP_MAX_HDR_SIZE 60 /* 15 * 4 */ 13*433d6423SLionel Sambuc #define IP_VERSION 4 14*433d6423SLionel Sambuc #define IP_DEF_TTL 64 15*433d6423SLionel Sambuc #define IP_MAX_TTL 255 16*433d6423SLionel Sambuc #define IP_DEF_MTU 576 17*433d6423SLionel Sambuc #define IP_MIN_MTU (IP_MAX_HDR_SIZE+8) 18*433d6423SLionel Sambuc #define IP_MAX_PACKSIZE 40000 19*433d6423SLionel Sambuc /* Note: this restriction is not part of the IP-protocol but 20*433d6423SLionel Sambuc introduced by this implementation. */ 21*433d6423SLionel Sambuc 22*433d6423SLionel Sambuc #define IPPROTO_ICMP 1 23*433d6423SLionel Sambuc #define IPPROTO_TCP 6 24*433d6423SLionel Sambuc #define IPPROTO_UDP 17 25*433d6423SLionel Sambuc 26*433d6423SLionel Sambuc #define IP_MC_ALL_SYSTEMS 0xE0000001 /* 224.0.0.1 */ 27*433d6423SLionel Sambuc 28*433d6423SLionel Sambuc typedef u32_t ipaddr_t; 29*433d6423SLionel Sambuc typedef u8_t ipproto_t; 30*433d6423SLionel Sambuc typedef struct ip_hdropt 31*433d6423SLionel Sambuc { 32*433d6423SLionel Sambuc u8_t iho_opt_siz; 33*433d6423SLionel Sambuc u8_t iho_data[IP_MAX_HDR_SIZE-IP_MIN_HDR_SIZE]; 34*433d6423SLionel Sambuc } ip_hdropt_t; 35*433d6423SLionel Sambuc 36*433d6423SLionel Sambuc #endif /* __SERVER__IP__GEN__IN_H__ */ 37*433d6423SLionel Sambuc 38*433d6423SLionel Sambuc /* 39*433d6423SLionel Sambuc * $PchId: in.h,v 1.6 2002/06/10 07:11:15 philip Exp $ 40*433d6423SLionel Sambuc */ 41