GRE protocol support

Nov 30, 2009 at 2:00 AM

Is there any way interprete GRE datagram and its payload.

If not are there any palns to implement it?

 

Thanks,

Coordinator
Nov 30, 2009 at 7:08 AM

Hi,

I assume you mean GRE over IPv4. Be more specific and let me know what RFC describes the protocol (RFC 1702 or RFC 2784).

Currently, you can interpret the GRE datagram by the taking the IPv4 datagram's payload and parse it yourself.

Until you've mentioned it, there was no plan to add support for this protocol. I see no reason not to support this protocol so please add it as an issue in the Issue Tracker (with as many details you can like RFCs and the different layers combination support you want) and it would probably be supported in a future version.

 

Boaz.

Nov 30, 2009 at 10:03 AM

Thank you for the quick response.

>I assume you mean GRE over IPv4.

Yes.

>Be more specific and let me know what RFC describes the protocol (RFC 1702 or RFC 2784).

RFC 2784

>Currently, you can interpret the GRE datagram by the taking the IPv4 datagram's payload and parse it yourself.

Yes, and it is exactly what I am trying to do. But problem is that I can reasonably easy parse GRE header but the GRE payload (encapsulated IPv4 datagram) needs to be parsed too. It is very tempting to use IpV4Datagram class but it does not allow instantiation from the buffer. Thus I have either to implement  custom IpV4Datagramor use non-public constructor "internal IpV4Datagram(byte[], int, int)". Both options are doable but not particularly elegant. Is there any way to instantiate IpV4Datagram fm the buffer and offset?  

>Until you've mentioned it, there was no plan to add support for this protocol. I see no reason not to support this protocol so please add it as an issue in the Issue Tracker (with as many details you can like RFCs and the different layers combination support you want) and it would probably be supported in a future version.

I definitely will.

Thank you.

 

Coordinator
Nov 30, 2009 at 6:01 PM

It's true, currently it is not possible to instantiate the IPv4 datagram from buffer and offset when using code outside of the Pcap.Net.

You can, of course, change the code to make it public. It should work.

The reason it is not possible is to prevent creating these datagrams without the use of the cache provided in the Pcap.Net framework.

The most elegant way is to add the GRE support. If you'd like, you can do it yourself and suggest it as a patch.

 

Boaz.

Coordinator
Mar 12, 2010 at 7:57 AM

Work Item opened:

http://pcapdotnet.codeplex.com/WorkItem/View.aspx?WorkItemId=6180

 

You can vote for it if you want it done.