feat: added modified TCP packet parser
checksum generation code is different, to allow for some sneaky tricks with regards to identifying the sparse session but binding to the same port multiple times
This commit is contained in:
@@ -139,7 +139,9 @@ async fn handle_command(
|
||||
use pcap_sys::packets::*;
|
||||
let eth_pkt = eth.pkt();
|
||||
let Layer3Pkt::IPv4Pkt(ip_pkt) = eth_pkt.get_layer3_pkt()?;
|
||||
let Layer4Pkt::UDP(udp_pkt) = ip_pkt.get_layer4_packet()?;
|
||||
let Layer4Pkt::UDP(udp_pkt) = ip_pkt.get_layer4_packet()? else {
|
||||
todo!()
|
||||
};
|
||||
|
||||
let source_port = udp_pkt.srcport();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user