Установка libpcap astra linux

How To Install libpcap-devel on Rocky Linux 8

In this tutorial we learn how to install libpcap-devel on Rocky Linux 8.

What is libpcap-devel

Libpcap provides a portable framework for low-level network monitoring. Libpcap can provide network statistics collection, security monitoring and network debugging. Since almost every system vendor provides a different interface for packet capture, the libpcap authors created this system-independent API to ease in porting and to alleviate the need for several system-dependent packet capture modules in each application. This package provides the libraries, include files, and other resources needed for developing libpcap applications.

We can use yum or dnf to install libpcap-devel on Rocky Linux 8. In this tutorial we discuss both methods but you only need to choose one of method to install libpcap-devel.

Install libpcap-devel on Rocky Linux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh 

After updating yum database, We can install libpcap-devel using dnf by running the following command:

sudo dnf -y install libpcap-devel 

Install libpcap-devel on Rocky Linux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh 

After updating yum database, We can install libpcap-devel using yum by running the following command:

sudo yum -y install libpcap-devel 

How To Uninstall libpcap-devel on Rocky Linux 8

To uninstall only the libpcap-devel package we can use the following command:

sudo dnf remove libpcap-devel 

libpcap-devel Package Contents on Rocky Linux 8

/usr/bin/pcap-config /usr/include/pcap /usr/include/pcap-bpf.h /usr/include/pcap-namedb.h /usr/include/pcap.h /usr/include/pcap/bluetooth.h /usr/include/pcap/bpf.h /usr/include/pcap/can_socketcan.h /usr/include/pcap/compiler-tests.h /usr/include/pcap/dlt.h /usr/include/pcap/funcattrs.h /usr/include/pcap/ipnet.h /usr/include/pcap/namedb.h /usr/include/pcap/nflog.h /usr/include/pcap/pcap-inttypes.h /usr/include/pcap/pcap.h /usr/include/pcap/sll.h /usr/include/pcap/socket.h /usr/include/pcap/usb.h /usr/include/pcap/vlan.h /usr/lib/libpcap.so /usr/lib/pkgconfig/libpcap.pc /usr/share/man/man1/pcap-config.1.gz /usr/share/man/man3/pcap.3pcap.gz /usr/share/man/man3/pcap_activate.3pcap.gz /usr/share/man/man3/pcap_breakloop.3pcap.gz /usr/share/man/man3/pcap_can_set_rfmon.3pcap.gz /usr/share/man/man3/pcap_close.3pcap.gz /usr/share/man/man3/pcap_compile.3pcap.gz /usr/share/man/man3/pcap_create.3pcap.gz /usr/share/man/man3/pcap_datalink.3pcap.gz /usr/share/man/man3/pcap_datalink_name_to_val.3pcap.gz /usr/share/man/man3/pcap_datalink_val_to_description.3pcap.gz /usr/share/man/man3/pcap_datalink_val_to_description_or_dlt.3pcap.gz /usr/share/man/man3/pcap_datalink_val_to_name.3pcap.gz /usr/share/man/man3/pcap_dispatch.3pcap.gz /usr/share/man/man3/pcap_dump.3pcap.gz /usr/share/man/man3/pcap_dump_close.3pcap.gz /usr/share/man/man3/pcap_dump_file.3pcap.gz /usr/share/man/man3/pcap_dump_flush.3pcap.gz /usr/share/man/man3/pcap_dump_fopen.3pcap.gz /usr/share/man/man3/pcap_dump_ftell.3pcap.gz /usr/share/man/man3/pcap_dump_open.3pcap.gz /usr/share/man/man3/pcap_file.3pcap.gz /usr/share/man/man3/pcap_fileno.3pcap.gz /usr/share/man/man3/pcap_findalldevs.3pcap.gz /usr/share/man/man3/pcap_fopen_offline.3pcap.gz /usr/share/man/man3/pcap_fopen_offline_with_tstamp_precision.3pcap.gz /usr/share/man/man3/pcap_free_datalinks.3pcap.gz /usr/share/man/man3/pcap_free_tstamp_types.3pcap.gz /usr/share/man/man3/pcap_freealldevs.3pcap.gz /usr/share/man/man3/pcap_freecode.3pcap.gz /usr/share/man/man3/pcap_get_required_select_timeout.3pcap.gz /usr/share/man/man3/pcap_get_selectable_fd.3pcap.gz /usr/share/man/man3/pcap_get_tstamp_precision.3pcap.gz /usr/share/man/man3/pcap_geterr.3pcap.gz /usr/share/man/man3/pcap_getnonblock.3pcap.gz /usr/share/man/man3/pcap_inject.3pcap.gz /usr/share/man/man3/pcap_is_swapped.3pcap.gz /usr/share/man/man3/pcap_lib_version.3pcap.gz /usr/share/man/man3/pcap_list_datalinks.3pcap.gz /usr/share/man/man3/pcap_list_tstamp_types.3pcap.gz /usr/share/man/man3/pcap_lookupdev.3pcap.gz /usr/share/man/man3/pcap_lookupnet.3pcap.gz /usr/share/man/man3/pcap_loop.3pcap.gz /usr/share/man/man3/pcap_major_version.3pcap.gz /usr/share/man/man3/pcap_minor_version.3pcap.gz /usr/share/man/man3/pcap_next.3pcap.gz /usr/share/man/man3/pcap_next_ex.3pcap.gz /usr/share/man/man3/pcap_offline_filter.3pcap.gz /usr/share/man/man3/pcap_open_dead.3pcap.gz /usr/share/man/man3/pcap_open_dead_with_tstamp_precision.3pcap.gz /usr/share/man/man3/pcap_open_live.3pcap.gz /usr/share/man/man3/pcap_open_offline.3pcap.gz /usr/share/man/man3/pcap_open_offline_with_tstamp_precision.3pcap.gz /usr/share/man/man3/pcap_perror.3pcap.gz /usr/share/man/man3/pcap_sendpacket.3pcap.gz /usr/share/man/man3/pcap_set_buffer_size.3pcap.gz /usr/share/man/man3/pcap_set_datalink.3pcap.gz /usr/share/man/man3/pcap_set_immediate_mode.3pcap.gz /usr/share/man/man3/pcap_set_promisc.3pcap.gz /usr/share/man/man3/pcap_set_protocol_linux.3pcap.gz /usr/share/man/man3/pcap_set_rfmon.3pcap.gz /usr/share/man/man3/pcap_set_snaplen.3pcap.gz /usr/share/man/man3/pcap_set_timeout.3pcap.gz /usr/share/man/man3/pcap_set_tstamp_precision.3pcap.gz /usr/share/man/man3/pcap_set_tstamp_type.3pcap.gz /usr/share/man/man3/pcap_setdirection.3pcap.gz /usr/share/man/man3/pcap_setfilter.3pcap.gz /usr/share/man/man3/pcap_setnonblock.3pcap.gz /usr/share/man/man3/pcap_snapshot.3pcap.gz /usr/share/man/man3/pcap_stats.3pcap.gz /usr/share/man/man3/pcap_statustostr.3pcap.gz /usr/share/man/man3/pcap_strerror.3pcap.gz /usr/share/man/man3/pcap_tstamp_type_name_to_val.3pcap.gz /usr/share/man/man3/pcap_tstamp_type_val_to_description.3pcap.gz /usr/share/man/man3/pcap_tstamp_type_val_to_name.3pcap.gz /usr/share/man/man5/pcap-savefile.5.gz /usr/bin/pcap-config /usr/include/pcap /usr/include/pcap-bpf.h /usr/include/pcap-namedb.h /usr/include/pcap.h /usr/include/pcap/bluetooth.h /usr/include/pcap/bpf.h /usr/include/pcap/can_socketcan.h /usr/include/pcap/compiler-tests.h /usr/include/pcap/dlt.h /usr/include/pcap/funcattrs.h /usr/include/pcap/ipnet.h /usr/include/pcap/namedb.h /usr/include/pcap/nflog.h /usr/include/pcap/pcap-inttypes.h /usr/include/pcap/pcap.h /usr/include/pcap/sll.h /usr/include/pcap/socket.h /usr/include/pcap/usb.h /usr/include/pcap/vlan.h /usr/lib64/libpcap.so /usr/lib64/pkgconfig/libpcap.pc /usr/share/man/man1/pcap-config.1.gz /usr/share/man/man3/pcap.3pcap.gz /usr/share/man/man3/pcap_activate.3pcap.gz /usr/share/man/man3/pcap_breakloop.3pcap.gz /usr/share/man/man3/pcap_can_set_rfmon.3pcap.gz /usr/share/man/man3/pcap_close.3pcap.gz /usr/share/man/man3/pcap_compile.3pcap.gz /usr/share/man/man3/pcap_create.3pcap.gz /usr/share/man/man3/pcap_datalink.3pcap.gz /usr/share/man/man3/pcap_datalink_name_to_val.3pcap.gz /usr/share/man/man3/pcap_datalink_val_to_description.3pcap.gz /usr/share/man/man3/pcap_datalink_val_to_description_or_dlt.3pcap.gz /usr/share/man/man3/pcap_datalink_val_to_name.3pcap.gz /usr/share/man/man3/pcap_dispatch.3pcap.gz /usr/share/man/man3/pcap_dump.3pcap.gz /usr/share/man/man3/pcap_dump_close.3pcap.gz /usr/share/man/man3/pcap_dump_file.3pcap.gz /usr/share/man/man3/pcap_dump_flush.3pcap.gz /usr/share/man/man3/pcap_dump_fopen.3pcap.gz /usr/share/man/man3/pcap_dump_ftell.3pcap.gz /usr/share/man/man3/pcap_dump_open.3pcap.gz /usr/share/man/man3/pcap_file.3pcap.gz /usr/share/man/man3/pcap_fileno.3pcap.gz /usr/share/man/man3/pcap_findalldevs.3pcap.gz /usr/share/man/man3/pcap_fopen_offline.3pcap.gz /usr/share/man/man3/pcap_fopen_offline_with_tstamp_precision.3pcap.gz /usr/share/man/man3/pcap_free_datalinks.3pcap.gz /usr/share/man/man3/pcap_free_tstamp_types.3pcap.gz /usr/share/man/man3/pcap_freealldevs.3pcap.gz /usr/share/man/man3/pcap_freecode.3pcap.gz /usr/share/man/man3/pcap_get_required_select_timeout.3pcap.gz /usr/share/man/man3/pcap_get_selectable_fd.3pcap.gz /usr/share/man/man3/pcap_get_tstamp_precision.3pcap.gz /usr/share/man/man3/pcap_geterr.3pcap.gz /usr/share/man/man3/pcap_getnonblock.3pcap.gz /usr/share/man/man3/pcap_inject.3pcap.gz /usr/share/man/man3/pcap_is_swapped.3pcap.gz /usr/share/man/man3/pcap_lib_version.3pcap.gz /usr/share/man/man3/pcap_list_datalinks.3pcap.gz /usr/share/man/man3/pcap_list_tstamp_types.3pcap.gz /usr/share/man/man3/pcap_lookupdev.3pcap.gz /usr/share/man/man3/pcap_lookupnet.3pcap.gz /usr/share/man/man3/pcap_loop.3pcap.gz /usr/share/man/man3/pcap_major_version.3pcap.gz /usr/share/man/man3/pcap_minor_version.3pcap.gz /usr/share/man/man3/pcap_next.3pcap.gz /usr/share/man/man3/pcap_next_ex.3pcap.gz /usr/share/man/man3/pcap_offline_filter.3pcap.gz /usr/share/man/man3/pcap_open_dead.3pcap.gz /usr/share/man/man3/pcap_open_dead_with_tstamp_precision.3pcap.gz /usr/share/man/man3/pcap_open_live.3pcap.gz /usr/share/man/man3/pcap_open_offline.3pcap.gz /usr/share/man/man3/pcap_open_offline_with_tstamp_precision.3pcap.gz /usr/share/man/man3/pcap_perror.3pcap.gz /usr/share/man/man3/pcap_sendpacket.3pcap.gz /usr/share/man/man3/pcap_set_buffer_size.3pcap.gz /usr/share/man/man3/pcap_set_datalink.3pcap.gz /usr/share/man/man3/pcap_set_immediate_mode.3pcap.gz /usr/share/man/man3/pcap_set_promisc.3pcap.gz /usr/share/man/man3/pcap_set_protocol_linux.3pcap.gz /usr/share/man/man3/pcap_set_rfmon.3pcap.gz /usr/share/man/man3/pcap_set_snaplen.3pcap.gz /usr/share/man/man3/pcap_set_timeout.3pcap.gz /usr/share/man/man3/pcap_set_tstamp_precision.3pcap.gz /usr/share/man/man3/pcap_set_tstamp_type.3pcap.gz /usr/share/man/man3/pcap_setdirection.3pcap.gz /usr/share/man/man3/pcap_setfilter.3pcap.gz /usr/share/man/man3/pcap_setnonblock.3pcap.gz /usr/share/man/man3/pcap_snapshot.3pcap.gz /usr/share/man/man3/pcap_stats.3pcap.gz /usr/share/man/man3/pcap_statustostr.3pcap.gz /usr/share/man/man3/pcap_strerror.3pcap.gz /usr/share/man/man3/pcap_tstamp_type_name_to_val.3pcap.gz /usr/share/man/man3/pcap_tstamp_type_val_to_description.3pcap.gz /usr/share/man/man3/pcap_tstamp_type_val_to_name.3pcap.gz /usr/share/man/man5/pcap-savefile.5.gz 

References

Summary

In this tutorial we learn how to install libpcap-devel on Rocky Linux 8 using yum and dnf.

Читайте также:  Casper linux что это

Источник

Build From Source on Linux

In order to compile PcapPlusPlus on Linux please make sure you have the following components installed:

    libpcap developers pack — contains the libpcap library PcapPlusPlus is linking with and relevant the header files. You can download it from http://www.tcpdump.org/#latest-release or through the standard Linux package managers such as apt-get or yum :

sudo apt-get install libpcap-dev 
sudo yum install libpcap-devel 

Configuration​

Run the configuration script from PcapPlusPlus main directory:

Ths script has two modes of operation:

  • Wizard mode — the script will walk you through the configuration parameters to provide
  • Params mode — provide the different parameters using command-line switches

In general there are several types of configuration:

Let’s cover the different options. We’ll begin with the wizard mode and later cover the params mode.

Wizard mode​

This mode is pretty much self explanatory and the wizard will guide you through the parameters you need to provide:

./configure-linux.sh **************************************** PcapPlusPlus Linux configuration script **************************************** Number of arguments: 0 Compile PcapPlusPlus with PF_RING? y Enter PF_RING source path: /home/seladb/PF_RING Compile PcapPlusPlus with DPDK? y Enter DPDK source path: /home/seladb/dpdk-18.11 PcapPlusPlus configuration is complete. Files created (or modified): mk/platform.mk, mk/PcapPlusPlus.mk, mk/install.sh, mk/uninstall.sh 

Command-line switches mode​

You an view all available switches by running ./configure-linux.sh —help or ./configure-linux.sh -h :

Option Description
—default use the default configuration. This assumes libpcap-dev is installed
—dpdk setup PcapPlusPlus with DPDK. When using this switch you must also set —dpdk-home
—dpdk-home set DPDK home directory. Use only when —dpdk is set
—pf-ring setup PcapPlusPlus with PF_RING. When using this switch you must also set —pf-ring-home
—pf-ring-home sets PF_RING home directory. Use only when —pf-ring is set
—use-immediate-mode use libpcap immediate mode which enables getting packets as fast as possible (supported on libpcap>=1.5)
—set-direction-enabled set direction for capturing incoming or outgoing packets (supported on libpcap>=0.9.1)
—install-dir set a custom installation directory. Default is /usr/local
—libpcap-include-dir libpcap header files directory. This parameter is optional and if omitted PcapPlusPlus will look for the header files in the default include paths
—libpcap-lib-dir libpcap pre compiled lib directory. This parameter is optional and if omitted PcapPlusPlus will look for the lib file in the default lib paths
—use-zstd use Zstd for PCAPNG streaming compression. This parameter is optional
—musl Musl base destination platform: i.e. Alpine. This parameter is optional
-h , —help displays a help message and exits. No further actions are performed

Источник

Оцените статью
Adblock
detector