Package list golang-github-dnstap-golang-dnstap / fresh-releases/main
New upstream release. Debian Janitor 4 months ago
13 changed file(s) with 654 addition(s) and 251 deletion(s). Raw diff Collapse all Expand all
1717
1818 import (
1919 framestream "github.com/farsightsec/golang-framestream"
20 "github.com/golang/protobuf/proto"
20 "google.golang.org/protobuf/proto"
2121 )
2222
2323 // A Decoder reads and parses Dnstap messages from an io.Reader
1616 package dnstap
1717
1818 import (
19 "github.com/golang/protobuf/proto"
19 "google.golang.org/protobuf/proto"
2020 )
2121
2222 // An Encoder serializes and writes Dnstap messages to an underlying
5757 Message_RESOLVER_QUERY,
5858 Message_AUTH_QUERY,
5959 Message_FORWARDER_QUERY,
60 Message_TOOL_QUERY:
60 Message_TOOL_QUERY,
61 Message_UPDATE_QUERY:
6162 isQuery = true
6263 case Message_CLIENT_RESPONSE,
6364 Message_RESOLVER_RESPONSE,
6465 Message_AUTH_RESPONSE,
6566 Message_FORWARDER_RESPONSE,
66 Message_TOOL_RESPONSE:
67 Message_TOOL_RESPONSE,
68 Message_UPDATE_RESPONSE:
6769 isQuery = false
6870 default:
6971 s.WriteString("[unhandled Message.Type]\n")
107109 Message_TOOL_RESPONSE:
108110 {
109111 s.WriteString("T")
112 }
113 case Message_UPDATE_QUERY,
114 Message_UPDATE_RESPONSE:
115 {
116 s.WriteString("U")
110117 }
111118 }
112119
2020 "io"
2121 "os"
2222
23 "github.com/golang/protobuf/proto"
23 "google.golang.org/protobuf/proto"
2424 )
2525
2626 // A TextFormatFunc renders a dnstap message into a human readable format.
0 golang-github-dnstap-golang-dnstap (0.4.0-1) UNRELEASED; urgency=low
1
2 * New upstream release.
3
4 -- Debian Janitor <janitor@jelmer.uk> Sat, 05 Jun 2021 06:23:16 -0000
5
06 golang-github-dnstap-golang-dnstap (0.3.0-1) unstable; urgency=medium
17
28 * New upstream release.
1212 * See the License for the specific language governing permissions and
1313 * limitations under the License.
1414 */
15
16 //go:generate ./genproto.sh
1517
1618 package dnstap
1719
+0
-5
dnstap.pb/README less more
0 dnstap: flexible, structured event replication format for DNS software
1 ----------------------------------------------------------------------
2
3 This directory contains only the protobuf schemas for dnstap, and is the root of
4 a repository named "dnstap.pb".
0 # dnstap: flexible, structured event replication format for DNS software
1
2 This directory contains only the protobuf schemas for [dnstap](http://dnstap.info/), and is the root of
3 a repository named "dnstap.pb".
4
5 See the following repositories/links for implementations:
6 - [golang-dnstap](https://github.com/dnstap/golang-dnstap): command-line tool and Golang package
7
8 # Community
9
10 There is a [mailing list](http://lists.redbarn.org/mailman/listinfo/dnstap) for everyone interested in discussing `dnstap`.
1313 //
1414 // <http://creativecommons.org/publicdomain/zero/1.0/>.
1515
16 syntax = "proto2";
1617 package dnstap;
18 option go_package = "github.com/dnstap/golang-dnstap;dnstap";
1719
1820 // "Dnstap": this is the top-level dnstap type, which is a "union" type that
1921 // contains other kinds of dnstap payloads, although currently only one type
5456 INET6 = 2; // IPv6 (RFC 2460)
5557 }
5658
57 // SocketProtocol: the transport protocol of a socket. This specifies how to
58 // interpret "transport port" fields.
59 // SocketProtocol: the protocol used to transport a DNS message.
5960 enum SocketProtocol {
60 UDP = 1; // User Datagram Protocol (RFC 768)
61 TCP = 2; // Transmission Control Protocol (RFC 793)
61 UDP = 1; // DNS over UDP transport (RFC 1035 section 4.2.1)
62 TCP = 2; // DNS over TCP transport (RFC 1035 section 4.2.2)
63 DOT = 3; // DNS over TLS (RFC 7858)
64 DOH = 4; // DNS over HTTPS (RFC 8484)
6265 }
6366
6467 // Message: a wire-format (RFC 1035 section 4) DNS message and associated
104107
105108 enum Type {
106109 // AUTH_QUERY is a DNS query message received from a resolver by an
107 // authoritative name server, from the perspective of the authorative
110 // authoritative name server, from the perspective of the authoritative
108111 // name server.
109112 AUTH_QUERY = 1;
110113
164167 // TOOL_RESPONSE is a DNS response message received by a DNS software
165168 // tool from a DNS server, from the perspective of the tool.
166169 TOOL_RESPONSE = 12;
170
171 // UPDATE_QUERY is a DNS update query message received from a resolver
172 // by an authoritative name server, from the perspective of the
173 // authoritative name server.
174 UPDATE_QUERY = 13;
175
176 // UPDATE_RESPONSE is a DNS update response message sent from an
177 // authoritative name server to a resolver, from the perspective of the
178 // authoritative name server.
179 UPDATE_RESPONSE = 14;
167180 }
168181
169182 // One of the Type values described above.
0 // Code generated by protoc-gen-go.
0 // dnstap: flexible, structured event replication format for DNS software
1 //
2 // This file contains the protobuf schemas for the "dnstap" structured event
3 // replication format for DNS software.
4
5 // Written in 2013-2014 by Farsight Security, Inc.
6 //
7 // To the extent possible under law, the author(s) have dedicated all
8 // copyright and related and neighboring rights to this file to the public
9 // domain worldwide. This file is distributed without any warranty.
10 //
11 // You should have received a copy of the CC0 Public Domain Dedication along
12 // with this file. If not, see:
13 //
14 // <http://creativecommons.org/publicdomain/zero/1.0/>.
15
16 // Code generated by protoc-gen-go. DO NOT EDIT.
17 // versions:
18 // protoc-gen-go v1.25.0-devel
19 // protoc (unknown)
120 // source: dnstap.proto
2 // DO NOT EDIT!
3
4 /*
5 Package dnstap is a generated protocol buffer package.
6
7 It is generated from these files:
8 dnstap.proto
9
10 It has these top-level messages:
11 Dnstap
12 Message
13 */
21
1422 package dnstap
1523
16 import proto "github.com/golang/protobuf/proto"
17 import json "encoding/json"
18 import math "math"
19
20 // Reference proto, json, and math imports to suppress error if they are not otherwise used.
21 var _ = proto.Marshal
22 var _ = &json.SyntaxError{}
23 var _ = math.Inf
24 import (
25 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
26 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
27 reflect "reflect"
28 sync "sync"
29 )
30
31 const (
32 // Verify that this generated code is sufficiently up-to-date.
33 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
34 // Verify that runtime/protoimpl is sufficiently up-to-date.
35 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
36 )
2437
2538 // SocketFamily: the network protocol family of a socket. This specifies how
2639 // to interpret "network address" fields.
2740 type SocketFamily int32
2841
2942 const (
30 SocketFamily_INET SocketFamily = 1
31 SocketFamily_INET6 SocketFamily = 2
32 )
33
34 var SocketFamily_name = map[int32]string{
35 1: "INET",
36 2: "INET6",
37 }
38 var SocketFamily_value = map[string]int32{
39 "INET": 1,
40 "INET6": 2,
41 }
43 SocketFamily_INET SocketFamily = 1 // IPv4 (RFC 791)
44 SocketFamily_INET6 SocketFamily = 2 // IPv6 (RFC 2460)
45 )
46
47 // Enum value maps for SocketFamily.
48 var (
49 SocketFamily_name = map[int32]string{
50 1: "INET",
51 2: "INET6",
52 }
53 SocketFamily_value = map[string]int32{
54 "INET": 1,
55 "INET6": 2,
56 }
57 )
4258
4359 func (x SocketFamily) Enum() *SocketFamily {
4460 p := new(SocketFamily)
4561 *p = x
4662 return p
4763 }
64
4865 func (x SocketFamily) String() string {
49 return proto.EnumName(SocketFamily_name, int32(x))
50 }
51 func (x *SocketFamily) UnmarshalJSON(data []byte) error {
52 value, err := proto.UnmarshalJSONEnum(SocketFamily_value, data, "SocketFamily")
66 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
67 }
68
69 func (SocketFamily) Descriptor() protoreflect.EnumDescriptor {
70 return file_dnstap_proto_enumTypes[0].Descriptor()
71 }
72
73 func (SocketFamily) Type() protoreflect.EnumType {
74 return &file_dnstap_proto_enumTypes[0]
75 }
76
77 func (x SocketFamily) Number() protoreflect.EnumNumber {
78 return protoreflect.EnumNumber(x)
79 }
80
81 // Deprecated: Do not use.
82 func (x *SocketFamily) UnmarshalJSON(b []byte) error {
83 num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
5384 if err != nil {
5485 return err
5586 }
56 *x = SocketFamily(value)
57 return nil
58 }
59
60 // SocketProtocol: the transport protocol of a socket. This specifies how to
61 // interpret "transport port" fields.
87 *x = SocketFamily(num)
88 return nil
89 }
90
91 // Deprecated: Use SocketFamily.Descriptor instead.
92 func (SocketFamily) EnumDescriptor() ([]byte, []int) {
93 return file_dnstap_proto_rawDescGZIP(), []int{0}
94 }
95
96 // SocketProtocol: the protocol used to transport a DNS message.
6297 type SocketProtocol int32
6398
6499 const (
65 SocketProtocol_UDP SocketProtocol = 1
66 SocketProtocol_TCP SocketProtocol = 2
67 )
68
69 var SocketProtocol_name = map[int32]string{
70 1: "UDP",
71 2: "TCP",
72 }
73 var SocketProtocol_value = map[string]int32{
74 "UDP": 1,
75 "TCP": 2,
76 }
100 SocketProtocol_UDP SocketProtocol = 1 // DNS over UDP transport (RFC 1035 section 4.2.1)
101 SocketProtocol_TCP SocketProtocol = 2 // DNS over TCP transport (RFC 1035 section 4.2.2)
102 SocketProtocol_DOT SocketProtocol = 3 // DNS over TLS (RFC 7858)
103 SocketProtocol_DOH SocketProtocol = 4 // DNS over HTTPS (RFC 8484)
104 )
105
106 // Enum value maps for SocketProtocol.
107 var (
108 SocketProtocol_name = map[int32]string{
109 1: "UDP",
110 2: "TCP",
111 3: "DOT",
112 4: "DOH",
113 }
114 SocketProtocol_value = map[string]int32{
115 "UDP": 1,
116 "TCP": 2,
117 "DOT": 3,
118 "DOH": 4,
119 }
120 )
77121
78122 func (x SocketProtocol) Enum() *SocketProtocol {
79123 p := new(SocketProtocol)
80124 *p = x
81125 return p
82126 }
127
83128 func (x SocketProtocol) String() string {
84 return proto.EnumName(SocketProtocol_name, int32(x))
85 }
86 func (x *SocketProtocol) UnmarshalJSON(data []byte) error {
87 value, err := proto.UnmarshalJSONEnum(SocketProtocol_value, data, "SocketProtocol")
129 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
130 }
131
132 func (SocketProtocol) Descriptor() protoreflect.EnumDescriptor {
133 return file_dnstap_proto_enumTypes[1].Descriptor()
134 }
135
136 func (SocketProtocol) Type() protoreflect.EnumType {
137 return &file_dnstap_proto_enumTypes[1]
138 }
139
140 func (x SocketProtocol) Number() protoreflect.EnumNumber {
141 return protoreflect.EnumNumber(x)
142 }
143
144 // Deprecated: Do not use.
145 func (x *SocketProtocol) UnmarshalJSON(b []byte) error {
146 num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
88147 if err != nil {
89148 return err
90149 }
91 *x = SocketProtocol(value)
92 return nil
150 *x = SocketProtocol(num)
151 return nil
152 }
153
154 // Deprecated: Use SocketProtocol.Descriptor instead.
155 func (SocketProtocol) EnumDescriptor() ([]byte, []int) {
156 return file_dnstap_proto_rawDescGZIP(), []int{1}
93157 }
94158
95159 // Identifies which field below is filled in.
99163 Dnstap_MESSAGE Dnstap_Type = 1
100164 )
101165
102 var Dnstap_Type_name = map[int32]string{
103 1: "MESSAGE",
104 }
105 var Dnstap_Type_value = map[string]int32{
106 "MESSAGE": 1,
107 }
166 // Enum value maps for Dnstap_Type.
167 var (
168 Dnstap_Type_name = map[int32]string{
169 1: "MESSAGE",
170 }
171 Dnstap_Type_value = map[string]int32{
172 "MESSAGE": 1,
173 }
174 )
108175
109176 func (x Dnstap_Type) Enum() *Dnstap_Type {
110177 p := new(Dnstap_Type)
111178 *p = x
112179 return p
113180 }
181
114182 func (x Dnstap_Type) String() string {
115 return proto.EnumName(Dnstap_Type_name, int32(x))
116 }
117 func (x *Dnstap_Type) UnmarshalJSON(data []byte) error {
118 value, err := proto.UnmarshalJSONEnum(Dnstap_Type_value, data, "Dnstap_Type")
183 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
184 }
185
186 func (Dnstap_Type) Descriptor() protoreflect.EnumDescriptor {
187 return file_dnstap_proto_enumTypes[2].Descriptor()
188 }
189
190 func (Dnstap_Type) Type() protoreflect.EnumType {
191 return &file_dnstap_proto_enumTypes[2]
192 }
193
194 func (x Dnstap_Type) Number() protoreflect.EnumNumber {
195 return protoreflect.EnumNumber(x)
196 }
197
198 // Deprecated: Do not use.
199 func (x *Dnstap_Type) UnmarshalJSON(b []byte) error {
200 num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
119201 if err != nil {
120202 return err
121203 }
122 *x = Dnstap_Type(value)
123 return nil
204 *x = Dnstap_Type(num)
205 return nil
206 }
207
208 // Deprecated: Use Dnstap_Type.Descriptor instead.
209 func (Dnstap_Type) EnumDescriptor() ([]byte, []int) {
210 return file_dnstap_proto_rawDescGZIP(), []int{0, 0}
124211 }
125212
126213 type Message_Type int32
127214
128215 const (
129216 // AUTH_QUERY is a DNS query message received from a resolver by an
130 // authoritative name server, from the perspective of the authorative
217 // authoritative name server, from the perspective of the authoritative
131218 // name server.
132219 Message_AUTH_QUERY Message_Type = 1
133220 // AUTH_RESPONSE is a DNS response message sent from an authoritative
176263 // TOOL_RESPONSE is a DNS response message received by a DNS software
177264 // tool from a DNS server, from the perspective of the tool.
178265 Message_TOOL_RESPONSE Message_Type = 12
179 )
180
181 var Message_Type_name = map[int32]string{
182 1: "AUTH_QUERY",
183 2: "AUTH_RESPONSE",
184 3: "RESOLVER_QUERY",
185 4: "RESOLVER_RESPONSE",
186 5: "CLIENT_QUERY",
187 6: "CLIENT_RESPONSE",
188 7: "FORWARDER_QUERY",
189 8: "FORWARDER_RESPONSE",
190 9: "STUB_QUERY",
191 10: "STUB_RESPONSE",
192 11: "TOOL_QUERY",
193 12: "TOOL_RESPONSE",
194 }
195 var Message_Type_value = map[string]int32{
196 "AUTH_QUERY": 1,
197 "AUTH_RESPONSE": 2,
198 "RESOLVER_QUERY": 3,
199 "RESOLVER_RESPONSE": 4,
200 "CLIENT_QUERY": 5,
201 "CLIENT_RESPONSE": 6,
202 "FORWARDER_QUERY": 7,
203 "FORWARDER_RESPONSE": 8,
204 "STUB_QUERY": 9,
205 "STUB_RESPONSE": 10,
206 "TOOL_QUERY": 11,
207 "TOOL_RESPONSE": 12,
208 }
266 // UPDATE_QUERY is a DNS update query message received from a resolver
267 // by an authoritative name server, from the perspective of the
268 // authoritative name server.
269 Message_UPDATE_QUERY Message_Type = 13
270 // UPDATE_RESPONSE is a DNS update response message sent from an
271 // authoritative name server to a resolver, from the perspective of the
272 // authoritative name server.
273 Message_UPDATE_RESPONSE Message_Type = 14
274 )
275
276 // Enum value maps for Message_Type.
277 var (
278 Message_Type_name = map[int32]string{
279 1: "AUTH_QUERY",
280 2: "AUTH_RESPONSE",
281 3: "RESOLVER_QUERY",
282 4: "RESOLVER_RESPONSE",
283 5: "CLIENT_QUERY",
284 6: "CLIENT_RESPONSE",
285 7: "FORWARDER_QUERY",
286 8: "FORWARDER_RESPONSE",
287 9: "STUB_QUERY",
288 10: "STUB_RESPONSE",
289 11: "TOOL_QUERY",
290 12: "TOOL_RESPONSE",
291 13: "UPDATE_QUERY",
292 14: "UPDATE_RESPONSE",
293 }
294 Message_Type_value = map[string]int32{
295 "AUTH_QUERY": 1,
296 "AUTH_RESPONSE": 2,
297 "RESOLVER_QUERY": 3,
298 "RESOLVER_RESPONSE": 4,
299 "CLIENT_QUERY": 5,
300 "CLIENT_RESPONSE": 6,
301 "FORWARDER_QUERY": 7,
302 "FORWARDER_RESPONSE": 8,
303 "STUB_QUERY": 9,
304 "STUB_RESPONSE": 10,
305 "TOOL_QUERY": 11,
306 "TOOL_RESPONSE": 12,
307 "UPDATE_QUERY": 13,
308 "UPDATE_RESPONSE": 14,
309 }
310 )
209311
210312 func (x Message_Type) Enum() *Message_Type {
211313 p := new(Message_Type)
212314 *p = x
213315 return p
214316 }
317
215318 func (x Message_Type) String() string {
216 return proto.EnumName(Message_Type_name, int32(x))
217 }
218 func (x *Message_Type) UnmarshalJSON(data []byte) error {
219 value, err := proto.UnmarshalJSONEnum(Message_Type_value, data, "Message_Type")
319 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
320 }
321
322 func (Message_Type) Descriptor() protoreflect.EnumDescriptor {
323 return file_dnstap_proto_enumTypes[3].Descriptor()
324 }
325
326 func (Message_Type) Type() protoreflect.EnumType {
327 return &file_dnstap_proto_enumTypes[3]
328 }
329
330 func (x Message_Type) Number() protoreflect.EnumNumber {
331 return protoreflect.EnumNumber(x)
332 }
333
334 // Deprecated: Do not use.
335 func (x *Message_Type) UnmarshalJSON(b []byte) error {
336 num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
220337 if err != nil {
221338 return err
222339 }
223 *x = Message_Type(value)
224 return nil
340 *x = Message_Type(num)
341 return nil
342 }
343
344 // Deprecated: Use Message_Type.Descriptor instead.
345 func (Message_Type) EnumDescriptor() ([]byte, []int) {
346 return file_dnstap_proto_rawDescGZIP(), []int{1, 0}
225347 }
226348
227349 // "Dnstap": this is the top-level dnstap type, which is a "union" type that
229351 // of dnstap payload is defined.
230352 // See: https://developers.google.com/protocol-buffers/docs/techniques#union
231353 type Dnstap struct {
354 state protoimpl.MessageState
355 sizeCache protoimpl.SizeCache
356 unknownFields protoimpl.UnknownFields
357
232358 // DNS server identity.
233359 // If enabled, this is the identity string of the DNS server which generated
234360 // this message. Typically this would be the same string as returned by an
245371 Extra []byte `protobuf:"bytes,3,opt,name=extra" json:"extra,omitempty"`
246372 Type *Dnstap_Type `protobuf:"varint,15,req,name=type,enum=dnstap.Dnstap_Type" json:"type,omitempty"`
247373 // One of the following will be filled in.
248 Message *Message `protobuf:"bytes,14,opt,name=message" json:"message,omitempty"`
249 XXX_unrecognized []byte `json:"-"`
250 }
251
252 func (m *Dnstap) Reset() { *m = Dnstap{} }
253 func (m *Dnstap) String() string { return proto.CompactTextString(m) }
254 func (*Dnstap) ProtoMessage() {}
255
256 func (m *Dnstap) GetIdentity() []byte {
257 if m != nil {
258 return m.Identity
259 }
260 return nil
261 }
262
263 func (m *Dnstap) GetVersion() []byte {
264 if m != nil {
265 return m.Version
266 }
267 return nil
268 }
269
270 func (m *Dnstap) GetExtra() []byte {
271 if m != nil {
272 return m.Extra
273 }
274 return nil
275 }
276
277 func (m *Dnstap) GetType() Dnstap_Type {
278 if m != nil && m.Type != nil {
279 return *m.Type
374 Message *Message `protobuf:"bytes,14,opt,name=message" json:"message,omitempty"`
375 }
376
377 func (x *Dnstap) Reset() {
378 *x = Dnstap{}
379 if protoimpl.UnsafeEnabled {
380 mi := &file_dnstap_proto_msgTypes[0]
381 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
382 ms.StoreMessageInfo(mi)
383 }
384 }
385
386 func (x *Dnstap) String() string {
387 return protoimpl.X.MessageStringOf(x)
388 }
389
390 func (*Dnstap) ProtoMessage() {}
391
392 func (x *Dnstap) ProtoReflect() protoreflect.Message {
393 mi := &file_dnstap_proto_msgTypes[0]
394 if protoimpl.UnsafeEnabled && x != nil {
395 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
396 if ms.LoadMessageInfo() == nil {
397 ms.StoreMessageInfo(mi)
398 }
399 return ms
400 }
401 return mi.MessageOf(x)
402 }
403
404 // Deprecated: Use Dnstap.ProtoReflect.Descriptor instead.
405 func (*Dnstap) Descriptor() ([]byte, []int) {
406 return file_dnstap_proto_rawDescGZIP(), []int{0}
407 }
408
409 func (x *Dnstap) GetIdentity() []byte {
410 if x != nil {
411 return x.Identity
412 }
413 return nil
414 }
415
416 func (x *Dnstap) GetVersion() []byte {
417 if x != nil {
418 return x.Version
419 }
420 return nil
421 }
422
423 func (x *Dnstap) GetExtra() []byte {
424 if x != nil {
425 return x.Extra
426 }
427 return nil
428 }
429
430 func (x *Dnstap) GetType() Dnstap_Type {
431 if x != nil && x.Type != nil {
432 return *x.Type
280433 }
281434 return Dnstap_MESSAGE
282435 }
283436
284 func (m *Dnstap) GetMessage() *Message {
285 if m != nil {
286 return m.Message
437 func (x *Dnstap) GetMessage() *Message {
438 if x != nil {
439 return x.Message
287440 }
288441 return nil
289442 }
292445 // metadata. Applications generating "Message" payloads should follow
293446 // certain requirements based on the MessageType, see below.
294447 type Message struct {
448 state protoimpl.MessageState
449 sizeCache protoimpl.SizeCache
450 unknownFields protoimpl.UnknownFields
451
295452 // One of the Type values described above.
296453 Type *Message_Type `protobuf:"varint,1,req,name=type,enum=dnstap.Message_Type" json:"type,omitempty"`
297454 // One of the SocketFamily values described above.
298 SocketFamily *SocketFamily `protobuf:"varint,2,opt,name=socket_family,enum=dnstap.SocketFamily" json:"socket_family,omitempty"`
455 SocketFamily *SocketFamily `protobuf:"varint,2,opt,name=socket_family,json=socketFamily,enum=dnstap.SocketFamily" json:"socket_family,omitempty"`
299456 // One of the SocketProtocol values described above.
300 SocketProtocol *SocketProtocol `protobuf:"varint,3,opt,name=socket_protocol,enum=dnstap.SocketProtocol" json:"socket_protocol,omitempty"`
457 SocketProtocol *SocketProtocol `protobuf:"varint,3,opt,name=socket_protocol,json=socketProtocol,enum=dnstap.SocketProtocol" json:"socket_protocol,omitempty"`
301458 // The network address of the message initiator.
302459 // For SocketFamily INET, this field is 4 octets (IPv4 address).
303460 // For SocketFamily INET6, this field is 16 octets (IPv6 address).
304 QueryAddress []byte `protobuf:"bytes,4,opt,name=query_address" json:"query_address,omitempty"`
461 QueryAddress []byte `protobuf:"bytes,4,opt,name=query_address,json=queryAddress" json:"query_address,omitempty"`
305462 // The network address of the message responder.
306463 // For SocketFamily INET, this field is 4 octets (IPv4 address).
307464 // For SocketFamily INET6, this field is 16 octets (IPv6 address).
308 ResponseAddress []byte `protobuf:"bytes,5,opt,name=response_address" json:"response_address,omitempty"`
465 ResponseAddress []byte `protobuf:"bytes,5,opt,name=response_address,json=responseAddress" json:"response_address,omitempty"`
309466 // The transport port of the message initiator.
310467 // This is a 16-bit UDP or TCP port number, depending on SocketProtocol.
311 QueryPort *uint32 `protobuf:"varint,6,opt,name=query_port" json:"query_port,omitempty"`
468 QueryPort *uint32 `protobuf:"varint,6,opt,name=query_port,json=queryPort" json:"query_port,omitempty"`
312469 // The transport port of the message responder.
313470 // This is a 16-bit UDP or TCP port number, depending on SocketProtocol.
314 ResponsePort *uint32 `protobuf:"varint,7,opt,name=response_port" json:"response_port,omitempty"`
471 ResponsePort *uint32 `protobuf:"varint,7,opt,name=response_port,json=responsePort" json:"response_port,omitempty"`
315472 // The time at which the DNS query message was sent or received, depending
316473 // on whether this is an AUTH_QUERY, RESOLVER_QUERY, or CLIENT_QUERY.
317474 // This is the number of seconds since the UNIX epoch.
318 QueryTimeSec *uint64 `protobuf:"varint,8,opt,name=query_time_sec" json:"query_time_sec,omitempty"`
475 QueryTimeSec *uint64 `protobuf:"varint,8,opt,name=query_time_sec,json=queryTimeSec" json:"query_time_sec,omitempty"`
319476 // The time at which the DNS query message was sent or received.
320477 // This is the seconds fraction, expressed as a count of nanoseconds.
321 QueryTimeNsec *uint32 `protobuf:"fixed32,9,opt,name=query_time_nsec" json:"query_time_nsec,omitempty"`
478 QueryTimeNsec *uint32 `protobuf:"fixed32,9,opt,name=query_time_nsec,json=queryTimeNsec" json:"query_time_nsec,omitempty"`
322479 // The initiator's original wire-format DNS query message, verbatim.
323 QueryMessage []byte `protobuf:"bytes,10,opt,name=query_message" json:"query_message,omitempty"`
480 QueryMessage []byte `protobuf:"bytes,10,opt,name=query_message,json=queryMessage" json:"query_message,omitempty"`
324481 // The "zone" or "bailiwick" pertaining to the DNS query message.
325482 // This is a wire-format DNS domain name.
326 QueryZone []byte `protobuf:"bytes,11,opt,name=query_zone" json:"query_zone,omitempty"`
483 QueryZone []byte `protobuf:"bytes,11,opt,name=query_zone,json=queryZone" json:"query_zone,omitempty"`
327484 // The time at which the DNS response message was sent or received,
328485 // depending on whether this is an AUTH_RESPONSE, RESOLVER_RESPONSE, or
329486 // CLIENT_RESPONSE.
330487 // This is the number of seconds since the UNIX epoch.
331 ResponseTimeSec *uint64 `protobuf:"varint,12,opt,name=response_time_sec" json:"response_time_sec,omitempty"`
488 ResponseTimeSec *uint64 `protobuf:"varint,12,opt,name=response_time_sec,json=responseTimeSec" json:"response_time_sec,omitempty"`
332489 // The time at which the DNS response message was sent or received.
333490 // This is the seconds fraction, expressed as a count of nanoseconds.
334 ResponseTimeNsec *uint32 `protobuf:"fixed32,13,opt,name=response_time_nsec" json:"response_time_nsec,omitempty"`
491 ResponseTimeNsec *uint32 `protobuf:"fixed32,13,opt,name=response_time_nsec,json=responseTimeNsec" json:"response_time_nsec,omitempty"`
335492 // The responder's original wire-format DNS response message, verbatim.
336 ResponseMessage []byte `protobuf:"bytes,14,opt,name=response_message" json:"response_message,omitempty"`
337 XXX_unrecognized []byte `json:"-"`
338 }
339
340 func (m *Message) Reset() { *m = Message{} }
341 func (m *Message) String() string { return proto.CompactTextString(m) }
342 func (*Message) ProtoMessage() {}
343
344 func (m *Message) GetType() Message_Type {
345 if m != nil && m.Type != nil {
346 return *m.Type
493 ResponseMessage []byte `protobuf:"bytes,14,opt,name=response_message,json=responseMessage" json:"response_message,omitempty"`
494 }
495
496 func (x *Message) Reset() {
497 *x = Message{}
498 if protoimpl.UnsafeEnabled {
499 mi := &file_dnstap_proto_msgTypes[1]
500 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
501 ms.StoreMessageInfo(mi)
502 }
503 }
504
505 func (x *Message) String() string {
506 return protoimpl.X.MessageStringOf(x)
507 }
508
509 func (*Message) ProtoMessage() {}
510
511 func (x *Message) ProtoReflect() protoreflect.Message {
512 mi := &file_dnstap_proto_msgTypes[1]
513 if protoimpl.UnsafeEnabled && x != nil {
514 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
515 if ms.LoadMessageInfo() == nil {
516 ms.StoreMessageInfo(mi)
517 }
518 return ms
519 }
520 return mi.MessageOf(x)
521 }
522
523 // Deprecated: Use Message.ProtoReflect.Descriptor instead.
524 func (*Message) Descriptor() ([]byte, []int) {
525 return file_dnstap_proto_rawDescGZIP(), []int{1}
526 }
527
528 func (x *Message) GetType() Message_Type {
529 if x != nil && x.Type != nil {
530 return *x.Type
347531 }
348532 return Message_AUTH_QUERY
349533 }
350534
351 func (m *Message) GetSocketFamily() SocketFamily {
352 if m != nil && m.SocketFamily != nil {
353 return *m.SocketFamily
535 func (x *Message) GetSocketFamily() SocketFamily {
536 if x != nil && x.SocketFamily != nil {
537 return *x.SocketFamily
354538 }
355539 return SocketFamily_INET
356540 }
357541
358 func (m *Message) GetSocketProtocol() SocketProtocol {
359 if m != nil && m.SocketProtocol != nil {
360 return *m.SocketProtocol
542 func (x *Message) GetSocketProtocol() SocketProtocol {
543 if x != nil && x.SocketProtocol != nil {
544 return *x.SocketProtocol
361545 }
362546 return SocketProtocol_UDP
363547 }
364548
365 func (m *Message) GetQueryAddress() []byte {
366 if m != nil {
367 return m.QueryAddress
368 }
369 return nil
370 }
371
372 func (m *Message) GetResponseAddress() []byte {
373 if m != nil {
374 return m.ResponseAddress
375 }
376 return nil
377 }
378
379 func (m *Message) GetQueryPort() uint32 {
380 if m != nil && m.QueryPort != nil {
381 return *m.QueryPort
549 func (x *Message) GetQueryAddress() []byte {
550 if x != nil {
551 return x.QueryAddress
552 }
553 return nil
554 }
555
556 func (x *Message) GetResponseAddress() []byte {
557 if x != nil {
558 return x.ResponseAddress
559 }
560 return nil
561 }
562
563 func (x *Message) GetQueryPort() uint32 {
564 if x != nil && x.QueryPort != nil {
565 return *x.QueryPort
382566 }
383567 return 0
384568 }
385569
386 func (m *Message) GetResponsePort() uint32 {
387 if m != nil && m.ResponsePort != nil {
388 return *m.ResponsePort
570 func (x *Message) GetResponsePort() uint32 {
571 if x != nil && x.ResponsePort != nil {
572 return *x.ResponsePort
389573 }
390574 return 0
391575 }
392576
393 func (m *Message) GetQueryTimeSec() uint64 {
394 if m != nil && m.QueryTimeSec != nil {
395 return *m.QueryTimeSec
577 func (x *Message) GetQueryTimeSec() uint64 {
578 if x != nil && x.QueryTimeSec != nil {
579 return *x.QueryTimeSec
396580 }
397581 return 0
398582 }
399583
400 func (m *Message) GetQueryTimeNsec() uint32 {
401 if m != nil && m.QueryTimeNsec != nil {
402 return *m.QueryTimeNsec
584 func (x *Message) GetQueryTimeNsec() uint32 {
585 if x != nil && x.QueryTimeNsec != nil {
586 return *x.QueryTimeNsec
403587 }
404588 return 0
405589 }
406590
407 func (m *Message) GetQueryMessage() []byte {
408 if m != nil {
409 return m.QueryMessage
410 }
411 return nil
412 }
413
414 func (m *Message) GetQueryZone() []byte {
415 if m != nil {
416 return m.QueryZone
417 }
418 return nil
419 }
420
421 func (m *Message) GetResponseTimeSec() uint64 {
422 if m != nil && m.ResponseTimeSec != nil {
423 return *m.ResponseTimeSec
591 func (x *Message) GetQueryMessage() []byte {
592 if x != nil {
593 return x.QueryMessage
594 }
595 return nil
596 }
597
598 func (x *Message) GetQueryZone() []byte {
599 if x != nil {
600 return x.QueryZone
601 }
602 return nil
603 }
604
605 func (x *Message) GetResponseTimeSec() uint64 {
606 if x != nil && x.ResponseTimeSec != nil {
607 return *x.ResponseTimeSec
424608 }
425609 return 0
426610 }
427611
428 func (m *Message) GetResponseTimeNsec() uint32 {
429 if m != nil && m.ResponseTimeNsec != nil {
430 return *m.ResponseTimeNsec
612 func (x *Message) GetResponseTimeNsec() uint32 {
613 if x != nil && x.ResponseTimeNsec != nil {
614 return *x.ResponseTimeNsec
431615 }
432616 return 0
433617 }
434618
435 func (m *Message) GetResponseMessage() []byte {
436 if m != nil {
437 return m.ResponseMessage
438 }
439 return nil
440 }
441
442 func init() {
443 proto.RegisterEnum("dnstap.SocketFamily", SocketFamily_name, SocketFamily_value)
444 proto.RegisterEnum("dnstap.SocketProtocol", SocketProtocol_name, SocketProtocol_value)
445 proto.RegisterEnum("dnstap.Dnstap_Type", Dnstap_Type_name, Dnstap_Type_value)
446 proto.RegisterEnum("dnstap.Message_Type", Message_Type_name, Message_Type_value)
447 }
619 func (x *Message) GetResponseMessage() []byte {
620 if x != nil {
621 return x.ResponseMessage
622 }
623 return nil
624 }
625
626 var File_dnstap_proto protoreflect.FileDescriptor
627
628 var file_dnstap_proto_rawDesc = []byte{
629 0x0a, 0x0c, 0x64, 0x6e, 0x73, 0x74, 0x61, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06,
630 0x64, 0x6e, 0x73, 0x74, 0x61, 0x70, 0x22, 0xbd, 0x01, 0x0a, 0x06, 0x44, 0x6e, 0x73, 0x74, 0x61,
631 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20,
632 0x01, 0x28, 0x0c, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x18, 0x0a,
633 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07,
634 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61,
635 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x12, 0x27, 0x0a,
636 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0f, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x64, 0x6e,
637 0x73, 0x74, 0x61, 0x70, 0x2e, 0x44, 0x6e, 0x73, 0x74, 0x61, 0x70, 0x2e, 0x54, 0x79, 0x70, 0x65,
638 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x29, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
639 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x64, 0x6e, 0x73, 0x74, 0x61, 0x70,
640 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
641 0x65, 0x22, 0x13, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x4d, 0x45, 0x53,
642 0x53, 0x41, 0x47, 0x45, 0x10, 0x01, 0x22, 0xf2, 0x06, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61,
643 0x67, 0x65, 0x12, 0x28, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e,
644 0x32, 0x14, 0x2e, 0x64, 0x6e, 0x73, 0x74, 0x61, 0x70, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
645 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x39, 0x0a, 0x0d,
646 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x18, 0x02, 0x20,
647 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x64, 0x6e, 0x73, 0x74, 0x61, 0x70, 0x2e, 0x53, 0x6f, 0x63,
648 0x6b, 0x65, 0x74, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x52, 0x0c, 0x73, 0x6f, 0x63, 0x6b, 0x65,
649 0x74, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x3f, 0x0a, 0x0f, 0x73, 0x6f, 0x63, 0x6b, 0x65,
650 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e,
651 0x32, 0x16, 0x2e, 0x64, 0x6e, 0x73, 0x74, 0x61, 0x70, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74,
652 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x0e, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74,
653 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x23, 0x0a, 0x0d, 0x71, 0x75, 0x65, 0x72,
654 0x79, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52,
655 0x0c, 0x71, 0x75, 0x65, 0x72, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x29, 0x0a,
656 0x10, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73,
657 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
658 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x72,
659 0x79, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x71, 0x75,
660 0x65, 0x72, 0x79, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f,
661 0x6e, 0x73, 0x65, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c,
662 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x24, 0x0a, 0x0e,
663 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x18, 0x08,
664 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x71, 0x75, 0x65, 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x53,
665 0x65, 0x63, 0x12, 0x26, 0x0a, 0x0f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65,
666 0x5f, 0x6e, 0x73, 0x65, 0x63, 0x18, 0x09, 0x20, 0x01, 0x28, 0x07, 0x52, 0x0d, 0x71, 0x75, 0x65,
667 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x4e, 0x73, 0x65, 0x63, 0x12, 0x23, 0x0a, 0x0d, 0x71, 0x75,
668 0x65, 0x72, 0x79, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28,
669 0x0c, 0x52, 0x0c, 0x71, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12,
670 0x1d, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x0b, 0x20,
671 0x01, 0x28, 0x0c, 0x52, 0x09, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5a, 0x6f, 0x6e, 0x65, 0x12, 0x2a,
672 0x0a, 0x11, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f,
673 0x73, 0x65, 0x63, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f,
674 0x6e, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x63, 0x12, 0x2c, 0x0a, 0x12, 0x72, 0x65,
675 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6e, 0x73, 0x65, 0x63,
676 0x18, 0x0d, 0x20, 0x01, 0x28, 0x07, 0x52, 0x10, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
677 0x54, 0x69, 0x6d, 0x65, 0x4e, 0x73, 0x65, 0x63, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x70,
678 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0e, 0x20, 0x01,
679 0x28, 0x0c, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73,
680 0x61, 0x67, 0x65, 0x22, 0x95, 0x02, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x0a,
681 0x41, 0x55, 0x54, 0x48, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d,
682 0x41, 0x55, 0x54, 0x48, 0x5f, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x10, 0x02, 0x12,
683 0x12, 0x0a, 0x0e, 0x52, 0x45, 0x53, 0x4f, 0x4c, 0x56, 0x45, 0x52, 0x5f, 0x51, 0x55, 0x45, 0x52,
684 0x59, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, 0x53, 0x4f, 0x4c, 0x56, 0x45, 0x52, 0x5f,
685 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x0c, 0x43, 0x4c,
686 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x10, 0x05, 0x12, 0x13, 0x0a, 0x0f,
687 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x10,
688 0x06, 0x12, 0x13, 0x0a, 0x0f, 0x46, 0x4f, 0x52, 0x57, 0x41, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x51,
689 0x55, 0x45, 0x52, 0x59, 0x10, 0x07, 0x12, 0x16, 0x0a, 0x12, 0x46, 0x4f, 0x52, 0x57, 0x41, 0x52,
690 0x44, 0x45, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x10, 0x08, 0x12, 0x0e,
691 0x0a, 0x0a, 0x53, 0x54, 0x55, 0x42, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x10, 0x09, 0x12, 0x11,
692 0x0a, 0x0d, 0x53, 0x54, 0x55, 0x42, 0x5f, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x10,
693 0x0a, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x4f, 0x4f, 0x4c, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x10,
694 0x0b, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x4f, 0x4f, 0x4c, 0x5f, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e,
695 0x53, 0x45, 0x10, 0x0c, 0x12, 0x10, 0x0a, 0x0c, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x51,
696 0x55, 0x45, 0x52, 0x59, 0x10, 0x0d, 0x12, 0x13, 0x0a, 0x0f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45,
697 0x5f, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x10, 0x0e, 0x2a, 0x23, 0x0a, 0x0c, 0x53,
698 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x08, 0x0a, 0x04, 0x49,
699 0x4e, 0x45, 0x54, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x4e, 0x45, 0x54, 0x36, 0x10, 0x02,
700 0x2a, 0x34, 0x0a, 0x0e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63,
701 0x6f, 0x6c, 0x12, 0x07, 0x0a, 0x03, 0x55, 0x44, 0x50, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x54,
702 0x43, 0x50, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x4f, 0x54, 0x10, 0x03, 0x12, 0x07, 0x0a,
703 0x03, 0x44, 0x4f, 0x48, 0x10, 0x04, 0x42, 0x28, 0x5a, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
704 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x6e, 0x73, 0x74, 0x61, 0x70, 0x2f, 0x67, 0x6f, 0x6c, 0x61,
705 0x6e, 0x67, 0x2d, 0x64, 0x6e, 0x73, 0x74, 0x61, 0x70, 0x3b, 0x64, 0x6e, 0x73, 0x74, 0x61, 0x70,
706 }
707
708 var (
709 file_dnstap_proto_rawDescOnce sync.Once
710 file_dnstap_proto_rawDescData = file_dnstap_proto_rawDesc
711 )
712
713 func file_dnstap_proto_rawDescGZIP() []byte {
714 file_dnstap_proto_rawDescOnce.Do(func() {
715 file_dnstap_proto_rawDescData = protoimpl.X.CompressGZIP(file_dnstap_proto_rawDescData)
716 })
717 return file_dnstap_proto_rawDescData
718 }
719
720 var file_dnstap_proto_enumTypes = make([]protoimpl.EnumInfo, 4)
721 var file_dnstap_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
722 var file_dnstap_proto_goTypes = []interface{}{
723 (SocketFamily)(0), // 0: dnstap.SocketFamily
724 (SocketProtocol)(0), // 1: dnstap.SocketProtocol
725 (Dnstap_Type)(0), // 2: dnstap.Dnstap.Type
726 (Message_Type)(0), // 3: dnstap.Message.Type
727 (*Dnstap)(nil), // 4: dnstap.Dnstap
728 (*Message)(nil), // 5: dnstap.Message
729 }
730 var file_dnstap_proto_depIdxs = []int32{
731 2, // 0: dnstap.Dnstap.type:type_name -> dnstap.Dnstap.Type
732 5, // 1: dnstap.Dnstap.message:type_name -> dnstap.Message
733 3, // 2: dnstap.Message.type:type_name -> dnstap.Message.Type
734 0, // 3: dnstap.Message.socket_family:type_name -> dnstap.SocketFamily
735 1, // 4: dnstap.Message.socket_protocol:type_name -> dnstap.SocketProtocol
736 5, // [5:5] is the sub-list for method output_type
737 5, // [5:5] is the sub-list for method input_type
738 5, // [5:5] is the sub-list for extension type_name
739 5, // [5:5] is the sub-list for extension extendee
740 0, // [0:5] is the sub-list for field type_name
741 }
742
743 func init() { file_dnstap_proto_init() }
744 func file_dnstap_proto_init() {
745 if File_dnstap_proto != nil {
746 return
747 }
748 if !protoimpl.UnsafeEnabled {
749 file_dnstap_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
750 switch v := v.(*Dnstap); i {
751 case 0:
752 return &v.state
753 case 1:
754 return &v.sizeCache
755 case 2:
756 return &v.unknownFields
757 default:
758 return nil
759 }
760 }
761 file_dnstap_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
762 switch v := v.(*Message); i {
763 case 0:
764 return &v.state
765 case 1:
766 return &v.sizeCache
767 case 2:
768 return &v.unknownFields
769 default:
770 return nil
771 }
772 }
773 }
774 type x struct{}
775 out := protoimpl.TypeBuilder{
776 File: protoimpl.DescBuilder{
777 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
778 RawDescriptor: file_dnstap_proto_rawDesc,
779 NumEnums: 4,
780 NumMessages: 2,
781 NumExtensions: 0,
782 NumServices: 0,
783 },
784 GoTypes: file_dnstap_proto_goTypes,
785 DependencyIndexes: file_dnstap_proto_depIdxs,
786 EnumInfos: file_dnstap_proto_enumTypes,
787 MessageInfos: file_dnstap_proto_msgTypes,
788 }.Build()
789 File_dnstap_proto = out.File
790 file_dnstap_proto_rawDesc = nil
791 file_dnstap_proto_goTypes = nil
792 file_dnstap_proto_depIdxs = nil
793 }
0 #!/bin/sh
1
2 go_package() {
3 local file pkg line script
4 file=$1; shift
5 pkg=$1; shift
6
7 line="option go_package = \"$pkg\";"
8 grep "^$line\$" $file > /dev/null && return
9
10 script="/^package dnstap/|a|$line|.|w|q|"
11 if grep "^option go_package" $file > /dev/null; then
12 script="/^option go_package/d|1|${script}"
13 fi
14
15 echo "$script" | tr '|' '\n' | ed $file || exit
16 }
17
18 dir=$(dirname $0)
19 [ -n "$dir" ] && cd $dir
20
21 cd dnstap.pb
22
23 go_package dnstap.proto "github.com/dnstap/golang-dnstap;dnstap"
24 protoc --go_out=../../../.. dnstap.proto
11
22 require (
33 github.com/farsightsec/golang-framestream v0.3.0
4 github.com/golang/protobuf v1.4.2
54 github.com/miekg/dns v1.1.31
5 google.golang.org/protobuf v1.23.0
66 )
44 github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
55 github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
66 github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
7 github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0=
8 github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
97 github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
108 github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
119 github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4=