]> git.stg.codes - stg.git/blob - libs/smux/IpAddrEntry.c
Remove some old stuff.
[stg.git] / libs / smux / IpAddrEntry.c
1 /*
2  * Generated by asn1c-0.9.21 (http://lionet.info/asn1c)
3  * From ASN.1 module "RFC1213-MIB"
4  *      found in "RFC1213-MIB.asn1"
5  *      `asn1c -fskeletons-copy`
6  */
7
8 #include <asn_internal.h>
9
10 #include "IpAddrEntry.h"
11
12 static int
13 memb_ipAdEntReasmMaxSize_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
14                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
15         long value;
16         
17         if(!sptr) {
18                 _ASN_CTFAIL(app_key, td, sptr,
19                         "%s: value not given (%s:%d)",
20                         td->name, __FILE__, __LINE__);
21                 return -1;
22         }
23         
24         value = *(const long *)sptr;
25         
26         if((value >= 0 && value <= 65535)) {
27                 /* Constraint check succeeded */
28                 return 0;
29         } else {
30                 _ASN_CTFAIL(app_key, td, sptr,
31                         "%s: constraint failed (%s:%d)",
32                         td->name, __FILE__, __LINE__);
33                 return -1;
34         }
35 }
36
37 static asn_TYPE_member_t asn_MBR_IpAddrEntry_1[] = {
38         { ATF_NOFLAGS, 0, offsetof(struct IpAddrEntry, ipAdEntAddr),
39                 (ASN_TAG_CLASS_APPLICATION | (0 << 2)),
40                 0,
41                 &asn_DEF_IpAddress,
42                 0,      /* Defer constraints checking to the member type */
43                 0,      /* PER is not compiled, use -gen-PER */
44                 0,
45                 "ipAdEntAddr"
46                 },
47         { ATF_NOFLAGS, 0, offsetof(struct IpAddrEntry, ipAdEntIfIndex),
48                 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
49                 0,
50                 &asn_DEF_INTEGER,
51                 0,      /* Defer constraints checking to the member type */
52                 0,      /* PER is not compiled, use -gen-PER */
53                 0,
54                 "ipAdEntIfIndex"
55                 },
56         { ATF_NOFLAGS, 0, offsetof(struct IpAddrEntry, ipAdEntNetMask),
57                 (ASN_TAG_CLASS_APPLICATION | (0 << 2)),
58                 0,
59                 &asn_DEF_IpAddress,
60                 0,      /* Defer constraints checking to the member type */
61                 0,      /* PER is not compiled, use -gen-PER */
62                 0,
63                 "ipAdEntNetMask"
64                 },
65         { ATF_NOFLAGS, 0, offsetof(struct IpAddrEntry, ipAdEntBcastAddr),
66                 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
67                 0,
68                 &asn_DEF_INTEGER,
69                 0,      /* Defer constraints checking to the member type */
70                 0,      /* PER is not compiled, use -gen-PER */
71                 0,
72                 "ipAdEntBcastAddr"
73                 },
74         { ATF_NOFLAGS, 0, offsetof(struct IpAddrEntry, ipAdEntReasmMaxSize),
75                 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
76                 0,
77                 &asn_DEF_NativeInteger,
78                 memb_ipAdEntReasmMaxSize_constraint_1,
79                 0,      /* PER is not compiled, use -gen-PER */
80                 0,
81                 "ipAdEntReasmMaxSize"
82                 },
83 };
84 static ber_tlv_tag_t asn_DEF_IpAddrEntry_tags_1[] = {
85         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
86 };
87 static asn_TYPE_tag2member_t asn_MAP_IpAddrEntry_tag2el_1[] = {
88     { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 2 }, /* ipAdEntIfIndex at 177 */
89     { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 3, -1, 1 }, /* ipAdEntBcastAddr at 181 */
90     { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 4, -2, 0 }, /* ipAdEntReasmMaxSize at 183 */
91     { (ASN_TAG_CLASS_APPLICATION | (0 << 2)), 0, 0, 1 }, /* ipAdEntAddr at 175 */
92     { (ASN_TAG_CLASS_APPLICATION | (0 << 2)), 2, -1, 0 } /* ipAdEntNetMask at 179 */
93 };
94 static asn_SEQUENCE_specifics_t asn_SPC_IpAddrEntry_specs_1 = {
95         sizeof(struct IpAddrEntry),
96         offsetof(struct IpAddrEntry, _asn_ctx),
97         asn_MAP_IpAddrEntry_tag2el_1,
98         5,      /* Count of tags in the map */
99         0, 0, 0,        /* Optional elements (not needed) */
100         -1,     /* Start extensions */
101         -1      /* Stop extensions */
102 };
103 asn_TYPE_descriptor_t asn_DEF_IpAddrEntry = {
104         "IpAddrEntry",
105         "IpAddrEntry",
106         SEQUENCE_free,
107         SEQUENCE_print,
108         SEQUENCE_constraint,
109         SEQUENCE_decode_ber,
110         SEQUENCE_encode_der,
111         SEQUENCE_decode_xer,
112         SEQUENCE_encode_xer,
113         0, 0,   /* No PER support, use "-gen-PER" to enable */
114         0,      /* Use generic outmost tag fetcher */
115         asn_DEF_IpAddrEntry_tags_1,
116         sizeof(asn_DEF_IpAddrEntry_tags_1)
117                 /sizeof(asn_DEF_IpAddrEntry_tags_1[0]), /* 1 */
118         asn_DEF_IpAddrEntry_tags_1,     /* Same as above */
119         sizeof(asn_DEF_IpAddrEntry_tags_1)
120                 /sizeof(asn_DEF_IpAddrEntry_tags_1[0]), /* 1 */
121         0,      /* No PER visible constraints */
122         asn_MBR_IpAddrEntry_1,
123         5,      /* Elements count */
124         &asn_SPC_IpAddrEntry_specs_1    /* Additional specs */
125 };
126