Re: Obtain filenames from a directory (Pcap program)
- From: "lancer6238@xxxxxxxxx" <lancer6238@xxxxxxxxx>
- Date: Tue, 18 Nov 2008 22:52:19 -0800 (PST)
The glob function does give me the filenames of all the files in the
directory, but I still have trouble getting pcap_open_offline to read
from all the pcap files.
I now have
glob_t globbuf;
glob("/data/traffic/*.pcap", GLOB_ERR, NULL, &globbuf);
handle = pcap_open_offline(*(globbuf.gl_pathv), errbuf);
However, pcap_open_offline would only process the first pcap file in
the globbuf.gl_pathv list. How do I get pcap_open_offline to process
all files in the directory? Or do I need to use another function?
Thank you.
.
- Follow-Ups:
- Re: Obtain filenames from a directory (Pcap program)
- From: Barry Margolin
- Re: Obtain filenames from a directory (Pcap program)
- References:
- Obtain filenames from a directory (Pcap program)
- From: lancer6238@xxxxxxxxx
- Re: Obtain filenames from a directory (Pcap program)
- From: Barry Margolin
- Obtain filenames from a directory (Pcap program)
- Prev by Date: Re: TCP echo server UnP -1
- Next by Date: Re: fork and thread
- Previous by thread: Re: Obtain filenames from a directory (Pcap program)
- Next by thread: Re: Obtain filenames from a directory (Pcap program)
- Index(es):