|
|
1.1 ! root 1: /* ip_var.h 6.1 83/07/29 */ ! 2: ! 3: /* ! 4: * Overlay for ip header used by other protocols (tcp, udp). ! 5: */ ! 6: struct ipovly { ! 7: caddr_t ih_next, ih_prev; /* for protocol sequence q's */ ! 8: u_char ih_x1; /* (unused) */ ! 9: u_char ih_pr; /* protocol */ ! 10: short ih_len; /* protocol length */ ! 11: struct in_addr ih_src; /* source internet address */ ! 12: struct in_addr ih_dst; /* destination internet address */ ! 13: }; ! 14: ! 15: /* ! 16: * Ip reassembly queue structure. Each fragment ! 17: * being reassembled is attached to one of these structures. ! 18: * They are timed out after ipq_ttl drops to 0, and may also ! 19: * be reclaimed if memory becomes tight. ! 20: */ ! 21: struct ipq { ! 22: struct ipq *next,*prev; /* to other reass headers */ ! 23: u_char ipq_ttl; /* time for reass q to live */ ! 24: u_char ipq_p; /* protocol of this fragment */ ! 25: u_short ipq_id; /* sequence id for reassembly */ ! 26: struct ipasfrag *ipq_next,*ipq_prev; ! 27: /* to ip headers of fragments */ ! 28: struct in_addr ipq_src,ipq_dst; ! 29: }; ! 30: ! 31: /* ! 32: * Ip header, when holding a fragment. ! 33: * ! 34: * Note: ipf_next must be at same offset as ipq_next above ! 35: */ ! 36: struct ipasfrag { ! 37: #ifdef VAX ! 38: u_char ip_hl:4, ! 39: ip_v:4; ! 40: #else /* Default to TAHOE style */ ! 41: u_char ip_v:4, ! 42: ip_hl:4; ! 43: #endif VAX ! 44: u_char ipf_mff; /* copied from (ip_off&IP_MF) */ ! 45: short ip_len; ! 46: u_short ip_id; ! 47: short ip_off; ! 48: u_char ip_ttl; ! 49: u_char ip_p; ! 50: u_short ip_sum; ! 51: struct ipasfrag *ipf_next; /* next fragment */ ! 52: struct ipasfrag *ipf_prev; /* previous fragment */ ! 53: }; ! 54: ! 55: struct ipstat { ! 56: int ips_badsum; /* checksum bad */ ! 57: int ips_tooshort; /* packet too short */ ! 58: int ips_toosmall; /* not enough data */ ! 59: int ips_badhlen; /* ip header length < data size */ ! 60: int ips_badlen; /* ip length < ip header length */ ! 61: }; ! 62: ! 63: struct ipstudy { ! 64: int ips_ssnoifaddr; /* cant deliver; strict routing and ! 65: cant find interface with addr */ ! 66: int ips_ssnoifnet; /* cant deliver; strict routing and ! 67: cant find interface with net# */ ! 68: int ips_oplen; /* option len is bad */ ! 69: int ips_noif; /* no inet interface??? */ ! 70: int ips_badopt; /* bad option field */ ! 71: int ips_cantdiffnethost; /* cant tell between net and host */ ! 72: int ips_timxceed; /* time exceeded */ ! 73: int ips_msgsize; /* message size too big? */ ! 74: int ips_badport; /* bad port */ ! 75: int ips_unreach; /* host or net is down */ ! 76: }; ! 77: ! 78: #ifdef KERNEL ! 79: /* flags passed to ip_output as last parameter */ ! 80: #define IP_FORWARDING 0x1 /* most of ip header exists */ ! 81: #define IP_ROUTETOIF 0x10 /* same as SO_DONTROUTE */ ! 82: #define IP_ALLOWBROADCAST SS_PRIV /* can send broadcast packets */ ! 83: ! 84: struct ipstat ipstat; ! 85: struct ipstudy ipstudy; ! 86: struct ipq ipq; /* ip reass. queue */ ! 87: u_short ip_id; /* ip packet ctr, for ids */ ! 88: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.