xref: /csrg-svn/sys/netiso/iso_pcb.h (revision 37469)
136390Ssklower /***********************************************************
236390Ssklower 		Copyright IBM Corporation 1987
336390Ssklower 
436390Ssklower                       All Rights Reserved
536390Ssklower 
636390Ssklower Permission to use, copy, modify, and distribute this software and its
736390Ssklower documentation for any purpose and without fee is hereby granted,
836390Ssklower provided that the above copyright notice appear in all copies and that
936390Ssklower both that copyright notice and this permission notice appear in
1036390Ssklower supporting documentation, and that the name of IBM not be
1136390Ssklower used in advertising or publicity pertaining to distribution of the
1236390Ssklower software without specific, written prior permission.
1336390Ssklower 
1436390Ssklower IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
1536390Ssklower ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
1636390Ssklower IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
1736390Ssklower ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
1836390Ssklower WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
1936390Ssklower ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
2036390Ssklower SOFTWARE.
2136390Ssklower 
2236390Ssklower ******************************************************************/
2336390Ssklower 
2436390Ssklower /*
2536390Ssklower  * ARGO Project, Computer Sciences Dept., University of Wisconsin - Madison
2636390Ssklower  */
2736390Ssklower /* $Header: iso_pcb.h,v 4.3 88/06/29 15:00:01 hagens Exp $ */
2836390Ssklower /* $Source: /usr/argo/sys/netiso/RCS/iso_pcb.h,v $ */
2936390Ssklower 
3036390Ssklower #define	MAXX25CRUDLEN	16	/* 16 bytes of call request user data */
3136390Ssklower 
3236390Ssklower /*
3336390Ssklower  * Common structure pcb for argo protocol implementation.
3436390Ssklower  */
3536390Ssklower struct isopcb {
3636390Ssklower 	struct	isopcb			*isop_next,*isop_prev; /* pointers to other pcb's */
3736390Ssklower 	struct	isopcb			*isop_head;	/* pointer back to chain of pcbs for
3836390Ssklower 								this protocol */
3936390Ssklower 	struct	socket			*isop_socket;	/* back pointer to socket */
40*37469Ssklower 	struct	sockaddr_iso	*isop_laddr;
41*37469Ssklower 	struct	sockaddr_iso	*isop_faddr;
42*37469Ssklower #define isop_lportlen isop_laddr->siso_tsuffixlen
43*37469Ssklower #define isop_fportlen isop_faddr->siso_tsuffixlen
44*37469Ssklower 	struct	route_iso {
45*37469Ssklower 		struct	rtentry 	*ro_rt;
46*37469Ssklower 		struct	sockaddr_iso ro_dst;
47*37469Ssklower 	}						isop_route;			/* CLNP routing entry */
4836390Ssklower 	struct	mbuf			*isop_options;		/* CLNP options */
4936390Ssklower 	struct	mbuf			*isop_optindex;		/* CLNP options index */
5036390Ssklower 	struct	mbuf			*isop_clnpcache;	/* CLNP cached hdr */
5136390Ssklower 	u_int			isop_chanmask;		/* which ones used - max 32 supported */
5236390Ssklower 	u_int			isop_negchanmask;	/* which ones used - max 32 supported */
53*37469Ssklower 	u_short					isop_lport;			/* MISLEADLING work var */
5436390Ssklower 	int						isop_x25crud_len;	/* x25 call request ud */
5536390Ssklower 	char					isop_x25crud[MAXX25CRUDLEN];
56*37469Ssklower 	struct ifaddr			*isop_ifa;		/* ESIS interface assoc w/sock */
57*37469Ssklower 	struct	sockaddr_iso	isop_sladdr,		/* preallocated laddr */
58*37469Ssklower 							isop_sfaddr;		/* preallocated faddr */
5936390Ssklower };
6036390Ssklower 
61*37469Ssklower #ifdef sotorawcb
62*37469Ssklower /*
63*37469Ssklower  * Common structure pcb for raw clnp protocol access.
64*37469Ssklower  * Here are clnp specific extensions to the raw control block,
65*37469Ssklower  * and space is allocated to the necessary sockaddrs.
66*37469Ssklower  */
67*37469Ssklower struct rawisopcb {
68*37469Ssklower 	struct	rawcb risop_rcb;		/* common control block prefix */
69*37469Ssklower 	int		risop_flags;			/* flags, e.g. raw sockopts */
70*37469Ssklower 	struct	isopcb risop_isop;		/* space for bound addresses, routes etc.*/
71*37469Ssklower };
72*37469Ssklower #endif
7336390Ssklower 
74*37469Ssklower #define	sotoisopcb(so)	((struct isopcb *)(so)->so_pcb)
75*37469Ssklower #define	sotorawisopcb(so)	((struct rawisopcb *)(so)->so_pcb)
76*37469Ssklower 
7736390Ssklower #ifdef KERNEL
7836390Ssklower struct	isopcb *iso_pcblookup();
7936390Ssklower #endif
80