From 49fa6790fa1dc1859d73808d7403e23f878d4eb2 Mon Sep 17 00:00:00 2001 From: feyris-tan <4116042+feyris-tan@users.noreply.github.com> Date: Fri, 25 Jul 2025 21:34:22 +0200 Subject: [PATCH] Plumbed some holes in the ULE parser. --- skyscraper8/Ietf/Rfc4236_ULE/UleContestant.cs | 2 +- skyscraper8/Program.cs | 1 - skyscraper8/Properties/launchSettings.json | 2 +- skyscraper8/Skyscraper/Scraper/SkyscraperContext.cs | 11 ++++++++++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/skyscraper8/Ietf/Rfc4236_ULE/UleContestant.cs b/skyscraper8/Ietf/Rfc4236_ULE/UleContestant.cs index 3ff6b71..e99e361 100644 --- a/skyscraper8/Ietf/Rfc4236_ULE/UleContestant.cs +++ b/skyscraper8/Ietf/Rfc4236_ULE/UleContestant.cs @@ -30,7 +30,7 @@ namespace skyscraper8.Ietf.Rfc4236_ULE public override void Introduce(ProgramContext programContext) { - throw new NotImplementedException(); + } public void OnEthernetFrame(int pid, PhysicalAddress destination, PhysicalAddress source, ushort etherType, byte[] contents) diff --git a/skyscraper8/Program.cs b/skyscraper8/Program.cs index 375565a..d661098 100644 --- a/skyscraper8/Program.cs +++ b/skyscraper8/Program.cs @@ -40,7 +40,6 @@ namespace skyscraper5 private static void IntegrationTest() { - } static void Main(string[] args) diff --git a/skyscraper8/Properties/launchSettings.json b/skyscraper8/Properties/launchSettings.json index 11f87ae..e15357d 100644 --- a/skyscraper8/Properties/launchSettings.json +++ b/skyscraper8/Properties/launchSettings.json @@ -2,7 +2,7 @@ "profiles": { "skyscraper8": { "commandName": "Project", - "commandLineArgs": "file-live \"C:\\Temp\\sky-uk-000000.ts\"", + "commandLineArgs": "\"Z:\\Freebies\\Datasets\\SkyscraperLibrarian\\DVB-S Juli 2025\\movistar-000000.ts\"", "remoteDebugEnabled": false }, "Container (Dockerfile)": { diff --git a/skyscraper8/Skyscraper/Scraper/SkyscraperContext.cs b/skyscraper8/Skyscraper/Scraper/SkyscraperContext.cs index ac8fc17..b512bab 100644 --- a/skyscraper8/Skyscraper/Scraper/SkyscraperContext.cs +++ b/skyscraper8/Skyscraper/Scraper/SkyscraperContext.cs @@ -1684,7 +1684,10 @@ namespace skyscraper5.Skyscraper.Scraper IPAddress sourceAddress = new IPAddress(ipv6Stream.ReadBytes(16)); IPAddress destinationAddress = new IPAddress(ipv6Stream.ReadBytes(16)); InternetHeader ipv6Header = new InternetHeader(trafficClass, flowLabel, payloadLength, nextHeader, hopLimit, sourceAddress, destinationAddress); - OnIpv4PacketArrival(ipv6Header, ipv6Stream.ReadBytes(payloadLength)); + if (ipv6Stream.GetAvailableBytes() >= payloadLength) + { + OnIpv4PacketArrival(ipv6Header, ipv6Stream.ReadBytes(payloadLength)); + } return; } else @@ -2710,6 +2713,8 @@ namespace skyscraper5.Skyscraper.Scraper public void OnEthernetFrame(int pid, PhysicalAddress destination, PhysicalAddress source, ushort etherType, byte[] contents) { + if (Array.TrueForAll(contents, x => x == 0)) + return; if (etherType <= 1500) { OnLlcFrame(etherType, contents); @@ -2724,6 +2729,10 @@ namespace skyscraper5.Skyscraper.Scraper //This is related to G.9961, a PowerLine standard specified by ITU-T T-REC-G.9961 //I don't think we need this. return; + case 0x2f00: + //This is something proprietary. + //Quite possibly related to Extron hardware? + return; case 0x0806: //This is an ARP Frame. We don't need it. return;