[][src]Struct pnet_packet::gre::Gre

pub struct Gre {
    pub checksum_present: u1,
    pub routing_present: u1,
    pub key_present: u1,
    pub sequence_present: u1,
    pub strict_source_route: u1,
    pub recursion_control: u3,
    pub zero_flags: u5,
    pub version: u3,
    pub protocol_type: u16be,
    pub checksum: Vec<U16BE>,
    pub offset: Vec<U16BE>,
    pub key: Vec<U32BE>,
    pub sequence: Vec<U32BE>,
    pub routing: Vec<u8>,
    pub payload: Vec<u8>,
}

GRE (Generic Routing Encapsulation) Packet.

See RFCs 1701, 2784, 2890, 7676, 2637

Current status of implementation:

  • RFC 1701 except for source routing and checksums. Processing a source routed packet will panic. Checksums are able to be inspected, but not calculated or verified.

  • RFC 2784 except for checksums (same as 1701 status). Note that it is possible to generate noncompliant packets by setting any of the reserved bits (but see 2890).

  • RFC 2890 implemented

  • RFC 7676 has no packet changes - compliance is up to the user

  • RFC 2637 not implemented.

Note that routing information from RFC 1701 is not implemented, packets with routing_present true will currently cause a panic.

Fields

checksum_present: u1routing_present: u1key_present: u1sequence_present: u1strict_source_route: u1recursion_control: u3zero_flags: u5version: u3protocol_type: u16bechecksum: Vec<U16BE>offset: Vec<U16BE>key: Vec<U32BE>sequence: Vec<U32BE>routing: Vec<u8>payload: Vec<u8>

Trait Implementations

impl Clone for Gre[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Gre[src]

Auto Trait Implementations

impl Send for Gre

impl Sync for Gre

Blanket Implementations

impl<T> From for T[src]

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

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

type Owned = T

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.