sdlan-rs/src/config.rs
2024-02-26 14:05:43 +08:00

25 lines
572 B
Rust
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// common的flag掩码
pub const FLAGS_TYPE_MASK: u16 = 0x001f;
pub const FLAGS_BITS_MASK: u16 = 0xffe0;
// common头的flags里面的flag可以组合
pub const SDLAN_FLAGS_FROM_SN: u16 = 0x0020;
pub const SDLAN_FLAGS_SOCKET: u16 = 0x0040;
pub const SDLAN_FLAGS_OPTIONS: u16 = 0x0080;
pub const IPV4_SIZE: u8 = 4;
pub const IPV6_SIZE: u8 = 16;
// add to LIST
pub enum SDLanSNOPER {
SDLanSNAdd,
SDLanSNAddSkip,
SDLanSNAdded,
}
pub const AF_INET: u8 = 2;
pub const AF_INET6: u8 = 10;
pub const SDLAN_VERSION: u8 = 1;
pub const SDLAN_DEFAULT_TTL: u8 = 2;