1 /*- 2 * Copyright (c) 1991 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * %sccs.include.redist.c% 6 * 7 * @(#)iso_pcb.h 7.6 (Berkeley) 02/25/93 8 */ 9 10 /*********************************************************** 11 Copyright IBM Corporation 1987 12 13 All Rights Reserved 14 15 Permission to use, copy, modify, and distribute this software and its 16 documentation for any purpose and without fee is hereby granted, 17 provided that the above copyright notice appear in all copies and that 18 both that copyright notice and this permission notice appear in 19 supporting documentation, and that the name of IBM not be 20 used in advertising or publicity pertaining to distribution of the 21 software without specific, written prior permission. 22 23 IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 24 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 25 IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR 26 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 27 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 28 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 29 SOFTWARE. 30 31 ******************************************************************/ 32 33 /* 34 * ARGO Project, Computer Sciences Dept., University of Wisconsin - Madison 35 */ 36 /* $Header: iso_pcb.h,v 4.3 88/06/29 15:00:01 hagens Exp $ */ 37 /* $Source: /usr/argo/sys/netiso/RCS/iso_pcb.h,v $ */ 38 39 #define MAXX25CRUDLEN 16 /* 16 bytes of call request user data */ 40 41 /* 42 * Common structure pcb for argo protocol implementation. 43 */ 44 struct isopcb { 45 struct isopcb *isop_next,*isop_prev; /* pointers to other pcb's */ 46 struct isopcb *isop_head; /* pointer back to chain of pcbs for 47 this protocol */ 48 struct socket *isop_socket; /* back pointer to socket */ 49 struct sockaddr_iso *isop_laddr; 50 struct sockaddr_iso *isop_faddr; 51 struct route_iso { 52 struct rtentry *ro_rt; 53 struct sockaddr_iso ro_dst; 54 } isop_route; /* CLNP routing entry */ 55 struct mbuf *isop_options; /* CLNP options */ 56 struct mbuf *isop_optindex; /* CLNP options index */ 57 struct mbuf *isop_clnpcache; /* CLNP cached hdr */ 58 caddr_t isop_chan; /* actually struct pklcb * */ 59 u_short isop_refcnt; /* mult TP4 tpcb's -> here */ 60 u_short isop_lport; /* MISLEADLING work var */ 61 u_short isop_tuba_cached; /* for tuba address ref cnts */ 62 int isop_x25crud_len; /* x25 call request ud */ 63 char isop_x25crud[MAXX25CRUDLEN]; 64 struct ifaddr *isop_ifa; /* ESIS interface assoc w/sock */ 65 struct sockaddr_iso isop_sladdr, /* preallocated laddr */ 66 isop_sfaddr; /* preallocated faddr */ 67 }; 68 69 #ifdef sotorawcb 70 /* 71 * Common structure pcb for raw clnp protocol access. 72 * Here are clnp specific extensions to the raw control block, 73 * and space is allocated to the necessary sockaddrs. 74 */ 75 struct rawisopcb { 76 struct rawcb risop_rcb; /* common control block prefix */ 77 int risop_flags; /* flags, e.g. raw sockopts */ 78 struct isopcb risop_isop; /* space for bound addresses, routes etc.*/ 79 }; 80 #endif 81 82 #define sotoisopcb(so) ((struct isopcb *)(so)->so_pcb) 83 #define sotorawisopcb(so) ((struct rawisopcb *)(so)->so_pcb) 84 85 #ifdef KERNEL 86 struct isopcb *iso_pcblookup(); 87 #endif 88