How to get the MAC (station) address programmatically?
Here’s some sample LLA code to do this. Note that you can use DLPI to do the same, and LLA in not supported in HP-UX 10.0. Sample DLPI code can be found on HPSL, the document id is CWA940907000. /* Here’s some sample code that you can use to get your own station address (otherwise known as MAC address or LAN card address). Be sure to compile this with the -ln option, since the net_ntoa(3N) call is found in /usr/lib/libn.a. This program was compiled by doing: cc get.c -o get -g -ln */ #include