[−][src]Enum cjdns_ann::Entity
Announcement message entity types.
Variants
NodeProtocolVersion(u16)
The packet diagram for version entity looks as follows:
1 2 3
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
0 | length | type | version |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- length: version entity length is always 4
- type: version entity type is always 2
- version: big endian representation of the protocol version of the node
Peer(PeerData)
The packet diagram for peer entity looks as follows:
1 2 3
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
0 | length | type | encoding form | flags |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
4 | MTU (8 byte units) | peer number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
8 | unused |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12 | |
+ +
16 | |
+ Peer IPv6 +
20 | |
+ +
24 | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
28 | label |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- length: peer length is always 32
- type: peer type is 1
- encoding form: this is the number of the form within the encoding scheme which is the smallest form that can represent the Director for reaching the peer from the announcer. Yes, you read that right, even though the entity is designed for reaching the announcer from the peer, in order to chain links for making a label, one must have the inverse encoding form for each hop such that the reverse label will be the same size as the forward label.
- flags: A field for flags for future use such as whether the link is simplex or other information. Currently there are no flags.
- MTU8: The maximum message size for messages going to the announcer from the peer. If this is set to zero it indicates the announcer is not aware of the MTU.
- peer number: number of the peer in the network switch which corresponds to that peer. Used for referencing in LinkState
- unused: alignment padding.
- Peer IPv6: The cjdns IPv6 address of the peer from which this node can be reached.
- label: The label fragment (Director) which should be used for constructing a label for reaching the announcer from the peer. A label of 0 indicates that the route is being withdrawn and it is no longer usable. This is limited to 32 bits because 32 bits is the largest Director that can be represented in an encoding scheme.
Note: The label
field is an Option
: zero label parsed as None
(the route is being withdrawn and it is no longer usable),
nonzero label is Some(label)
.
As EncodingScheme
serialization does not have a fixed width in bytes, EncodingScheme
entities are
prefixed with a number of pads in order that their length will be a multiple of four bytes.
hex
stands for hex string representation of serialized encoding scheme
.
Fields of EncodingScheme
hex: String
scheme: EncodingScheme
LinkState(LinkStateData)
LinkState
stores data, which is used by route server/super node to plot good paths
through the network and avoid links which have long or unreliable delay.
So the data under LinkState
represents the quality of network link.
Trait Implementations
impl Clone for Entity
[src]
impl Debug for Entity
[src]
impl Eq for Entity
[src]
impl PartialEq<Entity> for Entity
[src]
impl StructuralEq for Entity
[src]
impl StructuralPartialEq for Entity
[src]
Auto Trait Implementations
impl RefUnwindSafe for Entity
impl Send for Entity
impl Sync for Entity
impl Unpin for Entity
impl UnwindSafe for Entity
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<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>,