::ethernet::ip::

Struct IpHeader

pub struct IpHeader<Checksum> {
dscp: uint<6>,
ecn: uint<2>,
total_length: uint<16>,
identification: uint<16>,
flags: uint<3>,
fragment_offset: uint<13>,
ttl: uint<8>,
protocol: uint<8>,
checksum: Checksum,
source: IpAddr,
dest: IpAddr,
}

Implementations

impl<#uint N> IpHeader<IpChecksum<N>>
fn lower<#uint O>(self) -> IpHeader<IpChecksum<O>>
where
O == N / 2,
impl<Checksum> IpHeader<Checksum>
fn version(self) -> uint<4>
fn ihl(self) -> uint<4>
pub fn with_checksum<New>(self, checksum: New) -> IpHeader<New>

Trait Implementations

impl Header for IpHeader<IpChecksum<1>>
fn total_length(self) -> uint<16>
fn payload_length(self) -> uint<16>
impl Serialize<[uint<8>; 20]> for IpHeader<IpChecksum<1>>
fn serialize(self) -> [uint<8>; 20]