Skip to main content

flowparser_sflow/flow_records/
extended_proxy_request.rs

1use nom::IResult;
2use serde::{Deserialize, Serialize};
3
4use super::parse_sflow_string;
5
6#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
7pub struct ExtendedProxyRequest {
8    pub uri: String,
9    pub host: String,
10}
11
12pub(crate) fn parse_extended_proxy_request(
13    input: &[u8],
14) -> IResult<&[u8], ExtendedProxyRequest> {
15    let (input, uri) = parse_sflow_string(input)?;
16    let (input, host) = parse_sflow_string(input)?;
17
18    Ok((input, ExtendedProxyRequest { uri, host }))
19}