ts_derp 0.4.0

tailscale derp client
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use zerocopy::{FromBytes, Immutable, IntoBytes, KnownLayout};

use crate::frame::{Body, FrameType};

/// Indicate that this derp server is the client's preferred node.
#[derive(Debug, Copy, Clone, PartialEq, KnownLayout, Immutable, IntoBytes, FromBytes)]
#[repr(C)]
pub struct NotePreferred {
    /// Whether this is the client's home region (`0x1`) or not (`0x0`).
    pub is_home: u8,
}

impl Body for NotePreferred {
    const FRAME_TYPE: FrameType = FrameType::NotePreferred;
}