Obtain filenames from a directory (Pcap program)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • lancer6238@yahoo.com

    #1

    Obtain filenames from a directory (Pcap program)

    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_offli ne("/data/traffic/pcap1.pcap", errbuf");

    which works fine since pcap_open_offli ne() 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
  • Peter Nilsson

    #2
    Re: Obtain filenames from a directory (Pcap program)

    "lancer6...@yah oo.com" <lancer6...@yah oo.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_offli ne("/data/traffic/pcap1.pcap", errbuf");
    I doubt have that. That is unlikely to even compile.
    which works fine since pcap_open_offli ne() 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...



    --
    Peter

    Comment

    Working...