Search code examples
cmacosnetwork-programmingkernelbsd

Implementation of if_nametoindex


Where can I find the implementation of if_nametoindex? It seems to be externed in net/if.h but searching through the source code I cannot find any hint on the implementation. A better question is, how would I find what library it is defined in etc...


Solution

  • You can try to search through all projects, not just apple sources: http://code.metager.de/source/s?&sort=relevancy&defs=if_nametoindex&reset=true
    Take a look at freebsd implementation for example.