diff --git a/Decoder.go b/Decoder.go
index 788f526..a54fa09 100644
--- a/Decoder.go
+++ b/Decoder.go
@@ -18,7 +18,7 @@
import (
framestream "github.com/farsightsec/golang-framestream"
- "github.com/golang/protobuf/proto"
+ "google.golang.org/protobuf/proto"
)
// A Decoder reads and parses Dnstap messages from an io.Reader
diff --git a/Encoder.go b/Encoder.go
index 66eff40..f286674 100644
--- a/Encoder.go
+++ b/Encoder.go
@@ -17,7 +17,7 @@
package dnstap
import (
- "github.com/golang/protobuf/proto"
+ "google.golang.org/protobuf/proto"
)
// An Encoder serializes and writes Dnstap messages to an underlying
diff --git a/QuietTextFormat.go b/QuietTextFormat.go
index 4dc8909..0ef4521 100644
--- a/QuietTextFormat.go
+++ b/QuietTextFormat.go
@@ -58,13 +58,15 @@
Message_RESOLVER_QUERY,
Message_AUTH_QUERY,
Message_FORWARDER_QUERY,
- Message_TOOL_QUERY:
+ Message_TOOL_QUERY,
+ Message_UPDATE_QUERY:
isQuery = true
case Message_CLIENT_RESPONSE,
Message_RESOLVER_RESPONSE,
Message_AUTH_RESPONSE,
Message_FORWARDER_RESPONSE,
- Message_TOOL_RESPONSE:
+ Message_TOOL_RESPONSE,
+ Message_UPDATE_RESPONSE:
isQuery = false
default:
s.WriteString("[unhandled Message.Type]\n")
@@ -108,6 +110,11 @@
Message_TOOL_RESPONSE:
{
s.WriteString("T")
+ }
+ case Message_UPDATE_QUERY,
+ Message_UPDATE_RESPONSE:
+ {
+ s.WriteString("U")
}
}
diff --git a/TextOutput.go b/TextOutput.go
index 9e613e5..6b55c15 100644
--- a/TextOutput.go
+++ b/TextOutput.go
@@ -21,7 +21,7 @@
"io"
"os"
- "github.com/golang/protobuf/proto"
+ "google.golang.org/protobuf/proto"
)
// A TextFormatFunc renders a dnstap message into a human readable format.
diff --git a/dnstap.go b/dnstap.go
index e964ef6..220c77a 100644
--- a/dnstap.go
+++ b/dnstap.go
@@ -13,6 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
+//go:generate ./genproto.sh
package dnstap
diff --git a/dnstap.pb/README b/dnstap.pb/README
deleted file mode 100644
index 7f44551..0000000
--- a/dnstap.pb/README
+++ /dev/null
@@ -1,5 +0,0 @@
-dnstap: flexible, structured event replication format for DNS software
-----------------------------------------------------------------------
-
-This directory contains only the protobuf schemas for dnstap, and is the root of
-a repository named "dnstap.pb".
diff --git a/dnstap.pb/README.md b/dnstap.pb/README.md
new file mode 100644
index 0000000..8de36d1
--- /dev/null
+++ b/dnstap.pb/README.md
@@ -0,0 +1,11 @@
+# dnstap: flexible, structured event replication format for DNS software
+
+This directory contains only the protobuf schemas for [dnstap](http://dnstap.info/), and is the root of
+a repository named "dnstap.pb".
+
+See the following repositories/links for implementations:
+- [golang-dnstap](https://github.com/dnstap/golang-dnstap): command-line tool and Golang package
+
+# Community
+
+There is a [mailing list](http://lists.redbarn.org/mailman/listinfo/dnstap) for everyone interested in discussing `dnstap`.
diff --git a/dnstap.pb/dnstap.proto b/dnstap.pb/dnstap.proto
index 1ed1bb0..7e242e0 100644
--- a/dnstap.pb/dnstap.proto
+++ b/dnstap.pb/dnstap.proto
@@ -14,7 +14,9 @@
//
// .
+syntax = "proto2";
package dnstap;
+option go_package = "github.com/dnstap/golang-dnstap;dnstap";
// "Dnstap": this is the top-level dnstap type, which is a "union" type that
// contains other kinds of dnstap payloads, although currently only one type
@@ -55,11 +57,12 @@
INET6 = 2; // IPv6 (RFC 2460)
}
-// SocketProtocol: the transport protocol of a socket. This specifies how to
-// interpret "transport port" fields.
+// SocketProtocol: the protocol used to transport a DNS message.
enum SocketProtocol {
- UDP = 1; // User Datagram Protocol (RFC 768)
- TCP = 2; // Transmission Control Protocol (RFC 793)
+ UDP = 1; // DNS over UDP transport (RFC 1035 section 4.2.1)
+ TCP = 2; // DNS over TCP transport (RFC 1035 section 4.2.2)
+ DOT = 3; // DNS over TLS (RFC 7858)
+ DOH = 4; // DNS over HTTPS (RFC 8484)
}
// Message: a wire-format (RFC 1035 section 4) DNS message and associated
@@ -105,7 +108,7 @@
enum Type {
// AUTH_QUERY is a DNS query message received from a resolver by an
- // authoritative name server, from the perspective of the authorative
+ // authoritative name server, from the perspective of the authoritative
// name server.
AUTH_QUERY = 1;
@@ -165,6 +168,16 @@
// TOOL_RESPONSE is a DNS response message received by a DNS software
// tool from a DNS server, from the perspective of the tool.
TOOL_RESPONSE = 12;
+
+ // UPDATE_QUERY is a DNS update query message received from a resolver
+ // by an authoritative name server, from the perspective of the
+ // authoritative name server.
+ UPDATE_QUERY = 13;
+
+ // UPDATE_RESPONSE is a DNS update response message sent from an
+ // authoritative name server to a resolver, from the perspective of the
+ // authoritative name server.
+ UPDATE_RESPONSE = 14;
}
// One of the Type values described above.
diff --git a/dnstap.pb.go b/dnstap.pb.go
index 43b5fd1..ce8f591 100644
--- a/dnstap.pb.go
+++ b/dnstap.pb.go
@@ -1,96 +1,160 @@
-// Code generated by protoc-gen-go.
+// dnstap: flexible, structured event replication format for DNS software
+//
+// This file contains the protobuf schemas for the "dnstap" structured event
+// replication format for DNS software.
+
+// Written in 2013-2014 by Farsight Security, Inc.
+//
+// To the extent possible under law, the author(s) have dedicated all
+// copyright and related and neighboring rights to this file to the public
+// domain worldwide. This file is distributed without any warranty.
+//
+// You should have received a copy of the CC0 Public Domain Dedication along
+// with this file. If not, see:
+//
+// .
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.25.0-devel
+// protoc (unknown)
// source: dnstap.proto
-// DO NOT EDIT!
-
-/*
-Package dnstap is a generated protocol buffer package.
-
-It is generated from these files:
- dnstap.proto
-
-It has these top-level messages:
- Dnstap
- Message
-*/
+
package dnstap
-import proto "github.com/golang/protobuf/proto"
-import json "encoding/json"
-import math "math"
-
-// Reference proto, json, and math imports to suppress error if they are not otherwise used.
-var _ = proto.Marshal
-var _ = &json.SyntaxError{}
-var _ = math.Inf
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
// SocketFamily: the network protocol family of a socket. This specifies how
// to interpret "network address" fields.
type SocketFamily int32
const (
- SocketFamily_INET SocketFamily = 1
- SocketFamily_INET6 SocketFamily = 2
-)
-
-var SocketFamily_name = map[int32]string{
- 1: "INET",
- 2: "INET6",
-}
-var SocketFamily_value = map[string]int32{
- "INET": 1,
- "INET6": 2,
-}
+ SocketFamily_INET SocketFamily = 1 // IPv4 (RFC 791)
+ SocketFamily_INET6 SocketFamily = 2 // IPv6 (RFC 2460)
+)
+
+// Enum value maps for SocketFamily.
+var (
+ SocketFamily_name = map[int32]string{
+ 1: "INET",
+ 2: "INET6",
+ }
+ SocketFamily_value = map[string]int32{
+ "INET": 1,
+ "INET6": 2,
+ }
+)
func (x SocketFamily) Enum() *SocketFamily {
p := new(SocketFamily)
*p = x
return p
}
+
func (x SocketFamily) String() string {
- return proto.EnumName(SocketFamily_name, int32(x))
-}
-func (x *SocketFamily) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(SocketFamily_value, data, "SocketFamily")
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (SocketFamily) Descriptor() protoreflect.EnumDescriptor {
+ return file_dnstap_proto_enumTypes[0].Descriptor()
+}
+
+func (SocketFamily) Type() protoreflect.EnumType {
+ return &file_dnstap_proto_enumTypes[0]
+}
+
+func (x SocketFamily) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *SocketFamily) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
if err != nil {
return err
}
- *x = SocketFamily(value)
- return nil
-}
-
-// SocketProtocol: the transport protocol of a socket. This specifies how to
-// interpret "transport port" fields.
+ *x = SocketFamily(num)
+ return nil
+}
+
+// Deprecated: Use SocketFamily.Descriptor instead.
+func (SocketFamily) EnumDescriptor() ([]byte, []int) {
+ return file_dnstap_proto_rawDescGZIP(), []int{0}
+}
+
+// SocketProtocol: the protocol used to transport a DNS message.
type SocketProtocol int32
const (
- SocketProtocol_UDP SocketProtocol = 1
- SocketProtocol_TCP SocketProtocol = 2
-)
-
-var SocketProtocol_name = map[int32]string{
- 1: "UDP",
- 2: "TCP",
-}
-var SocketProtocol_value = map[string]int32{
- "UDP": 1,
- "TCP": 2,
-}
+ SocketProtocol_UDP SocketProtocol = 1 // DNS over UDP transport (RFC 1035 section 4.2.1)
+ SocketProtocol_TCP SocketProtocol = 2 // DNS over TCP transport (RFC 1035 section 4.2.2)
+ SocketProtocol_DOT SocketProtocol = 3 // DNS over TLS (RFC 7858)
+ SocketProtocol_DOH SocketProtocol = 4 // DNS over HTTPS (RFC 8484)
+)
+
+// Enum value maps for SocketProtocol.
+var (
+ SocketProtocol_name = map[int32]string{
+ 1: "UDP",
+ 2: "TCP",
+ 3: "DOT",
+ 4: "DOH",
+ }
+ SocketProtocol_value = map[string]int32{
+ "UDP": 1,
+ "TCP": 2,
+ "DOT": 3,
+ "DOH": 4,
+ }
+)
func (x SocketProtocol) Enum() *SocketProtocol {
p := new(SocketProtocol)
*p = x
return p
}
+
func (x SocketProtocol) String() string {
- return proto.EnumName(SocketProtocol_name, int32(x))
-}
-func (x *SocketProtocol) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(SocketProtocol_value, data, "SocketProtocol")
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (SocketProtocol) Descriptor() protoreflect.EnumDescriptor {
+ return file_dnstap_proto_enumTypes[1].Descriptor()
+}
+
+func (SocketProtocol) Type() protoreflect.EnumType {
+ return &file_dnstap_proto_enumTypes[1]
+}
+
+func (x SocketProtocol) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *SocketProtocol) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
if err != nil {
return err
}
- *x = SocketProtocol(value)
- return nil
+ *x = SocketProtocol(num)
+ return nil
+}
+
+// Deprecated: Use SocketProtocol.Descriptor instead.
+func (SocketProtocol) EnumDescriptor() ([]byte, []int) {
+ return file_dnstap_proto_rawDescGZIP(), []int{1}
}
// Identifies which field below is filled in.
@@ -100,35 +164,58 @@
Dnstap_MESSAGE Dnstap_Type = 1
)
-var Dnstap_Type_name = map[int32]string{
- 1: "MESSAGE",
-}
-var Dnstap_Type_value = map[string]int32{
- "MESSAGE": 1,
-}
+// Enum value maps for Dnstap_Type.
+var (
+ Dnstap_Type_name = map[int32]string{
+ 1: "MESSAGE",
+ }
+ Dnstap_Type_value = map[string]int32{
+ "MESSAGE": 1,
+ }
+)
func (x Dnstap_Type) Enum() *Dnstap_Type {
p := new(Dnstap_Type)
*p = x
return p
}
+
func (x Dnstap_Type) String() string {
- return proto.EnumName(Dnstap_Type_name, int32(x))
-}
-func (x *Dnstap_Type) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(Dnstap_Type_value, data, "Dnstap_Type")
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (Dnstap_Type) Descriptor() protoreflect.EnumDescriptor {
+ return file_dnstap_proto_enumTypes[2].Descriptor()
+}
+
+func (Dnstap_Type) Type() protoreflect.EnumType {
+ return &file_dnstap_proto_enumTypes[2]
+}
+
+func (x Dnstap_Type) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *Dnstap_Type) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
if err != nil {
return err
}
- *x = Dnstap_Type(value)
- return nil
+ *x = Dnstap_Type(num)
+ return nil
+}
+
+// Deprecated: Use Dnstap_Type.Descriptor instead.
+func (Dnstap_Type) EnumDescriptor() ([]byte, []int) {
+ return file_dnstap_proto_rawDescGZIP(), []int{0, 0}
}
type Message_Type int32
const (
// AUTH_QUERY is a DNS query message received from a resolver by an
- // authoritative name server, from the perspective of the authorative
+ // authoritative name server, from the perspective of the authoritative
// name server.
Message_AUTH_QUERY Message_Type = 1
// AUTH_RESPONSE is a DNS response message sent from an authoritative
@@ -177,52 +264,87 @@
// TOOL_RESPONSE is a DNS response message received by a DNS software
// tool from a DNS server, from the perspective of the tool.
Message_TOOL_RESPONSE Message_Type = 12
-)
-
-var Message_Type_name = map[int32]string{
- 1: "AUTH_QUERY",
- 2: "AUTH_RESPONSE",
- 3: "RESOLVER_QUERY",
- 4: "RESOLVER_RESPONSE",
- 5: "CLIENT_QUERY",
- 6: "CLIENT_RESPONSE",
- 7: "FORWARDER_QUERY",
- 8: "FORWARDER_RESPONSE",
- 9: "STUB_QUERY",
- 10: "STUB_RESPONSE",
- 11: "TOOL_QUERY",
- 12: "TOOL_RESPONSE",
-}
-var Message_Type_value = map[string]int32{
- "AUTH_QUERY": 1,
- "AUTH_RESPONSE": 2,
- "RESOLVER_QUERY": 3,
- "RESOLVER_RESPONSE": 4,
- "CLIENT_QUERY": 5,
- "CLIENT_RESPONSE": 6,
- "FORWARDER_QUERY": 7,
- "FORWARDER_RESPONSE": 8,
- "STUB_QUERY": 9,
- "STUB_RESPONSE": 10,
- "TOOL_QUERY": 11,
- "TOOL_RESPONSE": 12,
-}
+ // UPDATE_QUERY is a DNS update query message received from a resolver
+ // by an authoritative name server, from the perspective of the
+ // authoritative name server.
+ Message_UPDATE_QUERY Message_Type = 13
+ // UPDATE_RESPONSE is a DNS update response message sent from an
+ // authoritative name server to a resolver, from the perspective of the
+ // authoritative name server.
+ Message_UPDATE_RESPONSE Message_Type = 14
+)
+
+// Enum value maps for Message_Type.
+var (
+ Message_Type_name = map[int32]string{
+ 1: "AUTH_QUERY",
+ 2: "AUTH_RESPONSE",
+ 3: "RESOLVER_QUERY",
+ 4: "RESOLVER_RESPONSE",
+ 5: "CLIENT_QUERY",
+ 6: "CLIENT_RESPONSE",
+ 7: "FORWARDER_QUERY",
+ 8: "FORWARDER_RESPONSE",
+ 9: "STUB_QUERY",
+ 10: "STUB_RESPONSE",
+ 11: "TOOL_QUERY",
+ 12: "TOOL_RESPONSE",
+ 13: "UPDATE_QUERY",
+ 14: "UPDATE_RESPONSE",
+ }
+ Message_Type_value = map[string]int32{
+ "AUTH_QUERY": 1,
+ "AUTH_RESPONSE": 2,
+ "RESOLVER_QUERY": 3,
+ "RESOLVER_RESPONSE": 4,
+ "CLIENT_QUERY": 5,
+ "CLIENT_RESPONSE": 6,
+ "FORWARDER_QUERY": 7,
+ "FORWARDER_RESPONSE": 8,
+ "STUB_QUERY": 9,
+ "STUB_RESPONSE": 10,
+ "TOOL_QUERY": 11,
+ "TOOL_RESPONSE": 12,
+ "UPDATE_QUERY": 13,
+ "UPDATE_RESPONSE": 14,
+ }
+)
func (x Message_Type) Enum() *Message_Type {
p := new(Message_Type)
*p = x
return p
}
+
func (x Message_Type) String() string {
- return proto.EnumName(Message_Type_name, int32(x))
-}
-func (x *Message_Type) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(Message_Type_value, data, "Message_Type")
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (Message_Type) Descriptor() protoreflect.EnumDescriptor {
+ return file_dnstap_proto_enumTypes[3].Descriptor()
+}
+
+func (Message_Type) Type() protoreflect.EnumType {
+ return &file_dnstap_proto_enumTypes[3]
+}
+
+func (x Message_Type) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *Message_Type) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
if err != nil {
return err
}
- *x = Message_Type(value)
- return nil
+ *x = Message_Type(num)
+ return nil
+}
+
+// Deprecated: Use Message_Type.Descriptor instead.
+func (Message_Type) EnumDescriptor() ([]byte, []int) {
+ return file_dnstap_proto_rawDescGZIP(), []int{1, 0}
}
// "Dnstap": this is the top-level dnstap type, which is a "union" type that
@@ -230,6 +352,10 @@
// of dnstap payload is defined.
// See: https://developers.google.com/protocol-buffers/docs/techniques#union
type Dnstap struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
// DNS server identity.
// If enabled, this is the identity string of the DNS server which generated
// this message. Typically this would be the same string as returned by an
@@ -246,45 +372,72 @@
Extra []byte `protobuf:"bytes,3,opt,name=extra" json:"extra,omitempty"`
Type *Dnstap_Type `protobuf:"varint,15,req,name=type,enum=dnstap.Dnstap_Type" json:"type,omitempty"`
// One of the following will be filled in.
- Message *Message `protobuf:"bytes,14,opt,name=message" json:"message,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *Dnstap) Reset() { *m = Dnstap{} }
-func (m *Dnstap) String() string { return proto.CompactTextString(m) }
-func (*Dnstap) ProtoMessage() {}
-
-func (m *Dnstap) GetIdentity() []byte {
- if m != nil {
- return m.Identity
- }
- return nil
-}
-
-func (m *Dnstap) GetVersion() []byte {
- if m != nil {
- return m.Version
- }
- return nil
-}
-
-func (m *Dnstap) GetExtra() []byte {
- if m != nil {
- return m.Extra
- }
- return nil
-}
-
-func (m *Dnstap) GetType() Dnstap_Type {
- if m != nil && m.Type != nil {
- return *m.Type
+ Message *Message `protobuf:"bytes,14,opt,name=message" json:"message,omitempty"`
+}
+
+func (x *Dnstap) Reset() {
+ *x = Dnstap{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_dnstap_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Dnstap) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Dnstap) ProtoMessage() {}
+
+func (x *Dnstap) ProtoReflect() protoreflect.Message {
+ mi := &file_dnstap_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Dnstap.ProtoReflect.Descriptor instead.
+func (*Dnstap) Descriptor() ([]byte, []int) {
+ return file_dnstap_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *Dnstap) GetIdentity() []byte {
+ if x != nil {
+ return x.Identity
+ }
+ return nil
+}
+
+func (x *Dnstap) GetVersion() []byte {
+ if x != nil {
+ return x.Version
+ }
+ return nil
+}
+
+func (x *Dnstap) GetExtra() []byte {
+ if x != nil {
+ return x.Extra
+ }
+ return nil
+}
+
+func (x *Dnstap) GetType() Dnstap_Type {
+ if x != nil && x.Type != nil {
+ return *x.Type
}
return Dnstap_MESSAGE
}
-func (m *Dnstap) GetMessage() *Message {
- if m != nil {
- return m.Message
+func (x *Dnstap) GetMessage() *Message {
+ if x != nil {
+ return x.Message
}
return nil
}
@@ -293,156 +446,349 @@
// metadata. Applications generating "Message" payloads should follow
// certain requirements based on the MessageType, see below.
type Message struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
// One of the Type values described above.
Type *Message_Type `protobuf:"varint,1,req,name=type,enum=dnstap.Message_Type" json:"type,omitempty"`
// One of the SocketFamily values described above.
- SocketFamily *SocketFamily `protobuf:"varint,2,opt,name=socket_family,enum=dnstap.SocketFamily" json:"socket_family,omitempty"`
+ SocketFamily *SocketFamily `protobuf:"varint,2,opt,name=socket_family,json=socketFamily,enum=dnstap.SocketFamily" json:"socket_family,omitempty"`
// One of the SocketProtocol values described above.
- SocketProtocol *SocketProtocol `protobuf:"varint,3,opt,name=socket_protocol,enum=dnstap.SocketProtocol" json:"socket_protocol,omitempty"`
+ SocketProtocol *SocketProtocol `protobuf:"varint,3,opt,name=socket_protocol,json=socketProtocol,enum=dnstap.SocketProtocol" json:"socket_protocol,omitempty"`
// The network address of the message initiator.
// For SocketFamily INET, this field is 4 octets (IPv4 address).
// For SocketFamily INET6, this field is 16 octets (IPv6 address).
- QueryAddress []byte `protobuf:"bytes,4,opt,name=query_address" json:"query_address,omitempty"`
+ QueryAddress []byte `protobuf:"bytes,4,opt,name=query_address,json=queryAddress" json:"query_address,omitempty"`
// The network address of the message responder.
// For SocketFamily INET, this field is 4 octets (IPv4 address).
// For SocketFamily INET6, this field is 16 octets (IPv6 address).
- ResponseAddress []byte `protobuf:"bytes,5,opt,name=response_address" json:"response_address,omitempty"`
+ ResponseAddress []byte `protobuf:"bytes,5,opt,name=response_address,json=responseAddress" json:"response_address,omitempty"`
// The transport port of the message initiator.
// This is a 16-bit UDP or TCP port number, depending on SocketProtocol.
- QueryPort *uint32 `protobuf:"varint,6,opt,name=query_port" json:"query_port,omitempty"`
+ QueryPort *uint32 `protobuf:"varint,6,opt,name=query_port,json=queryPort" json:"query_port,omitempty"`
// The transport port of the message responder.
// This is a 16-bit UDP or TCP port number, depending on SocketProtocol.
- ResponsePort *uint32 `protobuf:"varint,7,opt,name=response_port" json:"response_port,omitempty"`
+ ResponsePort *uint32 `protobuf:"varint,7,opt,name=response_port,json=responsePort" json:"response_port,omitempty"`
// The time at which the DNS query message was sent or received, depending
// on whether this is an AUTH_QUERY, RESOLVER_QUERY, or CLIENT_QUERY.
// This is the number of seconds since the UNIX epoch.
- QueryTimeSec *uint64 `protobuf:"varint,8,opt,name=query_time_sec" json:"query_time_sec,omitempty"`
+ QueryTimeSec *uint64 `protobuf:"varint,8,opt,name=query_time_sec,json=queryTimeSec" json:"query_time_sec,omitempty"`
// The time at which the DNS query message was sent or received.
// This is the seconds fraction, expressed as a count of nanoseconds.
- QueryTimeNsec *uint32 `protobuf:"fixed32,9,opt,name=query_time_nsec" json:"query_time_nsec,omitempty"`
+ QueryTimeNsec *uint32 `protobuf:"fixed32,9,opt,name=query_time_nsec,json=queryTimeNsec" json:"query_time_nsec,omitempty"`
// The initiator's original wire-format DNS query message, verbatim.
- QueryMessage []byte `protobuf:"bytes,10,opt,name=query_message" json:"query_message,omitempty"`
+ QueryMessage []byte `protobuf:"bytes,10,opt,name=query_message,json=queryMessage" json:"query_message,omitempty"`
// The "zone" or "bailiwick" pertaining to the DNS query message.
// This is a wire-format DNS domain name.
- QueryZone []byte `protobuf:"bytes,11,opt,name=query_zone" json:"query_zone,omitempty"`
+ QueryZone []byte `protobuf:"bytes,11,opt,name=query_zone,json=queryZone" json:"query_zone,omitempty"`
// The time at which the DNS response message was sent or received,
// depending on whether this is an AUTH_RESPONSE, RESOLVER_RESPONSE, or
// CLIENT_RESPONSE.
// This is the number of seconds since the UNIX epoch.
- ResponseTimeSec *uint64 `protobuf:"varint,12,opt,name=response_time_sec" json:"response_time_sec,omitempty"`
+ ResponseTimeSec *uint64 `protobuf:"varint,12,opt,name=response_time_sec,json=responseTimeSec" json:"response_time_sec,omitempty"`
// The time at which the DNS response message was sent or received.
// This is the seconds fraction, expressed as a count of nanoseconds.
- ResponseTimeNsec *uint32 `protobuf:"fixed32,13,opt,name=response_time_nsec" json:"response_time_nsec,omitempty"`
+ ResponseTimeNsec *uint32 `protobuf:"fixed32,13,opt,name=response_time_nsec,json=responseTimeNsec" json:"response_time_nsec,omitempty"`
// The responder's original wire-format DNS response message, verbatim.
- ResponseMessage []byte `protobuf:"bytes,14,opt,name=response_message" json:"response_message,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *Message) Reset() { *m = Message{} }
-func (m *Message) String() string { return proto.CompactTextString(m) }
-func (*Message) ProtoMessage() {}
-
-func (m *Message) GetType() Message_Type {
- if m != nil && m.Type != nil {
- return *m.Type
+ ResponseMessage []byte `protobuf:"bytes,14,opt,name=response_message,json=responseMessage" json:"response_message,omitempty"`
+}
+
+func (x *Message) Reset() {
+ *x = Message{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_dnstap_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Message) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Message) ProtoMessage() {}
+
+func (x *Message) ProtoReflect() protoreflect.Message {
+ mi := &file_dnstap_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Message.ProtoReflect.Descriptor instead.
+func (*Message) Descriptor() ([]byte, []int) {
+ return file_dnstap_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *Message) GetType() Message_Type {
+ if x != nil && x.Type != nil {
+ return *x.Type
}
return Message_AUTH_QUERY
}
-func (m *Message) GetSocketFamily() SocketFamily {
- if m != nil && m.SocketFamily != nil {
- return *m.SocketFamily
+func (x *Message) GetSocketFamily() SocketFamily {
+ if x != nil && x.SocketFamily != nil {
+ return *x.SocketFamily
}
return SocketFamily_INET
}
-func (m *Message) GetSocketProtocol() SocketProtocol {
- if m != nil && m.SocketProtocol != nil {
- return *m.SocketProtocol
+func (x *Message) GetSocketProtocol() SocketProtocol {
+ if x != nil && x.SocketProtocol != nil {
+ return *x.SocketProtocol
}
return SocketProtocol_UDP
}
-func (m *Message) GetQueryAddress() []byte {
- if m != nil {
- return m.QueryAddress
- }
- return nil
-}
-
-func (m *Message) GetResponseAddress() []byte {
- if m != nil {
- return m.ResponseAddress
- }
- return nil
-}
-
-func (m *Message) GetQueryPort() uint32 {
- if m != nil && m.QueryPort != nil {
- return *m.QueryPort
+func (x *Message) GetQueryAddress() []byte {
+ if x != nil {
+ return x.QueryAddress
+ }
+ return nil
+}
+
+func (x *Message) GetResponseAddress() []byte {
+ if x != nil {
+ return x.ResponseAddress
+ }
+ return nil
+}
+
+func (x *Message) GetQueryPort() uint32 {
+ if x != nil && x.QueryPort != nil {
+ return *x.QueryPort
}
return 0
}
-func (m *Message) GetResponsePort() uint32 {
- if m != nil && m.ResponsePort != nil {
- return *m.ResponsePort
+func (x *Message) GetResponsePort() uint32 {
+ if x != nil && x.ResponsePort != nil {
+ return *x.ResponsePort
}
return 0
}
-func (m *Message) GetQueryTimeSec() uint64 {
- if m != nil && m.QueryTimeSec != nil {
- return *m.QueryTimeSec
+func (x *Message) GetQueryTimeSec() uint64 {
+ if x != nil && x.QueryTimeSec != nil {
+ return *x.QueryTimeSec
}
return 0
}
-func (m *Message) GetQueryTimeNsec() uint32 {
- if m != nil && m.QueryTimeNsec != nil {
- return *m.QueryTimeNsec
+func (x *Message) GetQueryTimeNsec() uint32 {
+ if x != nil && x.QueryTimeNsec != nil {
+ return *x.QueryTimeNsec
}
return 0
}
-func (m *Message) GetQueryMessage() []byte {
- if m != nil {
- return m.QueryMessage
- }
- return nil
-}
-
-func (m *Message) GetQueryZone() []byte {
- if m != nil {
- return m.QueryZone
- }
- return nil
-}
-
-func (m *Message) GetResponseTimeSec() uint64 {
- if m != nil && m.ResponseTimeSec != nil {
- return *m.ResponseTimeSec
+func (x *Message) GetQueryMessage() []byte {
+ if x != nil {
+ return x.QueryMessage
+ }
+ return nil
+}
+
+func (x *Message) GetQueryZone() []byte {
+ if x != nil {
+ return x.QueryZone
+ }
+ return nil
+}
+
+func (x *Message) GetResponseTimeSec() uint64 {
+ if x != nil && x.ResponseTimeSec != nil {
+ return *x.ResponseTimeSec
}
return 0
}
-func (m *Message) GetResponseTimeNsec() uint32 {
- if m != nil && m.ResponseTimeNsec != nil {
- return *m.ResponseTimeNsec
+func (x *Message) GetResponseTimeNsec() uint32 {
+ if x != nil && x.ResponseTimeNsec != nil {
+ return *x.ResponseTimeNsec
}
return 0
}
-func (m *Message) GetResponseMessage() []byte {
- if m != nil {
- return m.ResponseMessage
- }
- return nil
-}
-
-func init() {
- proto.RegisterEnum("dnstap.SocketFamily", SocketFamily_name, SocketFamily_value)
- proto.RegisterEnum("dnstap.SocketProtocol", SocketProtocol_name, SocketProtocol_value)
- proto.RegisterEnum("dnstap.Dnstap_Type", Dnstap_Type_name, Dnstap_Type_value)
- proto.RegisterEnum("dnstap.Message_Type", Message_Type_name, Message_Type_value)
-}
+func (x *Message) GetResponseMessage() []byte {
+ if x != nil {
+ return x.ResponseMessage
+ }
+ return nil
+}
+
+var File_dnstap_proto protoreflect.FileDescriptor
+
+var file_dnstap_proto_rawDesc = []byte{
+ 0x0a, 0x0c, 0x64, 0x6e, 0x73, 0x74, 0x61, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06,
+ 0x64, 0x6e, 0x73, 0x74, 0x61, 0x70, 0x22, 0xbd, 0x01, 0x0a, 0x06, 0x44, 0x6e, 0x73, 0x74, 0x61,
+ 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x0c, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x18, 0x0a,
+ 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07,
+ 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61,
+ 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x12, 0x27, 0x0a,
+ 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0f, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x64, 0x6e,
+ 0x73, 0x74, 0x61, 0x70, 0x2e, 0x44, 0x6e, 0x73, 0x74, 0x61, 0x70, 0x2e, 0x54, 0x79, 0x70, 0x65,
+ 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x29, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
+ 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x64, 0x6e, 0x73, 0x74, 0x61, 0x70,
+ 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
+ 0x65, 0x22, 0x13, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x4d, 0x45, 0x53,
+ 0x53, 0x41, 0x47, 0x45, 0x10, 0x01, 0x22, 0xf2, 0x06, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61,
+ 0x67, 0x65, 0x12, 0x28, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e,
+ 0x32, 0x14, 0x2e, 0x64, 0x6e, 0x73, 0x74, 0x61, 0x70, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
+ 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x39, 0x0a, 0x0d,
+ 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x64, 0x6e, 0x73, 0x74, 0x61, 0x70, 0x2e, 0x53, 0x6f, 0x63,
+ 0x6b, 0x65, 0x74, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x52, 0x0c, 0x73, 0x6f, 0x63, 0x6b, 0x65,
+ 0x74, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x3f, 0x0a, 0x0f, 0x73, 0x6f, 0x63, 0x6b, 0x65,
+ 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e,
+ 0x32, 0x16, 0x2e, 0x64, 0x6e, 0x73, 0x74, 0x61, 0x70, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74,
+ 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x0e, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74,
+ 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x23, 0x0a, 0x0d, 0x71, 0x75, 0x65, 0x72,
+ 0x79, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52,
+ 0x0c, 0x71, 0x75, 0x65, 0x72, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x29, 0x0a,
+ 0x10, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73,
+ 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x72,
+ 0x79, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x71, 0x75,
+ 0x65, 0x72, 0x79, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c,
+ 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x24, 0x0a, 0x0e,
+ 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x18, 0x08,
+ 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x71, 0x75, 0x65, 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x53,
+ 0x65, 0x63, 0x12, 0x26, 0x0a, 0x0f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65,
+ 0x5f, 0x6e, 0x73, 0x65, 0x63, 0x18, 0x09, 0x20, 0x01, 0x28, 0x07, 0x52, 0x0d, 0x71, 0x75, 0x65,
+ 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x4e, 0x73, 0x65, 0x63, 0x12, 0x23, 0x0a, 0x0d, 0x71, 0x75,
+ 0x65, 0x72, 0x79, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28,
+ 0x0c, 0x52, 0x0c, 0x71, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12,
+ 0x1d, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x0b, 0x20,
+ 0x01, 0x28, 0x0c, 0x52, 0x09, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5a, 0x6f, 0x6e, 0x65, 0x12, 0x2a,
+ 0x0a, 0x11, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f,
+ 0x73, 0x65, 0x63, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x63, 0x12, 0x2c, 0x0a, 0x12, 0x72, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6e, 0x73, 0x65, 0x63,
+ 0x18, 0x0d, 0x20, 0x01, 0x28, 0x07, 0x52, 0x10, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x54, 0x69, 0x6d, 0x65, 0x4e, 0x73, 0x65, 0x63, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0e, 0x20, 0x01,
+ 0x28, 0x0c, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73,
+ 0x61, 0x67, 0x65, 0x22, 0x95, 0x02, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x0a,
+ 0x41, 0x55, 0x54, 0x48, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d,
+ 0x41, 0x55, 0x54, 0x48, 0x5f, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x10, 0x02, 0x12,
+ 0x12, 0x0a, 0x0e, 0x52, 0x45, 0x53, 0x4f, 0x4c, 0x56, 0x45, 0x52, 0x5f, 0x51, 0x55, 0x45, 0x52,
+ 0x59, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, 0x53, 0x4f, 0x4c, 0x56, 0x45, 0x52, 0x5f,
+ 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x0c, 0x43, 0x4c,
+ 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x10, 0x05, 0x12, 0x13, 0x0a, 0x0f,
+ 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x10,
+ 0x06, 0x12, 0x13, 0x0a, 0x0f, 0x46, 0x4f, 0x52, 0x57, 0x41, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x51,
+ 0x55, 0x45, 0x52, 0x59, 0x10, 0x07, 0x12, 0x16, 0x0a, 0x12, 0x46, 0x4f, 0x52, 0x57, 0x41, 0x52,
+ 0x44, 0x45, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x10, 0x08, 0x12, 0x0e,
+ 0x0a, 0x0a, 0x53, 0x54, 0x55, 0x42, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x10, 0x09, 0x12, 0x11,
+ 0x0a, 0x0d, 0x53, 0x54, 0x55, 0x42, 0x5f, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x10,
+ 0x0a, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x4f, 0x4f, 0x4c, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x10,
+ 0x0b, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x4f, 0x4f, 0x4c, 0x5f, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e,
+ 0x53, 0x45, 0x10, 0x0c, 0x12, 0x10, 0x0a, 0x0c, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x51,
+ 0x55, 0x45, 0x52, 0x59, 0x10, 0x0d, 0x12, 0x13, 0x0a, 0x0f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45,
+ 0x5f, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x10, 0x0e, 0x2a, 0x23, 0x0a, 0x0c, 0x53,
+ 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x08, 0x0a, 0x04, 0x49,
+ 0x4e, 0x45, 0x54, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x4e, 0x45, 0x54, 0x36, 0x10, 0x02,
+ 0x2a, 0x34, 0x0a, 0x0e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63,
+ 0x6f, 0x6c, 0x12, 0x07, 0x0a, 0x03, 0x55, 0x44, 0x50, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x54,
+ 0x43, 0x50, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x4f, 0x54, 0x10, 0x03, 0x12, 0x07, 0x0a,
+ 0x03, 0x44, 0x4f, 0x48, 0x10, 0x04, 0x42, 0x28, 0x5a, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
+ 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x6e, 0x73, 0x74, 0x61, 0x70, 0x2f, 0x67, 0x6f, 0x6c, 0x61,
+ 0x6e, 0x67, 0x2d, 0x64, 0x6e, 0x73, 0x74, 0x61, 0x70, 0x3b, 0x64, 0x6e, 0x73, 0x74, 0x61, 0x70,
+}
+
+var (
+ file_dnstap_proto_rawDescOnce sync.Once
+ file_dnstap_proto_rawDescData = file_dnstap_proto_rawDesc
+)
+
+func file_dnstap_proto_rawDescGZIP() []byte {
+ file_dnstap_proto_rawDescOnce.Do(func() {
+ file_dnstap_proto_rawDescData = protoimpl.X.CompressGZIP(file_dnstap_proto_rawDescData)
+ })
+ return file_dnstap_proto_rawDescData
+}
+
+var file_dnstap_proto_enumTypes = make([]protoimpl.EnumInfo, 4)
+var file_dnstap_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_dnstap_proto_goTypes = []interface{}{
+ (SocketFamily)(0), // 0: dnstap.SocketFamily
+ (SocketProtocol)(0), // 1: dnstap.SocketProtocol
+ (Dnstap_Type)(0), // 2: dnstap.Dnstap.Type
+ (Message_Type)(0), // 3: dnstap.Message.Type
+ (*Dnstap)(nil), // 4: dnstap.Dnstap
+ (*Message)(nil), // 5: dnstap.Message
+}
+var file_dnstap_proto_depIdxs = []int32{
+ 2, // 0: dnstap.Dnstap.type:type_name -> dnstap.Dnstap.Type
+ 5, // 1: dnstap.Dnstap.message:type_name -> dnstap.Message
+ 3, // 2: dnstap.Message.type:type_name -> dnstap.Message.Type
+ 0, // 3: dnstap.Message.socket_family:type_name -> dnstap.SocketFamily
+ 1, // 4: dnstap.Message.socket_protocol:type_name -> dnstap.SocketProtocol
+ 5, // [5:5] is the sub-list for method output_type
+ 5, // [5:5] is the sub-list for method input_type
+ 5, // [5:5] is the sub-list for extension type_name
+ 5, // [5:5] is the sub-list for extension extendee
+ 0, // [0:5] is the sub-list for field type_name
+}
+
+func init() { file_dnstap_proto_init() }
+func file_dnstap_proto_init() {
+ if File_dnstap_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_dnstap_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Dnstap); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_dnstap_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Message); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_dnstap_proto_rawDesc,
+ NumEnums: 4,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_dnstap_proto_goTypes,
+ DependencyIndexes: file_dnstap_proto_depIdxs,
+ EnumInfos: file_dnstap_proto_enumTypes,
+ MessageInfos: file_dnstap_proto_msgTypes,
+ }.Build()
+ File_dnstap_proto = out.File
+ file_dnstap_proto_rawDesc = nil
+ file_dnstap_proto_goTypes = nil
+ file_dnstap_proto_depIdxs = nil
+}
diff --git a/genproto.sh b/genproto.sh
new file mode 100755
index 0000000..9ee327f
--- /dev/null
+++ b/genproto.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+go_package() {
+ local file pkg line script
+ file=$1; shift
+ pkg=$1; shift
+
+ line="option go_package = \"$pkg\";"
+ grep "^$line\$" $file > /dev/null && return
+
+ script="/^package dnstap/|a|$line|.|w|q|"
+ if grep "^option go_package" $file > /dev/null; then
+ script="/^option go_package/d|1|${script}"
+ fi
+
+ echo "$script" | tr '|' '\n' | ed $file || exit
+}
+
+dir=$(dirname $0)
+[ -n "$dir" ] && cd $dir
+
+cd dnstap.pb
+
+go_package dnstap.proto "github.com/dnstap/golang-dnstap;dnstap"
+protoc --go_out=../../../.. dnstap.proto
diff --git a/go.mod b/go.mod
index 8447007..d9d385e 100644
--- a/go.mod
+++ b/go.mod
@@ -2,6 +2,6 @@
require (
github.com/farsightsec/golang-framestream v0.3.0
- github.com/golang/protobuf v1.4.2
github.com/miekg/dns v1.1.31
+ google.golang.org/protobuf v1.23.0
)
diff --git a/go.sum b/go.sum
index 9e78548..407bb9e 100644
--- a/go.sum
+++ b/go.sum
@@ -5,8 +5,6 @@
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
-github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0=
-github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4=