Commit a64c0c7f authored by Brickner_cp's avatar Brickner_cp

--no commit message

--no commit message
parent 2da3e5e9
......@@ -11,7 +11,7 @@ namespace Packets
/// </summary>
public class EthernetDatagram : Datagram
{
private class Offset
private static class Offset
{
public const int Destination = 0;
public const int Source = 6;
......
......@@ -4,11 +4,11 @@ namespace Packets
{
public static class PacketBuilder
{
public static Packet Ethernet(DateTime timestamp, MacAddress ethernetSource, MacAddress ethernetDestination, EthernetType ethernetType, Datagram etherentPayload)
public static Packet Ethernet(DateTime timestamp, MacAddress ethernetSource, MacAddress ethernetDestination, EthernetType ethernetType, Datagram ethernetPayload)
{
byte[] buffer = new byte[EthernetDatagram.HeaderLength + etherentPayload.Length];
byte[] buffer = new byte[EthernetDatagram.HeaderLength + ethernetPayload.Length];
EthernetDatagram.WriteHeader(buffer, 0, ethernetSource, ethernetDestination, ethernetType);
etherentPayload.Write(buffer, EthernetDatagram.HeaderLength);
ethernetPayload.Write(buffer, EthernetDatagram.HeaderLength);
return new Packet(buffer, timestamp, new DataLink(DataLinkKind.Ethernet));
}
}
......
......@@ -37,6 +37,8 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<RunCodeAnalysis>false</RunCodeAnalysis>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment