4 * Copyright (C) 1993-2001 by Darren Reed.
6 * See the IPFILTER.LICENCE file for details on licencing.
8 * $Id: checkrev.c,v 1.12.2.1 2004/03/09 14:44:39 darrenr Exp $
11 #include <sys/ioctl.h>
15 #include "netinet/ipl.h"
21 struct friostat fio, *fiop = &fio;
24 bzero((caddr_t)&ipfo, sizeof(ipfo));
25 ipfo.ipfo_rev = IPFILTER_VERSION;
26 ipfo.ipfo_size = sizeof(*fiop);
27 ipfo.ipfo_ptr = (void *)fiop;
28 ipfo.ipfo_type = IPFOBJ_IPFSTAT;
30 if ((vfd == -1) && ((vfd = open(ipfname, O_RDONLY)) == -1)) {
31 perror("open device");
35 if (ioctl(vfd, SIOCGETFS, &ipfo)) {
36 perror("ioctl(SIOCGETFS)");
42 if (strncmp(IPL_VERSION, fio.f_version, sizeof(fio.f_version))) {