Questions tagged [pcap]

pcap (packet capture) consists of an application programming interface (API) for capturing network traffic

pcap (packet capture) consists of an application programming interface (API) for capturing network traffic. Unix-like systems implement pcap in the libpcap library; Windows uses a port of libpcap known as .

Source

Wikipedia

1283 questions
-1
votes
1 answer

Testing WinPCAP with a Console Application

I want to check if I could successfully load the dll's for WinPCAP and want to do it by writing a simple C/C++ console application. However I do not have neither experience nor an idea about how to do it. What I know is according to its def…
Xentius
  • 449
  • 1
  • 10
  • 21
-1
votes
2 answers

Output the dump of a sniffer to an external file in C

I was creating a simple sniffer, just for fun, and I want to output the dump to a file. Here's the code of the sniffer: #include #include #define MAX_PACKET_NUM 5 int main(void) { struct pcap_pkthdr header; const u_char…
jndok
  • 859
  • 3
  • 12
  • 28
-1
votes
1 answer

pcap asynchronous packet capturing

I am capturing IEEE802.11 packets with the pcap library. As yet i used pcap_loop and a callback function for receiving and then processing the packets. But now I have switch the wifi channel the device is listening on periodically. Unfortunately,…
Cravid
  • 603
  • 2
  • 6
  • 20
-1
votes
1 answer

Store IP Addresses in Java

I want to store a list of IP Addresses in Java from pcap file (I am able to get all the packets information from pcap file and list of ipaddresses as well )and than compare these IP Addresses for port scanning detection. I couldn't figure out how to…
Aj.
  • 25
  • 1
  • 4
-1
votes
2 answers

Size of 802.11 packet

Given the below declaration for pcap callback: void my_callback(u_char *args, const struct pcap_pkthdr *header, const u_char *packet) How to ascertain the total number of bytes present in the packet? I need that value so that I can pass it to…
bengaluriga
  • 189
  • 4
  • 9
-1
votes
1 answer

PPP Network Detection for OSPF Demand Circuit Validation

I am looking for a way to detect if any incoming or outgoing network traffic is PPP (Point to Point). Is there a way that I can sniff for this type of traffic using the pcap library? The reason I need to know if the traffic is PPP to validate a…
THE DOCTOR
  • 4,095
  • 10
  • 40
  • 60
-2
votes
1 answer

BPF program is not valid - pcap sniffing

Hey everyone I'm trying to sniff packets using the pcap library. I have just one problem that I can not figure out: ERROR: BPF program is not valid. I'm trying to start the sniffing but this error is blocking me I searched on the web and found…
-2
votes
1 answer

Install libpcap

Can someone explain me how to install libpcap? I downloaded libpcap-1.9.1 from official site (tcpdump). There are a lot of files and i cant understand what to do. i tried: project(test) set(CMAKE_CXX_STANDARD…
Qada
  • 109
  • 6
-2
votes
2 answers

How Can I Parse a Pcapng File in C#?

I'm new to Pcapng files. I've read the 40+ page whitepaper and I'm still scratching my head and sweating. I understand that the Pcapng file is: Made up of a Section Header Block - This is the start of every Pcapng file. Question 1: How large is…
Tee Zad Awk
  • 692
  • 3
  • 10
-2
votes
1 answer

text2pcap is not detecting the below format

I am trying to convert the hex dump obtained from a router to pcap. My input format is as listed below 0 0000: 70E42273 90D2003A 7D36A502 81000183 p."s...:}6...... 0010: 080045C0 003BB1BF 40000106 8FA20A10 ..E..;..@....... 0020: …
-2
votes
1 answer

Loading pcap file in spark using python

I am new to Spark. I have pcap file. How can Spark read that file using python? How can I upload pcap file in Spark using python and how can it process? conf = SparkConf().setMaster("local").setAppName("SparkStreamingPcap") sc = SparkContext(conf =…
Zainub Wahid
  • 211
  • 2
  • 5
-2
votes
1 answer

A simple C program to analyze pcap file ,but it can not read entire pcap file

I post the main function, the struct header is normal. After I run this program, it often stops at some packet, different packet stops at different position,but the certain pcap always stops at certain position. It prints "read end of pcap file", I…
NX.Guo
  • 7
  • 2
-2
votes
1 answer

How to find retransmitted TCP packets

I'm trying to write a C++ program to scan a pcap file and filter out certain packets. I tried using winpcap to scan and filter but I can't find a way to separate retransmissions. Does anyone know how this filtering can be done?
-2
votes
1 answer

Set a TCP port > 65535 with pcap and dnet

I have been injecting packets on the network and watching the effects via wireshark. I am able to correctly set and change tcp ports and set the source and destination. However, I am now having an issue. One of the things I need to do is to set a…
Alex
  • 53
  • 8
-2
votes
2 answers

`mkdir': Permission denied (Errno::EACCES)

i'm trying to open a pcap file but a get this error I did deniel@ubuntu:~/Sites Ruby on Rails/helloWorld$ pcap_tools out.pcap I got /home/deniel/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/fileutils.rb:245:in 'mkdir':Permission denied -…
Skeitho
  • 113
  • 1
  • 9
1 2 3
85
86