5 #ifndef PROTOBUF_C__NO_DEPRECATED
6 #define PROTOBUF_C__NO_DEPRECATED
9 #include "nmsg/base/ncap.pb-c.h"
10 void nmsg__base__ncap__init
11 (Nmsg__Base__Ncap *message)
13 static Nmsg__Base__Ncap init_value = NMSG__BASE__NCAP__INIT;
14 *message = init_value;
16 size_t nmsg__base__ncap__get_packed_size
17 (
const Nmsg__Base__Ncap *message)
19 assert(message->base.descriptor == &nmsg__base__ncap__descriptor);
20 return protobuf_c_message_get_packed_size ((
const ProtobufCMessage*)(message));
22 size_t nmsg__base__ncap__pack
23 (
const Nmsg__Base__Ncap *message,
26 assert(message->base.descriptor == &nmsg__base__ncap__descriptor);
27 return protobuf_c_message_pack ((
const ProtobufCMessage*)message, out);
29 size_t nmsg__base__ncap__pack_to_buffer
30 (
const Nmsg__Base__Ncap *message,
31 ProtobufCBuffer *buffer)
33 assert(message->base.descriptor == &nmsg__base__ncap__descriptor);
34 return protobuf_c_message_pack_to_buffer ((
const ProtobufCMessage*)message, buffer);
37 nmsg__base__ncap__unpack
38 (ProtobufCAllocator *allocator,
42 return (Nmsg__Base__Ncap *)
43 protobuf_c_message_unpack (&nmsg__base__ncap__descriptor,
44 allocator, len, data);
46 void nmsg__base__ncap__free_unpacked
47 (Nmsg__Base__Ncap *message,
48 ProtobufCAllocator *allocator)
50 assert(message->base.descriptor == &nmsg__base__ncap__descriptor);
51 protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
53 static const ProtobufCFieldDescriptor nmsg__base__ncap__field_descriptors[7] =
58 PROTOBUF_C_LABEL_REQUIRED,
61 offsetof(Nmsg__Base__Ncap, type),
62 &nmsg__base__ncap_type__descriptor,
70 PROTOBUF_C_LABEL_REQUIRED,
71 PROTOBUF_C_TYPE_BYTES,
73 offsetof(Nmsg__Base__Ncap, payload),
82 PROTOBUF_C_LABEL_OPTIONAL,
84 offsetof(Nmsg__Base__Ncap, has_ltype),
85 offsetof(Nmsg__Base__Ncap, ltype),
86 &nmsg__base__ncap_legacy_type__descriptor,
94 PROTOBUF_C_LABEL_OPTIONAL,
95 PROTOBUF_C_TYPE_BYTES,
96 offsetof(Nmsg__Base__Ncap, has_srcip),
97 offsetof(Nmsg__Base__Ncap, srcip),
106 PROTOBUF_C_LABEL_OPTIONAL,
107 PROTOBUF_C_TYPE_BYTES,
108 offsetof(Nmsg__Base__Ncap, has_dstip),
109 offsetof(Nmsg__Base__Ncap, dstip),
118 PROTOBUF_C_LABEL_OPTIONAL,
119 PROTOBUF_C_TYPE_UINT32,
120 offsetof(Nmsg__Base__Ncap, has_lint0),
121 offsetof(Nmsg__Base__Ncap, lint0),
130 PROTOBUF_C_LABEL_OPTIONAL,
131 PROTOBUF_C_TYPE_UINT32,
132 offsetof(Nmsg__Base__Ncap, has_lint1),
133 offsetof(Nmsg__Base__Ncap, lint1),
140 static const unsigned nmsg__base__ncap__field_indices_by_name[] = {
149 static const ProtobufCIntRange nmsg__base__ncap__number_ranges[1 + 1] =
154 const ProtobufCMessageDescriptor nmsg__base__ncap__descriptor =
156 PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
161 sizeof(Nmsg__Base__Ncap),
163 nmsg__base__ncap__field_descriptors,
164 nmsg__base__ncap__field_indices_by_name,
165 1, nmsg__base__ncap__number_ranges,
166 (ProtobufCMessageInit) nmsg__base__ncap__init,
169 const ProtobufCEnumValue nmsg__base__ncap_type__enum_values_by_number[3] =
171 {
"IPV4",
"NMSG__BASE__NCAP_TYPE__IPV4", 0 },
172 {
"IPV6",
"NMSG__BASE__NCAP_TYPE__IPV6", 1 },
173 {
"Legacy",
"NMSG__BASE__NCAP_TYPE__Legacy", 2 },
175 static const ProtobufCIntRange nmsg__base__ncap_type__value_ranges[] = {
178 const ProtobufCEnumValueIndex nmsg__base__ncap_type__enum_values_by_name[3] =
184 const ProtobufCEnumDescriptor nmsg__base__ncap_type__descriptor =
186 PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
187 "nmsg.base.NcapType",
189 "Nmsg__Base__NcapType",
192 nmsg__base__ncap_type__enum_values_by_number,
194 nmsg__base__ncap_type__enum_values_by_name,
196 nmsg__base__ncap_type__value_ranges,
199 const ProtobufCEnumValue nmsg__base__ncap_legacy_type__enum_values_by_number[3] =
201 {
"UDP",
"NMSG__BASE__NCAP_LEGACY_TYPE__UDP", 0 },
202 {
"TCP",
"NMSG__BASE__NCAP_LEGACY_TYPE__TCP", 1 },
203 {
"ICMP",
"NMSG__BASE__NCAP_LEGACY_TYPE__ICMP", 2 },
205 static const ProtobufCIntRange nmsg__base__ncap_legacy_type__value_ranges[] = {
208 const ProtobufCEnumValueIndex nmsg__base__ncap_legacy_type__enum_values_by_name[3] =
214 const ProtobufCEnumDescriptor nmsg__base__ncap_legacy_type__descriptor =
216 PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
217 "nmsg.base.NcapLegacyType",
219 "Nmsg__Base__NcapLegacyType",
222 nmsg__base__ncap_legacy_type__enum_values_by_number,
224 nmsg__base__ncap_legacy_type__enum_values_by_name,
226 nmsg__base__ncap_legacy_type__value_ranges,