mirror of
https://github.com/dndx/phantun.git
synced 2025-11-03 03:15:34 +08:00
Some adaption and alligned to the source code from dndx
This commit is contained in:
@@ -146,7 +146,7 @@ impl Socket {
|
||||
)
|
||||
}
|
||||
|
||||
fn build_tcp_packet(&self, flags: u16, payload: Option<&[u8]>) -> Bytes {
|
||||
fn build_tcp_packet(&self, flags: u8, payload: Option<&[u8]>) -> Bytes {
|
||||
let ack = self.ack.load(Ordering::Relaxed);
|
||||
self.last_ack.store(ack, Ordering::Relaxed);
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ pub fn build_tcp_packet(
|
||||
remote_addr: SocketAddr,
|
||||
seq: u32,
|
||||
ack: u32,
|
||||
flags: u16,
|
||||
flags: u8,
|
||||
payload: Option<&[u8]>,
|
||||
) -> Bytes {
|
||||
let ip_header_len = match local_addr {
|
||||
|
||||
Reference in New Issue
Block a user