1/* |
2 * Copyright (c) 2004, Robert N. M. Watson |
3 * Copyright (c) 1995, Mike Mitchell 4 * Copyright (c) 1984, 1985, 1986, 1987, 1993 5 * The Regents of the University of California. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: 10 * 1. Redistributions of source code must retain the above copyright --- 18 unchanged lines hidden (view full) --- 29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 * 35 * @(#)ipx_pcb.h 36 * |
37 * $FreeBSD: head/sys/netipx/ipx_pcb.h 139444 2004-12-30 17:49:40Z rwatson $ |
38 */ 39 40#ifndef _NETIPX_IPX_PCB_H_ 41#define _NETIPX_IPX_PCB_H_ 42 43/* 44 * IPX protocol interface control block. 45 */ 46struct ipxpcb { |
47 LIST_ENTRY(ipxpcb) ipxp_list; |
48 struct socket *ipxp_socket; /* back pointer to socket */ 49 struct ipx_addr ipxp_faddr; /* destination address */ 50 struct ipx_addr ipxp_laddr; /* socket's address */ 51 caddr_t ipxp_pcb; /* protocol specific stuff */ 52 struct route ipxp_route; /* routing information */ 53 struct ipx_addr ipxp_lastdst; /* validate cached route for dg socks*/ 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/* 60 * Additional IPX pcb-related types and variables. 61 */ 62LIST_HEAD(ipxpcbhead, ipxpcb); 63extern struct ipxpcbhead ipxpcb_list; 64extern struct ipxpcbhead ipxrawpcb_list; 65 |
66/* possible flags */ 67 68#define IPXP_IN_ABORT 0x1 /* calling abort through socket */ 69#define IPXP_RAWIN 0x2 /* show headers on input */ 70#define IPXP_RAWOUT 0x4 /* show header on output */ 71#define IPXP_ALL_PACKETS 0x8 /* Turn off higher proto processing */ 72#define IPXP_CHECKSUM 0x10 /* use checksum on this socket */ 73 --- 8 unchanged lines hidden (view full) --- 82 * Nominal space allocated to an IPX socket. 83 */ 84#define IPXSNDQ 16384 85#define IPXRCVQ 40960 86 87#ifdef _KERNEL 88extern struct ipxpcb ipxpcb; /* head of list */ 89 |
90int ipx_pcballoc(struct socket *so, struct ipxpcbhead *head, |
91 struct thread *p); 92int ipx_pcbbind(struct ipxpcb *ipxp, struct sockaddr *nam, 93 struct thread *p); 94int ipx_pcbconnect(struct ipxpcb *ipxp, struct sockaddr *nam, 95 struct thread *p); 96void ipx_pcbdetach(struct ipxpcb *ipxp); 97void ipx_pcbdisconnect(struct ipxpcb *ipxp); 98struct ipxpcb * 99 ipx_pcblookup(struct ipx_addr *faddr, int lport, int wildp); 100void ipx_setpeeraddr(struct ipxpcb *ipxp, struct sockaddr **nam); 101void ipx_setsockaddr(struct ipxpcb *ipxp, struct sockaddr **nam); 102#endif /* _KERNEL */ 103 104#endif /* !_NETIPX_IPX_PCB_H_ */ |