ULE should not make use of the adaptation field.

This commit is contained in:
feyris-tan 2025-07-19 23:34:12 +02:00
parent 8c76f9a421
commit 30166ad8da
2 changed files with 7 additions and 2 deletions

View File

@ -18,6 +18,7 @@ namespace skyscraper8.Ietf.Rfc4236_ULE
/// <param name="errorNo">
/// Set this to:
/// 1* for a CRC error.
/// 2* for an invalid adaptation field control.
/// </param>
void OnUleError(int pid, int errorNo);
}

View File

@ -27,7 +27,11 @@ namespace skyscraper8.Ietf.Rfc4236_ULE
public void PushPacket(TsPacket packet)
{
if (packet.AdaptionFieldControl != 1)
{
_eventHandler.OnUleError(_pid, 2);
return;
}
if (packet.PayloadUnitStart)
{
PushPusiPacket(packet);
@ -161,7 +165,7 @@ namespace skyscraper8.Ietf.Rfc4236_ULE
PhysicalAddress source = new PhysicalAddress(ms.ReadBytes(6));
ushort etherType = ms.ReadUInt16BE();
byte[] contents = ms.ReadBytes(ms.GetAvailableBytes());
//_eventHandler.OnEthernetFrame(_pid, destination, source, etherType, contents);
_eventHandler.OnEthernetFrame(_pid, destination, source, etherType, contents);
}
public void PacketLoss()