I need the data of a ehternet-telegram

Sep 30, 2014 at 10:51 AM

i study electrical engineer in Germany (sorry for my english).
I am at the end of my study and i want to use the Pcap.Net library for my project.

I already use the "User guide", but i do not unterstand how to see the data in the telegram.
Could anyone help me please?
Oct 3, 2014 at 6:10 AM
Hi Krutoj,

I'm not sure what do you menan by "telegram".
If you want to see the Ethernet payload you can do:
Datagram payload = packet.Ethernet.Payload;
I hope this helps,

Oct 4, 2014 at 1:17 PM

thanks for your answer.

I’m sorry in German it is “Ethernet-Telegramm” in English “Ethernet-datagram”.
Your example “Datagram payload = packet.Ethernet.Payload;”, I already use.
In the debug-mode I see in “payload.base.Buffer” the whole datagram. How can I get this Buffer in a byte-array or in a String?

Oct 4, 2014 at 3:43 PM
Quoting the Pcap.Net User Guide FAQ:
Question 3: How can I convert a DataSegment (or a Datagram) to byte[]?
Answer: Just use ToMemoryStream() or Write() methods.