Struct gnunet_sys::GNUNET_TUN_IPv4Header[][src]

#[repr(C)]pub struct GNUNET_TUN_IPv4Header {
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1], u8>,
    pub diff_serv: u8,
    pub total_length: u16,
    pub identification: u16,
    pub _bitfield_2: __BindgenBitfieldUnit<[u8; 2], u16>,
    pub ttl: u8,
    pub protocol: u8,
    pub checksum: u16,
    pub source_address: in_addr,
    pub destination_address: in_addr,
}

Standard IPv4 header.

Fields

_bitfield_1: __BindgenBitfieldUnit<[u8; 1], u8>diff_serv: u8total_length: u16

Length of the packet, including this header.

identification: u16

Unique random ID for matching up fragments.

_bitfield_2: __BindgenBitfieldUnit<[u8; 2], u16>ttl: u8

How many more hops can this packet be forwarded?

protocol: u8

L4-protocol, for example, IPPROTO_UDP or IPPROTO_TCP.

checksum: u16

Checksum.

source_address: in_addr

Origin of the packet.

destination_address: in_addr

Destination of the packet.

Implementations

impl GNUNET_TUN_IPv4Header[src]

pub fn header_length(&self) -> c_uint[src]

pub fn set_header_length(&mut self, val: c_uint)[src]

pub fn version(&self) -> c_uint[src]

pub fn set_version(&mut self, val: c_uint)[src]

pub fn new_bitfield_1(
    header_length: c_uint,
    version: c_uint
) -> __BindgenBitfieldUnit<[u8; 1], u8>
[src]

pub fn flags(&self) -> c_uint[src]

pub fn set_flags(&mut self, val: c_uint)[src]

pub fn fragmentation_offset(&self) -> c_uint[src]

pub fn set_fragmentation_offset(&mut self, val: c_uint)[src]

pub fn new_bitfield_2(
    flags: c_uint,
    fragmentation_offset: c_uint
) -> __BindgenBitfieldUnit<[u8; 2], u16>
[src]

Trait Implementations

impl Clone for GNUNET_TUN_IPv4Header[src]

impl Copy for GNUNET_TUN_IPv4Header[src]

impl Debug for GNUNET_TUN_IPv4Header[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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> 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.