#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]
#![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_results)]
#![allow(unused_mut)]
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_7_2;
#[derive(PartialEq,Clone,Default,Debug)]
pub struct CrowdSourcedIdsResults {
pub rule_msg: ::std::string::String,
pub rule_category: ::std::string::String,
pub rule_id: ::std::string::String,
pub alert_severity: ::protobuf::EnumOrUnknown<AlertSeverity>,
pub rule_source: ::std::string::String,
pub alert_context: ::protobuf::MessageField<CrowdSourcedIdsAlertContext>,
pub rule_url: ::std::string::String,
pub rule_references: ::std::vec::Vec<::std::string::String>,
pub tags: ::std::vec::Vec<::std::string::String>,
pub rule_raw: ::std::string::String,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a CrowdSourcedIdsResults {
fn default() -> &'a CrowdSourcedIdsResults {
<CrowdSourcedIdsResults as ::protobuf::Message>::default_instance()
}
}
impl CrowdSourcedIdsResults {
pub fn new() -> CrowdSourcedIdsResults {
::std::default::Default::default()
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(10);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"rule_msg",
|m: &CrowdSourcedIdsResults| { &m.rule_msg },
|m: &mut CrowdSourcedIdsResults| { &mut m.rule_msg },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"rule_category",
|m: &CrowdSourcedIdsResults| { &m.rule_category },
|m: &mut CrowdSourcedIdsResults| { &mut m.rule_category },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"rule_id",
|m: &CrowdSourcedIdsResults| { &m.rule_id },
|m: &mut CrowdSourcedIdsResults| { &mut m.rule_id },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"alert_severity",
|m: &CrowdSourcedIdsResults| { &m.alert_severity },
|m: &mut CrowdSourcedIdsResults| { &mut m.alert_severity },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"rule_source",
|m: &CrowdSourcedIdsResults| { &m.rule_source },
|m: &mut CrowdSourcedIdsResults| { &mut m.rule_source },
));
fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, CrowdSourcedIdsAlertContext>(
"alert_context",
|m: &CrowdSourcedIdsResults| { &m.alert_context },
|m: &mut CrowdSourcedIdsResults| { &mut m.alert_context },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"rule_url",
|m: &CrowdSourcedIdsResults| { &m.rule_url },
|m: &mut CrowdSourcedIdsResults| { &mut m.rule_url },
));
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"rule_references",
|m: &CrowdSourcedIdsResults| { &m.rule_references },
|m: &mut CrowdSourcedIdsResults| { &mut m.rule_references },
));
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"tags",
|m: &CrowdSourcedIdsResults| { &m.tags },
|m: &mut CrowdSourcedIdsResults| { &mut m.tags },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"rule_raw",
|m: &CrowdSourcedIdsResults| { &m.rule_raw },
|m: &mut CrowdSourcedIdsResults| { &mut m.rule_raw },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<CrowdSourcedIdsResults>(
"CrowdSourcedIdsResults",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for CrowdSourcedIdsResults {
const NAME: &'static str = "CrowdSourcedIdsResults";
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag {
10 => {
self.rule_msg = is.read_string()?;
},
18 => {
self.rule_category = is.read_string()?;
},
26 => {
self.rule_id = is.read_string()?;
},
32 => {
self.alert_severity = is.read_enum_or_unknown()?;
},
42 => {
self.rule_source = is.read_string()?;
},
50 => {
::protobuf::rt::read_singular_message_into_field(is, &mut self.alert_context)?;
},
58 => {
self.rule_url = is.read_string()?;
},
66 => {
self.rule_references.push(is.read_string()?);
},
74 => {
self.tags.push(is.read_string()?);
},
82 => {
self.rule_raw = is.read_string()?;
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if !self.rule_msg.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.rule_msg);
}
if !self.rule_category.is_empty() {
my_size += ::protobuf::rt::string_size(2, &self.rule_category);
}
if !self.rule_id.is_empty() {
my_size += ::protobuf::rt::string_size(3, &self.rule_id);
}
if self.alert_severity != ::protobuf::EnumOrUnknown::new(AlertSeverity::unset) {
my_size += ::protobuf::rt::int32_size(4, self.alert_severity.value());
}
if !self.rule_source.is_empty() {
my_size += ::protobuf::rt::string_size(5, &self.rule_source);
}
if let Some(v) = self.alert_context.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
}
if !self.rule_url.is_empty() {
my_size += ::protobuf::rt::string_size(7, &self.rule_url);
}
for value in &self.rule_references {
my_size += ::protobuf::rt::string_size(8, &value);
};
for value in &self.tags {
my_size += ::protobuf::rt::string_size(9, &value);
};
if !self.rule_raw.is_empty() {
my_size += ::protobuf::rt::string_size(10, &self.rule_raw);
}
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
self.special_fields.cached_size().set(my_size as u32);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
if !self.rule_msg.is_empty() {
os.write_string(1, &self.rule_msg)?;
}
if !self.rule_category.is_empty() {
os.write_string(2, &self.rule_category)?;
}
if !self.rule_id.is_empty() {
os.write_string(3, &self.rule_id)?;
}
if self.alert_severity != ::protobuf::EnumOrUnknown::new(AlertSeverity::unset) {
os.write_enum(4, ::protobuf::EnumOrUnknown::value(&self.alert_severity))?;
}
if !self.rule_source.is_empty() {
os.write_string(5, &self.rule_source)?;
}
if let Some(v) = self.alert_context.as_ref() {
::protobuf::rt::write_message_field_with_cached_size(6, v, os)?;
}
if !self.rule_url.is_empty() {
os.write_string(7, &self.rule_url)?;
}
for v in &self.rule_references {
os.write_string(8, &v)?;
};
for v in &self.tags {
os.write_string(9, &v)?;
};
if !self.rule_raw.is_empty() {
os.write_string(10, &self.rule_raw)?;
}
os.write_unknown_fields(self.special_fields.unknown_fields())?;
::std::result::Result::Ok(())
}
fn special_fields(&self) -> &::protobuf::SpecialFields {
&self.special_fields
}
fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
&mut self.special_fields
}
fn new() -> CrowdSourcedIdsResults {
CrowdSourcedIdsResults::new()
}
fn clear(&mut self) {
self.rule_msg.clear();
self.rule_category.clear();
self.rule_id.clear();
self.alert_severity = ::protobuf::EnumOrUnknown::new(AlertSeverity::unset);
self.rule_source.clear();
self.alert_context.clear();
self.rule_url.clear();
self.rule_references.clear();
self.tags.clear();
self.rule_raw.clear();
self.special_fields.clear();
}
fn default_instance() -> &'static CrowdSourcedIdsResults {
static instance: CrowdSourcedIdsResults = CrowdSourcedIdsResults {
rule_msg: ::std::string::String::new(),
rule_category: ::std::string::String::new(),
rule_id: ::std::string::String::new(),
alert_severity: ::protobuf::EnumOrUnknown::from_i32(0),
rule_source: ::std::string::String::new(),
alert_context: ::protobuf::MessageField::none(),
rule_url: ::std::string::String::new(),
rule_references: ::std::vec::Vec::new(),
tags: ::std::vec::Vec::new(),
rule_raw: ::std::string::String::new(),
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for CrowdSourcedIdsResults {
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| file_descriptor().message_by_package_relative_name("CrowdSourcedIdsResults").unwrap()).clone()
}
}
impl ::std::fmt::Display for CrowdSourcedIdsResults {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for CrowdSourcedIdsResults {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct CrowdSourcedIdsAlertContext {
pub protocol: ::protobuf::EnumOrUnknown<TransportLayerProtocol>,
pub src_ip: ::std::string::String,
pub src_port: u32,
pub dest_ip: ::std::string::String,
pub dest_port: u32,
pub hostname: ::std::string::String,
pub url: ::std::string::String,
pub ja3: ::std::vec::Vec<::std::string::String>,
pub ja3s: ::std::vec::Vec<::std::string::String>,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a CrowdSourcedIdsAlertContext {
fn default() -> &'a CrowdSourcedIdsAlertContext {
<CrowdSourcedIdsAlertContext as ::protobuf::Message>::default_instance()
}
}
impl CrowdSourcedIdsAlertContext {
pub fn new() -> CrowdSourcedIdsAlertContext {
::std::default::Default::default()
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(9);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"protocol",
|m: &CrowdSourcedIdsAlertContext| { &m.protocol },
|m: &mut CrowdSourcedIdsAlertContext| { &mut m.protocol },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"src_ip",
|m: &CrowdSourcedIdsAlertContext| { &m.src_ip },
|m: &mut CrowdSourcedIdsAlertContext| { &mut m.src_ip },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"src_port",
|m: &CrowdSourcedIdsAlertContext| { &m.src_port },
|m: &mut CrowdSourcedIdsAlertContext| { &mut m.src_port },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"dest_ip",
|m: &CrowdSourcedIdsAlertContext| { &m.dest_ip },
|m: &mut CrowdSourcedIdsAlertContext| { &mut m.dest_ip },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"dest_port",
|m: &CrowdSourcedIdsAlertContext| { &m.dest_port },
|m: &mut CrowdSourcedIdsAlertContext| { &mut m.dest_port },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"hostname",
|m: &CrowdSourcedIdsAlertContext| { &m.hostname },
|m: &mut CrowdSourcedIdsAlertContext| { &mut m.hostname },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"url",
|m: &CrowdSourcedIdsAlertContext| { &m.url },
|m: &mut CrowdSourcedIdsAlertContext| { &mut m.url },
));
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"ja3",
|m: &CrowdSourcedIdsAlertContext| { &m.ja3 },
|m: &mut CrowdSourcedIdsAlertContext| { &mut m.ja3 },
));
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"ja3s",
|m: &CrowdSourcedIdsAlertContext| { &m.ja3s },
|m: &mut CrowdSourcedIdsAlertContext| { &mut m.ja3s },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<CrowdSourcedIdsAlertContext>(
"CrowdSourcedIdsAlertContext",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for CrowdSourcedIdsAlertContext {
const NAME: &'static str = "CrowdSourcedIdsAlertContext";
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag {
8 => {
self.protocol = is.read_enum_or_unknown()?;
},
18 => {
self.src_ip = is.read_string()?;
},
24 => {
self.src_port = is.read_uint32()?;
},
34 => {
self.dest_ip = is.read_string()?;
},
40 => {
self.dest_port = is.read_uint32()?;
},
50 => {
self.hostname = is.read_string()?;
},
58 => {
self.url = is.read_string()?;
},
66 => {
self.ja3.push(is.read_string()?);
},
74 => {
self.ja3s.push(is.read_string()?);
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if self.protocol != ::protobuf::EnumOrUnknown::new(TransportLayerProtocol::UNKNOWN) {
my_size += ::protobuf::rt::int32_size(1, self.protocol.value());
}
if !self.src_ip.is_empty() {
my_size += ::protobuf::rt::string_size(2, &self.src_ip);
}
if self.src_port != 0 {
my_size += ::protobuf::rt::uint32_size(3, self.src_port);
}
if !self.dest_ip.is_empty() {
my_size += ::protobuf::rt::string_size(4, &self.dest_ip);
}
if self.dest_port != 0 {
my_size += ::protobuf::rt::uint32_size(5, self.dest_port);
}
if !self.hostname.is_empty() {
my_size += ::protobuf::rt::string_size(6, &self.hostname);
}
if !self.url.is_empty() {
my_size += ::protobuf::rt::string_size(7, &self.url);
}
for value in &self.ja3 {
my_size += ::protobuf::rt::string_size(8, &value);
};
for value in &self.ja3s {
my_size += ::protobuf::rt::string_size(9, &value);
};
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
self.special_fields.cached_size().set(my_size as u32);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
if self.protocol != ::protobuf::EnumOrUnknown::new(TransportLayerProtocol::UNKNOWN) {
os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.protocol))?;
}
if !self.src_ip.is_empty() {
os.write_string(2, &self.src_ip)?;
}
if self.src_port != 0 {
os.write_uint32(3, self.src_port)?;
}
if !self.dest_ip.is_empty() {
os.write_string(4, &self.dest_ip)?;
}
if self.dest_port != 0 {
os.write_uint32(5, self.dest_port)?;
}
if !self.hostname.is_empty() {
os.write_string(6, &self.hostname)?;
}
if !self.url.is_empty() {
os.write_string(7, &self.url)?;
}
for v in &self.ja3 {
os.write_string(8, &v)?;
};
for v in &self.ja3s {
os.write_string(9, &v)?;
};
os.write_unknown_fields(self.special_fields.unknown_fields())?;
::std::result::Result::Ok(())
}
fn special_fields(&self) -> &::protobuf::SpecialFields {
&self.special_fields
}
fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
&mut self.special_fields
}
fn new() -> CrowdSourcedIdsAlertContext {
CrowdSourcedIdsAlertContext::new()
}
fn clear(&mut self) {
self.protocol = ::protobuf::EnumOrUnknown::new(TransportLayerProtocol::UNKNOWN);
self.src_ip.clear();
self.src_port = 0;
self.dest_ip.clear();
self.dest_port = 0;
self.hostname.clear();
self.url.clear();
self.ja3.clear();
self.ja3s.clear();
self.special_fields.clear();
}
fn default_instance() -> &'static CrowdSourcedIdsAlertContext {
static instance: CrowdSourcedIdsAlertContext = CrowdSourcedIdsAlertContext {
protocol: ::protobuf::EnumOrUnknown::from_i32(0),
src_ip: ::std::string::String::new(),
src_port: 0,
dest_ip: ::std::string::String::new(),
dest_port: 0,
hostname: ::std::string::String::new(),
url: ::std::string::String::new(),
ja3: ::std::vec::Vec::new(),
ja3s: ::std::vec::Vec::new(),
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for CrowdSourcedIdsAlertContext {
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| file_descriptor().message_by_package_relative_name("CrowdSourcedIdsAlertContext").unwrap()).clone()
}
}
impl ::std::fmt::Display for CrowdSourcedIdsAlertContext {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for CrowdSourcedIdsAlertContext {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
pub enum AlertSeverity {
unset = 0,
high = 1,
medium = 2,
low = 3,
info = 4,
}
impl ::protobuf::Enum for AlertSeverity {
const NAME: &'static str = "AlertSeverity";
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<AlertSeverity> {
match value {
0 => ::std::option::Option::Some(AlertSeverity::unset),
1 => ::std::option::Option::Some(AlertSeverity::high),
2 => ::std::option::Option::Some(AlertSeverity::medium),
3 => ::std::option::Option::Some(AlertSeverity::low),
4 => ::std::option::Option::Some(AlertSeverity::info),
_ => ::std::option::Option::None
}
}
fn from_str(str: &str) -> ::std::option::Option<AlertSeverity> {
match str {
"unset" => ::std::option::Option::Some(AlertSeverity::unset),
"high" => ::std::option::Option::Some(AlertSeverity::high),
"medium" => ::std::option::Option::Some(AlertSeverity::medium),
"low" => ::std::option::Option::Some(AlertSeverity::low),
"info" => ::std::option::Option::Some(AlertSeverity::info),
_ => ::std::option::Option::None
}
}
const VALUES: &'static [AlertSeverity] = &[
AlertSeverity::unset,
AlertSeverity::high,
AlertSeverity::medium,
AlertSeverity::low,
AlertSeverity::info,
];
}
impl ::protobuf::EnumFull for AlertSeverity {
fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| file_descriptor().enum_by_package_relative_name("AlertSeverity").unwrap()).clone()
}
fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
let index = *self as usize;
Self::enum_descriptor().value_by_index(index)
}
}
impl ::std::default::Default for AlertSeverity {
fn default() -> Self {
AlertSeverity::unset
}
}
impl AlertSeverity {
fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
::protobuf::reflect::GeneratedEnumDescriptorData::new::<AlertSeverity>("AlertSeverity")
}
}
#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
pub enum TransportLayerProtocol {
UNKNOWN = 0,
ICMP = 1,
IGMP = 2,
TCP = 6,
UDP = 17,
ESP = 50,
AH = 51,
L2TP = 115,
SCTP = 132,
}
impl ::protobuf::Enum for TransportLayerProtocol {
const NAME: &'static str = "TransportLayerProtocol";
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<TransportLayerProtocol> {
match value {
0 => ::std::option::Option::Some(TransportLayerProtocol::UNKNOWN),
1 => ::std::option::Option::Some(TransportLayerProtocol::ICMP),
2 => ::std::option::Option::Some(TransportLayerProtocol::IGMP),
6 => ::std::option::Option::Some(TransportLayerProtocol::TCP),
17 => ::std::option::Option::Some(TransportLayerProtocol::UDP),
50 => ::std::option::Option::Some(TransportLayerProtocol::ESP),
51 => ::std::option::Option::Some(TransportLayerProtocol::AH),
115 => ::std::option::Option::Some(TransportLayerProtocol::L2TP),
132 => ::std::option::Option::Some(TransportLayerProtocol::SCTP),
_ => ::std::option::Option::None
}
}
fn from_str(str: &str) -> ::std::option::Option<TransportLayerProtocol> {
match str {
"UNKNOWN" => ::std::option::Option::Some(TransportLayerProtocol::UNKNOWN),
"ICMP" => ::std::option::Option::Some(TransportLayerProtocol::ICMP),
"IGMP" => ::std::option::Option::Some(TransportLayerProtocol::IGMP),
"TCP" => ::std::option::Option::Some(TransportLayerProtocol::TCP),
"UDP" => ::std::option::Option::Some(TransportLayerProtocol::UDP),
"ESP" => ::std::option::Option::Some(TransportLayerProtocol::ESP),
"AH" => ::std::option::Option::Some(TransportLayerProtocol::AH),
"L2TP" => ::std::option::Option::Some(TransportLayerProtocol::L2TP),
"SCTP" => ::std::option::Option::Some(TransportLayerProtocol::SCTP),
_ => ::std::option::Option::None
}
}
const VALUES: &'static [TransportLayerProtocol] = &[
TransportLayerProtocol::UNKNOWN,
TransportLayerProtocol::ICMP,
TransportLayerProtocol::IGMP,
TransportLayerProtocol::TCP,
TransportLayerProtocol::UDP,
TransportLayerProtocol::ESP,
TransportLayerProtocol::AH,
TransportLayerProtocol::L2TP,
TransportLayerProtocol::SCTP,
];
}
impl ::protobuf::EnumFull for TransportLayerProtocol {
fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| file_descriptor().enum_by_package_relative_name("TransportLayerProtocol").unwrap()).clone()
}
fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
let index = match self {
TransportLayerProtocol::UNKNOWN => 0,
TransportLayerProtocol::ICMP => 1,
TransportLayerProtocol::IGMP => 2,
TransportLayerProtocol::TCP => 3,
TransportLayerProtocol::UDP => 4,
TransportLayerProtocol::ESP => 5,
TransportLayerProtocol::AH => 6,
TransportLayerProtocol::L2TP => 7,
TransportLayerProtocol::SCTP => 8,
};
Self::enum_descriptor().value_by_index(index)
}
}
impl ::std::default::Default for TransportLayerProtocol {
fn default() -> Self {
TransportLayerProtocol::UNKNOWN
}
}
impl TransportLayerProtocol {
fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
::protobuf::reflect::GeneratedEnumDescriptorData::new::<TransportLayerProtocol>("TransportLayerProtocol")
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x1bvt/tools/net_analysis.proto\x12\x15vt.tools.net_analysis\"\xab\x03\
\n\x16CrowdSourcedIdsResults\x12\x19\n\x08rule_msg\x18\x01\x20\x01(\tR\
\x07ruleMsg\x12#\n\rrule_category\x18\x02\x20\x01(\tR\x0cruleCategory\
\x12\x17\n\x07rule_id\x18\x03\x20\x01(\tR\x06ruleId\x12K\n\x0ealert_seve\
rity\x18\x04\x20\x01(\x0e2$.vt.tools.net_analysis.AlertSeverityR\ralertS\
everity\x12\x1f\n\x0brule_source\x18\x05\x20\x01(\tR\nruleSource\x12W\n\
\ralert_context\x18\x06\x20\x01(\x0b22.vt.tools.net_analysis.CrowdSource\
dIdsAlertContextR\x0calertContext\x12\x19\n\x08rule_url\x18\x07\x20\x01(\
\tR\x07ruleUrl\x12'\n\x0frule_references\x18\x08\x20\x03(\tR\x0eruleRefe\
rences\x12\x12\n\x04tags\x18\t\x20\x03(\tR\x04tags\x12\x19\n\x08rule_raw\
\x18\n\x20\x01(\tR\x07ruleRaw\"\xa4\x02\n\x1bCrowdSourcedIdsAlertContext\
\x12I\n\x08protocol\x18\x01\x20\x01(\x0e2-.vt.tools.net_analysis.Transpo\
rtLayerProtocolR\x08protocol\x12\x15\n\x06src_ip\x18\x02\x20\x01(\tR\x05\
srcIp\x12\x19\n\x08src_port\x18\x03\x20\x01(\rR\x07srcPort\x12\x17\n\x07\
dest_ip\x18\x04\x20\x01(\tR\x06destIp\x12\x1b\n\tdest_port\x18\x05\x20\
\x01(\rR\x08destPort\x12\x1a\n\x08hostname\x18\x06\x20\x01(\tR\x08hostna\
me\x12\x10\n\x03url\x18\x07\x20\x01(\tR\x03url\x12\x10\n\x03ja3\x18\x08\
\x20\x03(\tR\x03ja3\x12\x12\n\x04ja3s\x18\t\x20\x03(\tR\x04ja3s*C\n\rAle\
rtSeverity\x12\t\n\x05unset\x10\0\x12\x08\n\x04high\x10\x01\x12\n\n\x06m\
edium\x10\x02\x12\x07\n\x03low\x10\x03\x12\x08\n\x04info\x10\x04*q\n\x16\
TransportLayerProtocol\x12\x0b\n\x07UNKNOWN\x10\0\x12\x08\n\x04ICMP\x10\
\x01\x12\x08\n\x04IGMP\x10\x02\x12\x07\n\x03TCP\x10\x06\x12\x07\n\x03UDP\
\x10\x11\x12\x07\n\x03ESP\x102\x12\x06\n\x02AH\x103\x12\x08\n\x04L2TP\
\x10s\x12\t\n\x04SCTP\x10\x84\x01b\x06proto3\
";
fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
file_descriptor_proto_lazy.get(|| {
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
})
}
pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
file_descriptor.get(|| {
let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
let mut deps = ::std::vec::Vec::with_capacity(0);
let mut messages = ::std::vec::Vec::with_capacity(2);
messages.push(CrowdSourcedIdsResults::generated_message_descriptor_data());
messages.push(CrowdSourcedIdsAlertContext::generated_message_descriptor_data());
let mut enums = ::std::vec::Vec::with_capacity(2);
enums.push(AlertSeverity::generated_enum_descriptor_data());
enums.push(TransportLayerProtocol::generated_enum_descriptor_data());
::protobuf::reflect::GeneratedFileDescriptor::new_generated(
file_descriptor_proto(),
deps,
messages,
enums,
)
});
::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
})
}