Checkpoint as of first successful tp connection, before posix, &
[unix-history] / usr / src / sys / netiso / iso_pcb.h
CommitLineData
7180a50f
KS
1/***********************************************************
2 Copyright IBM Corporation 1987
3
4 All Rights Reserved
5
6Permission to use, copy, modify, and distribute this software and its
7documentation for any purpose and without fee is hereby granted,
8provided that the above copyright notice appear in all copies and that
9both that copyright notice and this permission notice appear in
10supporting documentation, and that the name of IBM not be
11used in advertising or publicity pertaining to distribution of the
12software without specific, written prior permission.
13
14IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
15ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
16IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
17ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
18WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
19ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
20SOFTWARE.
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 */
35struct 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 */
a50e2bc0
KS
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 */
7180a50f
KS
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 */
a50e2bc0 53 u_short isop_lport; /* MISLEADLING work var */
7180a50f
KS
54 int isop_x25crud_len; /* x25 call request ud */
55 char isop_x25crud[MAXX25CRUDLEN];
a50e2bc0
KS
56 struct ifaddr *isop_ifa; /* ESIS interface assoc w/sock */
57 struct sockaddr_iso isop_sladdr, /* preallocated laddr */
58 isop_sfaddr; /* preallocated faddr */
7180a50f
KS
59};
60
a50e2bc0
KS
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 */
67struct 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)
7180a50f
KS
76
77#ifdef KERNEL
78struct isopcb *iso_pcblookup();
79#endif