2 * Copyright (C) 2012 by Darren Reed.
4 * See the IPFILTER.LICENCE file for details on licencing.
12 #include <sys/ioctl.h>
14 char *kvatoname(func, iocfunc)
18 static char funcname[40];
23 res.ipfu_name[0] = '\0';
26 if ((opts & OPT_DONTOPEN) == 0) {
27 fd = open(IPL_NAME, O_RDONLY);
31 (void) (*iocfunc)(fd, SIOCFUNCL, &res);
34 strncpy(funcname, res.ipfu_name, sizeof(funcname));
35 funcname[sizeof(funcname) - 1] = '\0';