source: trunk/gsdl/packages/yaz/z39.50/z-acckrb1.c@ 1343

Last change on this file since 1343 was 1343, checked in by johnmcp, 24 years ago

Added the YAZ toolkit source to the packages directory (for z39.50 stuff)

  • Property svn:keywords set to Author Date Id Revision
File size: 1.4 KB
Line 
1/* Generated automatically by the YAZ ASN.1 Compiler 0.3 */
2/* Module-C: AccessControlFormat-krb-1 */
3
4#include <yaz/z-acckrb1.h>
5
6int z_KRBObject (ODR o, Z_KRBObject **p, int opt, const char *name)
7{
8 static Odr_arm arm[] = {
9 {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_KRBObject_challenge,
10 (Odr_fun) z_KRBRequest, "challenge"},
11 {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_KRBObject_response,
12 (Odr_fun) z_KRBResponse, "response"},
13 {-1, -1, -1, -1, (Odr_fun) 0, 0}
14 };
15 if (!odr_initmember(o, p, sizeof(**p)))
16 return opt && odr_ok(o);
17 if (odr_choice(o, arm, &(*p)->u, &(*p)->which, name))
18 return 1;
19 *p = 0;
20 return opt && odr_ok(o);
21}
22
23int z_KRBRequest (ODR o, Z_KRBRequest **p, int opt, const char *name)
24{
25 if (!odr_sequence_begin (o, p, sizeof(**p), name))
26 return opt && odr_ok (o);
27 return
28 odr_implicit_tag (o, z_InternationalString,
29 &(*p)->service, ODR_CONTEXT, 1, 0, "service") &&
30 odr_implicit_tag (o, z_InternationalString,
31 &(*p)->instance, ODR_CONTEXT, 2, 1, "instance") &&
32 odr_implicit_tag (o, z_InternationalString,
33 &(*p)->realm, ODR_CONTEXT, 3, 1, "realm") &&
34 odr_sequence_end (o);
35}
36
37int z_KRBResponse (ODR o, Z_KRBResponse **p, int opt, const char *name)
38{
39 if (!odr_sequence_begin (o, p, sizeof(**p), name))
40 return opt && odr_ok (o);
41 return
42 odr_implicit_tag (o, z_InternationalString,
43 &(*p)->userid, ODR_CONTEXT, 1, 1, "userid") &&
44 odr_implicit_tag (o, odr_octetstring,
45 &(*p)->ticket, ODR_CONTEXT, 2, 0, "ticket") &&
46 odr_sequence_end (o);
47}
Note: See TracBrowser for help on using the repository browser.