:tocdepth: 3

base/bif/pcap.bif.bro
=====================
.. bro:namespace:: GLOBAL


:Namespace: GLOBAL
:Source File: :download:`/scripts/base/bif/pcap.bif.bro`

Summary
~~~~~~~
Functions
#########
====================================================== =============================================================
:bro:id:`install_pcap_filter`: :bro:type:`function`    Installs a PCAP filter that has been precompiled with
                                                       :bro:id:`precompile_pcap_filter`.
:bro:id:`pcap_error`: :bro:type:`function`             Returns a string representation of the last PCAP error.
:bro:id:`precompile_pcap_filter`: :bro:type:`function` Precompiles a PCAP filter and binds it to a given identifier.
====================================================== =============================================================


Detailed Interface
~~~~~~~~~~~~~~~~~~
Functions
#########
.. bro:id:: install_pcap_filter

   :Type: :bro:type:`function` (id: :bro:type:`PcapFilterID`) : :bro:type:`bool`

   Installs a PCAP filter that has been precompiled with
   :bro:id:`precompile_pcap_filter`.
   

   :id: The PCAP filter id of a precompiled filter.
   

   :returns: True if the filter associated with *id* has been installed
            successfully.
   
   .. bro:see:: precompile_pcap_filter
                install_src_addr_filter
                install_src_net_filter
                uninstall_src_addr_filter
                uninstall_src_net_filter
                install_dst_addr_filter
                install_dst_net_filter
                uninstall_dst_addr_filter
                uninstall_dst_net_filter
                pcap_error

.. bro:id:: pcap_error

   :Type: :bro:type:`function` () : :bro:type:`string`

   Returns a string representation of the last PCAP error.
   

   :returns: A descriptive error message of the PCAP function that failed.
   
   .. bro:see:: precompile_pcap_filter
                install_pcap_filter
                install_src_addr_filter
                install_src_net_filter
                uninstall_src_addr_filter
                uninstall_src_net_filter
                install_dst_addr_filter
                install_dst_net_filter
                uninstall_dst_addr_filter
                uninstall_dst_net_filter

.. bro:id:: precompile_pcap_filter

   :Type: :bro:type:`function` (id: :bro:type:`PcapFilterID`, s: :bro:type:`string`) : :bro:type:`bool`

   Precompiles a PCAP filter and binds it to a given identifier.
   

   :id: The PCAP identifier to reference the filter *s* later on.
   

   :s: The PCAP filter. See ``man tcpdump`` for valid expressions.
   

   :returns: True if *s* is valid and precompiles successfully.
   
   .. bro:see:: install_pcap_filter
            install_src_addr_filter
            install_src_net_filter
            uninstall_src_addr_filter
            uninstall_src_net_filter
            install_dst_addr_filter
            install_dst_net_filter
            uninstall_dst_addr_filter
            uninstall_dst_net_filter
            pcap_error


