pass flags from device close to l_close
[unix-history] / usr / src / sys / netiso / iso_sizes.c
CommitLineData
bfab3784
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
28#define KERNEL
29#define MERGED
30#define IBMRTPC
31#define CLNPECHO
32/* #define TP_PERF_MEAS */
33#define CONS
34#define TPPT
35#define ARGO_TP
36#define ARGO_DEBUG
37#define ISO
38#define RDB
39#define SHOW_LOAD
40#define DEBUG
41#define INET
42#define MAXUSERS 32
43#define DST 1
44#define TIMEZONE 360
45
46/*
47 * ARGO TP
48 *
49 * $Header: tp_sizes.c,v 5.1 88/10/12 12:21:03 root Exp $
50 * $Source: /usr/argo/sys/netiso/RCS/tp_sizes.c,v $
51 *
52 *
53 * This is the initialization and cleanup stuff -
54 * for the tp machine in general as well as for the individual pcbs.
55 * tp_init() is called at system startup. tp_attach() and tp_getref() are
56 * called when a socket is created. tp_detach() and tp_freeref()
57 * are called during the closing stage and/or when the reference timer
58 * goes off.
59 * tp_soisdisconnecting() and tp_soisdisconnected() are tp-specific
60 * versions of soisconnect*
61 * and are called (obviously) during the closing phase.
62 *
63 */
64
65#ifndef lint
66static char *rcsid = "$Header: tp_sizes.c,v 5.1 88/10/12 12:21:03 root Exp $";
67#endif lint
68
69#include "types.h"
70#include "param.h"
71#include "mbuf.h"
72#include "socket.h"
73#include "socketvar.h"
74#include "protosw.h"
75#include "errno.h"
76#include "time.h"
77#include "tp_param.h"
78#include "tp_stat.h"
79#include "tp_pcb.h"
80#include "tp_tpdu.h"
81#include "tp_trace.h"
82#include "tp_meas.h"
83#include "tp_seq.h"
84#include "tp_clnp.h"
85
86#include "iso_errno.h"
87#include "cons.h"
88#undef IncStat
89#include "cons_pcb.h"
90
91#define DUP(x) x, x
92#define SIZE(P) printf(" Size of %s: 0x%x %d\n", "P", DUP(sizeof(struct P)))
93#define OFF(P, Q) printf("\toffset of %s in %s: 0x%x %d\n", "P", "Q", \
94 DUP(_offsetof(struct Q, P)))
95main()
96{
97 printf( "IP struct sizes:\n");
98 SIZE(sockaddr_iso);
99 SIZE(isopcb);
100 SIZE(iso_ifaddr);
101 SIZE(tp_pcb);
102#define O(y) OFF(if_/**/y,ifnet);
103 O(unit) O(ioctl) O(addrlist)
104 printf( "ISO struct sizes:\n");
105 SIZE(socket);
106 OFF(so_timeo,socket); OFF(so_rcv,socket); OFF(so_snd,socket);
107 OFF(so_tpcb,socket); OFF(so_pcb,socket); OFF(so_qlen,socket);
108 OFF(so_error,socket); OFF(so_state,socket);
109 SIZE(sockbuf);
110 OFF(sb_flags,sockbuf); OFF(sb_cc,sockbuf);
111 OFF(sb_mb,sockbuf); OFF(sb_mbcnt,sockbuf);
112 SIZE(isopcb);
113 SIZE(cons_pcb); OFF(co_state,cons_pcb);
114}