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