ip_var.h (2fcb030ad50f30aa6c2604d494993dcfa7011117) | ip_var.h (ef39adf007d3a9125dc4a03ece5a586c1519e8b8) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 52 unchanged lines hidden (view full) --- 61 struct mbuf *ipq_frags; /* to ip headers of fragments */ 62 struct in_addr ipq_src,ipq_dst; 63 u_char ipq_nfrags; /* # frags in this packet */ 64 struct label *ipq_label; /* MAC label */ 65}; 66#endif /* _KERNEL */ 67 68/* | 1/*- 2 * Copyright (c) 1982, 1986, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 52 unchanged lines hidden (view full) --- 61 struct mbuf *ipq_frags; /* to ip headers of fragments */ 62 struct in_addr ipq_src,ipq_dst; 63 u_char ipq_nfrags; /* # frags in this packet */ 64 struct label *ipq_label; /* MAC label */ 65}; 66#endif /* _KERNEL */ 67 68/* |
69 * Structure stored in mbuf in inpcb.ip_options 70 * and passed to ip_output when ip options are in use. 71 * The actual length of the options (including ipopt_dst) 72 * is in m_len. 73 */ 74#define MAX_IPOPTLEN 40 75 76struct ipoption { 77 struct in_addr ipopt_dst; /* first-hop dst if source routed */ 78 char ipopt_list[MAX_IPOPTLEN]; /* options proper */ 79}; 80 81/* | |
82 * Structure attached to inpcb.ip_moptions and 83 * passed to ip_output when IP multicast options are in use. 84 */ 85struct ip_moptions { 86 struct ifnet *imo_multicast_ifp; /* ifp for outgoing multicasts */ 87 struct in_addr imo_multicast_addr; /* ifindex/addr on MULTICAST_IF */ 88 u_char imo_multicast_ttl; /* TTL for outgoing multicasts */ 89 u_char imo_multicast_loop; /* 1 => hear sends if a member */ --- 56 unchanged lines hidden (view full) --- 146struct inpcb; 147struct route; 148struct sockopt; 149 150extern struct ipstat ipstat; 151extern u_short ip_id; /* ip packet ctr, for ids */ 152extern int ip_defttl; /* default IP ttl */ 153extern int ipforwarding; /* ip forwarding */ | 69 * Structure attached to inpcb.ip_moptions and 70 * passed to ip_output when IP multicast options are in use. 71 */ 72struct ip_moptions { 73 struct ifnet *imo_multicast_ifp; /* ifp for outgoing multicasts */ 74 struct in_addr imo_multicast_addr; /* ifindex/addr on MULTICAST_IF */ 75 u_char imo_multicast_ttl; /* TTL for outgoing multicasts */ 76 u_char imo_multicast_loop; /* 1 => hear sends if a member */ --- 56 unchanged lines hidden (view full) --- 133struct inpcb; 134struct route; 135struct sockopt; 136 137extern struct ipstat ipstat; 138extern u_short ip_id; /* ip packet ctr, for ids */ 139extern int ip_defttl; /* default IP ttl */ 140extern int ipforwarding; /* ip forwarding */ |
154extern int ip_doopts; /* process or ignore IP options */ | |
155#ifdef IPSTEALTH 156extern int ipstealth; /* stealth forwarding */ 157#endif 158extern u_char ip_protox[]; 159extern struct socket *ip_rsvpd; /* reservation protocol daemon */ 160extern struct socket *ip_mrouter; /* multicast routing daemon */ 161extern int (*legal_vif_num)(int); 162extern u_long (*ip_mcast_src)(int); 163extern int rsvp_on; 164extern struct pr_usrreqs rip_usrreqs; 165 166int ip_ctloutput(struct socket *, struct sockopt *sopt); 167void ip_drain(void); 168void ip_fini(void *xtp); 169int ip_fragment(struct ip *ip, struct mbuf **m_frag, int mtu, 170 u_long if_hwassist_flags, int sw_csum); 171void ip_freemoptions(struct ip_moptions *); | 141#ifdef IPSTEALTH 142extern int ipstealth; /* stealth forwarding */ 143#endif 144extern u_char ip_protox[]; 145extern struct socket *ip_rsvpd; /* reservation protocol daemon */ 146extern struct socket *ip_mrouter; /* multicast routing daemon */ 147extern int (*legal_vif_num)(int); 148extern u_long (*ip_mcast_src)(int); 149extern int rsvp_on; 150extern struct pr_usrreqs rip_usrreqs; 151 152int ip_ctloutput(struct socket *, struct sockopt *sopt); 153void ip_drain(void); 154void ip_fini(void *xtp); 155int ip_fragment(struct ip *ip, struct mbuf **m_frag, int mtu, 156 u_long if_hwassist_flags, int sw_csum); 157void ip_freemoptions(struct ip_moptions *); |
158void ip_forward(struct mbuf *m, int srcrt); |
|
172void ip_init(void); 173extern int (*ip_mforward)(struct ip *, struct ifnet *, struct mbuf *, 174 struct ip_moptions *); 175int ip_output(struct mbuf *, 176 struct mbuf *, struct route *, int, struct ip_moptions *, 177 struct inpcb *); 178int ipproto_register(u_char); 179int ipproto_unregister(u_char); 180struct mbuf * 181 ip_reass(struct mbuf *); 182struct in_ifaddr * 183 ip_rtaddr(struct in_addr); 184void ip_savecontrol(struct inpcb *, struct mbuf **, struct ip *, 185 struct mbuf *); 186void ip_slowtimo(void); | 159void ip_init(void); 160extern int (*ip_mforward)(struct ip *, struct ifnet *, struct mbuf *, 161 struct ip_moptions *); 162int ip_output(struct mbuf *, 163 struct mbuf *, struct route *, int, struct ip_moptions *, 164 struct inpcb *); 165int ipproto_register(u_char); 166int ipproto_unregister(u_char); 167struct mbuf * 168 ip_reass(struct mbuf *); 169struct in_ifaddr * 170 ip_rtaddr(struct in_addr); 171void ip_savecontrol(struct inpcb *, struct mbuf **, struct ip *, 172 struct mbuf *); 173void ip_slowtimo(void); |
187struct mbuf * 188 ip_srcroute(struct mbuf *); 189void ip_stripoptions(struct mbuf *, struct mbuf *); | |
190u_int16_t ip_randomid(void); 191int rip_ctloutput(struct socket *, struct sockopt *); 192void rip_ctlinput(int, struct sockaddr *, void *); 193void rip_init(void); 194void rip_input(struct mbuf *, int); 195int rip_output(struct mbuf *, struct socket *, u_long); 196void ipip_input(struct mbuf *, int); 197void rsvp_input(struct mbuf *, int); --- 25 unchanged lines hidden --- | 174u_int16_t ip_randomid(void); 175int rip_ctloutput(struct socket *, struct sockopt *); 176void rip_ctlinput(int, struct sockaddr *, void *); 177void rip_init(void); 178void rip_input(struct mbuf *, int); 179int rip_output(struct mbuf *, struct socket *, u_long); 180void ipip_input(struct mbuf *, int); 181void rsvp_input(struct mbuf *, int); --- 25 unchanged lines hidden --- |