# Module Pcap

    module Pcap: sig .. end

    type pcap_handle

    type bpf_program

    type pcap_dumper

    type file_t

    type timeval = {

`` | `tv_sec : `int`;`
`` | `tv_usec : `int`;`

`}`

    type struct_2 = {

`` | `ts : `timeval`;`
`` | `caplen : `int`;`
`` | `len : `int`;`

`}`

    type pcap_pkthdr = struct_2

    type struct_3 = {

`` | `ps_recv : `int`;`
`` | `ps_drop : `int`;`
`` | `ps_ifdrop : `int`;`

`}`

    type pcap_stat = struct_3

    type struct_4 = {

`` | `name : `string`;`
`` | `description : `string`;`
`` | `flags : `int`;`

`}`

    type pcap_if = struct_4

    type pcap_callback = string -> pcap_pkthdr -> string -> unit

    val pcap_findalldevs : unit -> pcap_if array

    val pcap_list_datalinks : pcap_handle -> int * int array

    val pcap_open_live : string -> int -> int -> int -> pcap_handle

    val pcap_close : pcap_handle -> unit

    val pcap_lookupdev : unit -> string

    val pcap_lookupnet : string -> int * int * int

    val pcap_loop : pcap_handle -> int -> pcap_callback -> string -> int

    val pcap_dispatch : pcap_handle -> int -> pcap_callback -> string -> int

    val pcap_open_dead : int -> int -> pcap_handle

    val pcap_open_offline : string -> pcap_handle

    val pcap_dump_open : pcap_handle -> string -> pcap_dumper

    val pcap_dump_direct : pcap_dumper -> pcap_pkthdr -> string -> unit

    val pcap_dump_close : pcap_dumper -> unit

    val pcap_compile : pcap_handle -> string -> int -> int -> int * bpf_program

    val pcap_setfilter : pcap_handle -> bpf_program -> int

    val pcap_freecode : bpf_program -> unit

    val pcap_setnonblock : pcap_handle -> int -> int

    val pcap_getnonblock : pcap_handle -> int

    val pcap_datalink : pcap_handle -> int

    val pcap_snapshot : pcap_handle -> int

    val pcap_is_swapped : pcap_handle -> int

    val pcap_major_version : pcap_handle -> int

    val pcap_minor_version : pcap_handle -> int

    val pcap_stats : pcap_handle -> int * pcap_stat

    val pcap_file : pcap_handle -> file_t

    val pcap_fileno : pcap_handle -> int

    val pcap_perror : pcap_handle -> string -> unit

    val pcap_geterr : pcap_handle -> string

    val pcap_strerror : int -> string

    val pcap_set_datalink : pcap_handle -> int -> int

    val pcap_datalink_name_to_val : string -> int

    val pcap_datalink_val_to_name : int -> string

    val pcap_datalink_val_to_description : int -> string

    val pcap_dump_flush : pcap_dumper -> int

    val pcap_breakloop : pcap_handle -> unit

    val pcap_get_selectable_fd : pcap_handle -> int

    val pcap_lib_version : unit -> string