]> git.stg.codes - stg.git/blob - libs/smux/Trap-PDU.c
Some rscriptd refactoring.
[stg.git] / libs / smux / Trap-PDU.c
1 /*
2  * Generated by asn1c-0.9.28 (http://lionet.info/asn1c)
3  * From ASN.1 module "RFC1157-SNMP"
4  *      found in "RFC1157-SNMP.asn1"
5  *      `asn1c -S/mnt/data/software/asn1c/skeletons -fcompound-names -fwide-types`
6  */
7
8 #include "Trap-PDU.h"
9
10 static asn_TYPE_member_t asn_MBR_Trap_PDU_1[] = {
11         { ATF_NOFLAGS, 0, offsetof(struct Trap_PDU, enterprise),
12                 (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)),
13                 0,
14                 &asn_DEF_OBJECT_IDENTIFIER,
15                 0,      /* Defer constraints checking to the member type */
16                 0,      /* PER is not compiled, use -gen-PER */
17                 0,
18                 "enterprise"
19                 },
20         { ATF_NOFLAGS, 0, offsetof(struct Trap_PDU, agent_addr),
21                 -1 /* Ambiguous tag (CHOICE?) */,
22                 0,
23                 &asn_DEF_NetworkAddress,
24                 0,      /* Defer constraints checking to the member type */
25                 0,      /* PER is not compiled, use -gen-PER */
26                 0,
27                 "agent-addr"
28                 },
29         { ATF_NOFLAGS, 0, offsetof(struct Trap_PDU, generic_trap),
30                 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
31                 0,
32                 &asn_DEF_INTEGER,
33                 0,      /* Defer constraints checking to the member type */
34                 0,      /* PER is not compiled, use -gen-PER */
35                 0,
36                 "generic-trap"
37                 },
38         { ATF_NOFLAGS, 0, offsetof(struct Trap_PDU, specific_trap),
39                 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
40                 0,
41                 &asn_DEF_INTEGER,
42                 0,      /* Defer constraints checking to the member type */
43                 0,      /* PER is not compiled, use -gen-PER */
44                 0,
45                 "specific-trap"
46                 },
47         { ATF_NOFLAGS, 0, offsetof(struct Trap_PDU, time_stamp),
48                 (ASN_TAG_CLASS_APPLICATION | (3 << 2)),
49                 0,
50                 &asn_DEF_TimeTicks,
51                 0,      /* Defer constraints checking to the member type */
52                 0,      /* PER is not compiled, use -gen-PER */
53                 0,
54                 "time-stamp"
55                 },
56         { ATF_NOFLAGS, 0, offsetof(struct Trap_PDU, variable_bindings),
57                 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
58                 0,
59                 &asn_DEF_VarBindList,
60                 0,      /* Defer constraints checking to the member type */
61                 0,      /* PER is not compiled, use -gen-PER */
62                 0,
63                 "variable-bindings"
64                 },
65 };
66 static const ber_tlv_tag_t asn_DEF_Trap_PDU_tags_1[] = {
67         (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
68         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
69 };
70 static const asn_TYPE_tag2member_t asn_MAP_Trap_PDU_tag2el_1[] = {
71     { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, 0, 1 }, /* generic-trap */
72     { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 3, -1, 0 }, /* specific-trap */
73     { (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)), 0, 0, 0 }, /* enterprise */
74     { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 5, 0, 0 }, /* variable-bindings */
75     { (ASN_TAG_CLASS_APPLICATION | (0 << 2)), 1, 0, 0 }, /* internet */
76     { (ASN_TAG_CLASS_APPLICATION | (3 << 2)), 4, 0, 0 } /* time-stamp */
77 };
78 static asn_SEQUENCE_specifics_t asn_SPC_Trap_PDU_specs_1 = {
79         sizeof(struct Trap_PDU),
80         offsetof(struct Trap_PDU, _asn_ctx),
81         asn_MAP_Trap_PDU_tag2el_1,
82         6,      /* Count of tags in the map */
83         0, 0, 0,        /* Optional elements (not needed) */
84         -1,     /* Start extensions */
85         -1      /* Stop extensions */
86 };
87 asn_TYPE_descriptor_t asn_DEF_Trap_PDU = {
88         "Trap-PDU",
89         "Trap-PDU",
90         SEQUENCE_free,
91         SEQUENCE_print,
92         SEQUENCE_constraint,
93         SEQUENCE_decode_ber,
94         SEQUENCE_encode_der,
95         SEQUENCE_decode_xer,
96         SEQUENCE_encode_xer,
97         0, 0,   /* No PER support, use "-gen-PER" to enable */
98         0,      /* Use generic outmost tag fetcher */
99         asn_DEF_Trap_PDU_tags_1,
100         sizeof(asn_DEF_Trap_PDU_tags_1)
101                 /sizeof(asn_DEF_Trap_PDU_tags_1[0]) - 1, /* 1 */
102         asn_DEF_Trap_PDU_tags_1,        /* Same as above */
103         sizeof(asn_DEF_Trap_PDU_tags_1)
104                 /sizeof(asn_DEF_Trap_PDU_tags_1[0]), /* 2 */
105         0,      /* No PER visible constraints */
106         asn_MBR_Trap_PDU_1,
107         6,      /* Elements count */
108         &asn_SPC_Trap_PDU_specs_1       /* Additional specs */
109 };
110