How to use the PacketBuilder

64 views
Skip to first unread message

victo...@elev.ga.lbs.se

unread,
Oct 24, 2019, 9:12:27 AM10/24/19
to Pcap.Net Q&A
Hey!

I'm kinda new to programming, so I'm not really familiar with everything yet.

The PacketBuilder constructor requires an array or IEnumerable of ILayer

How do I get this array? My goal is to send custom packets

victo...@elev.ga.lbs.se

unread,
Oct 26, 2019, 2:37:05 AM10/26/19
to Pcap.Net Q&A
So I don't know how to use the PacketBuilder, but I did figure out how to send custom packets. 

I first created a byte array with my data in it. 
Then used the PcapDotNet.Packets.Packet constructor to create a packet. 
new Packet(PacketData, DateTime.Now, DataLinkKind.Ethernet);

Then I with the help from the GitHub wiki, send the packet from my selected device. 
Reply all
Reply to author
Forward
0 new messages