Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
Functions | Variables
capture-wpcap.h File Reference

Go to the source code of this file.

Functions

void load_wpcap (void)
 Load WinPcap/Npcap libraries at runtime.
 
bool caplibs_have_winpcap (void)
 Check if WinPcap/Npcap libraries are loaded.
 
bool npf_sys_is_running (void)
 Check to see if npf.sys is running.
 

Variables

bool has_npcap
 

Detailed Description

Wireshark - Network traffic analyzer By Gerald Combs geral.nosp@m.d@wi.nosp@m.resha.nosp@m.rk.o.nosp@m.rg Copyright 2001 Gerald Combs

SPDX-License-Identifier: GPL-2.0-or-later

Function Documentation

◆ caplibs_have_winpcap()

bool caplibs_have_winpcap ( void  )
extern

Check if WinPcap/Npcap libraries are loaded.

This returns true if we loaded WinPcap; we don't support WinPcap anymore, so this doesn't mean we can capture (has_npcap is still false), but we can produce a more informative error message.

Returns
true if WinPcap is loaded, false otherwise.

◆ load_wpcap()

void load_wpcap ( void  )
extern

Load WinPcap/Npcap libraries at runtime.

This function attempts to load the necessary libraries for capturing network packets on Windows. If WinPcap is loaded, it does not necessarily mean that packet capture is supported; this function only indicates whether the library was successfully loaded.

◆ npf_sys_is_running()

bool npf_sys_is_running ( void  )

Check to see if npf.sys is running.

Returns
true if npf.sys is running, false if it's not or if there was an error checking its status.