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
0
votes
1 answer

pcap.net ReceivePacket doesn't work properly

receive packet. After I sent a packet, I also want to receive the packet which came from the destination of the previous packet. I tried to use ReceivePacket but always I got the null value for packet12. Is there anything I need to do more? set…
coolruk
  • 1
  • 1
0
votes
1 answer

I need to be able to pad the ethernet layer of a tcp packet using Pcap.Net

I am using Pcap.net to try and establish a TCP client/server connection with c# code. I have a packet built and can send out a SYN, but the particular server I am trying to connect with needs extra 2 bytes of padding on the Ethernet layer. From all…
kdun0508
  • 75
  • 10
0
votes
0 answers

Why Pcap.net ReceivePacket has a 1000ms lag?

I am trying to constantly capture packets using Pcap.Net library and respond to them immediately. However there is a long periodic lag in the ReceivePacket method. I have set up a stopwatch before ReceivePacket and stopped it afterwards. The results…
mehregan
  • 9
  • 5
0
votes
1 answer

How to Split compressed packets

I write capture program. I use pcap.net and i capture live http requests on packets. I get token request and response body messages normally but when i try to get http api request's body part i get failed because my service header contains chunked…
Ugur Ozker
  • 95
  • 1
  • 1
  • 9
0
votes
1 answer

Why does a packet sent using PCap.NET not fill out the TCP options?

I am trying to use PCap.NET to send a SYN packet to a destination. When using the WinSock API I can see the TCP Options in Wireshark.... But when I use PCap.NET to build and send the packet, the options are not included. Here is the TCP layer I use…
kdun0508
  • 75
  • 10
0
votes
1 answer

Get the network interface with the most traffic within a sample period using Pcap.net

I'm trying to use the Pcap.net package to analyze the amount of traffic in bits per second across multiple network interfaces over a small sample period (e.g. 10 seconds). Then I would like to calculate the average of the total bytes per seconds…
Dshiz
  • 3,099
  • 3
  • 26
  • 53
0
votes
1 answer

Convert Log file to pcap file in C#

I have captured UDP packet log files which contains payload data only, i need to convert these UDP packets from log files to.pcap using C#. I dont have any idea how to convert log files to .pcap files.
user1645200
  • 135
  • 2
  • 13
0
votes
1 answer

Pcap.Net Handling offline trace file with OffLinePacketDevice

The situation: I am working on a tool that simulates a device, based on its actual network data that I captured earlier with WireShark. The captured data is from a production device that I need to recreate in a debug enviroment. What I need is a way…
Frank
  • 431
  • 1
  • 5
  • 25
0
votes
1 answer

How do I export Pcap.Net Packet Class Object To .pcap File

I am developing an application in which users will use my tool, but every time the tool encounters some packets it will upload the packet class in c# as a .pcap file up to my site so that I can personally inspect it and make the necessary changes. I…
Sean Mitchell
  • 447
  • 2
  • 21
0
votes
1 answer

Berkeley Packet Filter to high level filtering expression

I have a C program which sets the filter for a WinPcap session manually by Berkeley Filter. Now I want to transfer this tool in C# with Pcap.Net. Pcap.Net doesn't offer the raw berkeley filter as argument but the high level filtering expression…
Max R.
  • 811
  • 1
  • 13
  • 31
0
votes
1 answer

Automatically select a device in PcapDotNet?

Is there a way to select working device that sends http traffic automatically from this list? List Interfaces = new List(); foreach (var nic in NetworkInterface.GetAllNetworkInterfaces()) { if…
m.qayyum
  • 401
  • 2
  • 15
  • 44
0
votes
0 answers

Extracting protocol and info header in PcapDotNet

I am trying to read packets from a pcap file using PcapDotNet. This file contains captured RTP packets as below. In my code I have to extract G711 and H264 packets and write to different files. How can I find this information? private static…
Manjoor
  • 4,091
  • 10
  • 43
  • 67
0
votes
1 answer

c# Provide packet source in pcap.net

I am following Pcap.net tutorials from its wiki on github. I tried to run code from here: https://github.com/PcapDotNet/Pcap.Net/wiki/Pcap.Net-Tutorial-Handling-offline-dump-files I didn't understand the following part: if (args.Length != 1) …
Faizan Ahmed
  • 33
  • 1
  • 8
0
votes
2 answers

How do I determine which network adapter my computer is using?

I am using Pcat.Net. How do I determine which network adapter my computer is using C#, .Net, Pcat.net? GetMacAddress() extension method returns just the mac address of the network adapter, LivePacketDevice.AllLocalMachine also does not return…
Ajit Goel
  • 4,180
  • 7
  • 59
  • 107
0
votes
1 answer

How to get Http Body Message From a TCP packet in C#

i'm working on a tcp listener project on c#. I'm using pcap.net for packet capture. But when i'm trying to get the http message with such command like tcp.Http.Decode(Encoding.UTF8), i get some encrypted script. I'm listening on sites that not using…