pub struct Chunk {Show 32 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: u8
§ip_protocol_id: u8
§ipv4_src_address: Ipv4Addr
§ipv4_dst_address: Ipv4Addr
§ipv6_src_address: Ipv6Addr
§ipv6_dst_address: Ipv6Addr
§proto_src_port: u16
§proto_dst_port: u16
§timestamp_seconds: u32
§timestamp_micro_seconds_offset: u32
§proto_type: CapProtoType
§capture_agent_id: u32
§keep_alive_timer: u16
§authenticate_key: String
§packet_payload: String
§compressed_payload: String
§internal_correlation_id: String
§vlan_id: u16
§group_id: String
§src_mac: u64
§dst_mac: u64
§ethernet_type: u16
§tcp_flag: u8
§ip_tos: u8
§mos_value: u16
§rfactor: u16
§geo_location: String
§jitter: u32
§translation_type: String
§payload_json_keys: String
§type_of_tag: String
Implementations§
Source§impl Chunk
impl Chunk
Sourcepub fn set_ip_protocol_family(&mut self, ip_protocol_family: u8) -> &mut Chunk
pub fn set_ip_protocol_family(&mut self, ip_protocol_family: u8) -> &mut Chunk
set Chunk types of IpProtocolFamily
use hep::Chunk;
let mut chunks = Chunk::new();
chunks.set_ip_protocol_family(1);
println!("{:?}",chunks);
Sourcepub fn set_ip_protocol_id(&mut self, ip_protocol_id: u8) -> &mut Chunk
pub fn set_ip_protocol_id(&mut self, ip_protocol_id: u8) -> &mut Chunk
set Chunk types of IpProtocolId
Sourcepub fn set_ipv4_src_address(&mut self, ipv4_src_address: Ipv4Addr) -> &mut Chunk
pub fn set_ipv4_src_address(&mut self, ipv4_src_address: Ipv4Addr) -> &mut Chunk
set Chunk types of Ipv4SrcAddress
Sourcepub fn set_ipv4_dst_address(&mut self, ipv4_dst_address: Ipv4Addr) -> &mut Chunk
pub fn set_ipv4_dst_address(&mut self, ipv4_dst_address: Ipv4Addr) -> &mut Chunk
set Chunk types of Ipv4DstAddress
Sourcepub fn set_ipv6_src_address(&mut self, ipv6_src_address: Ipv6Addr) -> &mut Chunk
pub fn set_ipv6_src_address(&mut self, ipv6_src_address: Ipv6Addr) -> &mut Chunk
set Chunk types of Ipv6SrcAddress
Sourcepub fn set_ipv6_dst_address(&mut self, ipv6_dst_address: Ipv6Addr) -> &mut Chunk
pub fn set_ipv6_dst_address(&mut self, ipv6_dst_address: Ipv6Addr) -> &mut Chunk
set Chunk types of Ipv6DstAddress
Sourcepub fn set_proto_src_port(&mut self, proto_src_port: u16) -> &mut Chunk
pub fn set_proto_src_port(&mut self, proto_src_port: u16) -> &mut Chunk
set Chunk types of ProtoSrcPort
Sourcepub fn set_proto_dst_port(&mut self, proto_dst_port: u16) -> &mut Chunk
pub fn set_proto_dst_port(&mut self, proto_dst_port: u16) -> &mut Chunk
set Chunk types of ProtoDstPort
Sourcepub fn set_timestamp_seconds(&mut self, timestamp_seconds: u32) -> &mut Chunk
pub fn set_timestamp_seconds(&mut self, timestamp_seconds: u32) -> &mut Chunk
set Chunk types of Timestamp_Seconds
Sourcepub fn set_timestamp_micro_seconds_offset(
&mut self,
timestamp_micro_seconds_offset: u32,
) -> &mut Chunk
pub fn set_timestamp_micro_seconds_offset( &mut self, timestamp_micro_seconds_offset: u32, ) -> &mut Chunk
set Chunk types of TimestampMicroSecondsOffset
Sourcepub fn set_proto_type(&mut self, proto_type: CapProtoType) -> &mut Chunk
pub fn set_proto_type(&mut self, proto_type: CapProtoType) -> &mut Chunk
set Chunk types of ProtoType
Sourcepub fn set_capture_agent_id(&mut self, capture_agent_id: u32) -> &mut Chunk
pub fn set_capture_agent_id(&mut self, capture_agent_id: u32) -> &mut Chunk
set Chunk types of CaptureAgentId
Sourcepub fn set_keep_alive_timer(&mut self, keep_alive_timer: u16) -> &mut Chunk
pub fn set_keep_alive_timer(&mut self, keep_alive_timer: u16) -> &mut Chunk
set Chunk types of KeepAliveTimer
Sourcepub fn set_authenticate_key(&mut self, authenticate_key: String) -> &mut Chunk
pub fn set_authenticate_key(&mut self, authenticate_key: String) -> &mut Chunk
set Chunk types of AuthenticateKey
Sourcepub fn set_packet_payload(&mut self, packet_payload: String) -> &mut Chunk
pub fn set_packet_payload(&mut self, packet_payload: String) -> &mut Chunk
set Chunk types of PacketPayload
Valid Data in PacketPayload
Sourcepub fn set_compressed_payload(
&mut self,
compressed_payload: String,
) -> &mut Chunk
pub fn set_compressed_payload( &mut self, compressed_payload: String, ) -> &mut Chunk
set Chunk types of CompressedPayload
Sourcepub fn set_set_internal_correlation_id(
&mut self,
internal_correlation_id: String,
) -> &mut Chunk
pub fn set_set_internal_correlation_id( &mut self, internal_correlation_id: String, ) -> &mut Chunk
set Chunk types of InternalCorrelationId
Sourcepub fn set_vlan_id(&mut self, vlan_id: u16) -> &mut Chunk
pub fn set_vlan_id(&mut self, vlan_id: u16) -> &mut Chunk
set Chunk types of VlanId
Sourcepub fn set_group_id(&mut self, group_id: String) -> &mut Chunk
pub fn set_group_id(&mut self, group_id: String) -> &mut Chunk
set Chunk types of GroupId
Sourcepub fn set_src_mac(&mut self, src_mac: u64) -> &mut Chunk
pub fn set_src_mac(&mut self, src_mac: u64) -> &mut Chunk
set Chunk types of SrcMac
Sourcepub fn set_dst_mac(&mut self, dst_mac: u64) -> &mut Chunk
pub fn set_dst_mac(&mut self, dst_mac: u64) -> &mut Chunk
set Chunk types of DstMac
Sourcepub fn set_ethernet_type(&mut self, ethernet_type: u16) -> &mut Chunk
pub fn set_ethernet_type(&mut self, ethernet_type: u16) -> &mut Chunk
set Chunk types of EthernetType
Sourcepub fn set_tcp_flag(&mut self, tcp_flag: u8) -> &mut Chunk
pub fn set_tcp_flag(&mut self, tcp_flag: u8) -> &mut Chunk
set Chunk types of TcpFlag
Sourcepub fn set_ip_tos(&mut self, ip_tos: u8) -> &mut Chunk
pub fn set_ip_tos(&mut self, ip_tos: u8) -> &mut Chunk
set Chunk types of IpTos
Sourcepub fn set_mos_value(&mut self, mos_value: u16) -> &mut Chunk
pub fn set_mos_value(&mut self, mos_value: u16) -> &mut Chunk
set Chunk types of MosValue
Sourcepub fn set_rfactor(&mut self, rfactor: u16) -> &mut Chunk
pub fn set_rfactor(&mut self, rfactor: u16) -> &mut Chunk
set Chunk types of RFactor
Sourcepub fn set_geo_location(&mut self, geo_location: String) -> &mut Chunk
pub fn set_geo_location(&mut self, geo_location: String) -> &mut Chunk
set Chunk types of GeoLocation
Sourcepub fn set_jitter(&mut self, jitter: u32) -> &mut Chunk
pub fn set_jitter(&mut self, jitter: u32) -> &mut Chunk
set Chunk types of Jitter
Sourcepub fn set_translation_type(&mut self, translation_type: String) -> &mut Chunk
pub fn set_translation_type(&mut self, translation_type: String) -> &mut Chunk
set Chunk types of TranslationType
Sourcepub fn set_payload_json_keys(&mut self, payload_json_keys: String) -> &mut Chunk
pub fn set_payload_json_keys(&mut self, payload_json_keys: String) -> &mut Chunk
set Chunk types of PlayloadJsonKeys
set Chunk types of TagsValues
Sourcepub fn set_type_of_tag(&mut self, type_of_tag: String) -> &mut Chunk
pub fn set_type_of_tag(&mut self, type_of_tag: String) -> &mut Chunk
set Chunk types of TypeOfTag