5 #ifndef PROTOBUF_C__NO_DEPRECATED
6 #define PROTOBUF_C__NO_DEPRECATED
9 #include "nmsg/base/dnsqr.pb-c.h"
10 void nmsg__base__dns_qr__init
11 (Nmsg__Base__DnsQR *message)
13 static Nmsg__Base__DnsQR init_value = NMSG__BASE__DNS_QR__INIT;
14 *message = init_value;
16 size_t nmsg__base__dns_qr__get_packed_size
17 (
const Nmsg__Base__DnsQR *message)
19 assert(message->base.descriptor == &nmsg__base__dns_qr__descriptor);
20 return protobuf_c_message_get_packed_size ((
const ProtobufCMessage*)(message));
22 size_t nmsg__base__dns_qr__pack
23 (
const Nmsg__Base__DnsQR *message,
26 assert(message->base.descriptor == &nmsg__base__dns_qr__descriptor);
27 return protobuf_c_message_pack ((
const ProtobufCMessage*)message, out);
29 size_t nmsg__base__dns_qr__pack_to_buffer
30 (
const Nmsg__Base__DnsQR *message,
31 ProtobufCBuffer *buffer)
33 assert(message->base.descriptor == &nmsg__base__dns_qr__descriptor);
34 return protobuf_c_message_pack_to_buffer ((
const ProtobufCMessage*)message, buffer);
37 nmsg__base__dns_qr__unpack
38 (ProtobufCAllocator *allocator,
42 return (Nmsg__Base__DnsQR *)
43 protobuf_c_message_unpack (&nmsg__base__dns_qr__descriptor,
44 allocator, len, data);
46 void nmsg__base__dns_qr__free_unpacked
47 (Nmsg__Base__DnsQR *message,
48 ProtobufCAllocator *allocator)
50 assert(message->base.descriptor == &nmsg__base__dns_qr__descriptor);
51 protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
53 static const ProtobufCFieldDescriptor nmsg__base__dns_qr__field_descriptors[22] =
58 PROTOBUF_C_LABEL_REQUIRED,
61 offsetof(Nmsg__Base__DnsQR, type),
62 &nmsg__base__dns_qrtype__descriptor,
70 PROTOBUF_C_LABEL_REQUIRED,
71 PROTOBUF_C_TYPE_BYTES,
73 offsetof(Nmsg__Base__DnsQR, query_ip),
82 PROTOBUF_C_LABEL_REQUIRED,
83 PROTOBUF_C_TYPE_BYTES,
85 offsetof(Nmsg__Base__DnsQR, response_ip),
94 PROTOBUF_C_LABEL_REQUIRED,
95 PROTOBUF_C_TYPE_UINT32,
97 offsetof(Nmsg__Base__DnsQR, proto),
106 PROTOBUF_C_LABEL_REQUIRED,
107 PROTOBUF_C_TYPE_UINT32,
109 offsetof(Nmsg__Base__DnsQR, query_port),
118 PROTOBUF_C_LABEL_REQUIRED,
119 PROTOBUF_C_TYPE_UINT32,
121 offsetof(Nmsg__Base__DnsQR, response_port),
130 PROTOBUF_C_LABEL_REQUIRED,
131 PROTOBUF_C_TYPE_UINT32,
133 offsetof(Nmsg__Base__DnsQR,
id),
142 PROTOBUF_C_LABEL_OPTIONAL,
143 PROTOBUF_C_TYPE_BYTES,
144 offsetof(Nmsg__Base__DnsQR, has_qname),
145 offsetof(Nmsg__Base__DnsQR, qname),
154 PROTOBUF_C_LABEL_OPTIONAL,
155 PROTOBUF_C_TYPE_UINT32,
156 offsetof(Nmsg__Base__DnsQR, has_qtype),
157 offsetof(Nmsg__Base__DnsQR, qtype),
166 PROTOBUF_C_LABEL_OPTIONAL,
167 PROTOBUF_C_TYPE_UINT32,
168 offsetof(Nmsg__Base__DnsQR, has_qclass),
169 offsetof(Nmsg__Base__DnsQR, qclass),
178 PROTOBUF_C_LABEL_OPTIONAL,
179 PROTOBUF_C_TYPE_UINT32,
180 offsetof(Nmsg__Base__DnsQR, has_rcode),
181 offsetof(Nmsg__Base__DnsQR, rcode),
190 PROTOBUF_C_LABEL_REPEATED,
191 PROTOBUF_C_TYPE_BYTES,
192 offsetof(Nmsg__Base__DnsQR, n_query_packet),
193 offsetof(Nmsg__Base__DnsQR, query_packet),
202 PROTOBUF_C_LABEL_REPEATED,
203 PROTOBUF_C_TYPE_INT64,
204 offsetof(Nmsg__Base__DnsQR, n_query_time_sec),
205 offsetof(Nmsg__Base__DnsQR, query_time_sec),
214 PROTOBUF_C_LABEL_REPEATED,
215 PROTOBUF_C_TYPE_SFIXED32,
216 offsetof(Nmsg__Base__DnsQR, n_query_time_nsec),
217 offsetof(Nmsg__Base__DnsQR, query_time_nsec),
226 PROTOBUF_C_LABEL_REPEATED,
227 PROTOBUF_C_TYPE_BYTES,
228 offsetof(Nmsg__Base__DnsQR, n_response_packet),
229 offsetof(Nmsg__Base__DnsQR, response_packet),
238 PROTOBUF_C_LABEL_REPEATED,
239 PROTOBUF_C_TYPE_INT64,
240 offsetof(Nmsg__Base__DnsQR, n_response_time_sec),
241 offsetof(Nmsg__Base__DnsQR, response_time_sec),
248 "response_time_nsec",
250 PROTOBUF_C_LABEL_REPEATED,
251 PROTOBUF_C_TYPE_SFIXED32,
252 offsetof(Nmsg__Base__DnsQR, n_response_time_nsec),
253 offsetof(Nmsg__Base__DnsQR, response_time_nsec),
262 PROTOBUF_C_LABEL_OPTIONAL,
263 PROTOBUF_C_TYPE_BYTES,
264 offsetof(Nmsg__Base__DnsQR, has_tcp),
265 offsetof(Nmsg__Base__DnsQR, tcp),
274 PROTOBUF_C_LABEL_OPTIONAL,
275 PROTOBUF_C_TYPE_BYTES,
276 offsetof(Nmsg__Base__DnsQR, has_icmp),
277 offsetof(Nmsg__Base__DnsQR, icmp),
286 PROTOBUF_C_LABEL_OPTIONAL,
287 PROTOBUF_C_TYPE_DOUBLE,
288 offsetof(Nmsg__Base__DnsQR, has_timeout),
289 offsetof(Nmsg__Base__DnsQR, timeout),
298 PROTOBUF_C_LABEL_OPTIONAL,
299 PROTOBUF_C_TYPE_ENUM,
300 offsetof(Nmsg__Base__DnsQR, has_udp_checksum),
301 offsetof(Nmsg__Base__DnsQR, udp_checksum),
302 &nmsg__base__udp_checksum__descriptor,
308 "resolver_address_zeroed",
310 PROTOBUF_C_LABEL_OPTIONAL,
311 PROTOBUF_C_TYPE_BOOL,
312 offsetof(Nmsg__Base__DnsQR, has_resolver_address_zeroed),
313 offsetof(Nmsg__Base__DnsQR, resolver_address_zeroed),
320 static const unsigned nmsg__base__dns_qr__field_indices_by_name[] = {
344 static const ProtobufCIntRange nmsg__base__dns_qr__number_ranges[1 + 1] =
349 const ProtobufCMessageDescriptor nmsg__base__dns_qr__descriptor =
351 PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
356 sizeof(Nmsg__Base__DnsQR),
358 nmsg__base__dns_qr__field_descriptors,
359 nmsg__base__dns_qr__field_indices_by_name,
360 1, nmsg__base__dns_qr__number_ranges,
361 (ProtobufCMessageInit) nmsg__base__dns_qr__init,
364 const ProtobufCEnumValue nmsg__base__dns_qrtype__enum_values_by_number[8] =
366 {
"UDP_INVALID",
"NMSG__BASE__DNS_QRTYPE__UDP_INVALID", 0 },
367 {
"UDP_QUERY_RESPONSE",
"NMSG__BASE__DNS_QRTYPE__UDP_QUERY_RESPONSE", 1 },
368 {
"UDP_UNANSWERED_QUERY",
"NMSG__BASE__DNS_QRTYPE__UDP_UNANSWERED_QUERY", 2 },
369 {
"UDP_UNSOLICITED_RESPONSE",
"NMSG__BASE__DNS_QRTYPE__UDP_UNSOLICITED_RESPONSE", 3 },
370 {
"TCP",
"NMSG__BASE__DNS_QRTYPE__TCP", 4 },
371 {
"ICMP",
"NMSG__BASE__DNS_QRTYPE__ICMP", 5 },
372 {
"UDP_QUERY_ONLY",
"NMSG__BASE__DNS_QRTYPE__UDP_QUERY_ONLY", 6 },
373 {
"UDP_RESPONSE_ONLY",
"NMSG__BASE__DNS_QRTYPE__UDP_RESPONSE_ONLY", 7 },
375 static const ProtobufCIntRange nmsg__base__dns_qrtype__value_ranges[] = {
378 const ProtobufCEnumValueIndex nmsg__base__dns_qrtype__enum_values_by_name[8] =
382 {
"UDP_INVALID", 0 },
383 {
"UDP_QUERY_ONLY", 6 },
384 {
"UDP_QUERY_RESPONSE", 1 },
385 {
"UDP_RESPONSE_ONLY", 7 },
386 {
"UDP_UNANSWERED_QUERY", 2 },
387 {
"UDP_UNSOLICITED_RESPONSE", 3 },
389 const ProtobufCEnumDescriptor nmsg__base__dns_qrtype__descriptor =
391 PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
392 "nmsg.base.DnsQRType",
394 "Nmsg__Base__DnsQRType",
397 nmsg__base__dns_qrtype__enum_values_by_number,
399 nmsg__base__dns_qrtype__enum_values_by_name,
401 nmsg__base__dns_qrtype__value_ranges,
404 const ProtobufCEnumValue nmsg__base__udp_checksum__enum_values_by_number[4] =
406 {
"ERROR",
"NMSG__BASE__UDP_CHECKSUM__ERROR", 0 },
407 {
"ABSENT",
"NMSG__BASE__UDP_CHECKSUM__ABSENT", 1 },
408 {
"INCORRECT",
"NMSG__BASE__UDP_CHECKSUM__INCORRECT", 2 },
409 {
"CORRECT",
"NMSG__BASE__UDP_CHECKSUM__CORRECT", 3 },
411 static const ProtobufCIntRange nmsg__base__udp_checksum__value_ranges[] = {
414 const ProtobufCEnumValueIndex nmsg__base__udp_checksum__enum_values_by_name[4] =
421 const ProtobufCEnumDescriptor nmsg__base__udp_checksum__descriptor =
423 PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
424 "nmsg.base.UdpChecksum",
426 "Nmsg__Base__UdpChecksum",
429 nmsg__base__udp_checksum__enum_values_by_number,
431 nmsg__base__udp_checksum__enum_values_by_name,
433 nmsg__base__udp_checksum__value_ranges,