⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ip6_var.h

📁 eCos/RedBoot for勤研ARM AnywhereII(4510) 含全部源代码
💻 H
📖 第 1 页 / 共 2 页
字号:
	u_quad_t ip6s_mext1;		/* one ext mbuf */
	u_quad_t ip6s_mext2m;		/* two or more ext mbuf */
	u_quad_t ip6s_exthdrtoolong;	/* ext hdr are not continuous */
	u_quad_t ip6s_nogif;		/* no match gif found */
	u_quad_t ip6s_toomanyhdr;	/* discarded due to too many headers */

	/*
	 * statistics for improvement of the source address selection
	 * algorithm:
	 * XXX: hardcoded 16 = # of ip6 multicast scope types + 1
	 */
	/* number of times that address selection fails */
	u_quad_t ip6s_sources_none;
	/* number of times that an address on the outgoing I/F is chosen */
	u_quad_t ip6s_sources_sameif[16];
	/* number of times that an address on a non-outgoing I/F is chosen */
	u_quad_t ip6s_sources_otherif[16];
	/*
	 * number of times that an address that has the same scope
	 * from the destination is chosen.
	 */
	u_quad_t ip6s_sources_samescope[16];
	/*
	 * number of times that an address that has a different scope
	 * from the destination is chosen.
	 */
	u_quad_t ip6s_sources_otherscope[16];
	/* number of times that an deprecated address is chosen */
	u_quad_t ip6s_sources_deprecated[16];

	u_quad_t ip6s_forward_cachehit;
	u_quad_t ip6s_forward_cachemiss;

	/* number of times that each rule of source selection is applied. */
	u_quad_t ip6s_sources_rule[16];
};

#ifdef _KERNEL
/*
 * IPv6 onion peeling state.
 * it will be initialized when we come into ip6_input().
 * XXX do not make it a kitchen sink!
 */
struct ip6aux {
	u_int32_t ip6a_flags;
#define IP6A_SWAP	0x01		/* swapped home/care-of on packet */
#define IP6A_HASEEN	0x02		/* HA was present */
#define IP6A_BRUID	0x04		/* BR Unique Identifier was present */
#define IP6A_RTALERTSEEN 0x08		/* rtalert present */
#define IP6A_ROUTEOPTIMIZED 0x10	/* route optimized packet */

	/* ip6.ip6_src */
	struct in6_addr ip6a_careof;	/* care-of address of the peer */
	struct in6_addr ip6a_home;	/* home address of the peer */

	/* ip6.ip6_dst */
	struct in6_ifaddr *ip6a_dstia6;	/* my ifaddr that matches ip6_dst */

	/* rtalert */
	u_int16_t ip6a_rtalert;		/* rtalert option value */

	/*
	 * decapsulation history will be here.
	 * with IPsec it may not be accurate.
	 */
};
#endif

#ifdef _KERNEL
/* flags passed to ip6_output as last parameter */
#define	IPV6_UNSPECSRC		0x01	/* allow :: as the source address */
#define	IPV6_FORWARDING		0x02	/* most of IPv6 header exists */
#define	IPV6_MINMTU		0x04	/* use minimum MTU (IPV6_USE_MIN_MTU) */

extern struct	ip6stat ip6stat;	/* statistics */
extern u_int32_t ip6_id;		/* fragment identifier */
extern int	ip6_defhlim;		/* default hop limit */
extern int	ip6_defmcasthlim;	/* default multicast hop limit */
extern int	ip6_forwarding;		/* act as router? */
extern int	ip6_forward_srcrt;	/* forward src-routed? */
extern int	ip6_use_deprecated;	/* allow deprecated addr as source */
extern int	ip6_rr_prune;		/* router renumbering prefix
					 * walk list every 5 sec.    */
#if defined(__FreeBSD__) && __FreeBSD__ >= 3
#define ip6_mapped_addr_on	(!ip6_v6only)
#endif
#if defined(__OpenBSD__) || (defined(__FreeBSD__) && __FreeBSD__ == 2) || (defined(__bsdi__) && _BSDI_VERSION < 199802)
extern const int	ip6_v6only;
#else
extern int	ip6_v6only;
#endif

extern struct socket *ip6_mrouter; 	/* multicast routing daemon */
extern int	ip6_sendredirects;	/* send IP redirects when forwarding? */
extern int	ip6_maxfragpackets; /* Maximum packets in reassembly queue */
extern int	ip6_sourcecheck;	/* Verify source interface */
extern int	ip6_sourcecheck_interval; /* Interval between log messages */
extern int	ip6_accept_rtadv;	/* Acts as a host not a router */
extern int	ip6_keepfaith;		/* Firewall Aided Internet Translator */
extern int	ip6_log_interval;
extern time_t	ip6_log_time;
extern int	ip6_hdrnestlimit; /* upper limit of # of extension headers */
extern int	ip6_dad_count;		/* DupAddrDetectionTransmits */

extern u_int32_t ip6_flow_seq;
extern int ip6_auto_flowlabel;
extern int ip6_auto_linklocal;

extern int   ip6_anonportmin;		/* minimum ephemeral port */
extern int   ip6_anonportmax;		/* maximum ephemeral port */
extern int   ip6_lowportmin;		/* minimum reserved port */
extern int   ip6_lowportmax;		/* maximum reserved port */

extern int	ip6_use_tempaddr; /* whether to use temporary addresses. */
extern int	ip6_prefer_tempaddr; /* whether to prefer temporary addresses
					in the source address selection */

extern int	ip6_use_defzone; /* whether to use the default scope zone
				    when unspecified */

#if !(defined(__FreeBSD__) && __FreeBSD__ >= 3)
struct in6pcb;
#endif
#if defined(__FreeBSD__) && __FreeBSD__ >= 3
extern struct	pr_usrreqs rip6_usrreqs;
struct sockopt;
#endif

#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(__OpenBSD__) || (defined(__bsdi__) && _BSDI_VERSION >= 199802) /* fbsd3 || HAVE_NRL_INPCB */
struct inpcb;
#endif

#if defined(__FreeBSD__) && __FreeBSD__ >= 3
int	icmp6_ctloutput __P((struct socket *, struct sockopt *sopt));
#else
int	icmp6_ctloutput __P((int, struct socket *, int, int, struct mbuf **));
#endif

struct in6_ifaddr;
void	ip6_init __P((void));
void	ip6intr __P((void));
void	ip6_input __P((struct mbuf *));
struct in6_ifaddr *ip6_getdstifaddr __P((struct mbuf *));
void	ip6_freepcbopts __P((struct ip6_pktopts *));
void	ip6_freemoptions __P((struct ip6_moptions *));
int	ip6_unknown_opt __P((u_int8_t *, struct mbuf *, int));
char *	ip6_get_prevhdr __P((struct mbuf *, int));
int	ip6_nexthdr __P((struct mbuf *, int, int, int *));
int	ip6_lasthdr __P((struct mbuf *, int, int, int *));

struct mbuf *ip6_addaux __P((struct mbuf *));
struct mbuf *ip6_findaux __P((struct mbuf *));
void	ip6_delaux __P((struct mbuf *));

int	ip6_mforward __P((struct ip6_hdr *, struct ifnet *, struct mbuf *));
int	ip6_process_hopopts __P((struct mbuf *, u_int8_t *, int, u_int32_t *,
				 u_int32_t *));
#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(__OpenBSD__) || (defined(__bsdi__) && _BSDI_VERSION >= 199802) /* fbsd3 || HAVE_NRL_INPCB */
void	ip6_savecontrol __P((struct inpcb *, struct ip6_hdr *, struct mbuf *,
			     struct ip6_recvpktopts *,
			     struct ip6_recvpktopts **));
void	ip6_notify_pmtu __P((struct inpcb *, struct sockaddr_in6 *,
			     u_int32_t *));
#else
void	ip6_savecontrol __P((struct in6pcb *, struct ip6_hdr *, struct mbuf *,
			     struct ip6_recvpktopts *,
			     struct ip6_recvpktopts **));
void	ip6_notify_pmtu __P((struct in6pcb *, struct sockaddr_in6 *,
			     u_int32_t *));
#endif
void	ip6_update_recvpcbopt __P((struct ip6_recvpktopts *,
				   struct ip6_recvpktopts *));
void	ip6_reset_rcvopt __P((struct ip6_recvpktopts *, int));
int	ip6_sysctl __P((int *, u_int, void *, size_t *, void *, size_t));

void	ip6_forward __P((struct mbuf *, int));

void	ip6_mloopback __P((struct ifnet *, struct mbuf *, struct sockaddr_in6 *));
#if defined(NEW_STRUCT_ROUTE) || defined(__NetBSD__) || defined(__OpenBSD__)  || defined(__FreeBSD__)
int	ip6_output __P((struct mbuf *, struct ip6_pktopts *,
			struct route *,
			int,
			struct ip6_moptions *, struct ifnet **));
#else
int	ip6_output __P((struct mbuf *, struct ip6_pktopts *,
			struct route_in6 *,
			int,
			struct ip6_moptions *, struct ifnet **));
#endif
#if defined(__FreeBSD__) && __FreeBSD__ >= 3
int	ip6_ctloutput __P((struct socket *, struct sockopt *sopt));
#else
int	ip6_ctloutput __P((int, struct socket *, int, int, struct mbuf **));
#endif
#if defined(__FreeBSD__) && __FreeBSD__ >= 3
int	ip6_raw_ctloutput __P((struct socket *, struct sockopt *sopt));
#else
int	ip6_raw_ctloutput __P((int, struct socket *, int, int,
			       struct mbuf **));
#endif
void	init_ip6pktopts __P((struct ip6_pktopts *));
int	ip6_setpktoptions __P((struct mbuf *, struct ip6_pktopts *, struct ip6_pktopts *, int, int));
void	ip6_clearpktopts __P((struct ip6_pktopts *, int));
struct ip6_pktopts *ip6_copypktopts __P((struct ip6_pktopts *, int));
#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(__OpenBSD__) || (defined(__bsdi__) && _BSDI_VERSION >= 199802) /* fbsd3 || HAVE_NRL_INPCB */
int	ip6_optlen __P((struct inpcb *));
#else
int	ip6_optlen __P((struct in6pcb *));
#endif

int	route6_input __P((struct mbuf **, int *, int));

void	frag6_init __P((void));
int	frag6_input __P((struct mbuf **, int *, int));
void	frag6_slowtimo __P((void));
void	frag6_drain __P((void));

void	rip6_init __P((void));
int	rip6_input __P((struct mbuf **mp, int *offp, int proto));
void	rip6_ctlinput __P((int, struct sockaddr *, void *));
#if defined(__FreeBSD__) && __FreeBSD__ >= 3
int	rip6_ctloutput __P((struct socket *so, struct sockopt *sopt));
#else
int	rip6_ctloutput __P((int, struct socket *, int, int, struct mbuf **));
#endif
#if (defined(__FreeBSD__) && __FreeBSD__ >= 4)
int	rip6_output __P((struct mbuf *, struct socket *,
			 struct sockaddr_in6 *, struct mbuf *));
#else
int	rip6_output __P((struct mbuf *, ...));
#endif /* (defined(__FreeBSD__) && __FreeBSD__ >= 4) */
int	rip6_usrreq __P((struct socket *,
	    int, struct mbuf *, struct mbuf *, struct mbuf *, struct proc *));

int	dest6_input __P((struct mbuf **, int *, int));
int	none_input __P((struct mbuf **, int *, int));
#endif /* _KERNEL */

#endif /* !_NETINET6_IP6_VAR_H_ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -