Questions tagged [packet-capture]

is for questions about capturing packets of various protocols that are transmitted over a network.

A lot of computer network protocols transmit their contents in packets. Packet capture is the interception of these packets as they are moved over a network of some type.

A packet sniffer captures raw data traveling over a network segment and saves it to a file for analysis.

Software

A software sniffer can generally only capture network data either originating from or going to the computer running it, plus any "broadcast" messages, if the computer is connected to the network via a switch. If the computer is connected to the network via a router, it may be able to capture network data for any device on connected to the same router.

Hardware

A hardware packet sniffer is physically connected to the network by connecting it to a router or switch. Sometimes the router or switch has to be configured to allow the sniffer to capture traffic being routed through it; this is called port mirroring.

Analysis

The captured data can be analyzed by the software that captured it, or by a program specifically designed to analyze the network data.

See Also

  • Wikipedia Article on Packet Analyzers
  • The term packet sniffer is also common and can be considered a synonym.
659 questions
2
votes
1 answer

Using multi-queue NICs in Linux

I've read a lot about Receive Side Scaling (RSS), Receive Packet Steering (RPS) and similar technologies, but I'm at a loss about how I can actually use those in my programs, that is to partition incoming packets between different…
2
votes
3 answers

How to properly keep the UI updated while transferring packets in C#?

I have this form that spawns a new thread and starts listening and waiting for UDP packets in a loop. What I need is to keep the UI updated with the number of bytes received. For that, I have setup an event which I'll raise as soon as a packet is…
rfgamaral
  • 16,546
  • 57
  • 163
  • 275
1
vote
4 answers

How can I find the IP address of the machine that created a capture in Wireshark?

Basically, I am using Wireshark looking at captures that have been created previously. How may I find the IP address of the machine that created the capture?
Paul Rogers
  • 13
  • 1
  • 3
1
vote
2 answers

Screen scraping/accessing data from another app an android/iphone app

I have zero experience with apps and smartphone development. I would like to know if it's possible to screen scrape or otherwise access data coming from apps on smartphone? Like If Im using some app that displays a list of train timetables or…
Jim_CS
  • 4,082
  • 13
  • 44
  • 80
1
vote
2 answers

libpcap format - packet header - incl_len / orig_len

The libpcap packet header structure has 2 length fields: typedef struct pcaprec_hdr_s { guint32 ts_sec; /* timestamp seconds */ guint32 ts_usec; /* timestamp microseconds */ guint32 incl_len; /* number of…
broun
  • 2,483
  • 5
  • 40
  • 55
1
vote
1 answer

How to read raw data sent to a port (python)

I just want to intercept raw data (hex)--headers and all--sent to a port, and relay them over an xmpp server. Then I would like to be able to replay to the port with hex I receive in a similar manner. I tried raw sockets, as described here, and got…
Alex Eftimiades
  • 2,527
  • 3
  • 24
  • 33
1
vote
1 answer

Capturing HTTP packet body through tcpdump

I am trying to monitor the network activity of a specific application on an Android device. In the application that I am attempting to monitor, I am communicating with an HTTP server that is running remotely. There are obviously different ways of…
rach5000
  • 135
  • 1
  • 9
1
vote
1 answer

Fast UDP Packet Capture in Java

I'm looking for a efficient way to capture packets in Java. Java's native network interface seems to be very slow compared to the C's native socket API (Java seems to capture only 1k pps while C's socket API can capture about 11k pps without any…
systemsfault
  • 15,207
  • 12
  • 59
  • 66
1
vote
2 answers

Using C# UDP Client

I'm making a program which needs to be listening for UDP Data at all times. My current idea is have this method running constantly in one thread listening for packets and then adding them to a list ready to be dealt with in other threads. The main…
Joel
  • 587
  • 1
  • 5
  • 17
1
vote
2 answers

Berkeley Packet Filter struct bpf_insn

Can someone explain please how to set a filter using struct bpf_program member struct bpf_insn? All documentation and tutorials are welcome, for example what would be the struct bpf_insn if i want to filter for example dhcp, dns or ...? Thanks for…
funnyCoder
  • 787
  • 2
  • 10
  • 30
1
vote
3 answers

Processing wireless frames with pcap

I am working on a project that involves interacting with the data in 802.11 frames. I am using libpcap 1.0. I have written code from most of the tutorials on the website as well as online that i could find , but most are geared towards sniffing over…
dudebrobro
  • 1,287
  • 10
  • 17
1
vote
2 answers

Is there any API for developers to monitor the 3G/WIFI/GPRS signals?

I want to capture the iPhone's network traffic. Will Apple allow us to do this? Are there any APIs for the developer to monitor the signals?
Magic fish
  • 78
  • 11
1
vote
2 answers

How does garena client sets up a network?

How does Garena works ?? Does it work based on VPN ??? But it doesnot create any virtual network adapter. so how does it creates a network between players ?? One thing is for sure, garena client includes a game launcher. So I suppose when u start…
Shanty
  • 274
  • 1
  • 2
  • 8
1
vote
0 answers

What is the realistic performance of live packet capture?

I know it depends on the environment, but I would like to know the real live packet capture performance. The questions are: What is the BPS (Bits per second) and PPS (Packet per second) do you process at the peak? What is the environment on the…
mas
  • 11
  • 2
1
vote
1 answer

How to Use Pyshark to Read a .pcapng file's content directly from memory instead of from disk?

I am using the file capture API of pyshark like this. #!/usr/bin/env python3 # encoding:utf-8 import pyshark as ps filename: str = 'some_file.pcapng' with ps.FileCapture(input_file=filename) as capture: print(capture[0].pretty_print()) But…
Della
  • 1,264
  • 2
  • 15
  • 32