Refactored Tests.
All checks were successful
🚀 Pack skyscraper8 / make-zip (push) Successful in 2m4s
All checks were successful
🚀 Pack skyscraper8 / make-zip (push) Successful in 2m4s
This commit is contained in:
parent
bc6d9afa52
commit
36969eede2
@ -22,7 +22,9 @@ using skyscraper5.src.InteractionChannel.Model2;
|
|||||||
using skyscraper5.src.Skyscraper.FrequencyListGenerator;
|
using skyscraper5.src.Skyscraper.FrequencyListGenerator;
|
||||||
using skyscraper5.src.Skyscraper.Scraper.Dns;
|
using skyscraper5.src.Skyscraper.Scraper.Dns;
|
||||||
using skyscraper5.Teletext;
|
using skyscraper5.Teletext;
|
||||||
|
using skyscraper8.InteractionChannel.Model;
|
||||||
using skyscraper8.InteractionChannel.Model2;
|
using skyscraper8.InteractionChannel.Model2;
|
||||||
|
using skyscraper8.InteractionChannel.Model2.Descriptors;
|
||||||
using skyscraper8.Skyscraper.Scraper.Storage;
|
using skyscraper8.Skyscraper.Scraper.Storage;
|
||||||
|
|
||||||
namespace skyscraper5.Data.MySql
|
namespace skyscraper5.Data.MySql
|
||||||
@ -291,6 +293,112 @@ namespace skyscraper5.Data.MySql
|
|||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool TestForRcs2Nit(RcsNit nit)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void InsertRcs2Nit(RcsNit nit)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool UpdateRcs2Tdt(ushort interactiveNetworkId, DateTime tdtTimestamp)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool TestForTmst2(ushort interactiveNetworkId, Tmst2.TransmissionMode mode)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void InsertTmst2(ushort interactiveNetworkId, Tmst2.TransmissionMode mode)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool TestForTimFramePayloadFormat(ushort networkId, _0xb7_FramePayloadFormatDescriptor.TransmissionContext transmissionContext)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void InsertTimFramePayloadFormat(ushort networkId, _0xb7_FramePayloadFormatDescriptor.TransmissionContext transmissionContext)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool TestForTimCorrectionMessageExtension(PhysicalAddress macAddress)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void InsertTimCorrectionMessageExtension(PhysicalAddress macAddress,
|
||||||
|
_0xb1_CorrectionMessageExtensionDescriptor descriptor)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool TestForTimControlAssignment(PhysicalAddress macAddress)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void InsertTimControlAssignment(PhysicalAddress macAddress, _0xa4_SyncAssignDescriptor descriptor)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool TestForTimSatelliteReturnLink(PhysicalAddress macAddress)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void InsertTimSatelliteReturnLink(PhysicalAddress macAddress, _0xa9_SatelliteReturnLinkDescriptor descriptor)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool TestForLowerLayerService(PhysicalAddress macAddress)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void InsertTimLowerLayerService(PhysicalAddress macAddress, _0xbb_LowerLayerServiceDescriptor descriptor)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool TestForHigherLayerServiceInitalization(PhysicalAddress macAddress, _0xc4_HigherLayersInitializeDescriptor.Layer2Interface layer2Interface)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void InsertHigherLayerServiceInitalization(PhysicalAddress macAddress, _0xc4_HigherLayersInitializeDescriptor.Layer2Interface layer2Interface)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool TestForTimLogonResponse(PhysicalAddress macAddress)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void InsertTimLogonResponse(PhysicalAddress macAddress, _0xb9_LogonResponseDescriptor descriptor)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool TestForTimForwardInteractionPath(PhysicalAddress macAddress, _0xad_ForwardInteractionPathDescriptor.ForwardInteractionPath forwardInteractionPath)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void InsertTimForwardInteractionPath(PhysicalAddress macAddress, _0xad_ForwardInteractionPathDescriptor.ForwardInteractionPath forwardInteractionPath)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
public IEnumerable<Tuple<int, int, ProgramMapping>> SelectAllPmt()
|
public IEnumerable<Tuple<int, int, ProgramMapping>> SelectAllPmt()
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Drawing;
|
||||||
using System.Drawing.Imaging;
|
using System.Drawing.Imaging;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Drawing;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Drawing;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|||||||
@ -28,4 +28,8 @@
|
|||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="System.Drawing.Common" Version="10.0.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
13
skyscraper8.Tests/AllureLog.cs
Normal file
13
skyscraper8.Tests/AllureLog.cs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
using Allure.Commons;
|
||||||
|
using Allure.Xunit.Attributes.Steps;
|
||||||
|
|
||||||
|
namespace skyscraper8.Tests;
|
||||||
|
|
||||||
|
public class AllureLog
|
||||||
|
{
|
||||||
|
[AllureStep("{0}")]
|
||||||
|
public static void Log(string msg)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,18 +0,0 @@
|
|||||||
using skyscraper5.Mpeg2;
|
|
||||||
using skyscraper5.src.Mpeg2.PacketFilter;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace skyscraper8.Tests.ClassDependencies.AsraBarkerTransponderTests
|
|
||||||
{
|
|
||||||
internal class DummyFilter : IPacketFilter
|
|
||||||
{
|
|
||||||
public bool PassPacket(TsPacket packet)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,28 +0,0 @@
|
|||||||
using skyscraper5.Docsis.MacManagement;
|
|
||||||
using System.Net.NetworkInformation;
|
|
||||||
using skyscraper8.Tests.Properties;
|
|
||||||
|
|
||||||
namespace skyscraper8.Tests
|
|
||||||
{
|
|
||||||
public class RangingResponseTest
|
|
||||||
{
|
|
||||||
[Fact]
|
|
||||||
public void OffsetBreakerTest()
|
|
||||||
{
|
|
||||||
|
|
||||||
byte[] blob = Resources.ranging_response_test;
|
|
||||||
Random rng = new Random();
|
|
||||||
|
|
||||||
byte[] sourceMacBuffer = new byte[6];
|
|
||||||
rng.NextBytes(sourceMacBuffer);
|
|
||||||
PhysicalAddress sourceAddress = new PhysicalAddress(sourceMacBuffer);
|
|
||||||
|
|
||||||
byte[] targetMacBuffer = new byte[6];
|
|
||||||
rng.NextBytes(targetMacBuffer);
|
|
||||||
PhysicalAddress targetAddress = new PhysicalAddress(targetMacBuffer);
|
|
||||||
|
|
||||||
RangingResponse rangingResponse = new RangingResponse(sourceAddress, targetAddress, blob);
|
|
||||||
Assert.True(rangingResponse.Valid);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
152
skyscraper8.Tests/ResourceTests/DocsisTests.cs
Normal file
152
skyscraper8.Tests/ResourceTests/DocsisTests.cs
Normal file
@ -0,0 +1,152 @@
|
|||||||
|
using skyscraper5;
|
||||||
|
using skyscraper5.Docsis;
|
||||||
|
using skyscraper5.Docsis.AnnexC;
|
||||||
|
using skyscraper5.Docsis.MacManagement;
|
||||||
|
using skyscraper5.Mpeg2;
|
||||||
|
using skyscraper5.Skyscraper.Plugins;
|
||||||
|
using skyscraper5.Skyscraper.Scraper;
|
||||||
|
using skyscraper5.Skyscraper.Scraper.Storage;
|
||||||
|
using skyscraper5.Skyscraper.Scraper.Storage.Filesystem;
|
||||||
|
using skyscraper5.Skyscraper.Scraper.Storage.InMemory;
|
||||||
|
using skyscraper8.Skyscraper.IO;
|
||||||
|
using skyscraper8.Tests.ClassDependencies.DocsisTests;
|
||||||
|
using skyscraper8.Tests.Properties;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Net.NetworkInformation;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Allure.Xunit.Attributes;
|
||||||
|
using Xunit.Sdk;
|
||||||
|
|
||||||
|
namespace skyscraper8.Tests.ResourceTests
|
||||||
|
{
|
||||||
|
public class DocsisTests
|
||||||
|
{
|
||||||
|
[Fact]
|
||||||
|
[AllureSuite("Resources")]
|
||||||
|
[AllureFeature("DOCSIS")]
|
||||||
|
public void ModemCapabilitiesEncoding()
|
||||||
|
{
|
||||||
|
byte[] buffer = Resources.ModemCapabilitiesEncodingTest;
|
||||||
|
ModemCapabilitiesEncoding modemCapabilitiesEncoding = new ModemCapabilitiesEncoding(buffer);
|
||||||
|
Assert.True(modemCapabilitiesEncoding.Valid);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
[AllureSuite("Resources")]
|
||||||
|
[AllureFeature("DOCSIS")]
|
||||||
|
public void MultipartRegistrationResponse()
|
||||||
|
{
|
||||||
|
Random rng = new Random();
|
||||||
|
|
||||||
|
byte[] sourceBuffer = new byte[6];
|
||||||
|
rng.NextBytes(sourceBuffer);
|
||||||
|
PhysicalAddress source = new PhysicalAddress(sourceBuffer);
|
||||||
|
|
||||||
|
byte[] targetBuffer = new byte[6];
|
||||||
|
rng.NextBytes(targetBuffer);
|
||||||
|
PhysicalAddress target = new PhysicalAddress(targetBuffer);
|
||||||
|
|
||||||
|
byte[] buffer = Properties.Resources.MultipartRegistrationResponseTest;
|
||||||
|
T45_V4_MultipartRegistrationResponse test = new T45_V4_MultipartRegistrationResponse(source, target, buffer);
|
||||||
|
Assert.True(test.Valid);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
[AllureSuite("Resources")]
|
||||||
|
[AllureFeature("DOCSIS")]
|
||||||
|
public void MacManagement_4_45()
|
||||||
|
{
|
||||||
|
DocsisEventHandlerImpl docsisEventHandler = new DocsisEventHandlerImpl();
|
||||||
|
DocsisEnvironment environment = new DocsisEnvironment(docsisEventHandler);
|
||||||
|
|
||||||
|
byte[] testPayload = Resources.PushMacManagementMessage_Version4_Type45;
|
||||||
|
|
||||||
|
Random rng = new Random();
|
||||||
|
byte[] sourceBuffer = new byte[6];
|
||||||
|
rng.NextBytes(sourceBuffer);
|
||||||
|
PhysicalAddress source = new PhysicalAddress(sourceBuffer);
|
||||||
|
|
||||||
|
byte[] targetBuffer = new byte[6];
|
||||||
|
rng.NextBytes(targetBuffer);
|
||||||
|
PhysicalAddress target = new PhysicalAddress(targetBuffer);
|
||||||
|
|
||||||
|
environment.PushMacManagementMessage(testPayload, 4, 45, source, target, testPayload);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
[AllureSuite("Resources")]
|
||||||
|
[AllureFeature("DOCSIS")]
|
||||||
|
public void InvalidUpstreamChannelDescriptorTest()
|
||||||
|
{
|
||||||
|
byte[] testPayload = Resources.UpstreamChannelDescriptorTest;
|
||||||
|
|
||||||
|
Random rng = new Random();
|
||||||
|
byte[] sourceBuffer = new byte[6];
|
||||||
|
rng.NextBytes(sourceBuffer);
|
||||||
|
PhysicalAddress source = new PhysicalAddress(sourceBuffer);
|
||||||
|
|
||||||
|
byte[] targetBuffer = new byte[6];
|
||||||
|
rng.NextBytes(targetBuffer);
|
||||||
|
PhysicalAddress target = new PhysicalAddress(targetBuffer);
|
||||||
|
|
||||||
|
UpstreamChannelDescriptor ucd = new UpstreamChannelDescriptor(source, target, testPayload);
|
||||||
|
Assert.False(ucd.Valid);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
[AllureSuite("Resources")]
|
||||||
|
[AllureFeature("DOCSIS")]
|
||||||
|
public void TransmitChannelConfigurationObjectTest()
|
||||||
|
{
|
||||||
|
byte[] testPayload = Resources.TransmitChannelConfigurationObject;
|
||||||
|
|
||||||
|
CommonTlvEncodingObject.TransmitChannelConfigurationObject child = new CommonTlvEncodingObject.TransmitChannelConfigurationObject(testPayload);
|
||||||
|
Assert.True(child.Valid);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
[AllureSuite("Resources")]
|
||||||
|
[AllureFeature("DOCSIS")]
|
||||||
|
public void MultipartRegistrationResponse2()
|
||||||
|
{
|
||||||
|
Random rng = new Random();
|
||||||
|
|
||||||
|
byte[] sourceBuffer = new byte[6];
|
||||||
|
rng.NextBytes(sourceBuffer);
|
||||||
|
PhysicalAddress source = new PhysicalAddress(sourceBuffer);
|
||||||
|
|
||||||
|
byte[] targetBuffer = new byte[6];
|
||||||
|
rng.NextBytes(targetBuffer);
|
||||||
|
PhysicalAddress target = new PhysicalAddress(targetBuffer);
|
||||||
|
|
||||||
|
byte[] buffer = Properties.Resources.MultipartRegistrationResponseTest2;
|
||||||
|
T45_V4_MultipartRegistrationResponse test = new T45_V4_MultipartRegistrationResponse(source, target, buffer);
|
||||||
|
Assert.True(test.Valid);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
[AllureSuite("Resources")]
|
||||||
|
[AllureFeature("DOCSIS")]
|
||||||
|
public void OffsetBreakerTest()
|
||||||
|
{
|
||||||
|
|
||||||
|
byte[] blob = Resources.ranging_response_test;
|
||||||
|
Random rng = new Random();
|
||||||
|
|
||||||
|
byte[] sourceMacBuffer = new byte[6];
|
||||||
|
rng.NextBytes(sourceMacBuffer);
|
||||||
|
PhysicalAddress sourceAddress = new PhysicalAddress(sourceMacBuffer);
|
||||||
|
|
||||||
|
byte[] targetMacBuffer = new byte[6];
|
||||||
|
rng.NextBytes(targetMacBuffer);
|
||||||
|
PhysicalAddress targetAddress = new PhysicalAddress(targetMacBuffer);
|
||||||
|
|
||||||
|
RangingResponse rangingResponse = new RangingResponse(sourceAddress, targetAddress, blob);
|
||||||
|
Assert.True(rangingResponse.Valid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
36
skyscraper8.Tests/ResourceTests/GsType1SanityTest.cs
Normal file
36
skyscraper8.Tests/ResourceTests/GsType1SanityTest.cs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using Allure.Xunit.Attributes;
|
||||||
|
using skyscraper5.Mpeg2;
|
||||||
|
using skyscraper8.Tests.Properties;
|
||||||
|
|
||||||
|
namespace skyscraper8.Tests.ResourceTests;
|
||||||
|
|
||||||
|
public class GsType1SanityTest
|
||||||
|
{
|
||||||
|
[Fact]
|
||||||
|
[AllureSuite("Resources")]
|
||||||
|
[AllureFeature("MPEG2")]
|
||||||
|
public void CheckBfbsCrc()
|
||||||
|
{
|
||||||
|
byte[] blob = Resources.Frame00001343_TSGS1_MIS000_SYNC001;
|
||||||
|
MemoryStream ms = new MemoryStream(blob, false);
|
||||||
|
bool result = DvbCrc32.ValidateCrc(ms, 0, (int)ms.Length);
|
||||||
|
Assert.True(result);
|
||||||
|
|
||||||
|
blob = Resources.Frame00000008_TSGS1_MIS000_SYNC001;
|
||||||
|
ms = new MemoryStream(blob, false);
|
||||||
|
result = DvbCrc32.ValidateCrc(ms, 0, (int)ms.Length);
|
||||||
|
Assert.True(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
[AllureSuite("Resources")]
|
||||||
|
[AllureFeature("MPEG2")]
|
||||||
|
public void CheckBfbsCrcSpan()
|
||||||
|
{
|
||||||
|
byte[] blob = Resources.Frame00000012_TSGS1_MIS000_SYNC001;
|
||||||
|
ReadOnlySpan<byte> span = new ReadOnlySpan<byte>(blob);
|
||||||
|
bool result = DvbCrc32.ValidateCrc(span);
|
||||||
|
Assert.True(result);
|
||||||
|
}
|
||||||
|
}
|
||||||
43
skyscraper8.Tests/ResourceTests/SkyscraperTests.cs
Normal file
43
skyscraper8.Tests/ResourceTests/SkyscraperTests.cs
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
using skyscraper5.Mpeg2;
|
||||||
|
using skyscraper5.Skyscraper.Scraper;
|
||||||
|
using skyscraper5.Skyscraper.Scraper.Storage.InMemory;
|
||||||
|
using skyscraper8.Tests.Properties;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Allure.Xunit.Attributes;
|
||||||
|
using skyscraper8.Skyscraper.Scraper.Storage;
|
||||||
|
|
||||||
|
namespace skyscraper8.Tests.ResourceTests
|
||||||
|
{
|
||||||
|
public class SkyscraperTests
|
||||||
|
{
|
||||||
|
[Fact]
|
||||||
|
[AllureSuite("Resources")]
|
||||||
|
[AllureFeature("Skyscraper")]
|
||||||
|
public void RunTestPatterns()
|
||||||
|
{
|
||||||
|
byte[][] buffers = new byte[][] { Resources.test_1packet_01, Resources.test_2packets_02_03, Resources.test_3packets_04_05_06 };
|
||||||
|
|
||||||
|
InMemoryScraperStorageFactory imssf = new InMemoryScraperStorageFactory();
|
||||||
|
|
||||||
|
foreach (byte[] buffer in buffers)
|
||||||
|
{
|
||||||
|
TsContext mpeg2 = new TsContext();
|
||||||
|
DataStorage ds = new InMemoryScraperStorageFactory().CreateDataStorage();
|
||||||
|
ObjectStorage os = new NullObjectStorage();
|
||||||
|
|
||||||
|
SkyscraperContext skyscraper = new SkyscraperContext(mpeg2, ds, os);
|
||||||
|
MemoryStream ms = new MemoryStream(buffer, false);
|
||||||
|
|
||||||
|
skyscraper.InitalizeFilterChain();
|
||||||
|
skyscraper.IngestFromStream(ms);
|
||||||
|
|
||||||
|
ms.Close();
|
||||||
|
ms.Dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
590
skyscraper8.Tests/RootTests/DocsisTests.cs
Normal file
590
skyscraper8.Tests/RootTests/DocsisTests.cs
Normal file
@ -0,0 +1,590 @@
|
|||||||
|
using Allure.Commons;
|
||||||
|
using Allure.Xunit.Attributes;
|
||||||
|
using skyscraper5.Docsis;
|
||||||
|
using skyscraper5.Docsis.AnnexC;
|
||||||
|
|
||||||
|
namespace skyscraper8.Tests.RootTests;
|
||||||
|
|
||||||
|
public class DocsisTests
|
||||||
|
{
|
||||||
|
[Fact]
|
||||||
|
[AllureSuite("Root")]
|
||||||
|
[AllureFeature("DOCSIS")]
|
||||||
|
void MacManagementMessageTypeAttributeTest()
|
||||||
|
{
|
||||||
|
MacManagementMessageTypeAttribute mmmta = new MacManagementMessageTypeAttribute(1, 2);
|
||||||
|
Console.WriteLine(mmmta.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
[AllureSuite("Root")]
|
||||||
|
[AllureFeature("DOCSIS")]
|
||||||
|
void RcpIdEncodingTest()
|
||||||
|
{
|
||||||
|
RcpIdEncoding rie = new RcpIdEncoding(new byte[] { 7, 1, 0 });
|
||||||
|
SimplifiedReceiveChannelAssignmentEncoding simplifiedReceiveChannelAssignmentEncoding = rie.SimplifiedReceiveChannelConfiguration;
|
||||||
|
Assert.NotNull(simplifiedReceiveChannelAssignmentEncoding);
|
||||||
|
Assert.Throws<NotImplementedException>(() => new RcpIdEncoding(new byte[] { 255, 1, 0 }));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
[AllureSuite("Root")]
|
||||||
|
[AllureFeature("DOCSIS")]
|
||||||
|
void EthernetLlcPacketClassificationEncodingTest()
|
||||||
|
{
|
||||||
|
EthernetLlcPacketClassificationEncoding epce = new EthernetLlcPacketClassificationEncoding(new byte[] { 3, 3, 1, 0, 1 });
|
||||||
|
ushort epceEProt = epce.EProt;
|
||||||
|
Assert.Equal(1, epce.EProt);
|
||||||
|
Assert.Equal(1, epce.Type);
|
||||||
|
Assert.Throws<NotImplementedException>(() => new EthernetLlcPacketClassificationEncoding(new byte[] { 255, 1, 0 }));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
[AllureSuite("Root")]
|
||||||
|
[AllureFeature("DOCSIS")]
|
||||||
|
void SimplifiedReceiveChannelAssignmentEncodingTest()
|
||||||
|
{
|
||||||
|
SimplifiedReceiveChannelAssignmentEncoding srcae =
|
||||||
|
new SimplifiedReceiveChannelAssignmentEncoding(new byte[] { 1, 1, 0, 2, 1, 0, 3, 1, 0 });
|
||||||
|
Assert.Equal(0,srcae.DownstreamChannelAssignment[0]);
|
||||||
|
Assert.Equal(0, srcae.DownstreamProfileAssignment[0]);
|
||||||
|
Assert.Equal(0, srcae.PrimaryDownstreamChannelAssignment[0]);
|
||||||
|
Assert.Throws<NotImplementedException>(() => new SimplifiedReceiveChannelAssignmentEncoding(new byte[] { 254,0,1 }));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
[AllureSuite("Root")]
|
||||||
|
[AllureFeature("DOCSIS")]
|
||||||
|
void TransmitChannelConfigurationObjectTest()
|
||||||
|
{
|
||||||
|
CommonTlvEncodingObject.TransmitChannelConfigurationObject tcco =
|
||||||
|
new CommonTlvEncodingObject.TransmitChannelConfigurationObject(
|
||||||
|
new byte[]
|
||||||
|
{
|
||||||
|
1, 1, 0,
|
||||||
|
2, 1, 0,
|
||||||
|
3, 1, 0,
|
||||||
|
5, 4, 0, 0, 0, 0,
|
||||||
|
6, 2, 0, 0,
|
||||||
|
7, 1, 1,
|
||||||
|
9, 1, 0,
|
||||||
|
10, 1, 0,
|
||||||
|
11, 1, 0
|
||||||
|
});
|
||||||
|
Assert.Equal(0, tcco.TccReferenceId.Value);
|
||||||
|
Assert.Equal(CommonTlvEncodingObject.TransmitChannelConfigurationObject.UpstreamChannelActionEnum.NoAction, tcco.UpstreamChannelAction.Value);
|
||||||
|
Assert.Equal(0, tcco.UpstreamChannelId.Value);
|
||||||
|
Assert.NotNull(tcco.UpstreamChannelDescriptor);
|
||||||
|
Assert.Equal(0, tcco.RangingSid.Value);
|
||||||
|
Assert.Equal(InitalizationTechniqueEnum.BroadcastInitialRanging, tcco.InitializationTechnique.Value);
|
||||||
|
Assert.Equal(0, tcco.DynamicRangeWindow);
|
||||||
|
Assert.Equal(0, tcco.P16Hi);
|
||||||
|
Assert.Equal(0, tcco.ListOfIucs[0]);
|
||||||
|
|
||||||
|
Assert.Throws<NotImplementedException>(() =>
|
||||||
|
new CommonTlvEncodingObject.TransmitChannelConfigurationObject(new byte[] { 254, 1, 0 }));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
[AllureSuite("Root")]
|
||||||
|
[AllureFeature("DOCSIS")]
|
||||||
|
void CommonTlvEncodingObjectTest()
|
||||||
|
{
|
||||||
|
MemoryStream ms = new MemoryStream(new byte[]
|
||||||
|
{
|
||||||
|
5, 1, 0,
|
||||||
|
47, 1, 0,
|
||||||
|
49, 1, 0,
|
||||||
|
31, 1, 0,
|
||||||
|
27, 1, 0,
|
||||||
|
30, 1, 0,
|
||||||
|
52, 2, 0, 1
|
||||||
|
});
|
||||||
|
CommonTlvEncodingObject commonTlv = new CommonTlvEncodingObject(ms);
|
||||||
|
Assert.NotNull(commonTlv.ModemCapabilitiesEncoding);
|
||||||
|
Assert.NotNull(commonTlv.ServiceFlowSidClusterAssignment);
|
||||||
|
Assert.NotNull(commonTlv.RcpId);
|
||||||
|
Assert.Equal(0, commonTlv.KeySequenceNumber);
|
||||||
|
Assert.Equal(0, commonTlv.HmacDigest[0]);
|
||||||
|
Assert.NotNull(commonTlv.AuthorizationHint);
|
||||||
|
Assert.Equal(new TimeSpan(0, 0, 1), commonTlv.InitializingChannelTimeout);
|
||||||
|
|
||||||
|
ms = new MemoryStream(new byte[] { 254, 1, 0 });
|
||||||
|
Assert.Throws<NotImplementedException>(() => new CommonTlvEncodingObject(ms));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
[AllureSuite("Root")]
|
||||||
|
[AllureFeature("DOCSIS")]
|
||||||
|
void GeneralPacketClassifierEncodingTest()
|
||||||
|
{
|
||||||
|
GeneralPacketClassifierEncoding gpce = new GeneralPacketClassifierEncoding(new byte[]
|
||||||
|
{
|
||||||
|
6, 1, 1,
|
||||||
|
5, 1, 0,
|
||||||
|
9, 1, 0,
|
||||||
|
3, 2, 0, 1,
|
||||||
|
1, 1, 0,
|
||||||
|
2, 2, 0, 1,
|
||||||
|
4, 4, 0, 0, 0, 1,
|
||||||
|
7, 1, 0,
|
||||||
|
10, 1, 0,
|
||||||
|
12, 16,
|
||||||
|
//IPv6 Packet Classification Encoding
|
||||||
|
3, 2, 0, 1,
|
||||||
|
4, 4, 127, 0, 0, 1,
|
||||||
|
6, 4, 127, 0, 0, 1
|
||||||
|
});
|
||||||
|
Assert.True(gpce.ClassifierActivationState.Value);
|
||||||
|
Assert.Equal(0, gpce.RulePriority.Value);
|
||||||
|
Assert.NotNull(gpce.Ipv4PacketClassification);
|
||||||
|
Assert.Equal(1, gpce.ServiceFlowReference.Value);
|
||||||
|
Assert.Equal(0, gpce.ClassifierReference.Value);
|
||||||
|
Assert.Equal(1, gpce.ClassifierIdentifier.Value);
|
||||||
|
Assert.Equal((uint)1, gpce.ServiceFlowIdentifier.Value);
|
||||||
|
Assert.Equal(GeneralPacketClassifierEncoding.DynamicServiceChangeActionEnum.Add, gpce.DynamicServiceChangeAction.Value);
|
||||||
|
Assert.NotNull(gpce.EthernetLlcPacketClassificationEncodings);
|
||||||
|
|
||||||
|
Assert.Throws<NotImplementedException>(() => new GeneralPacketClassifierEncoding(new byte[]
|
||||||
|
{
|
||||||
|
12, 4,
|
||||||
|
255, 1, 0, 0
|
||||||
|
}));
|
||||||
|
|
||||||
|
Assert.Throws<NotImplementedException>(() => new GeneralPacketClassifierEncoding(new byte[]
|
||||||
|
{
|
||||||
|
254, 1, 0
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
[AllureSuite("Root")]
|
||||||
|
[AllureFeature("DOCSIS")]
|
||||||
|
public void Ipv4PacketClassificationEncodingTest()
|
||||||
|
{
|
||||||
|
GeneralPacketClassifierEncoding.Ipv4PacketClassificationEncodings ipce =
|
||||||
|
new GeneralPacketClassifierEncoding.Ipv4PacketClassificationEncodings(new byte[]
|
||||||
|
{
|
||||||
|
3, 4, 127, 0, 0, 1,
|
||||||
|
5, 4, 127, 0, 0, 1,
|
||||||
|
2, 2, 0, 1,
|
||||||
|
4, 4, 255, 255, 255, 0,
|
||||||
|
6, 4, 255, 255, 255, 0,
|
||||||
|
9, 2, 0, 1,
|
||||||
|
10, 2, 0, 1,
|
||||||
|
7, 2, 0, 1,
|
||||||
|
8, 2, 0, 1
|
||||||
|
});
|
||||||
|
Assert.NotNull(ipce.Ipv4SourceAddress);
|
||||||
|
Assert.NotNull(ipce.Ipv4DestinationAddress);
|
||||||
|
Assert.Equal(1, ipce.IpProtocol.Value);
|
||||||
|
Assert.NotNull(ipce.Ipv4SourceMask);
|
||||||
|
Assert.NotNull(ipce.Ipv4DestinationMask);
|
||||||
|
Assert.Equal(1, ipce.DestinationPortStart.Value);
|
||||||
|
Assert.Equal(1, ipce.DestinationPortEnd.Value);
|
||||||
|
Assert.Equal(1, ipce.SourcePortStart.Value);
|
||||||
|
Assert.Equal(1, ipce.SourcePortEnd.Value);
|
||||||
|
|
||||||
|
Assert.Throws<NotImplementedException>(() =>
|
||||||
|
new GeneralPacketClassifierEncoding.Ipv4PacketClassificationEncodings(new byte[]
|
||||||
|
{
|
||||||
|
255, 1, 0
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
[AllureSuite("Root")]
|
||||||
|
[AllureFeature("DOCSIS")]
|
||||||
|
public void ServiceFlowSidClusterAssignmentObjectTest()
|
||||||
|
{
|
||||||
|
ServiceFlowSidClusterAssignmentObject sfscao = new ServiceFlowSidClusterAssignmentObject(new byte[]
|
||||||
|
{
|
||||||
|
1, 4, 0, 0, 0, 1,
|
||||||
|
2, 1, 0,
|
||||||
|
3, 1, 0,
|
||||||
|
});
|
||||||
|
Assert.Equal(1u, sfscao.SFID.Value);
|
||||||
|
Assert.NotNull(sfscao.SidClusterEncoding);
|
||||||
|
Assert.NotNull(sfscao.SidClusterSwitchoverCriteria);
|
||||||
|
|
||||||
|
Assert.Throws<NotImplementedException>(() => new ServiceFlowSidClusterAssignmentObject(new byte[]
|
||||||
|
{
|
||||||
|
255, 1, 0
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
[AllureSuite("Root")]
|
||||||
|
[AllureFeature("DOCSIS")]
|
||||||
|
public void SidClusterEncodingObjectTest()
|
||||||
|
{
|
||||||
|
ServiceFlowSidClusterAssignmentObject.SidClusterEncodingObject sceo =
|
||||||
|
new ServiceFlowSidClusterAssignmentObject.SidClusterEncodingObject(new byte[]
|
||||||
|
{
|
||||||
|
1, 1, 1,
|
||||||
|
2, 1, 0
|
||||||
|
});
|
||||||
|
Assert.Equal(1, sceo.SidClusterId.Value);
|
||||||
|
Assert.NotNull(sceo.SidToChannelMapping);
|
||||||
|
|
||||||
|
Assert.Throws<NotImplementedException>(() => new ServiceFlowSidClusterAssignmentObject.SidClusterEncodingObject(new byte[]
|
||||||
|
{
|
||||||
|
255, 1, 0
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
[AllureSuite("Root")]
|
||||||
|
[AllureFeature("DOCSIS")]
|
||||||
|
public void SidToChannelMappingObjectTest()
|
||||||
|
{
|
||||||
|
ServiceFlowSidClusterAssignmentObject.SidClusterEncodingObject.SidToChannelMappingObject stcmo =
|
||||||
|
new ServiceFlowSidClusterAssignmentObject.SidClusterEncodingObject.SidToChannelMappingObject(new byte[]
|
||||||
|
{
|
||||||
|
1,1,1,
|
||||||
|
2,2,0,1,
|
||||||
|
3,1,1
|
||||||
|
});
|
||||||
|
Assert.Equal(1, stcmo.UpstreamChannelId.Value);
|
||||||
|
Assert.Equal(1, stcmo.SID.Value);
|
||||||
|
Assert.Equal(ServiceFlowSidClusterAssignmentObject.SidClusterEncodingObject.SidToChannelMappingObject.ActionEnum.Add,stcmo.Action.Value);
|
||||||
|
|
||||||
|
Assert.Throws<NotImplementedException>(() =>
|
||||||
|
new ServiceFlowSidClusterAssignmentObject.SidClusterEncodingObject.SidToChannelMappingObject(new byte[]
|
||||||
|
{
|
||||||
|
255, 1, 0
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
[AllureSuite("Root")]
|
||||||
|
[AllureFeature("DOCSIS")]
|
||||||
|
public void Ipv6PacketClassificationEncodingTest()
|
||||||
|
{
|
||||||
|
byte[] buffer = new byte[]
|
||||||
|
{
|
||||||
|
12, //Type Ipv6 Packet Classification Encoding
|
||||||
|
40, //Length of IPv6 Packet Classification Encoding
|
||||||
|
|
||||||
|
3,2, 0x08,0x00, //Next Header Type
|
||||||
|
4,16, 0xfd,0x58,0x2f,0x40,0xec,0xe9,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
|
||||||
|
6,16, 0xfd,0x73,0x14,0x63,0x41,0x65,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01
|
||||||
|
};
|
||||||
|
GeneralPacketClassifierEncoding gpce = new GeneralPacketClassifierEncoding(buffer);
|
||||||
|
Ipv6PacketClassificationEncoding ipce = gpce.Ipv6PacketClassification;
|
||||||
|
Assert.NotNull(ipce);
|
||||||
|
Assert.NotNull(ipce.Ipv6DestinationAddress);
|
||||||
|
Assert.NotNull(ipce.Ipv6SourceAddress);
|
||||||
|
Assert.Equal(0x0800, ipce.NextHeaderType);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
[AllureSuite("Root")]
|
||||||
|
[AllureFeature("DOCSIS")]
|
||||||
|
public void SidClusterSwitchoverCriteriaObjectTest()
|
||||||
|
{
|
||||||
|
byte[] buffer = new byte[]
|
||||||
|
{
|
||||||
|
1, 1, 1,
|
||||||
|
2, 4, 0, 0, 0, 1,
|
||||||
|
3, 4, 0, 0, 0, 1,
|
||||||
|
4, 2, 0, 1
|
||||||
|
};
|
||||||
|
ServiceFlowSidClusterAssignmentObject.SidClusterSwitchoverCriteriaObject scsco =
|
||||||
|
new ServiceFlowSidClusterAssignmentObject.SidClusterSwitchoverCriteriaObject(buffer);
|
||||||
|
Assert.Equal((byte)1,scsco.MaximumRequestPerSidCluster);
|
||||||
|
Assert.Equal((uint)1, scsco.MaximumOutstandingBytesPerSidCluster);
|
||||||
|
Assert.Equal((uint)1, scsco.MaximumTotalBytesRequestedPerSidCluster);
|
||||||
|
Assert.Equal((ushort)1, scsco.MaximumTimeInTheSidCluster);
|
||||||
|
|
||||||
|
buffer = new byte[] { 254, 1, 0 };
|
||||||
|
Assert.Throws<NotImplementedException>(() =>
|
||||||
|
new ServiceFlowSidClusterAssignmentObject.SidClusterSwitchoverCriteriaObject(buffer));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
[AllureSuite("Root")]
|
||||||
|
[AllureFeature("DOCSIS")]
|
||||||
|
public void ModemCapabilitiesEncodingTest()
|
||||||
|
{
|
||||||
|
byte[] buffer = new byte[]
|
||||||
|
{
|
||||||
|
1, 1, 1,
|
||||||
|
2, 1, 0,
|
||||||
|
3, 1, 1,
|
||||||
|
4, 1, 1,
|
||||||
|
6, 1, 1,
|
||||||
|
7, 1, 1,
|
||||||
|
8, 1, 1,
|
||||||
|
10, 1, 1,
|
||||||
|
11, 1, 1,
|
||||||
|
12, 1, 1,
|
||||||
|
15, 1, 1,
|
||||||
|
16, 4, 1, 2, 3, 4,
|
||||||
|
17, 1, 1,
|
||||||
|
18, 7, 1, 0, 0, 0, 0, 0, 0,
|
||||||
|
19, 1, 1,
|
||||||
|
20, 1, 2,
|
||||||
|
21, 1, 255,
|
||||||
|
22, 1, 1,
|
||||||
|
23, 1, 1,
|
||||||
|
24, 1, 2,
|
||||||
|
25, 1, 2,
|
||||||
|
26, 1, 2,
|
||||||
|
27, 1, 2,
|
||||||
|
28, 1, 2,
|
||||||
|
29, 1, 2,
|
||||||
|
30, 1, 3,
|
||||||
|
31, 1, 3,
|
||||||
|
32, 1, 3,
|
||||||
|
33, 1, 2,
|
||||||
|
34, 1, 1,
|
||||||
|
35, 1, 255,
|
||||||
|
36, 1, 3,
|
||||||
|
37, 1, 0,
|
||||||
|
38, 2, 0, 3,
|
||||||
|
39, 1, 1,
|
||||||
|
40, 1, 4,
|
||||||
|
44, 0,
|
||||||
|
46, 1, 1,
|
||||||
|
47, 4, 0, 0, 0, 255,
|
||||||
|
48, 2, 0, 4,
|
||||||
|
49, 1, 4,
|
||||||
|
50, 1, 5,
|
||||||
|
51, 1, 5,
|
||||||
|
52, 2, 1, 2,
|
||||||
|
53, 2, 1, 2,
|
||||||
|
54, 1, 1,
|
||||||
|
55, 1, 1,
|
||||||
|
56, 1, 0,
|
||||||
|
57, 1, 3,
|
||||||
|
58, 1, 5,
|
||||||
|
59, 2, 0, 5,
|
||||||
|
60, 1, 3,
|
||||||
|
76, 1, 7,
|
||||||
|
};
|
||||||
|
|
||||||
|
ModemCapabilitiesEncoding mcs = new ModemCapabilitiesEncoding(buffer);
|
||||||
|
Assert.True(mcs.ConcatenationSupport);
|
||||||
|
Assert.Equal(new Version(1, 0), mcs.DocsisVersion);
|
||||||
|
Assert.True(mcs.FragmentationSupport);
|
||||||
|
Assert.True(mcs.PayloadHeaderSuppressionSupport);
|
||||||
|
Assert.Equal(ModemCapabilitiesEncoding.PrivacySupportValue.BpiPlusSupport,mcs.PrivacySupport.Value);
|
||||||
|
Assert.Equal(1, mcs.DownstreamSaidSupport.Value);
|
||||||
|
Assert.Equal(1, mcs.UpstreamServiceFlowSupport.Value);
|
||||||
|
Assert.Equal(1, mcs.TransmitPreEqualizerTapsPerModulationInterval.Value);
|
||||||
|
Assert.Equal(1, mcs.NumberOfTransmitEqualizerTaps.Value);
|
||||||
|
Assert.True(mcs.DccSupport);
|
||||||
|
Assert.NotNull(mcs.RangingHoldOffSupport);
|
||||||
|
Assert.True(mcs.L2VPN);
|
||||||
|
Assert.NotNull(mcs.ESafeHostCapability);
|
||||||
|
Assert.True(mcs.DownstreamUnencryptedTrafficFiltering);
|
||||||
|
Assert.Equal(ModemCapabilitiesEncoding.UpstreamFrequencyRangeSupportEnum.Extended, mcs.UpstreamFrequencyRangeSupport);
|
||||||
|
Assert.True(mcs._160kspsSymbolRateSupport);
|
||||||
|
Assert.True(mcs._320kspsSymbolRateSupport);
|
||||||
|
Assert.True(mcs._640kspsSymbolRateSupport);
|
||||||
|
Assert.True(mcs._1280kspsSymbolRateSupport);
|
||||||
|
Assert.True(mcs._2560kspsSymbolRateSupport);
|
||||||
|
Assert.True(mcs._5120kspsSymbolRateSupport);
|
||||||
|
Assert.True(mcs.SelectableActiveCodeMode2Support);
|
||||||
|
Assert.True(mcs.CodeHoppingMode2Support);
|
||||||
|
Assert.Equal(2,mcs.ScQamMultipleTransmitChannelSupport.Value);
|
||||||
|
Assert.Equal(2, mcs.TotalSidClusterSupport.Value);
|
||||||
|
Assert.Equal(2, mcs.SidClustersPerServiceFlowSupport.Value);
|
||||||
|
Assert.Equal(2, mcs.ScQamMultipleReceiveChannelSupport.Value);
|
||||||
|
Assert.Equal(3, mcs.TotalDsidSupport.Value);
|
||||||
|
Assert.Equal(3, mcs.ResequencingDsidSupport.Value);
|
||||||
|
Assert.Equal(3, mcs.MulticastDsidSupport.Value);
|
||||||
|
Assert.Equal(ModemCapabilitiesEncoding.MulticastDsidForwardingEnum.SupportPromiscious, mcs.MulticastDsidForwarding.Value);
|
||||||
|
Assert.True(mcs.FrameControlTypeForwardingCapability);
|
||||||
|
Assert.True(mcs.DpvPerPathSuppported);
|
||||||
|
Assert.True(mcs.DpvPerPacketSuppported);
|
||||||
|
Assert.Equal(3, mcs.UnsolicitedGrantServiceFlowSupport.Value);
|
||||||
|
Assert.True(mcs.MapAndUcdReceiptSupport);
|
||||||
|
Assert.Equal(3, mcs.UpstreamDropClassifierSupport);
|
||||||
|
Assert.True(mcs.Ipv6Support.Value);
|
||||||
|
Assert.Equal(4, mcs.ExtendedUpstreamTransmitPowerCapability.Value);
|
||||||
|
Assert.True(mcs.CmStatusAck);
|
||||||
|
Assert.True(mcs.EnergyManagement1x1Feature);
|
||||||
|
Assert.True(mcs.DocsisLightSleepMode);
|
||||||
|
Assert.Equal(4, mcs.ExtendedPacketLengthSupportCapability);
|
||||||
|
Assert.Equal(4, mcs.OfdmMultipleReceiveChannelSupport.Value);
|
||||||
|
Assert.Equal(5, mcs.OfdmaMultipleTransmitChannelSupport.Value);
|
||||||
|
Assert.Equal(5, mcs.DownstreamOfdmProfileSupport.Value);
|
||||||
|
Assert.NotNull(mcs.DownstreamOfdmChannelSubcarrierQamModulationSupport);
|
||||||
|
Assert.NotNull(mcs.UpstreamOfdmaChannelSubcarrierQamModulationSupport);
|
||||||
|
Assert.Equal(108, mcs.DownstreamFrequencyRangeStarting);
|
||||||
|
Assert.Equal(1218, mcs.DownstreamFrequencyRangeUpTo);
|
||||||
|
Assert.Equal(42, mcs.UpstreamFrequencyRangeUpTo);
|
||||||
|
Assert.Equal(ModemCapabilitiesEncoding.DtpMode.MasterOrSlave, mcs.DocsisTimeProtocolMode.Value);
|
||||||
|
Assert.Equal(ModemCapabilitiesEncoding.DtpPerformanceSupport.Level5, mcs.DocsisTimeProtocolPerformanceSupport.Value);
|
||||||
|
Assert.Equal(5, mcs.Pmax);
|
||||||
|
Assert.True(mcs.DownstreamFullDuplex);
|
||||||
|
Assert.Equal(7, mcs.LowLatencySupport.Value);
|
||||||
|
|
||||||
|
buffer = new byte[]
|
||||||
|
{
|
||||||
|
2, 1, 1,
|
||||||
|
54, 1, 2,
|
||||||
|
55, 1, 2,
|
||||||
|
56, 1, 1,
|
||||||
|
};
|
||||||
|
mcs = new ModemCapabilitiesEncoding(buffer);
|
||||||
|
Assert.True(mcs._160kspsSymbolRateSupport);
|
||||||
|
Assert.True(mcs._320kspsSymbolRateSupport);
|
||||||
|
Assert.True(mcs._640kspsSymbolRateSupport);
|
||||||
|
Assert.True(mcs._1280kspsSymbolRateSupport);
|
||||||
|
Assert.True(mcs._2560kspsSymbolRateSupport);
|
||||||
|
Assert.True(mcs._5120kspsSymbolRateSupport);
|
||||||
|
|
||||||
|
|
||||||
|
buffer = new byte[]
|
||||||
|
{
|
||||||
|
2, 1, 2,
|
||||||
|
55, 1, 4,
|
||||||
|
56, 1, 2,
|
||||||
|
60, 1, 1,
|
||||||
|
};
|
||||||
|
mcs = new ModemCapabilitiesEncoding(buffer);
|
||||||
|
|
||||||
|
buffer = new byte[]
|
||||||
|
{
|
||||||
|
2, 1, 3,
|
||||||
|
56, 1, 3,
|
||||||
|
60, 1, 2,
|
||||||
|
61, 1, 1
|
||||||
|
};
|
||||||
|
mcs = new ModemCapabilitiesEncoding(buffer);
|
||||||
|
|
||||||
|
buffer = new byte[]
|
||||||
|
{
|
||||||
|
2, 1, 4,
|
||||||
|
56, 1, 4,
|
||||||
|
61, 1, 2
|
||||||
|
};
|
||||||
|
mcs = new ModemCapabilitiesEncoding(buffer);
|
||||||
|
Assert.Null(mcs.DpvPerPathSuppported);
|
||||||
|
Assert.Null(mcs.DpvPerPacketSuppported);
|
||||||
|
Assert.Null(mcs.EnergyManagement1x1Feature);
|
||||||
|
Assert.Null(mcs.DocsisLightSleepMode);
|
||||||
|
|
||||||
|
buffer = new byte[]
|
||||||
|
{
|
||||||
|
2, 1, 5,
|
||||||
|
61, 1, 4,
|
||||||
|
62, 1, 0
|
||||||
|
};
|
||||||
|
mcs = new ModemCapabilitiesEncoding(buffer);
|
||||||
|
|
||||||
|
buffer = new byte[]
|
||||||
|
{
|
||||||
|
2, 1, 6,
|
||||||
|
62, 1, 1
|
||||||
|
};
|
||||||
|
mcs = new ModemCapabilitiesEncoding(buffer);
|
||||||
|
|
||||||
|
buffer = new byte[]
|
||||||
|
{
|
||||||
|
62, 1, 2
|
||||||
|
};
|
||||||
|
mcs = new ModemCapabilitiesEncoding(buffer);
|
||||||
|
|
||||||
|
buffer = new byte[]
|
||||||
|
{
|
||||||
|
62, 1, 3
|
||||||
|
};
|
||||||
|
mcs = new ModemCapabilitiesEncoding(buffer);
|
||||||
|
|
||||||
|
buffer = new byte[]
|
||||||
|
{
|
||||||
|
62, 1, 4
|
||||||
|
};
|
||||||
|
mcs = new ModemCapabilitiesEncoding(buffer);
|
||||||
|
|
||||||
|
|
||||||
|
buffer = new byte[]
|
||||||
|
{
|
||||||
|
255, 1, 1
|
||||||
|
};
|
||||||
|
Assert.Throws<NotImplementedException>(() => new ModemCapabilitiesEncoding(buffer));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
[AllureSuite("Root")]
|
||||||
|
[AllureFeature("DOCSIS")]
|
||||||
|
public void GeneralServiceFlowEncodingTest()
|
||||||
|
{
|
||||||
|
byte[] buffer = new byte[]
|
||||||
|
{
|
||||||
|
1, 2, 0, 1,
|
||||||
|
2, 2, 0, 1,
|
||||||
|
6, 1, 255,
|
||||||
|
7, 1, 1,
|
||||||
|
8, 4, 0, 0, 0, 1,
|
||||||
|
9, 4, 0, 0, 0, 1,
|
||||||
|
10, 4, 0, 0, 0, 1,
|
||||||
|
11, 2, 0, 1,
|
||||||
|
12, 2, 0, 1,
|
||||||
|
14, 2, 0, 1,
|
||||||
|
15, 1, 7,
|
||||||
|
17, 1, 1,
|
||||||
|
19, 2, 0, 1,
|
||||||
|
20, 4, 0, 0, 0, 2,
|
||||||
|
21, 4, 0, 0, 0, 2,
|
||||||
|
22, 1, 2,
|
||||||
|
23, 1, 2,
|
||||||
|
24, 4, 0, 0, 0, 2,
|
||||||
|
26, 1, 2,
|
||||||
|
32, 4, 0, 0, 0, 3,
|
||||||
|
16, 4, 0, 0, 255, 255,
|
||||||
|
};
|
||||||
|
GeneralServiceFlowEncoding gsfe = new GeneralServiceFlowEncoding(buffer);
|
||||||
|
Assert.Equal((ushort)1, gsfe.ServiceFlowReference);
|
||||||
|
Assert.Equal((ushort)1, gsfe.ServiceFlowIdentifier);
|
||||||
|
Assert.True(gsfe.ProvisionedSet);
|
||||||
|
Assert.True(gsfe.AdmittedSet);
|
||||||
|
Assert.True(gsfe.ActiveSet);
|
||||||
|
Assert.Equal((byte)1, gsfe.TrafficPriority);
|
||||||
|
Assert.Equal((uint)1, gsfe.UpstreamMaximumSustainedTrafficRate);
|
||||||
|
Assert.Equal((uint)1, gsfe.MaximumTrafficBurst);
|
||||||
|
Assert.Equal((uint)1, gsfe.MinimumReservedTrafficRate);
|
||||||
|
Assert.Equal((ushort)1, gsfe.AssumedMinimumReservedRatePacketSize);
|
||||||
|
Assert.Equal((ushort)1, gsfe.TimeoutForActiveQosParameters);
|
||||||
|
Assert.Equal(1, gsfe.MaximumConcatenatedBurst);
|
||||||
|
Assert.Equal(GeneralServiceFlowEncoding.ServiceFlowSchedulingTypeEnum.ProactiveGrantService, gsfe.ServiceFlowSchedulingType);
|
||||||
|
Assert.Equal(1, gsfe.DownstreamResequencing.Value);
|
||||||
|
Assert.Equal(1, gsfe.UnsolicitedGrantSize.Value);
|
||||||
|
Assert.Equal((uint)2, gsfe.NominalGrantInterval.Value);
|
||||||
|
Assert.Equal((uint)2, gsfe.ToleratedGrantJitter.Value);
|
||||||
|
Assert.Equal(2, gsfe.GrantsPerInterval.Value);
|
||||||
|
Assert.NotNull(gsfe.IpTypeOfServiceOverwrite);
|
||||||
|
Assert.Equal((uint)2, gsfe.CmtsTimestamp.Value);
|
||||||
|
Assert.Equal(2, gsfe.MultiplierToNumberOfBytesRequested);
|
||||||
|
Assert.Equal((uint)3, gsfe.ServiceFlowForbiddenAttributeMask);
|
||||||
|
Assert.True(gsfe.DoNotUseContentionRegions);
|
||||||
|
Assert.True(gsfe.DoNotUseSegmentHeaders);
|
||||||
|
Assert.True(gsfe.DropPacketsTooBigForUnsolicitedGrant);
|
||||||
|
Assert.True(gsfe.DoNotSupressPayloadHeaders);
|
||||||
|
Assert.True(gsfe.DoNotFragmentData);
|
||||||
|
Assert.True(gsfe.DoNotConcatenateData);
|
||||||
|
Assert.True(gsfe.DoNotPiggybackRequests);
|
||||||
|
Assert.True(gsfe.DoNotUseRequest2ForData);
|
||||||
|
Assert.True(gsfe.DoNotUseRequest2ForRequests);
|
||||||
|
Assert.True(gsfe.DoNotUsePriorityRequest);
|
||||||
|
Assert.True(gsfe.DoNotUseAllCms);
|
||||||
|
AllureLog.Log(gsfe.ToString());
|
||||||
|
|
||||||
|
buffer = new byte[]
|
||||||
|
{
|
||||||
|
17, 4, 0, 0, 0, 1
|
||||||
|
};
|
||||||
|
gsfe = new GeneralServiceFlowEncoding(buffer);
|
||||||
|
Assert.Equal((uint)1, gsfe.NominalPollingInterval.Value);
|
||||||
|
|
||||||
|
buffer = new byte[]
|
||||||
|
{
|
||||||
|
254, 1, 1
|
||||||
|
};
|
||||||
|
Assert.Throws<NotImplementedException>(() => new GeneralServiceFlowEncoding(buffer));
|
||||||
|
}
|
||||||
|
}
|
||||||
16
skyscraper8.Tests/RootTests/Mpeg2Tests.cs
Normal file
16
skyscraper8.Tests/RootTests/Mpeg2Tests.cs
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
using Allure.Xunit.Attributes;
|
||||||
|
using skyscraper5.Mpeg2;
|
||||||
|
|
||||||
|
namespace skyscraper8.Tests.RootTests;
|
||||||
|
|
||||||
|
public class Mpeg2Tests
|
||||||
|
{
|
||||||
|
[Fact]
|
||||||
|
[AllureSuite("Root")]
|
||||||
|
[AllureFeature("MPEG2")]
|
||||||
|
void PsiSectionTest()
|
||||||
|
{
|
||||||
|
PsiSection section = new PsiSection();
|
||||||
|
section.Append(new byte[] { 3 });
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,242 +0,0 @@
|
|||||||
using skyscraper5.Docsis;
|
|
||||||
using skyscraper5.Docsis.AnnexC;
|
|
||||||
using skyscraper5.Mpeg2;
|
|
||||||
|
|
||||||
namespace skyscraper8.Tests;
|
|
||||||
|
|
||||||
public class UselessCodeCoverageTests
|
|
||||||
{
|
|
||||||
[Fact]
|
|
||||||
void PsiSectionTest()
|
|
||||||
{
|
|
||||||
PsiSection section = new PsiSection();
|
|
||||||
section.Append(new byte[] { 3 });
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
|
||||||
void MacManagementMessageTypeAttributeTest()
|
|
||||||
{
|
|
||||||
MacManagementMessageTypeAttribute mmmta = new MacManagementMessageTypeAttribute(1, 2);
|
|
||||||
Console.WriteLine(mmmta.ToString());
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
|
||||||
void RcpIdEncodingTest()
|
|
||||||
{
|
|
||||||
RcpIdEncoding rie = new RcpIdEncoding(new byte[] { 7, 1, 0 });
|
|
||||||
SimplifiedReceiveChannelAssignmentEncoding simplifiedReceiveChannelAssignmentEncoding = rie.SimplifiedReceiveChannelConfiguration;
|
|
||||||
Assert.NotNull(simplifiedReceiveChannelAssignmentEncoding);
|
|
||||||
Assert.Throws<NotImplementedException>(() => new RcpIdEncoding(new byte[] { 255, 1, 0 }));
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
|
||||||
void EthernetLlcPacketClassificationEncodingTest()
|
|
||||||
{
|
|
||||||
EthernetLlcPacketClassificationEncoding epce = new EthernetLlcPacketClassificationEncoding(new byte[] { 3, 3, 1, 0, 1 });
|
|
||||||
ushort epceEProt = epce.EProt;
|
|
||||||
Assert.Equal(1, epce.EProt);
|
|
||||||
Assert.Equal(1, epce.Type);
|
|
||||||
Assert.Throws<NotImplementedException>(() => new EthernetLlcPacketClassificationEncoding(new byte[] { 255, 1, 0 }));
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
|
||||||
void SimplifiedReceiveChannelAssignmentEncodingTest()
|
|
||||||
{
|
|
||||||
SimplifiedReceiveChannelAssignmentEncoding srcae =
|
|
||||||
new SimplifiedReceiveChannelAssignmentEncoding(new byte[] { 1, 1, 0, 2, 1, 0, 3, 1, 0 });
|
|
||||||
Assert.Equal(0,srcae.DownstreamChannelAssignment[0]);
|
|
||||||
Assert.Equal(0, srcae.DownstreamProfileAssignment[0]);
|
|
||||||
Assert.Equal(0, srcae.PrimaryDownstreamChannelAssignment[0]);
|
|
||||||
Assert.Throws<NotImplementedException>(() => new SimplifiedReceiveChannelAssignmentEncoding(new byte[] { 254,0,1 }));
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
|
||||||
void TransmitChannelConfigurationObjectTest()
|
|
||||||
{
|
|
||||||
CommonTlvEncodingObject.TransmitChannelConfigurationObject tcco =
|
|
||||||
new CommonTlvEncodingObject.TransmitChannelConfigurationObject(
|
|
||||||
new byte[]
|
|
||||||
{
|
|
||||||
1, 1, 0,
|
|
||||||
2, 1, 0,
|
|
||||||
3, 1, 0,
|
|
||||||
5, 4, 0, 0, 0, 0,
|
|
||||||
6, 2, 0, 0,
|
|
||||||
7, 1, 1,
|
|
||||||
9, 1, 0,
|
|
||||||
10, 1, 0,
|
|
||||||
11, 1, 0
|
|
||||||
});
|
|
||||||
Assert.Equal(0, tcco.TccReferenceId.Value);
|
|
||||||
Assert.Equal(CommonTlvEncodingObject.TransmitChannelConfigurationObject.UpstreamChannelActionEnum.NoAction, tcco.UpstreamChannelAction.Value);
|
|
||||||
Assert.Equal(0, tcco.UpstreamChannelId.Value);
|
|
||||||
Assert.NotNull(tcco.UpstreamChannelDescriptor);
|
|
||||||
Assert.Equal(0, tcco.RangingSid.Value);
|
|
||||||
Assert.Equal(InitalizationTechniqueEnum.BroadcastInitialRanging, tcco.InitializationTechnique.Value);
|
|
||||||
Assert.Equal(0, tcco.DynamicRangeWindow);
|
|
||||||
Assert.Equal(0, tcco.P16Hi);
|
|
||||||
Assert.Equal(0, tcco.ListOfIucs[0]);
|
|
||||||
|
|
||||||
Assert.Throws<NotImplementedException>(() =>
|
|
||||||
new CommonTlvEncodingObject.TransmitChannelConfigurationObject(new byte[] { 254, 1, 0 }));
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
|
||||||
void CommonTlvEncodingObjectTest()
|
|
||||||
{
|
|
||||||
MemoryStream ms = new MemoryStream(new byte[]
|
|
||||||
{
|
|
||||||
5, 1, 0,
|
|
||||||
47, 1, 0,
|
|
||||||
49, 1, 0,
|
|
||||||
31, 1, 0,
|
|
||||||
27, 1, 0,
|
|
||||||
30, 1, 0,
|
|
||||||
52, 2, 0, 1
|
|
||||||
});
|
|
||||||
CommonTlvEncodingObject commonTlv = new CommonTlvEncodingObject(ms);
|
|
||||||
Assert.NotNull(commonTlv.ModemCapabilitiesEncoding);
|
|
||||||
Assert.NotNull(commonTlv.ServiceFlowSidClusterAssignment);
|
|
||||||
Assert.NotNull(commonTlv.RcpId);
|
|
||||||
Assert.Equal(0, commonTlv.KeySequenceNumber);
|
|
||||||
Assert.Equal(0, commonTlv.HmacDigest[0]);
|
|
||||||
Assert.NotNull(commonTlv.AuthorizationHint);
|
|
||||||
Assert.Equal(new TimeSpan(0, 0, 1), commonTlv.InitializingChannelTimeout);
|
|
||||||
|
|
||||||
ms = new MemoryStream(new byte[] { 254, 1, 0 });
|
|
||||||
Assert.Throws<NotImplementedException>(() => new CommonTlvEncodingObject(ms));
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
|
||||||
void GeneralPacketClassifierEncodingTest()
|
|
||||||
{
|
|
||||||
GeneralPacketClassifierEncoding gpce = new GeneralPacketClassifierEncoding(new byte[]
|
|
||||||
{
|
|
||||||
6, 1, 1,
|
|
||||||
5, 1, 0,
|
|
||||||
9, 1, 0,
|
|
||||||
3, 2, 0, 1,
|
|
||||||
1, 1, 0,
|
|
||||||
2, 2, 0, 1,
|
|
||||||
4, 4, 0, 0, 0, 1,
|
|
||||||
7, 1, 0,
|
|
||||||
10, 1, 0,
|
|
||||||
12, 16,
|
|
||||||
//IPv6 Packet Classification Encoding
|
|
||||||
3, 2, 0, 1,
|
|
||||||
4, 4, 127, 0, 0, 1,
|
|
||||||
6, 4, 127, 0, 0, 1
|
|
||||||
});
|
|
||||||
Assert.True(gpce.ClassifierActivationState.Value);
|
|
||||||
Assert.Equal(0, gpce.RulePriority.Value);
|
|
||||||
Assert.NotNull(gpce.Ipv4PacketClassification);
|
|
||||||
Assert.Equal(1, gpce.ServiceFlowReference.Value);
|
|
||||||
Assert.Equal(0, gpce.ClassifierReference.Value);
|
|
||||||
Assert.Equal(1, gpce.ClassifierIdentifier.Value);
|
|
||||||
Assert.Equal((uint)1, gpce.ServiceFlowIdentifier.Value);
|
|
||||||
Assert.Equal(GeneralPacketClassifierEncoding.DynamicServiceChangeActionEnum.Add, gpce.DynamicServiceChangeAction.Value);
|
|
||||||
Assert.NotNull(gpce.EthernetLlcPacketClassificationEncodings);
|
|
||||||
|
|
||||||
Assert.Throws<NotImplementedException>(() => new GeneralPacketClassifierEncoding(new byte[]
|
|
||||||
{
|
|
||||||
12, 4,
|
|
||||||
255, 1, 0, 0
|
|
||||||
}));
|
|
||||||
|
|
||||||
Assert.Throws<NotImplementedException>(() => new GeneralPacketClassifierEncoding(new byte[]
|
|
||||||
{
|
|
||||||
254, 1, 0
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
|
||||||
public void Ipv4PacketClassificationEncodingTest()
|
|
||||||
{
|
|
||||||
GeneralPacketClassifierEncoding.Ipv4PacketClassificationEncodings ipce =
|
|
||||||
new GeneralPacketClassifierEncoding.Ipv4PacketClassificationEncodings(new byte[]
|
|
||||||
{
|
|
||||||
3, 4, 127, 0, 0, 1,
|
|
||||||
5, 4, 127, 0, 0, 1,
|
|
||||||
2, 2, 0, 1,
|
|
||||||
4, 4, 255, 255, 255, 0,
|
|
||||||
6, 4, 255, 255, 255, 0,
|
|
||||||
9, 2, 0, 1,
|
|
||||||
10, 2, 0, 1,
|
|
||||||
7, 2, 0, 1,
|
|
||||||
8, 2, 0, 1
|
|
||||||
});
|
|
||||||
Assert.NotNull(ipce.Ipv4SourceAddress);
|
|
||||||
Assert.NotNull(ipce.Ipv4DestinationAddress);
|
|
||||||
Assert.Equal(1, ipce.IpProtocol.Value);
|
|
||||||
Assert.NotNull(ipce.Ipv4SourceMask);
|
|
||||||
Assert.NotNull(ipce.Ipv4DestinationMask);
|
|
||||||
Assert.Equal(1, ipce.DestinationPortStart.Value);
|
|
||||||
Assert.Equal(1, ipce.DestinationPortEnd.Value);
|
|
||||||
Assert.Equal(1, ipce.SourcePortStart.Value);
|
|
||||||
Assert.Equal(1, ipce.SourcePortEnd.Value);
|
|
||||||
|
|
||||||
Assert.Throws<NotImplementedException>(() =>
|
|
||||||
new GeneralPacketClassifierEncoding.Ipv4PacketClassificationEncodings(new byte[]
|
|
||||||
{
|
|
||||||
255, 1, 0
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
|
||||||
public void ServiceFlowSidClusterAssignmentObjectTest()
|
|
||||||
{
|
|
||||||
ServiceFlowSidClusterAssignmentObject sfscao = new ServiceFlowSidClusterAssignmentObject(new byte[]
|
|
||||||
{
|
|
||||||
1, 4, 0, 0, 0, 1,
|
|
||||||
2, 1, 0,
|
|
||||||
3, 1, 0,
|
|
||||||
});
|
|
||||||
Assert.Equal(1u, sfscao.SFID.Value);
|
|
||||||
Assert.NotNull(sfscao.SidClusterEncoding);
|
|
||||||
Assert.NotNull(sfscao.SidClusterSwitchoverCriteria);
|
|
||||||
|
|
||||||
Assert.Throws<NotImplementedException>(() => new ServiceFlowSidClusterAssignmentObject(new byte[]
|
|
||||||
{
|
|
||||||
255, 1, 0
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
|
||||||
public void SidClusterEncodingObjectTest()
|
|
||||||
{
|
|
||||||
ServiceFlowSidClusterAssignmentObject.SidClusterEncodingObject sceo =
|
|
||||||
new ServiceFlowSidClusterAssignmentObject.SidClusterEncodingObject(new byte[]
|
|
||||||
{
|
|
||||||
1, 1, 1,
|
|
||||||
2, 1, 0
|
|
||||||
});
|
|
||||||
Assert.Equal(1, sceo.SidClusterId.Value);
|
|
||||||
Assert.NotNull(sceo.SidToChannelMapping);
|
|
||||||
|
|
||||||
Assert.Throws<NotImplementedException>(() => new ServiceFlowSidClusterAssignmentObject.SidClusterEncodingObject(new byte[]
|
|
||||||
{
|
|
||||||
255, 1, 0
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
|
||||||
public void SidToChannelMappingObjectTest()
|
|
||||||
{
|
|
||||||
ServiceFlowSidClusterAssignmentObject.SidClusterEncodingObject.SidToChannelMappingObject stcmo =
|
|
||||||
new ServiceFlowSidClusterAssignmentObject.SidClusterEncodingObject.SidToChannelMappingObject(new byte[]
|
|
||||||
{
|
|
||||||
1,1,1,
|
|
||||||
2,2,0,1,
|
|
||||||
3,1,1
|
|
||||||
});
|
|
||||||
Assert.Equal(1, stcmo.UpstreamChannelId.Value);
|
|
||||||
Assert.Equal(1, stcmo.SID.Value);
|
|
||||||
Assert.Equal(ServiceFlowSidClusterAssignmentObject.SidClusterEncodingObject.SidToChannelMappingObject.ActionEnum.Add,stcmo.Action.Value);
|
|
||||||
|
|
||||||
Assert.Throws<NotImplementedException>(() =>
|
|
||||||
new ServiceFlowSidClusterAssignmentObject.SidClusterEncodingObject.SidToChannelMappingObject(new byte[]
|
|
||||||
{
|
|
||||||
255, 1, 0
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -10,6 +10,8 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Allure.Commons" Version="3.5.0.73" />
|
||||||
|
<PackageReference Include="Allure.Xunit" Version="2.14.1" />
|
||||||
<PackageReference Include="coverlet.collector" Version="6.0.4">
|
<PackageReference Include="coverlet.collector" Version="6.0.4">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
@ -46,4 +48,17 @@
|
|||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Update="xunit.runner.json">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Update="allureConfig.json">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||||
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AAllureFeatureAttribute_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F405349a6f42433abaa8b1d6d06bb6f21c66899533fa9f9648cb1cde8755143_003FAllureFeatureAttribute_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AArray_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F6e_003Fd247db11_003FArray_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AArray_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F6e_003Fd247db11_003FArray_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AAssert_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fa840692e98b74557bc005b38213a22c72dad0_003Fc8_003F58c2e0c9_003FAssert_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AAssert_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fa840692e98b74557bc005b38213a22c72dad0_003Fc8_003F58c2e0c9_003FAssert_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADictionary_00602_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F83_003Fc73c45bc_003FDictionary_00602_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADictionary_00602_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F83_003Fc73c45bc_003FDictionary_00602_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
@ -7,15 +8,20 @@
|
|||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AList_00601_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F6b_003Fa410ee2c_003FList_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AList_00601_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F6b_003Fa410ee2c_003FList_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AMemoryStream_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F0d_003F068af3a6_003FMemoryStream_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AMemoryStream_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F0d_003F068af3a6_003FMemoryStream_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ANullable_00601_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F0d_003F6549c49b_003FNullable_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ANullable_00601_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F0d_003F6549c49b_003FNullable_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ANullAsserts_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F3f4719f7ce375226774d6991a6afc2f6932e58b42fd58ff13c7c03771642e_003FNullAsserts_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AObject_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F55_003F6efc7017_003FObject_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AObject_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F55_003F6efc7017_003FObject_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AQueue_00601_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003Fb6_003F498e7c75_003FQueue_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AQueue_00601_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003Fb6_003F498e7c75_003FQueue_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASkip_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003Fd8c543d93f1559af2ea2be8e9d55839b5bb1a3605f22daa45ea63772e3b4bc_003FSkip_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASkip_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003Fd8c543d93f1559af2ea2be8e9d55839b5bb1a3605f22daa45ea63772e3b4bc_003FSkip_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AThrowHelper_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003Feb_003F3c476997_003FThrowHelper_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AThrowHelper_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003Feb_003F3c476997_003FThrowHelper_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AThrowHelper_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fe1ab690537c44e02a014076312b886b7b2e200_003F4f_003F7bfc5050_003FThrowHelper_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AThrowHelper_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fe1ab690537c44e02a014076312b886b7b2e200_003F4f_003F7bfc5050_003FThrowHelper_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AThrowHelper_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Ffb63d7b4f026464dbf9b2db60c7f76bc2ac00_003Fbd_003F4080deac_003FThrowHelper_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ATuple_00602_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F9f_003F0d16f921_003FTuple_00602_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ATuple_00602_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F9f_003F0d16f921_003FTuple_00602_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
|
<s:String x:Key="/Default/Environment/AssemblyExplorer/XmlDocument/@EntryValue"><AssemblyExplorer>
|
||||||
|
<Assembly Path="/home/schiemas/.dotnet/packs/Microsoft.NETCore.App.Ref/8.0.21/ref/net8.0/System.Windows.dll" />
|
||||||
|
</AssemblyExplorer></s:String>
|
||||||
<s:String x:Key="/Default/Environment/Highlighting/HighlightingSourceSnapshotLocation/@EntryValue">/home/schiemas/.cache/JetBrains/Rider2025.1/resharper-host/temp/Rider/vAny/CoverageData/_skyscraper8.1808907683/Snapshot/snapshot.utdcvr</s:String>
|
<s:String x:Key="/Default/Environment/Highlighting/HighlightingSourceSnapshotLocation/@EntryValue">/home/schiemas/.cache/JetBrains/Rider2025.1/resharper-host/temp/Rider/vAny/CoverageData/_skyscraper8.1808907683/Snapshot/snapshot.utdcvr</s:String>
|
||||||
<s:String x:Key="/Default/Environment/UnitTesting/UnitTestSessionStore/Sessions/=94eea68c_002Dcaa0_002D4657_002Da521_002D7b96c8ead0ec/@EntryIndexedValue"><SessionState ContinuousTestingMode="0" IsActive="True" Name="All tests from &lt;skyscraper8.Tests&gt;" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session">
|
<s:String x:Key="/Default/Environment/UnitTesting/UnitTestSessionStore/Sessions/=94eea68c_002Dcaa0_002D4657_002Da521_002D7b96c8ead0ec/@EntryIndexedValue"><SessionState ContinuousTestingMode="0" IsActive="True" Name="All tests from &lt;skyscraper8.Tests&gt;" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session">
|
||||||
<Project Location="\home\schiemas\RiderProjects\skyscraper8\skyscraper8.Tests" Presentation="&lt;skyscraper8.Tests&gt;" />
|
<Project Location="/home/schiemas/RiderProjects/skyscraper8/skyscraper8.Tests" Presentation="&lt;skyscraper8.Tests&gt;" />
|
||||||
</SessionState></s:String>
|
</SessionState></s:String>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -149,6 +149,6 @@ namespace skyscraper5.Docsis.AnnexC
|
|||||||
|
|
||||||
public uint? ServiceFlowIdentifier { get; set; }
|
public uint? ServiceFlowIdentifier { get; set; }
|
||||||
public EthernetLlcPacketClassificationEncoding EthernetLlcPacketClassificationEncodings { get; }
|
public EthernetLlcPacketClassificationEncoding EthernetLlcPacketClassificationEncodings { get; }
|
||||||
internal Ipv6PacketClassificationEncoding Ipv6PacketClassification { get; }
|
public Ipv6PacketClassificationEncoding Ipv6PacketClassification { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,7 @@ using System.Net;
|
|||||||
|
|
||||||
namespace skyscraper5.Docsis.AnnexC
|
namespace skyscraper5.Docsis.AnnexC
|
||||||
{
|
{
|
||||||
internal class Ipv6PacketClassificationEncoding
|
public class Ipv6PacketClassificationEncoding
|
||||||
{
|
{
|
||||||
public Ipv6PacketClassificationEncoding(byte[] buffer)
|
public Ipv6PacketClassificationEncoding(byte[] buffer)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -12,7 +12,7 @@ namespace skyscraper5.Docsis.AnnexC
|
|||||||
{
|
{
|
||||||
private readonly bool? ExpandedUnicastSidSpace;
|
private readonly bool? ExpandedUnicastSidSpace;
|
||||||
private readonly byte? DpvCapability;
|
private readonly byte? DpvCapability;
|
||||||
private readonly byte EnergyManagementPreference;
|
private readonly byte? EnergyManagementPreference;
|
||||||
private byte? UpstreamScQamSymbolRateSupport;
|
private byte? UpstreamScQamSymbolRateSupport;
|
||||||
private byte? _512MspsUpstreamTransmitScQamChannelSupport;
|
private byte? _512MspsUpstreamTransmitScQamChannelSupport;
|
||||||
private byte? _256MspsUpstreamTransmitScQamChannelSupport;
|
private byte? _256MspsUpstreamTransmitScQamChannelSupport;
|
||||||
@ -207,7 +207,7 @@ namespace skyscraper5.Docsis.AnnexC
|
|||||||
DownstreamFrequencyRangeStarting = 108;
|
DownstreamFrequencyRangeStarting = 108;
|
||||||
else if (v[0] == 0x02)
|
else if (v[0] == 0x02)
|
||||||
DownstreamFrequencyRangeStarting = 258;
|
DownstreamFrequencyRangeStarting = 258;
|
||||||
else if (v[0] == 0x003)
|
else if (v[0] == 0x03)
|
||||||
DownstreamFullDuplex = true;
|
DownstreamFullDuplex = true;
|
||||||
break;
|
break;
|
||||||
case 61:
|
case 61:
|
||||||
@ -235,7 +235,7 @@ namespace skyscraper5.Docsis.AnnexC
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
//CM-SP-MULPIv4.0-I01-190815.pdf, page 688
|
//CM-SP-MULPIv4.0-I01-190815.pdf, page 688
|
||||||
throw new NotFiniteNumberException(String.Format("{0} {1}", nameof(ModemCapabilitiesEncoding), type));
|
throw new NotImplementedException(String.Format("{0} {1}", nameof(ModemCapabilitiesEncoding), type));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Valid = true;
|
Valid = true;
|
||||||
@ -268,7 +268,7 @@ namespace skyscraper5.Docsis.AnnexC
|
|||||||
public byte? TransmitPreEqualizerTapsPerModulationInterval { get; }
|
public byte? TransmitPreEqualizerTapsPerModulationInterval { get; }
|
||||||
public byte? NumberOfTransmitEqualizerTaps { get; }
|
public byte? NumberOfTransmitEqualizerTaps { get; }
|
||||||
public bool? DccSupport { get; }
|
public bool? DccSupport { get; }
|
||||||
internal RangingHoldOffSupport RangingHoldOffSupport { get; }
|
public RangingHoldOffSupport RangingHoldOffSupport { get; }
|
||||||
public bool? L2VPN { get; }
|
public bool? L2VPN { get; }
|
||||||
public ESafeHostCapability ESafeHostCapability { get; }
|
public ESafeHostCapability ESafeHostCapability { get; }
|
||||||
public bool? DownstreamUnencryptedTrafficFiltering { get; }
|
public bool? DownstreamUnencryptedTrafficFiltering { get; }
|
||||||
|
|||||||
@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace skyscraper8.Docsis.AnnexC
|
namespace skyscraper8.Docsis.AnnexC
|
||||||
{
|
{
|
||||||
internal class RangingHoldOffSupport
|
public class RangingHoldOffSupport
|
||||||
{
|
{
|
||||||
public RangingHoldOffSupport(byte a, byte b, byte c, byte d)
|
public RangingHoldOffSupport(byte a, byte b, byte c, byte d)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3072,6 +3072,10 @@ namespace skyscraper5.Skyscraper.Scraper
|
|||||||
//Link Layer Discovery Protocol
|
//Link Layer Discovery Protocol
|
||||||
LldpFrame lldpFrame = new LldpFrame(contents);
|
LldpFrame lldpFrame = new LldpFrame(contents);
|
||||||
OnLldpFrame(lldpFrame);
|
OnLldpFrame(lldpFrame);
|
||||||
|
return;
|
||||||
|
case 0x9417:
|
||||||
|
case 0xf95c:
|
||||||
|
//Unknown proprietary.
|
||||||
return;
|
return;
|
||||||
default:
|
default:
|
||||||
throw new NotImplementedException(String.Format("EtherType: 0x{0:X4}", etherType));
|
throw new NotImplementedException(String.Format("EtherType: 0x{0:X4}", etherType));
|
||||||
@ -3155,6 +3159,12 @@ namespace skyscraper5.Skyscraper.Scraper
|
|||||||
throw new NotImplementedException("LLC/SNAP (2)");
|
throw new NotImplementedException("LLC/SNAP (2)");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (dsap == 0x09 && ssap == 0x01)
|
||||||
|
{
|
||||||
|
//Likely an LLC management packet (TEST or XID)
|
||||||
|
return;
|
||||||
|
}
|
||||||
throw new NotImplementedException("LLC/SNAP");
|
throw new NotImplementedException("LLC/SNAP");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user