LC_TUNTAP_CREATE(3)

πŸ“¦
version 0.11.2 Β· 2 versions
  • 0.11.2 Β· debian trixie, nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 0.5.1 Β· debian bookworm
, in debian trixie, nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– LC_TUNTAP_CREATE πŸ’–

okay bestie, so this is the Librecast Programmer's Manual page for lc_tuntap_create, and yes we're gonna make TUN/TAP devices together, it's giving network engineer but make it cute πŸ¦‹


✨ NAME ✨

lc_tuntap_create β€” create TUN/TAP devices πŸŽ€

πŸ“š LIBRARY πŸ“š

Librecast library (liblibrecast, -llibrecast) β€” she's the whole vibe, periodt.

🌸 SYNOPSIS 🌸

#include <librecast/if.h>

int lc_tuntap_create(char *ifname, int flags);

Compile and link with -llibrecast. no cap, you literally need it.

The flags argument may contain the following flags. One of IFF_TUN or IFF_TAP is required. like, not optional, bestie, pick one πŸ’…

  • IFF_TUN β€” create TUN device (no Ethernet headers) πŸ™ˆ
  • IFF_TAP β€” create TAP device ✨
  • IFF_NO_PI β€” Do not provide packet information. lowkey minimalist of it
  • IFF_MULTI_QUEUE β€” Create a queue of multiqueue device. main character energy, multiple queues fr fr

🫢 DESCRIPTION 🫢

lc_tuntap_create() creates a new TUN/TAP device 🌈

that's it. that's the whole description. short queen, ate, no notes. πŸ’œ

⭐ RETURN VALUE ⭐

lc_socket_new() β€” okay so this line is literally just sitting there at the start of the RETURN VALUE section and we're keeping it exactly as-is because the facts do not change, even when they're a little mysterious 🧚

On success, a file descriptor for the new socket is returned. πŸ”₯ On error, -1 is returned, and errno is set appropriately. 😭 (check your errno bestie, she's telling you something)


and that's the whole page!! from the Librecast crew, dated 2022-02-01, tagged LIBRECAST and LC_TUNTAP_CREATE(3) β€” mwah, iconic, go make some devices πŸ’–βœ¨

πŸ“¦ where this page comes from