LIBKYHW(3)

📦 version 3.0.1.4, in arch rolling, ubuntu resolute, ubuntu stonking

💖 LIBKYHW(3) — the manual page, but make it slay 💖

okay bestie, sit down, hydrate, because we're about to read LIBKYHW(3) together and honestly? it's giving hardware whisperer. This is the library functions manual for the one and only libkyhw — the girl who knows everything about your bios, your mainboard, your CPU, your graphics card AND your network cards. she's nosy in the best way. no cap. 🫶


✨ NAME ✨

kdk_bios_get_vendor, kdk_bios_get_version, kdk_bios_free, kdk_board_get_name, kdk_board_get_date, kdk_board_get_serial, kdk_board_get_vendor, kdk_board_free, kdk_cpu_get_arch, kdk_cpu_get_vendor, kdk_cpu_get_model, kdk_cpu_get_freq_MHz, kdk_cpu_get_corenums, kdk_cpu_get_virt, kdk_cpu_get_process, kdk_display_get_vendor, kdk_display_get_product, kdk_display_get_description, kdk_display_get_physical_id, kdk_display_get_bus_info, kdk_display_get_version, kdk_display_get_width, kdk_display_get_clock, kdk_display_get_capabilities, kdk_display_get_configuration, kdk_display_get_resources, kdk_nc_get_cardlist, kdk_nc_is_up, kdk_nc_get_upcards, kdk_nc_get_phymac, kdk_nc_get_private_ipv4, kdk_nc_get_ipv4, kdk_nc_get_private_ipv6, kdk_nc_get_ipv6, kdk_nc_is_wireless, kdk_nc_get_vendor_and_product, kdk_nc_get_driver, kdk_nc_freeall — 获取bios、主板、cpu、显卡、网卡信息

that last bit literally translates to "get bios, mainboard, cpu, graphics card, network card info" and yeah. that's the whole vibe. she does it all. 💅

🌸 SYNOPSIS 🌸

like, here's how you even talk to her:

#include <libkybios.h>

#include <libkyboard.h>

#include <libkycpu.h>

#include <libkydisplay.h>

#include <libkync.h>

extern const char* kdk_bios_get_vendor();

extern const char* kdk_bios_get_version();

extern void kdk_bios_free(char *info);

extern const char* kdk_board_get_name();

extern const char* kdk_board_get_date();

extern const char* kdk_board_get_serial();

extern const char* kdk_board_get_vendor();

extern void kdk_board_free(char *info);

extern const char* kdk_cpu_get_arch();

extern const char* kdk_cpu_get_vendor();

extern const char* kdk_cpu_get_model();

extern const char* kdk_cpu_get_freq_MHz();

extern const char* kdk_cpu_get_corenums();

extern const char* kdk_cpu_get_virt();

extern const char* kdk_cpu_get_process();

extern char* kdk_display_get_vendor();

extern char* kdk_display_get_product();

extern char* kdk_display_get_description();

extern char* kdk_display_get_physical_id();

extern char* kdk_display_get_bus_info();

extern char* kdk_display_get_version();

extern char* kdk_display_get_width();

extern char* kdk_display_get_clock();

extern char* kdk_display_get_capabilities();

extern char* kdk_display_get_resources();

extern char* kdk_display_get_configuration();

extern char** kdk_nc_get_cardlist();

extern int kdk_nc_is_up(const char *nc);

extern char** kdk_nc_get_upcards();

extern char* kdk_nc_get_phymac(const char *nc);

extern char* kdk_nc_get_private_ipv4(const char *nc);

extern char** kdk_nc_get_ipv4(const char* nc);

extern char* kdk_nc_get_private_ipv6(const char *nc);

extern char** kdk_nc_get_ipv6(const char *nc);

extern int kdk_nc_is_wireless(const char *nc);

extern int kdk_nc_get_vendor_and_product(const char *nc, char *vendor, char *product);

extern char *kdk_nc_get_driver(const char *nc);

extern inline void kdk_nc_freeall(char **ptr);

and then you gotta link her in, obviously:

Link with -lkydiskinfo.
bestie the way you have to link with -lkydiskinfo… don't forget it or she simply will not show up. 🎀

🦋 DESCRIPTION 🦋

Detailed Description

so like. this library is the whole girl squad of system info. she contains bios info, mainboard info, CPU info, graphics card info, and network card info. that's it, that's the pitch, and honestly? iconic. 👑

she's the friend who can tell you your bios vendor AND your bios version, who knows your mainboard's name, date, serial and vendor, who can recite your CPU's arch, vendor, model, freq in MHz, core numbers, virt and process, who can describe every single thing about your displays (vendor, product, description, physical id, bus info, version, width, clock, capabilities, resources, configuration) AND who can list your network cards, tell you if they're up, which ones are up, their phymac, private ipv4, ipv4, private ipv6, ipv6, whether they're wireless, vendor and product, and the driver. all of it. no notes. 💅

also she's polite about memory — there's kdk_bios_free, kdk_board_free and kdk_nc_freeall in there for cleanup, which is the equivalent of her helping you clear the table after the party. 🧹✨


⭐ RETURN VALUE ⭐

the return value is, like, generally specific to the individual function called. that's it. that's the answer. each function does its own thing and returns its own thing, so go read the one you actually called, bestie. no blanket statement here. 🙈


💜 CONFORMING TO 💜

these functions are as per the withdrawn POSIX.1e draft specification. (withdrawn!! 💀 she's vintage, she's archival, she's a draft that got taken away and she's still here serving.)

and the following functions are Linux extensions:

  • kdk_bios_get_vendor()
  • kdk_board_get_name()
  • kdk_cpu_get_arch()
  • kdk_nc_get_cardlist()
  • kdk_display_get_vendor()

so like, those five are the Linux-only girlies. iykyk. 🐧


🌈 SEE ALSO 🌈

go read those next, they're the little sibling pages and they ate. 🔥


and that's the whole page, bestie!! 🎀 this was the Linux Programmer's Manual version of LIBKYHW(3), dated Thu Aug 10 2023, and honestly she's a queen for staying that consistent. mwah. 💋✨🦋

📦 where this page comes from