packet capturing from a file

This is a discussion on packet capturing from a file within the C Programming forums, part of the General Programming Boards category; Hello, with pcap I can sniff on a network interface. The interface I want to sniff on I take with ...

  1. #1
    Registered User
    Join Date
    May 2007
    Posts
    8

    packet capturing from a file

    Hello,

    with pcap I can sniff on a network interface. The interface I want to sniff on I take with

    Code:
    dev = pcap_lookupdev(errbuf);
    But now I already have a dump file from tcpdump and so my programm (including pcap.h) should read from this file instead of sniffing on an interface.

    Does somebody know how I have to go on?

    edit: Oh, I see, there is an extra discussion board for network problems. If it's neccessery, can a mod move this thread.
    Last edited by Junktyz; 05-14-2007 at 07:51 AM.

  2. #2
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,239
    This is in the pcap manual.

  3. #3
    Registered User
    Join Date
    May 2007
    Posts
    8
    Oh really? I thought I watched this. I have to look into the man tomorrow again.

    Thank ya.
    Last edited by Junktyz; 05-15-2007 at 12:26 AM.

  4. #4
    Registered User
    Join Date
    May 2007
    Posts
    8
    Oh I found it .

    It's the

    Code:
    pcap_open_offline()
    function.

    Thank you for the the advise to watch the man pages again ^^.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. opening empty file causes access violation
    By trevordunstan in forum C Programming
    Replies: 10
    Last Post: 10-21-2008, 11:19 PM
  2. Need Help Fixing My C Program. Deals with File I/O
    By Matus in forum C Programming
    Replies: 7
    Last Post: 04-29-2008, 07:51 PM
  3. System
    By drdroid in forum C++ Programming
    Replies: 3
    Last Post: 06-28-2002, 10:12 PM
  4. Hmm....help me take a look at this: File Encryptor
    By heljy in forum C Programming
    Replies: 3
    Last Post: 03-23-2002, 09:57 AM
  5. Need a suggestion on a school project..
    By Screwz Luse in forum C Programming
    Replies: 5
    Last Post: 11-27-2001, 01:58 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21