#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_imports)]
#![allow(unused_results)]
#[derive(PartialEq,Clone,Default)]
pub struct Dnstap {
identity: ::protobuf::SingularField<::std::vec::Vec<u8>>,
version: ::protobuf::SingularField<::std::vec::Vec<u8>>,
extra: ::protobuf::SingularField<::std::vec::Vec<u8>>,
field_type: ::std::option::Option<Dnstap_Type>,
pub message: ::protobuf::SingularPtrField<Message>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a Dnstap {
fn default() -> &'a Dnstap {
<Dnstap as ::protobuf::Message>::default_instance()
}
}
impl Dnstap {
pub fn new() -> Dnstap {
::std::default::Default::default()
}
pub fn get_identity(&self) -> &[u8] {
match self.identity.as_ref() {
Some(v) => &v,
None => &[],
}
}
pub fn clear_identity(&mut self) {
self.identity.clear();
}
pub fn has_identity(&self) -> bool {
self.identity.is_some()
}
pub fn set_identity(&mut self, v: ::std::vec::Vec<u8>) {
self.identity = ::protobuf::SingularField::some(v);
}
pub fn mut_identity(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.identity.is_none() {
self.identity.set_default();
}
self.identity.as_mut().unwrap()
}
pub fn take_identity(&mut self) -> ::std::vec::Vec<u8> {
self.identity.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
pub fn get_version(&self) -> &[u8] {
match self.version.as_ref() {
Some(v) => &v,
None => &[],
}
}
pub fn clear_version(&mut self) {
self.version.clear();
}
pub fn has_version(&self) -> bool {
self.version.is_some()
}
pub fn set_version(&mut self, v: ::std::vec::Vec<u8>) {
self.version = ::protobuf::SingularField::some(v);
}
pub fn mut_version(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.version.is_none() {
self.version.set_default();
}
self.version.as_mut().unwrap()
}
pub fn take_version(&mut self) -> ::std::vec::Vec<u8> {
self.version.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
pub fn get_extra(&self) -> &[u8] {
match self.extra.as_ref() {
Some(v) => &v,
None => &[],
}
}
pub fn clear_extra(&mut self) {
self.extra.clear();
}
pub fn has_extra(&self) -> bool {
self.extra.is_some()
}
pub fn set_extra(&mut self, v: ::std::vec::Vec<u8>) {
self.extra = ::protobuf::SingularField::some(v);
}
pub fn mut_extra(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.extra.is_none() {
self.extra.set_default();
}
self.extra.as_mut().unwrap()
}
pub fn take_extra(&mut self) -> ::std::vec::Vec<u8> {
self.extra.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
pub fn get_field_type(&self) -> Dnstap_Type {
self.field_type.unwrap_or(Dnstap_Type::MESSAGE)
}
pub fn clear_field_type(&mut self) {
self.field_type = ::std::option::Option::None;
}
pub fn has_field_type(&self) -> bool {
self.field_type.is_some()
}
pub fn set_field_type(&mut self, v: Dnstap_Type) {
self.field_type = ::std::option::Option::Some(v);
}
pub fn get_message(&self) -> &Message {
self.message.as_ref().unwrap_or_else(|| <Message as ::protobuf::Message>::default_instance())
}
pub fn clear_message(&mut self) {
self.message.clear();
}
pub fn has_message(&self) -> bool {
self.message.is_some()
}
pub fn set_message(&mut self, v: Message) {
self.message = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_message(&mut self) -> &mut Message {
if self.message.is_none() {
self.message.set_default();
}
self.message.as_mut().unwrap()
}
pub fn take_message(&mut self) -> Message {
self.message.take().unwrap_or_else(|| Message::new())
}
}
impl ::protobuf::Message for Dnstap {
fn is_initialized(&self) -> bool {
if self.field_type.is_none() {
return false;
}
for v in &self.message {
if !v.is_initialized() {
return false;
}
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.identity)?;
},
2 => {
::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.version)?;
},
3 => {
::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.extra)?;
},
15 => {
::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.field_type, 15, &mut self.unknown_fields)?
},
14 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.message)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if let Some(ref v) = self.identity.as_ref() {
my_size += ::protobuf::rt::bytes_size(1, &v);
}
if let Some(ref v) = self.version.as_ref() {
my_size += ::protobuf::rt::bytes_size(2, &v);
}
if let Some(ref v) = self.extra.as_ref() {
my_size += ::protobuf::rt::bytes_size(3, &v);
}
if let Some(v) = self.field_type {
my_size += ::protobuf::rt::enum_size(15, v);
}
if let Some(ref v) = self.message.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if let Some(ref v) = self.identity.as_ref() {
os.write_bytes(1, &v)?;
}
if let Some(ref v) = self.version.as_ref() {
os.write_bytes(2, &v)?;
}
if let Some(ref v) = self.extra.as_ref() {
os.write_bytes(3, &v)?;
}
if let Some(v) = self.field_type {
os.write_enum(15, ::protobuf::ProtobufEnum::value(&v))?;
}
if let Some(ref v) = self.message.as_ref() {
os.write_tag(14, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> Dnstap {
Dnstap::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"identity",
|m: &Dnstap| { &m.identity },
|m: &mut Dnstap| { &mut m.identity },
));
fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"version",
|m: &Dnstap| { &m.version },
|m: &mut Dnstap| { &mut m.version },
));
fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"extra",
|m: &Dnstap| { &m.extra },
|m: &mut Dnstap| { &mut m.extra },
));
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum<Dnstap_Type>>(
"type",
|m: &Dnstap| { &m.field_type },
|m: &mut Dnstap| { &mut m.field_type },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Message>>(
"message",
|m: &Dnstap| { &m.message },
|m: &mut Dnstap| { &mut m.message },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<Dnstap>(
"Dnstap",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static Dnstap {
static instance: ::protobuf::rt::LazyV2<Dnstap> = ::protobuf::rt::LazyV2::INIT;
instance.get(Dnstap::new)
}
}
impl ::protobuf::Clear for Dnstap {
fn clear(&mut self) {
self.identity.clear();
self.version.clear();
self.extra.clear();
self.field_type = ::std::option::Option::None;
self.message.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for Dnstap {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for Dnstap {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum Dnstap_Type {
MESSAGE = 1,
}
impl ::protobuf::ProtobufEnum for Dnstap_Type {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<Dnstap_Type> {
match value {
1 => ::std::option::Option::Some(Dnstap_Type::MESSAGE),
_ => ::std::option::Option::None
}
}
fn values() -> &'static [Self] {
static values: &'static [Dnstap_Type] = &[
Dnstap_Type::MESSAGE,
];
values
}
fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
::protobuf::reflect::EnumDescriptor::new_pb_name::<Dnstap_Type>("Dnstap.Type", file_descriptor_proto())
})
}
}
impl ::std::marker::Copy for Dnstap_Type {
}
impl ::std::default::Default for Dnstap_Type {
fn default() -> Self {
Dnstap_Type::MESSAGE
}
}
impl ::protobuf::reflect::ProtobufValue for Dnstap_Type {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
}
}
#[derive(PartialEq,Clone,Default)]
pub struct Message {
field_type: ::std::option::Option<Message_Type>,
socket_family: ::std::option::Option<SocketFamily>,
socket_protocol: ::std::option::Option<SocketProtocol>,
query_address: ::protobuf::SingularField<::std::vec::Vec<u8>>,
response_address: ::protobuf::SingularField<::std::vec::Vec<u8>>,
query_port: ::std::option::Option<u32>,
response_port: ::std::option::Option<u32>,
query_time_sec: ::std::option::Option<u64>,
query_time_nsec: ::std::option::Option<u32>,
query_message: ::protobuf::SingularField<::std::vec::Vec<u8>>,
query_zone: ::protobuf::SingularField<::std::vec::Vec<u8>>,
response_time_sec: ::std::option::Option<u64>,
response_time_nsec: ::std::option::Option<u32>,
response_message: ::protobuf::SingularField<::std::vec::Vec<u8>>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a Message {
fn default() -> &'a Message {
<Message as ::protobuf::Message>::default_instance()
}
}
impl Message {
pub fn new() -> Message {
::std::default::Default::default()
}
pub fn get_field_type(&self) -> Message_Type {
self.field_type.unwrap_or(Message_Type::AUTH_QUERY)
}
pub fn clear_field_type(&mut self) {
self.field_type = ::std::option::Option::None;
}
pub fn has_field_type(&self) -> bool {
self.field_type.is_some()
}
pub fn set_field_type(&mut self, v: Message_Type) {
self.field_type = ::std::option::Option::Some(v);
}
pub fn get_socket_family(&self) -> SocketFamily {
self.socket_family.unwrap_or(SocketFamily::INET)
}
pub fn clear_socket_family(&mut self) {
self.socket_family = ::std::option::Option::None;
}
pub fn has_socket_family(&self) -> bool {
self.socket_family.is_some()
}
pub fn set_socket_family(&mut self, v: SocketFamily) {
self.socket_family = ::std::option::Option::Some(v);
}
pub fn get_socket_protocol(&self) -> SocketProtocol {
self.socket_protocol.unwrap_or(SocketProtocol::UDP)
}
pub fn clear_socket_protocol(&mut self) {
self.socket_protocol = ::std::option::Option::None;
}
pub fn has_socket_protocol(&self) -> bool {
self.socket_protocol.is_some()
}
pub fn set_socket_protocol(&mut self, v: SocketProtocol) {
self.socket_protocol = ::std::option::Option::Some(v);
}
pub fn get_query_address(&self) -> &[u8] {
match self.query_address.as_ref() {
Some(v) => &v,
None => &[],
}
}
pub fn clear_query_address(&mut self) {
self.query_address.clear();
}
pub fn has_query_address(&self) -> bool {
self.query_address.is_some()
}
pub fn set_query_address(&mut self, v: ::std::vec::Vec<u8>) {
self.query_address = ::protobuf::SingularField::some(v);
}
pub fn mut_query_address(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.query_address.is_none() {
self.query_address.set_default();
}
self.query_address.as_mut().unwrap()
}
pub fn take_query_address(&mut self) -> ::std::vec::Vec<u8> {
self.query_address.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
pub fn get_response_address(&self) -> &[u8] {
match self.response_address.as_ref() {
Some(v) => &v,
None => &[],
}
}
pub fn clear_response_address(&mut self) {
self.response_address.clear();
}
pub fn has_response_address(&self) -> bool {
self.response_address.is_some()
}
pub fn set_response_address(&mut self, v: ::std::vec::Vec<u8>) {
self.response_address = ::protobuf::SingularField::some(v);
}
pub fn mut_response_address(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.response_address.is_none() {
self.response_address.set_default();
}
self.response_address.as_mut().unwrap()
}
pub fn take_response_address(&mut self) -> ::std::vec::Vec<u8> {
self.response_address.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
pub fn get_query_port(&self) -> u32 {
self.query_port.unwrap_or(0)
}
pub fn clear_query_port(&mut self) {
self.query_port = ::std::option::Option::None;
}
pub fn has_query_port(&self) -> bool {
self.query_port.is_some()
}
pub fn set_query_port(&mut self, v: u32) {
self.query_port = ::std::option::Option::Some(v);
}
pub fn get_response_port(&self) -> u32 {
self.response_port.unwrap_or(0)
}
pub fn clear_response_port(&mut self) {
self.response_port = ::std::option::Option::None;
}
pub fn has_response_port(&self) -> bool {
self.response_port.is_some()
}
pub fn set_response_port(&mut self, v: u32) {
self.response_port = ::std::option::Option::Some(v);
}
pub fn get_query_time_sec(&self) -> u64 {
self.query_time_sec.unwrap_or(0)
}
pub fn clear_query_time_sec(&mut self) {
self.query_time_sec = ::std::option::Option::None;
}
pub fn has_query_time_sec(&self) -> bool {
self.query_time_sec.is_some()
}
pub fn set_query_time_sec(&mut self, v: u64) {
self.query_time_sec = ::std::option::Option::Some(v);
}
pub fn get_query_time_nsec(&self) -> u32 {
self.query_time_nsec.unwrap_or(0)
}
pub fn clear_query_time_nsec(&mut self) {
self.query_time_nsec = ::std::option::Option::None;
}
pub fn has_query_time_nsec(&self) -> bool {
self.query_time_nsec.is_some()
}
pub fn set_query_time_nsec(&mut self, v: u32) {
self.query_time_nsec = ::std::option::Option::Some(v);
}
pub fn get_query_message(&self) -> &[u8] {
match self.query_message.as_ref() {
Some(v) => &v,
None => &[],
}
}
pub fn clear_query_message(&mut self) {
self.query_message.clear();
}
pub fn has_query_message(&self) -> bool {
self.query_message.is_some()
}
pub fn set_query_message(&mut self, v: ::std::vec::Vec<u8>) {
self.query_message = ::protobuf::SingularField::some(v);
}
pub fn mut_query_message(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.query_message.is_none() {
self.query_message.set_default();
}
self.query_message.as_mut().unwrap()
}
pub fn take_query_message(&mut self) -> ::std::vec::Vec<u8> {
self.query_message.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
pub fn get_query_zone(&self) -> &[u8] {
match self.query_zone.as_ref() {
Some(v) => &v,
None => &[],
}
}
pub fn clear_query_zone(&mut self) {
self.query_zone.clear();
}
pub fn has_query_zone(&self) -> bool {
self.query_zone.is_some()
}
pub fn set_query_zone(&mut self, v: ::std::vec::Vec<u8>) {
self.query_zone = ::protobuf::SingularField::some(v);
}
pub fn mut_query_zone(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.query_zone.is_none() {
self.query_zone.set_default();
}
self.query_zone.as_mut().unwrap()
}
pub fn take_query_zone(&mut self) -> ::std::vec::Vec<u8> {
self.query_zone.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
pub fn get_response_time_sec(&self) -> u64 {
self.response_time_sec.unwrap_or(0)
}
pub fn clear_response_time_sec(&mut self) {
self.response_time_sec = ::std::option::Option::None;
}
pub fn has_response_time_sec(&self) -> bool {
self.response_time_sec.is_some()
}
pub fn set_response_time_sec(&mut self, v: u64) {
self.response_time_sec = ::std::option::Option::Some(v);
}
pub fn get_response_time_nsec(&self) -> u32 {
self.response_time_nsec.unwrap_or(0)
}
pub fn clear_response_time_nsec(&mut self) {
self.response_time_nsec = ::std::option::Option::None;
}
pub fn has_response_time_nsec(&self) -> bool {
self.response_time_nsec.is_some()
}
pub fn set_response_time_nsec(&mut self, v: u32) {
self.response_time_nsec = ::std::option::Option::Some(v);
}
pub fn get_response_message(&self) -> &[u8] {
match self.response_message.as_ref() {
Some(v) => &v,
None => &[],
}
}
pub fn clear_response_message(&mut self) {
self.response_message.clear();
}
pub fn has_response_message(&self) -> bool {
self.response_message.is_some()
}
pub fn set_response_message(&mut self, v: ::std::vec::Vec<u8>) {
self.response_message = ::protobuf::SingularField::some(v);
}
pub fn mut_response_message(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.response_message.is_none() {
self.response_message.set_default();
}
self.response_message.as_mut().unwrap()
}
pub fn take_response_message(&mut self) -> ::std::vec::Vec<u8> {
self.response_message.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
}
impl ::protobuf::Message for Message {
fn is_initialized(&self) -> bool {
if self.field_type.is_none() {
return false;
}
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.field_type, 1, &mut self.unknown_fields)?
},
2 => {
::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.socket_family, 2, &mut self.unknown_fields)?
},
3 => {
::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.socket_protocol, 3, &mut self.unknown_fields)?
},
4 => {
::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.query_address)?;
},
5 => {
::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.response_address)?;
},
6 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_uint32()?;
self.query_port = ::std::option::Option::Some(tmp);
},
7 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_uint32()?;
self.response_port = ::std::option::Option::Some(tmp);
},
8 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_uint64()?;
self.query_time_sec = ::std::option::Option::Some(tmp);
},
9 => {
if wire_type != ::protobuf::wire_format::WireTypeFixed32 {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_fixed32()?;
self.query_time_nsec = ::std::option::Option::Some(tmp);
},
10 => {
::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.query_message)?;
},
11 => {
::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.query_zone)?;
},
12 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_uint64()?;
self.response_time_sec = ::std::option::Option::Some(tmp);
},
13 => {
if wire_type != ::protobuf::wire_format::WireTypeFixed32 {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_fixed32()?;
self.response_time_nsec = ::std::option::Option::Some(tmp);
},
14 => {
::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.response_message)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if let Some(v) = self.field_type {
my_size += ::protobuf::rt::enum_size(1, v);
}
if let Some(v) = self.socket_family {
my_size += ::protobuf::rt::enum_size(2, v);
}
if let Some(v) = self.socket_protocol {
my_size += ::protobuf::rt::enum_size(3, v);
}
if let Some(ref v) = self.query_address.as_ref() {
my_size += ::protobuf::rt::bytes_size(4, &v);
}
if let Some(ref v) = self.response_address.as_ref() {
my_size += ::protobuf::rt::bytes_size(5, &v);
}
if let Some(v) = self.query_port {
my_size += ::protobuf::rt::value_size(6, v, ::protobuf::wire_format::WireTypeVarint);
}
if let Some(v) = self.response_port {
my_size += ::protobuf::rt::value_size(7, v, ::protobuf::wire_format::WireTypeVarint);
}
if let Some(v) = self.query_time_sec {
my_size += ::protobuf::rt::value_size(8, v, ::protobuf::wire_format::WireTypeVarint);
}
if let Some(v) = self.query_time_nsec {
my_size += 5;
}
if let Some(ref v) = self.query_message.as_ref() {
my_size += ::protobuf::rt::bytes_size(10, &v);
}
if let Some(ref v) = self.query_zone.as_ref() {
my_size += ::protobuf::rt::bytes_size(11, &v);
}
if let Some(v) = self.response_time_sec {
my_size += ::protobuf::rt::value_size(12, v, ::protobuf::wire_format::WireTypeVarint);
}
if let Some(v) = self.response_time_nsec {
my_size += 5;
}
if let Some(ref v) = self.response_message.as_ref() {
my_size += ::protobuf::rt::bytes_size(14, &v);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if let Some(v) = self.field_type {
os.write_enum(1, ::protobuf::ProtobufEnum::value(&v))?;
}
if let Some(v) = self.socket_family {
os.write_enum(2, ::protobuf::ProtobufEnum::value(&v))?;
}
if let Some(v) = self.socket_protocol {
os.write_enum(3, ::protobuf::ProtobufEnum::value(&v))?;
}
if let Some(ref v) = self.query_address.as_ref() {
os.write_bytes(4, &v)?;
}
if let Some(ref v) = self.response_address.as_ref() {
os.write_bytes(5, &v)?;
}
if let Some(v) = self.query_port {
os.write_uint32(6, v)?;
}
if let Some(v) = self.response_port {
os.write_uint32(7, v)?;
}
if let Some(v) = self.query_time_sec {
os.write_uint64(8, v)?;
}
if let Some(v) = self.query_time_nsec {
os.write_fixed32(9, v)?;
}
if let Some(ref v) = self.query_message.as_ref() {
os.write_bytes(10, &v)?;
}
if let Some(ref v) = self.query_zone.as_ref() {
os.write_bytes(11, &v)?;
}
if let Some(v) = self.response_time_sec {
os.write_uint64(12, v)?;
}
if let Some(v) = self.response_time_nsec {
os.write_fixed32(13, v)?;
}
if let Some(ref v) = self.response_message.as_ref() {
os.write_bytes(14, &v)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> Message {
Message::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum<Message_Type>>(
"type",
|m: &Message| { &m.field_type },
|m: &mut Message| { &mut m.field_type },
));
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum<SocketFamily>>(
"socket_family",
|m: &Message| { &m.socket_family },
|m: &mut Message| { &mut m.socket_family },
));
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum<SocketProtocol>>(
"socket_protocol",
|m: &Message| { &m.socket_protocol },
|m: &mut Message| { &mut m.socket_protocol },
));
fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"query_address",
|m: &Message| { &m.query_address },
|m: &mut Message| { &mut m.query_address },
));
fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"response_address",
|m: &Message| { &m.response_address },
|m: &mut Message| { &mut m.response_address },
));
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
"query_port",
|m: &Message| { &m.query_port },
|m: &mut Message| { &mut m.query_port },
));
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
"response_port",
|m: &Message| { &m.response_port },
|m: &mut Message| { &mut m.response_port },
));
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
"query_time_sec",
|m: &Message| { &m.query_time_sec },
|m: &mut Message| { &mut m.query_time_sec },
));
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeFixed32>(
"query_time_nsec",
|m: &Message| { &m.query_time_nsec },
|m: &mut Message| { &mut m.query_time_nsec },
));
fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"query_message",
|m: &Message| { &m.query_message },
|m: &mut Message| { &mut m.query_message },
));
fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"query_zone",
|m: &Message| { &m.query_zone },
|m: &mut Message| { &mut m.query_zone },
));
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
"response_time_sec",
|m: &Message| { &m.response_time_sec },
|m: &mut Message| { &mut m.response_time_sec },
));
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeFixed32>(
"response_time_nsec",
|m: &Message| { &m.response_time_nsec },
|m: &mut Message| { &mut m.response_time_nsec },
));
fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"response_message",
|m: &Message| { &m.response_message },
|m: &mut Message| { &mut m.response_message },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<Message>(
"Message",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static Message {
static instance: ::protobuf::rt::LazyV2<Message> = ::protobuf::rt::LazyV2::INIT;
instance.get(Message::new)
}
}
impl ::protobuf::Clear for Message {
fn clear(&mut self) {
self.field_type = ::std::option::Option::None;
self.socket_family = ::std::option::Option::None;
self.socket_protocol = ::std::option::Option::None;
self.query_address.clear();
self.response_address.clear();
self.query_port = ::std::option::Option::None;
self.response_port = ::std::option::Option::None;
self.query_time_sec = ::std::option::Option::None;
self.query_time_nsec = ::std::option::Option::None;
self.query_message.clear();
self.query_zone.clear();
self.response_time_sec = ::std::option::Option::None;
self.response_time_nsec = ::std::option::Option::None;
self.response_message.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for Message {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for Message {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum Message_Type {
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,
}
impl ::protobuf::ProtobufEnum for Message_Type {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<Message_Type> {
match value {
1 => ::std::option::Option::Some(Message_Type::AUTH_QUERY),
2 => ::std::option::Option::Some(Message_Type::AUTH_RESPONSE),
3 => ::std::option::Option::Some(Message_Type::RESOLVER_QUERY),
4 => ::std::option::Option::Some(Message_Type::RESOLVER_RESPONSE),
5 => ::std::option::Option::Some(Message_Type::CLIENT_QUERY),
6 => ::std::option::Option::Some(Message_Type::CLIENT_RESPONSE),
7 => ::std::option::Option::Some(Message_Type::FORWARDER_QUERY),
8 => ::std::option::Option::Some(Message_Type::FORWARDER_RESPONSE),
9 => ::std::option::Option::Some(Message_Type::STUB_QUERY),
10 => ::std::option::Option::Some(Message_Type::STUB_RESPONSE),
11 => ::std::option::Option::Some(Message_Type::TOOL_QUERY),
12 => ::std::option::Option::Some(Message_Type::TOOL_RESPONSE),
_ => ::std::option::Option::None
}
}
fn values() -> &'static [Self] {
static values: &'static [Message_Type] = &[
Message_Type::AUTH_QUERY,
Message_Type::AUTH_RESPONSE,
Message_Type::RESOLVER_QUERY,
Message_Type::RESOLVER_RESPONSE,
Message_Type::CLIENT_QUERY,
Message_Type::CLIENT_RESPONSE,
Message_Type::FORWARDER_QUERY,
Message_Type::FORWARDER_RESPONSE,
Message_Type::STUB_QUERY,
Message_Type::STUB_RESPONSE,
Message_Type::TOOL_QUERY,
Message_Type::TOOL_RESPONSE,
];
values
}
fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
::protobuf::reflect::EnumDescriptor::new_pb_name::<Message_Type>("Message.Type", file_descriptor_proto())
})
}
}
impl ::std::marker::Copy for Message_Type {
}
impl ::std::default::Default for Message_Type {
fn default() -> Self {
Message_Type::AUTH_QUERY
}
}
impl ::protobuf::reflect::ProtobufValue for Message_Type {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
}
}
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum SocketFamily {
INET = 1,
INET6 = 2,
}
impl ::protobuf::ProtobufEnum for SocketFamily {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<SocketFamily> {
match value {
1 => ::std::option::Option::Some(SocketFamily::INET),
2 => ::std::option::Option::Some(SocketFamily::INET6),
_ => ::std::option::Option::None
}
}
fn values() -> &'static [Self] {
static values: &'static [SocketFamily] = &[
SocketFamily::INET,
SocketFamily::INET6,
];
values
}
fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
::protobuf::reflect::EnumDescriptor::new_pb_name::<SocketFamily>("SocketFamily", file_descriptor_proto())
})
}
}
impl ::std::marker::Copy for SocketFamily {
}
impl ::std::default::Default for SocketFamily {
fn default() -> Self {
SocketFamily::INET
}
}
impl ::protobuf::reflect::ProtobufValue for SocketFamily {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
}
}
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum SocketProtocol {
UDP = 1,
TCP = 2,
DOT = 3,
DOH = 4,
DNSCryptUDP = 5,
DNSCryptTCP = 6,
}
impl ::protobuf::ProtobufEnum for SocketProtocol {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<SocketProtocol> {
match value {
1 => ::std::option::Option::Some(SocketProtocol::UDP),
2 => ::std::option::Option::Some(SocketProtocol::TCP),
3 => ::std::option::Option::Some(SocketProtocol::DOT),
4 => ::std::option::Option::Some(SocketProtocol::DOH),
5 => ::std::option::Option::Some(SocketProtocol::DNSCryptUDP),
6 => ::std::option::Option::Some(SocketProtocol::DNSCryptTCP),
_ => ::std::option::Option::None
}
}
fn values() -> &'static [Self] {
static values: &'static [SocketProtocol] = &[
SocketProtocol::UDP,
SocketProtocol::TCP,
SocketProtocol::DOT,
SocketProtocol::DOH,
SocketProtocol::DNSCryptUDP,
SocketProtocol::DNSCryptTCP,
];
values
}
fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
::protobuf::reflect::EnumDescriptor::new_pb_name::<SocketProtocol>("SocketProtocol", file_descriptor_proto())
})
}
}
impl ::std::marker::Copy for SocketProtocol {
}
impl ::std::default::Default for SocketProtocol {
fn default() -> Self {
SocketProtocol::UDP
}
}
impl ::protobuf::reflect::ProtobufValue for SocketProtocol {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x0fdnstap_pb.proto\x12\x06dnstap\"\xcb\x01\n\x06Dnstap\x12\x1c\n\x08i\
dentity\x18\x01\x20\x01(\x0cR\x08identityB\0\x12\x1a\n\x07version\x18\
\x02\x20\x01(\x0cR\x07versionB\0\x12\x16\n\x05extra\x18\x03\x20\x01(\x0c\
R\x05extraB\0\x12)\n\x04type\x18\x0f\x20\x02(\x0e2\x13.dnstap.Dnstap.Typ\
eR\x04typeB\0\x12+\n\x07message\x18\x0e\x20\x01(\x0b2\x0f.dnstap.Message\
R\x07messageB\0\"\x15\n\x04Type\x12\x0b\n\x07MESSAGE\x10\x01\x1a\0:\0\"\
\xeb\x06\n\x07Message\x12*\n\x04type\x18\x01\x20\x02(\x0e2\x14.dnstap.Me\
ssage.TypeR\x04typeB\0\x12;\n\rsocket_family\x18\x02\x20\x01(\x0e2\x14.d\
nstap.SocketFamilyR\x0csocketFamilyB\0\x12A\n\x0fsocket_protocol\x18\x03\
\x20\x01(\x0e2\x16.dnstap.SocketProtocolR\x0esocketProtocolB\0\x12%\n\rq\
uery_address\x18\x04\x20\x01(\x0cR\x0cqueryAddressB\0\x12+\n\x10response\
_address\x18\x05\x20\x01(\x0cR\x0fresponseAddressB\0\x12\x1f\n\nquery_po\
rt\x18\x06\x20\x01(\rR\tqueryPortB\0\x12%\n\rresponse_port\x18\x07\x20\
\x01(\rR\x0cresponsePortB\0\x12&\n\x0equery_time_sec\x18\x08\x20\x01(\
\x04R\x0cqueryTimeSecB\0\x12(\n\x0fquery_time_nsec\x18\t\x20\x01(\x07R\r\
queryTimeNsecB\0\x12%\n\rquery_message\x18\n\x20\x01(\x0cR\x0cqueryMessa\
geB\0\x12\x1f\n\nquery_zone\x18\x0b\x20\x01(\x0cR\tqueryZoneB\0\x12,\n\
\x11response_time_sec\x18\x0c\x20\x01(\x04R\x0fresponseTimeSecB\0\x12.\n\
\x12response_time_nsec\x18\r\x20\x01(\x07R\x10responseTimeNsecB\0\x12+\n\
\x10response_message\x18\x0e\x20\x01(\x0cR\x0fresponseMessageB\0\"\xf0\
\x01\n\x04Type\x12\x0e\n\nAUTH_QUERY\x10\x01\x12\x11\n\rAUTH_RESPONSE\
\x10\x02\x12\x12\n\x0eRESOLVER_QUERY\x10\x03\x12\x15\n\x11RESOLVER_RESPO\
NSE\x10\x04\x12\x10\n\x0cCLIENT_QUERY\x10\x05\x12\x13\n\x0fCLIENT_RESPON\
SE\x10\x06\x12\x13\n\x0fFORWARDER_QUERY\x10\x07\x12\x16\n\x12FORWARDER_R\
ESPONSE\x10\x08\x12\x0e\n\nSTUB_QUERY\x10\t\x12\x11\n\rSTUB_RESPONSE\x10\
\n\x12\x0e\n\nTOOL_QUERY\x10\x0b\x12\x11\n\rTOOL_RESPONSE\x10\x0c\x1a\0:\
\0*%\n\x0cSocketFamily\x12\x08\n\x04INET\x10\x01\x12\t\n\x05INET6\x10\
\x02\x1a\0*X\n\x0eSocketProtocol\x12\x07\n\x03UDP\x10\x01\x12\x07\n\x03T\
CP\x10\x02\x12\x07\n\x03DOT\x10\x03\x12\x07\n\x03DOH\x10\x04\x12\x0f\n\
\x0bDNSCryptUDP\x10\x05\x12\x0f\n\x0bDNSCryptTCP\x10\x06\x1a\0B\0b\x06pr\
oto2\
";
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
}
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}