[][src]Struct nc::types::bpf_sock_ops_t

#[repr(C)]
pub struct bpf_sock_ops_t {
    pub op: u32,
    pub reply: bpf_sock_ops_reply_t,
    pub family: u32,
    pub remote_ip4: u32,
    pub local_ip4: u32,
    pub remote_ip6: [u32; 4],
    pub local_ip6: [u32; 4],
    pub remote_port: u32,
    pub local_port: u32,
    pub is_fullsock: u32,
    pub snd_cwnd: u32,
    pub srtt_us: u32,
    pub bpf_sock_ops_cb_flags: u32,
    pub state: u32,
    pub rtt_min: u32,
    pub snd_ssthresh: u32,
    pub rcv_nxt: u32,
    pub snd_nxt: u32,
    pub snd_una: u32,
    pub mss_cache: u32,
    pub ecn_flags: u32,
    pub rate_delivered: u32,
    pub rate_interval_us: u32,
    pub packets_out: u32,
    pub retrans_out: u32,
    pub total_retrans: u32,
    pub segs_in: u32,
    pub data_segs_in: u32,
    pub segs_out: u32,
    pub data_segs_out: u32,
    pub lost_out: u32,
    pub sacked_out: u32,
    pub sk_txhash: u32,
    pub bytes_received: u64,
    pub bytes_acked: u64,
}

User bpf_sock_ops struct to access socket values and specify request ops and their replies. Some of this fields are in network (bigendian) byte order and may need to be converted before use (bpf_ntohl() defined in samples/bpf/bpf_endian.h). New fields can only be added at the end of this structure

Fields

op: u32reply: bpf_sock_ops_reply_tfamily: u32remote_ip4: u32

Stored in network byte order

local_ip4: u32

Stored in network byte order

remote_ip6: [u32; 4]

Stored in network byte order

local_ip6: [u32; 4]

Stored in network byte order

remote_port: u32

Stored in network byte order

local_port: u32

stored in host byte order

is_fullsock: u32

Some TCP fields are only valid if there is a full socket. If not, the fields read as zero.

snd_cwnd: u32srtt_us: u32

Averaged RTT << 3 in usecs

bpf_sock_ops_cb_flags: u32

flags defined in uapi/linux/tcp.h

state: u32rtt_min: u32snd_ssthresh: u32rcv_nxt: u32snd_nxt: u32snd_una: u32mss_cache: u32ecn_flags: u32rate_delivered: u32rate_interval_us: u32packets_out: u32retrans_out: u32total_retrans: u32segs_in: u32data_segs_in: u32segs_out: u32data_segs_out: u32lost_out: u32sacked_out: u32sk_txhash: u32bytes_received: u64bytes_acked: u64

Auto Trait Implementations

Blanket Implementations

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

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.

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

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.

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

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

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