class axl::io::Pcap

#include <axl_io_Pcap.h>

class Pcap: public axl::sl::Handle
{
public:
    // methods

    bool
    openDevice(const sl::StringRef& device);

    bool
    openLive(
        const sl::StringRef& device,
        size_t snapshotSize,
        bool isPromiscious,
        uint_t timeout
        );

    bool
    openFile(const sl::StringRef& fileName);

    bool
    openDead(
        int linkType,
        size_t snapshotSize
        );

    bool
    activate();

    int
    getLinkType();

    size_t
    getSnapshotSize();

    bool
    setSnapshotSize(size_t size);

    bool
    setBufferSize(size_t size);

    bool
    setPromiscious(bool isPromiscious);

    bool
    setTimeout(uint_t timeout);

    sl::StringRef
    getLastErrorDescription();

    size_t
    setLastError();

    bool
    setFilter(const bpf_program* filter);

    bool
    setFilter(
        const sl::StringRef& filter,
        bool isOptimized = true,
        uint32_t netMask = 0xffffffff
        );

    bool
    getBlockingMode();

    bool
    setBlockingMode(bool isBlocking);

    void
    breakLoop();

    PcapLoopResult
    loop(
        size_t count,
        ::pcap_handler handler,
        void* context
        );

    size_t
    dispatch(
        size_t count,
        ::pcap_handler handler,
        void* context
        );

    size_t
    read(
        void* p,
        size_t size,
        uint64_t* timestamp = NULL
        );

    size_t
    write(
        const void* p,
        size_t size
        );
};

Inherited Members

public:
    // typedefs

    typedef T H;

    // methods

    operator T() const;

    T
    operator->() const;

    const Handle&
    operator=(T h);

    bool
    isOpen() const;

    void
    close();

    void
    attach(T h);

    T
    detach();

    T*
    p();

    static
    T
    getInvalidHandle();