added SDLAN_FLAGS_HAS_V6 flag
This commit is contained in:
parent
7c37dd1f9e
commit
76162852a3
@ -5,7 +5,7 @@ pub const FLAGS_BITS_MASK: u16 = 0xffe0;
|
|||||||
// common头的flags里面的flag,可以组合
|
// common头的flags里面的flag,可以组合
|
||||||
pub const SDLAN_FLAGS_FROM_SN: u16 = 0x0020;
|
pub const SDLAN_FLAGS_FROM_SN: u16 = 0x0020;
|
||||||
pub const SDLAN_FLAGS_SOCKET: u16 = 0x0040;
|
pub const SDLAN_FLAGS_SOCKET: u16 = 0x0040;
|
||||||
pub const SDLAN_FLAGS_OPTIONS: u16 = 0x0080;
|
pub const SDLAN_FLAGS_HAS_V6: u16 = 0x0080;
|
||||||
|
|
||||||
pub const IPV4_SIZE: u8 = 4;
|
pub const IPV4_SIZE: u8 = 4;
|
||||||
pub const IPV6_SIZE: u8 = 16;
|
pub const IPV6_SIZE: u8 = 16;
|
||||||
|
|||||||
@ -183,6 +183,18 @@ pub fn encode_packet_encrypted<T: serde::Serialize>(
|
|||||||
Ok(result)
|
Ok(result)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
pub fn encode_packet_packet_encrypt(
|
||||||
|
cmn: &Common,
|
||||||
|
pkt: &Packet<'_>,
|
||||||
|
header_pass: &[u8],
|
||||||
|
) -> Result<Vec<u8>> {
|
||||||
|
let data2 = aes_encrypt(header_pass, pkt.data)?;
|
||||||
|
pkt.data = &data2;
|
||||||
|
encode_packet_packet(cmn, pkt)
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
pub fn encode_packet_packet(cmn: &Common, pkt: &Packet<'_>) -> Result<Vec<u8>> {
|
pub fn encode_packet_packet(cmn: &Common, pkt: &Packet<'_>) -> Result<Vec<u8>> {
|
||||||
let hdr = cmn.encode();
|
let hdr = cmn.encode();
|
||||||
let body = pkt.marshal()?;
|
let body = pkt.marshal()?;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user