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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [net/] [bsd_tcpip/] [current/] [include/] [netinet6/] [ip6protosw.h] - Blame information for rev 786

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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