Commit 919c9236 authored by Brickner_cp's avatar Brickner_cp

GRE

parent b98d48b9
This diff is collapsed.
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
using System.Collections; using System.Collections;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using PcapDotNet.Packets.Gre;
using PcapDotNet.Packets.Icmp; using PcapDotNet.Packets.Icmp;
using PcapDotNet.Packets.Igmp; using PcapDotNet.Packets.Igmp;
using PcapDotNet.Packets.Transport; using PcapDotNet.Packets.Transport;
...@@ -276,6 +277,17 @@ namespace PcapDotNet.Packets.IpV4 ...@@ -276,6 +277,17 @@ namespace PcapDotNet.Packets.IpV4
} }
} }
public GreDatagram Gre
{
get
{
if (_gre == null && Length >= HeaderLength)
_gre = new GreDatagram(Buffer, StartOffset + HeaderLength, Length - HeaderLength);
return _gre;
}
}
/// <summary> /// <summary>
/// The payload of the datagram as a UDP datagram. /// The payload of the datagram as a UDP datagram.
/// </summary> /// </summary>
...@@ -416,6 +428,7 @@ namespace PcapDotNet.Packets.IpV4 ...@@ -416,6 +428,7 @@ namespace PcapDotNet.Packets.IpV4
private IpV4Options _options; private IpV4Options _options;
private IcmpDatagram _icmp; private IcmpDatagram _icmp;
private IgmpDatagram _igmp; private IgmpDatagram _igmp;
private GreDatagram _gre;
private TcpDatagram _tcp; private TcpDatagram _tcp;
private UdpDatagram _udp; private UdpDatagram _udp;
} }
......
...@@ -73,6 +73,7 @@ ...@@ -73,6 +73,7 @@
<Compile Include="Ethernet\EthernetType.cs" /> <Compile Include="Ethernet\EthernetType.cs" />
<Compile Include="Ethernet\MacAddress.cs" /> <Compile Include="Ethernet\MacAddress.cs" />
<Compile Include="Arp\IArpPreviousLayer.cs" /> <Compile Include="Arp\IArpPreviousLayer.cs" />
<Compile Include="Gre\GreDatagram.cs" />
<Compile Include="Icmp\IcmpAddressMaskReplyDatagram.cs" /> <Compile Include="Icmp\IcmpAddressMaskReplyDatagram.cs" />
<Compile Include="Icmp\IcmpAddressMaskReplyLayer.cs" /> <Compile Include="Icmp\IcmpAddressMaskReplyLayer.cs" />
<Compile Include="Icmp\IcmpAddressMaskRequestLayer.cs" /> <Compile Include="Icmp\IcmpAddressMaskRequestLayer.cs" />
......
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