install-sh
missing
stamp-h1
+/m4/
# libtool stuff
libltdl
ltmain.sh
# build output
-.libs
+.libs/
bindings/perl/Oping.c
bindings/perl/blib
bindings/perl/pm_to_blib
src/mans/*.3
src/mans/*.8
src/oping
+src/noping
*.bs
*.la
*.lo
+2011-03-06, Version 1.6.1:
+ * Build system: If "make install" is executed as root, the CAP_NET_RAW
+ capability is added to the binary (on Linux) or the set-UID bit is
+ set (other Unixes).
+ * src/oping.c: Fix compiler warnings which may abort the build. Thanks
+ to James Bromberger for reporting the problem.
+ * noping: Compatibility with ncurses 5.8 has been fixed. Thanks to
+ Gaetan Bisson for his patch.
+
2011-01-26, Version 1.6.0:
* liboping: Improve timing of received network packets using
SO_TIMESTAMP if available. Thanks to Bruno Prémont for his patch.
SUBDIRS = src bindings
-dist-hook:
- find $(distdir) -type d -name '.svn' | xargs rm -rf
+ACLOCAL_AMFLAGS = -I m4
-AC_INIT(liboping, 1.6.0)
-AC_CONFIG_SRCDIR(src/liboping.c)
-AC_CONFIG_HEADERS(src/config.h)
-AM_INIT_AUTOMAKE(dist-bzip2)
-AC_LANG(C)
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ([2.68])
+AC_INIT([liboping],[1.6.1])
+AC_CONFIG_SRCDIR([src/liboping.c])
+AC_CONFIG_HEADERS([src/config.h])
+AC_CONFIG_MACRO_DIR([m4])
+AM_INIT_AUTOMAKE([dist-bzip2])
+AC_LANG([C])
AC_PREFIX_DEFAULT("/opt/oping")
# ABI version
LIBOPING_CURRENT=2
-LIBOPING_REVISION=6
+LIBOPING_REVISION=7
LIBOPING_AGE=2
AC_SUBST(LIBOPING_CURRENT)
AC_SUBST(LIBOPING_REVISION)
fi
AC_ARG_VAR(PERL, [Perl interpreter command])
-#
# configure libtool
-#
-AC_LIBTOOL_DLOPEN
-AC_PROG_LIBTOOL
-#AC_PROG_RANLIB
+LT_INIT([dlopen])
-#
# Checks for header files.
-#
AC_HEADER_STDC
-AC_CHECK_HEADERS(unistd.h)
-AC_CHECK_HEADERS(math.h)
-AC_CHECK_HEADERS(fcntl.h)
-AC_CHECK_HEADERS(sys/types.h)
-AC_CHECK_HEADERS(sys/stat.h)
AC_HEADER_TIME
-AC_CHECK_HEADERS(sys/socket.h)
-AC_CHECK_HEADERS(netdb.h)
-AC_CHECK_HEADERS(signal.h)
+AC_CHECK_HEADERS([math.h signal.h fcntl.h inttypes.h netdb.h stdint.h stdlib.h string.h sys/socket.h sys/time.h unistd.h])
# This sucks, but what can I do..?
AC_CHECK_HEADERS(netinet/in_systm.h, [], [],
#endif
])
+# Checks for typedefs, structures, and compiler characteristics.
+AC_TYPE_SIZE_T
+AC_TYPE_SSIZE_T
+AC_TYPE_UID_T
+AC_TYPE_UINT16_T
+AC_TYPE_UINT32_T
+AC_TYPE_UINT8_T
+
socket_needs_socket="no"
AC_CHECK_FUNCS(socket, [],
AC_CHECK_LIB(socket, socket,
AC_SUBST(BINDINGS)
-AC_OUTPUT(Makefile src/Makefile src/mans/Makefile bindings/Makefile)
+# Checks for library functions.
+AC_FUNC_MALLOC
+AC_FUNC_STRERROR_R
+AC_CHECK_FUNCS([gettimeofday memset modf select socket sqrt strcasecmp strdup strerror strncasecmp strtoul])
+
+AC_CONFIG_FILES([Makefile src/Makefile src/mans/Makefile bindings/Makefile])
+AC_OUTPUT
noping_LDADD += -lrt
endif
endif # BUILD_WITH_LIBNCURSES
+
+install-exec-hook:
+ @if test "x0" = "x$$UID"; then \
+ if test "xLinux" = "x`uname -s`"; then \
+ echo "Setting CAP_NET_RAW capability on binaries."; \
+ setcap cap_net_raw=ep $(DESTDIR)$(bindir)/oping || true; \
+ setcap cap_net_raw=ep $(DESTDIR)$(bindir)/noping || true; \
+ else \
+ echo "Setting set-UID bit on binaries."; \
+ chmod u+s $(DESTDIR)$(bindir)/oping || true; \
+ chmod u+s $(DESTDIR)$(bindir)/noping || true; \
+ fi; \
+ fi
/**
* Object oriented C module to send ICMP and ICMPv6 `echo's.
- * Copyright (C) 2006-2010 Florian octo Forster <octo at verplant.org>
+ * Copyright (C) 2006-2011 Florian octo Forster <ff at octo.it>
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
snprintf (errmsg, PING_ERRMSG_LEN, "Unknown `ai_family': %i", ai_ptr->ai_family);
errmsg[PING_ERRMSG_LEN - 1] = '\0';
- dprintf (errmsg);
+ dprintf ("%s", errmsg);
ping_set_error (obj, "getaddrinfo", errmsg);
continue;
}
/**
* Object oriented C module to send ICMP and ICMPv6 `echo's.
- * Copyright (C) 2006-2010 Florian octo Forster <ff at octo.it>
+ * Copyright (C) 2006-2011 Florian octo Forster <ff at octo.it>
*
* 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
exit (status);
} /* }}} void usage_exit */
+__attribute__((noreturn))
static void usage_qos_exit (const char *arg, int status) /* {{{ */
{
if (arg != 0)
&& (strlen (opt) == 4))
{
uint8_t dscp;
- uint8_t class;
- uint8_t prec;
+ uint8_t class = 0;
+ uint8_t prec = 0;
/* There are four classes, AF1x, AF2x, AF3x, and AF4x. */
if (opt[2] == '1')
context->window = NULL;
}
context->window = newwin (/* height = */ 4,
- /* width = */ 0,
+ /* width = */ width,
/* y = */ main_win_height + (4 * context->index),
/* x = */ 0);
}
main_win_height = height - (4 * host_num);
main_win = newwin (/* height = */ main_win_height,
- /* width = */ 0,
+ /* width = */ width,
/* y = */ 0, /* x = */ 0);
/* Allow scrolling */
scrollok (main_win, TRUE);
context->window = NULL;
}
context->window = newwin (/* height = */ 4,
- /* width = */ 0,
+ /* width = */ width,
/* y = */ main_win_height + (4 * context->index),
/* x = */ 0);
}
/**
* Object oriented C module to send ICMP and ICMPv6 `echo's.
- * Copyright (C) 2006-2010 Florian octo Forster <ff at octo.it>
+ * Copyright (C) 2006-2011 Florian octo Forster <ff at octo.it>
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
extern "C" {
#endif
-#define OPING_VERSION 1006000
+#define OPING_VERSION 1006001
/*
* Type definitions