[][src]Enum cjdns_sniff::ContentType

#[repr(u32)]pub enum ContentType {
    Ip6Hop,
    Ip6Icmp,
    Ip6Igmp,
    Ip6Ipv4,
    Ip6Tcp,
    Ip6Egp,
    Ip6Pup,
    Ip6Udp,
    Ip6Idp,
    Ip6Tp,
    Ip6Dccp,
    Ip6Ipv6,
    Ip6Rsvp,
    Ip6Gre,
    Ip6Esp,
    Ip6Ah,
    Ip6Icmpv6,
    Ip6Mtp,
    Ip6Beetph,
    Ip6Encap,
    Ip6Pim,
    Ip6Comp,
    Ip6Sctp,
    Ip6Udplite,
    Cjdht,
    Iptun,
    Ctrl,
    Other,
}

Header content types.

The lowest 255 message types are reserved for cjdns/IPv6 packets. AKA: packets where the IP address is within the FC00::/8 block. Any packet sent in this way will have the IPv6 header deconstructed and this field will come from the next header field in the IPv6 header.

Variants

Ip6Hop
Ip6Icmp
Ip6Igmp
Ip6Ipv4
Ip6Tcp
Ip6Egp
Ip6Pup
Ip6Udp
Ip6Idp
Ip6Tp
Ip6Dccp
Ip6Ipv6
Ip6Rsvp
Ip6Gre
Ip6Esp
Ip6Ah
Ip6Icmpv6
Ip6Mtp
Ip6Beetph
Ip6Encap
Ip6Pim
Ip6Comp
Ip6Sctp
Ip6Udplite
Cjdht

Bencoded inter-router DHT message

Iptun

Bencoded inter-router DHT message

Ctrl

This content type will never appear in the wild, it represents unencrypted control frames

Other

Unrecognized or user-defined content type.

If a message with unrecognized content type received, it is parsed as Other. Though if this message should be re-serialized and forwarded, the content type must be preserved. This should be done by other means, such as storing raw content type elsewhere.

Implementations

impl ContentType[src]

pub const IP6_MAX: u32[src]

The lowest 255 message types are reserved for cjdns/IPv6 packets

pub const RESERVED: u32[src]

Reserved for future allocation

pub const RESERVED_MAX: u32[src]

pub const AVAILABLE: u32[src]

Content types in the AVAILABLE range are not defined and can be used like port numbers for subsystems of cjdns to communicate with subsystems within cjdns on other machines, providing they first agree on which numbers to use via CTRL messages

pub const MAX: u32[src]

Maximum possible defined value for the content type

pub fn from_u16(code: u16) -> ContentType[src]

pub fn try_to_u16(self) -> Option<u16>[src]

Trait Implementations

impl Clone for ContentType[src]

impl Copy for ContentType[src]

impl Debug for ContentType[src]

impl Eq for ContentType[src]

impl From<u32> for ContentType[src]

impl FromPrimitive for ContentType[src]

type Primitive = u32

impl PartialEq<ContentType> for ContentType[src]

impl StructuralEq for ContentType[src]

impl StructuralPartialEq for ContentType[src]

impl TryFromPrimitive for ContentType[src]

type Primitive = u32

Auto Trait Implementations

impl RefUnwindSafe for ContentType

impl Send for ContentType

impl Sync for ContentType

impl Unpin for ContentType

impl UnwindSafe for ContentType

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<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,