jmakov / gulp Goto Github PK
View Code? Open in Web Editor NEWLossless Gigabit Remote Packet Capture With Linux
License: Apache License 2.0
Lossless Gigabit Remote Packet Capture With Linux
License: Apache License 2.0
Hello Jernej,
the value of rmem_default
is just 1/10 of the default in tcp_rmem
(12582912 vs 125829120) is this intended or a typo?
Lines 31 to 32 in 33fcc15
Regards,
Carsten
The following settings are apparently insufficient:
sudo groupadd pcap
sudo usermod -a -G pcap $USER
sudo chgrp pcap gulp
sudo setcap cap_net_raw,cap_net_admin=eip gulp
since we still get this output when running gulp without sudo
:
./gulp: Warning: could not lock ring buffer into RAM
./gulp: Reader could not set scheduling priority: Permission denied
This option would allow you to pipe captured stream and process it in-line, before saving it to a file. A use case is saving disk bandwidth using a fast compressor e.g. snappy before saving (from the-tcpdump-group/tcpdump#458).
Hello,
I have a tcpdump capture of erspan traffic.
I would like to pass it through gulp to decapsulte the erspan headers
and output the result back into a pcap file for further analysis with wireshark.
How can I do that?
Thanks,
Interrupting with ^C when using "-Z" flag results in "No such file or directory" messages if the script didn't yet finish.
I would like to have a pcap file created for each src-ip:port/dst-ip:port combination, or just ip address at a minimum, for all tcp and udp packets. I am not a c++ developer but I was able to make this work in principle with a test program. here's the relevant part of the code:
` if (ip->ip_p == 6 /* tcp protocol number */) {
//printf("\ntcp!\n");
char srcname[100];
strcpy(srcname, inet_ntoa(ip->ip_src));
char dstname[100];
strcpy(dstname, inet_ntoa(ip->ip_dst));
int &stored_val = map[dstname];
oss << "/" << odest << "/"<< dstname << "-" << stored_val << ".pcap";
pfile = oss.str();
if (GetFileSize(pfile) >= 0) {
dumpfile= pcap_dump_open_append(fp, pfile.c_str());
}
else {
dumpfile= pcap_dump_open(fp, pfile.c_str());
}
pcap_dump((unsigned char *) dumpfile, header, pkt_data);
}
else if (ip->ip_p == 17 /* tcp protocol number */) {
//printf("\nudp!\n");
char srcname[100];
strcpy(srcname, inet_ntoa(ip->ip_src));
char dstname[100];
strcpy(dstname, inet_ntoa(ip->ip_dst));
int &stored_val = map[dstname];
oss << "/" << odest << "/"<< dstname << "-" << stored_val << ".pcap";
pfile = oss.str();
if (GetFileSize(pfile) >= 0) {
dumpfile= pcap_dump_open_append(fp, pfile.c_str());
}
else {
dumpfile= pcap_dump_open(fp, pfile.c_str());
}
`
My program loses a lot of packets under load however, hence why I looked to yours for some insipiration on how to optimize. This is all still quite a bit over my head though. Do you think it would be possible to add a feature that would write to a file based on the ip:port information it receives in the header?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.