if_nameindex.c 514 B

1234567891011121314151617181920212223242526272829
  1. #include "unp.h"
  2. /*
  3. * This is a placeholder if the system does not provide this RFC 2133
  4. * function. If routing sockets with sysctl() are provided, then the
  5. * if_XXX() functions in the libroute/ directory will replace these.
  6. */
  7. struct if_nameindex *
  8. if_nameindex(void)
  9. {
  10. return(NULL);
  11. }
  12. void
  13. if_freenameindex(struct if_nameindex *ptr)
  14. {
  15. }
  16. struct if_nameindex *
  17. If_nameindex(void)
  18. {
  19. struct if_nameindex *ifptr;
  20. if ( (ifptr = if_nameindex()) == NULL)
  21. err_quit("if_nameindex error");
  22. return(ifptr);
  23. }