Separate names with a comma.
Discussion in 'macOS' started by eddyq, Sep 13, 2009.
Is there a way to get the host name via a C program (while in kernel level)?
You may have better luck by asking your query in the MacOS X programming forum.
Sounds like you're writing a kext? Mach's host_info isn't exported (made visible) to the OS X kernel frameworks so you can't call that. The easiest way, even if it's a less-than-elegant workaround, may be to have a user-mode helper stub that gets this information through more conventional library calls and then notifies the kext what the hostname is.
Ok, thanks. I'll check with the MacOS X programming forum. If there is nothing directly available in the kernel then I'll just forget it.