4 * Copyright (C) 2002 by Darren Reed.
6 * See the IPFILTER.LICENCE file for details on licencing.
8 * $Id: kvatoname.c,v 1.1.4.1 2006/06/16 17:21:05 darrenr Exp $
14 #include <sys/ioctl.h>
16 char *kvatoname(func, iocfunc)
20 static char funcname[40];
25 res.ipfu_name[0] = '\0';
28 if ((opts & OPT_DONOTHING) == 0) {
29 fd = open(IPL_NAME, O_RDONLY);
33 (void) (*iocfunc)(fd, SIOCFUNCL, &res);
36 strncpy(funcname, res.ipfu_name, sizeof(funcname));
37 funcname[sizeof(funcname) - 1] = '\0';