root/trunk/gsdl/packages/yaz/z39.50/z-accdes1.c @ 1343

Revision 1343, 1.1 KB (checked in by johnmcp, 20 years ago)

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

  • Property svn:keywords set to Author Date Id Revision
Line 
1/* Generated automatically by the YAZ ASN.1 Compiler 0.3 */
2/* Module-C: AccessControlFormat-des-1 */
3
4#include <yaz/z-accdes1.h>
5
6int z_DES_RN_Object (ODR o, Z_DES_RN_Object **p, int opt, const char *name)
7{
8    static Odr_arm arm[] = {
9        {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_DES_RN_Object_challenge,
10        (Odr_fun) z_DRNType, "challenge"},
11        {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_DES_RN_Object_response,
12        (Odr_fun) z_DRNType, "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_DRNType (ODR o, Z_DRNType **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, odr_octetstring,
29            &(*p)->userId, ODR_CONTEXT, 1, 1, "userId") &&
30        odr_implicit_tag (o, odr_octetstring,
31            &(*p)->salt, ODR_CONTEXT, 2, 1, "salt") &&
32        odr_implicit_tag (o, odr_octetstring,
33            &(*p)->randomNumber, ODR_CONTEXT, 3, 0, "randomNumber") &&
34        odr_sequence_end (o);
35}
Note: See TracBrowser for help on using the browser.