2 * (C) COPYRIGHT IBM CORPORATION 1988
3 * LICENSED MATERIALS - PROPERTY OF IBM
6 * Revision 1.5 89/03/14 13:19:57
7 * Rename CBS and BBS to ka_* to avoid collisions with afsint.h.
9 * Revision 1.4 88/12/09 14:35:57
10 * Fixed a bug where BBS code didn't check error code which caused
11 * problems when Ubik retransmitted packets after previous call
12 * aborted and didn't return output parameters.
14 * Revision 1.3 88/11/18 09:07:47
17 * Revision 1.2 88/09/20 11:38:13
20 * Revision 1.1 88/08/29 12:48:27
25 #include "../rx/xdr.h"
26 #include "../afsint/kauth.h"
27 #else /* defined(UKERNEL) */
30 #endif /* defined(UKERNEL) */
32 #define MAXBS 2048 /* try to avoid horrible allocs */
39 if (x->x_op == XDR_FREE) {
44 if (x->x_op == XDR_ENCODE) {
45 xdr_afs_int32(x, &abbs->SeqLen);
46 xdr_opaque(x, abbs->SeqBody, abbs->SeqLen);
50 xdr_afs_int32(x, &len);
51 if (len < 0 || len > MAXBS) return FALSE;
52 if (!abbs->SeqBody) abbs->SeqBody = (char *) malloc(len);
54 xdr_opaque(x, abbs->SeqBody, len);
63 afs_int32 maxLen, len;
64 if (x->x_op == XDR_FREE) {
69 if (x->x_op == XDR_ENCODE) {
70 if (!xdr_afs_int32(x, &abbs->MaxSeqLen) ||
71 !xdr_afs_int32(x, &abbs->SeqLen) ||
72 !xdr_opaque(x, abbs->SeqBody, abbs->SeqLen))
77 if (!xdr_afs_int32(x, &maxLen) ||
78 !xdr_afs_int32(x, &len) ||
79 (len < 0) || (len > MAXBS) || (len > maxLen))
81 if (!abbs->SeqBody) abbs->SeqBody = (char *) malloc(maxLen);
82 abbs->MaxSeqLen = maxLen;
84 if (!xdr_opaque(x, abbs->SeqBody, len)) return FALSE;