149268Sbostic /*- 2*63222Sbostic * Copyright (c) 1991, 1993 3*63222Sbostic * The Regents of the University of California. All rights reserved. 449268Sbostic * 549268Sbostic * %sccs.include.redist.c% 649268Sbostic * 7*63222Sbostic * @(#)iso_pcb.h 8.1 (Berkeley) 06/10/93 849268Sbostic */ 949268Sbostic 1036390Ssklower /*********************************************************** 1136390Ssklower Copyright IBM Corporation 1987 1236390Ssklower 1336390Ssklower All Rights Reserved 1436390Ssklower 1536390Ssklower Permission to use, copy, modify, and distribute this software and its 1636390Ssklower documentation for any purpose and without fee is hereby granted, 1736390Ssklower provided that the above copyright notice appear in all copies and that 1836390Ssklower both that copyright notice and this permission notice appear in 1936390Ssklower supporting documentation, and that the name of IBM not be 2036390Ssklower used in advertising or publicity pertaining to distribution of the 2136390Ssklower software without specific, written prior permission. 2236390Ssklower 2336390Ssklower IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 2436390Ssklower ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 2536390Ssklower IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR 2636390Ssklower ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 2736390Ssklower WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 2836390Ssklower ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 2936390Ssklower SOFTWARE. 3036390Ssklower 3136390Ssklower ******************************************************************/ 3236390Ssklower 3336390Ssklower /* 3436390Ssklower * ARGO Project, Computer Sciences Dept., University of Wisconsin - Madison 3536390Ssklower */ 3636390Ssklower /* $Header: iso_pcb.h,v 4.3 88/06/29 15:00:01 hagens Exp $ */ 3736390Ssklower /* $Source: /usr/argo/sys/netiso/RCS/iso_pcb.h,v $ */ 3836390Ssklower 3936390Ssklower #define MAXX25CRUDLEN 16 /* 16 bytes of call request user data */ 4036390Ssklower 4136390Ssklower /* 4236390Ssklower * Common structure pcb for argo protocol implementation. 4336390Ssklower */ 4436390Ssklower struct isopcb { 4536390Ssklower struct isopcb *isop_next,*isop_prev; /* pointers to other pcb's */ 4636390Ssklower struct isopcb *isop_head; /* pointer back to chain of pcbs for 4736390Ssklower this protocol */ 4836390Ssklower struct socket *isop_socket; /* back pointer to socket */ 4937469Ssklower struct sockaddr_iso *isop_laddr; 5037469Ssklower struct sockaddr_iso *isop_faddr; 5137469Ssklower struct route_iso { 5237469Ssklower struct rtentry *ro_rt; 5337469Ssklower struct sockaddr_iso ro_dst; 5437469Ssklower } isop_route; /* CLNP routing entry */ 5536390Ssklower struct mbuf *isop_options; /* CLNP options */ 5636390Ssklower struct mbuf *isop_optindex; /* CLNP options index */ 5736390Ssklower struct mbuf *isop_clnpcache; /* CLNP cached hdr */ 5845897Ssklower caddr_t isop_chan; /* actually struct pklcb * */ 5945897Ssklower u_short isop_refcnt; /* mult TP4 tpcb's -> here */ 6037469Ssklower u_short isop_lport; /* MISLEADLING work var */ 6158237Ssklower u_short isop_tuba_cached; /* for tuba address ref cnts */ 6236390Ssklower int isop_x25crud_len; /* x25 call request ud */ 6336390Ssklower char isop_x25crud[MAXX25CRUDLEN]; 6437469Ssklower struct ifaddr *isop_ifa; /* ESIS interface assoc w/sock */ 6537469Ssklower struct sockaddr_iso isop_sladdr, /* preallocated laddr */ 6637469Ssklower isop_sfaddr; /* preallocated faddr */ 6736390Ssklower }; 6836390Ssklower 6937469Ssklower #ifdef sotorawcb 7037469Ssklower /* 7137469Ssklower * Common structure pcb for raw clnp protocol access. 7237469Ssklower * Here are clnp specific extensions to the raw control block, 7337469Ssklower * and space is allocated to the necessary sockaddrs. 7437469Ssklower */ 7537469Ssklower struct rawisopcb { 7637469Ssklower struct rawcb risop_rcb; /* common control block prefix */ 7737469Ssklower int risop_flags; /* flags, e.g. raw sockopts */ 7837469Ssklower struct isopcb risop_isop; /* space for bound addresses, routes etc.*/ 7937469Ssklower }; 8037469Ssklower #endif 8136390Ssklower 8237469Ssklower #define sotoisopcb(so) ((struct isopcb *)(so)->so_pcb) 8337469Ssklower #define sotorawisopcb(so) ((struct rawisopcb *)(so)->so_pcb) 8437469Ssklower 8536390Ssklower #ifdef KERNEL 8636390Ssklower struct isopcb *iso_pcblookup(); 8736390Ssklower #endif 88