sdlan-rs/src/config.rs
2024-03-02 12:14:53 +08:00

27 lines
692 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可以组合
// 表示从SN发送过来的REGISTER_SUPER消息主要用于SN注册
pub const SDLNA_FLAGS_FEDERATION: u16 = 0x0010;
pub const SDLAN_FLAGS_FROM_SN: u16 = 0x0020;
pub const SDLAN_FLAGS_SOCKET: u16 = 0x0040;
pub const SDLAN_FLAGS_HAS_V6: 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;