4 * Copyright (C) 2012 by Darren Reed.
6 * See the IPFILTER.LICENCE file for details on licencing.
16 * Given a pointer to an interface in the kernel, return a pointer to a
17 * string which is the interface name.
23 # include <sys/mutex.h>
24 # include <sys/condvar.h>
25 # include "../pfil/qif.h"
29 if ((void *)ptr == (void *)-1)
34 if (kmemcpy((char *)&qif, (u_long)ptr, sizeof(qif)) == -1)
36 ifname = strdup(qif.qf_name);
37 if ((ifname != NULL) && (*ifname == '\0')) {
45 if ((void *)ptr == (void *)-1)
50 if (kmemcpy((char *)&netif, (u_long)ptr, sizeof(netif)) == -1)
52 return strdup(netif.if_xname);