Mirror of :pserver:cvs@cvs.fefe.de:/cvs libowfat https://www.fefe.de/libowfat/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

24 lines
430 B

  1. #include <sys/types.h>
  2. #ifndef __MINGW32__
  3. #include <sys/socket.h>
  4. #include <net/if.h>
  5. #endif
  6. #include "socket.h"
  7. #include "haven2i.h"
  8. #ifdef HAVE_N2I
  9. static char ifname[IF_NAMESIZE];
  10. const char* socket_getifname(uint32 _interface) {
  11. char *tmp=if_indextoname(_interface,ifname);
  12. if (tmp)
  13. return tmp;
  14. else
  15. return "[unknown]";
  16. }
  17. #else
  18. const char* socket_getifname(uint32 _interface) {
  19. return "[unknown]";
  20. }
  21. #endif