OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [net/] [bsd_tcpip/] [v2_0/] [include/] [netinet6/] [ip6protosw.h] - Blame information for rev 174

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 27 unneback
//==========================================================================
2
//
3
//      include/netinet6/ip6protosw.h
4
//
5
//==========================================================================
6
//####BSDCOPYRIGHTBEGIN####
7
//
8
// -------------------------------------------
9
//
10
// Portions of this software may have been derived from OpenBSD, 
11
// FreeBSD or other sources, and are covered by the appropriate
12
// copyright disclaimers included herein.
13
//
14
// Portions created by Red Hat are
15
// Copyright (C) 2002 Red Hat, Inc. All Rights Reserved.
16
//
17
// -------------------------------------------
18
//
19
//####BSDCOPYRIGHTEND####
20
//==========================================================================
21
 
22
/*      $KAME: ip6protosw.h,v 1.25 2001/09/26 06:13:03 keiichi Exp $    */
23
 
24
/*
25
 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
26
 * All rights reserved.
27
 *
28
 * Redistribution and use in source and binary forms, with or without
29
 * modification, are permitted provided that the following conditions
30
 * are met:
31
 * 1. Redistributions of source code must retain the above copyright
32
 *    notice, this list of conditions and the following disclaimer.
33
 * 2. Redistributions in binary form must reproduce the above copyright
34
 *    notice, this list of conditions and the following disclaimer in the
35
 *    documentation and/or other materials provided with the distribution.
36
 * 3. Neither the name of the project nor the names of its contributors
37
 *    may be used to endorse or promote products derived from this software
38
 *    without specific prior written permission.
39
 *
40
 * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
41
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
42
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
43
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
44
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
45
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
46
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
47
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
48
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
49
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
50
 * SUCH DAMAGE.
51
 *
52
 */
53
 
54
/*      BSDI protosw.h,v 2.3 1996/10/11 16:02:40 pjd Exp        */
55
 
56
/*-
57
 * Copyright (c) 1982, 1986, 1993
58
 *      The Regents of the University of California.  All rights reserved.
59
 *
60
 * Redistribution and use in source and binary forms, with or without
61
 * modification, are permitted provided that the following conditions
62
 * are met:
63
 * 1. Redistributions of source code must retain the above copyright
64
 *    notice, this list of conditions and the following disclaimer.
65
 * 2. Redistributions in binary form must reproduce the above copyright
66
 *    notice, this list of conditions and the following disclaimer in the
67
 *    documentation and/or other materials provided with the distribution.
68
 * 3. All advertising materials mentioning features or use of this software
69
 *    must display the following acknowledgement:
70
 *      This product includes software developed by the University of
71
 *      California, Berkeley and its contributors.
72
 * 4. Neither the name of the University nor the names of its contributors
73
 *    may be used to endorse or promote products derived from this software
74
 *    without specific prior written permission.
75
 *
76
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
77
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
78
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
79
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
80
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
81
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
82
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
83
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
84
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
85
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
86
 * SUCH DAMAGE.
87
 *
88
 *      @(#)protosw.h   8.1 (Berkeley) 6/2/93
89
 */
90
 
91
#ifndef _NETINET6_IP6PROTOSW_H_
92
#define _NETINET6_IP6PROTOSW_H_
93
 
94
/*
95
 * Protocol switch table for IPv6.
96
 * All other definitions should refer to sys/protosw.h
97
 */
98
 
99
#ifdef __NetBSD__
100
/*
101
 * For pfil_head structure.
102
 */
103
#include <net/pfil.h>
104
#endif
105
 
106
struct mbuf;
107
struct sockaddr;
108
struct socket;
109
struct domain;
110
struct proc;
111
struct ip6_hdr;
112
struct icmp6_hdr;
113
struct in6_addr;
114
#ifdef __FreeBSD__
115
struct pr_usrreqs;
116
#endif
117
 
118
/*
119
 * argument type for the last arg of pr_ctlinput().
120
 * should be consulted only with AF_INET6 family.
121
 *
122
 * IPv6 ICMP IPv6 [exthdrs] finalhdr paylaod
123
 * ^    ^    ^              ^
124
 * |    |    ip6c_ip6       ip6c_off
125
 * |    ip6c_icmp6
126
 * ip6c_m
127
 *
128
 * ip6c_finaldst usually points to ip6c_ip6->ip6_dst.  if the original
129
 * (internal) packet carries a routing header, it may point the final
130
 * dstination address in the routing header.
131
 *
132
 * ip6c_src: ip6c_ip6->ip6_src + scope info + flowlabel in ip6c_ip6
133
 *      (beware of flowlabel, if you try to compare it against others)
134
 * ip6c_dst: ip6c_finaldst + scope info
135
 */
136
struct ip6ctlparam {
137
        struct mbuf *ip6c_m;            /* start of mbuf chain */
138
        struct icmp6_hdr *ip6c_icmp6;   /* icmp6 header of target packet */
139
        struct ip6_hdr *ip6c_ip6;       /* ip6 header of target packet */
140
        int ip6c_off;                   /* offset of the target proto header */
141
        struct sockaddr_in6 *ip6c_src;  /* srcaddr w/ additional info */
142
        struct sockaddr_in6 *ip6c_dst;  /* (final) dstaddr w/ additional info */
143
        struct in6_addr *ip6c_finaldst; /* final destination address */
144
        void *ip6c_cmdarg;              /* control command dependent data */
145
        u_int8_t ip6c_nxt;              /* final next header field */
146
};
147
 
148
struct ip6protosw {
149
#ifdef __NetBSD__
150
        int     pr_type;                /* socket type used for */
151
#else
152
        short   pr_type;                /* socket type used for */
153
#endif
154
        struct  domain *pr_domain;      /* domain protocol a member of */
155
        short   pr_protocol;            /* protocol number */
156
        short   pr_flags;               /* see below */
157
 
158
/* protocol-protocol hooks */
159
        int     (*pr_input)             /* input to protocol (from below) */
160
                        __P((struct mbuf **, int *, int));
161
#ifdef __bsdi__
162
        int     (*pr_output)();         /* output to protocol (from above) */
163
#else
164
        int     (*pr_output)            /* output to protocol (from above) */
165
                        __P((struct mbuf *, ...));
166
#endif
167
        void    (*pr_ctlinput)          /* control input (from below) */
168
                        __P((int, struct sockaddr *, void *));
169
#if defined(__FreeBSD__) && __FreeBSD__ >= 4
170
        int     (*pr_ctloutput)         /* control output (from above) */
171
                        __P((struct socket *, struct sockopt *));
172
#else
173
        int     (*pr_ctloutput)         /* control output (from above) */
174
                        __P((int, struct socket *, int, int, struct mbuf **));
175
#endif
176
 
177
/* user-protocol hook */
178
#if !(defined(__FreeBSD__) && __FreeBSD__ < 3) && !defined(__bsdi__)
179
        int     (*pr_usrreq)            /* user request: see list below */
180
                        __P((struct socket *, int, struct mbuf *,
181
                             struct mbuf *, struct mbuf *, struct proc *));
182
#else
183
        int     (*pr_usrreq)            /* user request: see list below */
184
                        __P((struct socket *, int, struct mbuf *,
185
                             struct mbuf *, struct mbuf *));
186
#endif
187
 
188
/* utility hooks */
189
        void    (*pr_init)              /* initialization hook */
190
                        __P((void));
191
 
192
        void    (*pr_fasttimo)          /* fast timeout (200ms) */
193
                        __P((void));
194
        void    (*pr_slowtimo)          /* slow timeout (500ms) */
195
                        __P((void));
196
        void    (*pr_drain)             /* flush any excess space possible */
197
                        __P((void));
198
#ifdef __FreeBSD__
199
        struct  pr_usrreqs *pr_usrreqs; /* supersedes pr_usrreq() */
200
#else
201
        int     (*pr_sysctl)            /* sysctl for protocol */
202
                        __P((int *, u_int, void *, size_t *, void *, size_t));
203
#endif
204
#ifdef __NetBSD__
205
        struct  pfil_head       pr_pfh;
206
#endif
207
};
208
 
209
#ifdef __NetBSD__
210
extern struct ip6protosw inet6sw[];
211
#endif
212
 
213
#if !(defined(__FreeBSD__) && __FreeBSD__ >= 4)
214
void pfctlinput2 __P((int, struct sockaddr *, void *));
215
#endif
216
#endif /* !_NETINET6_IP6PROTOSW_H_ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.