nmsg  0.13.2
dnstap.pb-c.h
1 /* Generated by the protocol buffer compiler. DO NOT EDIT! */
2 /* Generated from: nmsg/base/dnstap.proto */
3 
4 #ifndef PROTOBUF_C_nmsg_2fbase_2fdnstap_2eproto__INCLUDED
5 #define PROTOBUF_C_nmsg_2fbase_2fdnstap_2eproto__INCLUDED
6 
7 #include <protobuf-c/protobuf-c.h>
8 
9 PROTOBUF_C__BEGIN_DECLS
10 
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.
15 #endif
16 
17 
18 typedef struct _Dnstap__Dnstap Dnstap__Dnstap;
19 typedef struct _Dnstap__Message Dnstap__Message;
20 
21 
22 /* --- enums --- */
23 
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;
53 
54 /* --- messages --- */
55 
56 struct _Dnstap__Dnstap
57 {
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;
67 };
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 }
71 
72 
73 struct _Dnstap__Message
74 {
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;
86  uint32_t 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;
103 };
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} }
107 
108 
109 /* Dnstap__Dnstap methods */
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,
116  uint8_t *out);
117 size_t dnstap__dnstap__pack_to_buffer
118  (const Dnstap__Dnstap *message,
119  ProtobufCBuffer *buffer);
120 Dnstap__Dnstap *
121  dnstap__dnstap__unpack
122  (ProtobufCAllocator *allocator,
123  size_t len,
124  const uint8_t *data);
125 void dnstap__dnstap__free_unpacked
126  (Dnstap__Dnstap *message,
127  ProtobufCAllocator *allocator);
128 /* Dnstap__Message methods */
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,
135  uint8_t *out);
136 size_t dnstap__message__pack_to_buffer
137  (const Dnstap__Message *message,
138  ProtobufCBuffer *buffer);
139 Dnstap__Message *
140  dnstap__message__unpack
141  (ProtobufCAllocator *allocator,
142  size_t len,
143  const uint8_t *data);
144 void dnstap__message__free_unpacked
145  (Dnstap__Message *message,
146  ProtobufCAllocator *allocator);
147 /* --- per-message closures --- */
148 
149 typedef void (*Dnstap__Dnstap_Closure)
150  (const Dnstap__Dnstap *message,
151  void *closure_data);
152 typedef void (*Dnstap__Message_Closure)
153  (const Dnstap__Message *message,
154  void *closure_data);
155 
156 /* --- services --- */
157 
158 
159 /* --- descriptors --- */
160 
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;
167 
168 PROTOBUF_C__END_DECLS
169 
170 
171 #endif /* PROTOBUF_C_nmsg_2fbase_2fdnstap_2eproto__INCLUDED */