dnstap.pb.go 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794
  1. // dnstap: flexible, structured event replication format for DNS software
  2. //
  3. // This file contains the protobuf schemas for the "dnstap" structured event
  4. // replication format for DNS software.
  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. // Code generated by protoc-gen-go. DO NOT EDIT.
  16. // versions:
  17. // protoc-gen-go v1.25.0-devel
  18. // protoc (unknown)
  19. // source: dnstap.proto
  20. package dnstap
  21. import (
  22. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  23. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  24. reflect "reflect"
  25. sync "sync"
  26. )
  27. const (
  28. // Verify that this generated code is sufficiently up-to-date.
  29. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  30. // Verify that runtime/protoimpl is sufficiently up-to-date.
  31. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  32. )
  33. // SocketFamily: the network protocol family of a socket. This specifies how
  34. // to interpret "network address" fields.
  35. type SocketFamily int32
  36. const (
  37. SocketFamily_INET SocketFamily = 1 // IPv4 (RFC 791)
  38. SocketFamily_INET6 SocketFamily = 2 // IPv6 (RFC 2460)
  39. )
  40. // Enum value maps for SocketFamily.
  41. var (
  42. SocketFamily_name = map[int32]string{
  43. 1: "INET",
  44. 2: "INET6",
  45. }
  46. SocketFamily_value = map[string]int32{
  47. "INET": 1,
  48. "INET6": 2,
  49. }
  50. )
  51. func (x SocketFamily) Enum() *SocketFamily {
  52. p := new(SocketFamily)
  53. *p = x
  54. return p
  55. }
  56. func (x SocketFamily) String() string {
  57. return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
  58. }
  59. func (SocketFamily) Descriptor() protoreflect.EnumDescriptor {
  60. return file_dnstap_proto_enumTypes[0].Descriptor()
  61. }
  62. func (SocketFamily) Type() protoreflect.EnumType {
  63. return &file_dnstap_proto_enumTypes[0]
  64. }
  65. func (x SocketFamily) Number() protoreflect.EnumNumber {
  66. return protoreflect.EnumNumber(x)
  67. }
  68. // Deprecated: Do not use.
  69. func (x *SocketFamily) UnmarshalJSON(b []byte) error {
  70. num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
  71. if err != nil {
  72. return err
  73. }
  74. *x = SocketFamily(num)
  75. return nil
  76. }
  77. // Deprecated: Use SocketFamily.Descriptor instead.
  78. func (SocketFamily) EnumDescriptor() ([]byte, []int) {
  79. return file_dnstap_proto_rawDescGZIP(), []int{0}
  80. }
  81. // SocketProtocol: the protocol used to transport a DNS message.
  82. type SocketProtocol int32
  83. const (
  84. SocketProtocol_UDP SocketProtocol = 1 // DNS over UDP transport (RFC 1035 section 4.2.1)
  85. SocketProtocol_TCP SocketProtocol = 2 // DNS over TCP transport (RFC 1035 section 4.2.2)
  86. SocketProtocol_DOT SocketProtocol = 3 // DNS over TLS (RFC 7858)
  87. SocketProtocol_DOH SocketProtocol = 4 // DNS over HTTPS (RFC 8484)
  88. )
  89. // Enum value maps for SocketProtocol.
  90. var (
  91. SocketProtocol_name = map[int32]string{
  92. 1: "UDP",
  93. 2: "TCP",
  94. 3: "DOT",
  95. 4: "DOH",
  96. }
  97. SocketProtocol_value = map[string]int32{
  98. "UDP": 1,
  99. "TCP": 2,
  100. "DOT": 3,
  101. "DOH": 4,
  102. }
  103. )
  104. func (x SocketProtocol) Enum() *SocketProtocol {
  105. p := new(SocketProtocol)
  106. *p = x
  107. return p
  108. }
  109. func (x SocketProtocol) String() string {
  110. return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
  111. }
  112. func (SocketProtocol) Descriptor() protoreflect.EnumDescriptor {
  113. return file_dnstap_proto_enumTypes[1].Descriptor()
  114. }
  115. func (SocketProtocol) Type() protoreflect.EnumType {
  116. return &file_dnstap_proto_enumTypes[1]
  117. }
  118. func (x SocketProtocol) Number() protoreflect.EnumNumber {
  119. return protoreflect.EnumNumber(x)
  120. }
  121. // Deprecated: Do not use.
  122. func (x *SocketProtocol) UnmarshalJSON(b []byte) error {
  123. num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
  124. if err != nil {
  125. return err
  126. }
  127. *x = SocketProtocol(num)
  128. return nil
  129. }
  130. // Deprecated: Use SocketProtocol.Descriptor instead.
  131. func (SocketProtocol) EnumDescriptor() ([]byte, []int) {
  132. return file_dnstap_proto_rawDescGZIP(), []int{1}
  133. }
  134. // Identifies which field below is filled in.
  135. type Dnstap_Type int32
  136. const (
  137. Dnstap_MESSAGE Dnstap_Type = 1
  138. )
  139. // Enum value maps for Dnstap_Type.
  140. var (
  141. Dnstap_Type_name = map[int32]string{
  142. 1: "MESSAGE",
  143. }
  144. Dnstap_Type_value = map[string]int32{
  145. "MESSAGE": 1,
  146. }
  147. )
  148. func (x Dnstap_Type) Enum() *Dnstap_Type {
  149. p := new(Dnstap_Type)
  150. *p = x
  151. return p
  152. }
  153. func (x Dnstap_Type) String() string {
  154. return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
  155. }
  156. func (Dnstap_Type) Descriptor() protoreflect.EnumDescriptor {
  157. return file_dnstap_proto_enumTypes[2].Descriptor()
  158. }
  159. func (Dnstap_Type) Type() protoreflect.EnumType {
  160. return &file_dnstap_proto_enumTypes[2]
  161. }
  162. func (x Dnstap_Type) Number() protoreflect.EnumNumber {
  163. return protoreflect.EnumNumber(x)
  164. }
  165. // Deprecated: Do not use.
  166. func (x *Dnstap_Type) UnmarshalJSON(b []byte) error {
  167. num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
  168. if err != nil {
  169. return err
  170. }
  171. *x = Dnstap_Type(num)
  172. return nil
  173. }
  174. // Deprecated: Use Dnstap_Type.Descriptor instead.
  175. func (Dnstap_Type) EnumDescriptor() ([]byte, []int) {
  176. return file_dnstap_proto_rawDescGZIP(), []int{0, 0}
  177. }
  178. type Message_Type int32
  179. const (
  180. // AUTH_QUERY is a DNS query message received from a resolver by an
  181. // authoritative name server, from the perspective of the authoritative
  182. // name server.
  183. Message_AUTH_QUERY Message_Type = 1
  184. // AUTH_RESPONSE is a DNS response message sent from an authoritative
  185. // name server to a resolver, from the perspective of the authoritative
  186. // name server.
  187. Message_AUTH_RESPONSE Message_Type = 2
  188. // RESOLVER_QUERY is a DNS query message sent from a resolver to an
  189. // authoritative name server, from the perspective of the resolver.
  190. // Resolvers typically clear the RD (recursion desired) bit when
  191. // sending queries.
  192. Message_RESOLVER_QUERY Message_Type = 3
  193. // RESOLVER_RESPONSE is a DNS response message received from an
  194. // authoritative name server by a resolver, from the perspective of
  195. // the resolver.
  196. Message_RESOLVER_RESPONSE Message_Type = 4
  197. // CLIENT_QUERY is a DNS query message sent from a client to a DNS
  198. // server which is expected to perform further recursion, from the
  199. // perspective of the DNS server. The client may be a stub resolver or
  200. // forwarder or some other type of software which typically sets the RD
  201. // (recursion desired) bit when querying the DNS server. The DNS server
  202. // may be a simple forwarding proxy or it may be a full recursive
  203. // resolver.
  204. Message_CLIENT_QUERY Message_Type = 5
  205. // CLIENT_RESPONSE is a DNS response message sent from a DNS server to
  206. // a client, from the perspective of the DNS server. The DNS server
  207. // typically sets the RA (recursion available) bit when responding.
  208. Message_CLIENT_RESPONSE Message_Type = 6
  209. // FORWARDER_QUERY is a DNS query message sent from a downstream DNS
  210. // server to an upstream DNS server which is expected to perform
  211. // further recursion, from the perspective of the downstream DNS
  212. // server.
  213. Message_FORWARDER_QUERY Message_Type = 7
  214. // FORWARDER_RESPONSE is a DNS response message sent from an upstream
  215. // DNS server performing recursion to a downstream DNS server, from the
  216. // perspective of the downstream DNS server.
  217. Message_FORWARDER_RESPONSE Message_Type = 8
  218. // STUB_QUERY is a DNS query message sent from a stub resolver to a DNS
  219. // server, from the perspective of the stub resolver.
  220. Message_STUB_QUERY Message_Type = 9
  221. // STUB_RESPONSE is a DNS response message sent from a DNS server to a
  222. // stub resolver, from the perspective of the stub resolver.
  223. Message_STUB_RESPONSE Message_Type = 10
  224. // TOOL_QUERY is a DNS query message sent from a DNS software tool to a
  225. // DNS server, from the perspective of the tool.
  226. Message_TOOL_QUERY Message_Type = 11
  227. // TOOL_RESPONSE is a DNS response message received by a DNS software
  228. // tool from a DNS server, from the perspective of the tool.
  229. Message_TOOL_RESPONSE Message_Type = 12
  230. // UPDATE_QUERY is a DNS update query message received from a resolver
  231. // by an authoritative name server, from the perspective of the
  232. // authoritative name server.
  233. Message_UPDATE_QUERY Message_Type = 13
  234. // UPDATE_RESPONSE is a DNS update response message sent from an
  235. // authoritative name server to a resolver, from the perspective of the
  236. // authoritative name server.
  237. Message_UPDATE_RESPONSE Message_Type = 14
  238. )
  239. // Enum value maps for Message_Type.
  240. var (
  241. Message_Type_name = map[int32]string{
  242. 1: "AUTH_QUERY",
  243. 2: "AUTH_RESPONSE",
  244. 3: "RESOLVER_QUERY",
  245. 4: "RESOLVER_RESPONSE",
  246. 5: "CLIENT_QUERY",
  247. 6: "CLIENT_RESPONSE",
  248. 7: "FORWARDER_QUERY",
  249. 8: "FORWARDER_RESPONSE",
  250. 9: "STUB_QUERY",
  251. 10: "STUB_RESPONSE",
  252. 11: "TOOL_QUERY",
  253. 12: "TOOL_RESPONSE",
  254. 13: "UPDATE_QUERY",
  255. 14: "UPDATE_RESPONSE",
  256. }
  257. Message_Type_value = map[string]int32{
  258. "AUTH_QUERY": 1,
  259. "AUTH_RESPONSE": 2,
  260. "RESOLVER_QUERY": 3,
  261. "RESOLVER_RESPONSE": 4,
  262. "CLIENT_QUERY": 5,
  263. "CLIENT_RESPONSE": 6,
  264. "FORWARDER_QUERY": 7,
  265. "FORWARDER_RESPONSE": 8,
  266. "STUB_QUERY": 9,
  267. "STUB_RESPONSE": 10,
  268. "TOOL_QUERY": 11,
  269. "TOOL_RESPONSE": 12,
  270. "UPDATE_QUERY": 13,
  271. "UPDATE_RESPONSE": 14,
  272. }
  273. )
  274. func (x Message_Type) Enum() *Message_Type {
  275. p := new(Message_Type)
  276. *p = x
  277. return p
  278. }
  279. func (x Message_Type) String() string {
  280. return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
  281. }
  282. func (Message_Type) Descriptor() protoreflect.EnumDescriptor {
  283. return file_dnstap_proto_enumTypes[3].Descriptor()
  284. }
  285. func (Message_Type) Type() protoreflect.EnumType {
  286. return &file_dnstap_proto_enumTypes[3]
  287. }
  288. func (x Message_Type) Number() protoreflect.EnumNumber {
  289. return protoreflect.EnumNumber(x)
  290. }
  291. // Deprecated: Do not use.
  292. func (x *Message_Type) UnmarshalJSON(b []byte) error {
  293. num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
  294. if err != nil {
  295. return err
  296. }
  297. *x = Message_Type(num)
  298. return nil
  299. }
  300. // Deprecated: Use Message_Type.Descriptor instead.
  301. func (Message_Type) EnumDescriptor() ([]byte, []int) {
  302. return file_dnstap_proto_rawDescGZIP(), []int{1, 0}
  303. }
  304. // "Dnstap": this is the top-level dnstap type, which is a "union" type that
  305. // contains other kinds of dnstap payloads, although currently only one type
  306. // of dnstap payload is defined.
  307. // See: https://developers.google.com/protocol-buffers/docs/techniques#union
  308. type Dnstap struct {
  309. state protoimpl.MessageState
  310. sizeCache protoimpl.SizeCache
  311. unknownFields protoimpl.UnknownFields
  312. // DNS server identity.
  313. // If enabled, this is the identity string of the DNS server which generated
  314. // this message. Typically this would be the same string as returned by an
  315. // "NSID" (RFC 5001) query.
  316. Identity []byte `protobuf:"bytes,1,opt,name=identity" json:"identity,omitempty"`
  317. // DNS server version.
  318. // If enabled, this is the version string of the DNS server which generated
  319. // this message. Typically this would be the same string as returned by a
  320. // "version.bind" query.
  321. Version []byte `protobuf:"bytes,2,opt,name=version" json:"version,omitempty"`
  322. // Extra data for this payload.
  323. // This field can be used for adding an arbitrary byte-string annotation to
  324. // the payload. No encoding or interpretation is applied or enforced.
  325. Extra []byte `protobuf:"bytes,3,opt,name=extra" json:"extra,omitempty"`
  326. Type *Dnstap_Type `protobuf:"varint,15,req,name=type,enum=dnstap.Dnstap_Type" json:"type,omitempty"`
  327. // One of the following will be filled in.
  328. Message *Message `protobuf:"bytes,14,opt,name=message" json:"message,omitempty"`
  329. }
  330. func (x *Dnstap) Reset() {
  331. *x = Dnstap{}
  332. if protoimpl.UnsafeEnabled {
  333. mi := &file_dnstap_proto_msgTypes[0]
  334. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  335. ms.StoreMessageInfo(mi)
  336. }
  337. }
  338. func (x *Dnstap) String() string {
  339. return protoimpl.X.MessageStringOf(x)
  340. }
  341. func (*Dnstap) ProtoMessage() {}
  342. func (x *Dnstap) ProtoReflect() protoreflect.Message {
  343. mi := &file_dnstap_proto_msgTypes[0]
  344. if protoimpl.UnsafeEnabled && x != nil {
  345. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  346. if ms.LoadMessageInfo() == nil {
  347. ms.StoreMessageInfo(mi)
  348. }
  349. return ms
  350. }
  351. return mi.MessageOf(x)
  352. }
  353. // Deprecated: Use Dnstap.ProtoReflect.Descriptor instead.
  354. func (*Dnstap) Descriptor() ([]byte, []int) {
  355. return file_dnstap_proto_rawDescGZIP(), []int{0}
  356. }
  357. func (x *Dnstap) GetIdentity() []byte {
  358. if x != nil {
  359. return x.Identity
  360. }
  361. return nil
  362. }
  363. func (x *Dnstap) GetVersion() []byte {
  364. if x != nil {
  365. return x.Version
  366. }
  367. return nil
  368. }
  369. func (x *Dnstap) GetExtra() []byte {
  370. if x != nil {
  371. return x.Extra
  372. }
  373. return nil
  374. }
  375. func (x *Dnstap) GetType() Dnstap_Type {
  376. if x != nil && x.Type != nil {
  377. return *x.Type
  378. }
  379. return Dnstap_MESSAGE
  380. }
  381. func (x *Dnstap) GetMessage() *Message {
  382. if x != nil {
  383. return x.Message
  384. }
  385. return nil
  386. }
  387. // Message: a wire-format (RFC 1035 section 4) DNS message and associated
  388. // metadata. Applications generating "Message" payloads should follow
  389. // certain requirements based on the MessageType, see below.
  390. type Message struct {
  391. state protoimpl.MessageState
  392. sizeCache protoimpl.SizeCache
  393. unknownFields protoimpl.UnknownFields
  394. // One of the Type values described above.
  395. Type *Message_Type `protobuf:"varint,1,req,name=type,enum=dnstap.Message_Type" json:"type,omitempty"`
  396. // One of the SocketFamily values described above.
  397. SocketFamily *SocketFamily `protobuf:"varint,2,opt,name=socket_family,json=socketFamily,enum=dnstap.SocketFamily" json:"socket_family,omitempty"`
  398. // One of the SocketProtocol values described above.
  399. SocketProtocol *SocketProtocol `protobuf:"varint,3,opt,name=socket_protocol,json=socketProtocol,enum=dnstap.SocketProtocol" json:"socket_protocol,omitempty"`
  400. // The network address of the message initiator.
  401. // For SocketFamily INET, this field is 4 octets (IPv4 address).
  402. // For SocketFamily INET6, this field is 16 octets (IPv6 address).
  403. QueryAddress []byte `protobuf:"bytes,4,opt,name=query_address,json=queryAddress" json:"query_address,omitempty"`
  404. // The network address of the message responder.
  405. // For SocketFamily INET, this field is 4 octets (IPv4 address).
  406. // For SocketFamily INET6, this field is 16 octets (IPv6 address).
  407. ResponseAddress []byte `protobuf:"bytes,5,opt,name=response_address,json=responseAddress" json:"response_address,omitempty"`
  408. // The transport port of the message initiator.
  409. // This is a 16-bit UDP or TCP port number, depending on SocketProtocol.
  410. QueryPort *uint32 `protobuf:"varint,6,opt,name=query_port,json=queryPort" json:"query_port,omitempty"`
  411. // The transport port of the message responder.
  412. // This is a 16-bit UDP or TCP port number, depending on SocketProtocol.
  413. ResponsePort *uint32 `protobuf:"varint,7,opt,name=response_port,json=responsePort" json:"response_port,omitempty"`
  414. // The time at which the DNS query message was sent or received, depending
  415. // on whether this is an AUTH_QUERY, RESOLVER_QUERY, or CLIENT_QUERY.
  416. // This is the number of seconds since the UNIX epoch.
  417. QueryTimeSec *uint64 `protobuf:"varint,8,opt,name=query_time_sec,json=queryTimeSec" json:"query_time_sec,omitempty"`
  418. // The time at which the DNS query message was sent or received.
  419. // This is the seconds fraction, expressed as a count of nanoseconds.
  420. QueryTimeNsec *uint32 `protobuf:"fixed32,9,opt,name=query_time_nsec,json=queryTimeNsec" json:"query_time_nsec,omitempty"`
  421. // The initiator's original wire-format DNS query message, verbatim.
  422. QueryMessage []byte `protobuf:"bytes,10,opt,name=query_message,json=queryMessage" json:"query_message,omitempty"`
  423. // The "zone" or "bailiwick" pertaining to the DNS query message.
  424. // This is a wire-format DNS domain name.
  425. QueryZone []byte `protobuf:"bytes,11,opt,name=query_zone,json=queryZone" json:"query_zone,omitempty"`
  426. // The time at which the DNS response message was sent or received,
  427. // depending on whether this is an AUTH_RESPONSE, RESOLVER_RESPONSE, or
  428. // CLIENT_RESPONSE.
  429. // This is the number of seconds since the UNIX epoch.
  430. ResponseTimeSec *uint64 `protobuf:"varint,12,opt,name=response_time_sec,json=responseTimeSec" json:"response_time_sec,omitempty"`
  431. // The time at which the DNS response message was sent or received.
  432. // This is the seconds fraction, expressed as a count of nanoseconds.
  433. ResponseTimeNsec *uint32 `protobuf:"fixed32,13,opt,name=response_time_nsec,json=responseTimeNsec" json:"response_time_nsec,omitempty"`
  434. // The responder's original wire-format DNS response message, verbatim.
  435. ResponseMessage []byte `protobuf:"bytes,14,opt,name=response_message,json=responseMessage" json:"response_message,omitempty"`
  436. }
  437. func (x *Message) Reset() {
  438. *x = Message{}
  439. if protoimpl.UnsafeEnabled {
  440. mi := &file_dnstap_proto_msgTypes[1]
  441. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  442. ms.StoreMessageInfo(mi)
  443. }
  444. }
  445. func (x *Message) String() string {
  446. return protoimpl.X.MessageStringOf(x)
  447. }
  448. func (*Message) ProtoMessage() {}
  449. func (x *Message) ProtoReflect() protoreflect.Message {
  450. mi := &file_dnstap_proto_msgTypes[1]
  451. if protoimpl.UnsafeEnabled && x != nil {
  452. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  453. if ms.LoadMessageInfo() == nil {
  454. ms.StoreMessageInfo(mi)
  455. }
  456. return ms
  457. }
  458. return mi.MessageOf(x)
  459. }
  460. // Deprecated: Use Message.ProtoReflect.Descriptor instead.
  461. func (*Message) Descriptor() ([]byte, []int) {
  462. return file_dnstap_proto_rawDescGZIP(), []int{1}
  463. }
  464. func (x *Message) GetType() Message_Type {
  465. if x != nil && x.Type != nil {
  466. return *x.Type
  467. }
  468. return Message_AUTH_QUERY
  469. }
  470. func (x *Message) GetSocketFamily() SocketFamily {
  471. if x != nil && x.SocketFamily != nil {
  472. return *x.SocketFamily
  473. }
  474. return SocketFamily_INET
  475. }
  476. func (x *Message) GetSocketProtocol() SocketProtocol {
  477. if x != nil && x.SocketProtocol != nil {
  478. return *x.SocketProtocol
  479. }
  480. return SocketProtocol_UDP
  481. }
  482. func (x *Message) GetQueryAddress() []byte {
  483. if x != nil {
  484. return x.QueryAddress
  485. }
  486. return nil
  487. }
  488. func (x *Message) GetResponseAddress() []byte {
  489. if x != nil {
  490. return x.ResponseAddress
  491. }
  492. return nil
  493. }
  494. func (x *Message) GetQueryPort() uint32 {
  495. if x != nil && x.QueryPort != nil {
  496. return *x.QueryPort
  497. }
  498. return 0
  499. }
  500. func (x *Message) GetResponsePort() uint32 {
  501. if x != nil && x.ResponsePort != nil {
  502. return *x.ResponsePort
  503. }
  504. return 0
  505. }
  506. func (x *Message) GetQueryTimeSec() uint64 {
  507. if x != nil && x.QueryTimeSec != nil {
  508. return *x.QueryTimeSec
  509. }
  510. return 0
  511. }
  512. func (x *Message) GetQueryTimeNsec() uint32 {
  513. if x != nil && x.QueryTimeNsec != nil {
  514. return *x.QueryTimeNsec
  515. }
  516. return 0
  517. }
  518. func (x *Message) GetQueryMessage() []byte {
  519. if x != nil {
  520. return x.QueryMessage
  521. }
  522. return nil
  523. }
  524. func (x *Message) GetQueryZone() []byte {
  525. if x != nil {
  526. return x.QueryZone
  527. }
  528. return nil
  529. }
  530. func (x *Message) GetResponseTimeSec() uint64 {
  531. if x != nil && x.ResponseTimeSec != nil {
  532. return *x.ResponseTimeSec
  533. }
  534. return 0
  535. }
  536. func (x *Message) GetResponseTimeNsec() uint32 {
  537. if x != nil && x.ResponseTimeNsec != nil {
  538. return *x.ResponseTimeNsec
  539. }
  540. return 0
  541. }
  542. func (x *Message) GetResponseMessage() []byte {
  543. if x != nil {
  544. return x.ResponseMessage
  545. }
  546. return nil
  547. }
  548. var File_dnstap_proto protoreflect.FileDescriptor
  549. var file_dnstap_proto_rawDesc = []byte{
  550. 0x0a, 0x0c, 0x64, 0x6e, 0x73, 0x74, 0x61, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06,
  551. 0x64, 0x6e, 0x73, 0x74, 0x61, 0x70, 0x22, 0xbd, 0x01, 0x0a, 0x06, 0x44, 0x6e, 0x73, 0x74, 0x61,
  552. 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20,
  553. 0x01, 0x28, 0x0c, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x18, 0x0a,
  554. 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07,
  555. 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61,
  556. 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x12, 0x27, 0x0a,
  557. 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0f, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x64, 0x6e,
  558. 0x73, 0x74, 0x61, 0x70, 0x2e, 0x44, 0x6e, 0x73, 0x74, 0x61, 0x70, 0x2e, 0x54, 0x79, 0x70, 0x65,
  559. 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x29, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
  560. 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x64, 0x6e, 0x73, 0x74, 0x61, 0x70,
  561. 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
  562. 0x65, 0x22, 0x13, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x4d, 0x45, 0x53,
  563. 0x53, 0x41, 0x47, 0x45, 0x10, 0x01, 0x22, 0xf2, 0x06, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61,
  564. 0x67, 0x65, 0x12, 0x28, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e,
  565. 0x32, 0x14, 0x2e, 0x64, 0x6e, 0x73, 0x74, 0x61, 0x70, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
  566. 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x39, 0x0a, 0x0d,
  567. 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x18, 0x02, 0x20,
  568. 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x64, 0x6e, 0x73, 0x74, 0x61, 0x70, 0x2e, 0x53, 0x6f, 0x63,
  569. 0x6b, 0x65, 0x74, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x52, 0x0c, 0x73, 0x6f, 0x63, 0x6b, 0x65,
  570. 0x74, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x3f, 0x0a, 0x0f, 0x73, 0x6f, 0x63, 0x6b, 0x65,
  571. 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e,
  572. 0x32, 0x16, 0x2e, 0x64, 0x6e, 0x73, 0x74, 0x61, 0x70, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74,
  573. 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x0e, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74,
  574. 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x23, 0x0a, 0x0d, 0x71, 0x75, 0x65, 0x72,
  575. 0x79, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52,
  576. 0x0c, 0x71, 0x75, 0x65, 0x72, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x29, 0x0a,
  577. 0x10, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73,
  578. 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
  579. 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x72,
  580. 0x79, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x71, 0x75,
  581. 0x65, 0x72, 0x79, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f,
  582. 0x6e, 0x73, 0x65, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c,
  583. 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x24, 0x0a, 0x0e,
  584. 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x18, 0x08,
  585. 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x71, 0x75, 0x65, 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x53,
  586. 0x65, 0x63, 0x12, 0x26, 0x0a, 0x0f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65,
  587. 0x5f, 0x6e, 0x73, 0x65, 0x63, 0x18, 0x09, 0x20, 0x01, 0x28, 0x07, 0x52, 0x0d, 0x71, 0x75, 0x65,
  588. 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x4e, 0x73, 0x65, 0x63, 0x12, 0x23, 0x0a, 0x0d, 0x71, 0x75,
  589. 0x65, 0x72, 0x79, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28,
  590. 0x0c, 0x52, 0x0c, 0x71, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12,
  591. 0x1d, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x0b, 0x20,
  592. 0x01, 0x28, 0x0c, 0x52, 0x09, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5a, 0x6f, 0x6e, 0x65, 0x12, 0x2a,
  593. 0x0a, 0x11, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f,
  594. 0x73, 0x65, 0x63, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f,
  595. 0x6e, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x63, 0x12, 0x2c, 0x0a, 0x12, 0x72, 0x65,
  596. 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6e, 0x73, 0x65, 0x63,
  597. 0x18, 0x0d, 0x20, 0x01, 0x28, 0x07, 0x52, 0x10, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
  598. 0x54, 0x69, 0x6d, 0x65, 0x4e, 0x73, 0x65, 0x63, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x70,
  599. 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0e, 0x20, 0x01,
  600. 0x28, 0x0c, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73,
  601. 0x61, 0x67, 0x65, 0x22, 0x95, 0x02, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x0a,
  602. 0x41, 0x55, 0x54, 0x48, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d,
  603. 0x41, 0x55, 0x54, 0x48, 0x5f, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x10, 0x02, 0x12,
  604. 0x12, 0x0a, 0x0e, 0x52, 0x45, 0x53, 0x4f, 0x4c, 0x56, 0x45, 0x52, 0x5f, 0x51, 0x55, 0x45, 0x52,
  605. 0x59, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, 0x53, 0x4f, 0x4c, 0x56, 0x45, 0x52, 0x5f,
  606. 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x0c, 0x43, 0x4c,
  607. 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x10, 0x05, 0x12, 0x13, 0x0a, 0x0f,
  608. 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x10,
  609. 0x06, 0x12, 0x13, 0x0a, 0x0f, 0x46, 0x4f, 0x52, 0x57, 0x41, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x51,
  610. 0x55, 0x45, 0x52, 0x59, 0x10, 0x07, 0x12, 0x16, 0x0a, 0x12, 0x46, 0x4f, 0x52, 0x57, 0x41, 0x52,
  611. 0x44, 0x45, 0x52, 0x5f, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x10, 0x08, 0x12, 0x0e,
  612. 0x0a, 0x0a, 0x53, 0x54, 0x55, 0x42, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x10, 0x09, 0x12, 0x11,
  613. 0x0a, 0x0d, 0x53, 0x54, 0x55, 0x42, 0x5f, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x10,
  614. 0x0a, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x4f, 0x4f, 0x4c, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x10,
  615. 0x0b, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x4f, 0x4f, 0x4c, 0x5f, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e,
  616. 0x53, 0x45, 0x10, 0x0c, 0x12, 0x10, 0x0a, 0x0c, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x51,
  617. 0x55, 0x45, 0x52, 0x59, 0x10, 0x0d, 0x12, 0x13, 0x0a, 0x0f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45,
  618. 0x5f, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x10, 0x0e, 0x2a, 0x23, 0x0a, 0x0c, 0x53,
  619. 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x08, 0x0a, 0x04, 0x49,
  620. 0x4e, 0x45, 0x54, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x4e, 0x45, 0x54, 0x36, 0x10, 0x02,
  621. 0x2a, 0x34, 0x0a, 0x0e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63,
  622. 0x6f, 0x6c, 0x12, 0x07, 0x0a, 0x03, 0x55, 0x44, 0x50, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x54,
  623. 0x43, 0x50, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x4f, 0x54, 0x10, 0x03, 0x12, 0x07, 0x0a,
  624. 0x03, 0x44, 0x4f, 0x48, 0x10, 0x04, 0x42, 0x28, 0x5a, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
  625. 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x6e, 0x73, 0x74, 0x61, 0x70, 0x2f, 0x67, 0x6f, 0x6c, 0x61,
  626. 0x6e, 0x67, 0x2d, 0x64, 0x6e, 0x73, 0x74, 0x61, 0x70, 0x3b, 0x64, 0x6e, 0x73, 0x74, 0x61, 0x70,
  627. }
  628. var (
  629. file_dnstap_proto_rawDescOnce sync.Once
  630. file_dnstap_proto_rawDescData = file_dnstap_proto_rawDesc
  631. )
  632. func file_dnstap_proto_rawDescGZIP() []byte {
  633. file_dnstap_proto_rawDescOnce.Do(func() {
  634. file_dnstap_proto_rawDescData = protoimpl.X.CompressGZIP(file_dnstap_proto_rawDescData)
  635. })
  636. return file_dnstap_proto_rawDescData
  637. }
  638. var file_dnstap_proto_enumTypes = make([]protoimpl.EnumInfo, 4)
  639. var file_dnstap_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
  640. var file_dnstap_proto_goTypes = []interface{}{
  641. (SocketFamily)(0), // 0: dnstap.SocketFamily
  642. (SocketProtocol)(0), // 1: dnstap.SocketProtocol
  643. (Dnstap_Type)(0), // 2: dnstap.Dnstap.Type
  644. (Message_Type)(0), // 3: dnstap.Message.Type
  645. (*Dnstap)(nil), // 4: dnstap.Dnstap
  646. (*Message)(nil), // 5: dnstap.Message
  647. }
  648. var file_dnstap_proto_depIdxs = []int32{
  649. 2, // 0: dnstap.Dnstap.type:type_name -> dnstap.Dnstap.Type
  650. 5, // 1: dnstap.Dnstap.message:type_name -> dnstap.Message
  651. 3, // 2: dnstap.Message.type:type_name -> dnstap.Message.Type
  652. 0, // 3: dnstap.Message.socket_family:type_name -> dnstap.SocketFamily
  653. 1, // 4: dnstap.Message.socket_protocol:type_name -> dnstap.SocketProtocol
  654. 5, // [5:5] is the sub-list for method output_type
  655. 5, // [5:5] is the sub-list for method input_type
  656. 5, // [5:5] is the sub-list for extension type_name
  657. 5, // [5:5] is the sub-list for extension extendee
  658. 0, // [0:5] is the sub-list for field type_name
  659. }
  660. func init() { file_dnstap_proto_init() }
  661. func file_dnstap_proto_init() {
  662. if File_dnstap_proto != nil {
  663. return
  664. }
  665. if !protoimpl.UnsafeEnabled {
  666. file_dnstap_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  667. switch v := v.(*Dnstap); i {
  668. case 0:
  669. return &v.state
  670. case 1:
  671. return &v.sizeCache
  672. case 2:
  673. return &v.unknownFields
  674. default:
  675. return nil
  676. }
  677. }
  678. file_dnstap_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  679. switch v := v.(*Message); i {
  680. case 0:
  681. return &v.state
  682. case 1:
  683. return &v.sizeCache
  684. case 2:
  685. return &v.unknownFields
  686. default:
  687. return nil
  688. }
  689. }
  690. }
  691. type x struct{}
  692. out := protoimpl.TypeBuilder{
  693. File: protoimpl.DescBuilder{
  694. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  695. RawDescriptor: file_dnstap_proto_rawDesc,
  696. NumEnums: 4,
  697. NumMessages: 2,
  698. NumExtensions: 0,
  699. NumServices: 0,
  700. },
  701. GoTypes: file_dnstap_proto_goTypes,
  702. DependencyIndexes: file_dnstap_proto_depIdxs,
  703. EnumInfos: file_dnstap_proto_enumTypes,
  704. MessageInfos: file_dnstap_proto_msgTypes,
  705. }.Build()
  706. File_dnstap_proto = out.File
  707. file_dnstap_proto_rawDesc = nil
  708. file_dnstap_proto_goTypes = nil
  709. file_dnstap_proto_depIdxs = nil
  710. }