PCAP_DATALINK_NAME_TO_VAL(3)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1

okay so bestie, this is pcap_datalink_name_to_val, and it's here to get the link-layer header type value corresponding to a header type name. That's the whole NAME section, no cap.

✨ SYNOPSIS ✨

#include <pcap/pcap.h>

int pcap_datalink_name_to_val(const char *name);

πŸ¦‹ DESCRIPTION πŸ¦‹

pcap_datalink_name_to_val() translates a link-layer header type name β€” specifically a DLT_ name with the DLT_ removed β€” to the corresponding link-layer header type value. The translation is case-insensitive, so capitalization is literally not the vibe check here.

πŸ”₯ RETURN VALUE πŸ”₯

On success, pcap_datalink_name_to_val() returns the type value. If the name is not a known type name, it returns PCAP_ERROR β€” that's the "nope, don't know her" answer.

🌈 SEE ALSO 🌈


πŸ’Œ cute sign-off: this page is from the Library Functions Manual, dated 25 July 2018, and the footer says PCAP_DATAL...NAME_TO_VAL(3) β€” mwah, slay! πŸ’…
πŸ“¦ where this page comes from