getifname.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
#include "ipf.h"
#include "qif.h"
#include "kmem.h"
/*
* Given a pointer to an interface in the kernel, return a pointer to a
* string which is the interface name.
*/
{
#if SOLARIS
char *ifname;
if ((void *)ptr == (void *)-1)
return "!";
return "-";
return "X";
return ifname;
#else
defined(__OpenBSD__)
#else
char buf[32];
int len;
# endif
if ((void *)ptr == (void *)-1)
return "!";
return "-";
return "X";
defined(__OpenBSD__)
# else
return "X";
len = 2;
len = 3;
len = 4;
else
len = 5;
# endif
#endif
}