Commit | Line | Data |
---|---|---|
a50e2bc0 | 1 | /************************************************************ |
2e38df90 KS |
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 | ||
28 | #define KERNEL | |
29 | #define MERGED | |
30 | #define IBMRTPC | |
31 | #define CLNPECHO | |
a50e2bc0 | 32 | /* #define TP_PERF_MEAS */ |
2e38df90 KS |
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 $ | |
44f52ea5 | 51 | * @(#)tp_sizes.c 7.3 (Berkeley) %G% * |
2e38df90 KS |
52 | * |
53 | * | |
54 | * This is the initialization and cleanup stuff - | |
55 | * for the tp machine in general as well as for the individual pcbs. | |
56 | * tp_init() is called at system startup. tp_attach() and tp_getref() are | |
57 | * called when a socket is created. tp_detach() and tp_freeref() | |
58 | * are called during the closing stage and/or when the reference timer | |
59 | * goes off. | |
60 | * tp_soisdisconnecting() and tp_soisdisconnected() are tp-specific | |
61 | * versions of soisconnect* | |
62 | * and are called (obviously) during the closing phase. | |
63 | * | |
64 | */ | |
65 | ||
66 | #ifndef lint | |
67 | static char *rcsid = "$Header: tp_sizes.c,v 5.1 88/10/12 12:21:03 root Exp $"; | |
68 | #endif lint | |
69 | ||
70 | #include "argoxtwentyfive.h" | |
71 | #include "types.h" | |
72 | #include "param.h" | |
73 | #include "mbuf.h" | |
74 | #include "socket.h" | |
75 | #include "socketvar.h" | |
76 | #include "protosw.h" | |
77 | #include "errno.h" | |
78 | #include "time.h" | |
a50e2bc0 | 79 | #include "tp_param.h" |
a50e2bc0 KS |
80 | #include "tp_stat.h" |
81 | #include "tp_pcb.h" | |
82 | #include "tp_tpdu.h" | |
83 | #include "tp_trace.h" | |
84 | #include "tp_meas.h" | |
85 | #include "tp_seq.h" | |
86 | #include "tp_clnp.h" | |
87 | ||
88 | #include "iso_errno.h" | |
89 | #include "cons.h" | |
90 | #undef IncStat | |
91 | #include "cons_pcb.h" | |
92 | ||
93 | #define DUP(x) x, x | |
44f52ea5 | 94 | #define SIZE(P) printf(" Size of %s: 0x%x %d\n", "P", DUP(sizeof(struct P))) |
a50e2bc0 KS |
95 | #define OFF(P, Q) printf("\toffset of %s in %s: 0x%x %d\n", "P", "Q", \ |
96 | DUP(_offsetof(struct Q, P))) | |
2e38df90 KS |
97 | main() |
98 | { | |
99 | printf( "TP struct sizes:\n"); | |
a50e2bc0 KS |
100 | SIZE(tp_pcb); |
101 | #define O(y) OFF(tp_/**/y,tp_pcb); | |
44f52ea5 KS |
102 | O(state) O(retrans) O(snduna) O(lref) O(fref) |
103 | O(fsuffix) O(fsuffixlen) O(lsuffix) O(lsuffixlen) O(Xsnd) O(Xuna) | |
104 | SIZE(tp_ref); | |
105 | #undef O | |
106 | #define O(y) OFF(tpr_/**/y,tp_ref); | |
107 | O(pcb) O(calltodo) | |
108 | SIZE(tp_stat); | |
109 | SIZE(tp_param); SIZE(tp_conn_param); | |
110 | SIZE(tp_rtc); SIZE(nl_protosw); | |
111 | #undef O | |
112 | #define O(y) OFF(so_/**/y,socket); | |
113 | printf( "socket struct sizes:\n"); | |
a50e2bc0 | 114 | SIZE(socket); |
44f52ea5 | 115 | O(timeo) O(rcv) O(snd) O(tpcb) O(pcb) O(qlen) O(error) O(state) |
a50e2bc0 | 116 | SIZE(sockbuf); |
44f52ea5 KS |
117 | #undef O |
118 | #define O(y) OFF(sb_/**/y,sockbuf); | |
119 | O(flags) O(cc) O(mb) O(mbcnt) | |
120 | SIZE(isopcb); SIZE(cons_pcb); | |
121 | OFF(co_state,cons_pcb); | |
2e38df90 | 122 | } |