2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
11 * Revision 1.5 89/03/14 13:19:57
12 * Rename CBS and BBS to ka_* to avoid collisions with afsint.h.
14 * Revision 1.4 88/12/09 14:35:57
15 * Fixed a bug where BBS code didn't check error code which caused
16 * problems when Ubik retransmitted packets after previous call
17 * aborted and didn't return output parameters.
19 * Revision 1.3 88/11/18 09:07:47
22 * Revision 1.2 88/09/20 11:38:13
25 * Revision 1.1 88/08/29 12:48:27
30 #include "../rx/xdr.h"
31 #include "../afsint/kauth.h"
32 #else /* defined(UKERNEL) */
35 #endif /* defined(UKERNEL) */
37 #define MAXBS 2048 /* try to avoid horrible allocs */
44 if (x->x_op == XDR_FREE) {
49 if (x->x_op == XDR_ENCODE) {
50 xdr_afs_int32(x, &abbs->SeqLen);
51 xdr_opaque(x, abbs->SeqBody, abbs->SeqLen);
55 xdr_afs_int32(x, &len);
56 if (len < 0 || len > MAXBS) return FALSE;
57 if (!abbs->SeqBody) abbs->SeqBody = (char *) malloc(len);
59 xdr_opaque(x, abbs->SeqBody, len);
68 afs_int32 maxLen, len;
69 if (x->x_op == XDR_FREE) {
74 if (x->x_op == XDR_ENCODE) {
75 if (!xdr_afs_int32(x, &abbs->MaxSeqLen) ||
76 !xdr_afs_int32(x, &abbs->SeqLen) ||
77 !xdr_opaque(x, abbs->SeqBody, abbs->SeqLen))
82 if (!xdr_afs_int32(x, &maxLen) ||
83 !xdr_afs_int32(x, &len) ||
84 (len < 0) || (len > MAXBS) || (len > maxLen))
86 if (!abbs->SeqBody) abbs->SeqBody = (char *) malloc(maxLen);
87 abbs->MaxSeqLen = maxLen;
89 if (!xdr_opaque(x, abbs->SeqBody, len)) return FALSE;