Deleted Added
full compact
ipx_pcb.h (11947) ipx_pcb.h (11991)
1/*
2 * Copyright (c) 1995, Mike Mitchell
3 * Copyright (c) 1984, 1985, 1986, 1987, 1993
4 * The Regents of the University of California. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * 3. All advertising materials mentioning features or use of this software
15 * must display the following acknowledgement:
16 * This product includes software developed by the University of
17 * California, Berkeley and its contributors.
18 * 4. Neither the name of the University nor the names of its contributors
19 * may be used to endorse or promote products derived from this software
20 * without specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
1/*
2 * Copyright (c) 1995, Mike Mitchell
3 * Copyright (c) 1984, 1985, 1986, 1987, 1993
4 * The Regents of the University of California. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * 3. All advertising materials mentioning features or use of this software
15 * must display the following acknowledgement:
16 * This product includes software developed by the University of
17 * California, Berkeley and its contributors.
18 * 4. Neither the name of the University nor the names of its contributors
19 * may be used to endorse or promote products derived from this software
20 * without specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * @(#)ipx_pcb.h
34 * @(#)$Id$
35 */
36
37#ifndef _NETIPX_IPX_PCB_H_
38#define _NETIPX_IPX_PCB_H_
39
40/*
41 * IPX protocol interface control block.
42 */
43struct ipxpcb {
44 struct ipxpcb *ipxp_next; /* doubly linked list */
45 struct ipxpcb *ipxp_prev;
46 struct ipxpcb *ipxp_head;
47 struct socket *ipxp_socket; /* back pointer to socket */
48 struct ipx_addr ipxp_faddr; /* destination address */
49 struct ipx_addr ipxp_laddr; /* socket's address */
50 caddr_t ipxp_pcb; /* protocol specific stuff */
51 struct route ipxp_route; /* routing information */
52 struct ipx_addr ipxp_lastdst; /* validate cached route for dg socks*/
53 long ipxp_notify_param; /* extra info passed via ipx_pcbnotify*/
54 short ipxp_flags;
55 u_char ipxp_dpt; /* default packet type for ipx_output */
56 u_char ipxp_rpt; /* last received packet type by ipx_input() */
57};
58
59/* possible flags */
60
61#define IPXP_IN_ABORT 0x1 /* calling abort through socket */
62#define IPXP_RAWIN 0x2 /* show headers on input */
63#define IPXP_RAWOUT 0x4 /* show header on output */
64#define IPXP_ALL_PACKETS 0x8 /* Turn off higher proto processing */
65
66#define IPX_WILDCARD 1
67
68#define ipxp_lport ipxp_laddr.x_port
69#define ipxp_fport ipxp_faddr.x_port
70
71#define sotoipxpcb(so) ((struct ipxpcb *)((so)->so_pcb))
72
73/*
74 * Nominal space allocated to a IPX socket.
75 */
76#define IPXSNDQ 2048
77#define IPXRCVQ 2048
78
79
80#ifdef KERNEL
81
82extern struct ipxpcb ipxpcb; /* head of list */
83
84#include <sys/cdefs.h>
85
86__BEGIN_DECLS
87int ipx_pcballoc __P((struct socket *so, struct ipxpcb *head));
88int ipx_pcbbind __P((struct ipxpcb *ipxp, struct mbuf *nam));
89int ipx_pcbconnect __P((struct ipxpcb *ipxp, struct mbuf *nam));
90void ipx_pcbdisconnect __P((struct ipxpcb *ipxp));
91void ipx_pcbdetach __P((struct ipxpcb *ipxp));
92void ipx_setsockaddr __P((struct ipxpcb *ipxp, struct mbuf *nam));
93void ipx_setpeeraddr __P((struct ipxpcb *ipxp, struct mbuf *nam));
35 */
36
37#ifndef _NETIPX_IPX_PCB_H_
38#define _NETIPX_IPX_PCB_H_
39
40/*
41 * IPX protocol interface control block.
42 */
43struct ipxpcb {
44 struct ipxpcb *ipxp_next; /* doubly linked list */
45 struct ipxpcb *ipxp_prev;
46 struct ipxpcb *ipxp_head;
47 struct socket *ipxp_socket; /* back pointer to socket */
48 struct ipx_addr ipxp_faddr; /* destination address */
49 struct ipx_addr ipxp_laddr; /* socket's address */
50 caddr_t ipxp_pcb; /* protocol specific stuff */
51 struct route ipxp_route; /* routing information */
52 struct ipx_addr ipxp_lastdst; /* validate cached route for dg socks*/
53 long ipxp_notify_param; /* extra info passed via ipx_pcbnotify*/
54 short ipxp_flags;
55 u_char ipxp_dpt; /* default packet type for ipx_output */
56 u_char ipxp_rpt; /* last received packet type by ipx_input() */
57};
58
59/* possible flags */
60
61#define IPXP_IN_ABORT 0x1 /* calling abort through socket */
62#define IPXP_RAWIN 0x2 /* show headers on input */
63#define IPXP_RAWOUT 0x4 /* show header on output */
64#define IPXP_ALL_PACKETS 0x8 /* Turn off higher proto processing */
65
66#define IPX_WILDCARD 1
67
68#define ipxp_lport ipxp_laddr.x_port
69#define ipxp_fport ipxp_faddr.x_port
70
71#define sotoipxpcb(so) ((struct ipxpcb *)((so)->so_pcb))
72
73/*
74 * Nominal space allocated to a IPX socket.
75 */
76#define IPXSNDQ 2048
77#define IPXRCVQ 2048
78
79
80#ifdef KERNEL
81
82extern struct ipxpcb ipxpcb; /* head of list */
83
84#include <sys/cdefs.h>
85
86__BEGIN_DECLS
87int ipx_pcballoc __P((struct socket *so, struct ipxpcb *head));
88int ipx_pcbbind __P((struct ipxpcb *ipxp, struct mbuf *nam));
89int ipx_pcbconnect __P((struct ipxpcb *ipxp, struct mbuf *nam));
90void ipx_pcbdisconnect __P((struct ipxpcb *ipxp));
91void ipx_pcbdetach __P((struct ipxpcb *ipxp));
92void ipx_setsockaddr __P((struct ipxpcb *ipxp, struct mbuf *nam));
93void ipx_setpeeraddr __P((struct ipxpcb *ipxp, struct mbuf *nam));
94void ipx_pcbnotify __P((struct ipx_addr *dst, int errno, int (*notify)(), long param));
94void ipx_pcbnotify __P((struct ipx_addr *dst, int errno, void (*notify)(struct ipxpcb *), long param));
95struct ipxpcb *ipx_pcblookup __P((struct ipx_addr *faddr, int lport, int wildp));
96__END_DECLS
97
98#endif
99
100#endif
95struct ipxpcb *ipx_pcblookup __P((struct ipx_addr *faddr, int lport, int wildp));
96__END_DECLS
97
98#endif
99
100#endif