5 #ifndef PROTOBUF_C__NO_DEPRECATED
6 #define PROTOBUF_C__NO_DEPRECATED
9 #include "nmsg/base/dns.pb-c.h"
10 void nmsg__base__dns__init
11 (Nmsg__Base__Dns *message)
13 static Nmsg__Base__Dns init_value = NMSG__BASE__DNS__INIT;
14 *message = init_value;
16 size_t nmsg__base__dns__get_packed_size
17 (
const Nmsg__Base__Dns *message)
19 assert(message->base.descriptor == &nmsg__base__dns__descriptor);
20 return protobuf_c_message_get_packed_size ((
const ProtobufCMessage*)(message));
22 size_t nmsg__base__dns__pack
23 (
const Nmsg__Base__Dns *message,
26 assert(message->base.descriptor == &nmsg__base__dns__descriptor);
27 return protobuf_c_message_pack ((
const ProtobufCMessage*)message, out);
29 size_t nmsg__base__dns__pack_to_buffer
30 (
const Nmsg__Base__Dns *message,
31 ProtobufCBuffer *buffer)
33 assert(message->base.descriptor == &nmsg__base__dns__descriptor);
34 return protobuf_c_message_pack_to_buffer ((
const ProtobufCMessage*)message, buffer);
37 nmsg__base__dns__unpack
38 (ProtobufCAllocator *allocator,
42 return (Nmsg__Base__Dns *)
43 protobuf_c_message_unpack (&nmsg__base__dns__descriptor,
44 allocator, len, data);
46 void nmsg__base__dns__free_unpacked
47 (Nmsg__Base__Dns *message,
48 ProtobufCAllocator *allocator)
50 assert(message->base.descriptor == &nmsg__base__dns__descriptor);
51 protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
53 static const ProtobufCFieldDescriptor nmsg__base__dns__field_descriptors[9] =
58 PROTOBUF_C_LABEL_OPTIONAL,
59 PROTOBUF_C_TYPE_BYTES,
60 offsetof(Nmsg__Base__Dns, has_rrname),
61 offsetof(Nmsg__Base__Dns, rrname),
70 PROTOBUF_C_LABEL_OPTIONAL,
71 PROTOBUF_C_TYPE_UINT32,
72 offsetof(Nmsg__Base__Dns, has_rrtype),
73 offsetof(Nmsg__Base__Dns, rrtype),
82 PROTOBUF_C_LABEL_OPTIONAL,
83 PROTOBUF_C_TYPE_UINT32,
84 offsetof(Nmsg__Base__Dns, has_rrclass),
85 offsetof(Nmsg__Base__Dns, rrclass),
94 PROTOBUF_C_LABEL_OPTIONAL,
95 PROTOBUF_C_TYPE_UINT32,
96 offsetof(Nmsg__Base__Dns, has_rrttl),
97 offsetof(Nmsg__Base__Dns, rrttl),
106 PROTOBUF_C_LABEL_REPEATED,
107 PROTOBUF_C_TYPE_BYTES,
108 offsetof(Nmsg__Base__Dns, n_rdata),
109 offsetof(Nmsg__Base__Dns, rdata),
118 PROTOBUF_C_LABEL_OPTIONAL,
119 PROTOBUF_C_TYPE_UINT32,
120 offsetof(Nmsg__Base__Dns, has_section),
121 offsetof(Nmsg__Base__Dns, section),
130 PROTOBUF_C_LABEL_OPTIONAL,
131 PROTOBUF_C_TYPE_BYTES,
132 offsetof(Nmsg__Base__Dns, has_qname),
133 offsetof(Nmsg__Base__Dns, qname),
142 PROTOBUF_C_LABEL_OPTIONAL,
143 PROTOBUF_C_TYPE_UINT32,
144 offsetof(Nmsg__Base__Dns, has_qtype),
145 offsetof(Nmsg__Base__Dns, qtype),
154 PROTOBUF_C_LABEL_OPTIONAL,
155 PROTOBUF_C_TYPE_UINT32,
156 offsetof(Nmsg__Base__Dns, has_qclass),
157 offsetof(Nmsg__Base__Dns, qclass),
164 static const unsigned nmsg__base__dns__field_indices_by_name[] = {
175 static const ProtobufCIntRange nmsg__base__dns__number_ranges[1 + 1] =
180 const ProtobufCMessageDescriptor nmsg__base__dns__descriptor =
182 PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
187 sizeof(Nmsg__Base__Dns),
189 nmsg__base__dns__field_descriptors,
190 nmsg__base__dns__field_indices_by_name,
191 1, nmsg__base__dns__number_ranges,
192 (ProtobufCMessageInit) nmsg__base__dns__init,