1*49341Ssklower /************************************************************
2*49341Ssklower Copyright IBM Corporation 1987
3*49341Ssklower
4*49341Ssklower All Rights Reserved
5*49341Ssklower
6*49341Ssklower Permission to use, copy, modify, and distribute this software and its
7*49341Ssklower documentation for any purpose and without fee is hereby granted,
8*49341Ssklower provided that the above copyright notice appear in all copies and that
9*49341Ssklower both that copyright notice and this permission notice appear in
10*49341Ssklower supporting documentation, and that the name of IBM not be
11*49341Ssklower used in advertising or publicity pertaining to distribution of the
12*49341Ssklower software without specific, written prior permission.
13*49341Ssklower
14*49341Ssklower IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
15*49341Ssklower ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
16*49341Ssklower IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
17*49341Ssklower ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
18*49341Ssklower WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
19*49341Ssklower ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
20*49341Ssklower SOFTWARE.
21*49341Ssklower
22*49341Ssklower ******************************************************************/
23*49341Ssklower
24*49341Ssklower /*
25*49341Ssklower * ARGO Project, Computer Sciences Dept., University of Wisconsin - Madison
26*49341Ssklower */
27*49341Ssklower
28*49341Ssklower #define KERNEL
29*49341Ssklower #define MERGED
30*49341Ssklower #define IBMRTPC
31*49341Ssklower #define CLNPECHO
32*49341Ssklower /* #define TP_PERF_MEAS */
33*49341Ssklower #define CONS
34*49341Ssklower #define TPPT
35*49341Ssklower #define ARGO_TP
36*49341Ssklower #define ARGO_DEBUG
37*49341Ssklower #define ISO
38*49341Ssklower #define RDB
39*49341Ssklower #define SHOW_LOAD
40*49341Ssklower #define DEBUG
41*49341Ssklower #define INET
42*49341Ssklower #define MAXUSERS 32
43*49341Ssklower #define DST 1
44*49341Ssklower #define TIMEZONE 360
45*49341Ssklower
46*49341Ssklower /*
47*49341Ssklower * ARGO TP
48*49341Ssklower *
49*49341Ssklower * $Header: tp_sizes.c,v 5.1 88/10/12 12:21:03 root Exp $
50*49341Ssklower * $Source: /usr/argo/sys/netiso/RCS/tp_sizes.c,v $
51*49341Ssklower *
52*49341Ssklower *
53*49341Ssklower * This is the initialization and cleanup stuff -
54*49341Ssklower * for the tp machine in general as well as for the individual pcbs.
55*49341Ssklower * tp_init() is called at system startup. tp_attach() and tp_getref() are
56*49341Ssklower * called when a socket is created. tp_detach() and tp_freeref()
57*49341Ssklower * are called during the closing stage and/or when the reference timer
58*49341Ssklower * goes off.
59*49341Ssklower * tp_soisdisconnecting() and tp_soisdisconnected() are tp-specific
60*49341Ssklower * versions of soisconnect*
61*49341Ssklower * and are called (obviously) during the closing phase.
62*49341Ssklower *
63*49341Ssklower */
64*49341Ssklower
65*49341Ssklower #ifndef lint
66*49341Ssklower static char *rcsid = "$Header: tp_sizes.c,v 5.1 88/10/12 12:21:03 root Exp $";
67*49341Ssklower #endif lint
68*49341Ssklower
69*49341Ssklower #include "types.h"
70*49341Ssklower #include "param.h"
71*49341Ssklower #include "mbuf.h"
72*49341Ssklower #include "socket.h"
73*49341Ssklower #include "socketvar.h"
74*49341Ssklower #include "protosw.h"
75*49341Ssklower #include "errno.h"
76*49341Ssklower #include "time.h"
77*49341Ssklower #include "tp_param.h"
78*49341Ssklower #include "tp_stat.h"
79*49341Ssklower #include "tp_pcb.h"
80*49341Ssklower #include "tp_tpdu.h"
81*49341Ssklower #include "tp_trace.h"
82*49341Ssklower #include "tp_meas.h"
83*49341Ssklower #include "tp_seq.h"
84*49341Ssklower #include "tp_clnp.h"
85*49341Ssklower
86*49341Ssklower #include "iso_errno.h"
87*49341Ssklower #include "cons.h"
88*49341Ssklower #undef IncStat
89*49341Ssklower #include "cons_pcb.h"
90*49341Ssklower
91*49341Ssklower #define DUP(x) x, x
92*49341Ssklower #define SIZE(P) printf(" Size of %s: 0x%x %d\n", "P", DUP(sizeof(struct P)))
93*49341Ssklower #define OFF(P, Q) printf("\toffset of %s in %s: 0x%x %d\n", "P", "Q", \
94*49341Ssklower DUP(_offsetof(struct Q, P)))
main()95*49341Ssklower main()
96*49341Ssklower {
97*49341Ssklower printf( "IP struct sizes:\n");
98*49341Ssklower SIZE(sockaddr_iso);
99*49341Ssklower SIZE(isopcb);
100*49341Ssklower SIZE(iso_ifaddr);
101*49341Ssklower SIZE(tp_pcb);
102*49341Ssklower #define O(y) OFF(if_/**/y,ifnet);
103*49341Ssklower O(unit) O(ioctl) O(addrlist)
104*49341Ssklower printf( "ISO struct sizes:\n");
105*49341Ssklower SIZE(socket);
106*49341Ssklower OFF(so_timeo,socket); OFF(so_rcv,socket); OFF(so_snd,socket);
107*49341Ssklower OFF(so_tpcb,socket); OFF(so_pcb,socket); OFF(so_qlen,socket);
108*49341Ssklower OFF(so_error,socket); OFF(so_state,socket);
109*49341Ssklower SIZE(sockbuf);
110*49341Ssklower OFF(sb_flags,sockbuf); OFF(sb_cc,sockbuf);
111*49341Ssklower OFF(sb_mb,sockbuf); OFF(sb_mbcnt,sockbuf);
112*49341Ssklower SIZE(isopcb);
113*49341Ssklower SIZE(cons_pcb); OFF(co_state,cons_pcb);
114*49341Ssklower }
115