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

Manipulating and sending an ARP response in pcap.net?

I'm building an artificial bridge and in order for packets to pass through it it has to send an arp response as if it's the target computer in order for packets that are aimed at the other side of the network to pass through it. I found a way to…
Foxman
  • 189
  • 13
0
votes
0 answers

Issue viewing all skinny traffic using pcap.net in a C# Winform application

I am using the latest version of pcap.net to capture network traffic on my local pc ethernet card. I am using the following code to capture all traffic associated with a specific mac address. private void bwCapture_DoWork(object sender,…
Deadphoenix
  • 88
  • 11
0
votes
1 answer

Parallel.ForEach vs regular Thread loop

I want to write application using Pcap.Net DLL's. My application get several PCAP files and sent all the packets. Now i want to add the option to send more than 1 files concurrent and wonder what is the best\efficient way to do that. I have this…
mot rer
  • 153
  • 2
  • 9
0
votes
0 answers

exception error in pcap.net

i am using pcap.net to change packets and reconstruct an output pcap file. but in this part i have error. could anyone say, how could i solve it? if (packet.Ethernet.IpV4.Protocol == IpV4Protocol.Tcp) { …
Fateme E
  • 31
  • 1
  • 5
0
votes
1 answer

how can i build output pcap file in pcap.net in C#

I am using Pcap.net library in c# to change and anonymize packet fileds.i have already read packets from an offline pcap file and i have changed some fields in it. my question is there is any way to create output file in a pcap format after change…
Fateme E
  • 31
  • 1
  • 5
0
votes
1 answer

Should i lock my machine adapter while send packet if i am using several threads?

I am using Pcap.Net to transmit packet through my machine adapter, i some cases i am read packets from several files in the same time using Parallel.ForEach with MaxDegreeOfParallelism property that can be changed. So i wonder if i need to lock the…
dina ere
  • 53
  • 8
0
votes
1 answer

Fix packet with wrong checksum with Pcap.Net

I have several PCAP files with bad Checksum and in order to fix those files i am using this method: private Packet FixBadChecksum(Packet packet) { try { EthernetLayer ethernet =…
miki wess
  • 3
  • 6
0
votes
1 answer

IP fragmentation cause Checksum incorrect message

I am using PcapDorNet DLLs and i try to fragment my traffic: private IEnumerable SplitPacket(Packet packet, int numberOfFragments) { IpV4Datagram ipV4Datagram = packet.Ethernet.IpV4; Datagram datagram =…
miki wess
  • 3
  • 6
0
votes
0 answers

Split TCP, UDP packet data

I am using PcapDot.Net project's DLLs and I am try to split TCP and UDP packet data. For example if my payload length is 20 bytes, I want to split this into 2 pieces of 10 bytes. Of course the Ethernet layer, IPv4 layer and the transport layer…
miki wess
  • 3
  • 6
0
votes
1 answer

Getting TCP RST packet when try to create connection

I am trying to create tcp connection. I am sending tcp SYN and getting SYN-ACK. Afterwards, I am sending ACK message. However, before my last ACK is sending I am getting RST reset packet. I can see that using wireshark sniffer. I am writing my code…
0
votes
1 answer

How to check if my PCAP file contain Bad CheckSum using PcapDotNet

Is it possible to check if my PCAP file contain Bad CheckSum using PcapDotNet ? Of course i want to check IP, TCP and UDP layers. Currently i only can check if the packet is valid (the packet valid unless an invalid part was found: bad checksum,…
miki wess
  • 3
  • 6
0
votes
1 answer

TCP/IP basics, offset, reassembly

I`m writing packet generator right now. Testing it with wireshark and VM. I have an exercise on my checklist to sent 3 packets in a row: 1. TCP on 80 port, with SYN=1 and MF=1 flags. 2. TCP on 135 port, with SYN=1 and MF=1 flags. 3. TCP on 80 port,…
0
votes
1 answer

How to I send my broadcast Ethernet packet to other subnets?

So this is a higher level problem I'm having, and I'm trying to wrap my head around it. I have a program that sends out a broadcast ethernet packet (it is stripped down using the Pcap.Net dll). If the device listens to the broadcast, it will respond…
Kat
  • 2,460
  • 2
  • 36
  • 70
0
votes
0 answers

Creating my own TCP packet using Pcap.Net - packet is sent but never reach destination

private Packet BuildTcpPacket(string SourceIP, string DestIP, int sourceport, int destport, string payload, bool syn, bool ack, bool fin, bool rst, bool urg, bool psh, bool cwr, bool enc, bool ns, bool none) { EthernetLayer…
0
votes
2 answers

Change packet ip using Pcap.Net without know in advance if the packet is TCP, UDP

In my application I am using Pcap.net DLLs and change packet ip in this way: private Packet ChangePacketIp(Packet packet, string oldIpAddress, string newIpAddress) { try { EthernetLayer ethernet =…
Mike Maggy
  • 93
  • 2
  • 14