137469Ssklower /************************************************************ 236411Ssklower Copyright IBM Corporation 1987 336411Ssklower 436411Ssklower All Rights Reserved 536411Ssklower 636411Ssklower Permission to use, copy, modify, and distribute this software and its 736411Ssklower documentation for any purpose and without fee is hereby granted, 836411Ssklower provided that the above copyright notice appear in all copies and that 936411Ssklower both that copyright notice and this permission notice appear in 1036411Ssklower supporting documentation, and that the name of IBM not be 1136411Ssklower used in advertising or publicity pertaining to distribution of the 1236411Ssklower software without specific, written prior permission. 1336411Ssklower 1436411Ssklower IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 1536411Ssklower ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 1636411Ssklower IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR 1736411Ssklower ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 1836411Ssklower WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 1936411Ssklower ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 2036411Ssklower SOFTWARE. 2136411Ssklower 2236411Ssklower ******************************************************************/ 2336411Ssklower 2436411Ssklower /* 2536411Ssklower * ARGO Project, Computer Sciences Dept., University of Wisconsin - Madison 2636411Ssklower */ 2736411Ssklower 2836411Ssklower #define KERNEL 2936411Ssklower #define MERGED 3036411Ssklower #define IBMRTPC 3136411Ssklower #define CLNPECHO 3237469Ssklower /* #define TP_PERF_MEAS */ 3336411Ssklower #define CONS 3436411Ssklower #define TPPT 3536411Ssklower #define ARGO_TP 3636411Ssklower #define ARGO_DEBUG 3736411Ssklower #define ISO 3836411Ssklower #define RDB 3936411Ssklower #define SHOW_LOAD 4036411Ssklower #define DEBUG 4136411Ssklower #define INET 4236411Ssklower #define MAXUSERS 32 4336411Ssklower #define DST 1 4436411Ssklower #define TIMEZONE 360 4536411Ssklower 4636411Ssklower /* 4736411Ssklower * ARGO TP 4836411Ssklower * 4936411Ssklower * $Header: tp_sizes.c,v 5.1 88/10/12 12:21:03 root Exp $ 5036411Ssklower * $Source: /usr/argo/sys/netiso/RCS/tp_sizes.c,v $ 51*38841Ssklower * @(#)tp_sizes.c 7.3 (Berkeley) 08/29/89 * 5236411Ssklower * 5336411Ssklower * 5436411Ssklower * This is the initialization and cleanup stuff - 5536411Ssklower * for the tp machine in general as well as for the individual pcbs. 5636411Ssklower * tp_init() is called at system startup. tp_attach() and tp_getref() are 5736411Ssklower * called when a socket is created. tp_detach() and tp_freeref() 5836411Ssklower * are called during the closing stage and/or when the reference timer 5936411Ssklower * goes off. 6036411Ssklower * tp_soisdisconnecting() and tp_soisdisconnected() are tp-specific 6136411Ssklower * versions of soisconnect* 6236411Ssklower * and are called (obviously) during the closing phase. 6336411Ssklower * 6436411Ssklower */ 6536411Ssklower 6636411Ssklower #ifndef lint 6736411Ssklower static char *rcsid = "$Header: tp_sizes.c,v 5.1 88/10/12 12:21:03 root Exp $"; 6836411Ssklower #endif lint 6936411Ssklower 7036411Ssklower #include "argoxtwentyfive.h" 7136411Ssklower #include "types.h" 7236411Ssklower #include "param.h" 7336411Ssklower #include "mbuf.h" 7436411Ssklower #include "socket.h" 7536411Ssklower #include "socketvar.h" 7636411Ssklower #include "protosw.h" 7736411Ssklower #include "errno.h" 7836411Ssklower #include "time.h" 7937469Ssklower #include "tp_param.h" 8037469Ssklower #include "tp_stat.h" 8137469Ssklower #include "tp_pcb.h" 8237469Ssklower #include "tp_tpdu.h" 8337469Ssklower #include "tp_trace.h" 8437469Ssklower #include "tp_meas.h" 8537469Ssklower #include "tp_seq.h" 8637469Ssklower #include "tp_clnp.h" 8736411Ssklower 8837469Ssklower #include "iso_errno.h" 8937469Ssklower #include "cons.h" 9037469Ssklower #undef IncStat 9137469Ssklower #include "cons_pcb.h" 9236411Ssklower 9337469Ssklower #define DUP(x) x, x 94*38841Ssklower #define SIZE(P) printf(" Size of %s: 0x%x %d\n", "P", DUP(sizeof(struct P))) 9537469Ssklower #define OFF(P, Q) printf("\toffset of %s in %s: 0x%x %d\n", "P", "Q", \ 9637469Ssklower DUP(_offsetof(struct Q, P))) 9736411Ssklower main() 9836411Ssklower { 9936411Ssklower printf( "TP struct sizes:\n"); 10037469Ssklower SIZE(tp_pcb); 10137469Ssklower #define O(y) OFF(tp_/**/y,tp_pcb); 102*38841Ssklower O(state) O(retrans) O(snduna) O(lref) O(fref) 103*38841Ssklower O(fsuffix) O(fsuffixlen) O(lsuffix) O(lsuffixlen) O(Xsnd) O(Xuna) 104*38841Ssklower SIZE(tp_ref); 105*38841Ssklower #undef O 106*38841Ssklower #define O(y) OFF(tpr_/**/y,tp_ref); 107*38841Ssklower O(pcb) O(calltodo) 108*38841Ssklower SIZE(tp_stat); 109*38841Ssklower SIZE(tp_param); SIZE(tp_conn_param); 110*38841Ssklower SIZE(tp_rtc); SIZE(nl_protosw); 111*38841Ssklower #undef O 112*38841Ssklower #define O(y) OFF(so_/**/y,socket); 113*38841Ssklower printf( "socket struct sizes:\n"); 11437469Ssklower SIZE(socket); 115*38841Ssklower O(timeo) O(rcv) O(snd) O(tpcb) O(pcb) O(qlen) O(error) O(state) 11637469Ssklower SIZE(sockbuf); 117*38841Ssklower #undef O 118*38841Ssklower #define O(y) OFF(sb_/**/y,sockbuf); 119*38841Ssklower O(flags) O(cc) O(mb) O(mbcnt) 120*38841Ssklower SIZE(isopcb); SIZE(cons_pcb); 121*38841Ssklower OFF(co_state,cons_pcb); 12236411Ssklower } 123