pub struct Destination { /* private fields */ }Expand description
Destination fields capture details about the receiver of a network exchange/packet. These fields are populated from a network event, packet, or other event containing details of a network transaction.
Destination fields are usually populated in conjunction with source fields. The source and destination fields are considered the baseline and should always be filled if an event contains source and destination details from a network transaction. If the event also contains identification of the client and server roles, then the client and server fields should also be populated.
Implementations§
Source§impl Destination
impl Destination
Sourcepub fn get_address(&self) -> Option<&String>
pub fn get_address(&self) -> Option<&String>
Some event destination addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the .address field.
Then it should be duplicated to .ip or .domain, depending on which one it is.
Sourcepub fn set_address(&mut self, address_arg: String)
pub fn set_address(&mut self, address_arg: String)
Some event destination addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the .address field.
Then it should be duplicated to .ip or .domain, depending on which one it is.
Sourcepub fn get_mac(&self) -> Option<&String>
pub fn get_mac(&self) -> Option<&String>
MAC address of the destination.
The notation format from RFC 7042 is suggested: Each octet (that is, 8-bit byte) is represented by two [uppercase] hexadecimal digits giving the value of the octet as an unsigned integer. Successive octets are separated by a hyphen.
Sourcepub fn set_mac(&mut self, mac_arg: String)
pub fn set_mac(&mut self, mac_arg: String)
MAC address of the destination.
The notation format from RFC 7042 is suggested: Each octet (that is, 8-bit byte) is represented by two [uppercase] hexadecimal digits giving the value of the octet as an unsigned integer. Successive octets are separated by a hyphen.
§Example
00-00-5E-00-53-23
Sourcepub fn get_domain(&self) -> Option<&String>
pub fn get_domain(&self) -> Option<&String>
The domain name of the destination system.
This value may be a host name, a fully qualified domain name, or another host naming format. The value may derive from the original event or be added from enrichment.
Sourcepub fn set_domain(&mut self, domain_arg: String)
pub fn set_domain(&mut self, domain_arg: String)
The domain name of the destination system.
This value may be a host name, a fully qualified domain name, or another host naming format. The value may derive from the original event or be added from enrichment.
§Example
foo.example.com
Sourcepub fn get_registered_domain(&self) -> Option<&String>
pub fn get_registered_domain(&self) -> Option<&String>
The highest registered destination domain, stripped of the subdomain.
For example, the registered domain for “foo.example.com” is “example.com”.
This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last two labels will not work well for TLDs such as “co.uk”.
Sourcepub fn set_registered_domain(&mut self, registered_domain_arg: String)
pub fn set_registered_domain(&mut self, registered_domain_arg: String)
The highest registered destination domain, stripped of the subdomain.
For example, the registered domain for “foo.example.com” is “example.com”.
This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last two labels will not work well for TLDs such as “co.uk”.
§Example
example.com
Sourcepub fn get_top_level_domain(&self) -> Option<&String>
pub fn get_top_level_domain(&self) -> Option<&String>
The effective top level domain (eTLD), also known as the domain suffix, is the last part of the domain name. For example, the top level domain for example.com is “com”.
This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last label will not work well for effective TLDs such as “co.uk”.
Sourcepub fn set_top_level_domain(&mut self, top_level_domain_arg: String)
pub fn set_top_level_domain(&mut self, top_level_domain_arg: String)
The effective top level domain (eTLD), also known as the domain suffix, is the last part of the domain name. For example, the top level domain for example.com is “com”.
This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last label will not work well for effective TLDs such as “co.uk”.
§Example
co.uk
Sourcepub fn get_subdomain(&self) -> Option<&String>
pub fn get_subdomain(&self) -> Option<&String>
The subdomain portion of a fully qualified domain name includes all of the names except the host name under the registered_domain. In a partially qualified domain, or if the the qualification level of the full name cannot be determined, subdomain contains all of the names below the registered domain.
For example the subdomain portion of “www.east.mydomain.co.uk” is “east”. If the domain has multiple levels of subdomain, such as “sub2.sub1.example.com”, the subdomain field should contain “sub2.sub1”, with no trailing period.
Sourcepub fn set_subdomain(&mut self, subdomain_arg: String)
pub fn set_subdomain(&mut self, subdomain_arg: String)
The subdomain portion of a fully qualified domain name includes all of the names except the host name under the registered_domain. In a partially qualified domain, or if the the qualification level of the full name cannot be determined, subdomain contains all of the names below the registered domain.
For example the subdomain portion of “www.east.mydomain.co.uk” is “east”. If the domain has multiple levels of subdomain, such as “sub2.sub1.example.com”, the subdomain field should contain “sub2.sub1”, with no trailing period.
§Example
east
Sourcepub fn get_packets(&self) -> Option<&u64>
pub fn get_packets(&self) -> Option<&u64>
Packets sent from the destination to the source.
Sourcepub fn set_packets(&mut self, packets_arg: u64)
pub fn set_packets(&mut self, packets_arg: u64)
Sourcepub fn get_nat_ip(&self) -> Option<&String>
pub fn get_nat_ip(&self) -> Option<&String>
Translated ip of destination based NAT sessions (e.g. internet to private DMZ)
Typically used with load balancers, firewalls, or routers.
Sourcepub fn set_nat_ip(&mut self, nat_ip_arg: String)
pub fn set_nat_ip(&mut self, nat_ip_arg: String)
Translated ip of destination based NAT sessions (e.g. internet to private DMZ)
Typically used with load balancers, firewalls, or routers.
Sourcepub fn get_nat_port(&self) -> Option<&u64>
pub fn get_nat_port(&self) -> Option<&u64>
Port the source session is translated to by NAT Device.
Typically used with load balancers, firewalls, or routers.
Sourcepub fn set_nat_port(&mut self, nat_port_arg: u64)
pub fn set_nat_port(&mut self, nat_port_arg: u64)
Port the source session is translated to by NAT Device.
Typically used with load balancers, firewalls, or routers.
Trait Implementations§
Source§impl Clone for Destination
impl Clone for Destination
Source§fn clone(&self) -> Destination
fn clone(&self) -> Destination
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more