/*
* Copyright (C) 2003 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "ipf.h"
#include "kmem.h"
/*
* Given a pointer to an interface in the kernel, return a pointer to a
* string which is the interface name.
*
* The same code is used to run in two different environments: in ipfstat
* and in ipftest. In ipftest, kmemcpy is wrapper for bcopy but in ipfstat,
* it is used as an interface to libkvm.
*/
{
# if SOLARIS
# endif
# ifdef __hpux
# include "compat.h"
# endif
defined(__OpenBSD__) || \
#else
char buf[32];
int len;
# endif
# ifdef SOLARIS_PFHOOKS
if ((opts & OPT_DONOTHING) == 0)
return "@";
# endif
if ((void *)ptr == (void *)-1)
return "!";
return "-";
return "X";
defined(__OpenBSD__) || defined(linux) || \
# else
return "X";
len = 2;
len = 3;
len = 4;
else
len = 5;
# endif
}