By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,434 Members | 1,878 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,434 IT Pros & Developers. It's quick & easy.

Obtain filenames from a directory (Pcap program)

P: n/a
Hi all,
I'm writing a program using libpcap, and I have multiple pcap files in
a folder that I want to capture.

I currently have

handle = pcap_open_offline("/data/traffic/pcap1.pcap", errbuf");

which works fine since pcap_open_offline() takes in a filename.
However, I want to process multiple pcap files from the directory /
data/traffic/ at once. Is there a way to do that?

Thank you.

Regards,
Rayne
Nov 19 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"lancer6...@yahoo.com" <lancer6...@yahoo.comwrote:
Hi all,
I'm writing a program using libpcap, and I have
multiple pcap files in a folder that I want to capture.

I currently have

handle = pcap_open_offline("/data/traffic/pcap1.pcap", errbuf");
I doubt have that. That is unlikely to even compile.
which works fine since pcap_open_offline() takes in a
filename. However, I want to process multiple pcap files
from the directory /data/traffic/ at once. Is there a way
to do that?
Not in standard C which is the topic of comp.lang.c.

See the FAQ...

http://c-faq.com/osdep/readdir.html

--
Peter
Nov 19 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.