Import upstream version 2.22
Debian Janitor
2 years ago
0 | 0 | *~ |
1 | 1 | *.o |
2 | Makefile | |
3 | Makefile.in | |
4 | aclocal.m4 | |
5 | autom4te.cache/ | |
6 | compile | |
7 | compile_commands.json | |
8 | config.guess | |
9 | config.h | |
10 | config.h.in | |
11 | config.log | |
12 | config.status | |
13 | config.sub | |
14 | configure | |
15 | depcomp | |
16 | doc/Makefile | |
17 | doc/Makefile.in | |
18 | install-sh | |
19 | missing | |
20 | src/.deps/ | |
21 | src/Makefile | |
22 | src/Makefile.in | |
23 | src/arping | |
24 | src/fuzz_pingip | |
25 | stamp-h1 | |
26 | test-driver |
2 | 2 | include $(top_srcdir)/Makefile.am.common |
3 | 3 | |
4 | 4 | SUBDIRS=src doc |
5 | ||
6 | lsp: | |
7 | ~/.local/bin/intercept-build make | |
5 | 8 | |
6 | 9 | tarball: |
7 | 10 | ./extra/mktarball latest |
10 | 13 | rm -f aclocal.m4 configure.scan depcomp missing install-sh config.h.in |
11 | 14 | rm -f Makefile.in configure autoscan*.log config.guess config.sub |
12 | 15 | rm -f ltmain.sh configure.in src/Makefile.in doc/Makefile.in |
16 | rm -f compile_commands.json test-driver compile | |
17 | rm -fr .cache |
0 | # Makefile.in generated by automake 1.16.1 from Makefile.am. | |
0 | # Makefile.in generated by automake 1.16.2 from Makefile.am. | |
1 | 1 | # @configure_input@ |
2 | 2 | |
3 | # Copyright (C) 1994-2018 Free Software Foundation, Inc. | |
3 | # Copyright (C) 1994-2020 Free Software Foundation, Inc. | |
4 | 4 | |
5 | 5 | # This Makefile.in is free software; the Free Software Foundation |
6 | 6 | # gives unlimited permission to copy and/or distribute it, |
135 | 135 | $(am__extra_recursive_targets) |
136 | 136 | AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ |
137 | 137 | cscope distdir distdir-am dist dist-all distcheck |
138 | am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ | |
139 | $(LISP)config.h.in | |
138 | am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ | |
139 | config.h.in | |
140 | 140 | # Read a list of newline-separated strings from the standard input, |
141 | 141 | # and print each of them once, without duplicates. Input order is |
142 | 142 | # *not* preserved. |
554 | 554 | tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz |
555 | 555 | $(am__post_remove_distdir) |
556 | 556 | |
557 | dist-zstd: distdir | |
558 | tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst | |
559 | $(am__post_remove_distdir) | |
560 | ||
557 | 561 | dist-tarZ: distdir |
558 | 562 | @echo WARNING: "Support for distribution archives compressed with" \ |
559 | 563 | "legacy program 'compress' is deprecated." >&2 |
596 | 600 | eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ |
597 | 601 | *.zip*) \ |
598 | 602 | unzip $(distdir).zip ;;\ |
603 | *.tar.zst*) \ | |
604 | zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ | |
599 | 605 | esac |
600 | 606 | chmod -R a-w $(distdir) |
601 | 607 | chmod u+w $(distdir) |
773 | 779 | am--refresh check check-am clean clean-cscope clean-generic \ |
774 | 780 | cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ |
775 | 781 | dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ |
776 | distcheck distclean distclean-generic distclean-hdr \ | |
782 | dist-zstd distcheck distclean distclean-generic distclean-hdr \ | |
777 | 783 | distclean-tags distcleancheck distdir distuninstallcheck dvi \ |
778 | 784 | dvi-am html html-am info info-am install install-am \ |
779 | 785 | install-data install-data-am install-dvi install-dvi-am \ |
788 | 794 | .PRECIOUS: Makefile |
789 | 795 | |
790 | 796 | |
797 | lsp: | |
798 | ~/.local/bin/intercept-build make | |
799 | ||
791 | 800 | tarball: |
792 | 801 | ./extra/mktarball latest |
793 | 802 | |
795 | 804 | rm -f aclocal.m4 configure.scan depcomp missing install-sh config.h.in |
796 | 805 | rm -f Makefile.in configure autoscan*.log config.guess config.sub |
797 | 806 | rm -f ltmain.sh configure.in src/Makefile.in doc/Makefile.in |
807 | rm -f compile_commands.json test-driver compile | |
808 | rm -fr .cache | |
798 | 809 | |
799 | 810 | # Tell versions [3.59,3.63) of GNU make to not export all variables. |
800 | 811 | # Otherwise a system limit (for SysV at least) may be exceeded. |
0 | # generated automatically by aclocal 1.16.1 -*- Autoconf -*- | |
1 | ||
2 | # Copyright (C) 1996-2018 Free Software Foundation, Inc. | |
0 | # generated automatically by aclocal 1.16.2 -*- Autoconf -*- | |
1 | ||
2 | # Copyright (C) 1996-2020 Free Software Foundation, Inc. | |
3 | 3 | |
4 | 4 | # This file is free software; the Free Software Foundation |
5 | 5 | # gives unlimited permission to copy and/or distribute it, |
19 | 19 | If you have problems, you may need to regenerate the build system entirely. |
20 | 20 | To do so, use the procedure documented by the package, typically 'autoreconf'.])]) |
21 | 21 | |
22 | # Copyright (C) 2002-2018 Free Software Foundation, Inc. | |
22 | # Copyright (C) 2002-2020 Free Software Foundation, Inc. | |
23 | 23 | # |
24 | 24 | # This file is free software; the Free Software Foundation |
25 | 25 | # gives unlimited permission to copy and/or distribute it, |
34 | 34 | [am__api_version='1.16' |
35 | 35 | dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to |
36 | 36 | dnl require some minimum version. Point them to the right macro. |
37 | m4_if([$1], [1.16.1], [], | |
37 | m4_if([$1], [1.16.2], [], | |
38 | 38 | [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl |
39 | 39 | ]) |
40 | 40 | |
50 | 50 | # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. |
51 | 51 | # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. |
52 | 52 | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], |
53 | [AM_AUTOMAKE_VERSION([1.16.1])dnl | |
53 | [AM_AUTOMAKE_VERSION([1.16.2])dnl | |
54 | 54 | m4_ifndef([AC_AUTOCONF_VERSION], |
55 | 55 | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl |
56 | 56 | _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) |
57 | 57 | |
58 | 58 | # AM_AUX_DIR_EXPAND -*- Autoconf -*- |
59 | 59 | |
60 | # Copyright (C) 2001-2018 Free Software Foundation, Inc. | |
60 | # Copyright (C) 2001-2020 Free Software Foundation, Inc. | |
61 | 61 | # |
62 | 62 | # This file is free software; the Free Software Foundation |
63 | 63 | # gives unlimited permission to copy and/or distribute it, |
109 | 109 | |
110 | 110 | # AM_CONDITIONAL -*- Autoconf -*- |
111 | 111 | |
112 | # Copyright (C) 1997-2018 Free Software Foundation, Inc. | |
112 | # Copyright (C) 1997-2020 Free Software Foundation, Inc. | |
113 | 113 | # |
114 | 114 | # This file is free software; the Free Software Foundation |
115 | 115 | # gives unlimited permission to copy and/or distribute it, |
140 | 140 | Usually this means the macro was only invoked conditionally.]]) |
141 | 141 | fi])]) |
142 | 142 | |
143 | # Copyright (C) 1999-2018 Free Software Foundation, Inc. | |
143 | # Copyright (C) 1999-2020 Free Software Foundation, Inc. | |
144 | 144 | # |
145 | 145 | # This file is free software; the Free Software Foundation |
146 | 146 | # gives unlimited permission to copy and/or distribute it, |
331 | 331 | |
332 | 332 | # Generate code to set up dependency tracking. -*- Autoconf -*- |
333 | 333 | |
334 | # Copyright (C) 1999-2018 Free Software Foundation, Inc. | |
334 | # Copyright (C) 1999-2020 Free Software Foundation, Inc. | |
335 | 335 | # |
336 | 336 | # This file is free software; the Free Software Foundation |
337 | 337 | # gives unlimited permission to copy and/or distribute it, |
370 | 370 | done |
371 | 371 | if test $am_rc -ne 0; then |
372 | 372 | AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments |
373 | for automatic dependency tracking. Try re-running configure with the | |
373 | for automatic dependency tracking. If GNU make was not used, consider | |
374 | re-running the configure script with MAKE="gmake" (or whatever is | |
375 | necessary). You can also try re-running configure with the | |
374 | 376 | '--disable-dependency-tracking' option to at least be able to build |
375 | 377 | the package (albeit without support for automatic dependency tracking).]) |
376 | 378 | fi |
397 | 399 | |
398 | 400 | # Do all the work for Automake. -*- Autoconf -*- |
399 | 401 | |
400 | # Copyright (C) 1996-2018 Free Software Foundation, Inc. | |
402 | # Copyright (C) 1996-2020 Free Software Foundation, Inc. | |
401 | 403 | # |
402 | 404 | # This file is free software; the Free Software Foundation |
403 | 405 | # gives unlimited permission to copy and/or distribute it, |
594 | 596 | done |
595 | 597 | echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) |
596 | 598 | |
597 | # Copyright (C) 2001-2018 Free Software Foundation, Inc. | |
599 | # Copyright (C) 2001-2020 Free Software Foundation, Inc. | |
598 | 600 | # |
599 | 601 | # This file is free software; the Free Software Foundation |
600 | 602 | # gives unlimited permission to copy and/or distribute it, |
615 | 617 | fi |
616 | 618 | AC_SUBST([install_sh])]) |
617 | 619 | |
618 | # Copyright (C) 2003-2018 Free Software Foundation, Inc. | |
620 | # Copyright (C) 2003-2020 Free Software Foundation, Inc. | |
619 | 621 | # |
620 | 622 | # This file is free software; the Free Software Foundation |
621 | 623 | # gives unlimited permission to copy and/or distribute it, |
637 | 639 | # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- |
638 | 640 | # From Jim Meyering |
639 | 641 | |
640 | # Copyright (C) 1996-2018 Free Software Foundation, Inc. | |
642 | # Copyright (C) 1996-2020 Free Software Foundation, Inc. | |
641 | 643 | # |
642 | 644 | # This file is free software; the Free Software Foundation |
643 | 645 | # gives unlimited permission to copy and/or distribute it, |
672 | 674 | |
673 | 675 | # Check to see how 'make' treats includes. -*- Autoconf -*- |
674 | 676 | |
675 | # Copyright (C) 2001-2018 Free Software Foundation, Inc. | |
677 | # Copyright (C) 2001-2020 Free Software Foundation, Inc. | |
676 | 678 | # |
677 | 679 | # This file is free software; the Free Software Foundation |
678 | 680 | # gives unlimited permission to copy and/or distribute it, |
715 | 717 | |
716 | 718 | # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- |
717 | 719 | |
718 | # Copyright (C) 1997-2018 Free Software Foundation, Inc. | |
720 | # Copyright (C) 1997-2020 Free Software Foundation, Inc. | |
719 | 721 | # |
720 | 722 | # This file is free software; the Free Software Foundation |
721 | 723 | # gives unlimited permission to copy and/or distribute it, |
754 | 756 | |
755 | 757 | # Helper functions for option handling. -*- Autoconf -*- |
756 | 758 | |
757 | # Copyright (C) 2001-2018 Free Software Foundation, Inc. | |
759 | # Copyright (C) 2001-2020 Free Software Foundation, Inc. | |
758 | 760 | # |
759 | 761 | # This file is free software; the Free Software Foundation |
760 | 762 | # gives unlimited permission to copy and/or distribute it, |
783 | 785 | AC_DEFUN([_AM_IF_OPTION], |
784 | 786 | [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) |
785 | 787 | |
786 | # Copyright (C) 1999-2018 Free Software Foundation, Inc. | |
788 | # Copyright (C) 1999-2020 Free Software Foundation, Inc. | |
787 | 789 | # |
788 | 790 | # This file is free software; the Free Software Foundation |
789 | 791 | # gives unlimited permission to copy and/or distribute it, |
830 | 832 | # For backward compatibility. |
831 | 833 | AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) |
832 | 834 | |
833 | # Copyright (C) 2001-2018 Free Software Foundation, Inc. | |
835 | # Copyright (C) 2001-2020 Free Software Foundation, Inc. | |
834 | 836 | # |
835 | 837 | # This file is free software; the Free Software Foundation |
836 | 838 | # gives unlimited permission to copy and/or distribute it, |
849 | 851 | |
850 | 852 | # Check to make sure that the build environment is sane. -*- Autoconf -*- |
851 | 853 | |
852 | # Copyright (C) 1996-2018 Free Software Foundation, Inc. | |
854 | # Copyright (C) 1996-2020 Free Software Foundation, Inc. | |
853 | 855 | # |
854 | 856 | # This file is free software; the Free Software Foundation |
855 | 857 | # gives unlimited permission to copy and/or distribute it, |
930 | 932 | rm -f conftest.file |
931 | 933 | ]) |
932 | 934 | |
933 | # Copyright (C) 2009-2018 Free Software Foundation, Inc. | |
935 | # Copyright (C) 2009-2020 Free Software Foundation, Inc. | |
934 | 936 | # |
935 | 937 | # This file is free software; the Free Software Foundation |
936 | 938 | # gives unlimited permission to copy and/or distribute it, |
990 | 992 | _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl |
991 | 993 | ]) |
992 | 994 | |
993 | # Copyright (C) 2001-2018 Free Software Foundation, Inc. | |
995 | # Copyright (C) 2001-2020 Free Software Foundation, Inc. | |
994 | 996 | # |
995 | 997 | # This file is free software; the Free Software Foundation |
996 | 998 | # gives unlimited permission to copy and/or distribute it, |
1018 | 1020 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" |
1019 | 1021 | AC_SUBST([INSTALL_STRIP_PROGRAM])]) |
1020 | 1022 | |
1021 | # Copyright (C) 2006-2018 Free Software Foundation, Inc. | |
1023 | # Copyright (C) 2006-2020 Free Software Foundation, Inc. | |
1022 | 1024 | # |
1023 | 1025 | # This file is free software; the Free Software Foundation |
1024 | 1026 | # gives unlimited permission to copy and/or distribute it, |
1037 | 1039 | |
1038 | 1040 | # Check how to create a tarball. -*- Autoconf -*- |
1039 | 1041 | |
1040 | # Copyright (C) 2004-2018 Free Software Foundation, Inc. | |
1042 | # Copyright (C) 2004-2020 Free Software Foundation, Inc. | |
1041 | 1043 | # |
1042 | 1044 | # This file is free software; the Free Software Foundation |
1043 | 1045 | # gives unlimited permission to copy and/or distribute it, |
2 | 2 | |
3 | 3 | scriptversion=2018-03-07.03; # UTC |
4 | 4 | |
5 | # Copyright (C) 1999-2018 Free Software Foundation, Inc. | |
5 | # Copyright (C) 1999-2020 Free Software Foundation, Inc. | |
6 | 6 | # Written by Tom Tromey <tromey@cygnus.com>. |
7 | 7 | # |
8 | 8 | # This program is free software; you can redistribute it and/or modify |
52 | 52 | MINGW*) |
53 | 53 | file_conv=mingw |
54 | 54 | ;; |
55 | CYGWIN*) | |
55 | CYGWIN* | MSYS*) | |
56 | 56 | file_conv=cygwin |
57 | 57 | ;; |
58 | 58 | *) |
66 | 66 | mingw/*) |
67 | 67 | file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` |
68 | 68 | ;; |
69 | cygwin/*) | |
69 | cygwin/* | msys/*) | |
70 | 70 | file=`cygpath -m "$file" || echo "$file"` |
71 | 71 | ;; |
72 | 72 | wine/*) |
0 | 0 | #! /bin/sh |
1 | 1 | # Guess values for system-dependent variables and create Makefiles. |
2 | # Generated by GNU Autoconf 2.69 for arping 2.21. | |
2 | # Generated by GNU Autoconf 2.69 for arping 2.22. | |
3 | 3 | # |
4 | 4 | # Report bugs to <thomas@habets.se>. |
5 | 5 | # |
579 | 579 | # Identity of this package. |
580 | 580 | PACKAGE_NAME='arping' |
581 | 581 | PACKAGE_TARNAME='arping' |
582 | PACKAGE_VERSION='2.21' | |
583 | PACKAGE_STRING='arping 2.21' | |
582 | PACKAGE_VERSION='2.22' | |
583 | PACKAGE_STRING='arping 2.22' | |
584 | 584 | PACKAGE_BUGREPORT='thomas@habets.se' |
585 | 585 | PACKAGE_URL='' |
586 | 586 | |
1296 | 1296 | # Omit some internal or obsolete options to make the list less imposing. |
1297 | 1297 | # This message is too long to be a string in the A/UX 3.1 sh. |
1298 | 1298 | cat <<_ACEOF |
1299 | \`configure' configures arping 2.21 to adapt to many kinds of systems. | |
1299 | \`configure' configures arping 2.22 to adapt to many kinds of systems. | |
1300 | 1300 | |
1301 | 1301 | Usage: $0 [OPTION]... [VAR=VALUE]... |
1302 | 1302 | |
1368 | 1368 | |
1369 | 1369 | if test -n "$ac_init_help"; then |
1370 | 1370 | case $ac_init_help in |
1371 | short | recursive ) echo "Configuration of arping 2.21:";; | |
1371 | short | recursive ) echo "Configuration of arping 2.22:";; | |
1372 | 1372 | esac |
1373 | 1373 | cat <<\_ACEOF |
1374 | 1374 | |
1464 | 1464 | test -n "$ac_init_help" && exit $ac_status |
1465 | 1465 | if $ac_init_version; then |
1466 | 1466 | cat <<\_ACEOF |
1467 | arping configure 2.21 | |
1467 | arping configure 2.22 | |
1468 | 1468 | generated by GNU Autoconf 2.69 |
1469 | 1469 | |
1470 | 1470 | Copyright (C) 2012 Free Software Foundation, Inc. |
1933 | 1933 | This file contains any messages produced by compilers while |
1934 | 1934 | running configure, to aid debugging if configure makes a mistake. |
1935 | 1935 | |
1936 | It was created by arping $as_me 2.21, which was | |
1936 | It was created by arping $as_me 2.22, which was | |
1937 | 1937 | generated by GNU Autoconf 2.69. Invocation command line was |
1938 | 1938 | |
1939 | 1939 | $ $0 $@ |
2908 | 2908 | |
2909 | 2909 | # Define the identity of the package. |
2910 | 2910 | PACKAGE='arping' |
2911 | VERSION='2.21' | |
2911 | VERSION='2.22' | |
2912 | 2912 | |
2913 | 2913 | |
2914 | 2914 | cat >>confdefs.h <<_ACEOF |
6037 | 6037 | # report actual input values of CONFIG_FILES etc. instead of their |
6038 | 6038 | # values after options handling. |
6039 | 6039 | ac_log=" |
6040 | This file was extended by arping $as_me 2.21, which was | |
6040 | This file was extended by arping $as_me 2.22, which was | |
6041 | 6041 | generated by GNU Autoconf 2.69. Invocation command line was |
6042 | 6042 | |
6043 | 6043 | CONFIG_FILES = $CONFIG_FILES |
6103 | 6103 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
6104 | 6104 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
6105 | 6105 | ac_cs_version="\\ |
6106 | arping config.status 2.21 | |
6106 | arping config.status 2.22 | |
6107 | 6107 | configured by $0, generated by GNU Autoconf 2.69, |
6108 | 6108 | with options \\"\$ac_cs_config\\" |
6109 | 6109 | |
6914 | 6914 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
6915 | 6915 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
6916 | 6916 | as_fn_error $? "Something went wrong bootstrapping makefile fragments |
6917 | for automatic dependency tracking. Try re-running configure with the | |
6917 | for automatic dependency tracking. If GNU make was not used, consider | |
6918 | re-running the configure script with MAKE=\"gmake\" (or whatever is | |
6919 | necessary). You can also try re-running configure with the | |
6918 | 6920 | '--disable-dependency-tracking' option to at least be able to build |
6919 | 6921 | the package (albeit without support for automatic dependency tracking). |
6920 | 6922 | See \`config.log' for more details" "$LINENO" 5; } |
1 | 1 | # Process this file with autoconf to produce a configure script. |
2 | 2 | |
3 | 3 | AC_PREREQ(2.61) |
4 | AC_INIT(arping, 2.21, thomas@habets.se) | |
4 | AC_INIT(arping, 2.22, thomas@habets.se) | |
5 | 5 | AC_CANONICAL_SYSTEM |
6 | 6 | AC_CONFIG_SRCDIR([src/arping.c]) |
7 | 7 | AM_INIT_AUTOMAKE |
2 | 2 | |
3 | 3 | scriptversion=2018-03-07.03; # UTC |
4 | 4 | |
5 | # Copyright (C) 1999-2018 Free Software Foundation, Inc. | |
5 | # Copyright (C) 1999-2020 Free Software Foundation, Inc. | |
6 | 6 | |
7 | 7 | # This program is free software; you can redistribute it and/or modify |
8 | 8 | # it under the terms of the GNU General Public License as published by |
0 | # Makefile.in generated by automake 1.16.1 from Makefile.am. | |
0 | # Makefile.in generated by automake 1.16.2 from Makefile.am. | |
1 | 1 | # @configure_input@ |
2 | 2 | |
3 | # Copyright (C) 1994-2018 Free Software Foundation, Inc. | |
3 | # Copyright (C) 1994-2020 Free Software Foundation, Inc. | |
4 | 4 | |
5 | 5 | # This Makefile.in is free software; the Free Software Foundation |
6 | 6 | # gives unlimited permission to copy and/or distribute it, |
450 | 450 | trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 |
451 | 451 | |
452 | 452 | # Copy the file name to the temp name. |
453 | (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && | |
453 | (umask $cp_umask && | |
454 | { test -z "$stripcmd" || { | |
455 | # Create $dsttmp read-write so that cp doesn't create it read-only, | |
456 | # which would cause strip to fail. | |
457 | if test -z "$doit"; then | |
458 | : >"$dsttmp" # No need to fork-exec 'touch'. | |
459 | else | |
460 | $doit touch "$dsttmp" | |
461 | fi | |
462 | } | |
463 | } && | |
464 | $doit_exec $cpprog "$src" "$dsttmp") && | |
454 | 465 | |
455 | 466 | # and set any options; do chmod last to preserve setuid bits. |
456 | 467 | # |
2 | 2 | |
3 | 3 | scriptversion=2018-03-07.03; # UTC |
4 | 4 | |
5 | # Copyright (C) 1996-2018 Free Software Foundation, Inc. | |
5 | # Copyright (C) 1996-2020 Free Software Foundation, Inc. | |
6 | 6 | # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. |
7 | 7 | |
8 | 8 | # This program is free software; you can redistribute it and/or modify |
0 | # Makefile.in generated by automake 1.16.1 from Makefile.am. | |
0 | # Makefile.in generated by automake 1.16.2 from Makefile.am. | |
1 | 1 | # @configure_input@ |
2 | 2 | |
3 | # Copyright (C) 1994-2018 Free Software Foundation, Inc. | |
3 | # Copyright (C) 1994-2020 Free Software Foundation, Inc. | |
4 | 4 | |
5 | 5 | # This Makefile.in is free software; the Free Software Foundation |
6 | 6 | # gives unlimited permission to copy and/or distribute it, |
34 | 34 | #include "config.h" |
35 | 35 | #endif |
36 | 36 | |
37 | #include <errno.h> | |
37 | 38 | #include <stdio.h> |
38 | 39 | #include <stdlib.h> |
40 | #include <string.h> | |
39 | 41 | #include <limits.h> |
40 | 42 | #include <math.h> |
41 | 43 | #include <poll.h> |
39 | 39 | extern int mock_libnet_lo_ok; |
40 | 40 | extern int mock_libnet_null_ok; |
41 | 41 | |
42 | struct registered_test { | |
43 | void* fn; | |
44 | const char* name; | |
45 | }; | |
46 | ||
47 | static int numtests = 0; | |
48 | static struct registered_test test_registry[1024]; | |
49 | ||
50 | static int num_exit_tests = 0; | |
51 | static struct registered_test test_exit_registry[1024]; | |
52 | ||
53 | 42 | int get_mac_addr(const char *in, char *out); |
54 | 43 | void strip_newline(char* s); |
55 | 44 | |
56 | ||
57 | #define MYTEST(a) static void a(int);__attribute__((constructor)) \ | |
58 | static void cons_##a() { \ | |
59 | test_registry[numtests].fn = a; \ | |
60 | test_registry[numtests].name = #a; \ | |
61 | numtests++; \ | |
62 | } START_TEST(a) | |
63 | ||
64 | #define MY_EXIT_TEST(a) static void a(int);__attribute__((constructor)) \ | |
65 | static void cons_##a() { \ | |
66 | test_exit_registry[num_exit_tests].fn = a; \ | |
67 | test_exit_registry[num_exit_tests].name = #a; \ | |
68 | num_exit_tests++; \ | |
69 | } START_TEST(a) | |
70 | 45 | |
71 | 46 | /** |
72 | 47 | * |
235 | 210 | fprintf(stderr, "\n"); |
236 | 211 | } |
237 | 212 | |
238 | MYTEST(test_mkpacket) | |
213 | START_TEST(test_mkpacket) | |
239 | 214 | { |
240 | 215 | uint8_t correct_packet[] = { |
241 | 216 | 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, |
260 | 235 | |
261 | 236 | |
262 | 237 | // Received uninteresting packet, should not record anything. |
263 | MYTEST(pingip_uninteresting_packet) | |
238 | START_TEST(pingip_uninteresting_packet) | |
264 | 239 | { |
265 | 240 | struct pcap_pkthdr pkthdr; |
266 | 241 | uint8_t* packet; |
388 | 363 | } END_TEST |
389 | 364 | |
390 | 365 | // Received reply that actually matches. Things should happen. |
391 | MYTEST(pingip_interesting_packet) | |
366 | START_TEST(pingip_interesting_packet) | |
392 | 367 | { |
393 | 368 | struct pcap_pkthdr pkthdr; |
394 | 369 | extern uint8_t srcmac[ETH_ALEN]; |
448 | 423 | "numrecvd not incremented second time"); |
449 | 424 | } END_TEST |
450 | 425 | |
451 | MYTEST(strip_newline_test) | |
426 | START_TEST(strip_newline_test) | |
452 | 427 | { |
453 | 428 | const char *tests[][2] = { |
454 | 429 | {"", ""}, |
468 | 443 | } |
469 | 444 | } END_TEST |
470 | 445 | |
471 | MYTEST(get_mac_addr_success) | |
446 | START_TEST(get_mac_addr_success) | |
472 | 447 | { |
473 | 448 | const char *tests[][2] = { |
474 | 449 | // Null. |
500 | 475 | } |
501 | 476 | } END_TEST |
502 | 477 | |
503 | MYTEST(get_mac_addr_fail) | |
478 | START_TEST(get_mac_addr_fail) | |
504 | 479 | { |
505 | 480 | const char *tests[] = { |
506 | 481 | "", |
516 | 491 | } |
517 | 492 | } END_TEST |
518 | 493 | |
519 | MY_EXIT_TEST(libnet_init_bad_nolo) | |
494 | START_TEST(libnet_init_bad_nolo) | |
520 | 495 | { |
521 | 496 | // It'll only try lo if named interface fails. |
522 | 497 | // So by accepting lo, we make sure it doesn't try lo. |
524 | 499 | do_libnet_init("bad", 0); |
525 | 500 | } END_TEST |
526 | 501 | |
527 | MY_EXIT_TEST(libnet_init_null_nolo_nonull) | |
502 | START_TEST(libnet_init_null_nolo_nonull) | |
528 | 503 | { |
529 | 504 | mock_libnet_lo_ok = 0; |
530 | 505 | mock_libnet_null_ok = 0; |
531 | 506 | do_libnet_init(NULL, 0); |
532 | 507 | } END_TEST |
533 | 508 | |
534 | MYTEST(libnet_init_good) | |
509 | START_TEST(libnet_init_good) | |
535 | 510 | { |
536 | 511 | mock_libnet_lo_ok = 0; // Don't even try falling back to lo. |
537 | 512 | do_libnet_init("good", 0); |
538 | 513 | fail_if(libnet == NULL); |
539 | 514 | } END_TEST |
540 | 515 | |
541 | MYTEST(libnet_init_null_nolo) | |
516 | START_TEST(libnet_init_null_nolo) | |
542 | 517 | { |
543 | 518 | mock_libnet_lo_ok = 0; |
544 | 519 | mock_libnet_null_ok = 1; |
545 | 520 | do_libnet_init(NULL, 0); |
546 | 521 | fail_if(libnet == NULL); |
547 | } END_TEST | |
522 | } | |
523 | END_TEST | |
548 | 524 | |
549 | 525 | static Suite* |
550 | 526 | arping_suite(void) |
552 | 528 | int c; |
553 | 529 | Suite* s = suite_create("Arping"); |
554 | 530 | |
555 | //tcase_add_checked_fixture (tc_core, setup, teardown); | |
556 | for (c = 0; c < numtests; c++) { | |
557 | TCase *tc_core = tcase_create(test_registry[c].name); | |
558 | tcase_add_test(tc_core, test_registry[c].fn); | |
559 | suite_add_tcase(s, tc_core); | |
560 | } | |
561 | for (c = 0; c < num_exit_tests; c++) { | |
562 | TCase *tc_core = tcase_create(test_exit_registry[c].name); | |
563 | tcase_add_exit_test(tc_core, test_exit_registry[c].fn, 1); | |
564 | suite_add_tcase(s, tc_core); | |
565 | } | |
531 | ||
532 | TCase *tc_core; | |
533 | ||
534 | // libcheck broke test registries, so have to resort to code duplication. :-( | |
535 | // https://github.com/libcheck/check/pull/158/files | |
536 | #define SIGH_LIBCHECK(tn) \ | |
537 | tc_core = tcase_create(#tn); \ | |
538 | tcase_add_test(tc_core, tn); \ | |
539 | suite_add_tcase(s, tc_core); | |
540 | ||
541 | SIGH_LIBCHECK(libnet_init_null_nolo); | |
542 | SIGH_LIBCHECK(test_mkpacket); | |
543 | SIGH_LIBCHECK(pingip_uninteresting_packet); | |
544 | SIGH_LIBCHECK(pingip_interesting_packet); | |
545 | SIGH_LIBCHECK(strip_newline_test); | |
546 | SIGH_LIBCHECK(get_mac_addr_success); | |
547 | SIGH_LIBCHECK(get_mac_addr_fail); | |
548 | SIGH_LIBCHECK(libnet_init_good); | |
549 | ||
550 | ||
551 | #define SIGH_LIBCHECK_EXIT(tn) \ | |
552 | tc_core = tcase_create(#tn); \ | |
553 | tcase_add_exit_test(tc_core, tn, 1); \ | |
554 | suite_add_tcase(s, tc_core); | |
555 | ||
556 | SIGH_LIBCHECK_EXIT(libnet_init_bad_nolo); | |
557 | SIGH_LIBCHECK_EXIT(libnet_init_null_nolo_nonull); | |
558 | ||
566 | 559 | return s; |
567 | 560 | } |
568 | 561 | |
576 | 569 | number_failed = srunner_ntests_failed (sr); |
577 | 570 | srunner_free (sr); |
578 | 571 | return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; |
572 | return 0; | |
579 | 573 | } |
580 | 574 | /* ---- Emacs Variables ---- |
581 | 575 | * Local Variables: |
2 | 2 | |
3 | 3 | scriptversion=2018-03-07.03; # UTC |
4 | 4 | |
5 | # Copyright (C) 2011-2018 Free Software Foundation, Inc. | |
5 | # Copyright (C) 2011-2020 Free Software Foundation, Inc. | |
6 | 6 | # |
7 | 7 | # This program is free software; you can redistribute it and/or modify |
8 | 8 | # it under the terms of the GNU General Public License as published by |