Questions tagged [pcap.net]

Pcap.Net is a .NET wrapper for WinPcap written in C++/CLI and C#. It Features almost all WinPcap features and includes a packet interpretation framework.

Pcap.Net is a .NET wrapper for WinPcap written in C++/CLI and C#. It Features almost all WinPcap features and includes a packet interpretation framework. See http://pcapdot.net

139 questions
3
votes
2 answers

.NET writing PCAP files

All, I've spent a fair part of the day looking at various PCAP libraries and before I commit to writing a PCAP writer I'd like to describe my scenario and solicit input. I have a client that has asked that I provide a service that reads pcap files…
Chris Keller
  • 235
  • 3
  • 9
2
votes
0 answers

Implementing IP fragmentation for TCP/UDP packet in Pcap.Net

I'm trying to implement IP fragmentation using Pcap.Net. It is simple for packets that are already built as the L3 payload is just split into parts. I have a code that does it. It returns the list of packet fragments for sending it into the wire. …
kiziuk
  • 23
  • 5
2
votes
2 answers

Pcap .NET library: PcapDotNet.Core.DLL not found

Using PcapDotNet library from Github (https://github.com/PcapDotNet/Pcap.Net/wiki/Using-Pcap.Net-in-your-programs), I built a Windows Service that allows remote network sniffing for comms network troubleshooting. After deployment the service is…
buzzard51
  • 1,372
  • 2
  • 23
  • 40
2
votes
1 answer

using PcapDotNet, how do you extract the final payload?

I have a C# application that uses PcapDotNet to sniff UDP packets with a capture filter. Works fine, and there is a 6-byte payload but I can't seem to extract it as a byte array. The UdpDatagram.Payload is a Datagram, with no method to extract the…
buzzard51
  • 1,372
  • 2
  • 23
  • 40
2
votes
1 answer

How can I recognize LLC, RAW and SNAP with Pcap.NET and C#?

I am trying to recognize LLC, RAW and SNAP type of packet in C#. For Ethernet i have this code if (packet.DataLink.Kind == DataLinkKind.Ethernet But I do not know how to recognize other (LLC,RAW,SNAP). Can you help me?
Tomáš Čičman
  • 281
  • 1
  • 5
  • 17
2
votes
1 answer

Recognizing the interface that a packet comes from in pcap.net?

I'm building a bridge using a computer with two network interface controllers. I'm using a multithread arrangement to receive packets form both interfaces using pcap.net. The problem is I don't know how to recognize what interface a packet is…
Foxman
  • 189
  • 13
2
votes
2 answers

Class member behave differently when define as static or non static

I have WPF application with PcapDotNet DLL's that measure my machine Interface Rate. This is the Model: public class Interface { public PacketDevice PacketDevice { get { return livePacketDevice; } } private DateTime _lastTimestamp; …
mark yer
  • 403
  • 6
  • 12
2
votes
2 answers

Extracting packet details in c#

I want to implement following functionality : fetching one by one packets from pcap file. I need to separate packets depending on their protocol type. so basically i should be able to change packet objects like ip address language i am using is…
Fateme E
  • 31
  • 1
  • 5
2
votes
1 answer

Capturing icmp packets in pcap.net

I am experimenting with pcap.net and wanted to implement something that responds to pings as an exercise. The operating system already responds to them, but I am fine with generating duplicates. The first step is obviously to even know that a ping…
Joe Huha
  • 548
  • 3
  • 16
2
votes
1 answer

c# - make public an object created inside a function

How can I use the object "communicator" created in main(), in the callback function? The PacketCommunicator class doesn't have a constructor. class Program { //public static PacketCommunicator communicator = new PacketCommunicator(); - can't do…
Chris
  • 1,213
  • 1
  • 21
  • 38
2
votes
2 answers

Extract network packets protocol using PCAP.Net

In order to parse network traffic I'm using PCAP.Net (I run splitcap on a given PCAP file and using PCAP.Net to extract communication data from the resulted bin files). Is it possible to get the Protocol (HTTP, FTP etc.) being used in a specific…
doubleM
  • 133
  • 4
  • 15
2
votes
1 answer

Try to split packet using PcapDotNet

In my application, I want to add the option to split my packets and I have found this post: Split packet into 2 packets with pcapdotnet i split 1 TCP packet into 2 packets and the 2 packets received is TCP and Ipv4, is it normal or i should received…
2
votes
1 answer

How to tell how much space is left for data in a Pcap.Net TCP packet

I'm using Pcap to build network tcp packages: private static Packet BuildTcpPacket() { EthernetLayer ethernetLayer = new EthernetLayer { Source = new MacAddress("01:01:01:01:01:01"), …
Arsen Zahray
  • 24,367
  • 48
  • 131
  • 224
2
votes
1 answer

How can i properly parse a RAW(Raw Ip) packet with C#?

I need to parse a pcap file in C# that was generated in Wireshark. Of course it opens fine with wireshark and shows all packets as expected. I have tried to work with two popular libraries (Pcap.Net and Packet.net from SharpPcap) I've found online,…
brianestey
  • 8,202
  • 5
  • 33
  • 48
1
vote
1 answer

How to pass array of arrays from javascript to a webservice?

I have following webservice: [webmethod] public string MakeReservation(?? PassengersInfo)//what data type use for PassengerInfo { } and in javascript I have following code. var ResultInfo = new Array(); …
Raymond Morphy
  • 2,464
  • 9
  • 51
  • 93
1
2
3
9 10