ip6protosw.h (267763) | ip6protosw.h (269699) |
---|---|
1/*- 2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 3 * 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 --- 45 unchanged lines hidden (view full) --- 54 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 55 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 56 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 57 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 58 * SUCH DAMAGE. 59 * 60 * @(#)protosw.h 8.1 (Berkeley) 6/2/93 61 * BSDI protosw.h,v 2.3 1996/10/11 16:02:40 pjd Exp | 1/*- 2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 3 * 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 --- 45 unchanged lines hidden (view full) --- 54 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 55 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 56 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 57 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 58 * SUCH DAMAGE. 59 * 60 * @(#)protosw.h 8.1 (Berkeley) 6/2/93 61 * BSDI protosw.h,v 2.3 1996/10/11 16:02:40 pjd Exp |
62 * $FreeBSD: head/sys/netinet6/ip6protosw.h 267763 2014-06-23 05:17:39Z kevlo $ | 62 * $FreeBSD: head/sys/netinet6/ip6protosw.h 269699 2014-08-08 01:57:15Z kevlo $ |
63 */ 64 65#ifndef _NETINET6_IP6PROTOSW_H_ 66#define _NETINET6_IP6PROTOSW_H_ 67 68/* 69 * Protocol switch table for IPv6. 70 * All other definitions should refer to sys/protosw.h --- 34 unchanged lines hidden (view full) --- 105 int ip6c_off; /* offset of the target proto header */ 106 struct sockaddr_in6 *ip6c_src; /* srcaddr w/ additional info */ 107 struct sockaddr_in6 *ip6c_dst; /* (final) dstaddr w/ additional info */ 108 struct in6_addr *ip6c_finaldst; /* final destination address */ 109 void *ip6c_cmdarg; /* control command dependent data */ 110 u_int8_t ip6c_nxt; /* final next header field */ 111}; 112 | 63 */ 64 65#ifndef _NETINET6_IP6PROTOSW_H_ 66#define _NETINET6_IP6PROTOSW_H_ 67 68/* 69 * Protocol switch table for IPv6. 70 * All other definitions should refer to sys/protosw.h --- 34 unchanged lines hidden (view full) --- 105 int ip6c_off; /* offset of the target proto header */ 106 struct sockaddr_in6 *ip6c_src; /* srcaddr w/ additional info */ 107 struct sockaddr_in6 *ip6c_dst; /* (final) dstaddr w/ additional info */ 108 struct in6_addr *ip6c_finaldst; /* final destination address */ 109 void *ip6c_cmdarg; /* control command dependent data */ 110 u_int8_t ip6c_nxt; /* final next header field */ 111}; 112 |
113struct ip6protosw { 114 short pr_type; /* socket type used for */ 115 struct domain *pr_domain; /* domain protocol a member of */ 116 short pr_protocol; /* protocol number */ 117 short pr_flags; /* see below */ 118 119/* protocol-protocol hooks */ 120 int (*pr_input) /* input to protocol (from below) */ 121 (struct mbuf **, int *, int); 122 int (*pr_output) /* output to protocol (from above) */ 123 (struct mbuf *, ...); 124 void (*pr_ctlinput) /* control input (from below) */ 125 (int, struct sockaddr *, void *); 126 int (*pr_ctloutput) /* control output (from above) */ 127 (struct socket *, struct sockopt *); 128 129/* utility hooks */ 130 void (*pr_init) /* initialization hook */ 131 (void); 132 void (*pr_destroy) /* cleanup hook */ 133 (void); 134 135 void (*pr_fasttimo) /* fast timeout (200ms) */ 136 (void); 137 void (*pr_slowtimo) /* slow timeout (500ms) */ 138 (void); 139 void (*pr_drain) /* flush any excess space possible */ 140 (void); 141 struct pr_usrreqs *pr_usrreqs; /* user-protocol hook */ 142}; 143 | |
144#ifdef _KERNEL | 113#ifdef _KERNEL |
145extern struct ip6protosw inet6sw[]; | 114extern struct protosw inet6sw[]; |
146#endif 147 148#endif /* !_NETINET6_IP6PROTOSW_H_ */ | 115#endif 116 117#endif /* !_NETINET6_IP6PROTOSW_H_ */ |