35#ifndef _NETINET_IP_VAR_H_
36#define _NETINET_IP_VAR_H_
81#define MAX_IPOPTLEN 40
88#if defined(_NETINET_IN_VAR_H_) && defined(_KERNEL)
95 struct ifnet *imo_multicast_ifp;
96 struct in_addr imo_multicast_addr;
97 u_long imo_multicast_vif;
98 u_char imo_multicast_ttl;
99 u_char imo_multicast_loop;
100 struct ip_mfilter_head imo_head;
140#include <sys/counter.h>
148#define IPSTAT_ADD(name, val) \
149 VNET_PCPUSTAT_ADD(struct ipstat, ipstat, name, (val))
150#define IPSTAT_SUB(name, val) IPSTAT_ADD(name, -(val))
151#define IPSTAT_INC(name) IPSTAT_ADD(name, 1)
152#define IPSTAT_DEC(name) IPSTAT_SUB(name, 1)
158#define KMOD_IPSTAT_INC(name) \
159 kmod_ipstat_inc(offsetof(struct ipstat, name) / sizeof(uint64_t))
161#define KMOD_IPSTAT_DEC(name) \
162 kmod_ipstat_dec(offsetof(struct ipstat, name) / sizeof(uint64_t))
165#define IP_FORWARDING 0x1
166#define IP_RAWOUTPUT 0x2
167#define IP_SENDONES 0x4
168#define IP_SENDTOIF 0x8
169#define IP_ROUTETOIF SO_DONTROUTE
170#define IP_ALLOWBROADCAST SO_BROADCAST
171#define IP_NODEFAULTFLOWID 0x40
172#define IP_NO_SND_TAG_RL 0x80
174#ifdef __NO_STRICT_ALIGNMENT
175#define IP_HDR_ALIGNED_P(ip) 1
177#define IP_HDR_ALIGNED_P(ip) ((((intptr_t) (ip)) & 3) == 0)
201#define V_ip_id VNET(ip_id)
202#define V_ip_defttl VNET(ip_defttl)
203#define V_ipforwarding VNET(ipforwarding)
204#define V_ipsendredirects VNET(ipsendredirects)
206#define V_ipstealth VNET(ipstealth)
208#define V_ip_rsvpd VNET(ip_rsvpd)
209#define V_ip_mrouter VNET(ip_mrouter)
210#define V_rsvp_on VNET(rsvp_on)
211#define V_drop_redirect VNET(drop_redirect)
220 u_long if_hwassist_flags);
224 struct ip_moptions *);
226 struct mbuf *,
struct route *,
int,
struct ip_moptions *,
244extern int (*
ip_rsvp_vif)(
struct socket *,
struct sockopt *);
249#define V_inet_pfil_head VNET(inet_pfil_head)
250#define PFIL_INET_NAME "inet"
288#define MTAG_IPFW 1148380143
289#define MTAG_IPFW_RULE 1262273568
290#define MTAG_IPFW_CALL 1308397630
296#define V_ip_fw_ctl_ptr VNET(ip_fw_ctl_ptr)
301extern int (*
ng_ipfw_input_p)(
struct mbuf **,
struct ip_fw_args *, bool);
303extern int (*
ip_dn_io_ptr)(
struct mbuf **,
struct ip_fw_args *);
int rip_output(struct mbuf *, struct socket *,...)
void kmod_ipstat_dec(int statnum)
int(* ip_fw_ctl_ptr_t)(struct sockopt *)
int(* ip_fw_chk_ptr_t)(struct ip_fw_args *args)
int(* ip_dn_io_ptr)(struct mbuf **, struct ip_fw_args *)
struct pr_usrreqs rip_usrreqs
int(* ip_dn_ctl_ptr)(struct sockopt *)
int ip_output(struct mbuf *, struct mbuf *, struct route *, int, struct ip_moptions *, struct inpcb *)
int(* ip_rsvp_vif)(struct socket *, struct sockopt *)
int inp_setmoptions(struct inpcb *, struct sockopt *)
int(* rsvp_input_p)(struct mbuf **, int *, int)
int rsvp_input(struct mbuf **, int *, int)
void kmod_ipstat_inc(int statnum)
void ip_fillid(struct ip *)
int ipproto_register(short)
VNET_PCPUSTAT_DECLARE(struct ipstat, ipstat)
void ip_savecontrol(struct inpcb *, struct mbuf **, struct ip *, struct mbuf *)
struct mbuf * ip_reass(struct mbuf *)
int inp_getmoptions(struct inpcb *, struct sockopt *)
int ip_fragment(struct ip *ip, struct mbuf **m_frag, int mtu, u_long if_hwassist_flags)
int ipip_input(struct mbuf **, int *, int)
int(* legal_vif_num)(int)
void ip_forward(struct mbuf *m, int srcrt)
void inp_freemoptions(struct ip_moptions *)
void in_delayed_cksum(struct mbuf *m)
int ip_ctloutput(struct socket *, struct sockopt *sopt)
int ipproto_unregister(short)
VNET_DECLARE(int, ip_defttl)
int(* ip_mforward)(struct ip *, struct ifnet *, struct mbuf *, struct ip_moptions *)
void(* ip_rsvp_force_done)(struct socket *)
u_long(* ip_mcast_src)(int)
void rip_ctlinput(int, struct sockaddr *, void *)
int ip_rsvp_init(struct socket *)
int rip_ctloutput(struct socket *, struct sockopt *)
int rip_input(struct mbuf **, int *, int)
int(* ng_ipfw_input_p)(struct mbuf **, struct ip_fw_args *, bool)
void(* ip_divert_ptr)(struct mbuf *m, bool incoming)
char ipopt_list[MAX_IPOPTLEN]
struct in_addr ipq_src ipq_dst
TAILQ_ENTRY(ipq) ipq_list
uint64_t ips_redirectsent