Marathon control board uses a different source port.

This commit is contained in:
Tristan Smith 2024-07-22 11:51:36 -04:00
parent 82ea1143d4
commit 5bbbafc05a

View file

@ -15,7 +15,7 @@ use webbrowser;
use std::process; use std::process;
const DESTINATION_IP: &str = "255.255.255.255"; const DESTINATION_IP: &str = "255.255.255.255";
const SOURCE_PORT: u16 = 14236; //const SOURCE_PORT: u16 = 14236;
const DESTINATION_PORT: u16 = 14235; const DESTINATION_PORT: u16 = 14235;
#[derive(Clone, Hash, Eq, PartialEq)] #[derive(Clone, Hash, Eq, PartialEq)]
@ -200,7 +200,7 @@ fn extract_packet_info(packet: &[u8]) -> Option<PacketInfo> {
if ipv4.get_next_level_protocol() == IpNextHeaderProtocols::Udp { if ipv4.get_next_level_protocol() == IpNextHeaderProtocols::Udp {
let udp = UdpPacket::new(ipv4.payload())?; let udp = UdpPacket::new(ipv4.payload())?;
if ipv4.get_destination() == DESTINATION_IP.parse::<Ipv4Addr>().unwrap() if ipv4.get_destination() == DESTINATION_IP.parse::<Ipv4Addr>().unwrap()
&& udp.get_source() == SOURCE_PORT //&& udp.get_source() == SOURCE_PORT
&& udp.get_destination() == DESTINATION_PORT && udp.get_destination() == DESTINATION_PORT
{ {
return Some(PacketInfo { return Some(PacketInfo {