Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ jobs:
- uses: actions/checkout@v4

- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
8.0.x
9.0.x
dotnet-version: '10.0.x'

- name: Install .NET dependencies
run: dotnet restore
Expand All @@ -28,7 +26,7 @@ jobs:
run: dotnet build PacketDotNet/PacketDotNet.csproj -c Release -f "net9.0"

- name: Test
run: dotnet test -c Release -f "net9.0"
run: dotnet test -c Release -f "net10.0"

windows:
runs-on: windows-latest
Expand All @@ -37,11 +35,9 @@ jobs:
- uses: actions/checkout@v4

- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
8.0.x
9.0.x
dotnet-version: '10.0.x'

- uses: dorny/paths-filter@v3
id: changes
Expand Down
14 changes: 5 additions & 9 deletions .github/workflows/pull requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ jobs:
- uses: actions/checkout@v4

- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
8.0.x
9.0.x
dotnet-version: '10.0.x'

- name: Install .NET dependencies
run: dotnet restore
Expand All @@ -28,7 +26,7 @@ jobs:
run: dotnet build PacketDotNet/PacketDotNet.csproj -c Release -f "net9.0"

- name: Test
run: dotnet test -c Release -f "net9.0"
run: dotnet test -c Release -f "net10.0"

windows:
runs-on: windows-latest
Expand All @@ -37,11 +35,9 @@ jobs:
- uses: actions/checkout@v4

- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
8.0.x
9.0.x
dotnet-version: '10.0.x'

- uses: dorny/paths-filter@v3
id: changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Examples/ConstructingPackets/ConstructingPackets.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
12 changes: 6 additions & 6 deletions PacketDotNet/IPv6ExtensionHeader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ public int FragmentOffset
set
{
// read the original value
var field = (ushort) FragmentOffsetReservedMore;
var @field = (ushort) FragmentOffsetReservedMore;

// mask in the new field
field = (ushort) ((field & 0x7) | ((ushort) value << 3) & 0xFFF8);
@field = (ushort) ((@field & 0x7) | ((ushort) value << 3) & 0xFFF8);

// write the updated value back
FragmentOffsetReservedMore = (short) field;
FragmentOffsetReservedMore = (short) @field;
}
}

Expand All @@ -50,13 +50,13 @@ public bool More
set
{
// read the original value
var field = (ushort) FragmentOffsetReservedMore;
var @field = (ushort) FragmentOffsetReservedMore;

// mask in the new field
field = (ushort) ((field & 0xFFFE) | (value ? 1 : 0) & 0x1);
@field = (ushort) ((@field & 0xFFFE) | (value ? 1 : 0) & 0x1);

// write the updated value back
FragmentOffsetReservedMore = (short) field;
FragmentOffsetReservedMore = (short) @field;
}
}

Expand Down
18 changes: 9 additions & 9 deletions PacketDotNet/IPv6Packet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,13 @@ public int FlowLabel
set
{
// read the original value
var field = (uint) VersionTrafficClassFlowLabel;
var @field = (uint) VersionTrafficClassFlowLabel;

// make the value in
field = (field & 0xFFF00000) | ((uint) value & 0x000FFFFF);
@field = (@field & 0xFFF00000) | ((uint) value & 0x000FFFFF);

// write the updated value back
VersionTrafficClassFlowLabel = (int) field;
VersionTrafficClassFlowLabel = (int) @field;
}
}

Expand Down Expand Up @@ -305,13 +305,13 @@ public int TrafficClass
set
{
// read the original value
var field = (uint) VersionTrafficClassFlowLabel;
var @field = (uint) VersionTrafficClassFlowLabel;

// mask in the new field
field = (field & 0xF00FFFFF) | ((uint) value << 20) & 0x0FF00000;
@field = (@field & 0xF00FFFFF) | ((uint) value << 20) & 0x0FF00000;

// write the updated value back
VersionTrafficClassFlowLabel = (int) field;
VersionTrafficClassFlowLabel = (int) @field;
}
}

Expand All @@ -326,13 +326,13 @@ public override IPVersion Version
var v = (int) value;

// read the existing value
var field = (uint) VersionTrafficClassFlowLabel;
var @field = (uint) VersionTrafficClassFlowLabel;

// mask the new field into place
field = (uint) ((field & 0x0FFFFFFF) | ((v << 28) & 0xF0000000));
@field = (uint) ((@field & 0x0FFFFFFF) | ((v << 28) & 0xF0000000));

// write the updated value back
VersionTrafficClassFlowLabel = (int) field;
VersionTrafficClassFlowLabel = (int) @field;
}
}

Expand Down
6 changes: 3 additions & 3 deletions PacketDotNet/Ieee80211/PpiPacket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ public ushort Length
{
var length = PpiHeaderFields.PpiPacketHeaderLength;

foreach (var field in PpiFields)
foreach (var @field in PpiFields)
{
length += PpiHeaderFields.FieldHeaderLength + field.Length;
length += PpiHeaderFields.FieldHeaderLength + @field.Length;
if ((Flags & HeaderFlags.Alignment32Bit) == HeaderFlags.Alignment32Bit)
{
length += GetDistanceTo32BitAlignment(field.Length);
length += GetDistanceTo32BitAlignment(@field.Length);
}
}

Expand Down
12 changes: 6 additions & 6 deletions PacketDotNet/IgmpV3MembershipQueryPacket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,13 @@ public byte QueriersRobustnessVariable
set
{
// read the original value
byte field = ReservedSFlagAndQRV;
byte @field = ReservedSFlagAndQRV;

// mask in the new field
field = (byte) ((field & 0xF8) | value & 0x07);
@field = (byte) ((@field & 0xF8) | value & 0x07);

// write the updated value back
ReservedSFlagAndQRV = field;
ReservedSFlagAndQRV = @field;
}
}

Expand Down Expand Up @@ -169,13 +169,13 @@ public bool SuppressRouterSideProcessingFlag
set
{
// read the original value
byte field = ReservedSFlagAndQRV;
byte @field = ReservedSFlagAndQRV;

// mask in the new field
field = (byte) ((field & 0xF7) | (value ? 1 : 0) & 0x08);
@field = (byte) ((@field & 0xF7) | (value ? 1 : 0) & 0x08);

// write the updated value back
ReservedSFlagAndQRV = field;
ReservedSFlagAndQRV = @field;
}
}

Expand Down
2 changes: 1 addition & 1 deletion PacketDotNet/PacketDotNet.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net9.0;net472</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0;net10.0;net472</TargetFrameworks>
<Authors>Chris Morgan (chmorgan@gmail.com)</Authors>
<LangVersion>latest</LangVersion>
<SignAssembly>true</SignAssembly>
Expand Down
2 changes: 1 addition & 1 deletion Test/Test.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand Down