PCAP_DATALINK_NAME_TO_VAL(3PCAP)

πŸ“¦
version 1.10.7 Β· 2 versions
  • 1.10.7 Β· alpine 3.22, alpine 3.23, alpine 3.24, centos-stream 10, centos-stream 9, debian bookworm, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 1.11.0 Β· arch rolling
, in alpine 3.22, alpine 3.23, alpine 3.24, centos-stream 10, centos-stream 9, debian bookworm, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ NAME ✨

okay bestie, welcome to pcap_datalink_name_to_val(3PCAP) πŸ’… this one is literally here to get the link-layer header type value that corresponds to a header type name. iconic little matchmaker behavior, no cap.


🌸 SYNOPSIS 🌸

#include <pcap/pcap.h>

int pcap_datalink_name_to_val(const char *name);

πŸ¦‹ DESCRIPTION πŸ¦‹

So pcap_datalink_name_to_val() translates a link-layer header type name into the corresponding link-layer header type value ✨ and the name it wants is a DLT_ name with the DLT_ removed. The translation is case-insensitive, so you don’t have to stress about caps lock energy πŸ’–


πŸŽ€ RETURN VALUE πŸŽ€

On success, pcap_datalink_name_to_val() returns the type value πŸ‘‘ but if the name is not a known type name, you get PCAP_ERROR instead. periodt πŸ’€


🌈 SEE ALSO 🌈

  • pcap(3PCAP) 🫢

xoxo, your Unix bestie πŸ’– β€” this slay little page is from the 25 July 2018 edition of PCAP_DATALINK_NAME_TO_VAL(3PCAP) ✨

πŸ“¦ where this page comes from