Imported Upstream version 1.4.13+git200906171200
This commit is contained in:
parent
4ab9f0d24c
commit
d0b8ab8112
362 changed files with 34110 additions and 10773 deletions
|
@ -1,5 +1,16 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
if RELEASE_PRESENT
|
||||
NP_VERSION = $(PACKAGE_VERSION)
|
||||
else
|
||||
NP-VERSION-FILE: .FORCE-NP-VERSION-FILE
|
||||
@$(SHELL_PATH) $(top_srcdir)/NP-VERSION-GEN
|
||||
.FORCE-NP-VERSION-FILE:
|
||||
-include NP-VERSION-FILE
|
||||
endif
|
||||
|
||||
AM_CFLAGS = -DNP_VERSION='"$(NP_VERSION)"'
|
||||
|
||||
VPATH = $(top_srcdir) $(top_srcdir)/lib $(top_srcdir)/plugins $(top_srcdir)/plugins/t $(srcdir)
|
||||
|
||||
INCLUDES = -I.. -I$(top_srcdir)/lib -I$(top_srcdir)/gl -I$(top_srcdir)/intl -I$(top_srcdir)/plugins @SSLINCLUDE@
|
||||
|
@ -71,7 +82,10 @@ check_icmp_LDADD = @LTLIBINTL@ $(NETLIBS) $(SOCKETLIBS)
|
|||
# -m64 needed at compiler and linker phase
|
||||
pst3_CFLAGS = @PST3CFLAGS@
|
||||
pst3_LDFLAGS = @PST3CFLAGS@
|
||||
pst3_LDADD = -lkvm
|
||||
|
||||
check_dhcp_DEPENDENCIES = check_dhcp.c $(NETOBJS) $(DEPLIBS)
|
||||
check_icmp_DEPENDENCIES = check_icmp.c $(NETOBJS)
|
||||
|
||||
clean-local:
|
||||
rm -f NP-VERSION-FILE
|
||||
|
||||
|
|
|
@ -41,17 +41,19 @@ subdir = plugins-root
|
|||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/np_mysqlclient.m4 \
|
||||
$(top_srcdir)/gl/m4/alloca.m4 \
|
||||
$(top_srcdir)/gl/m4/00gnulib.m4 $(top_srcdir)/gl/m4/alloca.m4 \
|
||||
$(top_srcdir)/gl/m4/arpa_inet_h.m4 \
|
||||
$(top_srcdir)/gl/m4/base64.m4 $(top_srcdir)/gl/m4/c-strtod.m4 \
|
||||
$(top_srcdir)/gl/m4/cloexec.m4 $(top_srcdir)/gl/m4/codeset.m4 \
|
||||
$(top_srcdir)/gl/m4/dirname.m4 $(top_srcdir)/gl/m4/dos.m4 \
|
||||
$(top_srcdir)/gl/m4/base64.m4 $(top_srcdir)/gl/m4/btowc.m4 \
|
||||
$(top_srcdir)/gl/m4/c-strtod.m4 $(top_srcdir)/gl/m4/cloexec.m4 \
|
||||
$(top_srcdir)/gl/m4/codeset.m4 $(top_srcdir)/gl/m4/dirname.m4 \
|
||||
$(top_srcdir)/gl/m4/dos.m4 \
|
||||
$(top_srcdir)/gl/m4/double-slash-root.m4 \
|
||||
$(top_srcdir)/gl/m4/eoverflow.m4 $(top_srcdir)/gl/m4/error.m4 \
|
||||
$(top_srcdir)/gl/m4/errno_h.m4 $(top_srcdir)/gl/m4/error.m4 \
|
||||
$(top_srcdir)/gl/m4/exitfail.m4 \
|
||||
$(top_srcdir)/gl/m4/extensions.m4 \
|
||||
$(top_srcdir)/gl/m4/fcntl-safer.m4 \
|
||||
$(top_srcdir)/gl/m4/float_h.m4 $(top_srcdir)/gl/m4/floorf.m4 \
|
||||
$(top_srcdir)/gl/m4/fcntl_h.m4 $(top_srcdir)/gl/m4/float_h.m4 \
|
||||
$(top_srcdir)/gl/m4/floorf.m4 \
|
||||
$(top_srcdir)/gl/m4/fstypename.m4 \
|
||||
$(top_srcdir)/gl/m4/fsusage.m4 \
|
||||
$(top_srcdir)/gl/m4/getaddrinfo.m4 \
|
||||
|
@ -61,7 +63,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/np_mysqlclient.m4 \
|
|||
$(top_srcdir)/gl/m4/glibc21.m4 \
|
||||
$(top_srcdir)/gl/m4/gnulib-common.m4 \
|
||||
$(top_srcdir)/gl/m4/gnulib-comp.m4 \
|
||||
$(top_srcdir)/gl/m4/iconv.m4 \
|
||||
$(top_srcdir)/gl/m4/hostent.m4 $(top_srcdir)/gl/m4/iconv.m4 \
|
||||
$(top_srcdir)/gl/m4/include_next.m4 \
|
||||
$(top_srcdir)/gl/m4/inet_ntop.m4 $(top_srcdir)/gl/m4/inline.m4 \
|
||||
$(top_srcdir)/gl/m4/intlmacosx.m4 \
|
||||
|
@ -70,17 +72,24 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/np_mysqlclient.m4 \
|
|||
$(top_srcdir)/gl/m4/lib-ld.m4 $(top_srcdir)/gl/m4/lib-link.m4 \
|
||||
$(top_srcdir)/gl/m4/lib-prefix.m4 \
|
||||
$(top_srcdir)/gl/m4/localcharset.m4 \
|
||||
$(top_srcdir)/gl/m4/locale-fr.m4 \
|
||||
$(top_srcdir)/gl/m4/locale-ja.m4 \
|
||||
$(top_srcdir)/gl/m4/locale-zh.m4 \
|
||||
$(top_srcdir)/gl/m4/longlong.m4 \
|
||||
$(top_srcdir)/gl/m4/ls-mntd-fs.m4 \
|
||||
$(top_srcdir)/gl/m4/malloc.m4 $(top_srcdir)/gl/m4/math_h.m4 \
|
||||
$(top_srcdir)/gl/m4/mbstate_t.m4 \
|
||||
$(top_srcdir)/gl/m4/mbrtowc.m4 $(top_srcdir)/gl/m4/mbsinit.m4 \
|
||||
$(top_srcdir)/gl/m4/mbstate_t.m4 $(top_srcdir)/gl/m4/mktime.m4 \
|
||||
$(top_srcdir)/gl/m4/mountlist.m4 \
|
||||
$(top_srcdir)/gl/m4/multiarch.m4 \
|
||||
$(top_srcdir)/gl/m4/netdb_h.m4 \
|
||||
$(top_srcdir)/gl/m4/netinet_in_h.m4 $(top_srcdir)/gl/m4/nls.m4 \
|
||||
$(top_srcdir)/gl/m4/onceonly_2_57.m4 $(top_srcdir)/gl/m4/po.m4 \
|
||||
$(top_srcdir)/gl/m4/onceonly.m4 $(top_srcdir)/gl/m4/open.m4 \
|
||||
$(top_srcdir)/gl/m4/po.m4 $(top_srcdir)/gl/m4/printf.m4 \
|
||||
$(top_srcdir)/gl/m4/progtest.m4 $(top_srcdir)/gl/m4/regex.m4 \
|
||||
$(top_srcdir)/gl/m4/safe-read.m4 \
|
||||
$(top_srcdir)/gl/m4/safe-write.m4 \
|
||||
$(top_srcdir)/gl/m4/size_max.m4 \
|
||||
$(top_srcdir)/gl/m4/servent.m4 $(top_srcdir)/gl/m4/size_max.m4 \
|
||||
$(top_srcdir)/gl/m4/snprintf.m4 $(top_srcdir)/gl/m4/socklen.m4 \
|
||||
$(top_srcdir)/gl/m4/sockpfaf.m4 $(top_srcdir)/gl/m4/ssize_t.m4 \
|
||||
$(top_srcdir)/gl/m4/stdbool.m4 $(top_srcdir)/gl/m4/stdint.m4 \
|
||||
|
@ -90,13 +99,16 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/np_mysqlclient.m4 \
|
|||
$(top_srcdir)/gl/m4/string_h.m4 $(top_srcdir)/gl/m4/strndup.m4 \
|
||||
$(top_srcdir)/gl/m4/strnlen.m4 \
|
||||
$(top_srcdir)/gl/m4/sys_socket_h.m4 \
|
||||
$(top_srcdir)/gl/m4/time_h.m4 $(top_srcdir)/gl/m4/time_r.m4 \
|
||||
$(top_srcdir)/gl/m4/timegm.m4 \
|
||||
$(top_srcdir)/gl/m4/unistd-safer.m4 \
|
||||
$(top_srcdir)/gl/m4/unistd_h.m4 \
|
||||
$(top_srcdir)/gl/m4/vasnprintf.m4 \
|
||||
$(top_srcdir)/gl/m4/vasprintf.m4 \
|
||||
$(top_srcdir)/gl/m4/vsnprintf.m4 $(top_srcdir)/gl/m4/wchar.m4 \
|
||||
$(top_srcdir)/gl/m4/wchar_t.m4 $(top_srcdir)/gl/m4/wctype.m4 \
|
||||
$(top_srcdir)/gl/m4/wint_t.m4 $(top_srcdir)/gl/m4/xalloc.m4 \
|
||||
$(top_srcdir)/gl/m4/wchar_t.m4 $(top_srcdir)/gl/m4/wcrtomb.m4 \
|
||||
$(top_srcdir)/gl/m4/wctype.m4 $(top_srcdir)/gl/m4/wint_t.m4 \
|
||||
$(top_srcdir)/gl/m4/write.m4 $(top_srcdir)/gl/m4/xalloc.m4 \
|
||||
$(top_srcdir)/gl/m4/xsize.m4 $(top_srcdir)/gl/m4/xstrndup.m4 \
|
||||
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
|
@ -117,7 +129,7 @@ check_icmp_SOURCES = check_icmp.c
|
|||
check_icmp_OBJECTS = check_icmp.$(OBJEXT)
|
||||
pst3_SOURCES = pst3.c
|
||||
pst3_OBJECTS = pst3-pst3.$(OBJEXT)
|
||||
pst3_DEPENDENCIES =
|
||||
pst3_LDADD = $(LDADD)
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
|
@ -142,6 +154,7 @@ ALLOCA_H = @ALLOCA_H@
|
|||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
|
||||
AR = @AR@
|
||||
ARPA_INET_H = @ARPA_INET_H@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
|
@ -172,16 +185,24 @@ ECHO_C = @ECHO_C@
|
|||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EOVERFLOW = @EOVERFLOW@
|
||||
EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@
|
||||
EMULTIHOP_VALUE = @EMULTIHOP_VALUE@
|
||||
ENOLINK_HIDDEN = @ENOLINK_HIDDEN@
|
||||
ENOLINK_VALUE = @ENOLINK_VALUE@
|
||||
EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
|
||||
EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
|
||||
ERRNO_H = @ERRNO_H@
|
||||
EXEEXT = @EXEEXT@
|
||||
EXTRAS = @EXTRAS@
|
||||
EXTRAS_ROOT = @EXTRAS_ROOT@
|
||||
EXTRA_NETOBJS = @EXTRA_NETOBJS@
|
||||
EXTRA_TEST = @EXTRA_TEST@
|
||||
F77 = @F77@
|
||||
FCNTL_H = @FCNTL_H@
|
||||
FFLAGS = @FFLAGS@
|
||||
FLOAT_H = @FLOAT_H@
|
||||
FLOORF_LIBM = @FLOORF_LIBM@
|
||||
GETADDRINFO_LIB = @GETADDRINFO_LIB@
|
||||
GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
|
||||
GETOPT_H = @GETOPT_H@
|
||||
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
|
||||
|
@ -190,47 +211,85 @@ GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@
|
|||
GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GMSGFMT_015 = @GMSGFMT_015@
|
||||
GNULIB_ACCEPT = @GNULIB_ACCEPT@
|
||||
GNULIB_ATOLL = @GNULIB_ATOLL@
|
||||
GNULIB_BIND = @GNULIB_BIND@
|
||||
GNULIB_BTOWC = @GNULIB_BTOWC@
|
||||
GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
|
||||
GNULIB_CEILF = @GNULIB_CEILF@
|
||||
GNULIB_CEILL = @GNULIB_CEILL@
|
||||
GNULIB_CHOWN = @GNULIB_CHOWN@
|
||||
GNULIB_CLOSE = @GNULIB_CLOSE@
|
||||
GNULIB_CONNECT = @GNULIB_CONNECT@
|
||||
GNULIB_DPRINTF = @GNULIB_DPRINTF@
|
||||
GNULIB_DUP2 = @GNULIB_DUP2@
|
||||
GNULIB_ENVIRON = @GNULIB_ENVIRON@
|
||||
GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
|
||||
GNULIB_FCHDIR = @GNULIB_FCHDIR@
|
||||
GNULIB_FCLOSE = @GNULIB_FCLOSE@
|
||||
GNULIB_FFLUSH = @GNULIB_FFLUSH@
|
||||
GNULIB_FLOORF = @GNULIB_FLOORF@
|
||||
GNULIB_FLOORL = @GNULIB_FLOORL@
|
||||
GNULIB_FOPEN = @GNULIB_FOPEN@
|
||||
GNULIB_FPRINTF = @GNULIB_FPRINTF@
|
||||
GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
|
||||
GNULIB_FPUTC = @GNULIB_FPUTC@
|
||||
GNULIB_FPUTS = @GNULIB_FPUTS@
|
||||
GNULIB_FREOPEN = @GNULIB_FREOPEN@
|
||||
GNULIB_FREXP = @GNULIB_FREXP@
|
||||
GNULIB_FREXPL = @GNULIB_FREXPL@
|
||||
GNULIB_FSEEK = @GNULIB_FSEEK@
|
||||
GNULIB_FSEEKO = @GNULIB_FSEEKO@
|
||||
GNULIB_FSYNC = @GNULIB_FSYNC@
|
||||
GNULIB_FTELL = @GNULIB_FTELL@
|
||||
GNULIB_FTELLO = @GNULIB_FTELLO@
|
||||
GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
|
||||
GNULIB_FWRITE = @GNULIB_FWRITE@
|
||||
GNULIB_GETADDRINFO = @GNULIB_GETADDRINFO@
|
||||
GNULIB_GETCWD = @GNULIB_GETCWD@
|
||||
GNULIB_GETDELIM = @GNULIB_GETDELIM@
|
||||
GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
|
||||
GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
|
||||
GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
|
||||
GNULIB_GETLINE = @GNULIB_GETLINE@
|
||||
GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
|
||||
GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
|
||||
GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
|
||||
GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@
|
||||
GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@
|
||||
GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@
|
||||
GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
|
||||
GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
|
||||
GNULIB_INET_NTOP = @GNULIB_INET_NTOP@
|
||||
GNULIB_INET_PTON = @GNULIB_INET_PTON@
|
||||
GNULIB_ISFINITE = @GNULIB_ISFINITE@
|
||||
GNULIB_ISINF = @GNULIB_ISINF@
|
||||
GNULIB_ISNAN = @GNULIB_ISNAN@
|
||||
GNULIB_ISNAND = @GNULIB_ISNAND@
|
||||
GNULIB_ISNANF = @GNULIB_ISNANF@
|
||||
GNULIB_ISNANL = @GNULIB_ISNANL@
|
||||
GNULIB_LCHOWN = @GNULIB_LCHOWN@
|
||||
GNULIB_LDEXPL = @GNULIB_LDEXPL@
|
||||
GNULIB_LINK = @GNULIB_LINK@
|
||||
GNULIB_LISTEN = @GNULIB_LISTEN@
|
||||
GNULIB_LSEEK = @GNULIB_LSEEK@
|
||||
GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
|
||||
GNULIB_MATHL = @GNULIB_MATHL@
|
||||
GNULIB_MBRLEN = @GNULIB_MBRLEN@
|
||||
GNULIB_MBRTOWC = @GNULIB_MBRTOWC@
|
||||
GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
|
||||
GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
|
||||
GNULIB_MBSCHR = @GNULIB_MBSCHR@
|
||||
GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
|
||||
GNULIB_MBSINIT = @GNULIB_MBSINIT@
|
||||
GNULIB_MBSLEN = @GNULIB_MBSLEN@
|
||||
GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
|
||||
GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
|
||||
GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@
|
||||
GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
|
||||
GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
|
||||
GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
|
||||
GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@
|
||||
GNULIB_MBSSEP = @GNULIB_MBSSEP@
|
||||
GNULIB_MBSSPN = @GNULIB_MBSSPN@
|
||||
GNULIB_MBSSTR = @GNULIB_MBSSTR@
|
||||
|
@ -240,18 +299,37 @@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
|
|||
GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
|
||||
GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
|
||||
GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
|
||||
GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
|
||||
GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
|
||||
GNULIB_OPEN = @GNULIB_OPEN@
|
||||
GNULIB_PERROR = @GNULIB_PERROR@
|
||||
GNULIB_PRINTF = @GNULIB_PRINTF@
|
||||
GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
|
||||
GNULIB_PUTC = @GNULIB_PUTC@
|
||||
GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
|
||||
GNULIB_PUTENV = @GNULIB_PUTENV@
|
||||
GNULIB_PUTS = @GNULIB_PUTS@
|
||||
GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
|
||||
GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
|
||||
GNULIB_READLINK = @GNULIB_READLINK@
|
||||
GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
|
||||
GNULIB_RECV = @GNULIB_RECV@
|
||||
GNULIB_RECVFROM = @GNULIB_RECVFROM@
|
||||
GNULIB_ROUND = @GNULIB_ROUND@
|
||||
GNULIB_ROUNDF = @GNULIB_ROUNDF@
|
||||
GNULIB_ROUNDL = @GNULIB_ROUNDL@
|
||||
GNULIB_RPMATCH = @GNULIB_RPMATCH@
|
||||
GNULIB_SEND = @GNULIB_SEND@
|
||||
GNULIB_SENDTO = @GNULIB_SENDTO@
|
||||
GNULIB_SETENV = @GNULIB_SETENV@
|
||||
GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@
|
||||
GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@
|
||||
GNULIB_SIGNBIT = @GNULIB_SIGNBIT@
|
||||
GNULIB_SLEEP = @GNULIB_SLEEP@
|
||||
GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
|
||||
GNULIB_SOCKET = @GNULIB_SOCKET@
|
||||
GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
|
||||
GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@
|
||||
GNULIB_STPCPY = @GNULIB_STPCPY@
|
||||
GNULIB_STPNCPY = @GNULIB_STPNCPY@
|
||||
GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
|
||||
|
@ -264,32 +342,57 @@ GNULIB_STRPBRK = @GNULIB_STRPBRK@
|
|||
GNULIB_STRSEP = @GNULIB_STRSEP@
|
||||
GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
|
||||
GNULIB_STRSTR = @GNULIB_STRSTR@
|
||||
GNULIB_STRTOD = @GNULIB_STRTOD@
|
||||
GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
|
||||
GNULIB_STRTOLL = @GNULIB_STRTOLL@
|
||||
GNULIB_STRTOULL = @GNULIB_STRTOULL@
|
||||
GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
|
||||
GNULIB_TRUNC = @GNULIB_TRUNC@
|
||||
GNULIB_TRUNCF = @GNULIB_TRUNCF@
|
||||
GNULIB_TRUNCL = @GNULIB_TRUNCL@
|
||||
GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
|
||||
GNULIB_UNSETENV = @GNULIB_UNSETENV@
|
||||
GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
|
||||
GNULIB_VDPRINTF = @GNULIB_VDPRINTF@
|
||||
GNULIB_VFPRINTF = @GNULIB_VFPRINTF@
|
||||
GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
|
||||
GNULIB_VPRINTF = @GNULIB_VPRINTF@
|
||||
GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
|
||||
GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
|
||||
GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
|
||||
GNULIB_WCRTOMB = @GNULIB_WCRTOMB@
|
||||
GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@
|
||||
GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@
|
||||
GNULIB_WCTOB = @GNULIB_WCTOB@
|
||||
GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
|
||||
GNULIB_WRITE = @GNULIB_WRITE@
|
||||
GREP = @GREP@
|
||||
HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@
|
||||
HAVE_ATOLL = @HAVE_ATOLL@
|
||||
HAVE_BTOWC = @HAVE_BTOWC@
|
||||
HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@
|
||||
HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@
|
||||
HAVE_DECL_ASINL = @HAVE_DECL_ASINL@
|
||||
HAVE_DECL_ATANL = @HAVE_DECL_ATANL@
|
||||
HAVE_DECL_COSL = @HAVE_DECL_COSL@
|
||||
HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
|
||||
HAVE_DECL_EXPL = @HAVE_DECL_EXPL@
|
||||
HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@
|
||||
HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@
|
||||
HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@
|
||||
HAVE_DECL_GETADDRINFO = @HAVE_DECL_GETADDRINFO@
|
||||
HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
|
||||
HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
|
||||
HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
|
||||
HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
|
||||
HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@
|
||||
HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@
|
||||
HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@
|
||||
HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@
|
||||
HAVE_DECL_LOGL = @HAVE_DECL_LOGL@
|
||||
HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
|
||||
HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
|
||||
HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
|
||||
HAVE_DECL_SINL = @HAVE_DECL_SINL@
|
||||
HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
|
||||
HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@
|
||||
|
@ -302,25 +405,46 @@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
|
|||
HAVE_DECL_TANL = @HAVE_DECL_TANL@
|
||||
HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@
|
||||
HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@
|
||||
HAVE_DECL_TRUNCL = @HAVE_DECL_TRUNCL@
|
||||
HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
|
||||
HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
|
||||
HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
|
||||
HAVE_DPRINTF = @HAVE_DPRINTF@
|
||||
HAVE_DUP2 = @HAVE_DUP2@
|
||||
HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
|
||||
HAVE_FSEEKO = @HAVE_FSEEKO@
|
||||
HAVE_FSYNC = @HAVE_FSYNC@
|
||||
HAVE_FTELLO = @HAVE_FTELLO@
|
||||
HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
|
||||
HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@
|
||||
HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
|
||||
HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
|
||||
HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
|
||||
HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
|
||||
HAVE_GETUSERSHELL = @HAVE_GETUSERSHELL@
|
||||
HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
|
||||
HAVE_ISNAND = @HAVE_ISNAND@
|
||||
HAVE_ISNANF = @HAVE_ISNANF@
|
||||
HAVE_ISNANL = @HAVE_ISNANL@
|
||||
HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
|
||||
HAVE_LINK = @HAVE_LINK@
|
||||
HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
|
||||
HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@
|
||||
HAVE_MBRLEN = @HAVE_MBRLEN@
|
||||
HAVE_MBRTOWC = @HAVE_MBRTOWC@
|
||||
HAVE_MBSINIT = @HAVE_MBSINIT@
|
||||
HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
|
||||
HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
|
||||
HAVE_MEMPCPY = @HAVE_MEMPCPY@
|
||||
HAVE_MKDTEMP = @HAVE_MKDTEMP@
|
||||
HAVE_NETDB_H = @HAVE_NETDB_H@
|
||||
HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@
|
||||
HAVE_OS_H = @HAVE_OS_H@
|
||||
HAVE_RANDOM_H = @HAVE_RANDOM_H@
|
||||
HAVE_RANDOM_R = @HAVE_RANDOM_R@
|
||||
HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
|
||||
HAVE_READLINK = @HAVE_READLINK@
|
||||
HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@
|
||||
HAVE_RPMATCH = @HAVE_RPMATCH@
|
||||
HAVE_SETENV = @HAVE_SETENV@
|
||||
HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
|
||||
HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
|
||||
|
@ -334,8 +458,16 @@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
|
|||
HAVE_STRNDUP = @HAVE_STRNDUP@
|
||||
HAVE_STRPBRK = @HAVE_STRPBRK@
|
||||
HAVE_STRSEP = @HAVE_STRSEP@
|
||||
HAVE_STRTOD = @HAVE_STRTOD@
|
||||
HAVE_STRTOLL = @HAVE_STRTOLL@
|
||||
HAVE_STRTOULL = @HAVE_STRTOULL@
|
||||
HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@
|
||||
HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
|
||||
HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@
|
||||
HAVE_STRVERSCMP = @HAVE_STRVERSCMP@
|
||||
HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
|
||||
HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
|
||||
HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
|
||||
HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
|
||||
HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@
|
||||
HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
|
||||
|
@ -343,14 +475,20 @@ HAVE_UNISTD_H = @HAVE_UNISTD_H@
|
|||
HAVE_UNSETENV = @HAVE_UNSETENV@
|
||||
HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
|
||||
HAVE_VASPRINTF = @HAVE_VASPRINTF@
|
||||
HAVE_VDPRINTF = @HAVE_VDPRINTF@
|
||||
HAVE_WCHAR_H = @HAVE_WCHAR_H@
|
||||
HAVE_WCRTOMB = @HAVE_WCRTOMB@
|
||||
HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@
|
||||
HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@
|
||||
HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
|
||||
HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@
|
||||
HAVE_WINT_T = @HAVE_WINT_T@
|
||||
HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@
|
||||
HAVE__BOOL = @HAVE__BOOL@
|
||||
HOSTENT_LIB = @HOSTENT_LIB@
|
||||
HOSTNAME = @HOSTNAME@
|
||||
INCLUDE_NEXT = @INCLUDE_NEXT@
|
||||
INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
|
@ -372,6 +510,10 @@ LIBS = @LIBS@
|
|||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
|
||||
LOCALE_FR = @LOCALE_FR@
|
||||
LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@
|
||||
LOCALE_JA = @LOCALE_JA@
|
||||
LOCALE_ZH_CN = @LOCALE_ZH_CN@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
LTLIBINTL = @LTLIBINTL@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
|
@ -384,15 +526,21 @@ MYSQLCFLAGS = @MYSQLCFLAGS@
|
|||
MYSQLINCLUDE = @MYSQLINCLUDE@
|
||||
MYSQLLIBS = @MYSQLLIBS@
|
||||
NEED_SETGID = @NEED_SETGID@
|
||||
NETDB_H = @NETDB_H@
|
||||
NETINET_IN_H = @NETINET_IN_H@
|
||||
NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@
|
||||
NEXT_ERRNO_H = @NEXT_ERRNO_H@
|
||||
NEXT_FCNTL_H = @NEXT_FCNTL_H@
|
||||
NEXT_FLOAT_H = @NEXT_FLOAT_H@
|
||||
NEXT_MATH_H = @NEXT_MATH_H@
|
||||
NEXT_NETDB_H = @NEXT_NETDB_H@
|
||||
NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@
|
||||
NEXT_STDINT_H = @NEXT_STDINT_H@
|
||||
NEXT_STDIO_H = @NEXT_STDIO_H@
|
||||
NEXT_STDLIB_H = @NEXT_STDLIB_H@
|
||||
NEXT_STRING_H = @NEXT_STRING_H@
|
||||
NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@
|
||||
NEXT_TIME_H = @NEXT_TIME_H@
|
||||
NEXT_UNISTD_H = @NEXT_UNISTD_H@
|
||||
NEXT_WCHAR_H = @NEXT_WCHAR_H@
|
||||
NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
|
||||
|
@ -434,16 +582,23 @@ PKG_ARCH = @PKG_ARCH@
|
|||
PLUGIN_TEST = @PLUGIN_TEST@
|
||||
POSUB = @POSUB@
|
||||
POW_LIB = @POW_LIB@
|
||||
PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
|
||||
PST3CFLAGS = @PST3CFLAGS@
|
||||
PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
|
||||
PYTHON = @PYTHON@
|
||||
RADIUSLIBS = @RADIUSLIBS@
|
||||
RANLIB = @RANLIB@
|
||||
RELEASE = @RELEASE@
|
||||
RELEASE_PRESENT_FALSE = @RELEASE_PRESENT_FALSE@
|
||||
RELEASE_PRESENT_TRUE = @RELEASE_PRESENT_TRUE@
|
||||
REPLACE_BTOWC = @REPLACE_BTOWC@
|
||||
REPLACE_CEILF = @REPLACE_CEILF@
|
||||
REPLACE_CEILL = @REPLACE_CEILL@
|
||||
REPLACE_CHOWN = @REPLACE_CHOWN@
|
||||
REPLACE_CLOSE = @REPLACE_CLOSE@
|
||||
REPLACE_DPRINTF = @REPLACE_DPRINTF@
|
||||
REPLACE_FCHDIR = @REPLACE_FCHDIR@
|
||||
REPLACE_FCLOSE = @REPLACE_FCLOSE@
|
||||
REPLACE_FFLUSH = @REPLACE_FFLUSH@
|
||||
REPLACE_FLOORF = @REPLACE_FLOORF@
|
||||
REPLACE_FLOORL = @REPLACE_FLOORL@
|
||||
|
@ -459,12 +614,28 @@ REPLACE_FTELLO = @REPLACE_FTELLO@
|
|||
REPLACE_GETCWD = @REPLACE_GETCWD@
|
||||
REPLACE_GETLINE = @REPLACE_GETLINE@
|
||||
REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
|
||||
REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@
|
||||
REPLACE_ISFINITE = @REPLACE_ISFINITE@
|
||||
REPLACE_ISINF = @REPLACE_ISINF@
|
||||
REPLACE_ISNAN = @REPLACE_ISNAN@
|
||||
REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
|
||||
REPLACE_LCHOWN = @REPLACE_LCHOWN@
|
||||
REPLACE_LDEXPL = @REPLACE_LDEXPL@
|
||||
REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
|
||||
REPLACE_LSEEK = @REPLACE_LSEEK@
|
||||
REPLACE_MBRLEN = @REPLACE_MBRLEN@
|
||||
REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
|
||||
REPLACE_MBSINIT = @REPLACE_MBSINIT@
|
||||
REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
|
||||
REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
|
||||
REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
|
||||
REPLACE_MEMMEM = @REPLACE_MEMMEM@
|
||||
REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
|
||||
REPLACE_NAN = @REPLACE_NAN@
|
||||
REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
|
||||
REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@
|
||||
REPLACE_OPEN = @REPLACE_OPEN@
|
||||
REPLACE_PERROR = @REPLACE_PERROR@
|
||||
REPLACE_PRINTF = @REPLACE_PRINTF@
|
||||
REPLACE_PUTENV = @REPLACE_PUTENV@
|
||||
REPLACE_ROUND = @REPLACE_ROUND@
|
||||
|
@ -474,19 +645,32 @@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@
|
|||
REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@
|
||||
REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
|
||||
REPLACE_SPRINTF = @REPLACE_SPRINTF@
|
||||
REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
|
||||
REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
|
||||
REPLACE_STRDUP = @REPLACE_STRDUP@
|
||||
REPLACE_STRERROR = @REPLACE_STRERROR@
|
||||
REPLACE_STRPTIME = @REPLACE_STRPTIME@
|
||||
REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
|
||||
REPLACE_STRSTR = @REPLACE_STRSTR@
|
||||
REPLACE_STRTOD = @REPLACE_STRTOD@
|
||||
REPLACE_TIMEGM = @REPLACE_TIMEGM@
|
||||
REPLACE_TRUNCL = @REPLACE_TRUNCL@
|
||||
REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
|
||||
REPLACE_VDPRINTF = @REPLACE_VDPRINTF@
|
||||
REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
|
||||
REPLACE_VPRINTF = @REPLACE_VPRINTF@
|
||||
REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
|
||||
REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
|
||||
REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
|
||||
REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
|
||||
REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
|
||||
REPLACE_WCTOB = @REPLACE_WCTOB@
|
||||
REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
|
||||
REPLACE_WRITE = @REPLACE_WRITE@
|
||||
REV_DATESTAMP = @REV_DATESTAMP@
|
||||
REV_TIMESTAMP = @REV_TIMESTAMP@
|
||||
SCRIPT_TEST = @SCRIPT_TEST@
|
||||
SERVENT_LIB = @SERVENT_LIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SH = @SH@
|
||||
SHELL = @SHELL@
|
||||
|
@ -500,6 +684,11 @@ STDINT_H = @STDINT_H@
|
|||
STRIP = @STRIP@
|
||||
SUPPORT = @SUPPORT@
|
||||
SYS_SOCKET_H = @SYS_SOCKET_H@
|
||||
SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
|
||||
TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
|
||||
UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
|
||||
USE_LIBTAP_LOCAL_FALSE = @USE_LIBTAP_LOCAL_FALSE@
|
||||
USE_LIBTAP_LOCAL_TRUE = @USE_LIBTAP_LOCAL_TRUE@
|
||||
USE_NLS = @USE_NLS@
|
||||
USE_PARSE_INI_FALSE = @USE_PARSE_INI_FALSE@
|
||||
USE_PARSE_INI_TRUE = @USE_PARSE_INI_TRUE@
|
||||
|
@ -567,6 +756,8 @@ sharedstatedir = @sharedstatedir@
|
|||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
with_trusted_path = @with_trusted_path@
|
||||
@RELEASE_PRESENT_TRUE@NP_VERSION = $(PACKAGE_VERSION)
|
||||
AM_CFLAGS = -DNP_VERSION='"$(NP_VERSION)"'
|
||||
INCLUDES = -I.. -I$(top_srcdir)/lib -I$(top_srcdir)/gl -I$(top_srcdir)/intl -I$(top_srcdir)/plugins @SSLINCLUDE@
|
||||
EXTRA_DIST = pst3.c
|
||||
BASEOBJS = ../plugins/utils.o ../lib/libnagiosplug.a ../gl/libgnu.a
|
||||
|
@ -598,7 +789,6 @@ check_icmp_LDADD = @LTLIBINTL@ $(NETLIBS) $(SOCKETLIBS)
|
|||
# -m64 needed at compiler and linker phase
|
||||
pst3_CFLAGS = @PST3CFLAGS@
|
||||
pst3_LDFLAGS = @PST3CFLAGS@
|
||||
pst3_LDADD = -lkvm
|
||||
check_dhcp_DEPENDENCIES = check_dhcp.c $(NETOBJS) $(DEPLIBS)
|
||||
check_icmp_DEPENDENCIES = check_icmp.c $(NETOBJS)
|
||||
all: all-am
|
||||
|
@ -885,7 +1075,7 @@ maintainer-clean-generic:
|
|||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
|
||||
clean-am: clean-generic clean-libtool clean-local clean-noinstPROGRAMS \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
|
@ -935,8 +1125,8 @@ ps-am:
|
|||
uninstall-am: uninstall-info-am
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
|
||||
clean-generic clean-libtool clean-noinstPROGRAMS ctags \
|
||||
distclean distclean-compile distclean-generic \
|
||||
clean-generic clean-libtool clean-local clean-noinstPROGRAMS \
|
||||
ctags distclean distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-exec install-exec-am \
|
||||
|
@ -947,6 +1137,10 @@ uninstall-am: uninstall-info-am
|
|||
pdf pdf-am ps ps-am tags uninstall uninstall-am \
|
||||
uninstall-info-am
|
||||
|
||||
@RELEASE_PRESENT_FALSE@NP-VERSION-FILE: .FORCE-NP-VERSION-FILE
|
||||
@RELEASE_PRESENT_FALSE@ @$(SHELL_PATH) $(top_srcdir)/NP-VERSION-GEN
|
||||
@RELEASE_PRESENT_FALSE@.FORCE-NP-VERSION-FILE:
|
||||
@RELEASE_PRESENT_FALSE@-include NP-VERSION-FILE
|
||||
|
||||
test:
|
||||
perl -I $(top_builddir) -I $(top_srcdir) ../test.pl
|
||||
|
@ -969,6 +1163,9 @@ install-exec-local: $(noinst_PROGRAMS)
|
|||
echo "WARNING: insufficient access; not installing setuid plugins"; \
|
||||
echo "NOTE: to install setuid plugins, run 'make install-root' as root"; \
|
||||
fi
|
||||
|
||||
clean-local:
|
||||
rm -f NP-VERSION-FILE
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
* Copyright (c) 2001-2004 Ethan Galstad (nagios@nagios.org)
|
||||
* Copyright (c) 2001-2007 Nagios Plugin Development Team
|
||||
*
|
||||
* Last Modified: $Date: 2008-05-07 11:02:42 +0100 (Wed, 07 May 2008) $
|
||||
*
|
||||
* Description:
|
||||
*
|
||||
* This file contains the check_dhcp plugin
|
||||
|
@ -32,12 +30,10 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* $Id: check_dhcp.c 1991 2008-05-07 10:02:42Z dermoth $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
const char *progname = "check_dhcp";
|
||||
const char *revision = "$Revision: 1991 $";
|
||||
const char *copyright = "2001-2007";
|
||||
const char *email = "nagiosplug-devel@lists.sourceforge.net";
|
||||
|
||||
|
@ -79,8 +75,8 @@ const char *email = "nagiosplug-devel@lists.sourceforge.net";
|
|||
|
||||
#elif defined(__sun__) || defined(__solaris__) || defined(__hpux__)
|
||||
|
||||
#define INSAP 22
|
||||
#define OUTSAP 24
|
||||
#define INSAP 22
|
||||
#define OUTSAP 24
|
||||
|
||||
#include <signal.h>
|
||||
#include <ctype.h>
|
||||
|
@ -90,17 +86,17 @@ const char *email = "nagiosplug-devel@lists.sourceforge.net";
|
|||
|
||||
#define bcopy(source, destination, length) memcpy(destination, source, length)
|
||||
|
||||
#define AREA_SZ 5000 /* buffer length in bytes */
|
||||
#define AREA_SZ 5000 /* buffer length in bytes */
|
||||
static u_long ctl_area[AREA_SZ];
|
||||
static u_long dat_area[AREA_SZ];
|
||||
static struct strbuf ctl = {AREA_SZ, 0, (char *)ctl_area};
|
||||
static struct strbuf dat = {AREA_SZ, 0, (char *)dat_area};
|
||||
|
||||
#define GOT_CTRL 1
|
||||
#define GOT_DATA 2
|
||||
#define GOT_BOTH 3
|
||||
#define GOT_INTR 4
|
||||
#define GOT_ERR 128
|
||||
#define GOT_CTRL 1
|
||||
#define GOT_DATA 2
|
||||
#define GOT_BOTH 3
|
||||
#define GOT_INTR 4
|
||||
#define GOT_ERR 128
|
||||
|
||||
#define u_int8_t uint8_t
|
||||
#define u_int16_t uint16_t
|
||||
|
@ -195,7 +191,6 @@ typedef struct requested_server_struct{
|
|||
#define DHCP_INFINITE_TIME 0xFFFFFFFF
|
||||
|
||||
#define DHCP_BROADCAST_FLAG 32768
|
||||
#define DHCP_UNICAST_FLAG 0
|
||||
|
||||
#define DHCP_SERVER_PORT 67
|
||||
#define DHCP_CLIENT_PORT 68
|
||||
|
@ -223,7 +218,7 @@ dhcp_offer *dhcp_offer_list=NULL;
|
|||
requested_server *requested_server_list=NULL;
|
||||
|
||||
int valid_responses=0; /* number of valid DHCPOFFERs we received */
|
||||
int requested_servers=0;
|
||||
int requested_servers=0;
|
||||
int requested_responses=0;
|
||||
|
||||
int request_specific_address=FALSE;
|
||||
|
@ -383,7 +378,7 @@ int get_hardware_address(int sock,char *interface_name){
|
|||
unit = atoi(p) ;
|
||||
*p = '\0' ;
|
||||
strncat(dev, interface_name, 6) ;
|
||||
}
|
||||
}
|
||||
else{
|
||||
printf(_("Error: can't find unit number in interface_name (%s) - expecting TypeNumber eg lnc0.\n"), interface_name);
|
||||
exit(STATE_UNKNOWN);
|
||||
|
@ -536,7 +531,7 @@ int send_dhcp_discover(int sock){
|
|||
/* send the DHCPDISCOVER packet out */
|
||||
send_dhcp_packet(&discover_packet,sizeof(discover_packet),sock,&sockaddr_broadcast);
|
||||
|
||||
if(verbose)
|
||||
if(verbose)
|
||||
printf("\n\n");
|
||||
|
||||
return OK;
|
||||
|
@ -565,7 +560,7 @@ int get_dhcp_offer(int sock){
|
|||
if((current_time-start_time)>=dhcpoffer_timeout)
|
||||
break;
|
||||
|
||||
if(verbose)
|
||||
if(verbose)
|
||||
printf("\n\n");
|
||||
|
||||
bzero(&source,sizeof(source));
|
||||
|
@ -582,7 +577,7 @@ int get_dhcp_offer(int sock){
|
|||
continue;
|
||||
}
|
||||
else{
|
||||
if(verbose)
|
||||
if(verbose)
|
||||
printf(_("Result=OK\n"));
|
||||
|
||||
responses++;
|
||||
|
@ -627,7 +622,7 @@ int get_dhcp_offer(int sock){
|
|||
printf("\n");
|
||||
|
||||
if(result==ERROR){
|
||||
if(verbose)
|
||||
if(verbose)
|
||||
printf(_("DHCPOFFER hardware address did not match our own - ignoring packet\n"));
|
||||
|
||||
continue;
|
||||
|
@ -661,7 +656,7 @@ int send_dhcp_packet(void *buffer, int buffer_size, int sock, struct sockaddr_in
|
|||
|
||||
result=sendto(sock,(char *)buffer,buffer_size,0,(struct sockaddr *)dest,sizeof(*dest));
|
||||
|
||||
if(verbose)
|
||||
if(verbose)
|
||||
printf(_("send_dhcp_packet result: %d\n"),result);
|
||||
|
||||
if(result<0)
|
||||
|
@ -767,7 +762,7 @@ int create_dhcp_socket(void){
|
|||
}
|
||||
|
||||
/* set the broadcast option - we need this to listen to DHCP broadcast messages */
|
||||
if(setsockopt(sock,SOL_SOCKET,SO_BROADCAST,(char *)&flag,sizeof flag)<0){
|
||||
if(!unicast && setsockopt(sock,SOL_SOCKET,SO_BROADCAST,(char *)&flag,sizeof flag)<0){
|
||||
printf(_("Error: Could not set broadcast option on DHCP socket!\n"));
|
||||
exit(STATE_UNKNOWN);
|
||||
}
|
||||
|
@ -854,7 +849,7 @@ int add_dhcp_offer(struct in_addr source,dhcp_packet *offer_packet){
|
|||
/* get option length */
|
||||
option_length=offer_packet->options[x++];
|
||||
|
||||
if(verbose)
|
||||
if(verbose)
|
||||
printf("Option: %d (0x%02X)\n",option_type,option_length);
|
||||
|
||||
/* get option data */
|
||||
|
@ -990,7 +985,7 @@ int get_results(void){
|
|||
if(verbose){
|
||||
printf(_("DHCP Server Match: Offerer=%s"),inet_ntoa(temp_offer->server_address));
|
||||
printf(_(" Requested=%s"),inet_ntoa(temp_server->server_address));
|
||||
if(temp_server->answered)
|
||||
if(temp_server->answered)
|
||||
printf(_(" (duplicate)"));
|
||||
printf(_("\n"));
|
||||
}
|
||||
|
@ -1091,7 +1086,7 @@ int call_getopt(int argc, char **argv){
|
|||
|
||||
int option_index = 0;
|
||||
static struct option long_options[] =
|
||||
{
|
||||
{
|
||||
{"serverip", required_argument,0,'s'},
|
||||
{"requestedip", required_argument,0,'r'},
|
||||
{"timeout", required_argument,0,'t'},
|
||||
|
@ -1169,7 +1164,7 @@ int call_getopt(int argc, char **argv){
|
|||
break;
|
||||
|
||||
case 'V': /* version */
|
||||
print_revision(progname,revision);
|
||||
print_revision(progname, NP_VERSION);
|
||||
exit(STATE_OK);
|
||||
|
||||
case 'h': /* help */
|
||||
|
@ -1307,7 +1302,7 @@ static int dl_bind(int fd, int sap, u_char *addr){
|
|||
|
||||
/***********************************************************************
|
||||
* interface:
|
||||
* function mac_addr_dlpi - get the mac address of the interface with
|
||||
* function mac_addr_dlpi - get the mac address of the interface with
|
||||
* type dev (eg lnc, hme) and unit (0, 1 ..)
|
||||
*
|
||||
* parameter: addr: an array of six bytes, has to be allocated by the caller
|
||||
|
@ -1386,7 +1381,7 @@ void print_hardware_address(const unsigned char *address){
|
|||
/* print usage help */
|
||||
void print_help(void){
|
||||
|
||||
print_revision(progname,revision);
|
||||
print_revision(progname, NP_VERSION);
|
||||
|
||||
printf("Copyright (c) 2001-2004 Ethan Galstad (nagios@nagios.org)\n");
|
||||
printf (COPYRIGHT, copyright, email);
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
* Copyright (c) 2005-2008 Nagios Plugins Development Team
|
||||
* Original Author : Andreas Ericsson <ae@op5.se>
|
||||
*
|
||||
* Last Modified: $Date: 2008-05-07 11:02:42 +0100 (Wed, 07 May 2008) $
|
||||
*
|
||||
* Description:
|
||||
*
|
||||
* This file contains the check_icmp plugin
|
||||
|
@ -35,14 +33,12 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* $Id: check_icmp.c 1991 2008-05-07 10:02:42Z dermoth $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
/* progname may change */
|
||||
/* char *progname = "check_icmp"; */
|
||||
char *progname;
|
||||
const char *revision = "$Revision: 1991 $";
|
||||
const char *copyright = "2005-2008";
|
||||
const char *email = "nagiosplug-devel@lists.sourceforge.net";
|
||||
|
||||
|
@ -74,6 +70,7 @@ const char *email = "nagiosplug-devel@lists.sourceforge.net";
|
|||
#include <netinet/ip_icmp.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <signal.h>
|
||||
#include <float.h>
|
||||
|
||||
|
||||
/** sometimes undefined system macros (quite a few, actually) **/
|
||||
|
@ -106,6 +103,9 @@ const char *email = "nagiosplug-devel@lists.sourceforge.net";
|
|||
# define ICMP_UNREACH_PRECEDENCE_CUTOFF 15
|
||||
#endif
|
||||
|
||||
#ifndef DBL_MAX
|
||||
# define DBL_MAX 9.9999999999e999
|
||||
#endif
|
||||
|
||||
typedef unsigned short range_t; /* type for get_range() -- unimplemented */
|
||||
|
||||
|
@ -120,6 +120,8 @@ typedef struct rta_host {
|
|||
unsigned char icmp_type, icmp_code; /* type and code from errors */
|
||||
unsigned short flags; /* control/status flags */
|
||||
double rta; /* measured RTA */
|
||||
double rtmax; /* max rtt */
|
||||
double rtmin; /* min rtt */
|
||||
unsigned char pl; /* measured packet loss */
|
||||
struct rta_host *next; /* linked list */
|
||||
} rta_host;
|
||||
|
@ -182,14 +184,14 @@ static u_int get_timevar(const char *);
|
|||
static u_int get_timevaldiff(struct timeval *, struct timeval *);
|
||||
static in_addr_t get_ip_address(const char *);
|
||||
static int wait_for_reply(int, u_int);
|
||||
static int recvfrom_wto(int, char *, unsigned int, struct sockaddr *, u_int *);
|
||||
static int recvfrom_wto(int, void *, unsigned int, struct sockaddr *, u_int *);
|
||||
static int send_icmp_ping(int, struct rta_host *);
|
||||
static int get_threshold(char *str, threshold *th);
|
||||
static void run_checks(void);
|
||||
static void set_source_ip(char *);
|
||||
static int add_target(char *);
|
||||
static int add_target_ip(char *, struct in_addr *);
|
||||
static int handle_random_icmp(char *, struct sockaddr_in *);
|
||||
static int handle_random_icmp(unsigned char *, struct sockaddr_in *);
|
||||
static unsigned short icmp_checksum(unsigned short *, int);
|
||||
static void finish(int);
|
||||
static void crash(const char *, ...);
|
||||
|
@ -203,7 +205,9 @@ extern char **environ;
|
|||
static struct rta_host **table, *cursor, *list;
|
||||
static threshold crit = {80, 500000}, warn = {40, 200000};
|
||||
static int mode, protocols, sockets, debug = 0, timeout = 10;
|
||||
static unsigned short icmp_pkt_size, icmp_data_size = DEFAULT_PING_DATA_SIZE;
|
||||
static unsigned short icmp_data_size = DEFAULT_PING_DATA_SIZE;
|
||||
static unsigned short icmp_pkt_size = DEFAULT_PING_DATA_SIZE + ICMP_MINLEN;
|
||||
|
||||
static unsigned int icmp_sent = 0, icmp_recv = 0, icmp_lost = 0;
|
||||
#define icmp_pkts_en_route (icmp_sent - (icmp_recv + icmp_lost))
|
||||
static unsigned short targets_down = 0, targets = 0, packets = 0;
|
||||
|
@ -296,7 +300,7 @@ get_icmp_error_msg(unsigned char icmp_type, unsigned char icmp_code)
|
|||
}
|
||||
|
||||
static int
|
||||
handle_random_icmp(char *packet, struct sockaddr_in *addr)
|
||||
handle_random_icmp(unsigned char *packet, struct sockaddr_in *addr)
|
||||
{
|
||||
struct icmp p, sent_icmp;
|
||||
struct rta_host *host = NULL;
|
||||
|
@ -453,12 +457,22 @@ main(int argc, char **argv)
|
|||
/* parse the arguments */
|
||||
for(i = 1; i < argc; i++) {
|
||||
while((arg = getopt(argc, argv, "vhVw:c:n:p:t:H:s:i:b:I:l:m:")) != EOF) {
|
||||
long size;
|
||||
switch(arg) {
|
||||
case 'v':
|
||||
debug++;
|
||||
break;
|
||||
case 'b':
|
||||
/* silently ignored for now */
|
||||
size = strtol(optarg,NULL,0);
|
||||
if (size >= (sizeof(struct icmp) + sizeof(struct icmp_ping_data)) &&
|
||||
size < MAX_PING_DATA) {
|
||||
icmp_data_size = size;
|
||||
icmp_pkt_size = size + ICMP_MINLEN;
|
||||
} else
|
||||
usage_va("ICMP data length must be between: %d and %d",
|
||||
sizeof(struct icmp) + sizeof(struct icmp_ping_data),
|
||||
MAX_PING_DATA - 1);
|
||||
|
||||
break;
|
||||
case 'i':
|
||||
pkt_interval = get_timevar(optarg);
|
||||
|
@ -499,7 +513,7 @@ main(int argc, char **argv)
|
|||
set_source_ip(optarg);
|
||||
break;
|
||||
case 'V': /* version */
|
||||
/*print_revision (progname, revision);*/ /* FIXME: Why? */
|
||||
print_revision (progname, NP_VERSION);
|
||||
exit (STATE_OK);
|
||||
case 'h': /* help */
|
||||
print_help ();
|
||||
|
@ -587,13 +601,6 @@ main(int argc, char **argv)
|
|||
}
|
||||
}
|
||||
|
||||
icmp_pkt_size = icmp_data_size + ICMP_MINLEN;
|
||||
if(debug > 2) printf("icmp_pkt_size = %u\n", icmp_pkt_size);
|
||||
if(icmp_pkt_size < sizeof(struct icmp) + sizeof(struct icmp_ping_data)) {
|
||||
icmp_pkt_size = sizeof(struct icmp) + sizeof(struct icmp_ping_data);
|
||||
}
|
||||
if(debug > 2) printf("icmp_pkt_size = %u\n", icmp_pkt_size);
|
||||
|
||||
if(debug) {
|
||||
printf("crit = {%u, %u%%}, warn = {%u, %u%%}\n",
|
||||
crit.rta, crit.pl, warn.rta, warn.pl);
|
||||
|
@ -687,7 +694,7 @@ static int
|
|||
wait_for_reply(int sock, u_int t)
|
||||
{
|
||||
int n, hlen;
|
||||
static char buf[4096];
|
||||
static unsigned char buf[4096];
|
||||
struct sockaddr_in resp_addr;
|
||||
struct ip *ip;
|
||||
struct icmp icp;
|
||||
|
@ -777,11 +784,15 @@ wait_for_reply(int sock, u_int t)
|
|||
host->time_waited += tdiff;
|
||||
host->icmp_recv++;
|
||||
icmp_recv++;
|
||||
if (tdiff > host->rtmax)
|
||||
host->rtmax = tdiff;
|
||||
if (tdiff < host->rtmin)
|
||||
host->rtmin = tdiff;
|
||||
|
||||
if(debug) {
|
||||
printf("%0.3f ms rtt from %s, outgoing ttl: %u, incoming ttl: %u\n",
|
||||
printf("%0.3f ms rtt from %s, outgoing ttl: %u, incoming ttl: %u, max: %0.3f, min: %0.3f\n",
|
||||
(float)tdiff / 1000, inet_ntoa(resp_addr.sin_addr),
|
||||
ttl, ip->ip_ttl);
|
||||
ttl, ip->ip_ttl, (float)host->rtmax / 1000, (float)host->rtmin / 1000);
|
||||
}
|
||||
|
||||
/* if we're in hostcheck mode, exit with limited printouts */
|
||||
|
@ -803,7 +814,7 @@ static int
|
|||
send_icmp_ping(int sock, struct rta_host *host)
|
||||
{
|
||||
static union {
|
||||
char *buf; /* re-use so we prevent leaks */
|
||||
void *buf; /* re-use so we prevent leaks */
|
||||
struct icmp *icp;
|
||||
u_short *cksum_in;
|
||||
} packet = { NULL };
|
||||
|
@ -856,7 +867,7 @@ send_icmp_ping(int sock, struct rta_host *host)
|
|||
}
|
||||
|
||||
static int
|
||||
recvfrom_wto(int sock, char *buf, unsigned int len, struct sockaddr *saddr,
|
||||
recvfrom_wto(int sock, void *buf, unsigned int len, struct sockaddr *saddr,
|
||||
u_int *timo)
|
||||
{
|
||||
u_int slen;
|
||||
|
@ -988,11 +999,12 @@ finish(int sig)
|
|||
host = list;
|
||||
while(host) {
|
||||
if(debug) puts("");
|
||||
printf("%srta=%0.3fms;%0.3f;%0.3f;0; %spl=%u%%;%u;%u;; ",
|
||||
printf("%srta=%0.3fms;%0.3f;%0.3f;0; %spl=%u%%;%u;%u;; %srtmax=%0.3fms;;;; %srtmin=%0.3fms;;;; ",
|
||||
(targets > 1) ? host->name : "",
|
||||
host->rta / 1000, (float)warn.rta / 1000, (float)crit.rta / 1000,
|
||||
(targets > 1) ? host->name : "",
|
||||
host->pl, warn.pl, crit.pl);
|
||||
(targets > 1) ? host->name : "", host->pl, warn.pl, crit.pl,
|
||||
(targets > 1) ? host->name : "", (float)host->rtmax / 1000,
|
||||
(targets > 1) ? host->name : "", (host->rtmin < DBL_MAX) ? (float)host->rtmin / 1000 : (float)0);
|
||||
|
||||
host = host->next;
|
||||
}
|
||||
|
@ -1023,7 +1035,7 @@ get_timevaldiff(struct timeval *early, struct timeval *later)
|
|||
if(!early) early = &prog_start;
|
||||
|
||||
/* if early > later we return 0 so as to indicate a timeout */
|
||||
if(early->tv_sec > early->tv_sec ||
|
||||
if(early->tv_sec > later->tv_sec ||
|
||||
(early->tv_sec == later->tv_sec && early->tv_usec > later->tv_usec))
|
||||
{
|
||||
return 0;
|
||||
|
@ -1069,6 +1081,8 @@ add_target_ip(char *arg, struct in_addr *in)
|
|||
host->saddr_in.sin_family = AF_INET;
|
||||
host->saddr_in.sin_addr.s_addr = in->s_addr;
|
||||
|
||||
host->rtmin = DBL_MAX;
|
||||
|
||||
if(!list) list = cursor = host;
|
||||
else cursor->next = host;
|
||||
|
||||
|
@ -1255,7 +1269,7 @@ void
|
|||
print_help(void)
|
||||
{
|
||||
|
||||
/*print_revision (progname, revision);*/ /* FIXME: Why? */
|
||||
/*print_revision (progname);*/ /* FIXME: Why? */
|
||||
|
||||
printf ("Copyright (c) 2005 Andreas Ericsson <ae@op5.se>\n");
|
||||
printf (COPYRIGHT, copyright, email);
|
||||
|
@ -1271,10 +1285,10 @@ print_help(void)
|
|||
printf (" %s\n", _("specify a target"));
|
||||
printf (" %s\n", "-w");
|
||||
printf (" %s", _("warning threshold (currently "));
|
||||
printf ("%0.3fms,%u%%)\n", (float)warn.rta / 1000 , warn.pl / 1000);
|
||||
printf ("%0.3fms,%u%%)\n", (float)warn.rta / 1000, warn.pl);
|
||||
printf (" %s\n", "-c");
|
||||
printf (" %s", _("critical threshold (currently "));
|
||||
printf ("%0.3fms,%u%%)\n", (float)crit.rta, crit.pl);
|
||||
printf ("%0.3fms,%u%%)\n", (float)crit.rta / 1000, crit.pl);
|
||||
printf (" %s\n", "-s");
|
||||
printf (" %s\n", _("specify a source IP address or device name"));
|
||||
printf (" %s\n", "-n");
|
||||
|
@ -1291,12 +1305,13 @@ print_help(void)
|
|||
printf ("\n");
|
||||
printf (" %s\n", "-l");
|
||||
printf (" %s", _("TTL on outgoing packets (currently "));
|
||||
printf ("%u)", ttl);
|
||||
printf ("%u)\n", ttl);
|
||||
printf (" %s\n", "-t");
|
||||
printf (" %s",_("timeout value (seconds, currently "));
|
||||
printf ("%u)\n", timeout);
|
||||
printf (" %s\n", "-b");
|
||||
printf (" %s\n", _("icmp packet size (currenly ignored)"));
|
||||
printf (" %s\n", _("Number of icmp data bytes to send"));
|
||||
printf (" %s %u + %d)\n", _("Packet size will be data bytes + icmp header (currently"),icmp_data_size, ICMP_MINLEN);
|
||||
printf (" %s\n", "-v");
|
||||
printf (" %s\n", _("verbose"));
|
||||
|
||||
|
|
|
@ -1,253 +1,257 @@
|
|||
/* pst3.c
|
||||
/*****************************************************************************
|
||||
*
|
||||
* pst3
|
||||
*
|
||||
* License: GPL
|
||||
* Copyright (c) 2008 Nagios Plugin Development Team
|
||||
*
|
||||
* Description:
|
||||
*
|
||||
* This file contains the pst3 executable. This is a replacement ps command
|
||||
* for Solaris to get output which provides a long argument listing, which
|
||||
* is not possible with the standard ps command (due to truncation). /usr/ucb/ps
|
||||
* also has issues where some fields run into each other.
|
||||
*
|
||||
* This executable works by reading process address structures, so needs
|
||||
* to be executed as root
|
||||
*
|
||||
* Third version to get process arg info; this time by using
|
||||
* a combination of reading the /proc/<pid>/psinfo structures
|
||||
* and reading the complete arg vector from kernel memory structures.
|
||||
* Originally written by R.W.Ingraham
|
||||
* Rewritten by Duncan Ferguson (Altinity Ltd, June 2008)
|
||||
* The rewrite was necessary as /dev/kmem is not available within
|
||||
* non-global zones on Solaris 10
|
||||
*
|
||||
* Developed and tested under Solaris 5.8 (both 32 and 64 bit modes).
|
||||
*
|
||||
* NOTE: This program must be setuid-root (or run by root) to work!
|
||||
*
|
||||
* Written: 2005-04-28 R.W.Ingraham
|
||||
*/
|
||||
* Details for rewrite came from
|
||||
* source of /usr/ucb/ps on Solaris:
|
||||
* http://cvs.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/ucbcmd/ps/ps.c#argvoff
|
||||
* usenet group posting
|
||||
* http://groups.google.com/group/comp.unix.solaris/tree/browse_frm/month/2001-09/bfa40c08bac819a2?rnum=141&_done=%2Fgroup%2Fcomp.unix.solaris%2Fbrowse_frm%2Fmonth%2F2001-09%3F
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
#define _KMEMUSER 1
|
||||
|
||||
#include <kvm.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <procfs.h>
|
||||
#include <fcntl.h>
|
||||
#include <dirent.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <procfs.h>
|
||||
#include <errno.h>
|
||||
#include <sys/types32.h>
|
||||
|
||||
/*
|
||||
* Constants
|
||||
* Constants
|
||||
*/
|
||||
|
||||
#define PROC_DIR "/proc"
|
||||
#define MAX_PATH 1024
|
||||
|
||||
#define PROC_DIR "/proc"
|
||||
#define ARGS 30
|
||||
|
||||
/*
|
||||
* Structures
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Globals
|
||||
* Globals
|
||||
*/
|
||||
|
||||
static char * szProg;
|
||||
static kvm_t * kd;
|
||||
static struct proc * pProc;
|
||||
static struct user * pUser;
|
||||
static char ** myArgv;
|
||||
|
||||
|
||||
/*
|
||||
* Prototypes
|
||||
* Prototypes
|
||||
*/
|
||||
|
||||
static int HandleFile (struct dirent *pDent);
|
||||
static int HandlePsInfo (char *szPath, psinfo_t *pPsInfo);
|
||||
static int GetArgVectors (pid_t pid);
|
||||
static void ShowArgVectors (void);
|
||||
static void ReleaseArgVectors();
|
||||
|
||||
void usage();
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
int main (int argc, char **argv)
|
||||
{
|
||||
DIR *pDir;
|
||||
struct dirent *pDent;
|
||||
int retcode = 0;
|
||||
DIR *procdir;
|
||||
struct dirent *proc;
|
||||
char ps_name[ARGS];
|
||||
char as_name[ARGS];
|
||||
psinfo_t psinfo;
|
||||
|
||||
/* Set our program name global */
|
||||
if ((szProg = strrchr(argv[0], '/')) != NULL)
|
||||
szProg++;
|
||||
else
|
||||
szProg = argv[0];
|
||||
|
||||
/* Set our program name global */
|
||||
if ((szProg = strrchr(argv[0], '/')) != NULL)
|
||||
szProg++;
|
||||
else
|
||||
szProg = argv[0];
|
||||
/* if given any parameters, print out help */
|
||||
if(argc > 1) {
|
||||
(void)usage();
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* Make sure that our euid is root */
|
||||
if (geteuid() != 0)
|
||||
{
|
||||
fprintf(stderr, "%s: This program can only be run by the root user!\n", szProg);
|
||||
exit(1);
|
||||
}
|
||||
/* Make sure that our euid is root */
|
||||
if (geteuid() != 0)
|
||||
{
|
||||
fprintf(stderr, "%s: This program can only be run by the root user!\n", szProg);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* Get a handle to the running kernel image */
|
||||
if ((kd = kvm_open(NULL, NULL, NULL, O_RDONLY, argv[0])) == NULL)
|
||||
{
|
||||
fprintf(stderr, "%s: Failed to open kernel memory: %s\n", szProg, strerror(errno));
|
||||
exit(2);
|
||||
}
|
||||
if ((procdir = opendir(PROC_DIR)) == NULL) {
|
||||
fprintf(stderr, "%s: cannot open PROC directory %s\n", szProg, PROC_DIR);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* Open the /proc directory */
|
||||
if ((pDir = opendir(PROC_DIR)) != NULL)
|
||||
{
|
||||
/* Display column headings */
|
||||
printf("S UID PID PPID VSZ RSS %%CPU COMMAND ARGS\n");
|
||||
/* Display column headings */
|
||||
printf("%c %5s %5s %5s %6s %6s %4s %s %s\n",
|
||||
'S',
|
||||
"UID",
|
||||
"PID",
|
||||
"PPID",
|
||||
"VSZ",
|
||||
"RSS",
|
||||
"%CPU",
|
||||
"COMMAND",
|
||||
"ARGS"
|
||||
);
|
||||
|
||||
/* Zip through all of the process entries */
|
||||
while ((pDent = readdir(pDir)) != NULL)
|
||||
{
|
||||
/* Handle each pid sub-directory */
|
||||
HandleFile(pDent);
|
||||
}
|
||||
/* Zip through all of the process entries */
|
||||
while((proc = readdir(procdir))) {
|
||||
int ps_fd;
|
||||
int as_fd;
|
||||
off_t argoff;
|
||||
int i;
|
||||
char *args;
|
||||
char *procname;
|
||||
char *ptr;
|
||||
int argslen;
|
||||
uintptr_t args_addr;;
|
||||
uintptr_t *args_vecs;;
|
||||
int args_count;
|
||||
|
||||
/* Close the directory */
|
||||
closedir(pDir);
|
||||
}
|
||||
else /* ERROR: Failure to open PROC_DIR */
|
||||
{
|
||||
fprintf(stderr, "%s: Failed to open \"%s\": %s\n", szProg, PROC_DIR, strerror(errno));
|
||||
retcode = 3;
|
||||
}
|
||||
if(proc->d_name[0] == '.')
|
||||
continue;
|
||||
|
||||
/* Close the handle to the running kernel image */
|
||||
kvm_close(kd);
|
||||
sprintf(ps_name,"%s/%s/%s",PROC_DIR,proc->d_name,"psinfo");
|
||||
sprintf(as_name,"%s/%s/%s",PROC_DIR,proc->d_name,"as");
|
||||
try_again:
|
||||
if((ps_fd = open(ps_name, O_RDONLY)) == -1)
|
||||
continue;
|
||||
|
||||
return retcode;
|
||||
if((as_fd = open(as_name, O_RDONLY)) == -1)
|
||||
continue;
|
||||
|
||||
if(read(ps_fd, &psinfo, sizeof(psinfo)) != sizeof(psinfo)) {
|
||||
int err = errno;
|
||||
close(ps_fd);
|
||||
close(as_fd);
|
||||
if(err == EAGAIN) goto try_again;
|
||||
if(err != ENOENT)
|
||||
fprintf(stderr, "%s: read() on %s: %s\n", szProg,
|
||||
ps_name, strerror(err));
|
||||
continue;
|
||||
}
|
||||
close(ps_fd);
|
||||
|
||||
/* system process, ignore since the previous version did */
|
||||
if(
|
||||
psinfo.pr_nlwp == 0 ||
|
||||
strcmp(psinfo.pr_lwp.pr_clname, "SYS") == 0
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* get the procname to match previous versions */
|
||||
procname = strdup(psinfo.pr_psargs);
|
||||
if((ptr = strchr(procname, ' ')) != NULL)
|
||||
*ptr = '\0';
|
||||
if((ptr = strrchr(procname, '/')) != NULL)
|
||||
ptr++;
|
||||
else
|
||||
ptr = procname;
|
||||
|
||||
/*
|
||||
* print out what we currently know
|
||||
*/
|
||||
printf("%c %5d %5d %5d %6lu %6lu %4.1f %s ",
|
||||
psinfo.pr_lwp.pr_sname,
|
||||
psinfo.pr_euid,
|
||||
psinfo.pr_pid,
|
||||
psinfo.pr_ppid,
|
||||
psinfo.pr_size,
|
||||
psinfo.pr_rssize,
|
||||
((float)(psinfo.pr_pctcpu) / 0x8000 * 100.0),
|
||||
ptr
|
||||
);
|
||||
free(procname);
|
||||
|
||||
/*
|
||||
* and now for the command line stuff
|
||||
*/
|
||||
|
||||
args_addr = psinfo.pr_argv;
|
||||
args_count = psinfo.pr_argc;
|
||||
args_vecs = malloc(args_count * sizeof(uintptr_t));
|
||||
|
||||
if(psinfo.pr_dmodel == PR_MODEL_NATIVE) {
|
||||
/* this process matches target process */
|
||||
pread(as_fd,args_vecs, args_count * sizeof(uintptr_t),
|
||||
args_addr);
|
||||
} else {
|
||||
/* this process is 64bit, target process is 32 bit*/
|
||||
caddr32_t *args_vecs32 = (caddr32_t *)args_vecs;
|
||||
pread(as_fd,args_vecs32,args_count * sizeof(caddr32_t),
|
||||
args_addr);
|
||||
for (i=args_count-1;i>=0;--i)
|
||||
args_vecs[i]=args_vecs32[i];
|
||||
}
|
||||
|
||||
/*
|
||||
* now read in the args - if what we read in fills buffer
|
||||
* resize buffer and reread that bit again
|
||||
*/
|
||||
argslen=ARGS;
|
||||
args=malloc(argslen+1);
|
||||
for(i=0;i<args_count;i++) {
|
||||
memset(args,'\0',argslen+1);
|
||||
if(pread(as_fd, args, argslen, args_vecs[i]) <= 0) {
|
||||
break;
|
||||
}
|
||||
args[argslen]='\0';
|
||||
if(strlen(args) == argslen){
|
||||
argslen += ARGS;
|
||||
args = realloc(args, argslen + 1);
|
||||
i--;
|
||||
continue;
|
||||
}
|
||||
printf(" %s", args);
|
||||
}
|
||||
free(args_vecs);
|
||||
free(args);
|
||||
close(as_fd);
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
static int HandleFile (struct dirent *pDent)
|
||||
{
|
||||
char szPath[MAX_PATH];
|
||||
psinfo_t sPsInfo;
|
||||
int fd, len;
|
||||
int rc = 0;
|
||||
|
||||
/* Skip files beginning with a "." */
|
||||
if (pDent->d_name[0] == '.')
|
||||
return 0;
|
||||
|
||||
/* Cosntruct the path to the psinfo file */
|
||||
len = sprintf(szPath, "%s/%s/psinfo", PROC_DIR, pDent->d_name);
|
||||
|
||||
/* Open the psinfo file for this pid and print out its arg vectors */
|
||||
if ((fd = open(szPath, O_RDONLY)) >= 0)
|
||||
{
|
||||
/* Read the psinfo struct */
|
||||
if ((len = read(fd, &sPsInfo, sizeof(sPsInfo))) != sizeof(sPsInfo))
|
||||
{
|
||||
rc = errno;
|
||||
fprintf(stderr, "%s: Read error of psinfo structure (%d)\n", szPath, len);
|
||||
return rc;
|
||||
}
|
||||
|
||||
/* Close the psinfo file */
|
||||
close(fd);
|
||||
|
||||
/* Pass psinfo struct to reporting function */
|
||||
HandlePsInfo(szPath, &sPsInfo);
|
||||
}
|
||||
else if (errno != ENOENT)
|
||||
{
|
||||
rc = errno;
|
||||
fprintf(stderr, "%s: %s\n", szPath, strerror(errno));
|
||||
}
|
||||
|
||||
return 0;
|
||||
void usage() {
|
||||
printf("%s: Help output\n\n", szProg);
|
||||
printf("If this program is given any arguments, this help is displayed.\n");
|
||||
printf("This command is used to print out the full command line for all\n");
|
||||
printf("running processes because /usr/bin/ps is limited to 80 chars and\n");
|
||||
printf("/usr/ucb/ps can merge columns together.\n\n");
|
||||
printf("Columns are:\n");
|
||||
printf("\tS - State of process - see 'ps' man page\n");
|
||||
printf("\tUID - UID of the process owner\n");
|
||||
printf("\tPID - PID of the process\n");
|
||||
printf("\tPPID - PID of the parent process\n");
|
||||
printf("\tVSZ - Virtual memory usage (kilobytes)\n");
|
||||
printf("\tRSS - Real memory usage (kilobytes)\n");
|
||||
printf("\t%%CPU - CPU usage\n");
|
||||
printf("\tCOMMAND - Command being run\n");
|
||||
printf("\tARGS - Full command line with arguements\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
static int HandlePsInfo (char *szPath, psinfo_t *pPsInfo)
|
||||
{
|
||||
int retcode;
|
||||
char *thisProg;
|
||||
|
||||
/* Make sure that the process is still there */
|
||||
if ((retcode = GetArgVectors(pPsInfo->pr_pid)) == 0)
|
||||
{
|
||||
/* We use the program name from the kvm argv[0] instead
|
||||
* of pr_fname from the psinfo struct because pr_fname
|
||||
* may be truncated.
|
||||
*
|
||||
* Also, strip-off leading path information.
|
||||
*/
|
||||
if ((thisProg = strrchr(myArgv[0], '/')) != NULL)
|
||||
thisProg++;
|
||||
else
|
||||
thisProg = myArgv[0];
|
||||
|
||||
/* Display the ps columns (except for argv) */
|
||||
printf("%c %5d %5d %5d %6lu %6lu %4.1f %s ",
|
||||
pPsInfo->pr_lwp.pr_sname,
|
||||
(int)(pPsInfo->pr_euid),
|
||||
(int)(pPsInfo->pr_pid),
|
||||
(int)(pPsInfo->pr_ppid),
|
||||
(unsigned long)(pPsInfo->pr_size),
|
||||
(unsigned long)(pPsInfo->pr_rssize),
|
||||
((float)(pPsInfo->pr_pctcpu) / 0x8000 * 100.0),
|
||||
thisProg);
|
||||
|
||||
/* Display the arg vectors associated with this pid */
|
||||
ShowArgVectors();
|
||||
|
||||
/* Release the arg vector buffer memory */
|
||||
ReleaseArgVectors();
|
||||
}
|
||||
|
||||
return retcode;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
static int GetArgVectors (pid_t pid)
|
||||
{
|
||||
int retcode = 1;
|
||||
|
||||
/* Get the proc structure for the specified PID */
|
||||
if ((pProc = kvm_getproc(kd, pid)) != NULL)
|
||||
{
|
||||
/* Save a copy of the process' u-area */
|
||||
if ((pUser = kvm_getu(kd, pProc)) != NULL)
|
||||
{
|
||||
/* Reconstruct the process' argv vector array */
|
||||
if (kvm_getcmd(kd, pProc, pUser, &myArgv, NULL) == 0)
|
||||
{
|
||||
retcode = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return retcode;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
static void ShowArgVectors (void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i=0; myArgv[i]; i++)
|
||||
{
|
||||
printf(" %s", myArgv[i]);
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
static void ReleaseArgVectors()
|
||||
{
|
||||
/* NOOP */
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue