hinic_port_get_mac(9)
π hinic_port_get_mac(9) β Kernel API Manual energy π
okay so bestie, we're diving into the Kernel API Manual today and the star of the show is hinic_port_get_mac(9) β literally the glow-up you need when you want to know what MAC address your nic device is serving π
π NAME π
hinic_port_get_mac β get the mac address of the nic device β¨
no cap, that's the whole vibe: you ask, it gives you the MAC π«Ά
πΈ SYNOPSIS πΈ
int hinic_port_get_mac (struct hinic_dev *nic_dev , u8 *addr );
that's it, that's the signature, copy it exactly bestie π
π¦ ARGUMENTS π¦
nic_devβ the nic device, your main character here πaddrβ the returned mac address, i.e. where the answer lands π
β DESCRIPTION β
Returns 0 on success β slay β and a negative value on failure π. That's the entire contract, and honestly? iconic for how simple it is.
lowkey important: "negative β Failure" is not a drill, check that return value fr fr π
π SEE ALSO π
The kernel file lives at ./drivers/net/ethernet/huawei/hinic/hinic_port.c β that's your source of truth, go read it iykyk π
and here's the whole friend group, all of them (9) pages, no one left out π«Ά:
change_mac(9)hinic_port_add_mac(9)hinic_port_del_mac(9)hinic_port_set_mtu(9)hinic_port_add_vlan(9)hinic_port_del_vlan(9)hinic_port_set_rx_mode(9)hinic_port_link_state(9)hinic_port_set_state(9)hinic_port_set_func_state(9)hinic_port_get_cap(9)hinic_port_set_tso(9)
and that's the page!! π§ sign-off time: this gem is sourced from ./drivers/net/ethernet/huawei/... and dated October 2026 β so go forth, get those MACs, and remember: check the return value or it's giving undefined behaviour π
π₯π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms