Some adaption and alligned to the source code from dndx

This commit is contained in:
Luca Ferrarotti
2023-10-14 14:14:36 +02:00
parent 422a465d6e
commit 1fea277103
10 changed files with 21 additions and 19 deletions

View File

@@ -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);

View File

@@ -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 {