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