[−][src]Enum cjdns_sniff::ContentType
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
Bencoded inter-router DHT message
Bencoded inter-router DHT message
This content type will never appear in the wild, it represents unencrypted control frames
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]
pub fn clone(&self) -> ContentType
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for ContentType
[src]
impl Debug for ContentType
[src]
impl Eq for ContentType
[src]
impl From<u32> for ContentType
[src]
pub fn from(number: u32) -> ContentType
[src]
impl FromPrimitive for ContentType
[src]
type Primitive = u32
pub fn from_primitive(
number: <ContentType as FromPrimitive>::Primitive
) -> ContentType
[src]
number: <ContentType as FromPrimitive>::Primitive
) -> ContentType
impl PartialEq<ContentType> for ContentType
[src]
pub fn eq(&self, other: &ContentType) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for ContentType
[src]
impl StructuralPartialEq for ContentType
[src]
impl TryFromPrimitive for ContentType
[src]
type Primitive = u32
pub const NAME: &'static str
[src]
pub fn try_from_primitive(
number: <ContentType as TryFromPrimitive>::Primitive
) -> Result<ContentType, TryFromPrimitiveError<ContentType>>
[src]
number: <ContentType as TryFromPrimitive>::Primitive
) -> Result<ContentType, TryFromPrimitiveError<ContentType>>
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,