Struct hep::Chunk[][src]

pub struct Chunk {
Show fields pub ip_protocol_family: u8, pub ip_protocol_id: u8, pub ipv4_src_address: Ipv4Addr, pub ipv4_dst_address: Ipv4Addr, pub ipv6_src_address: Ipv6Addr, pub ipv6_dst_address: Ipv6Addr, pub proto_src_port: u16, pub proto_dst_port: u16, pub timestamp_seconds: u32, pub timestamp_micro_seconds_offset: u32, pub proto_type: CapProtoType, pub capture_agent_id: u32, pub keep_alive_timer: u16, pub authenticate_key: String, pub packet_payload: String, pub compressed_payload: String, pub internal_correlation_id: String, pub vlan_id: u16, pub group_id: String, pub src_mac: u64, pub dst_mac: u64, pub ethernet_type: u16, pub tcp_flag: u8, pub ip_tos: u8, pub mos_value: u16, pub rfactor: u16, pub geo_location: String, pub jitter: u32, pub translation_type: String, pub payload_json_keys: String, pub tags_values: String, pub type_of_tag: String,
}
Expand description

Chunk types with chunk vendor ID 0x0000 are called generic chunk types. The following

generic chunk types are defined: 1 uint8 IP protocol family

2 uint8 IP protocol ID

3 inet4-addr IPv4 source address

4 inet4-addr IPv4 destination address

5 inet6-addr IPv6 source address

6 inet6-addr IPv6 destination address

7 uint16 protocol source port (UDP, TCP, SCTP)

8 uint16 protocol destination port (UDP, TCP, SCTP)

9 uint32 timestamp, seconds since 01/01/1970 (epoch)

10 uint32 timestamp microseconds offset (added to timestamp)

11 uint8 protocol type (SIP/H323/RTP/MGCP/M2UA)

12 uint32 capture agent ID (202, 1201, 2033…)

13 uint16 keep alive timer (sec)Capture protocol types (0x00b)

14 octet-string authenticate key (plain text / TLS connection)

15 octet-string captured packet payload

16 octet-string captured compressed payload (gzip/inflate)

17 octet-string Internal correlation id

18 uint16 Vlan ID

19 octet-string Group ID

20 uint64 Source MAC

21 uint64 Destination MAC

22 uint16 Ethernet Type

23 uint8 TCP Flag [SYN.PUSH…]

24 uint8 IP TOS ….. ….. …… 31 Reserved

32 uint16 MOS value

33 uint16 R-Factor

34 octet-string GEO Location

35 uint32 Jitter

36 octet-string Transaction type [call, registration]

37 octet-string Payload JSON Keys

38 octet-string Tags’ values

39 uint16 Type of tag

Fields

ip_protocol_family: u8ip_protocol_id: u8ipv4_src_address: Ipv4Addripv4_dst_address: Ipv4Addripv6_src_address: Ipv6Addripv6_dst_address: Ipv6Addrproto_src_port: u16proto_dst_port: u16timestamp_seconds: u32timestamp_micro_seconds_offset: u32proto_type: CapProtoTypecapture_agent_id: u32keep_alive_timer: u16authenticate_key: Stringpacket_payload: Stringcompressed_payload: Stringinternal_correlation_id: Stringvlan_id: u16group_id: Stringsrc_mac: u64dst_mac: u64ethernet_type: u16tcp_flag: u8ip_tos: u8mos_value: u16rfactor: u16geo_location: Stringjitter: u32translation_type: Stringpayload_json_keys: Stringtags_values: Stringtype_of_tag: String

Implementations

impl Chunk[src]

pub fn new() -> Chunk[src]

impl Chunk[src]

pub fn set_ip_protocol_family(&mut self, ip_protocol_family: u8) -> &mut Chunk[src]

set Chunk types of IpProtocolFamily

use hep::Chunk;
 
let mut chunks = Chunk::new();
chunks.set_ip_protocol_family(1);

println!("{:?}",chunks);

pub fn set_ip_protocol_id(&mut self, ip_protocol_id: u8) -> &mut Chunk[src]

set Chunk types of IpProtocolId

pub fn set_ipv4_src_address(&mut self, ipv4_src_address: Ipv4Addr) -> &mut Chunk[src]

set Chunk types of Ipv4SrcAddress

pub fn set_ipv4_dst_address(&mut self, ipv4_dst_address: Ipv4Addr) -> &mut Chunk[src]

set Chunk types of Ipv4DstAddress

pub fn set_ipv6_src_address(&mut self, ipv6_src_address: Ipv6Addr) -> &mut Chunk[src]

set Chunk types of Ipv6SrcAddress

pub fn set_ipv6_dst_address(&mut self, ipv6_dst_address: Ipv6Addr) -> &mut Chunk[src]

set Chunk types of Ipv6DstAddress

pub fn set_proto_src_port(&mut self, proto_src_port: u16) -> &mut Chunk[src]

set Chunk types of ProtoSrcPort

pub fn set_proto_dst_port(&mut self, proto_dst_port: u16) -> &mut Chunk[src]

set Chunk types of ProtoDstPort

pub fn set_timestamp_seconds(&mut self, timestamp_seconds: u32) -> &mut Chunk[src]

set Chunk types of Timestamp_Seconds

pub fn set_timestamp_micro_seconds_offset(
    &mut self,
    timestamp_micro_seconds_offset: u32
) -> &mut Chunk
[src]

set Chunk types of TimestampMicroSecondsOffset

pub fn set_proto_type(&mut self, proto_type: CapProtoType) -> &mut Chunk[src]

set Chunk types of ProtoType

pub fn set_capture_agent_id(&mut self, capture_agent_id: u32) -> &mut Chunk[src]

set Chunk types of CaptureAgentId

pub fn set_keep_alive_timer(&mut self, keep_alive_timer: u16) -> &mut Chunk[src]

set Chunk types of KeepAliveTimer

pub fn set_authenticate_key(&mut self, authenticate_key: String) -> &mut Chunk[src]

set Chunk types of AuthenticateKey

pub fn set_packet_payload(&mut self, packet_payload: String) -> &mut Chunk[src]

set Chunk types of PacketPayload

Valid Data in PacketPayload

pub fn set_compressed_payload(
    &mut self,
    compressed_payload: String
) -> &mut Chunk
[src]

set Chunk types of CompressedPayload

pub fn set_set_internal_correlation_id(
    &mut self,
    internal_correlation_id: String
) -> &mut Chunk
[src]

set Chunk types of InternalCorrelationId

pub fn set_vlan_id(&mut self, vlan_id: u16) -> &mut Chunk[src]

set Chunk types of VlanId

pub fn set_group_id(&mut self, group_id: String) -> &mut Chunk[src]

set Chunk types of GroupId

pub fn set_src_mac(&mut self, src_mac: u64) -> &mut Chunk[src]

set Chunk types of SrcMac

pub fn set_dst_mac(&mut self, dst_mac: u64) -> &mut Chunk[src]

set Chunk types of DstMac

pub fn set_ethernet_type(&mut self, ethernet_type: u16) -> &mut Chunk[src]

set Chunk types of EthernetType

pub fn set_tcp_flag(&mut self, tcp_flag: u8) -> &mut Chunk[src]

set Chunk types of TcpFlag

pub fn set_ip_tos(&mut self, ip_tos: u8) -> &mut Chunk[src]

set Chunk types of IpTos

pub fn set_mos_value(&mut self, mos_value: u16) -> &mut Chunk[src]

set Chunk types of MosValue

pub fn set_rfactor(&mut self, rfactor: u16) -> &mut Chunk[src]

set Chunk types of RFactor

pub fn set_geo_location(&mut self, geo_location: String) -> &mut Chunk[src]

set Chunk types of GeoLocation

pub fn set_jitter(&mut self, jitter: u32) -> &mut Chunk[src]

set Chunk types of Jitter

pub fn set_translation_type(&mut self, translation_type: String) -> &mut Chunk[src]

set Chunk types of TranslationType

pub fn set_payload_json_keys(&mut self, payload_json_keys: String) -> &mut Chunk[src]

set Chunk types of PlayloadJsonKeys

pub fn set_tags_values(&mut self, tags_values: String) -> &mut Chunk[src]

set Chunk types of TagsValues

pub fn set_type_of_tag(&mut self, type_of_tag: String) -> &mut Chunk[src]

set Chunk types of TypeOfTag

Trait Implementations

impl Clone for Chunk[src]

fn clone(&self) -> Chunk[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Chunk[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl PartialEq<Chunk> for Chunk[src]

fn eq(&self, other: &Chunk) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &Chunk) -> bool[src]

This method tests for !=.

impl StructuralPartialEq for Chunk[src]

Auto Trait Implementations

impl RefUnwindSafe for Chunk

impl Send for Chunk

impl Sync for Chunk

impl Unpin for Chunk

impl UnwindSafe for Chunk

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.