4 #ifndef PROTOBUF_C_nmsg_2fbase_2fdnstap_2eproto__INCLUDED
5 #define PROTOBUF_C_nmsg_2fbase_2fdnstap_2eproto__INCLUDED
7 #include <protobuf-c/protobuf-c.h>
9 PROTOBUF_C__BEGIN_DECLS
11 #if PROTOBUF_C_VERSION_NUMBER < 1000000
12 # error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers.
13 #elif 1000001 < PROTOBUF_C_MIN_COMPILER_VERSION
14 # error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c.
18 typedef struct _Dnstap__Dnstap Dnstap__Dnstap;
19 typedef struct _Dnstap__Message Dnstap__Message;
24 typedef enum _Dnstap__Dnstap__Type {
25 DNSTAP__DNSTAP__TYPE__MESSAGE = 1
26 PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(DNSTAP__DNSTAP__TYPE)
27 } Dnstap__Dnstap__Type;
28 typedef enum _Dnstap__Message__Type {
29 DNSTAP__MESSAGE__TYPE__AUTH_QUERY = 1,
30 DNSTAP__MESSAGE__TYPE__AUTH_RESPONSE = 2,
31 DNSTAP__MESSAGE__TYPE__RESOLVER_QUERY = 3,
32 DNSTAP__MESSAGE__TYPE__RESOLVER_RESPONSE = 4,
33 DNSTAP__MESSAGE__TYPE__CLIENT_QUERY = 5,
34 DNSTAP__MESSAGE__TYPE__CLIENT_RESPONSE = 6,
35 DNSTAP__MESSAGE__TYPE__FORWARDER_QUERY = 7,
36 DNSTAP__MESSAGE__TYPE__FORWARDER_RESPONSE = 8,
37 DNSTAP__MESSAGE__TYPE__STUB_QUERY = 9,
38 DNSTAP__MESSAGE__TYPE__STUB_RESPONSE = 10,
39 DNSTAP__MESSAGE__TYPE__TOOL_QUERY = 11,
40 DNSTAP__MESSAGE__TYPE__TOOL_RESPONSE = 12
41 PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(DNSTAP__MESSAGE__TYPE)
42 } Dnstap__Message__Type;
43 typedef enum _Dnstap__SocketFamily {
44 DNSTAP__SOCKET_FAMILY__INET = 1,
45 DNSTAP__SOCKET_FAMILY__INET6 = 2
46 PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(DNSTAP__SOCKET_FAMILY)
47 } Dnstap__SocketFamily;
48 typedef enum _Dnstap__SocketProtocol {
49 DNSTAP__SOCKET_PROTOCOL__UDP = 1,
50 DNSTAP__SOCKET_PROTOCOL__TCP = 2
51 PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(DNSTAP__SOCKET_PROTOCOL)
52 } Dnstap__SocketProtocol;
56 struct _Dnstap__Dnstap
58 ProtobufCMessage base;
59 protobuf_c_boolean has_identity;
60 ProtobufCBinaryData identity;
61 protobuf_c_boolean has_version;
62 ProtobufCBinaryData version;
63 protobuf_c_boolean has_extra;
64 ProtobufCBinaryData extra;
65 Dnstap__Dnstap__Type type;
66 Dnstap__Message *message;
68 #define DNSTAP__DNSTAP__INIT \
69 { PROTOBUF_C_MESSAGE_INIT (&dnstap__dnstap__descriptor) \
70 , 0,{0,NULL}, 0,{0,NULL}, 0,{0,NULL}, 0, NULL }
73 struct _Dnstap__Message
75 ProtobufCMessage base;
76 Dnstap__Message__Type type;
77 protobuf_c_boolean has_socket_family;
78 Dnstap__SocketFamily socket_family;
79 protobuf_c_boolean has_socket_protocol;
80 Dnstap__SocketProtocol socket_protocol;
81 protobuf_c_boolean has_query_address;
82 ProtobufCBinaryData query_address;
83 protobuf_c_boolean has_response_address;
84 ProtobufCBinaryData response_address;
85 protobuf_c_boolean has_query_port;
87 protobuf_c_boolean has_response_port;
88 uint32_t response_port;
89 protobuf_c_boolean has_query_time_sec;
90 uint64_t query_time_sec;
91 protobuf_c_boolean has_query_time_nsec;
92 uint32_t query_time_nsec;
93 protobuf_c_boolean has_query_message;
94 ProtobufCBinaryData query_message;
95 protobuf_c_boolean has_query_zone;
96 ProtobufCBinaryData query_zone;
97 protobuf_c_boolean has_response_time_sec;
98 uint64_t response_time_sec;
99 protobuf_c_boolean has_response_time_nsec;
100 uint32_t response_time_nsec;
101 protobuf_c_boolean has_response_message;
102 ProtobufCBinaryData response_message;
104 #define DNSTAP__MESSAGE__INIT \
105 { PROTOBUF_C_MESSAGE_INIT (&dnstap__message__descriptor) \
106 , 0, 0,0, 0,0, 0,{0,NULL}, 0,{0,NULL}, 0,0, 0,0, 0,0, 0,0, 0,{0,NULL}, 0,{0,NULL}, 0,0, 0,0, 0,{0,NULL} }
110 void dnstap__dnstap__init
111 (Dnstap__Dnstap *message);
112 size_t dnstap__dnstap__get_packed_size
113 (
const Dnstap__Dnstap *message);
114 size_t dnstap__dnstap__pack
115 (
const Dnstap__Dnstap *message,
117 size_t dnstap__dnstap__pack_to_buffer
118 (
const Dnstap__Dnstap *message,
119 ProtobufCBuffer *buffer);
121 dnstap__dnstap__unpack
122 (ProtobufCAllocator *allocator,
124 const uint8_t *data);
125 void dnstap__dnstap__free_unpacked
126 (Dnstap__Dnstap *message,
127 ProtobufCAllocator *allocator);
129 void dnstap__message__init
130 (Dnstap__Message *message);
131 size_t dnstap__message__get_packed_size
132 (
const Dnstap__Message *message);
133 size_t dnstap__message__pack
134 (
const Dnstap__Message *message,
136 size_t dnstap__message__pack_to_buffer
137 (
const Dnstap__Message *message,
138 ProtobufCBuffer *buffer);
140 dnstap__message__unpack
141 (ProtobufCAllocator *allocator,
143 const uint8_t *data);
144 void dnstap__message__free_unpacked
145 (Dnstap__Message *message,
146 ProtobufCAllocator *allocator);
149 typedef void (*Dnstap__Dnstap_Closure)
150 (
const Dnstap__Dnstap *message,
152 typedef void (*Dnstap__Message_Closure)
153 (
const Dnstap__Message *message,
161 extern const ProtobufCEnumDescriptor dnstap__socket_family__descriptor;
162 extern const ProtobufCEnumDescriptor dnstap__socket_protocol__descriptor;
163 extern const ProtobufCMessageDescriptor dnstap__dnstap__descriptor;
164 extern const ProtobufCEnumDescriptor dnstap__dnstap__type__descriptor;
165 extern const ProtobufCMessageDescriptor dnstap__message__descriptor;
166 extern const ProtobufCEnumDescriptor dnstap__message__type__descriptor;
168 PROTOBUF_C__END_DECLS