diff -urN ipv6calc-3.2.0/autogen-all-variants.sh ipv6calc-openssl-3/autogen-all-variants.sh
--- ipv6calc-3.2.0/autogen-all-variants.sh 2021-07-14 05:25:36.000000000 +0200
+++ ipv6calc-openssl-3/autogen-all-variants.sh 2021-09-16 21:09:37.000000000 +0200
@@ -2,7 +2,7 @@
#
# Project : ipv6calc
# File : autogen-all-variants.sh
-# Version : $Id: 4849c66061fe9615f134f7a3ed99f3feec2765e8 $
+# Version : $Id: 5590a6a2b39026de004b192d0f0b4c461e01b12f $
# Copyright : 2011-2021 by Peter Bieringer <pb (at) bieringer.de>
#
# Information: run autogen.sh with all supported variants
@@ -44,6 +44,8 @@
cat <<END | grep -v ^#
NONE#
BUNDLED#--enable-bundled-md5 --enable-bundled-getopt
+OPENSSL#--enable-openssl-md5
+OPENSSL#--enable-openssl-evp-md5
IP2LOCATION#-i
IP2LOCATION#-i --ip2location-dyn
GEOIP2 DBIP2#-m
diff -urN ipv6calc-3.2.0/autogen.sh ipv6calc-openssl-3/autogen.sh
--- ipv6calc-3.2.0/autogen.sh 2021-07-14 05:25:36.000000000 +0200
+++ ipv6calc-openssl-3/autogen.sh 2021-09-16 21:09:37.000000000 +0200
@@ -2,7 +2,7 @@
#
# Project : ipv6calc
# File : autogen.sh
-# Version : $Id: fea8e6aec784a19c5ff46a27ad3f21fe7868f208 $
+# Version : $Id: 7da8159ecb6005503fcd2aeca007a1cdf1111f05 $
# Copyright : 2003-2021 by Peter Bieringer <pb (at) bieringer.de>
#
# Information: autogeneration of projects with optional features
@@ -235,6 +235,12 @@
echo "NOTICE: 'make static' skipped on non Fedora/RedHat/CentOS systems"
fi
+if grep -qF "#define ENABLE_OPENSSL_EVP_MD5 1" config.h; then
+ # skip static when OpenSSL EVP MD5 is selected (unresolved issue)
+ SKIP_STATIC=true
+ echo "NOTICE: 'make static' skipped because OpenSSL EVP MD5 implementation is selected"
+fi
+
if ! $SKIP_STATIC; then
echo "*** run: make static"
$MAKE static
diff -urN ipv6calc-3.2.0/ChangeLog ipv6calc-openssl-3/ChangeLog
--- ipv6calc-3.2.0/ChangeLog 2021-07-14 05:25:36.000000000 +0200
+++ ipv6calc-openssl-3/ChangeLog 2021-09-16 21:09:37.000000000 +0200
@@ -1,5 +1,5 @@
/*
- * $Id: ec3c18a0882857d9c9548af855442f4470b1f63b $
+ * $Id: 6f54cee091c4e20013a2e2087003f402ef607ed7 $
*/
Info:
@@ -10,6 +10,21 @@
AGP = Anthony G. Basile <basile at opensource dot dyc dot edu>
VZ = Vadim Zhukow https://github.com/grayedhttps://github.com/grayed
--------------------------------------------------------------------
+20210916/PB:
+ configure[.in]: add support for OpenSSL EVP MD5 (with precedence), add additional MD5 implementation selection options
+ lib/librfc3041.c: add support for OpenSSL EVP MD5
+ lib/ipv6calchelp.c: display linked MD5 implementation
+ */Makefile[.in]: fixes related to static builds
+ autogen-all-variants.sh: add additional variants for OpenSSL legacy and EVP MD5
+ configure[.in]: define CFLAG_EXTRAS=-fPIC to fix linker issues since use of regex was introduced
+
+20210809/PB:
+ ipv6calc/ipv6calc.c ipv6calc/ipv6calcoptions_local.h ipv6calc/test_ipv6calc.sh lib/ipv6calchelp.c lib/ipv6calctypes.h lib/libipv4addr.c:
+ add support for output of IPv4 in dot separated octal and also autodetect/parse such input
+
+20210801/PB:
+ tools/DBIP-update.sh.in: add support for deleting older files (-C <days>)
+
20210714/PB:
tag version 3.2.0
diff -urN ipv6calc-3.2.0/config.h.in ipv6calc-openssl-3/config.h.in
--- ipv6calc-3.2.0/config.h.in 2021-07-14 05:25:36.000000000 +0200
+++ ipv6calc-openssl-3/config.h.in 2021-09-16 21:09:37.000000000 +0200
@@ -15,6 +15,12 @@
/* Define if bundled MD5 should be used */
#undef ENABLE_BUNDLED_MD5
+/* Define if OpenSSL EVP MD5 should be used */
+#undef ENABLE_OPENSSL_EVP_MD5
+
+/* Define if OpenSSL legacy MD5 should be used */
+#undef ENABLE_OPENSSL_MD5
+
/* Define external database directory. */
#undef EXTERNAL_DB
@@ -52,6 +58,24 @@
don't. */
#undef HAVE_DECL_USAGETYPE
+/* Define to 1 if you have the `EVP_DigestFinal_ex' function. */
+#undef HAVE_EVP_DIGESTFINAL_EX
+
+/* Define to 1 if you have the `EVP_DigestInit_ex' function. */
+#undef HAVE_EVP_DIGESTINIT_EX
+
+/* Define to 1 if you have the `EVP_DigestUpdate' function. */
+#undef HAVE_EVP_DIGESTUPDATE
+
+/* Define to 1 if you have the `EVP_md5' function. */
+#undef HAVE_EVP_MD5
+
+/* Define to 1 if you have the `EVP_MD_CTX_free' function. */
+#undef HAVE_EVP_MD_CTX_FREE
+
+/* Define to 1 if you have the `EVP_MD_CTX_new' function. */
+#undef HAVE_EVP_MD_CTX_NEW
+
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
diff -urN ipv6calc-3.2.0/configure ipv6calc-openssl-3/configure
--- ipv6calc-3.2.0/configure 2021-07-14 05:25:36.000000000 +0200
+++ ipv6calc-openssl-3/configure 2021-09-16 21:09:37.000000000 +0200
@@ -654,6 +654,8 @@
EXTERNAL_DB
IPV6CALC_LIB
SHARED_LIBRARY
+ENABLE_OPENSSL_MD5
+ENABLE_OPENSSL_EVP_MD5
ENABLE_BUNDLED_MD5
MD5_INCLUDE
ENABLE_BUNDLED_GETOPT
@@ -719,6 +721,8 @@
enable_compiler_warning_to_error
enable_bundled_getopt
enable_bundled_md5
+enable_openssl_evp_md5
+enable_openssl_md5
enable_shared
enable_dynamic_load
enable_db_ieee
@@ -1394,6 +1398,11 @@
--enable-bundled-getopt Enable bundled getopt library (default:
autoselected)
--enable-bundled-md5 Enable bundled MD5 library (default: autoselected)
+ --enable-openssl-evp-md5
+ Enforce use of OpenSSL EVP MD5 implementation
+ (default: autoselected)
+ --enable-openssl-md5 Enforce use of OpenSSL legacy MD5 implementation
+ (default: autoselected)
--enable-shared Enable shared library build (default: disabled)
--disable-dynamic-load Disable dynamic load of libraries (default: enabled)
@@ -4126,9 +4135,8 @@
esac
-CFLAGS_EXTRA=$CFLAGS
+CFLAGS_EXTRA=-fPIC
-LDFLAGS_EXTRA=$LDFLAGS
# Check whether --enable-m32 was given.
@@ -4405,26 +4413,110 @@
ENABLE_BUNDLED_MD5=0
-# Check whether --enable-bundled-md5 was given.
-if test "${enable_bundled_md5+set}" = set; then :
- enableval=$enable_bundled_md5;
- if test "$enable_bundled_md5" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** use of bundled MD5 library forced" >&5
-$as_echo "*** use of bundled MD5 library forced" >&6; }
- ENABLE_BUNDLED_MD5=1
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** use of system MD5 library forced" >&5
-$as_echo "*** use of system MD5 library forced" >&6; }
+HAVE_OPENSSL_EVP_MD5=0
+HAVE_OPENSSL_MD5=0
+ENABLE_OPENSSL_EVP_MD5=0
+ENABLE_OPENSSL_MD5=0
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: *** check for OpenSSL EVP MD5" >&5
+$as_echo "*** check for OpenSSL EVP MD5" >&6; }
+ac_fn_c_check_header_mongrel "$LINENO" "openssl/evp.h" "ac_cv_header_openssl_evp_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_evp_h" = xyes; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: openssl/evp.h header file found" >&5
+$as_echo "openssl/evp.h header file found" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_DigestInit_ex in -lcrypto" >&5
+$as_echo_n "checking for EVP_DigestInit_ex in -lcrypto... " >&6; }
+if ${ac_cv_lib_crypto_EVP_DigestInit_ex+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrypto $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char EVP_DigestInit_ex ();
+int
+main ()
+{
+return EVP_DigestInit_ex ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_crypto_EVP_DigestInit_ex=yes
+else
+ ac_cv_lib_crypto_EVP_DigestInit_ex=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_DigestInit_ex" >&5
+$as_echo "$ac_cv_lib_crypto_EVP_DigestInit_ex" >&6; }
+if test "x$ac_cv_lib_crypto_EVP_DigestInit_ex" = xyes; then :
+
+ LDFLAGS_ORIG="$LDFLAGS"
+ LDFLAGS="-lcrypto $LDFLAGS"
+ HAVE_OPENSSL_EVP_MD5=1
+ for ac_func in EVP_MD_CTX_new EVP_md5 EVP_DigestInit_ex EVP_DigestUpdate EVP_DigestFinal_ex EVP_MD_CTX_free
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: OpenSSL crypto library DOES NOT support MD5 via EVP" >&5
+$as_echo "$as_me: WARNING: OpenSSL crypto library DOES NOT support MD5 via EVP" >&2;}
+ HAVE_OPENSSL_EVP_MD5=0
+
+fi
+done
+
+ LDFLAGS="$LDFLAGS_ORIG"
+
+ if test "$HAVE_OPENSSL_EVP_MD5" = "1"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** OpenSSL crypto library supports MD5 via EVP implementation" >&5
+$as_echo "*** OpenSSL crypto library supports MD5 via EVP implementation" >&6; }
fi
else
- ac_fn_c_check_header_mongrel "$LINENO" "openssl/md5.h" "ac_cv_header_openssl_md5_h" "$ac_includes_default"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: OpenSSL crypto library DOES NOT support MD5 via EVP" >&5
+$as_echo "$as_me: WARNING: OpenSSL crypto library DOES NOT support MD5 via EVP" >&2;}
+
+fi
+
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: openssl/evp.h header file not found" >&5
+$as_echo "$as_me: WARNING: openssl/evp.h header file not found" >&2;}
+
+fi
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: *** check for OpenSSL legacy MD5" >&5
+$as_echo "*** check for OpenSSL legacy MD5" >&6; }
+ac_fn_c_check_header_mongrel "$LINENO" "openssl/md5.h" "ac_cv_header_openssl_md5_h" "$ac_includes_default"
if test "x$ac_cv_header_openssl_md5_h" = xyes; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** openssl/md5.h header file found" >&5
-$as_echo "*** openssl/md5.h header file found" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MD5_Init in -lcrypto" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: openssl/md5.h header file found" >&5
+$as_echo "openssl/md5.h header file found" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MD5_Init in -lcrypto" >&5
$as_echo_n "checking for MD5_Init in -lcrypto... " >&6; }
if ${ac_cv_lib_crypto_MD5_Init+:} false; then :
$as_echo_n "(cached) " >&6
@@ -4462,8 +4554,10 @@
$as_echo "$ac_cv_lib_crypto_MD5_Init" >&6; }
if test "x$ac_cv_lib_crypto_MD5_Init" = xyes; then :
- LDFLAGS="-lcrypto $LDFLAGS"
- for ac_func in MD5_Init MD5_Update MD5_Final
+ LDFLAGS_ORIG="$LDFLAGS"
+ LDFLAGS="-lcrypto $LDFLAGS"
+ HAVE_OPENSSL_MD5=1
+ for ac_func in MD5_Init MD5_Update MD5_Final
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -4472,41 +4566,100 @@
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
- md5_found="yes"
else
- ENABLE_BUNDLED_MD5=1
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL crypto library supports MD5 via legacy implementation" >&5
+$as_echo "OpenSSL crypto library supports MD5 via legacy implementation" >&6; }
+ HAVE_OPENSSL_MD5=0
fi
done
- if test "$md5_found" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** use of system MD5 library autoselected" >&5
-$as_echo "*** use of system MD5 library autoselected" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** use of bundled MD5 library autoselected" >&5
-$as_echo "*** use of bundled MD5 library autoselected" >&6; }
- fi
+ LDFLAGS="$LDFLAGS_ORIG"
+
+ if test "$HAVE_OPENSSL_MD5" = "1"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** OpenSSL crypto library supports MD5 via legacy implementation" >&5
+$as_echo "*** OpenSSL crypto library supports MD5 via legacy implementation" >&6; }
+ fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: crypto library header files were found but not supporting required MD5 functions (will use bundled MD5 function)." >&5
-$as_echo "$as_me: WARNING: crypto library header files were found but not supporting required MD5 functions (will use bundled MD5 function)." >&2;}
- ENABLE_BUNDLED_MD5=1
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: OpenSSL crypto library DOES NOT support MD5 via legacy implementation" >&5
+$as_echo "$as_me: WARNING: OpenSSL crypto library DOES NOT support MD5 via legacy implementation" >&2;}
fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: openssl/md5.h header file not found (will use bundled MD5 function)." >&5
-$as_echo "$as_me: WARNING: openssl/md5.h header file not found (will use bundled MD5 function)." >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: openssl/md5.h header file not found" >&5
+$as_echo "$as_me: WARNING: openssl/md5.h header file not found" >&2;}
+
+fi
+
+
+
+# Check whether --enable-bundled-md5 was given.
+if test "${enable_bundled_md5+set}" = set; then :
+ enableval=$enable_bundled_md5;
+ if test "$enable_bundled_md5" = "yes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** use of bundled MD5 library forced" >&5
+$as_echo "*** use of bundled MD5 library forced" >&6; }
ENABLE_BUNDLED_MD5=1
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** use of OpenSSL MD5 library forced" >&5
+$as_echo "*** use of OpenSSL MD5 library forced" >&6; }
+ fi
+
+else
+
+ if test "$HAVE_OPENSSL_EVP_MD5" = "0"; then
+ if test "$HAVE_OPENSSL_MD5" = "0"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** use of bundled MD5 library autoselected because no OpenSSL suppport found" >&5
+$as_echo "*** use of bundled MD5 library autoselected because no OpenSSL suppport found" >&6; }
+ ENABLE_BUNDLED_MD5=1
+ fi
+ fi
+
+
+fi
+
+
+if test "$HAVE_OPENSSL_EVP_MD5" = "1"; then
+ # precedence
+ ENABLE_OPENSSL_EVP_MD5=1
+else
+ if test "$HAVE_OPENSSL_MD5" = "1"; then
+ # fallback
+ ENABLE_OPENSSL_MD5=1
+ fi
+fi
+
+# Check whether --enable-openssl-evp-md5 was given.
+if test "${enable_openssl_evp_md5+set}" = set; then :
+ enableval=$enable_openssl_evp_md5;
+ if test "$enable_openssl_evp_md5" = "yes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** use of OpenSSL EVP MD5 implementation forced" >&5
+$as_echo "*** use of OpenSSL EVP MD5 implementation forced" >&6; }
+ ENABLE_OPENSSL_EVP_MD5=1
+ ENABLE_OPENSSL_MD5=0
+ fi
+
fi
+# Check whether --enable-openssl-md5 was given.
+if test "${enable_openssl_md5+set}" = set; then :
+ enableval=$enable_openssl_md5;
+ if test "$enable_openssl_md5" = "yes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** use of OpenSSL legacy MD5 implementation forced" >&5
+$as_echo "*** use of OpenSSL legacy MD5 implementation forced" >&6; }
+ ENABLE_OPENSSL_EVP_MD5=0
+ ENABLE_OPENSSL_MD5=1
+ fi
+
fi
@@ -4518,20 +4671,42 @@
;;
esac
- GETOPT_INCLUDE=-I../md5
+ MD5_INCLUDE=-I../md5
$as_echo "#define ENABLE_BUNDLED_MD5 1" >>confdefs.h
else
- LDFLAGS_EXTRA="-lcrypto $LDFLAGS_EXTRA"
- LDFLAGS_EXTRA_MOD_IPV6CALC="-lcrypto $LDFLAGS_EXTRA_MOD_IPV6CALC"
- LDFLAGS_EXTRA_STATIC="-lcrypto -lz -ldl $LDFLAGS_EXTRA_STATIC"
+ if test "$ENABLE_OPENSSL_EVP_MD5" = "1"; then
+ LDFLAGS_EXTRA="-lcrypto $LDFLAGS_EXTRA"
+ LDFLAGS_EXTRA_MOD_IPV6CALC="-lcrypto $LDFLAGS_EXTRA_MOD_IPV6CALC"
+ LDFLAGS_EXTRA_STATIC="-lcrypto -lz -ldl -lpthread -lc $LDFLAGS_EXTRA_STATIC"
+
+
+$as_echo "#define ENABLE_OPENSSL_EVP_MD5 1" >>confdefs.h
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** use of OpenSSL EVP MD5 implementation" >&5
+$as_echo "*** use of OpenSSL EVP MD5 implementation" >&6; }
+ fi
+
+ if test "$ENABLE_OPENSSL_MD5" = "1"; then
+ LDFLAGS_EXTRA="-lcrypto $LDFLAGS_EXTRA"
+ LDFLAGS_EXTRA_MOD_IPV6CALC="-lcrypto $LDFLAGS_EXTRA_MOD_IPV6CALC"
+ LDFLAGS_EXTRA_STATIC="-lcrypto -lz -ldl $LDFLAGS_EXTRA_STATIC"
+
+
+$as_echo "#define ENABLE_OPENSSL_MD5 1" >>confdefs.h
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** use of OpenSSL legacy MD5 implementation" >&5
+$as_echo "*** use of OpenSSL legacy MD5 implementation" >&6; }
+ fi
fi
+
+
geoip_db_default="/usr/share/GeoIP"
ip2location_db_default="/usr/share/IP2Location"
dbip_db_default="/usr/share/DBIP"
@@ -4714,6 +4889,7 @@
DB_IPV4="$enable_builtin"
DB_IPV6="$enable_builtin"
+
fi
@@ -4864,10 +5040,6 @@
MMDB_DYN="yes"
fi
-else
-
- true
-
fi
@@ -5205,10 +5377,6 @@
IP2LOCATION_DYN="yes"
fi
-else
-
- true
-
fi
@@ -7399,14 +7567,13 @@
$as_echo "*** CFLAGS_EXTRA =$CFLAGS_EXTRA" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: *** LDFLAGS_EXTRA =$LDFLAGS_EXTRA" >&5
$as_echo "*** LDFLAGS_EXTRA =$LDFLAGS_EXTRA" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: *** LDFLAGS_EXTRA_STATIC =$LDFLAGS_EXTRA_STATIC" >&5
+$as_echo "*** LDFLAGS_EXTRA_STATIC =$LDFLAGS_EXTRA_STATIC" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: *** LD_LIBRARY_PATH =$LD_LIBRARY_PATH" >&5
$as_echo "*** LD_LIBRARY_PATH =$LD_LIBRARY_PATH" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: *** LD_LIBRARY_PATH_BASIC =$LD_LIBRARY_PATH_BASIC" >&5
$as_echo "*** LD_LIBRARY_PATH_BASIC =$LD_LIBRARY_PATH_BASIC" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
-$as_echo "" >&6; }
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: *** CPPLAGS =$CPPLAGS" >&5
$as_echo "*** CPPLAGS =$CPPLAGS" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: *** CFLAGS =$CFLAGS" >&5
@@ -7416,6 +7583,20 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
$as_echo "" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: *** HAVE_OPENSSL_EVP_MD5 =$HAVE_OPENSSL_EVP_MD5" >&5
+$as_echo "*** HAVE_OPENSSL_EVP_MD5 =$HAVE_OPENSSL_EVP_MD5" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: *** HAVE_OPENSSL_MD5 =$HAVE_OPENSSL_MD5" >&5
+$as_echo "*** HAVE_OPENSSL_MD5 =$HAVE_OPENSSL_MD5" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: *** ENABLE_BUNDLED_MD5 =$ENABLE_BUNDLED_MD5" >&5
+$as_echo "*** ENABLE_BUNDLED_MD5 =$ENABLE_BUNDLED_MD5" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: *** ENABLE_OPENSSL_EVP_MD5 =$ENABLE_OPENSSL_EVP_MD5" >&5
+$as_echo "*** ENABLE_OPENSSL_EVP_MD5 =$ENABLE_OPENSSL_EVP_MD5" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: *** ENABLE_OPENSSL_MD5 =$ENABLE_OPENSSL_MD5" >&5
+$as_echo "*** ENABLE_OPENSSL_MD5 =$ENABLE_OPENSSL_MD5" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
+$as_echo "" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: *** PACKAGE_VERSION_NUMERIC =$PACKAGE_VERSION_NUMERIC" >&5
$as_echo "*** PACKAGE_VERSION_NUMERIC =$PACKAGE_VERSION_NUMERIC" >&6; }
diff -urN ipv6calc-3.2.0/configure.in ipv6calc-openssl-3/configure.in
--- ipv6calc-3.2.0/configure.in 2021-07-14 05:25:36.000000000 +0200
+++ ipv6calc-openssl-3/configure.in 2021-09-16 21:09:37.000000000 +0200
@@ -1,6 +1,6 @@
dnl Project : ipv6calc
dnl File : configure.in
-dnl Version : $Id: 68ed8bfe35425698dc2cdf5121ed171e39813f84 $
+dnl Version : $Id: ac56fd3b0fe89d34909a0c57d11f5cadf046ac24 $
dnl Copyright: 2001-2021 by Peter Bieringer <pb (at) bieringer.de>
dnl Process this file with autoconf to produce a configure script.
@@ -63,11 +63,11 @@
AC_TYPE_SIZE_T
AC_C_BIGENDIAN
-dnl Copy inital provided CFLAGS into CFLAGS_EXTRA
-CFLAGS_EXTRA=$CFLAGS
+dnl Default extra CFLAGS
+CFLAGS_EXTRA=-fPIC
dnl Copy inital provided LDFLAGS into LDFLAGS_EXTRA
-LDFLAGS_EXTRA=$LDFLAGS
+dnl LDFLAGS_EXTRA=$LDFLAGS // not required ?!
dnl *************************************************
@@ -252,6 +252,64 @@
dnl MD5 library
dnl *************************************************
ENABLE_BUNDLED_MD5=0
+HAVE_OPENSSL_EVP_MD5=0
+HAVE_OPENSSL_MD5=0
+ENABLE_OPENSSL_EVP_MD5=0
+ENABLE_OPENSSL_MD5=0
+
+dnl Check capabilities
+AC_MSG_RESULT([*** check for OpenSSL EVP MD5])
+AC_CHECK_HEADER(openssl/evp.h, [
+ AC_MSG_RESULT([openssl/evp.h header file found])
+ AC_CHECK_LIB(crypto, EVP_DigestInit_ex,
+ [
+ LDFLAGS_ORIG="$LDFLAGS"
+ LDFLAGS="-lcrypto $LDFLAGS"
+ HAVE_OPENSSL_EVP_MD5=1
+ AC_CHECK_FUNCS(EVP_MD_CTX_new EVP_md5 EVP_DigestInit_ex EVP_DigestUpdate EVP_DigestFinal_ex EVP_MD_CTX_free,
+ [
+ ],[
+ AC_MSG_WARN([OpenSSL crypto library DOES NOT support MD5 via EVP])
+ HAVE_OPENSSL_EVP_MD5=0
+ ])
+ LDFLAGS="$LDFLAGS_ORIG"
+
+ if test "$HAVE_OPENSSL_EVP_MD5" = "1"; then
+ AC_MSG_RESULT([*** OpenSSL crypto library supports MD5 via EVP implementation])
+ fi
+ ],[
+ AC_MSG_WARN([OpenSSL crypto library DOES NOT support MD5 via EVP])
+ ])
+],[
+ AC_MSG_WARN([openssl/evp.h header file not found])
+])
+
+AC_MSG_RESULT([*** check for OpenSSL legacy MD5])
+AC_CHECK_HEADER(openssl/md5.h, [
+ AC_MSG_RESULT([openssl/md5.h header file found])
+ AC_CHECK_LIB(crypto, MD5_Init,
+ [
+ LDFLAGS_ORIG="$LDFLAGS"
+ LDFLAGS="-lcrypto $LDFLAGS"
+ HAVE_OPENSSL_MD5=1
+ AC_CHECK_FUNCS(MD5_Init MD5_Update MD5_Final,
+ [
+ ],[
+ AC_MSG_RESULT([OpenSSL crypto library supports MD5 via legacy implementation])
+ HAVE_OPENSSL_MD5=0
+ ])
+ LDFLAGS="$LDFLAGS_ORIG"
+
+ if test "$HAVE_OPENSSL_MD5" = "1"; then
+ AC_MSG_RESULT([*** OpenSSL crypto library supports MD5 via legacy implementation])
+ fi
+ ],[
+ AC_MSG_WARN([OpenSSL crypto library DOES NOT support MD5 via legacy implementation])
+ ])
+],[
+ AC_MSG_WARN([openssl/md5.h header file not found])
+])
+
AC_ARG_ENABLE(
[bundled-md5],
AS_HELP_STRING([--enable-bundled-md5],
@@ -261,51 +319,82 @@
AC_MSG_RESULT([*** use of bundled MD5 library forced])
ENABLE_BUNDLED_MD5=1
else
- AC_MSG_RESULT([*** use of system MD5 library forced])
+ AC_MSG_RESULT([*** use of OpenSSL MD5 library forced])
fi
- ],
- [
- AC_CHECK_HEADER(openssl/md5.h, [
- AC_MSG_RESULT([*** openssl/md5.h header file found])
- AC_CHECK_LIB(crypto, MD5_Init,
- [
- LDFLAGS="-lcrypto $LDFLAGS"
- AC_CHECK_FUNCS(MD5_Init MD5_Update MD5_Final,
- [
- md5_found="yes"
- ],
- [
- ENABLE_BUNDLED_MD5=1
- ])
- if test "$md5_found" = "yes"; then
- AC_MSG_RESULT([*** use of system MD5 library autoselected])
- else
- AC_MSG_RESULT([*** use of bundled MD5 library autoselected])
- fi
- ],
- [
- AC_MSG_WARN([crypto library header files were found but not supporting required MD5 functions (will use bundled MD5 function).])
- ENABLE_BUNDLED_MD5=1
- ])
- ], [
- AC_MSG_WARN([openssl/md5.h header file not found (will use bundled MD5 function).])
- ENABLE_BUNDLED_MD5=1
- ])
],[
- ])
+ if test "$HAVE_OPENSSL_EVP_MD5" = "0"; then
+ if test "$HAVE_OPENSSL_MD5" = "0"; then
+ AC_MSG_RESULT([*** use of bundled MD5 library autoselected because no OpenSSL suppport found])
+ ENABLE_BUNDLED_MD5=1
+ fi
+ fi
+ ]
+)
+
+if test "$HAVE_OPENSSL_EVP_MD5" = "1"; then
+ # precedence
+ ENABLE_OPENSSL_EVP_MD5=1
+else
+ if test "$HAVE_OPENSSL_MD5" = "1"; then
+ # fallback
+ ENABLE_OPENSSL_MD5=1
+ fi
+fi
+
+AC_ARG_ENABLE(
+ [openssl-evp-md5],
+ AS_HELP_STRING([--enable-openssl-evp-md5],
+ [Enforce use of OpenSSL EVP MD5 implementation (default: autoselected)]),
+ [
+ if test "$enable_openssl_evp_md5" = "yes"; then
+ AC_MSG_RESULT([*** use of OpenSSL EVP MD5 implementation forced])
+ ENABLE_OPENSSL_EVP_MD5=1
+ ENABLE_OPENSSL_MD5=0
+ fi
+ ]
+)
+
+AC_ARG_ENABLE(
+ [openssl-md5],
+ AS_HELP_STRING([--enable-openssl-md5],
+ [Enforce use of OpenSSL legacy MD5 implementation (default: autoselected)]),
+ [
+ if test "$enable_openssl_md5" = "yes"; then
+ AC_MSG_RESULT([*** use of OpenSSL legacy MD5 implementation forced])
+ ENABLE_OPENSSL_EVP_MD5=0
+ ENABLE_OPENSSL_MD5=1
+ fi
+ ]
+)
if test "$ENABLE_BUNDLED_MD5" = "1"; then
AC_LIBOBJ(../md5/md5)
- GETOPT_INCLUDE=-I../md5
+ MD5_INCLUDE=-I../md5
AC_DEFINE(ENABLE_BUNDLED_MD5, 1, Define if bundled MD5 should be used)
else
- LDFLAGS_EXTRA="-lcrypto $LDFLAGS_EXTRA"
- LDFLAGS_EXTRA_MOD_IPV6CALC="-lcrypto $LDFLAGS_EXTRA_MOD_IPV6CALC"
- LDFLAGS_EXTRA_STATIC="-lcrypto -lz -ldl $LDFLAGS_EXTRA_STATIC"
+ if test "$ENABLE_OPENSSL_EVP_MD5" = "1"; then
+ LDFLAGS_EXTRA="-lcrypto $LDFLAGS_EXTRA"
+ LDFLAGS_EXTRA_MOD_IPV6CALC="-lcrypto $LDFLAGS_EXTRA_MOD_IPV6CALC"
+ LDFLAGS_EXTRA_STATIC="-lcrypto -lz -ldl -lpthread -lc $LDFLAGS_EXTRA_STATIC"
+
+ AC_DEFINE(ENABLE_OPENSSL_EVP_MD5, 1, Define if OpenSSL EVP MD5 should be used)
+ AC_MSG_RESULT([*** use of OpenSSL EVP MD5 implementation])
+ fi
+
+ if test "$ENABLE_OPENSSL_MD5" = "1"; then
+ LDFLAGS_EXTRA="-lcrypto $LDFLAGS_EXTRA"
+ LDFLAGS_EXTRA_MOD_IPV6CALC="-lcrypto $LDFLAGS_EXTRA_MOD_IPV6CALC"
+ LDFLAGS_EXTRA_STATIC="-lcrypto -lz -ldl $LDFLAGS_EXTRA_STATIC"
+
+ AC_DEFINE(ENABLE_OPENSSL_MD5, 1, Define if OpenSSL legacy MD5 should be used)
+ AC_MSG_RESULT([*** use of OpenSSL legacy MD5 implementation])
+ fi
fi
AC_SUBST(MD5_INCLUDE)
AC_SUBST(ENABLE_BUNDLED_MD5)
+AC_SUBST(ENABLE_OPENSSL_EVP_MD5)
+AC_SUBST(ENABLE_OPENSSL_MD5)
dnl *************************************************
@@ -487,9 +576,8 @@
DB_IEEE="$enable_builtin"
DB_IPV4="$enable_builtin"
DB_IPV6="$enable_builtin"
- ],
- [
- ])
+ ]
+)
@@ -585,8 +673,6 @@
if test "$with_mmdb_dynamic" != "no"; then
MMDB_DYN="yes"
fi
- ],[
- true
])
AC_ARG_WITH([mmdb-headers],
@@ -762,8 +848,6 @@
AS_HELP_STRING([--enable-dbip],
[Compatibility Dummy (no longer supported)]),
[
- ],
- [
])
dnl defaults for database directories
@@ -810,8 +894,6 @@
if test "$enable_ip2location_dynamic" != "no"; then
IP2LOCATION_DYN="yes"
fi
- ],[
- true
])
AC_ARG_WITH([ip2location-headers],
@@ -1085,14 +1167,12 @@
AS_HELP_STRING([--enable-geoip],
[Compatibility Dummy (no longer supported)]),
[
- ],[
])
AC_ARG_WITH([geoip-dynamic],
AS_HELP_STRING([--with-geoip-dynamic],
[Compatibility Dummy (no longer supported)]),
[
- ],[
])
AC_ARG_WITH([geoip-headers],
@@ -1117,22 +1197,18 @@
AS_HELP_STRING([--with-geoip-static],
[Compatibility Dummy (no longer supported)]),
[
- ],[
])
AC_ARG_WITH([geoip-dyn-lib],
AS_HELP_STRING([--with-geoip-dyn-lib=NAME],
[Compatibility Dummy (no longer supported)]),
[
- ],
- [
])
AC_ARG_WITH([geoip-ipv6-compat],
AS_HELP_STRING([--with-geoip-ipv6-compat],
[Compatibility Dummy (no longer supported)]),
[
- ],[
])
@@ -1349,17 +1425,24 @@
AC_MSG_RESULT([*** CC =$CC])
AC_MSG_RESULT([*** CFLAGS_EXTRA =$CFLAGS_EXTRA])
AC_MSG_RESULT([*** LDFLAGS_EXTRA =$LDFLAGS_EXTRA])
+AC_MSG_RESULT([*** LDFLAGS_EXTRA_STATIC =$LDFLAGS_EXTRA_STATIC])
AC_MSG_RESULT([*** LD_LIBRARY_PATH =$LD_LIBRARY_PATH])
AC_MSG_RESULT([*** LD_LIBRARY_PATH_BASIC =$LD_LIBRARY_PATH_BASIC])
-AC_MSG_RESULT([])
-
AC_MSG_RESULT([*** CPPLAGS =$CPPLAGS])
AC_MSG_RESULT([*** CFLAGS =$CFLAGS])
AC_MSG_RESULT([*** LDFLAGS =$LDFLAGS])
AC_MSG_RESULT([])
+AC_MSG_RESULT([*** HAVE_OPENSSL_EVP_MD5 =$HAVE_OPENSSL_EVP_MD5])
+AC_MSG_RESULT([*** HAVE_OPENSSL_MD5 =$HAVE_OPENSSL_MD5])
+AC_MSG_RESULT([*** ENABLE_BUNDLED_MD5 =$ENABLE_BUNDLED_MD5])
+AC_MSG_RESULT([*** ENABLE_OPENSSL_EVP_MD5 =$ENABLE_OPENSSL_EVP_MD5])
+AC_MSG_RESULT([*** ENABLE_OPENSSL_MD5 =$ENABLE_OPENSSL_MD5])
+
+AC_MSG_RESULT([])
+
AC_MSG_RESULT([*** PACKAGE_VERSION_NUMERIC =$PACKAGE_VERSION_NUMERIC])
AC_MSG_RESULT([*** PACKAGE_VERSION_STRING =$PACKAGE_VERSION_STRING])
AC_MSG_RESULT([*** API_VERSION_NUMERIC =$API_VERSION_NUMERIC])
diff -urN ipv6calc-3.2.0/doc/ipv6calc.html ipv6calc-openssl-3/doc/ipv6calc.html
--- ipv6calc-3.2.0/doc/ipv6calc.html 2021-07-14 05:25:36.000000000 +0200
+++ ipv6calc-openssl-3/doc/ipv6calc.html 2021-09-16 21:09:37.000000000 +0200
@@ -778,9 +778,9 @@
TARGET="_top"
>DeepSpace6 / anonymous FTP</A
> or HTTP <A
-HREF="http://www.deepspace6.net/ftp/"
+HREF="http://www.deepspace6.net/ftp/pub/ds6/sources/ipv6calc/"
TARGET="_top"
->http://www.deepspace6.net/ftp/</A
+>www.deepspace6.net mapped FTP</A
></P
></LI
><LI
@@ -788,11 +788,11 @@
>via <A
HREF="ftp://ftp.bieringer.de/pub/linux/IPv6/ipv6calc/"
TARGET="_top"
->ftp://ftp.bieringer.de/pub/linux/IPv6/ipv6calc/</A
+>ftp.bieringer.de / anonymous FTP</A
> or HTTP at <A
-HREF="http://www.bieringer.de/ftp/"
+HREF="http://www.bieringer.de/ftp/pub/linux/IPv6/ipv6calc/"
TARGET="_top"
->http://www.bieringer.de/ftp/</A
+>www.bieringer.de mapped FTP</A
></P
></LI
></UL
diff -urN ipv6calc-3.2.0/doc/ipv6calc.lyx ipv6calc-openssl-3/doc/ipv6calc.lyx
--- ipv6calc-3.2.0/doc/ipv6calc.lyx 2021-07-14 05:25:36.000000000 +0200
+++ ipv6calc-openssl-3/doc/ipv6calc.lyx 2021-09-16 21:09:37.000000000 +0200
@@ -564,8 +564,8 @@
or HTTP
\begin_inset CommandInset href
LatexCommand href
-name "http://www.deepspace6.net/ftp/"
-target "http://www.deepspace6.net/ftp/"
+name "www.deepspace6.net mapped FTP"
+target "http://www.deepspace6.net/ftp/pub/ds6/sources/ipv6calc/"
literal "false"
\end_inset
@@ -577,7 +577,7 @@
via
\begin_inset CommandInset href
LatexCommand href
-name "ftp://ftp.bieringer.de/pub/linux/IPv6/ipv6calc/"
+name "ftp.bieringer.de / anonymous FTP"
target "ftp://ftp.bieringer.de/pub/linux/IPv6/ipv6calc/"
literal "false"
@@ -586,8 +586,8 @@
or HTTP at
\begin_inset CommandInset href
LatexCommand href
-name "http://www.bieringer.de/ftp/"
-target "http://www.bieringer.de/ftp/"
+name "www.bieringer.de mapped FTP"
+target "http://www.bieringer.de/ftp/pub/linux/IPv6/ipv6calc/"
literal "false"
\end_inset
@@ -619,12 +619,10 @@
\end_layout
\begin_layout Code
-
Key fingerprint: AAB3 8CB7 97C7 50C7 78C6 08C6 DDEB 141D F738 0F61
\end_layout
\begin_layout Code
-
uid: Peter Bieringer (Code Signing Key 2013) <code@bieringer.de>
\end_layout
@@ -633,7 +631,6 @@
\end_layout
\begin_layout Code
-
$ rpmbuild -ta path/to/ipv6calc-$version.tar.gz
\end_layout
@@ -643,27 +640,22 @@
\end_layout
\begin_layout Code
-
--without ip2location
\end_layout
\begin_layout Code
-
--without mmdb (which disables GeoIP v2 and db-ip.com v2)
\end_layout
\begin_layout Code
-
--without external
\end_layout
\begin_layout Code
-
--without shared
\end_layout
\begin_layout Code
-
--without mod_ipv6calc
\end_layout
@@ -967,7 +959,6 @@
\end_layout
\begin_layout Code
-
--disable-dynamic-load Disable dynamic load of libraries (default: enabled)
\end_layout
@@ -976,61 +967,50 @@
\end_layout
\begin_layout Code
-
--disable-db-ieee Disable build-in IEEE database (default: enabled)
\end_layout
\begin_layout Code
-
--disable-db-ipv4 Disable build-in IPv4 database (default: enabled)
\end_layout
\begin_layout Code
-
--disable-db-ipv6 Disable build-in IPv6 database (default: enabled)
\end_layout
\begin_layout Code
-
--disable-db-as-registry Disable built-in AS-to-Registry database (default:
enabled)
\end_layout
\begin_layout Code
-
--disable-db-cc-registry Disable built-in CountryCode-to-Registry database
(default: enabled)
\end_layout
\begin_layout Code
-
--disable-geoip2 Disable MaxMindDB support for GeoIP (default: enabled)
\end_layout
\begin_layout Code
-
--disable-dbip2 Disable MaxMindDB support for db-ip.com (default:
enabled)
\end_layout
\begin_layout Code
-
--enable-mmdb Enable MaxMindDB support (GeoIP/db-ip.com) (default:
disabled)
\end_layout
\begin_layout Code
-
--enable-external Enable external db support (default: disabled)
\end_layout
\begin_layout Code
-
--enable-ip2location Enable IP2Location support (default: disabled)
\end_layout
\begin_layout Code
-
--enable-mod_ipv6calc Enable build of mod_ipv6calc for Apache (default:
disabled)
\end_layout
@@ -1040,23 +1020,19 @@
\end_layout
\begin_layout Code
-
--with-mmdb-dynamic Enable use of dynamic loading of MaxMindDB library
(default=no)
\end_layout
\begin_layout Code
-
--with-mmdb-headers=DIR MaxMindDB include files location
\end_layout
\begin_layout Code
-
--with-mmdb-lib=DIR MaxMindDB library location
\end_layout
\begin_layout Code
-
--with-mmdb-dyn-lib=NAME Use specified MaxMindDB dynamic library, default:
libmaxminddb.so.0
\end_layout
@@ -1066,42 +1042,35 @@
\end_layout
\begin_layout Code
-
--with-ip2location-headers=DIR IP2Location include files location
\end_layout
\begin_layout Code
-
--with-ip2location-headers-fallback IP2Location include files from internal
fallback location (only usable with dynamic load option)
\end_layout
\begin_layout Code
-
--with-ip2location-lib=FILE IP2Location library location
\end_layout
\begin_layout Code
-
--with-ip2location-static Explicitly link IP2Location statically
(default=no)
\end_layout
\begin_layout Code
-
--with-ip2location-dynamic Enable use of dynamic loading of IP2Location
library (default=no)
\end_layout
\begin_layout Code
-
--with-ip2location-db=DIR Use specified IP2Location database directory
, default: /usr/share/IP2Location
\end_layout
\begin_layout Code
-
--with-ip2location-dyn-lib=NAME Use specified IP2Location dynamic library,
default: libIP2Location.so
\end_layout
@@ -1111,7 +1080,6 @@
\end_layout
\begin_layout Code
-
--with-geoip-db=DIR Use specified GeoIP database directory,
default: /usr/share/GeoIP
\end_layout
@@ -1121,7 +1089,6 @@
\end_layout
\begin_layout Code
-
--with-dbip-db=DIR Use specified db-ip.com database directory, default:
/usr/share/DBIP
\end_layout
@@ -1131,7 +1098,6 @@
\end_layout
\begin_layout Code
-
--with-external-db=DIR Use specified external database directory, default:
/usr/share/ipv6calc/db
\end_layout
@@ -1141,7 +1107,6 @@
\end_layout
\begin_layout Code
-
--with-apxs=NAME name of the apxs executable (apxs)
\end_layout
@@ -1150,7 +1115,6 @@
\end_layout
\begin_layout Code
-
--enable-shared Enable shared library build (default: disabled)
\end_layout
@@ -1159,13 +1123,11 @@
\end_layout
\begin_layout Code
-
--enable-bundled-getopt Enable bundled getopt library (default:
autoselected)
\end_layout
\begin_layout Code
-
--enable-bundled-md5 Enable bundled MD5 library (default: autoselecte
d)
\end_layout
@@ -1179,7 +1141,6 @@
\end_layout
\begin_layout Code
-
$ make
\end_layout
@@ -1188,7 +1149,6 @@
\end_layout
\begin_layout Code
-
$ make test
\end_layout
@@ -1198,7 +1158,6 @@
\end_layout
\begin_layout Code
-
$ make test-minimal
\end_layout
@@ -1212,114 +1171,92 @@
\end_layout
\begin_layout Code
-
$ ./autogen.sh -h
\end_layout
\begin_layout Code
-
Supported options:
\end_layout
\begin_layout Code
-
-?|-h|--help : this help
\end_layout
\begin_layout Code
-
-n|--no-make : stop before running 'make'
\end_layout
\begin_layout Code
-
-a|--all : enable GeoIP/IP2Location/db-ip.com/External/mod_ipv6calc
support
\end_layout
\begin_layout Code
-
-A|--ALL : enable GeoIP/IP2Location/db-ip.com/External/mod_ipv6calc
support with dynamic library support
\end_layout
\begin_layout Code
-
-m|--mmdb : enable MaxMindDB support (GeoIP/db-ip.com)
\end_layout
\begin_layout Code
-
--mmdb-dyn|-M : switch to dynamic library loading of MaxMindDB
\end_layout
\begin_layout Code
-
--disable-geoip2 : disable MaxMindDB support for GeoIP
\end_layout
\begin_layout Code
-
--disable-dbip2 : disable MaxMindDB support for db-ip.com
\end_layout
\begin_layout Code
-
-i|--ip2location : enable IP2Location support
\end_layout
\begin_layout Code
-
--ip2location-dyn|-I: switch to dynamic library loading of IP2Location
\end_layout
\begin_layout Code
-
-e|--external : enable external database support
\end_layout
\begin_layout Code
-
--disable-db-ieee : disable built-in IEEE database
\end_layout
\begin_layout Code
-
--disable-db-ipv4 : disable built-in IPv4 database
\end_layout
\begin_layout Code
-
--disable-db-ipv6 : disable built-in IPv6 database
\end_layout
\begin_layout Code
-
-S : enable shared library mode
\end_layout
\begin_layout Code
-
--no-static-build : skip static build
\end_layout
\begin_layout Code
-
--no-test : skip 'make test'
\end_layout
\begin_layout Code
-
--clang : use 'clang' instead of default (usually 'gcc')
\end_layout
\begin_layout Code
-
--m32 : compile for 32-bit
\end_layout
\begin_layout Code
-
--relax : don't stop on compiler warnings
\end_layout
@@ -1443,12 +1380,10 @@
\end_layout
\begin_layout Code
-
$ ipv6calc -v
\end_layout
\begin_layout Code
-
ipv6calc: version 3.0.0 GeoIP GeoIPv6 IP2Location IP2Location6 DBIPv4 DBIPv6
DB_AS_REG DB_IPV4_REG DB_IPV6_REG DB_IPV4_AS DB_IPV6_AS DB_IPV4_CC DB_IPV6_CC
DB_IPV4_COUNTRY DB_IPV6_COUNTRY DB_IPV4_CITY DB_IPV6_CITY DB_IPV4_REGION
@@ -1471,12 +1406,10 @@
\end_layout
\begin_layout Code
-
$ ipv6calc -vv
\end_layout
\begin_layout Code
-
ipv6calc: version 3.0.0 GeoIP GeoIPv6 IP2Location IP2Location6 DBIPv4 DBIPv6
DB_AS_REG DB_IPV4_REG DB_IPV6_REG DB_IPV4_AS DB_IPV6_AS DB_IPV4_CC DB_IPV6_CC
DB_IPV4_COUNTRY DB_IPV6_COUNTRY DB_IPV4_CITY DB_IPV6_CITY DB_IPV4_REGION
@@ -1486,514 +1419,426 @@
\end_layout
\begin_layout Code
-
Capabilities: GeoIP2(linked/MaxMindDB) IP2Location(linked) DBIP2(linked/MaxMindD
B) ExternalDatabase DB_AS_REG(BuiltIn) DB_CC_REG(BuiltIn) DB_IPV4_REG(BuiltIn)
DB_IPV6_REG(BuiltIn) DB_IEEE(BuiltIn)
\end_layout
\begin_layout Code
-
Internal main library version: 3.0.0 API: 3.0.0 (built-in)
\end_layout
\begin_layout Code
-
Internal database library version: 3.0.0 API: 3.0.0 (built-in)
\end_layout
\begin_layout Code
-
Compiled: Oct 13 2020 19:38:16
\end_layout
\begin_layout Code
-
MaxMindDB for GeoIP2/DBIP2 support enabled
\end_layout
\begin_layout Code
-
MaxMindDB dynamic library version (on this system): 1.4.2
\end_layout
\begin_layout Code
-
GeoIP2 (MaxMindDB) support enabled
\end_layout
\begin_layout Code
-
GeoIP2 available databases: Country4=1 Country6=1 ASN4=1 ASN6=1 City4=1
City6=1
\end_layout
\begin_layout Code
-
IP2Location support enabled, compiled with API version: 8.2.0, dynamically
linked with version: API=8.2.0 Major=8
\end_layout
\begin_layout Code
-
IP2Location available databases: Country4=1 Country6=1 ASN4=0 ASN6=0 City4=1
City6=1
\end_layout
\begin_layout Code
-
DBIP2 (MaxMindDB) support enabled
\end_layout
\begin_layout Code
-
DBIP2 available databases: Country4=1 Country6=1 ASN4=1 ASN6=1 City4=1 City6=1
\end_layout
\begin_layout Code
-
External available databases: Country4=1 Country6=1 IPV4_REG=1 IPV6_REG=1
\end_layout
\begin_layout Code
-
BuiltIn databases available: ASN_REG=1 IPV4_REG=1 IPV6_REG=1 IEEE=1 CC_REG=1
\end_layout
\begin_layout Code
-
DB features: 0xff07ffff
\end_layout
\begin_layout Code
-
GeoIP(MaxMindDB): features available/implemented: 0x03063ff0/0x03063ff0
(100%)
\end_layout
\begin_layout Code
-
GeoIP2: info of available databases in directory: /usr/share/GeoIP
\end_layout
\begin_layout Code
-
GeoIP2: IPv4/v6 CountryCode (FREE) : [1] GeoLite2-Country.mmdb
(GeoLite2-Country Copyright (c) 2019 MaxMind All Rights Reserved, created:
20191217-195954 UTC)
\end_layout
\begin_layout Code
-
GeoIP2: IPv4/v6 City (FREE) : [2] GeoLite2-City.mmdb
(GeoLite2-City Copyright (c) 2019 MaxMind All Rights Reserved, created:
20191217-200126 UTC)
\end_layout
\begin_layout Code
-
GeoIP2: IPv4/v6 ASN (FREE) : [3] GeoLite2-ASN.mmdb
(GeoLite2-ASN Copyright (c) 2019 MaxMind All Rights Reserved, created:
20190122-114228 UTC)
\end_layout
\begin_layout Code
-
GeoIP2: detected best databases FREE Country4=2 Country6=2 City4=2
City6=2
\end_layout
\begin_layout Code
-
GeoIP2: detected best databases COMM Country4=0 Country6=0 City4=0
City6=0
\end_layout
\begin_layout Code
-
GeoIP2: selected best databases normal Country4=2 Country6=2 City4=2
City6=2
\end_layout
\begin_layout Code
-
GeoIP2: selected best databases method: COMM older than 12 months are deselected
in case of FREE is available
\end_layout
\begin_layout Code
-
GeoIP2: selected best databases method: COMM/FREE with more features are
only selected in case not older than 1 months of already found COMM/FREE
\end_layout
\begin_layout Code
-
IP2Location: features available/implemented: 0x0c003fc0/0x0c003fc0 (100%)
\end_layout
\begin_layout Code
-
IP2Location: info of available databases in directory: /usr/share/IP2Location
\end_layout
\begin_layout Code
-
IP2Location: Copyright (c) IP2Location All Rights Reserved
\end_layout
\begin_layout Code
-
IP2Location: IPv4 Country :[ 49] IP-COUNTRY-S
AMPLE.BIN (IP2L-DB1 IPv4 IPv6 SAMPLE 20201005)
\end_layout
\begin_layout Code
-
IP2Location: IPv4 Co/Re/Ci/LaLo/ZI/TZ/IS/Do/Ne/Ar/We/Mo :[ 68] IP-COUNTRY-R
EGION-CITY-LATITUDE-LONGITUDE-ZIPCODE-TIMEZONE-ISP-DOMAIN-NETSPEED-AREACODE-WEAT
HER-MOBILE-SAMPLE.BIN (IP2L-DB20 IPv4 IPv6 SAMPLE 20190129)
\end_layout
\begin_layout Code
-
IP2Location: IPv4 Co/Re/Ci/LaLo/ZI/TZ/IS/Do/Ne/Ar/We/Mo/El/Us:[ 72] IP-COUNTRY-R
EGION-CITY-LATITUDE-LONGITUDE-ZIPCODE-TIMEZONE-ISP-DOMAIN-NETSPEED-AREACODE-WEAT
HER-MOBILE-ELEVATION-USAGETYPE-SAMPLE.BIN (IP2L-DB24 IPv4 IPv6 SAMPLE 20190129)
\end_layout
\begin_layout Code
-
IP2Location: IPv6 Country :[ 73] IPV6-COUNTRY.
SAMPLE.BIN (IP2L-DB1 IPv4 IPv6 SAMPLE 20201005)
\end_layout
\begin_layout Code
-
IP2Location: IPv6 Co/Re/Ci/LaLo/ZI/TZ/IS/Do/Ne/Ar/We/Mo :[ 92] IPV6-COUNTRY
-REGION-CITY-LATITUDE-LONGITUDE-ZIPCODE-TIMEZONE-ISP-DOMAIN-NETSPEED-AREACODE-WE
ATHER-MOBILE.SAMPLE.BIN (IP2L-DB20 IPv4 IPv6 SAMPLE 20171128)
\end_layout
\begin_layout Code
-
IP2Location: IPv6 Co/Re/Ci/LaLo/ZI/TZ/IS/Do/Ne/Ar/We/Mo/El/Us:[ 96] IPV6-COUNTRY
-REGION-CITY-LATITUDE-LONGITUDE-ZIPCODE-TIMEZONE-ISP-DOMAIN-NETSPEED-AREACODE-WE
ATHER-MOBILE-ELEVATION-USAGETYPE.SAMPLE.BIN (IP2L-DB24 IPv4 IPv6 SAMPLE 20171128)
\end_layout
\begin_layout Code
-
IP2Location: IPvx Co/Re/Ci/LattLong/ZIP/TZ :[ 35] IPV6-COUNTRY
-REGION-CITY-LATITUDE-LONGITUDE-ZIPCODE-TIMEZONE.BIN (IP2L-DB11 IPv4 IPv6
20181226)
\end_layout
\begin_layout Code
-
IP2Location: detected best databases SAMPLE Country4=49 Country6=73
City4=72 City6=96
\end_layout
\begin_layout Code
-
IP2Location: detected best databases LITE Country4=0 Country6=0
City4=0 City6=0
\end_layout
\begin_layout Code
-
IP2Location: detected best databases COMM Country4=35 Country6=35
City4=35 City6=35
\end_layout
\begin_layout Code
-
IP2Location: selected best databases LI->SA* Country4=0 Country6=0
City4=0 City6=0
\end_layout
\begin_layout Code
-
IP2Location: selected best databases normal Country4=35 Country6=35
City4=35 City6=35
\end_layout
\begin_layout Code
-
IP2Location: selected best databases method: * = autoswitch from LITE to
SAMPLE enabled in case not older than 12 months and having more features
\end_layout
\begin_layout Code
-
IP2Location: selected best databases method: COMM older than 12 months are
deselected in case of LITE is available
\end_layout
\begin_layout Code
-
IP2Location: selected best databases method: COMM/LITE/SAMPLE with more
features are only selected in case not older than 1 months of already found
COMM/LITE/SAMPLE
\end_layout
\begin_layout Code
-
IP2Location: selected best databases method: softlinks: skipped-by-default
\end_layout
\begin_layout Code
-
db-ip.com(MaxMindDB): features available/implemented: 0x30063ff0/0x30063ff0
(100%)
\end_layout
\begin_layout Code
-
DBIP2: info of available databases in directory: /usr/share/DBIP
\end_layout
\begin_layout Code
-
DBIP2: IPv4/v6 CountryCode (FREE) : [1] dbip-country-lite.mmdb
(DBIP-Country-Lite Copyright (c) 2019 db-ip.com All Rights Reserved, created:
20190831-232938 UTC)
\end_layout
\begin_layout Code
-
DBIP2: IPv4/v6 City (FREE) : [2] dbip-city-lite.mmdb
(DBIP-City-Lite Copyright (c) 2019 db-ip.com All Rights Reserved, created:
20190831-233248 UTC)
\end_layout
\begin_layout Code
-
DBIP2: IPv4/v6 Location+ISP (COMM) : [6] dbip-location-isp.mmdb
(DBIP-Location-ISP (compat=Enterprise) Copyright (c) 2019 db-ip.com All
Rights Reserved, created: 20190101-015418 UTC)
\end_layout
\begin_layout Code
-
DBIP2: detected best databases FREE Country4=2 Country6=2 City4=2
City6=2
\end_layout
\begin_layout Code
-
DBIP2: detected best databases COMM Country4=6 Country6=6 City4=6
City6=6
\end_layout
\begin_layout Code
-
DBIP2: selected best databases normal Country4=6 Country6=6 City4=6
City6=6
\end_layout
\begin_layout Code
-
DBIP2: selected best databases method: COMM older than 12 months are deselected
in case of FREE is available
\end_layout
\begin_layout Code
-
DBIP2: selected best databases method: COMM/FREE with more features are
only selected in case not older than 1 months of already found COMM/FREE
\end_layout
\begin_layout Code
-
External: features available/implemented: 0xc00180cc/0xc00180cc (100%)
\end_layout
\begin_layout Code
-
External: info of available databases in directory: /usr/share/ipv6calc/db
\end_layout
\begin_layout Code
-
External: IPv4 Registry : ipv6calc-external-ipv4-registry.db
(EXTDB-1/AFRINIC/20200904 APNIC/20200903 ARIN/20200903 IANA/20191227 LACNIC/202
00903 LISP/20200318 RIPENCC/20200903, created: 20200904-061346 UTC)
\end_layout
\begin_layout Code
-
External: IPv6 Registry : ipv6calc-external-ipv6-registry.db
(EXTDB-2/AFRINIC/20200904 APNIC/20200903 ARIN/20200903 IANA/20191106 LACNIC/202
00903 LISP/20200318 RIPENCC/20200903, created: 20200904-063305 UTC)
\end_layout
\begin_layout Code
-
External: IPv4 CountryCode : ipv6calc-external-ipv4-countrycode.db
(EXTDB-3/AFRINIC/20200904 APNIC/20200903 ARIN/20200903 IANA/20191227 LACNIC/202
00903 LISP/20200318 RIPENCC/20200903, created: 20200904-061347 UTC)
\end_layout
\begin_layout Code
-
External: IPv6 CountryCode : ipv6calc-external-ipv6-countrycode.db
(EXTDB-4/AFRINIC/20200904 APNIC/20200903 ARIN/20200903 IANA/20191106 LACNIC/202
00903 LISP/20200318 RIPENCC/20200903, created: 20200904-063305 UTC)
\end_layout
\begin_layout Code
-
BuiltIn: features available/implemented: 0x0001c00f/0x0001c00f (100%)
\end_layout
\begin_layout Code
-
BuiltIn: info of available databases
\end_layout
\begin_layout Code
-
BuiltIn: ASN : IANA/20200518
\end_layout
\begin_layout Code
-
BuiltIn: CC : AFRINIC/20201012 APNIC/20201010 ARIN/20201011 LACNIC/20201009
RIPENCC/20201011
\end_layout
\begin_layout Code
-
BuiltIn: IPv4 : AFRINIC/20201012 APNIC/20201010 ARIN/20201011 IANA/20191227
LACNIC/20201009 LISP/20200318 RIPENCC/20201011 (created: 20201012-064251
UTC)
\end_layout
\begin_layout Code
-
BuiltIn: IPv6 : AFRINIC/20201012 APNIC/20201010 ARIN/20201011 IANA/20191106
LACNIC/20201009 LISP/20200318 RIPENCC/20201011 (created: 20201012-070210
UTC)
\end_layout
\begin_layout Code
-
BuiltIn: IEEE : IAB/20201012 OUI/20201012 OUI28/20201012 OUI36/20201012
\end_layout
\begin_layout Code
-
Database selection or priorization ('->': subsequential calls)
\end_layout
\begin_layout Code
-
Database priorization default: GeoIP(MaxMindDB)->IP2Location->db-ip.com(MaxMindDB
)->GeoIP->db-ip.com->External->BuiltIn
\end_layout
\begin_layout Code
-
DB_AS_REG (AS-Number to Registry database): BuiltIn
\end_layout
\begin_layout Code
-
DB_CC_REG (CountryCode to Registry database): BuiltIn
\end_layout
\begin_layout Code
-
DB_IPV4_REG (IPv4 to Registry database): BuiltIn
\end_layout
\begin_layout Code
-
DB_IPV6_REG (IPv6 to Registry database): BuiltIn
\end_layout
\begin_layout Code
-
DB_IPV4_AS (IPv4 to AS database): GeoIP(MaxMindDB)->db-ip.com(MaxMindDB)
\end_layout
\begin_layout Code
-
DB_IPV6_AS (IPv6 to AS database): GeoIP(MaxMindDB)->db-ip.com(MaxMindDB)
\end_layout
\begin_layout Code
-
DB_IPV4_CC (IPv4 to CountryCode database): GeoIP(MaxMindDB)->IP2Location->db-ip.c
om(MaxMindDB)->External
\end_layout
\begin_layout Code
-
DB_IPV6_CC (IPv6 to CountryCode database): GeoIP(MaxMindDB)->IP2Location->db-ip.c
om(MaxMindDB)->External
\end_layout
\begin_layout Code
-
DB_IPV4_COUNTRY (IPv4 to Country database): GeoIP(MaxMindDB)->IP2Location->db-ip.
com(MaxMindDB)
\end_layout
\begin_layout Code
-
DB_IPV6_COUNTRY (IPv6 to Country database): GeoIP(MaxMindDB)->IP2Location->db-ip.
com(MaxMindDB)
\end_layout
\begin_layout Code
-
DB_IPV4_CITY (IPv4 to City database): GeoIP(MaxMindDB)->IP2Location->db-ip.com(Ma
xMindDB)
\end_layout
\begin_layout Code
-
DB_IPV6_CITY (IPv6 to City database): GeoIP(MaxMindDB)->IP2Location->db-ip.com(Ma
xMindDB)
\end_layout
\begin_layout Code
-
DB_IPV4_REGION (IPv4 to Region database): GeoIP(MaxMindDB)->IP2Location->db-ip.co
m(MaxMindDB)
\end_layout
\begin_layout Code
-
DB_IPV6_REGION (IPv6 to Region database): GeoIP(MaxMindDB)->IP2Location->db-ip.co
m(MaxMindDB)
\end_layout
\begin_layout Code
-
DB_IEEE (IEEE/OUI/OUI28/OUI36 Vendor database): BuiltIn
\end_layout
\begin_layout Code
-
DB_IPV4_INFO (IPv4 additional information): External->BuiltIn
\end_layout
\begin_layout Code
-
DB_IPV6_INFO (IPv6 additional information): External->BuiltIn
\end_layout
\begin_layout Code
-
DB_IPV4_GEONAMEID (IPv4 GeonameID): GeoIP(MaxMindDB)->db-ip.com(MaxMindDB)
\end_layout
\begin_layout Code
-
DB_IPV6_GEONAMEID (IPv6 GeonameID): GeoIP(MaxMindDB)->db-ip.com(MaxMindDB)
\end_layout
@@ -2010,12 +1855,10 @@
\end_layout
\begin_layout Code
-
$ ipv6calc -v -h
\end_layout
\begin_layout Code
-
ipv6calc: version 3.0.0 GeoIP GeoIPv6 IP2Location IP2Location6 DBIPv4 DBIPv6
DB_AS_REG DB_IPV4_REG DB_IPV6_REG DB_IPV4_AS DB_IPV6_AS DB_IPV4_CC DB_IPV6_CC
DB_IPV4_COUNTRY DB_IPV6_COUNTRY DB_IPV4_CITY DB_IPV6_CITY DB_IPV4_REGION
@@ -2025,172 +1868,142 @@
\end_layout
\begin_layout Code
-
Explanation of available(x)/possible(o) feature tokens
\end_layout
\begin_layout Code
-
GeoIP x GeoIPv4 database (provided by GeoIP(MaxMindDB))
\end_layout
\begin_layout Code
-
GeoIPv6 x GeoIPv6 database (provided by GeoIP(MaxMindDB))
\end_layout
\begin_layout Code
-
IP2Location x IP2Location IPv4 database (provided by IP2Location)
\end_layout
\begin_layout Code
-
IP2Location6 x IP2Location IPv6 database (provided by IP2Location)
\end_layout
\begin_layout Code
-
DBIPv4 x db-ip.com IPv4 database (provided by db-ip.com(MaxMindD
B))
\end_layout
\begin_layout Code
-
DBIPv6 x db-ip.com IPv6 database (provided by db-ip.com(MaxMindD
B))
\end_layout
\begin_layout Code
-
DB_AS_REG x AS-Number to Registry database (provided by BuiltIn)
\end_layout
\begin_layout Code
-
DB_IPV4_REG x IPv4 to Registry database (provided by External,Built
In)
\end_layout
\begin_layout Code
-
DB_IPV6_REG x IPv6 to Registry database (provided by External,Built
In)
\end_layout
\begin_layout Code
-
DB_IPV4_AS x IPv4 to AS database (provided by GeoIP(MaxMindDB),db-
ip.com(MaxMindDB))
\end_layout
\begin_layout Code
-
DB_IPV6_AS x IPv6 to AS database (provided by GeoIP(MaxMindDB),db-
ip.com(MaxMindDB))
\end_layout
\begin_layout Code
-
DB_IPV4_CC x IPv4 to CountryCode database (provided by GeoIP(MaxMi
ndDB),IP2Location,db-ip.com(MaxMindDB),External)
\end_layout
\begin_layout Code
-
DB_IPV6_CC x IPv6 to CountryCode database (provided by GeoIP(MaxMi
ndDB),IP2Location,db-ip.com(MaxMindDB),External)
\end_layout
\begin_layout Code
-
DB_IPV4_COUNTRY x IPv4 to Country database (provided by GeoIP(MaxMindDB
),IP2Location,db-ip.com(MaxMindDB))
\end_layout
\begin_layout Code
-
DB_IPV6_COUNTRY x IPv6 to Country database (provided by GeoIP(MaxMindDB
),IP2Location,db-ip.com(MaxMindDB))
\end_layout
\begin_layout Code
-
DB_IPV4_CITY x IPv4 to City database (provided by GeoIP(MaxMindDB),I
P2Location,db-ip.com(MaxMindDB))
\end_layout
\begin_layout Code
-
DB_IPV6_CITY x IPv6 to City database (provided by GeoIP(MaxMindDB),I
P2Location,db-ip.com(MaxMindDB))
\end_layout
\begin_layout Code
-
DB_IPV4_REGION x IPv4 to Region database (provided by GeoIP(MaxMindDB)
,IP2Location,db-ip.com(MaxMindDB))
\end_layout
\begin_layout Code
-
DB_IPV6_REGION x IPv6 to Region database (provided by GeoIP(MaxMindDB)
,IP2Location,db-ip.com(MaxMindDB))
\end_layout
\begin_layout Code
-
DB_CC_REG x CountryCode to Registry database (provided by
BuiltIn)
\end_layout
\begin_layout Code
-
DB_IEEE x IEEE/OUI/OUI28/OUI36 Vendor database (provided
by BuiltIn)
\end_layout
\begin_layout Code
-
DB_IPV4_INFO x IPv4 additional information (provided by External,Bui
ltIn)
\end_layout
\begin_layout Code
-
DB_IPV6_INFO x IPv6 additional information (provided by External,Bui
ltIn)
\end_layout
\begin_layout Code
-
DB_IPV4_GEONAMEID x IPv4 GeonameID (provided by GeoIP(MaxMindDB),db-ip.com
(MaxMindDB))
\end_layout
\begin_layout Code
-
DB_IPV6_GEONAMEID x IPv6 GeonameID (provided by GeoIP(MaxMindDB),db-ip.com
(MaxMindDB))
\end_layout
\begin_layout Code
-
ANON_ZEROISE x Anonymization method 'zeroize'
\end_layout
\begin_layout Code
-
ANON_ANONYMIZE x Anonymization method 'anonymize'
\end_layout
\begin_layout Code
-
ANON_KEEP-TYPE-ASN-CC x Anonymization method 'keep-type-asn-cc'
\end_layout
\begin_layout Code
-
ANON_KEEP-TYPE-GEONAMEID x Anonymization method 'keep-type-geonameid'
\end_layout
@@ -2233,17 +2046,14 @@
\end_layout
\begin_layout Code
-
$ ipv6calc --out revnibbles.arpa 2001:db8::1
\end_layout
\begin_layout Code
-
No input type specified, try autodetection...found type: ipv6addr
\end_layout
\begin_layout Code
-
1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa.
\end_layout
@@ -2254,12 +2064,10 @@
\end_layout
\begin_layout Code
-
$ ipv6calc -q --out revnibbles.arpa 2001:db8::1/64
\end_layout
\begin_layout Code
-
0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa.
\end_layout
@@ -2270,7 +2078,6 @@
\end_layout
\begin_layout Code
-
$ dig PTR `./ipv6calc -q --out revnibbles.arpa 2001:db8::1/64`
\end_layout
@@ -2280,12 +2087,10 @@
\end_layout
\begin_layout Code
-
$ ipv6calc -q --action conv6to4 --in ipv6 2002:c0a8:fb61::1 --out ipv4
\end_layout
\begin_layout Code
-
192.168.251.97
\end_layout
@@ -2294,12 +2099,10 @@
\end_layout
\begin_layout Code
-
$ ipv6calc -q --action conv6to4 --in ipv4 192.168.251.97 --out ipv6
\end_layout
\begin_layout Code
-
2002:c0a8:fb61::
\end_layout
@@ -2321,47 +2124,38 @@
\end_layout
\begin_layout Code
-
$ ipv6calc -q -i 3ffe:ffff::210:a4ff:fe01:2345
\end_layout
\begin_layout Code
-
Address type: unicast, 6bone, global-unicast, productive
\end_layout
\begin_layout Code
-
Address type has SLA: 0000
\end_layout
\begin_layout Code
-
Registry for address: reserved
\end_layout
\begin_layout Code
-
Interface identifier: 0210:a4ff:fe01:2345
\end_layout
\begin_layout Code
-
EUI-48/MAC address: 00:10:a4:01:23:45
\end_layout
\begin_layout Code
-
MAC is a global unique one
\end_layout
\begin_layout Code
-
MAC is an unicast one
\end_layout
\begin_layout Code
-
OUI is: XIRCOM
\end_layout
@@ -2370,47 +2164,38 @@
\end_layout
\begin_layout Code
-
$ ipv6calc -q -i 3ffe:831f:ce49:7601:8000:efff:af4a:86BF
\end_layout
\begin_layout Code
-
Address type: unicast, 6bone, global-unicast, teredo
\end_layout
\begin_layout Code
-
Country Code: IT
\end_layout
\begin_layout Code
-
Registry for address: 6BONE
\end_layout
\begin_layout Code
-
IPv4 address: 80.181.121.64 (TEREDO-CLIENT)
\end_layout
\begin_layout Code
-
IPv4 address type: unicast, global
\end_layout
\begin_layout Code
-
Autonomous System Information for [80.181.121.64]: AS3269 ASN-IBSNAZ
\end_layout
\begin_layout Code
-
Country Code for [80.181.121.64]: IT
\end_layout
\begin_layout Code
-
...
\end_layout
@@ -2419,32 +2204,26 @@
\end_layout
\begin_layout Code
-
$ ipv6calc -q -i 153.16.26.80
\end_layout
\begin_layout Code
-
IPv4 address: 153.16.26.80
\end_layout
\begin_layout Code
-
IPv4 address type: unicast, global, lisp
\end_layout
\begin_layout Code
-
...
\end_layout
\begin_layout Code
-
IPv4 registry: ARIN(LISP#cbc-xtr)
\end_layout
\begin_layout Code
-
...
\end_layout
@@ -2459,341 +2238,275 @@
\end_layout
\begin_layout Code
-
$ ipv6calc -q -i -m 2a01:238:423d:8800:85b3:9e6b:3019:8909
\end_layout
\begin_layout Code
-
IPV6=2a01:0238:423d:8800:85b3:9e6b:3019:8909
\end_layout
\begin_layout Code
-
IPV6_ANON=a909:16fa:9091:a448:a909:4941:0000:0007
\end_layout
\begin_layout Code
-
IPV6_TYPE=ipv6,unicast,global-unicast,productive,iid-random,iid,iid-local
\end_layout
\begin_layout Code
-
IPV6_COUNTRYCODE=DE
\end_layout
\begin_layout Code
-
IPV6_COUNTRYCODE_SOURCE=GeoIP(MaxMindDB)
\end_layout
\begin_layout Code
-
IPV6_AS_NUM=6724
\end_layout
\begin_layout Code
-
IPV6_AS_SOURCE=GeoIP(MaxMindDB)
\end_layout
\begin_layout Code
-
IPV6_GEONAME_ID=2921044
\end_layout
\begin_layout Code
-
IPV6_GEONAME_ID_SOURCE=GeoIP(MaxMindDB)
\end_layout
\begin_layout Code
-
IPV6_GEONAME_ID_TYPE=Country
\end_layout
\begin_layout Code
-
IPV6_REGISTRY=RIPENCC
\end_layout
\begin_layout Code
-
SLA=8800
\end_layout
\begin_layout Code
-
IID=85b3:9e6b:3019:8909
\end_layout
\begin_layout Code
-
EUI64_SCOPE=local-random
\end_layout
\begin_layout Code
-
IP2LOCATION_COUNTRY_SHORT=DE
\end_layout
\begin_layout Code
-
IP2LOCATION_COUNTRY_LONG=Germany
\end_layout
\begin_layout Code
-
IP2LOCATION_REGION=Berlin
\end_layout
\begin_layout Code
-
IP2LOCATION_CITY=Berlin
\end_layout
\begin_layout Code
-
IP2LOCATION_ZIPCODE=10178
\end_layout
\begin_layout Code
-
IP2LOCATION_LATITUDE=52.524368
\end_layout
\begin_layout Code
-
IP2LOCATION_LONGITUDE=13.410530
\end_layout
\begin_layout Code
-
IP2LOCATION_TIMEZONE=+01:00
\end_layout
\begin_layout Code
-
GEOIP2_CONTINENT_SHORT=EU
\end_layout
\begin_layout Code
-
GEOIP2_CONTINENT_LONG=Europe
\end_layout
\begin_layout Code
-
GEOIP2_COUNTRY_SHORT=DE
\end_layout
\begin_layout Code
-
GEOIP2_COUNTRY_LONG=Germany
\end_layout
\begin_layout Code
-
GEOIP2_LATITUDE=51.000000
\end_layout
\begin_layout Code
-
GEOIP2_LONGITUDE=9.000000
\end_layout
\begin_layout Code
-
GEOIP2_RADIUS=100
\end_layout
\begin_layout Code
-
GEOIP2_TIMEZONE_NAME=Europe/Berlin
\end_layout
\begin_layout Code
-
GEOIP2_AS_NUM=6724
\end_layout
\begin_layout Code
-
GEOIP2_AS_ORGNAME=Strato AG
\end_layout
\begin_layout Code
-
GEOIP2_GEONAME_ID_COUNTRY=2921044
\end_layout
\begin_layout Code
-
GEOIP2_GEONAME_ID_CONTINENT=6255148
\end_layout
\begin_layout Code
-
DBIP2_CONTINENT_SHORT=EU
\end_layout
\begin_layout Code
-
DBIP2_CONTINENT_LONG=Europe
\end_layout
\begin_layout Code
-
DBIP2_COUNTRY_SHORT=DE
\end_layout
\begin_layout Code
-
DBIP2_COUNTRY_LONG=Germany
\end_layout
\begin_layout Code
-
DBIP2_REGION=Berlin
\end_layout
\begin_layout Code
-
DBIP2_CITY=Berlin (Charlottenburg-Wilmersdorf)
\end_layout
\begin_layout Code
-
DBIP2_ZIPCODE=10587
\end_layout
\begin_layout Code
-
DBIP2_LATITUDE=52.523900
\end_layout
\begin_layout Code
-
DBIP2_LONGITUDE=13.321400
\end_layout
\begin_layout Code
-
DBIP2_WEATHERSTATIONCODE=GMXX8538
\end_layout
\begin_layout Code
-
DBIP2_TIMEZONE_NAME=Europe/Berlin
\end_layout
\begin_layout Code
-
DBIP2_AS_NUM=6724
\end_layout
\begin_layout Code
-
DBIP2_AS_ORGNAME=Strato AG
\end_layout
\begin_layout Code
-
DBIP2_ISP=Strato Rechenzentrum
\end_layout
\begin_layout Code
-
DBIP2_NETSPEED=Corporate
\end_layout
\begin_layout Code
-
DBIP2_GEONAME_ID=3336294
\end_layout
\begin_layout Code
-
DBIP2_GEONAME_ID_REGION=2950157
\end_layout
\begin_layout Code
-
DBIP2_GEONAME_ID_COUNTRY=2921044
\end_layout
\begin_layout Code
-
DBIP2_GEONAME_ID_CONTINENT=6255148
\end_layout
\begin_layout Code
-
EXTERNAL_COUNTRY_SHORT=DE
\end_layout
\begin_layout Code
-
IP2LOCATION_DATABASE_INFO=IP2L-DB11 IPv4 IPv6 20181226 Copyright (c) 2018
IP2Location All Rights Reserved
\end_layout
\begin_layout Code
-
GEOIP2_DATABASE_INFO=GeoLite2-City Copyright (c) 2019 MaxMind All Rights
Reserved, created: 20191217-200126 UTC / GeoLite2-ASN Copyright (c) 2019
MaxMind All Rights Reserved, created: 20190122-114228 UTC
\end_layout
\begin_layout Code
-
DBIP2_DATABASE_INFO=DBIP-Location-ISP (compat=Enterprise) Copyright (c)
2019 db-ip.com All Rights Reserved, created: 20190101-015418 UTC
\end_layout
\begin_layout Code
-
EXTERNAL_DATABASE_INFO=EXTDB-4/AFRINIC/20200904 APNIC/20200903 ARIN/20200903
IANA/20191106 LACNIC/20200903 LISP/20200318 RIPENCC/20200903, created:
20200904-063305 UTC
\end_layout
\begin_layout Code
-
BUILTIN_DATABASE_INFO=IPv6-REG:AFRINIC/20201012 APNIC/20201010 ARIN/20201011
IANA/20191106 LACNIC/20201009 LISP/20200318 RIPENCC/20201011
\end_layout
\begin_layout Code
-
IPV6CALC_NAME=ipv6calc
\end_layout
\begin_layout Code
-
IPV6CALC_VERSION=3.0.0
\end_layout
\begin_layout Code
-
IPV6CALC_COPYRIGHT="(P) & (C) 2001-2020 by Peter Bieringer <pb (at) bieringer.de>
"
\end_layout
\begin_layout Code
-
IPV6CALC_OUTPUT_VERSION=21
\end_layout
\begin_layout Code
-
IPV6CALC_SETTINGS_ANON="set=keep-type-asn-cc,mask-ipv6=56,mask-ipv4=24,mask-eui6
4=40,mask-mac=24,method=keep-type-asn-cc"
\end_layout
\begin_layout Code
-
IPV6CALC_FEATURES="GeoIP GeoIPv6 IP2Location IP2Location6 DBIPv4 DBIPv6
DB_AS_REG DB_IPV4_REG DB_IPV6_REG DB_IPV4_AS DB_IPV6_AS DB_IPV4_CC DB_IPV6_CC
DB_IPV4_COUNTRY DB_IPV6_COUNTRY DB_IPV4_CITY DB_IPV6_CITY DB_IPV4_REGION
@@ -2803,7 +2516,6 @@
\end_layout
\begin_layout Code
-
IPV6CALC_CAPABILITIES="GeoIP2(linked/MaxMindDB) IP2Location(linked) DBIP2(linked
/MaxMindDB) ExternalDatabase DB_AS_REG(BuiltIn) DB_CC_REG(BuiltIn) DB_IPV4_REG(B
uiltIn) DB_IPV6_REG(BuiltIn) DB_IEEE(BuiltIn)"
@@ -2823,13 +2535,11 @@
\end_layout
\begin_layout Code
-
$ ipv6calc -q -i --mrst IPV6_TYPE 2a01:238:423d:8800:85b3:9e6b:3019:8909
\end_layout
\begin_layout Code
-
IPV6_TYPE=unicast,global-unicast,productive,iid-random,iid,iid-local
\end_layout
@@ -2843,53 +2553,43 @@
\end_layout
\begin_layout Code
-
$ ipv6calc -q -i --mrmt IP2LOCATION 2a01:238:423d:8800:85b3:9e6b:3019:8909
\end_layout
\begin_layout Code
-
IP2LOCATION_COUNTRY_SHORT=DE
\end_layout
\begin_layout Code
-
IP2LOCATION_COUNTRY_LONG=Germany
\end_layout
\begin_layout Code
-
IP2LOCATION_REGION=Berlin
\end_layout
\begin_layout Code
-
IP2LOCATION_CITY=Berlin
\end_layout
\begin_layout Code
-
IP2LOCATION_ZIPCODE=10178
\end_layout
\begin_layout Code
-
IP2LOCATION_LATITUDE=52.524368
\end_layout
\begin_layout Code
-
IP2LOCATION_LONGITUDE=13.410530
\end_layout
\begin_layout Code
-
IP2LOCATION_TIMEZONE_NAME=+01:00
\end_layout
\begin_layout Code
-
IP2LOCATION_DATABASE_INFO=IP2L-DB11 IPv6 20181226 Copyright (c) 2018 IP2Location
All Rights Reserved
\end_layout
@@ -2904,13 +2604,11 @@
\end_layout
\begin_layout Code
-
$ ipv6calc -q -i --mrtvo IPV6_TYPE 2a01:238:423d:8800:85b3:9e6b:3019:8909
\end_layout
\begin_layout Code
-
unicast,global-unicast,productive,iid-random,iid,iid-local
\end_layout
@@ -2924,13 +2622,11 @@
\end_layout
\begin_layout Code
-
$ ipv6calc -q -i --mrqva --mrtvo IPV6_TYPE 2a01:238:423d:8800:85b3:9e6b:3019:890
9
\end_layout
\begin_layout Code
-
"unicast,global-unicast,productive,iid-random,iid,iid-local"
\end_layout
@@ -2944,13 +2640,11 @@
\end_layout
\begin_layout Code
-
$ ipv6calc -q -i --mrqvn --mrst IPV6_AS_TEXT 2a01:238:423d:8800:85b3:9e6b:3019:8
909
\end_layout
\begin_layout Code
-
IPV6_AS_TEXT=AS6724 STRATO AG
\end_layout
@@ -2965,24 +2659,20 @@
\end_layout
\begin_layout Code
-
$ ipv6calc -q -i --mrqva --mrstpa IPV4 2a01:238:423d:8800:85b3:9e6b:3019:8909
\end_layout
\begin_layout Code
-
IPV4=""
\end_layout
\begin_layout Code
-
$ ipv6calc -q -i --mrqva --mrst IPV4 2a01:238:423d:8800:85b3:9e6b:3019:8909
\end_layout
\begin_layout Code
-
(no output)
\end_layout
@@ -3028,13 +2718,11 @@
\end_layout
\begin_layout Code
-
$ cat ip.bieringer.de-log.201310 | awk '{ print $1 }' | sort | uniq | ipv6calc
-A filter -E teredo
\end_layout
\begin_layout Code
-
2001:0:9d38:90d7:34f7:1a26:8599:e079
\end_layout
@@ -3116,12 +2804,10 @@
\end_layout
\begin_layout Code
-
$ ipv6calc -h
\end_layout
\begin_layout Code
-
ipv6calc: version 3.0.0 GeoIP GeoIPv6 IP2Location IP2Location6 DBIPv4 DBIPv6
DB_AS_REG DB_IPV4_REG DB_IPV6_REG DB_IPV4_AS DB_IPV6_AS DB_IPV4_CC DB_IPV6_CC
DB_IPV4_COUNTRY DB_IPV6_COUNTRY DB_IPV4_CITY DB_IPV6_CITY DB_IPV4_REGION
@@ -3131,44 +2817,36 @@
\end_layout
\begin_layout Code
-
(P) & (C) 2001-2020 by Peter Bieringer <pb (at) bieringer.de>
\end_layout
\begin_layout Code
-
This program formats and calculates IPv6/IPv4/MAC addresses and can do many
more tricky things
\end_layout
\begin_layout Code
-
[-d|--debug <debug value>] : debug value (bitwise like)
\end_layout
\begin_layout Code
-
can also be set by IPV6CALC_DEBUG environment
value
\end_layout
\begin_layout Code
-
[-v|--version [-v [-v]]] : version information (2 optional detail levels)
\end_layout
\begin_layout Code
-
[-v|--version -h] : explanation of feature tokens
\end_layout
\begin_layout Code
-
[-V|--verbose] : be more verbose
\end_layout
\begin_layout Code
-
[-h|--help|-?] : this online help
\end_layout
@@ -3177,56 +2855,46 @@
\end_layout
\begin_layout Code
-
[--disable-ip2location ] : IP2Location support disabled
\end_layout
\begin_layout Code
-
[--db-ip2location-disable ] : IP2Location support disabled
\end_layout
\begin_layout Code
-
[--db-ip2location-dir <directory>] : IP2Location database directory (default:
/usr/share/IP2Location)
\end_layout
\begin_layout Code
-
[--db-ip2location-only-type <TYPE>]: IP2Location database only selected
type (1-120)
\end_layout
\begin_layout Code
-
[--db-ip2location-allow-softlinks] : IP2Location database softlinks allowed
\end_layout
\begin_layout Code
-
by default they are ignored because it is hard to autodetect COMM/LITE/SAMP
LE
\end_layout
\begin_layout Code
-
[--db-ip2location-lite-to-sample-autoswitch-max-delta-months <MONTHS>]:
\end_layout
\begin_layout Code
-
autoswitch from LITE to SAMPLE databases if possible and delta is not
more than 12 months (0=disabled)
\end_layout
\begin_layout Code
-
[--db-ip2location-comm-to-lite-switch-min-delta-months <MONTHS>]:
\end_layout
\begin_layout Code
-
switch from COMM to LITE databases if possible and delta more than
12 months (0=disabled)
\end_layout
@@ -3236,17 +2904,14 @@
\end_layout
\begin_layout Code
-
[--disable-geoip2 ] : GeoIP(MaxMindDB) support disabled
\end_layout
\begin_layout Code
-
[--db-geoip2-disable ] : GeoIP(MaxMindDB) support disabled
\end_layout
\begin_layout Code
-
[--db-geoip2-dir <directory>] : GeoIP(MaxMindDB) database directory
(default: /usr/share/GeoIP)
\end_layout
@@ -3256,82 +2921,67 @@
\end_layout
\begin_layout Code
-
[--disable-dbip2 ] : db-ip.com(MaxMindDB) support disabled
\end_layout
\begin_layout Code
-
[--db-dbip2-disable ] : db-ip.com(MaxMindDB) support disabled
\end_layout
\begin_layout Code
-
[--db-dbip2-dir <directory>] : db-ip.com(MaxMindDB) database directory
(default: /usr/share/DBIP)
\end_layout
\begin_layout Code
-
[--db-dbip2-only-type <TYPE>] : db-ip.com(MaxMindDB) database only
selected type (1-6)
\end_layout
\begin_layout Code
-
[--db-dbip2-comm-to-free-switch-min-delta-months <MONTHS>]:
\end_layout
\begin_layout Code
-
switch from COMM to FREE databases if possible and delta more than
12 months (0=disabled)
\end_layout
\begin_layout Code
-
[--disable-external ] : External support disabled
\end_layout
\begin_layout Code
-
\end_layout
\begin_layout Code
-
[--db-external-disable ] : External support disabled
\end_layout
\begin_layout Code
-
[--db-external-dir <directory>] : External database directory (default:
/usr/share/ipv6calc/db)
\end_layout
\begin_layout Code
-
[--disable-builtin ] : BuiltIn support disabled
\end_layout
\begin_layout Code
-
[--db-builtin-disable ] : BuiltIn support disabled
\end_layout
\begin_layout Code
-
\end_layout
\begin_layout Code
-
[--db-priorization <entry1>[:...]] : Database priorization order list (overwrites
default)
\end_layout
\begin_layout Code
-
colon separated: GeoIP GeoIP2 IP2Locati
on DBIP DBIP2 External BuiltIn
\end_layout
@@ -3341,105 +2991,85 @@
\end_layout
\begin_layout Code
-
Hint: all long options can be predefined from environment by using
\end_layout
\begin_layout Code
-
prefix: IPV6CALC_ and conversion: '-' -> '_' and lowercase -> uppercase
\end_layout
\begin_layout Code
-
example for options with values : --db-dbip2-dir=<DIR> -> environment:
IPV6CALC_DB_DBIP2_DIR=<DIR>
\end_layout
\begin_layout Code
-
example for options without values: --db-dbip2-disable -> environment:
IPV6CALC_DB_DBIP2_DISABLE=1
\end_layout
\begin_layout Code
-
on|off|0|1 is supported
\end_layout
\begin_layout Code
-
[-q|--quiet] : be more quiet (auto-enabled in pipe mode)
\end_layout
\begin_layout Code
-
[-f|--flush] : flush each line in pipe mode
\end_layout
\begin_layout Code
-
Usage with new style options:
\end_layout
\begin_layout Code
-
[--in|-I <input type>] : specify input type
\end_layout
\begin_layout Code
-
(default: autodetect)
\end_layout
\begin_layout Code
-
[--out|-O <output type>] : specify output type
\end_layout
\begin_layout Code
-
(sometimes: autodetect)
\end_layout
\begin_layout Code
-
[--action|-A <action>] : specify action
\end_layout
\begin_layout Code
-
(default: format conversion, sometimes: autodetect)
\end_layout
\begin_layout Code
-
[<format option> ...] : specify format options
\end_layout
\begin_layout Code
-
<input data> [...] : input data
\end_layout
\begin_layout Code
-
Available input types: [-m] -I|--in -?|-h|--help
\end_layout
\begin_layout Code
-
Available output types: [-m] -O|--out -?|-h|--help
\end_layout
\begin_layout Code
-
Available action types: [-m] -A|--action -?|-h|--help
\end_layout
\begin_layout Code
-
Special filter action : -E -?|-h|--help
\end_layout
@@ -3448,55 +3078,45 @@
\end_layout
\begin_layout Code
-
Other usage:
\end_layout
\begin_layout Code
-
--showinfo|-i [--machine_readable|-m] : show information about input data
\end_layout
\begin_layout Code
-
--showinfo|-i --mrqva : Machine Readable Quote Values
Always
\end_layout
\begin_layout Code
-
--showinfo|-i --mrqvn : Machine Readable Quote Values
Never
\end_layout
\begin_layout Code
-
--showinfo|-i --mrst <TOKEN> : Machine Readable Select Token
\end_layout
\begin_layout Code
-
--showinfo|-i --mrstpa <TOKEN> : Machine Readable Select Token
Print Always
\end_layout
\begin_layout Code
-
--showinfo|-i --mrmt <TOKENPREFIX> : Machine Readable Match Token Prefix
\end_layout
\begin_layout Code
-
--showinfo|-i --mrmts <TOKENSUFFIX> : Machine Readable Match Token Suffix
\end_layout
\begin_layout Code
-
--showinfo|-i --mrtvo <TOKEN> : Machine Readable Token Value Only
\end_layout
\begin_layout Code
-
--showinfo|-i --show-tokens : show available tokens (aka types)
on '-m'
\end_layout
@@ -3506,119 +3126,96 @@
\end_layout
\begin_layout Code
-
Usage with shortcut options: <shortcut option> [<format option> ...] <input
data>
\end_layout
\begin_layout Code
-
for more information and available format options use: <shortcut option>
-?|-h|--help
\end_layout
\begin_layout Code
-
-r|--addr2ip6_int (-O revnibbles.int)
\end_layout
\begin_layout Code
-
-r|--addr_to_ip6int (-O revnibbles.int)
\end_layout
\begin_layout Code
-
-a|--addr2ip6_arpa (-O revnibbles.arpa)
\end_layout
\begin_layout Code
-
-a|--addr_to_ip6arpa (-O revnibbles.arpa)
\end_layout
\begin_layout Code
-
-b|--addr_to_bitstring (-O bitstring)
\end_layout
\begin_layout Code
-
--addr2compaddr (--printcompressed)
\end_layout
\begin_layout Code
-
--addr_to_compressed (--printcompressed)
\end_layout
\begin_layout Code
-
--addr2uncompaddr (--printuncompressed)
\end_layout
\begin_layout Code
-
--addr_to_uncompressed (--printuncompressed)
\end_layout
\begin_layout Code
-
--addr_to_base85 (-I ipv6addr -O base85)
\end_layout
\begin_layout Code
-
--base85_to_addr (-I base85 -O ipv6addr)
\end_layout
\begin_layout Code
-
--mac_to_eui64 (-I mac -O eui64)
\end_layout
\begin_layout Code
-
--addr2fulluncompaddr (--printfulluncompressed)
\end_layout
\begin_layout Code
-
--addr_to_fulluncompressed (--printfulluncompressed)
\end_layout
\begin_layout Code
-
--addr2if_inet6 (-I ipv6addr -O ifinet6)
\end_layout
\begin_layout Code
-
--addr_to_ifinet6 (-I ipv6addr -O ifinet6)
\end_layout
\begin_layout Code
-
--if_inet62addr (-I ifinet6 -O ipv6addr --printcompressed)
\end_layout
\begin_layout Code
-
--ifinet6_to_compressed (-I ifinet6 -O ipv6addr --printcompressed)
\end_layout
\begin_layout Code
-
--eui64_to_privacy (-I iid_token -O iid_token -A genprivacyiid)
\end_layout
\begin_layout Code
-
--ipv4_to_6to4addr (-I ipv4 -O ipv6addr -A conv6to4)
\end_layout
\begin_layout Code
-
--addr2cc (-A addr2cc)
\end_layout
@@ -3780,12 +3377,10 @@
\end_layout
\begin_layout Code
-
$ ipv6calc --in -?
\end_layout
\begin_layout Code
-
ipv6calc: version 2.1.1 GeoIP GeoIPv6 IP2Location IP2Location6 DBIPv4 DBIPv6
DB_AS_REG DB_IPV4_REG DB_IPV6_REG DB_IPV4_AS DB_IPV6_AS DB_IPV4_CC DB_IPV6_CC
DB_IPV4_COUNTRY DB_IPV6_COUNTRY DB_IPV4_CITY DB_IPV6_CITY DB_IPV4_REGION
@@ -3795,97 +3390,78 @@
\end_layout
\begin_layout Code
-
(P) & (C) 2001-2019 by Peter Bieringer <pb (at) bieringer.de>
\end_layout
\begin_layout Code
-
Available input types:
\end_layout
\begin_layout Code
-
auto : automatic detection
\end_layout
\begin_layout Code
-
revnibbles.int : dot separated nibbles reverse, ending with ip6.int.
\end_layout
\begin_layout Code
-
revnibbles.arpa : dot separated nibbles reverse, ending with ip6.arpa.
\end_layout
\begin_layout Code
-
bitstring : bitstring labes, ending with ip6.arpa.
\end_layout
\begin_layout Code
-
ipv6addr : IPv6 address
\end_layout
\begin_layout Code
-
ipv6literal : IPv6 address in literal
\end_layout
\begin_layout Code
-
ipv4addr : IPv4 address
\end_layout
\begin_layout Code
-
ipv4hex : IPv4 in hexdecimal format
\end_layout
\begin_layout Code
-
ipv4revhex : IPv4 in byte-reversed hexdecimal format
\end_layout
\begin_layout Code
-
mac : MAC address (48 bits)
\end_layout
\begin_layout Code
-
eui64 : EUI-64 identifier (64 bits)
\end_layout
\begin_layout Code
-
base85 : Base-85 string
\end_layout
\begin_layout Code
-
ifinet6 : Like line in /proc/net/if_inet6
\end_layout
\begin_layout Code
-
iid+token : Interface identifier and token
\end_layout
\begin_layout Code
-
ipv6logconv : ipv6logconv (currently not supported)
\end_layout
\begin_layout Code
-
prefix+mac : IPv6 prefix and a MAC address
\end_layout
\begin_layout Code
-
asn : Autonomous System Number
\end_layout
@@ -3894,12 +3470,10 @@
\end_layout
\begin_layout Code
-
$ ipv6calc --out -?
\end_layout
\begin_layout Code
-
ipv6calc: version 2.1.1 GeoIP GeoIPv6 IP2Location IP2Location6 DBIPv4 DBIPv6
DB_AS_REG DB_IPV4_REG DB_IPV6_REG DB_IPV4_AS DB_IPV6_AS DB_IPV4_CC DB_IPV6_CC
DB_IPV4_COUNTRY DB_IPV6_COUNTRY DB_IPV4_CITY DB_IPV6_CITY DB_IPV4_REGION
@@ -3909,122 +3483,98 @@
\end_layout
\begin_layout Code
-
(P) & (C) 2001-2019 by Peter Bieringer <pb (at) bieringer.de>
\end_layout
\begin_layout Code
-
Available output types:
\end_layout
\begin_layout Code
-
revnibbles.int : dot separated nibbles reverse, ending with ip6.int.
\end_layout
\begin_layout Code
-
revnibbles.arpa : dot separated nibbles reverse, ending with ip6.arpa.
\end_layout
\begin_layout Code
-
bitstring : bitstring labes, ending with ip6.arpa.
\end_layout
\begin_layout Code
-
ipv6addr : IPv6 address
\end_layout
\begin_layout Code
-
ipv4addr : IPv4 address
\end_layout
\begin_layout Code
-
mac : MAC address (48 bits)
\end_layout
\begin_layout Code
-
eui64 : EUI-64 identifier (64 bits)
\end_layout
\begin_layout Code
-
base85 : Base-85 string
\end_layout
\begin_layout Code
-
ifinet6 : Like line in /proc/net/if_inet6
\end_layout
\begin_layout Code
-
iid : Interface identifier
\end_layout
\begin_layout Code
-
iid+token : Interface identifier and token
\end_layout
\begin_layout Code
-
addrtype : Address type
\end_layout
\begin_layout Code
-
ouitype : OUI (IEEE) type
\end_layout
\begin_layout Code
-
ipv6addrtype : IPv6 address type
\end_layout
\begin_layout Code
-
any : any type (currently not supported)
\end_layout
\begin_layout Code
-
revipv4 : reverse IPv4, ending with in-addr.arpa
\end_layout
\begin_layout Code
-
ipv4hex : IPv4 in hexdecimal format
\end_layout
\begin_layout Code
-
octal : IP address in escaped octal format
\end_layout
\begin_layout Code
-
hex : IP address in hexadecimal format
\end_layout
\begin_layout Code
-
ipv6literal : IPv6 address in literal
\end_layout
\begin_layout Code
-
For examples and available format options use:
\end_layout
\begin_layout Code
-
-O|--out <type> --examples
\end_layout
@@ -4033,12 +3583,10 @@
\end_layout
\begin_layout Code
-
$ ipv6calc --action -?
\end_layout
\begin_layout Code
-
ipv6calc: version 2.1.1 GeoIP GeoIPv6 IP2Location IP2Location6 DBIPv4 DBIPv6
DB_AS_REG DB_IPV4_REG DB_IPV6_REG DB_IPV4_AS DB_IPV6_AS DB_IPV4_CC DB_IPV6_CC
DB_IPV4_COUNTRY DB_IPV6_COUNTRY DB_IPV4_CITY DB_IPV6_CITY DB_IPV4_REGION
@@ -4048,149 +3596,122 @@
\end_layout
\begin_layout Code
-
(P) & (C) 2001-2019 by Peter Bieringer <pb (at) bieringer.de>
\end_layout
\begin_layout Code
-
Available action types:
\end_layout
\begin_layout Code
-
auto : Automatic selection of action (default)
\end_layout
\begin_layout Code
-
geneui64 : Converts a MAC address to an EUI-64 address
\end_layout
\begin_layout Code
-
conv6to4 : Converts IPv4 address <-> 6to4 IPv6 address (prefix)
\end_layout
\begin_layout Code
-
convnat64 : Converts IPv4 address <-> NAT64 IPv6 address
\end_layout
\begin_layout Code
-
ipv6tomac : Extracts MAC of an IPv6 address (if detected)
\end_layout
\begin_layout Code
-
ipv6toeui64 : Extracts EUI64 of an IPv6 address (if detected)
\end_layout
\begin_layout Code
-
genprivacyiid : Generates a privacy interface ID out of a given one
(arg1) and a token (arg2)
\end_layout
\begin_layout Code
-
prefixmac2ipv6 : Generates an IPv6 address out of a prefix and a MAC
address
\end_layout
\begin_layout Code
-
anonymize : Anonymize IPv4/IPv6 address without loosing much informatio
n
\end_layout
\begin_layout Code
-
6rd_local_prefix : Calculate the 6rd prefix from given IPv6 prefix (&
relay prefix) and IPv4
\end_layout
\begin_layout Code
-
Options:
\end_layout
\begin_layout Code
-
--6rd_prefix ...
(required)
\end_layout
\begin_layout Code
-
--6rd_relay_prefix ...
(optional)
\end_layout
\begin_layout Code
-
6rd_extract_ipv4 : Extract from 6rd address the include IPv4 address
\end_layout
\begin_layout Code
-
Options:
\end_layout
\begin_layout Code
-
--6rd_prefixlength ...
(required)
\end_layout
\begin_layout Code
-
filter : Filter addresses related to filter options
\end_layout
\begin_layout Code
-
test : Test address against given prefix or address
\end_layout
\begin_layout Code
-
Options:
\end_layout
\begin_layout Code
-
--test_prefix ...
(optional)
\end_layout
\begin_layout Code
-
--test_gt ...
(optional)
\end_layout
\begin_layout Code
-
--test_ge ...
(optional)
\end_layout
\begin_layout Code
-
--test_lt ...
(optional)
\end_layout
\begin_layout Code
-
--test_le ...
(optional)
\end_layout
\begin_layout Code
-
addr2cc : Converts IPv4/IPv6 address into Country Code
\end_layout
@@ -4221,12 +3742,10 @@
\end_layout
\begin_layout Code
-
$ ipv6calc --action filter -h
\end_layout
\begin_layout Code
-
ipv6calc: version 2.1.1 GeoIP GeoIPv6 IP2Location IP2Location6 DBIPv4 DBIPv6
DB_AS_REG DB_IPV4_REG DB_IPV6_REG DB_IPV4_AS DB_IPV6_AS DB_IPV4_CC DB_IPV6_CC
DB_IPV4_COUNTRY DB_IPV6_COUNTRY DB_IPV4_CITY DB_IPV6_CITY DB_IPV4_REGION
@@ -4236,43 +3755,35 @@
\end_layout
\begin_layout Code
-
Filter given addresses from stdin by filter expression, e.g.
\end_layout
\begin_layout Code
-
echo '2001:db8::1' | ipv6calc [-A filter] -E iid-local
\end_layout
\begin_layout Code
-
echo '2001:db8::1' | ipv6calc [-A filter] -E iid-local,global-unicast
\end_layout
\begin_layout Code
-
echo '2001:db8::1' | ipv6calc [-A filter] -E ^iid-random
\end_layout
\begin_layout Code
-
(note: since version 0.95.0 '-A filter' is autoselected if option '-E <filter
expression>' is given)
\end_layout
\begin_layout Code
-
negation of filter expression with prefix: ^
\end_layout
\begin_layout Code
-
IPv6 address filter tokens:
\end_layout
\begin_layout Code
-
ipv6 unknown unicast multicast anycast loopback link-local site-local
compat-v4 mapped reserved unique-local-unicast anonymized-iid anonymized-prefix
6to4 6bone global-unicast unspecified solicited-node productive 6to4-microsoft
@@ -4281,105 +3792,85 @@
\end_layout
\begin_layout Code
-
IPv4 address filter tokens:
\end_layout
\begin_layout Code
-
ipv4 any unicast multicast anycast broadcast loopback unspecified unknown
reserved zeroconf site-local anonymized anonymized-geonameid global 6to4relay
lisp lisp-proxyegresstunnelrouter-anycast lisp-mapresolver-anycast
\end_layout
\begin_layout Code
-
IPv4/v6 address filter tokens based on databases:
\end_layout
\begin_layout Code
-
[^][ipv4.|ipv6.]db.cc=<CC>|unknown (Country Code [2 chars])
\end_layout
\begin_layout Code
-
[^][ipv4.|ipv6.]db.asn=<ASN>|unknown (Autonomous System Number)
\end_layout
\begin_layout Code
-
[^][ipv4.|ipv6.]db.reg=<REGISTRY>
\end_layout
\begin_layout Code
-
Registry tokens: 6BONE IANA APNIC ARIN RIPENCC LACNIC AFRINIC 6TO4 reserved
unknown
\end_layout
\begin_layout Code
-
IPv4/v6 address filter tokens based on address/mask:
\end_layout
\begin_layout Code
-
[^]ipv4.addr=<IPV4-ADDRESS>[<PREFIX-LENGTH>]
\end_layout
\begin_layout Code
-
[^]ipv6.addr=<IPV6-ADDRESS>[<PREFIX-LENGTH>]
\end_layout
\begin_layout Code
-
IPv4/v6 address filter tokens based on address ranges (<=|<|>|>=):
\end_layout
\begin_layout Code
-
[^]ipv4.addr(<=|<|>|>=)<IPV4-ADDRESS>
\end_layout
\begin_layout Code
-
[^]ipv6.addr(<=|<|>|>=)<IPV6-ADDRESS>
\end_layout
\begin_layout Code
-
as alternative in case <|> creating problems also supported: =(le|lt|gt|ge)=:
\end_layout
\begin_layout Code
-
[^]ipv4.addr=(le|lt|gt|ge)=<IPV4-ADDRESS>
\end_layout
\begin_layout Code
-
[^]ipv6.addr=(le|lt|gt|ge)=<IPV6-ADDRESS>
\end_layout
\begin_layout Code
-
EUI-48/MAC address filter tokens:
\end_layout
\begin_layout Code
-
IMPLEMENTATION MISSING
\end_layout
\begin_layout Code
-
EUI-64 address filter tokens:
\end_layout
\begin_layout Code
-
IMPLEMENTATION MISSING
\end_layout
@@ -4388,12 +3879,10 @@
\end_layout
\begin_layout Code
-
$ cat ip.bieringer.de-log.201504 | ipv6calc -E ipv6.db.cc=DE | wc -l
\end_layout
\begin_layout Code
-
5068
\end_layout
@@ -4402,12 +3891,10 @@
\end_layout
\begin_layout Code
-
$ cat ip.bieringer.de-log.201504 | ipv6calc -E ipv6.db.cc=US | wc -l
\end_layout
\begin_layout Code
-
305
\end_layout
@@ -4416,12 +3903,10 @@
\end_layout
\begin_layout Code
-
$ cat ip.bieringer.de-log.201504 | ipv6calc -E ipv6.db.reg=ARIN | wc -l
\end_layout
\begin_layout Code
-
306
\end_layout
@@ -4430,12 +3915,10 @@
\end_layout
\begin_layout Code
-
$ cat ip.bieringer.de-log.201504 | ipv6calc -E iid-random | wc -l
\end_layout
\begin_layout Code
-
4806
\end_layout
@@ -4444,13 +3927,11 @@
\end_layout
\begin_layout Code
-
$ cat ip.bieringer.de-log.201504 | ipv6calc -E ipv6.db.cc=US,iid-random | wc
-l
\end_layout
\begin_layout Code
-
16
\end_layout
@@ -4459,13 +3940,11 @@
\end_layout
\begin_layout Code
-
$ cat ip.bieringer.de-log.201504 | ipv6calc -A filter -E ipv6.db.cc=US,iid-random,ipv
4.db.cc=US | wc -l
\end_layout
\begin_layout Code
-
1842
\end_layout
@@ -4474,34 +3953,28 @@
\end_layout
\begin_layout Code
-
$ cat ip.bieringer.de-log.201504 | ipv6calc -A filter -E db.asn=8767 | wc -l
\end_layout
\begin_layout Code
-
2363
\end_layout
\begin_layout Code
-
$ cat ip.bieringer.de-log.201504 | ipv6calc -A filter -E ipv6.db.asn=8767 | wc
-l
\end_layout
\begin_layout Code
-
1452
\end_layout
\begin_layout Code
-
$ cat ip.bieringer.de-log.201504 | ipv6calc -A filter -E ipv4.db.asn=8767 | wc
-l
\end_layout
\begin_layout Code
-
911
\end_layout
@@ -4511,23 +3984,19 @@
\end_layout
\begin_layout Code
-
$ cat ip.bieringer.de-log.201609 | awk '{ print $1 }' | sort | uniq | ipv6calc
-E ipv6.addr=ge=2002::,ipv6.addr=lt=2003::
\end_layout
\begin_layout Code
-
2002:2518:0:1:2:3:4:5
\end_layout
\begin_layout Code
-
...
\end_layout
\begin_layout Code
-
2002:d950:0:1:2:3:4:5
\end_layout
@@ -4557,12 +4026,10 @@
\end_layout
\begin_layout Code
-
$ ipv6calc -A test -?
\end_layout
\begin_layout Code
-
ipv6calc: version 2.1.1 GeoIP GeoIPv6 IP2Location IP2Location6 DBIPv4 DBIPv6
DB_AS_REG DB_IPV4_REG DB_IPV6_REG DB_IPV4_AS DB_IPV6_AS DB_IPV4_CC DB_IPV6_CC
DB_IPV4_COUNTRY DB_IPV6_COUNTRY DB_IPV4_CITY DB_IPV6_CITY DB_IPV4_REGION
@@ -4572,75 +4039,61 @@
\end_layout
\begin_layout Code
-
Test given address(es) against supported tests:
\end_layout
\begin_layout Code
-
--test_prefix <PREFIX> : inside a prefix
\end_layout
\begin_layout Code
-
--test_gt|--test_ge <ADDRESS>: greater(/equal) than an address
\end_layout
\begin_layout Code
-
--test_lt|--test_le <ADDRESS>: less(/equal) than an address
\end_layout
\begin_layout Code
-
Test given address(es) from stdin, e.g.
\end_layout
\begin_layout Code
-
echo '2001:db8::1' | ipv6calc [-A test] --test_prefix 2001:db8::/32
\end_layout
\begin_layout Code
-
echo '2001:db8::1' | ipv6calc [-A test] --test_prefix 2001:db9::/32
\end_layout
\begin_layout Code
-
Single address test, return code: 0=inside/matching 1=outside/not-matching
2=uncomparable
\end_layout
\begin_layout Code
-
ipv6calc [-A test] --test_prefix 2001:db8::/32 2001:db8::1
\end_layout
\begin_layout Code
-
ipv6calc [-A test] --test_prefix 2001:db9::/32 2001:db8::1
\end_layout
\begin_layout Code
-
ipv6calc [-A test] --test_ge 2001:db8:: --test_le 2001:db8:ffff:ffff:ffff:ffff
:ffff:ffff 2001:db8::1
\end_layout
\begin_layout Code
-
ipv6calc [-A test] --test_ge 2001:db9:: --test_le 2001:db9:ffff:ffff:ffff:ffff
:ffff:ffff 2001:db8::1
\end_layout
\begin_layout Code
-
ipv6calc [-A test] --test_ge 2001:db9:: --test_lt 2001:dba:: 2001:db8::1
\end_layout
\begin_layout Code
-
ipv6calc [-A test] --test_ge 2001:db8:: --test_lt 2001:db9:: 2001:db8::1
\end_layout
@@ -4649,29 +4102,24 @@
\end_layout
\begin_layout Code
-
$ ipv6calc --test_ge 2001:db8:: --test_le 2001:db8:ffff:ffff:ffff:ffff:ffff:ffff
2001:db8::1; echo $?
\end_layout
\begin_layout Code
-
no input type specified, try autodetection...found type: ipv6addr
\end_layout
\begin_layout Code
-
no output type specified, try autodetection...found type: ipv6addr
\end_layout
\begin_layout Code
-
2001:db8::1 greater/equal than 2001:db8:: less/equal than 2001:db8:ffff:ffff:
ffff:ffff:ffff:ffff
\end_layout
\begin_layout Code
-
0
\end_layout
@@ -4680,19 +4128,16 @@
\end_layout
\begin_layout Code
-
$ ipv6calc -q --test_ge 2001:db8:: --test_le 2001:db8:ffff:ffff:ffff:ffff:ffff:f
fff 2001:db8::1; echo $?
\end_layout
\begin_layout Code
-
2001:db8::1 greater/equal than 2001:db8:: less/equal than 2001:db8:ffff:ffff:
ffff:ffff:ffff:ffff
\end_layout
\begin_layout Code
-
0
\end_layout
@@ -4701,19 +4146,16 @@
\end_layout
\begin_layout Code
-
$ echo -e "1.2.3.4
\backslash
n1.2.4.4" | ipv6calc --test_prefix 1.2.3.0/24
\end_layout
\begin_layout Code
-
1.2.3.4 inside 1.2.3.0/24
\end_layout
\begin_layout Code
-
1.2.4.4 NOT inside 1.2.3.0/24
\end_layout
@@ -4732,113 +4174,91 @@
\end_layout
\begin_layout Code
-
$ ipv6logconv -h
\end_layout
\begin_layout Code
-
ipv6logconv: version 2.1.1 CONV_REG CONV_IEEE
\end_layout
\begin_layout Code
-
(P) & (C) 2002-2019 by Peter Bieringer <pb (at) bieringer.de>
\end_layout
\begin_layout Code
-
This program converts IPv4/IPv6 addresses in HTTP server log files
\end_layout
\begin_layout Code
-
[-d|--debug <debug value>] : debug value (bitwise like)
\end_layout
\begin_layout Code
-
can also be set by IPV6CALC_DEBUG environment
value
\end_layout
\begin_layout Code
-
[-v|--version [-v [-v]]] : version information (2 optional detail levels)
\end_layout
\begin_layout Code
-
[-v|--version -h] : explanation of feature tokens
\end_layout
\begin_layout Code
-
[-V|--verbose] : be more verbose
\end_layout
\begin_layout Code
-
[-h|--help|-?] : this online help
\end_layout
\begin_layout Code
-
Performance options:
\end_layout
\begin_layout Code
-
[-n|--nocache] : disable caching
\end_layout
\begin_layout Code
-
[-c|--cachelimit <value>] : set cache limit
\end_layout
\begin_layout Code
-
default: 20
\end_layout
\begin_layout Code
-
maximum: 200
\end_layout
\begin_layout Code
-
Output options:
\end_layout
\begin_layout Code
-
[--out <output type>] : specify output type
\end_layout
\begin_layout Code
-
addrtype : Address type
\end_layout
\begin_layout Code
-
ouitype : OUI (IEEE) type
\end_layout
\begin_layout Code
-
ipv6addrtype : IPv6 address type
\end_layout
\begin_layout Code
-
any : any type
\end_layout
\begin_layout Code
-
Takes data from stdin, proceed it to stdout
\end_layout
@@ -4869,13 +4289,11 @@
\end_layout
\begin_layout Code
-
$ echo "2002:50b5:7940:0000:0000:0000:50b5:7940 - -" | ipv6logconv -q --out
any
\end_layout
\begin_layout Code
-
RIPENCC.6to4.global-unicast.ipv6-addr.addrtype.ipv6calc
\end_layout
@@ -5021,115 +4439,95 @@
\end_layout
\begin_layout Code
-
* IID anonymization is done by replacing with related information (64-bit)
\end_layout
\begin_layout Code
-
* xxxx:xxxx:xxxx:xxxC (C = 4-bit checksum)
\end_layout
\begin_layout Code
-
*
\end_layout
\begin_layout Code
-
* a9p9 4941 0000 000C -> RFC 4941 anonymized privacy extension Interface
ID
\end_layout
\begin_layout Code
-
*
\end_layout
\begin_layout Code
-
* a9p9 4291 4xxx xxxC -> RFC 4291 anonymized EUI-48 Interface ID, xxx
xxx = converted OUI
\end_layout
\begin_layout Code
-
* a9p9 4291 5xxx xxxC -> RFC 4291 anonymized EUI-48 Interface ID, xxx
xxx = converted mapped IAB/OUI-36
\end_layout
\begin_layout Code
-
* a9p9 4291 6xxx xxxC -> RFC 4291 anonymized EUI-64 Interface ID, xxx
xxx = converted OUI
\end_layout
\begin_layout Code
-
* a9p9 4291 7xxx xxxC -> RFC 4291 anonymized EUI-64 Interface ID, xxx
xxx = converted mapped IAB/OUI-36
\end_layout
\begin_layout Code
-
* a9p9 4291 8xxx xxxC -> RFC 4291 embedded anonymized IPv4 address, xxx
xxx = first 24 bit of included (anonymized) IPv4 address
\end_layout
\begin_layout Code
-
* a9p9 4291 c02d 5d1C -> RFC 4291 Chapter 2.5.1 anonymized static Interface
ID
\end_layout
\begin_layout Code
-
*
\end_layout
\begin_layout Code
-
* a9p9 5214 4xxx xxxC -> RFC 5214 anonymized ISATAP Interface ID, xxx
xxx = first 24 bit of included (anonymized) IPv4 address (local scope)
\end_layout
\begin_layout Code
-
* a9p9 5214 5xxx xxxC -> RFC 5214 anonymized ISATAP Interface ID, xxx
xxx = first 24 bit of included (anonymized) IPv4 address (global scope)
\end_layout
\begin_layout Code
-
* a9p9 5214 cxx0 000C -> RFC 5214 anonymized ISATAP Interface ID, xx
= first 8 bit of included vendor ID (local scope)
\end_layout
\begin_layout Code
-
* a9p9 5214 dxx0 000C -> RFC 5214 anonymized ISATAP Interface ID, xx
= first 8 bit of included vendor ID (global scope)
\end_layout
\begin_layout Code
-
* a9p9 5214 exxx xxxC -> RFC 5214 anonymized ISATAP Interface ID, xxx
xxx = first 24 bit of included extension ID (local scope)
\end_layout
\begin_layout Code
-
* a9p9 5214 fxxx xxxC -> RFC 5214 anonymized ISATAP Interface ID, xxx
xxx = first 24 bit of included extension ID (global scope)
\end_layout
\begin_layout Code
-
*
\end_layout
\begin_layout Code
-
* a9p9 4843 0000 000C -> RFC 4843 anonymized ORCHID hash
\end_layout
@@ -5138,12 +4536,10 @@
\end_layout
\begin_layout Code
-
* SLA/NLA prefix part anonymization is done by replacing with pattern a909a909
\end_layout
\begin_layout Code
-
* p = number of nibbles anonymized
\end_layout
@@ -5178,44 +4574,36 @@
\end_layout
\begin_layout Code
-
* Prefix anonymization in case of method=kp: p=0x0f
\end_layout
\begin_layout Code
-
* a909:ccca:aaaa:aaaC (C = 4-bit checksum)
\end_layout
\begin_layout Code
-
* ccc -> 10-bit Country Code mapping [A-Z]*[A-Z0-9]
(936)
\end_layout
\begin_layout Code
-
* 0x3FD = LISP
\end_layout
\begin_layout Code
-
* 0x3FE = unknown country
\end_layout
\begin_layout Code
-
* 0x3FF - 16 + REGISTRY_6BONE && ASN=0
= 6bone
\end_layout
\begin_layout Code
-
* 0x000-0x3A7: c1= c / 36, c2 = c % 36
\end_layout
\begin_layout Code
-
* aaaaaaaa -> 32-bit ASN
\end_layout
@@ -5224,198 +4612,159 @@
\end_layout
\begin_layout Code
-
* Global IPv4 addresses are anoymized by storing country code and AS number
\end_layout
\begin_layout Code
-
* and using prefix of experimental range (240-255.x.y.z)
\end_layout
\begin_layout Code
-
*
\end_layout
\begin_layout Code
-
* 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
\end_layout
\begin_layout Code
-
* 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
\end_layout
\begin_layout Code
-
* 1 1 1 1
\end_layout
\begin_layout Code
-
* |p p p p|
\end_layout
\begin_layout Code
-
* Prefix
\end_layout
\begin_layout Code
-
* 0xF
\end_layout
\begin_layout Code
-
*
\end_layout
\begin_layout Code
-
* Pariy Bit (odd parity)
\end_layout
\begin_layout Code
-
* |P|
\end_layout
\begin_layout Code
-
*
\end_layout
\begin_layout Code
-
* Mapping of Country Code
\end_layout
\begin_layout Code
-
* |c c c c c c c c c c|
\end_layout
\begin_layout Code
-
* 10-bit Country Code mapping [A-Z]*[A-Z0-9] (936)
\end_layout
\begin_layout Code
-
* 0x3FF = unknown country
\end_layout
\begin_layout Code
-
* 0x000-0x3A7: c1= c / 36, c2 = c % 36
\end_layout
\begin_layout Code
-
*
\end_layout
\begin_layout Code
-
* Mapping of ASN <= 65535
\end_layout
\begin_layout Code
-
* 0|a a a a a a a a a a a a a a a a|
\end_layout
\begin_layout Code
-
* 16-bit ASN
\end_layout
\begin_layout Code
-
*
\end_layout
\begin_layout Code
-
* Mapping of ASN >= 65536, ASN & 0xE000 == 0 (12-bit LSB is ok)
\end_layout
\begin_layout Code
-
* 1|r r r|0|l l l l l l l l l l l l|
\end_layout
\begin_layout Code
-
* 13-bit LSB of ASN
\end_layout
\begin_layout Code
-
*
\end_layout
\begin_layout Code
-
* Mapping of ASN >= 65536, ASN & 0xE000 != 0 (12-bit LSB overflow) => unspecifi
ed
\end_layout
\begin_layout Code
-
* 1|r r r|1|0 0 0 0 0 0 0 0 0 0 0 0|
\end_layout
\begin_layout Code
-
*
\end_layout
\begin_layout Code
-
* Mapping of ASN registry for ASN >= 65536
\end_layout
\begin_layout Code
-
* 0 0 0 = "unknown ASN registry"
\end_layout
\begin_layout Code
-
* 0 1 0 = APNIC
\end_layout
\begin_layout Code
-
* 0 1 1 = RIPE
\end_layout
\begin_layout Code
-
* 1 0 0 = LACNIC
\end_layout
\begin_layout Code
-
* 1 0 1 = AFRINIC
\end_layout
\begin_layout Code
-
* 1 1 0 = ARIN
\end_layout
\begin_layout Code
-
* Mapping of LISP
\end_layout
\begin_layout Code
-
* 1|r r r|1|1|0 0 0 0 0 0 0 0 0 0 0|
\end_layout
@@ -5441,78 +4790,63 @@
\end_layout
\begin_layout Code
-
* a909:sssg:gggg:gggC (C = 4-bit checksum)
\end_layout
\begin_layout Code
-
* sss -> 10-bit source mapping
\end_layout
\begin_layout Code
-
* GeonameID source information
\end_layout
\begin_layout Code
-
* 0x000 = unknown
\end_layout
\begin_layout Code
-
* 0x001 = continent (prio: lowest)
\end_layout
\begin_layout Code
-
* 0x002 = country
\end_layout
\begin_layout Code
-
* 0x003 = state/prov
\end_layout
\begin_layout Code
-
* 0x004 = district
\end_layout
\begin_layout Code
-
* 0x005 = city (prio: highest)
\end_layout
\begin_layout Code
-
* 0x006 = (reserved)
\end_layout
\begin_layout Code
-
* 0x007 = LISP
\end_layout
\begin_layout Code
-
* 0x0r.
= registry
\end_layout
\begin_layout Code
-
* -> 2 leftmost bit are |0 1|
\end_layout
\begin_layout Code
-
* gggggggg -> 32-bit GeonameID
\end_layout
\begin_layout Code
-
* 0x11800 = LISP
\end_layout
@@ -5521,188 +4855,151 @@
\end_layout
\begin_layout Code
-
* IPv4 address anonymization type "keep-type-geonameid"
\end_layout
\begin_layout Code
-
* Global IPv4 addresses are anonymized by storing GeonameID
\end_layout
\begin_layout Code
-
* and using prefix of experimental range (240-255.x.y.z)
\end_layout
\begin_layout Code
-
*
\end_layout
\begin_layout Code
-
* 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
\end_layout
\begin_layout Code
-
* 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
\end_layout
\begin_layout Code
-
* 1 1 1 1
\end_layout
\begin_layout Code
-
* |p p p p|
\end_layout
\begin_layout Code
-
* Prefix
\end_layout
\begin_layout Code
-
* 0xF
\end_layout
\begin_layout Code
-
*
\end_layout
\begin_layout Code
-
* Parity Bit (even parity)
\end_layout
\begin_layout Code
-
* |P|
\end_layout
\begin_layout Code
-
*
\end_layout
\begin_layout Code
-
* Mapping of GeonameID source
\end_layout
\begin_layout Code
-
* |s s s|
\end_layout
\begin_layout Code
-
* 3-bit GeonameID source information
\end_layout
\begin_layout Code
-
* 0 0 0 (0x0) = unknown
\end_layout
\begin_layout Code
-
* 0 0 1 (0x1) = continent (prio: lowest)
\end_layout
\begin_layout Code
-
* 0 1 0 (0x2) = country
\end_layout
\begin_layout Code
-
* 0 1 1 (0x3) = state/prov
\end_layout
\begin_layout Code
-
* 1 0 0 (0x4) = district
\end_layout
\begin_layout Code
-
* 1 0 1 (0x5) = city (prio: highest)
\end_layout
\begin_layout Code
-
* 1 1 0 (0x6) = (reserved)
\end_layout
\begin_layout Code
-
* 1 1 1 (0x7) = LISP
\end_layout
\begin_layout Code
-
*
\end_layout
\begin_layout Code
-
* Mapping of GeonameID (limited to IDs < 2^24, in worst case ID from source
with lower prio is used)
\end_layout
\begin_layout Code
-
* |g g g g g g g g g g g g g g g g g g g g g g g g|
\end_layout
\begin_layout Code
-
*
\end_layout
\begin_layout Code
-
* Mapping of LISP registry
\end_layout
\begin_layout Code
-
* 0 0 0 = "unknown ASN registry"
\end_layout
\begin_layout Code
-
* 0 1 0 = APNIC
\end_layout
\begin_layout Code
-
* 0 1 1 = RIPE
\end_layout
\begin_layout Code
-
* 1 0 0 = LACNIC
\end_layout
\begin_layout Code
-
* 1 0 1 = AFRINIC
\end_layout
\begin_layout Code
-
* 1 1 0 = ARIN
\end_layout
\begin_layout Code
-
* |0 0 0 0 0 0 0 1 r r r 1 1 0 0 0 0 0 0 0 0 0 0 0|
\end_layout
@@ -5730,448 +5027,366 @@
\end_layout
\begin_layout Code
-
$ ipv6loganon -h
\end_layout
\begin_layout Code
-
ipv6loganon: version 2.1.1 ANON_ZEROISE ANON_ANONYMIZE ANON_KEEP-TYPE-ASN-CC
ANON_KEEP-TYPE-GEONAMEID
\end_layout
\begin_layout Code
-
(P) & (C) 2007-2019 by Peter Bieringer <pb (at) bieringer.de>
\end_layout
\begin_layout Code
-
This program anonymizes IPv4/IPv6 addresses in e.g.
HTTP server log files
\end_layout
\begin_layout Code
-
[-d|--debug <debug value>] : debug value (bitwise like)
\end_layout
\begin_layout Code
-
can also be set by IPV6CALC_DEBUG environment
value
\end_layout
\begin_layout Code
-
[-v|--version [-v [-v]]] : version information (2 optional detail levels)
\end_layout
\begin_layout Code
-
[-v|--version -h] : explanation of feature tokens
\end_layout
\begin_layout Code
-
[-V|--verbose] : be more verbose
\end_layout
\begin_layout Code
-
[-h|--help|-?] : this online help
\end_layout
\begin_layout Code
-
[-q|--quiet] : be more quiet
\end_layout
\begin_layout Code
-
[--disable-ip2location ] : IP2Location support disabled
\end_layout
\begin_layout Code
-
[--db-ip2location-disable ] : IP2Location support disabled
\end_layout
\begin_layout Code
-
[--db-ip2location-dir <directory>] : IP2Location database directory (default:
/usr/share/IP2Location)
\end_layout
\begin_layout Code
-
[--db-ip2location-lib <file> ] : IP2Location library file (default:
libIP2Location.so)
\end_layout
\begin_layout Code
-
[--db-ip2location-only-type <TYPE>]: IP2Location database only selected
type (1-120)
\end_layout
\begin_layout Code
-
[--db-ip2location-allow-softlinks] : IP2Location database softlinks allowed
\end_layout
\begin_layout Code
-
by default they are ignored because it is hard to autodetect COMM/LITE/SAMP
LE
\end_layout
\begin_layout Code
-
[--db-ip2location-lite-to-sample-autoswitch-max-delta-months <MONTHS>]:
\end_layout
\begin_layout Code
-
autoswitch from LITE to SAMPLE databases if possible and delta is not
more than 12 months (0=disabled)
\end_layout
\begin_layout Code
-
[--db-ip2location-comm-to-lite-switch-min-delta-months <MONTHS>]:
\end_layout
\begin_layout Code
-
switch from COMM to LITE databases if possible and delta more than
12 months (0=disabled)
\end_layout
\begin_layout Code
-
[--disable-geoip ] : GeoIP support disabled
\end_layout
\begin_layout Code
-
[--db-geoip-disable ] : GeoIP support disabled
\end_layout
\begin_layout Code
-
[--db-geoip-dir <directory>] : GeoIP database directory (default:
/usr/share/GeoIP)
\end_layout
\begin_layout Code
-
[--db-geoip-lib <file> ] : GeoIP library file (default: libGeoIP.so.1)
\end_layout
\begin_layout Code
-
[--db-mmdb-lib <file> ] : MaxMindDB library file (default:
libmaxminddb.so.0)
\end_layout
\begin_layout Code
-
[--disable-geoip2 ] : GeoIP (MaxMindDB) support disabled
\end_layout
\begin_layout Code
-
[--db-geoip2-disable ] : GeoIP (MaxMindDB) support disabled
\end_layout
\begin_layout Code
-
[--db-geoip2-dir <directory>] : GeoIP (MaxMindDB) database directory
(default: /usr/share/GeoIP)
\end_layout
\begin_layout Code
-
[--disable-dbip2 ] : db-ip.com (MaxMindDB) support disabled
\end_layout
\begin_layout Code
-
[--db-dbip2-disable ] : db-ip.com (MaxMindDB) support disabled
\end_layout
\begin_layout Code
-
[--db-dbip2-dir <directory>] : db-ip.com (MaxMindDB) database directory
(default: /usr/share/DBIP)
\end_layout
\begin_layout Code
-
[--db-dbip2-only-type <TYPE>] : db-ip.com (MaxMindDB) database only
selected type (1-10)
\end_layout
\begin_layout Code
-
[--db-dbip2-comm-to-free-switch-min-delta-months <MONTHS>]:
\end_layout
\begin_layout Code
-
switch from COMM to FREE databases if possible and delta more than
12 months (0=disabled)
\end_layout
\begin_layout Code
-
[--disable-dbip ] : db-ip.com support disabled
\end_layout
\begin_layout Code
-
[--db-dbip-disable ] : db-ip.com support disabled
\end_layout
\begin_layout Code
-
[--db-dbip-dir <directory>] : db-ip.com database directory (default:
/usr/share/DBIP)
\end_layout
\begin_layout Code
-
[--db-dbip-only-type <TYPE>] : db-ip.com database only selected type
(1-10)
\end_layout
\begin_layout Code
-
[--db-dbip-comm-to-free-switch-min-delta-months <MONTHS>]:
\end_layout
\begin_layout Code
-
switch from COMM to FREE databases if possible and delta more than
12 months (0=disabled)
\end_layout
\begin_layout Code
-
[--disable-external ] : External support disabled
\end_layout
\begin_layout Code
-
[--db-external-disable ] : External support disabled
\end_layout
\begin_layout Code
-
[--db-external-dir <directory>] : External database directory (default:
/usr/share/ipv6calc/db)
\end_layout
\begin_layout Code
-
[--disable-builtin ] : BuiltIn support disabled
\end_layout
\begin_layout Code
-
[--db-builtin-disable ] : BuiltIn support disabled
\end_layout
\begin_layout Code
-
[--db-priorization <entry1>[:...]] : Database priorization order list (overwrites
default)
\end_layout
\begin_layout Code
-
colon separated: GeoIP GeoIP2 IP2Locati
on DBIP DBIP2 External BuiltIn
\end_layout
\begin_layout Code
-
[-w|--write] : write output to file instead of stdout
\end_layout
\begin_layout Code
-
[-a|--append] : append output to file instead of stdout
\end_layout
\begin_layout Code
-
[-f|--flush] : flush output after each line
\end_layout
\begin_layout Code
-
[-V|--verbose] : be verbose
\end_layout
\begin_layout Code
-
[-n|--nocache] : disable caching
\end_layout
\begin_layout Code
-
[-c|--cachelimit <value>] : set cache limit
\end_layout
\begin_layout Code
-
default: 20
\end_layout
\begin_layout Code
-
maximum: 200
\end_layout
\begin_layout Code
-
Shortcut for anonymization presets:
\end_layout
\begin_layout Code
-
--anonymize-standard (default)
\end_layout
\begin_layout Code
-
--anonymize-careful
\end_layout
\begin_layout Code
-
--anonymize-paranoid
\end_layout
\begin_layout Code
-
Supported methods [--anonymize-method METHOD]:
\end_layout
\begin_layout Code
-
anonymize : reliable anonymization, keep as much type information as
possible
\end_layout
\begin_layout Code
-
zeroize : simple zeroizing according to given masks, probably loose
type information
\end_layout
\begin_layout Code
-
keep-type-asn-cc: special reliable anonymization, keep type & Autonomous
System Number and CountryCode
\end_layout
\begin_layout Code
-
keep-type-geonameid: special reliable anonymization, keep type & GeonameID
\end_layout
\begin_layout Code
-
Available presets (shortcut names) [--anonymize-preset|ap PRESET-NAME]:
\end_layout
\begin_layout Code
-
anonymize-standard (as): mask-ipv6= 56 mask-ipv4=24 mask-eui64=40 mask-mac=
24 mask-autoadjust=yes method=anonymize
\end_layout
\begin_layout Code
-
anonymize-careful (ac): mask-ipv6= 48 mask-ipv4=20 mask-eui64=24 mask-mac=
24 mask-autoadjust=yes method=anonymize
\end_layout
\begin_layout Code
-
anonymize-paranoid (ap): mask-ipv6= 40 mask-ipv4=16 mask-eui64= 0 mask-mac=
24 mask-autoadjust=no method=anonymize
\end_layout
\begin_layout Code
-
zeroize-standard (zs): mask-ipv6= 56 mask-ipv4=24 mask-eui64=40 mask-mac=
24 mask-autoadjust=yes method=zeroize
\end_layout
\begin_layout Code
-
zeroize-careful (zc): mask-ipv6= 48 mask-ipv4=20 mask-eui64=24 mask-mac=
24 mask-autoadjust=yes method=zeroize
\end_layout
\begin_layout Code
-
zeroize-paranoid (zp): mask-ipv6= 40 mask-ipv4=16 mask-eui64= 0 mask-mac=
24 mask-autoadjust=no method=zeroize
\end_layout
\begin_layout Code
-
keep-type-asn-cc (kp): mask-ipv6= 56 mask-ipv4=24 mask-eui64=40 mask-mac=
24 mask-autoadjust=yes method=keep-type-asn-cc
\end_layout
\begin_layout Code
-
keep-type-geonameid (kg): mask-ipv6= 56 mask-ipv4=24 mask-eui64=40 mask-mac=
24 mask-autoadjust=yes method=keep-type-geonameid
\end_layout
\begin_layout Code
-
Custom control:
\end_layout
\begin_layout Code
-
--mask-ipv4 <bits> : mask IPv4 address [0-32] (even if occurs in
IPv6 address)
\end_layout
\begin_layout Code
-
--mask-ipv6 <bits> : mask IPv6 prefix [0-64] (only applied to related
address types)
\end_layout
\begin_layout Code
-
--mask-eui64 <bits> : mask EUI-64 address or IPv6 interface identifier
[0-64]
\end_layout
\begin_layout Code
-
--mask-mac <bits> : mask MAC address [0-48]
\end_layout
\begin_layout Code
-
--mask-autoadjust yes|no: autoadjust mask to keep type/vendor information
regardless of less given mask
\end_layout
\begin_layout Code
-
Takes data from stdin, outputs the processed data to stdout (default)
\end_layout
@@ -6184,7 +5399,6 @@
\end_layout
\begin_layout Code
-
$ cat /path/to/http_log | ./ipv6loganon >/path/to/http_log_anonymized
\end_layout
@@ -6207,7 +5421,6 @@
\end_layout
\begin_layout Code
-
CustomLog "|/usr/local/bin/ipv6loganon -a -f /var/log/httpd/access_log"
combined
\end_layout
@@ -6229,7 +5442,6 @@
\end_layout
\begin_layout Code
-
CustomLog "|/usr/bin/ipv6loganon -f |/usr/sbin/cronolog /var/log/httpd/access.log
-%Y%m%d" combined
\end_layout
@@ -6239,7 +5451,6 @@
\end_layout
\begin_layout Code
-
CustomLog "|$/usr/bin/ipv6loganon -f |/usr/sbin/cronolog /var/log/httpd/access.lo
g-%Y%m%d" combined
\end_layout
@@ -6265,27 +5476,22 @@
\end_layout
\begin_layout Code
-
$ /usr/share/ipv6calc/tools/IP2Location-update.sh -h
\end_layout
\begin_layout Code
-
Usage: IP2Location-update.sh [-D <dir>] [-n] [-s]
\end_layout
\begin_layout Code
-
-D <dir> database destination directory (optional)
\end_layout
\begin_layout Code
-
-n no action (dry-run)
\end_layout
\begin_layout Code
-
-s skip already successfully downloaded files
\end_layout
@@ -6294,7 +5500,6 @@
\end_layout
\begin_layout Code
-
database directory: /usr/share/IP2Location (default: /usr/share/IP2Location)
\end_layout
@@ -6303,7 +5508,6 @@
\end_layout
\begin_layout Code
-
it honors externally defined environment value: IP2LOCATION_DAT_DIR
\end_layout
@@ -6312,12 +5516,10 @@
\end_layout
\begin_layout Code
-
this script will download data from ip2location.com
\end_layout
\begin_layout Code
-
into given/set database directory
\end_layout
@@ -6326,12 +5528,10 @@
\end_layout
\begin_layout Code
-
Sample databases:
\end_layout
\begin_layout Code
-
IP2LOCATION_DAT_FILES_SAMPLE=IPv4:20 IPv6:20 IPv4:24 IPv6:24
\end_layout
@@ -6340,48 +5540,39 @@
\end_layout
\begin_layout Code
-
Lite (free) databases:
\end_layout
\begin_layout Code
-
IP2LOCATION_DAT_FILES_LITE_FREE=IPv4:1 IPv6:1
\end_layout
\begin_layout Code
-
\end_layout
\begin_layout Code
-
With authentication (requires login/password in /home/compile/.ip2location)
and a valid subscription
\end_layout
\begin_layout Code
-
IP2LOCATION_DAT_FILES_LITE=
\end_layout
\begin_layout Code
-
\end_layout
\begin_layout Code
-
Credentials must be defined in $HOME/.ip2location by
\end_layout
\begin_layout Code
-
login=IP2LOCATION-LOGIN
\end_layout
\begin_layout Code
-
password=IP2LOCATION-PASSWORD
\end_layout
@@ -6390,7 +5581,6 @@
\end_layout
\begin_layout Code
-
In addition settings from above can be overwritten by setting related variables
\end_layout
@@ -6405,67 +5595,54 @@
\end_layout
\begin_layout Code
-
$ /usr/share/ipv6calc/tools/GeoIP-update.sh -h
\end_layout
\begin_layout Code
-
Usage: GeoIP-update.sh [-D <dir>] [-v] [-s] [-L] [-G]
\end_layout
\begin_layout Code
-
-s skip download
\end_layout
\begin_layout Code
-
-D <dir> database directory (optional)
\end_layout
\begin_layout Code
-
-v verbose
\end_layout
\begin_layout Code
-
database directory: @GEOIP2_DB@ (default: @GEOIP2_DB@)
\end_layout
\begin_layout Code
-
it honors externally defined environment value:
\end_layout
\begin_layout Code
-
prio 1: GEOIP_DAT_DIR
\end_layout
\begin_layout Code
-
prio 2: IPV6CALC_DB_GEOIP2_DIR
\end_layout
\begin_layout Code
-
adjust /etc/GeoIP.conf in advance:
\end_layout
\begin_layout Code
-
EditionIDs GeoLite2-Country GeoLite2-City GeoLite2-ASN
\end_layout
\begin_layout Code
-
(in case a valid license key exists, add key and extend EditionIDs related)
\end_layout
\begin_layout Code
-
see also https://dev.maxmind.com/geoip/geoipupdate/
\end_layout
@@ -6479,104 +5656,84 @@
\end_layout
\begin_layout Code
-
$ /usr/share/ipv6calc/tools/DBIP-update.sh -h
\end_layout
\begin_layout Code
-
Usage: DBIP-update.sh [-v] [-s] [-D <dir>] [-U <url>] [-T <type>]
\end_layout
\begin_layout Code
-
-s skip download
\end_layout
\begin_layout Code
-
-v verbose
\end_layout
\begin_layout Code
-
-D <dir> database directory (optional)
\end_layout
\begin_layout Code
-
-U <url> use URL to download full database
\end_layout
\begin_layout Code
-
-T <type> set type of via URL downloaded file
\end_layout
\begin_layout Code
-
MMDB: country|isp|location|*location-isp*
\end_layout
\begin_layout Code
-
CSV : isp|location|*full*
\end_layout
\begin_layout Code
-
database directory: /usr/share/DBIP (default: /usr/share/DBIP)
\end_layout
\begin_layout Code
-
it honors externally defined environment value:
\end_layout
\begin_layout Code
-
prio 1: DBIP_DAT_DIR
\end_layout
\begin_layout Code
-
prio 2: IPV6CALC_DB_DBIP2_DIR
\end_layout
\begin_layout Code
-
this script will download data from
\end_layout
\begin_layout Code
-
DB-IP.com (default: free versions) the MaxMindDB (mmdb) files DB files for
ipv6calc
\end_layout
\begin_layout Code
-
"DBIP" database support
\end_layout
\begin_layout Code
-
DBIP_DAT_URL_BASE=http://download.db-ip.com/free/
\end_layout
\begin_layout Code
-
DBIP_DAT_FILES=dbip-country-lite-%Y-%m.mmdb.gz dbip-city-lite-%Y-%m.mmdb.gz
\end_layout
\begin_layout Code
-
in case -U <url> (take URL from subscription e-mail) is provided, it downloads
the database
\end_layout
\begin_layout Code
-
use -T <type> in case it's not "location-isp"
\end_layout
@@ -6585,27 +5742,22 @@
\end_layout
\begin_layout Code
-
$ /usr/share/ipv6calc/tools/ipv6calc-db-update.sh -h
\end_layout
\begin_layout Code
-
Usage: ipv6calc-db-update.sh [-s] [-u] [-D <dir>]
\end_layout
\begin_layout Code
-
-s skip download
\end_layout
\begin_layout Code
-
-u unconditional update
\end_layout
\begin_layout Code
-
-D <dir> database directory (optional)
\end_layout
@@ -6614,7 +5766,6 @@
\end_layout
\begin_layout Code
-
database directory: /usr/share/ipv6calc/db (default: /usr/share/ipv6calc/db)
\end_layout
@@ -6623,7 +5774,6 @@
\end_layout
\begin_layout Code
-
it honors externally defined environment value: IPV6CALC_DAT_DIR
\end_layout
@@ -6632,17 +5782,14 @@
\end_layout
\begin_layout Code
-
this script (and its helper scripts) will download data from
\end_layout
\begin_layout Code
-
registries and generate Berkeley DB files for ipv6calc
\end_layout
\begin_layout Code
-
"external" database support
\end_layout
@@ -6734,312 +5881,254 @@
\end_layout
\begin_layout Code
-
$ ipv6logstats -h
\end_layout
\begin_layout Code
-
ipv6logstats: version 2.1.1 STAT_REG STAT_CC STAT_AS
\end_layout
\begin_layout Code
-
(P) & (C) 2003-2019 by Peter Bieringer <pb (at) bieringer.de>
\end_layout
\begin_layout Code
-
Takes web server log data (or any other data which has IPv4/v6 address
in first column)
\end_layout
\begin_layout Code
-
from stdin and print statistics table/list (depending on option) to stdout
\end_layout
\begin_layout Code
-
[-d|--debug <debug value>] : debug value (bitwise like)
\end_layout
\begin_layout Code
-
can also be set by IPV6CALC_DEBUG environment
value
\end_layout
\begin_layout Code
-
[-v|--version [-v [-v]]] : version information (2 optional detail levels)
\end_layout
\begin_layout Code
-
[-v|--version -h] : explanation of feature tokens
\end_layout
\begin_layout Code
-
[-V|--verbose] : be more verbose
\end_layout
\begin_layout Code
-
[-h|--help|-?] : this online help
\end_layout
\begin_layout Code
-
[-q|--quiet] : be more quiet
\end_layout
\begin_layout Code
-
[--disable-ip2location ] : IP2Location support disabled
\end_layout
\begin_layout Code
-
[--db-ip2location-disable ] : IP2Location support disabled
\end_layout
\begin_layout Code
-
[--db-ip2location-dir <directory>] : IP2Location database directory (default:
/usr/share/IP2Location)
\end_layout
\begin_layout Code
-
[--db-ip2location-lib <file> ] : IP2Location library file (default:
libIP2Location.so)
\end_layout
\begin_layout Code
-
[--db-ip2location-only-type <TYPE>]: IP2Location database only selected
type (1-120)
\end_layout
\begin_layout Code
-
[--db-ip2location-allow-softlinks] : IP2Location database softlinks allowed
\end_layout
\begin_layout Code
-
by default they are ignored because it is hard to autodetect COMM/LITE/SAMP
LE
\end_layout
\begin_layout Code
-
[--db-ip2location-lite-to-sample-autoswitch-max-delta-months <MONTHS>]:
\end_layout
\begin_layout Code
-
autoswitch from LITE to SAMPLE databases if possible and delta is not
more than 12 months (0=disabled)
\end_layout
\begin_layout Code
-
[--db-ip2location-comm-to-lite-switch-min-delta-months <MONTHS>]:
\end_layout
\begin_layout Code
-
switch from COMM to LITE databases if possible and delta more than
12 months (0=disabled)
\end_layout
\begin_layout Code
-
[--disable-geoip ] : GeoIP support disabled
\end_layout
\begin_layout Code
-
[--db-geoip-disable ] : GeoIP support disabled
\end_layout
\begin_layout Code
-
[--db-geoip-dir <directory>] : GeoIP database directory (default:
/usr/share/GeoIP)
\end_layout
\begin_layout Code
-
[--db-geoip-lib <file> ] : GeoIP library file (default: libGeoIP.so.1)
\end_layout
\begin_layout Code
-
[--db-mmdb-lib <file> ] : MaxMindDB library file (default:
libmaxminddb.so.0)
\end_layout
\begin_layout Code
-
[--disable-geoip2 ] : GeoIP (MaxMindDB) support disabled
\end_layout
\begin_layout Code
-
[--db-geoip2-disable ] : GeoIP (MaxMindDB) support disabled
\end_layout
\begin_layout Code
-
[--db-geoip2-dir <directory>] : GeoIP (MaxMindDB) database directory
(default: /usr/share/GeoIP)
\end_layout
\begin_layout Code
-
[--disable-dbip2 ] : db-ip.com (MaxMindDB) support disabled
\end_layout
\begin_layout Code
-
[--db-dbip2-disable ] : db-ip.com (MaxMindDB) support disabled
\end_layout
\begin_layout Code
-
[--db-dbip2-dir <directory>] : db-ip.com (MaxMindDB) database directory
(default: /usr/share/DBIP)
\end_layout
\begin_layout Code
-
[--db-dbip2-only-type <TYPE>] : db-ip.com (MaxMindDB) database only
selected type (1-10)
\end_layout
\begin_layout Code
-
[--db-dbip2-comm-to-free-switch-min-delta-months <MONTHS>]:
\end_layout
\begin_layout Code
-
switch from COMM to FREE databases if possible and delta more than
12 months (0=disabled)
\end_layout
\begin_layout Code
-
[--disable-dbip ] : db-ip.com support disabled
\end_layout
\begin_layout Code
-
[--db-dbip-disable ] : db-ip.com support disabled
\end_layout
\begin_layout Code
-
[--db-dbip-dir <directory>] : db-ip.com database directory (default:
/usr/share/DBIP)
\end_layout
\begin_layout Code
-
[--db-dbip-only-type <TYPE>] : db-ip.com database only selected type
(1-10)
\end_layout
\begin_layout Code
-
[--db-dbip-comm-to-free-switch-min-delta-months <MONTHS>]:
\end_layout
\begin_layout Code
-
switch from COMM to FREE databases if possible and delta more than
12 months (0=disabled)
\end_layout
\begin_layout Code
-
[--disable-external ] : External support disabled
\end_layout
\begin_layout Code
-
[--db-external-disable ] : External support disabled
\end_layout
\begin_layout Code
-
[--db-external-dir <directory>] : External database directory (default:
/usr/share/ipv6calc/db)
\end_layout
\begin_layout Code
-
[--disable-builtin ] : BuiltIn support disabled
\end_layout
\begin_layout Code
-
[--db-builtin-disable ] : BuiltIn support disabled
\end_layout
\begin_layout Code
-
[--db-priorization <entry1>[:...]] : Database priorization order list (overwrites
default)
\end_layout
\begin_layout Code
-
colon separated: GeoIP GeoIP2 IP2Locati
on DBIP DBIP2 External BuiltIn
\end_layout
\begin_layout Code
-
[-u|--unknown] : print unknown IP addresses to stderr
\end_layout
\begin_layout Code
-
[-c|--columns] : print statistics in columns (1)
\end_layout
\begin_layout Code
-
[-N|--column-numbers] : print column numbers
\end_layout
\begin_layout Code
-
[-n|--noheader] : don't print header in columns mode (1)
\end_layout
\begin_layout Code
-
[-o|--onlyheader] : print only header in columns mode (1)
\end_layout
\begin_layout Code
-
[-p|--prefix <token>] : print token as prefix (1)
\end_layout
\begin_layout Code
-
[-s|--simple] : disable extended statistic (CountryCode/ASN)
\end_layout
\begin_layout Code
-
(1) unsupported for CountryCode & ASN statistics
\end_layout
@@ -7061,7 +6150,6 @@
\end_layout
\begin_layout Code
-
$ zcat ip.bieringer.de-log.201*.gz | ipv6logstats
\end_layout
@@ -7071,138 +6159,115 @@
\end_layout
\begin_layout Code
-
*Version 3.0
\end_layout
\begin_layout Code
-
*DateTime: 2013:11:03 08:57:01+0000 GMT
\end_layout
\begin_layout Code
-
*UnixTime: 1383469021
\end_layout
\begin_layout Code
-
*3*DB-Info: DB features: 0x0000133f
\end_layout
\begin_layout Code
-
*3*DB-Info: GeoIP: features: 0x00000330
\end_layout
\begin_layout Code
-
*3*DB-Info: GeoIP: info of available databases in directory: /usr/share/GeoIP
(max: 31)
\end_layout
\begin_layout Code
-
*3*DB-Info: GeoIP: GeoIP Country Edition :[ 1] /usr/share/GeoIP/GeoIP.
dat (GEO-106FREE 20130903 Build 1 Copyright (c) 2013 MaxMind
Inc All Rights Reserved)
\end_layout
\begin_layout Code
-
*3*DB-Info: GeoIP: GeoIP ASNum Edition :[ 9] /usr/share/GeoIP/GeoIP
ASNum.dat (GEO-117 20130902 Build 1 Copyright (c) 2013 MaxMind Inc
All Rights Reserved)
\end_layout
\begin_layout Code
-
*3*DB-Info: GeoIP: GeoIP Country V6 Edition :[12] /usr/share/GeoIP/GeoIP
v6.dat (GEO-106FREE 20131001 Build 1 Copyright (c) 2013 MaxMind
Inc All Rights Reserved)
\end_layout
\begin_layout Code
-
*3*DB-Info: GeoIP: GeoIP Large Country Edition :[17] /usr/share/GeoIP/GeoIP.
dat (GEO-106FREE 20130903 Build 1 Copyright (c) 2013 MaxMind
Inc All Rights Reserved)
\end_layout
\begin_layout Code
-
*3*DB-Info: GeoIP: GeoIP Large Country V6 Edition :[18] /usr/share/GeoIP/GeoIP
v6.dat (GEO-106FREE 20131001 Build 1 Copyright (c) 2013 MaxMind
Inc All Rights Reserved)
\end_layout
\begin_layout Code
-
*3*DB-Info: GeoIP: GeoIP ASNum V6 Edition :[21] /usr/share/GeoIP/GeoIP
ASNumv6.dat (GEO-117 20130306 Build 1 Copyright (c) 2013 MaxMind Inc
All Rights Reserved)
\end_layout
\begin_layout Code
-
*3*DB-Info: IP2Location: features: 0x00000300
\end_layout
\begin_layout Code
-
*3*DB-Info: IP2Location: info of available databases in directory: /usr/share/IP
2Location
\end_layout
\begin_layout Code
-
*3*DB-Info: IP2Location: IPv4 Country : /usr/share/IP2Location/IP-
COUNTRY.BIN (IP2L-DB20 20130411 Copyright (c) 2013 IP2Location All Rights
Reserved)
\end_layout
\begin_layout Code
-
*3*DB-Info: IP2Location: IPv6 Country : /usr/share/IP2Location/IPV
6-COUNTRY.BIN (IP2L-DB1 20131025 Copyright (c) 2013 IP2Location All Rights
Reserved)
\end_layout
\begin_layout Code
-
*3*DB-Info: BuiltIn: features: 0x0000100f
\end_layout
\begin_layout Code
-
*3*DB-Info: BuiltIn: info of available databases
\end_layout
\begin_layout Code
-
*3*DB-Info: BuiltIn: ASN : IANA/20130730
\end_layout
\begin_layout Code
-
*3*DB-Info: BuiltIn: CC : AFRINIC/20130806 APNIC/20130805 ARIN/20130805
LACNIC/20130805 RIPENCC/20130805
\end_layout
\begin_layout Code
-
*3*DB-Info: BuiltIn: IPv4 : AFRINIC/20131014 APNIC/20131014 ARIN/20131014
IANA/20130520 LACNIC/20131014 RIPENCC/20131014
\end_layout
\begin_layout Code
-
*3*DB-Info: BuiltIn: IPv6 : AFRINIC/20131015 APNIC/20131014 ARIN/20131014
IANA/20130215 LACNIC/20131014 RIPENCC/20131014
\end_layout
\begin_layout Code
-
*3*DB-Info: BuiltIn: IEEE : IAB/20131015 OUI/20131015 OUI36/20131015
\end_layout
@@ -7211,217 +6276,174 @@
\end_layout
\begin_layout Code
-
ALL 108525
\end_layout
\begin_layout Code
-
IPv4 46233
\end_layout
\begin_layout Code
-
IPv6 62292
\end_layout
\begin_layout Code
-
UNKNOWN 0
\end_layout
\begin_layout Code
-
IPv4/APNIC 2397
\end_layout
\begin_layout Code
-
IPv4/ARIN 3525
\end_layout
\begin_layout Code
-
IPv4/RIPE 40198
\end_layout
\begin_layout Code
-
IPv4/LACNIC 97
\end_layout
\begin_layout Code
-
IPv4/UNKNOWN 16
\end_layout
\begin_layout Code
-
IPv6/6bone 0
\end_layout
\begin_layout Code
-
IPv6/IANA 0
\end_layout
\begin_layout Code
-
IPv6/APNIC 129
\end_layout
\begin_layout Code
-
IPv6/ARIN 839
\end_layout
\begin_layout Code
-
IPv6/RIPE 61074
\end_layout
\begin_layout Code
-
IPv6/LACNIC 0
\end_layout
\begin_layout Code
-
IPv6/RESERVED 0
\end_layout
\begin_layout Code
-
IPv6/UNKNOWN 0
\end_layout
\begin_layout Code
-
IPv6/6to4/IANA 0
\end_layout
\begin_layout Code
-
IPv6/6to4/APNIC 0
\end_layout
\begin_layout Code
-
IPv6/6to4/ARIN 16
\end_layout
\begin_layout Code
-
IPv6/6to4/RIPE 51
\end_layout
\begin_layout Code
-
IPv6/6to4/LACNIC 0
\end_layout
\begin_layout Code
-
IPv6/6to4/RESERVED 0
\end_layout
\begin_layout Code
-
IPv6/6to4/UNKNOWN 0
\end_layout
\begin_layout Code
-
IPv6/Teredo/IANA 0
\end_layout
\begin_layout Code
-
IPv6/Teredo/APNIC 63
\end_layout
\begin_layout Code
-
IPv6/Teredo/ARIN 0
\end_layout
\begin_layout Code
-
IPv6/Teredo/RIPE 90
\end_layout
\begin_layout Code
-
IPv6/Teredo/LACNIC 30
\end_layout
\begin_layout Code
-
IPv6/Teredo/RESERVED 0
\end_layout
\begin_layout Code
-
IPv6/Teredo/UNKNOWN 0
\end_layout
\begin_layout Code
-
IPv6/NAT64/IANA 0
\end_layout
\begin_layout Code
-
IPv6/NAT64/APNIC 0
\end_layout
\begin_layout Code
-
IPv6/NAT64/ARIN 0
\end_layout
\begin_layout Code
-
IPv6/NAT64/RIPE 0
\end_layout
\begin_layout Code
-
IPv6/NAT64/LACNIC 0
\end_layout
\begin_layout Code
-
IPv6/NAT64/RESERVED 0
\end_layout
\begin_layout Code
-
IPv6/NAT64/UNKNOWN 0
\end_layout
\begin_layout Code
-
IPv6/IID/Global 1436
\end_layout
\begin_layout Code
-
IPv6/IID/Random 58198
\end_layout
\begin_layout Code
-
IPv6/IID/Manual 2055
\end_layout
\begin_layout Code
-
IPv6/IID/ISATAP 353
\end_layout
\begin_layout Code
-
IPv6/IID/Unknown 0
\end_layout
@@ -7434,32 +6456,26 @@
\end_layout
\begin_layout Code
-
...
\end_layout
\begin_layout Code
-
*3*CC-code-proto/DE/ALL 96450
\end_layout
\begin_layout Code
-
*3*CC-code-proto/DE/IPv4 36486
\end_layout
\begin_layout Code
-
*3*CC-code-proto/DE/IPv6 59964
\end_layout
\begin_layout Code
-
*3*CC-code-proto-list/DE 96450 36486 59964
\end_layout
\begin_layout Code
-
...
\end_layout
@@ -7476,32 +6492,26 @@
\end_layout
\begin_layout Code
-
...
\end_layout
\begin_layout Code
-
*3*CC-proto-code/ALL/DE 96450
\end_layout
\begin_layout Code
-
*3*CC-proto-code/IPv4/DE 36486
\end_layout
\begin_layout Code
-
*3*CC-proto-code/IPv6/DE 59964
\end_layout
\begin_layout Code
-
...
\end_layout
\begin_layout Code
-
*3*CC-proto-code-list/ALL 108525 46483 62042
\end_layout
@@ -7510,32 +6520,26 @@
\end_layout
\begin_layout Code
-
...
\end_layout
\begin_layout Code
-
*3*AS-num-proto/8767/ALL 6054
\end_layout
\begin_layout Code
-
*3*AS-num-proto/8767/IPv4 2705
\end_layout
\begin_layout Code
-
*3*AS-num-proto/8767/IPv6 3349
\end_layout
\begin_layout Code
-
*3*AS-num-proto-list/8767 6054 2705 3349
\end_layout
\begin_layout Code
-
...
\end_layout
@@ -7552,32 +6556,26 @@
\end_layout
\begin_layout Code
-
...
\end_layout
\begin_layout Code
-
*3*AS-proto-num/ALL/8767 6054
\end_layout
\begin_layout Code
-
*3*AS-proto-num/IPv4/8767 2705
\end_layout
\begin_layout Code
-
*3*AS-proto-num/IPv6/8767 3349
\end_layout
\begin_layout Code
-
...
\end_layout
\begin_layout Code
-
*3*AS-proto-num-list/ALL 108525 46483 62042
\end_layout
@@ -7591,12 +6589,10 @@
\end_layout
\begin_layout Code
-
$ zcat ip.bieringer.de-log.201*.gz | ipv6logstats -q -c
\end_layout
\begin_layout Code
-
IPv4 IPv6 UNKNOWN IPv4/APNIC IPv4/ARIN IPv4/RIPE IPv4/LACNIC IPv4/UNKNOWN
IPv6/6bone IPv6/IANA IPv6/APNIC IPv6/ARIN IPv6/RIPE IPv6/LACNIC IPv6/RESERVED
IPv6/UNKNOWN IPv6/6to4/IANA IPv6/6to4/APNIC IPv6/6to4/ARIN IPv6/6to4/RIPE
@@ -7609,7 +6605,6 @@
\end_layout
\begin_layout Code
-
46233 62292 0 2397 3525 40198 97 16 0 0 129 839 61074 0 0 0 0 0 16 51 0
0 0 0 63 0 90 30 0 0 0 0 0 0 0 0 0 1436 58198 2055 353 0
\end_layout
@@ -7637,12 +6632,10 @@
\end_layout
\begin_layout Code
-
$ zcat ip.bieringer.de-log.201*.gz | ipv6logstats -q -c -n -p ALL
\end_layout
\begin_layout Code
-
ALL 46233 62292 0 2397 3525 40198 97 16 0 0 129 839 61074 0 0 0 0 0 16
51 0 0 0 0 63 0 90 30 0 0 0 0 0 0 0 0 0 1436 58198 2055 353 0
\end_layout
@@ -7803,7 +6796,6 @@
\end_layout
\begin_layout Code
-
LoadModule ipv6calc_module modules/mod_ipv6calc.so
\end_layout
@@ -7812,7 +6804,6 @@
\end_layout
\begin_layout Code
-
ipv6calcEnable on
\end_layout
@@ -7833,7 +6824,6 @@
\end_layout
\begin_layout Code
-
LogFormat "%{IPV6CALC_CLIENT_IP_ANON}e
\backslash
"%{IPV6CALC_CLIENT_COUNTRYCODE}e/%{IPV6CALC_CLIENT_ASN}e/%{IPV6CALC_CLIENT_REGIS
@@ -7859,7 +6849,6 @@
\end_layout
\begin_layout Code
-
CustomLog logs/access_anon_log combined_anon
\end_layout
@@ -7876,7 +6865,6 @@
\end_layout
\begin_layout Code
-
252.176.92.172 "CN/23724/APNIC/keep-type-asn-cc" - [25/Jul/2015:13:20:25 +0200]
"GET / HTTP/1.1" 200 3569 "-" "Mozilla/5.0 (compatible; Baiduspider/2.0; +http://w
ww.baidu.com/search/spider.html)"
@@ -7887,7 +6875,6 @@
\end_layout
\begin_layout Code
-
a909:390a:909a:81d9:a909:4291:c02d:5d1d "CZ/43037/RIPENCC/keep-type-asn-cc"
- [25/Jul/2015:12:59:00 +0200] "GET /robots.txt HTTP/1.1" 200 33 "-" "Mozilla/5.0
(compatible; SeznamBot/3.2; +http://fulltext.sblog.cz/)"
@@ -7935,37 +6922,30 @@
\end_layout
\begin_layout Code
-
$ ipv6calc -q -m -i 252.176.92.172
\end_layout
\begin_layout Code
-
IPV4=252.176.92.172
\end_layout
\begin_layout Code
-
IPV4_TYPE=unicast,anonymized,global
\end_layout
\begin_layout Code
-
IPV4_AS_NUM=23724
\end_layout
\begin_layout Code
-
IPV4_COUNTRYCODE=CN
\end_layout
\begin_layout Code
-
IPV4_REGISTRY=APNIC
\end_layout
\begin_layout Code
-
...
\end_layout
@@ -7974,38 +6954,31 @@
\end_layout
\begin_layout Code
-
$ ipv6calc -q -m -i a909:390a:909a:81d9:a909:4291:c02d:5d1d
\end_layout
\begin_layout Code
-
IPV6=a909:390a:909a:81d9:a909:4291:c02d:5d1d
\end_layout
\begin_layout Code
-
IPV6_TYPE=unicast,anonymized-iid,anonymized-prefix,global-unicast,productive,iid
,iid-local
\end_layout
\begin_layout Code
-
IPV6_COUNTRYCODE=CZ
\end_layout
\begin_layout Code
-
IPV6_AS_NUM=43037
\end_layout
\begin_layout Code
-
IPV6_REGISTRY=RIPENCC
\end_layout
\begin_layout Code
-
...
\end_layout
diff -urN ipv6calc-3.2.0/doc/ipv6calc.sgml ipv6calc-openssl-3/doc/ipv6calc.sgml
--- ipv6calc-3.2.0/doc/ipv6calc.sgml 2021-07-14 05:25:36.000000000 +0200
+++ ipv6calc-openssl-3/doc/ipv6calc.sgml 2021-09-16 21:09:37.000000000 +0200
@@ -56,7 +56,7 @@
<listitem><para>via HTTPS at <ulink url="https://github.com/pbiering/ipv6calc/releases">GitHub / ipv6calc / releases</ulink> </para></listitem></itemizedlist></sect3><sect3>
<title>as tar.gz (signed)</title>
<itemizedlist>
-<listitem><para>from <ulink url="http://www.deepspace6.net/">DeepSpace6</ulink> via FTP <ulink url="ftp://ftp.deepspace6.net/pub/ds6/sources/ipv6calc/">DeepSpace6 / anonymous FTP</ulink> or HTTP <ulink url="http://www.deepspace6.net/ftp/">http://www.deepspace6.net/ftp/</ulink></para></listitem><listitem><para>via <ulink url="ftp://ftp.bieringer.de/pub/linux/IPv6/ipv6calc/">ftp://ftp.bieringer.de/pub/linux/IPv6/ipv6calc/</ulink> or HTTP at <ulink url="http://www.bieringer.de/ftp/">http://www.bieringer.de/ftp/</ulink></para></listitem></itemizedlist><para>Since version 0.95.0 packages are signed with new GPG key, also available here: <ulink url="ftp://ftp.bieringer.de/pub/linux/IPv6/ipv6calc/CODE-GPG-KEY-bieringer.de-2013">CODE-GPG-KEY-bieringer.de-2013 @ftp.bieringer.de</ulink> or <ulink url="ftp://ftp.deepspace6.net/pub/ds6/sources/ipv6calc/CODE-GPG-KEY-bieringer.de-2013">CODE-GPG-KEY-bieringer.de-2013 @ftp.deepspace6.net</ulink></para><screen>
+<listitem><para>from <ulink url="http://www.deepspace6.net/">DeepSpace6</ulink> via FTP <ulink url="ftp://ftp.deepspace6.net/pub/ds6/sources/ipv6calc/">DeepSpace6 / anonymous FTP</ulink> or HTTP <ulink url="http://www.deepspace6.net/ftp/pub/ds6/sources/ipv6calc/">www.deepspace6.net mapped FTP</ulink></para></listitem><listitem><para>via <ulink url="ftp://ftp.bieringer.de/pub/linux/IPv6/ipv6calc/">ftp.bieringer.de / anonymous FTP</ulink> or HTTP at <ulink url="http://www.bieringer.de/ftp/pub/linux/IPv6/ipv6calc/">www.bieringer.de mapped FTP</ulink></para></listitem></itemizedlist><para>Since version 0.95.0 packages are signed with new GPG key, also available here: <ulink url="ftp://ftp.bieringer.de/pub/linux/IPv6/ipv6calc/CODE-GPG-KEY-bieringer.de-2013">CODE-GPG-KEY-bieringer.de-2013 @ftp.bieringer.de</ulink> or <ulink url="ftp://ftp.deepspace6.net/pub/ds6/sources/ipv6calc/CODE-GPG-KEY-bieringer.de-2013">CODE-GPG-KEY-bieringer.de-2013 @ftp.deepspace6.net</ulink></para><screen>
<![CDATA[Key fingerprint: AAB3 8CB7 97C7 50C7 78C6 08C6 DDEB 141D F738 0F61
uid: Peter Bieringer (Code Signing Key 2013) <code@bieringer.de>
]]></screen><para>A SPEC file is included, so you can build a RPM from tar.gz using</para><screen>
diff -urN ipv6calc-3.2.0/doc/ipv6calc.xml ipv6calc-openssl-3/doc/ipv6calc.xml
--- ipv6calc-3.2.0/doc/ipv6calc.xml 2021-07-14 05:25:36.000000000 +0200
+++ ipv6calc-openssl-3/doc/ipv6calc.xml 2021-09-16 21:09:37.000000000 +0200
@@ -52,7 +52,7 @@
<listitem><para>via HTTPS at <ulink url="https://github.com/pbiering/ipv6calc/releases">GitHub / ipv6calc / releases</ulink> </para></listitem></itemizedlist></sect3><sect3>
<title>as tar.gz (signed)</title>
<itemizedlist>
-<listitem><para>from <ulink url="http://www.deepspace6.net/">DeepSpace6</ulink> via FTP <ulink url="ftp://ftp.deepspace6.net/pub/ds6/sources/ipv6calc/">DeepSpace6 / anonymous FTP</ulink> or HTTP <ulink url="http://www.deepspace6.net/ftp/">http://www.deepspace6.net/ftp/</ulink></para></listitem><listitem><para>via <ulink url="ftp://ftp.bieringer.de/pub/linux/IPv6/ipv6calc/">ftp://ftp.bieringer.de/pub/linux/IPv6/ipv6calc/</ulink> or HTTP at <ulink url="http://www.bieringer.de/ftp/">http://www.bieringer.de/ftp/</ulink></para></listitem></itemizedlist><para>Since version 0.95.0 packages are signed with new GPG key, also available here: <ulink url="ftp://ftp.bieringer.de/pub/linux/IPv6/ipv6calc/CODE-GPG-KEY-bieringer.de-2013">CODE-GPG-KEY-bieringer.de-2013 @ftp.bieringer.de</ulink> or <ulink url="ftp://ftp.deepspace6.net/pub/ds6/sources/ipv6calc/CODE-GPG-KEY-bieringer.de-2013">CODE-GPG-KEY-bieringer.de-2013 @ftp.deepspace6.net</ulink></para><screen>
+<listitem><para>from <ulink url="http://www.deepspace6.net/">DeepSpace6</ulink> via FTP <ulink url="ftp://ftp.deepspace6.net/pub/ds6/sources/ipv6calc/">DeepSpace6 / anonymous FTP</ulink> or HTTP <ulink url="http://www.deepspace6.net/ftp/pub/ds6/sources/ipv6calc/">www.deepspace6.net mapped FTP</ulink></para></listitem><listitem><para>via <ulink url="ftp://ftp.bieringer.de/pub/linux/IPv6/ipv6calc/">ftp.bieringer.de / anonymous FTP</ulink> or HTTP at <ulink url="http://www.bieringer.de/ftp/pub/linux/IPv6/ipv6calc/">www.bieringer.de mapped FTP</ulink></para></listitem></itemizedlist><para>Since version 0.95.0 packages are signed with new GPG key, also available here: <ulink url="ftp://ftp.bieringer.de/pub/linux/IPv6/ipv6calc/CODE-GPG-KEY-bieringer.de-2013">CODE-GPG-KEY-bieringer.de-2013 @ftp.bieringer.de</ulink> or <ulink url="ftp://ftp.deepspace6.net/pub/ds6/sources/ipv6calc/CODE-GPG-KEY-bieringer.de-2013">CODE-GPG-KEY-bieringer.de-2013 @ftp.deepspace6.net</ulink></para><screen>
<![CDATA[Key fingerprint: AAB3 8CB7 97C7 50C7 78C6 08C6 DDEB 141D F738 0F61
uid: Peter Bieringer (Code Signing Key 2013) <code@bieringer.de>
]]></screen><para>A SPEC file is included, so you can build a RPM from tar.gz using</para><screen>
diff -urN ipv6calc-3.2.0/ipv6calc/ipv6calc.c ipv6calc-openssl-3/ipv6calc/ipv6calc.c
--- ipv6calc-3.2.0/ipv6calc/ipv6calc.c 2021-07-14 05:25:36.000000000 +0200
+++ ipv6calc-openssl-3/ipv6calc/ipv6calc.c 2021-09-16 21:09:37.000000000 +0200
@@ -1,7 +1,7 @@
/*
* Project : ipv6calc
* File : ipv6calc/ipv6calc.c
- * Version : $Id: 9835f5c0216dc1f687ab71a75172c596b2d8af92 $
+ * Version : $Id: 65827981f0b2b997469d9f456fd16056ffd95c32 $
* Copyright : 2001-2021 by Peter Bieringer <pb (at) bieringer.de>
*
* Information:
@@ -612,6 +612,10 @@
formatoptions |= FORMATOPTION_printfulluncompressed;
break;
+ case FORMATOPTION_NUM_print_octal + FORMATOPTION_NUM_HEAD:
+ formatoptions |= FORMATOPTION_print_octal;
+ break;
+
/* new options */
case 'I':
case CMD_inputtype:
diff -urN ipv6calc-3.2.0/ipv6calc/ipv6calcoptions_local.h ipv6calc-openssl-3/ipv6calc/ipv6calcoptions_local.h
--- ipv6calc-3.2.0/ipv6calc/ipv6calcoptions_local.h 2021-07-14 05:25:36.000000000 +0200
+++ ipv6calc-openssl-3/ipv6calc/ipv6calcoptions_local.h 2021-09-16 21:09:37.000000000 +0200
@@ -1,8 +1,8 @@
/*
* Project : ipv6calc/ipv6calc
* File : ipv6calc/ipv6calcoptions.h
- * Version : $Id: 0a76dc9497d52bccfd83ddb3aed02b562e6682a9 $
- * Copyright : 2002-2020 by Peter Bieringer <pb (at) bieringer.de>
+ * Version : $Id: 036b9e186e0ab5f176ad7a07b76cba46e5a08c10 $
+ * Copyright : 2002-2021 by Peter Bieringer <pb (at) bieringer.de>
*
* Information:
* Header file containing options for ipv6calc
@@ -116,6 +116,8 @@
{ "print-iid-var" , 0, NULL, FORMATOPTION_NUM_print_iid_var + FORMATOPTION_NUM_HEAD },
+ { "print-octal" , 0, NULL, FORMATOPTION_NUM_print_octal + FORMATOPTION_NUM_HEAD },
+
/* new options */
{ "in" , 1, NULL, CMD_inputtype },
{ "out" , 1, NULL, CMD_outputtype },
diff -urN ipv6calc-3.2.0/ipv6calc/Makefile.in ipv6calc-openssl-3/ipv6calc/Makefile.in
--- ipv6calc-3.2.0/ipv6calc/Makefile.in 2021-07-14 05:25:36.000000000 +0200
+++ ipv6calc-openssl-3/ipv6calc/Makefile.in 2021-09-16 21:09:37.000000000 +0200
@@ -1,7 +1,7 @@
# Project : ipv6calc
# File : ipv6calc/Makefile[.in]
-# Version : $Id: 92080140e04c084d13ea23539bafb262ecd49c79 $
-# Copyright : 2002-2020 by Peter Bieringer <pb (at) bieringer.de>
+# Version : $Id: cbe9748ed58795584926df2ae867caad79d3251b $
+# Copyright : 2002-2021 by Peter Bieringer <pb (at) bieringer.de>
#
# Information:
# Makefile for ipv6calc
@@ -52,7 +52,7 @@
$(CC) -o ipv6calc $(OBJS) $(GETOBJS) $(LIBS) -lm $(LDFLAGS) $(LDFLAGS_EXTRA)
static: ipv6calc
- $(CC) -o ipv6calc-static $(OBJS) $(GETOBJS) $(LIBS) -lm $(LDFLAGS) $(LDFLAGS_EXTRA) $(LDFLAGS_EXTRA_STATIC) -static
+ $(CC) -o ipv6calc-static $(OBJS) $(GETOBJS) $(LIBS) -lm $(LDFLAGS) $(LDFLAGS_EXTRA_STATIC) -static
distclean:
${MAKE} clean
diff -urN ipv6calc-3.2.0/ipv6calc/test_ipv6calc.sh ipv6calc-openssl-3/ipv6calc/test_ipv6calc.sh
--- ipv6calc-3.2.0/ipv6calc/test_ipv6calc.sh 2021-07-14 05:25:36.000000000 +0200
+++ ipv6calc-openssl-3/ipv6calc/test_ipv6calc.sh 2021-09-16 21:09:37.000000000 +0200
@@ -2,7 +2,7 @@
#
# Project : ipv6calc
# File : test_ipv6calc.sh
-# Version : $Id: c17f700cfa15a9fe5a31e424d279c5fa7c89f29d $
+# Version : $Id: c4e9682ca14d6b8077a5753357a1611c3cc064d5 $
# Copyright : 2001-2021 by Peter Bieringer <pb (at) bieringer.de>
#
# Test patterns for ipv6calc conversions
@@ -128,6 +128,16 @@
--addr_to_uncompressed --printprefix 3ffe:ffff:100:f101::1/64 =3ffe:ffff:100:f101
--addr_to_uncompressed --printprefix 3ffe:ffff:100:f101::1/65 =3ffe:ffff:100:f101:0
--in ipv6 --out ipv6 --printprefix --printuncompressed 3ffe:ffff:100:f101::1/65 =3ffe:ffff:100:f101:0
+## octal IPv4 (with separator)
+--in ipv4 --out ipv4 --print-octal 192.0.2.1 =0300.0000.0002.0001
+--in ipv4 --out ipv4 --print-octal 192.0.2.1/24 =0300.0000.0002.0001/24
+--in ipv4 --out ipv4 0300.0000.0002.0001 =192.0.2.1
+--in ipv4 --out ipv4 0300.0000.0002.0001/24 =192.0.2.1/24
+## octal IP
+--in ipv4 --out octal 192.0.2.1 =\\\\0300\\\\00\\\\02\\\\01
+--in ipv4 --out octal --printfulluncompressed 192.0.2.1 =\\\\0300\\\\0000\\\\0002\\\\0001
+--in ipv6 --out octal 3ffe:ffff::1 =\\\\077\\\\0376\\\\0377\\\\0377\\\\00\\\\00\\\\00\\\\00\\\\00\\\\00\\\\00\\\\00\\\\00\\\\00\\\\00\\\\01
+--in ipv6 --out octal --printfulluncompressed 3ffe:ffff::1 =\\\\0077\\\\0376\\\\0377\\\\0377\\\\0000\\\\0000\\\\0000\\\\0000\\\\0000\\\\0000\\\\0000\\\\0000\\\\0000\\\\0000\\\\0000\\\\0001
## full uncompressed
--addr_to_fulluncompressed 3ffe:ffff:100:f101::1 =3ffe:ffff:0100:f101:0000:0000:0000:0001
--in ipv6 --out ipv6 --printfulluncompressed 3ffe:ffff:100:f101::1 =3ffe:ffff:0100:f101:0000:0000:0000:0001
@@ -294,6 +304,10 @@
2.2.3.4/33 ipv4addr
1.2.3.4/ ipv4addr
1.2.3.4/00 ipv4addr
+0300.0000.0002.0001/33 ipv4addr
+0300.0000.0002.0001.1 ipv4addr
+0500.0000.0002.0001.1 ipv4addr
+320.2.3.4 ipv4addr
0/00 ipv4addr
1 ipv4addr
1. ipv4addr
diff -urN ipv6calc-3.2.0/ipv6loganon/Makefile.in ipv6calc-openssl-3/ipv6loganon/Makefile.in
--- ipv6calc-3.2.0/ipv6loganon/Makefile.in 2021-07-14 05:25:36.000000000 +0200
+++ ipv6calc-openssl-3/ipv6loganon/Makefile.in 2021-09-16 21:09:37.000000000 +0200
@@ -1,7 +1,7 @@
# Project : ipv6calc/ipv6loganon
# File : Makefile
-# Version : $Id: b5a69eae0e76ea62577c6e2b6eb6719e628b64f7 $
-# Copyright : 2002-2020 by Peter Bieringer <pb (at) bieringer.de>
+# Version : $Id: 1258fe64d78ccf057d5ff4c686ceee237ee217f8 $
+# Copyright : 2002-2021 by Peter Bieringer <pb (at) bieringer.de>
#
# Information:
# Makefile for ipv6loganon
@@ -27,6 +27,7 @@
CC = @CC@
LDFLAGS_EXTRA = @LDFLAGS_EXTRA@
+LDFLAGS_EXTRA_STATIC = @LDFLAGS_EXTRA_STATIC@
OBJS = ipv6loganon.o ipv6loganonhelp.o
@@ -51,7 +52,7 @@
$(CC) -o ipv6loganon $(OBJS) $(GETOBJS) $(LIBS) -lm $(LDFLAGS) $(LDFLAGS_EXTRA)
static: ipv6loganon
- $(CC) -o ipv6loganon-static $(OBJS) $(GETOBJS) $(LIBS) -lm $(LDFLAGS) $(LDFLAGS_EXTRA) -static
+ $(CC) -o ipv6loganon-static $(OBJS) $(GETOBJS) $(LIBS) -lm $(LDFLAGS) $(LDFLAGS_EXTRA_STATIC) -static
distclean:
${MAKE} clean
diff -urN ipv6calc-3.2.0/ipv6logconv/Makefile.in ipv6calc-openssl-3/ipv6logconv/Makefile.in
--- ipv6calc-3.2.0/ipv6logconv/Makefile.in 2021-07-14 05:25:36.000000000 +0200
+++ ipv6calc-openssl-3/ipv6logconv/Makefile.in 2021-09-16 21:09:37.000000000 +0200
@@ -1,7 +1,7 @@
# Project : ipv6calc/ipv6logconv
# File : ipv6logconv/Makefile[.in]
-# Version : $Id: d42330757cbe8c98476614c2de56c32d3352f84e $
-# Copyright : 2002-2020 by Peter Bieringer <pb (at) bieringer.de>
+# Version : $Id: 3570495686eecd2419fd92176ba08caeea72f36c $
+# Copyright : 2002-2021 by Peter Bieringer <pb (at) bieringer.de>
#
# Information:
# Makefile for ipv6logconv
@@ -27,6 +27,7 @@
CC = @CC@
LDFLAGS_EXTRA = @LDFLAGS_EXTRA@
+LDFLAGS_EXTRA_STATIC = @LDFLAGS_EXTRA_STATIC@
OBJS = ipv6logconv.o ipv6logconvhelp.o
@@ -51,7 +52,7 @@
$(CC) -o ipv6logconv $(OBJS) $(GETOBJS) $(LIBS) -lm $(LDFLAGS) $(LDFLAGS_EXTRA)
static: ipv6logconv
- $(CC) -o ipv6logconv-static $(OBJS) $(GETOBJS) $(LIBS) -lm $(LDFLAGS) $(LDFLAGS_EXTRA) -static
+ $(CC) -o ipv6logconv-static $(OBJS) $(GETOBJS) $(LIBS) -lm $(LDFLAGS) $(LDFLAGS_EXTRA_STATIC) -static
distclean:
${MAKE} clean
diff -urN ipv6calc-3.2.0/ipv6logstats/Makefile.in ipv6calc-openssl-3/ipv6logstats/Makefile.in
--- ipv6calc-3.2.0/ipv6logstats/Makefile.in 2021-07-14 05:25:36.000000000 +0200
+++ ipv6calc-openssl-3/ipv6logstats/Makefile.in 2021-09-16 21:09:37.000000000 +0200
@@ -1,7 +1,7 @@
# Project : ipv6calc/ipv6logstats
# File : Makefile
-# Version : $Id: 740cbe8ae9d7d725ce32321fdc599f5215bb92b9 $
-# Copyright : 2003-2020 by Peter Bieringer <pb (at) bieringer.de>
+# Version : $Id: a5df4bcce4833a399daae72cccddcc4d319dbc5a $
+# Copyright : 2003-2021 by Peter Bieringer <pb (at) bieringer.de>
#
# Information:
# Makefile for ipv6logstats
@@ -27,6 +27,7 @@
CC = @CC@
LDFLAGS_EXTRA = @LDFLAGS_EXTRA@
+LDFLAGS_EXTRA_STATIC = @LDFLAGS_EXTRA_STATIC@
OBJS = ipv6logstats.o ipv6logstatshelp.o
@@ -51,7 +52,7 @@
$(CC) -o ipv6logstats $(OBJS) $(GETOBJS) $(LIBS) -lm $(LDFLAGS) $(LDFLAGS_EXTRA)
static: ipv6logstats
- $(CC) -o ipv6logstats-static $(OBJS) $(GETOBJS) $(LIBS) -lm $(LDFLAGS) $(LDFLAGS_EXTRA) -static
+ $(CC) -o ipv6logstats-static $(OBJS) $(GETOBJS) $(LIBS) -lm $(LDFLAGS) $(LDFLAGS_EXTRA_STATIC) -static
distclean:
${MAKE} clean
diff -urN ipv6calc-3.2.0/lib/ipv6calchelp.c ipv6calc-openssl-3/lib/ipv6calchelp.c
--- ipv6calc-3.2.0/lib/ipv6calchelp.c 2021-07-14 05:25:36.000000000 +0200
+++ ipv6calc-openssl-3/lib/ipv6calchelp.c 2021-09-16 21:09:37.000000000 +0200
@@ -1,8 +1,8 @@
/*
* Project : ipv6calc
* File : ipv6calchelp.c
- * Version : $Id: 50128046d35b1cc796bdc470c9c6cacaa87940bd $
- * Copyright : 2002-2020 by Peter Bieringer <pb (at) bieringer.de>
+ * Version : $Id: ffdf87419052bb1d897f3ae800830079c615dd75 $
+ * Copyright : 2002-2021 by Peter Bieringer <pb (at) bieringer.de>
*
* Information:
* Help library
@@ -540,6 +540,8 @@
fprintf(stderr, " 1.2 -> 1.2.0.0\n");
fprintf(stderr, " Compressed, e.g.\n");
fprintf(stderr, " 1.2.0.0 -> 1.2\n");
+ fprintf(stderr, " Octal, e.g.\n");
+ fprintf(stderr, " 192.0.2.1 -> 0300.0000.0002.0001\n");
};
static void printhelp_output_revipv4(void) {
@@ -571,10 +573,12 @@
};
static void printhelp_output_octal(void) {
- fprintf(stderr, " Print octal representation of a given IPv6 address:\n");
+ fprintf(stderr, " Print octal representation of a given IP address:\n");
fprintf(stderr, " (useful for djbdns/tinydns)\n");
- fprintf(stderr, " 3ffe:ffff::1 ->\n \\77\\376\\377\\377\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\1\n");
- fprintf(stderr, " --printfulluncompressed 3ffe:ffff::1 ->\n \\077\\376\\377\\377\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\001\n");
+ fprintf(stderr, " 3ffe:ffff::1 -> \\077\\0376\\0377\\0377\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\01\n");
+ fprintf(stderr, " --printfulluncompressed 3ffe:ffff::1 -> \\0077\\0376\\0377\\0377\\0000\\0000\\0000\\0000\\0000\\0000\\0000\\0000\\0000\\0000\\0000\\0001\n");
+ fprintf(stderr, " 192.0.2.1 -> \\0300\\00\\02\\01\n");
+ fprintf(stderr, " --printfulluncompressed 192.0.2.1 -> \\0300\\0000\\0002\\0001\n");
};
void printhelp_output_dispatcher(const uint32_t outputtype, const uint32_t inputtype) {
@@ -921,6 +925,14 @@
fprintf(stderr, "\n\n");
#endif
+#if defined ENABLE_OPENSSL_EVP_MD5
+ fprintf(stderr, "Linked MD5 implemenation: OpenSSL EVP MD5\n\n");
+#endif
+#if defined ENABLE_OPENSSL_MD5
+ fprintf(stderr, "Linked MD5 implemenation: OpenSSL legacy MD5\n\n");
+#endif
+
+
fprintf(stderr, "Compiled: %s %s\n\n", __DATE__, __TIME__);
libipv6calc_db_wrapper_print_features_verbose(level_verbose);
diff -urN ipv6calc-3.2.0/lib/ipv6calctypes.h ipv6calc-openssl-3/lib/ipv6calctypes.h
--- ipv6calc-3.2.0/lib/ipv6calctypes.h 2021-07-14 05:25:36.000000000 +0200
+++ ipv6calc-openssl-3/lib/ipv6calctypes.h 2021-09-16 21:09:37.000000000 +0200
@@ -1,7 +1,7 @@
/*
* Project : ipv6calc
* File : ipv6calctypes.h
- * Version : $Id: 9747850bae532c5676edd11b031e369bfbac5dd0 $
+ * Version : $Id: 8a21409aa9e0d0f8791c23cf227654a9ef88f3e7 $
* Copyright : 2002-2021 by Peter Bieringer <pb (at) bieringer.de>
* License : GPLv2
*
@@ -185,6 +185,7 @@
#define FORMATOPTION_NUM_mr_quote_default 25 // 02000000 flag for controlling old quote behavior < 0.99.0
#define FORMATOPTION_NUM_mr_match_token_suffix 26 // 04000000
+#define FORMATOPTION_NUM_print_octal 30 // octal with separator
#define FORMATOPTION_NUM_printembedded 31 // special
#define FORMATOPTION_printlowercase (uint32_t) (1 << FORMATOPTION_NUM_printlowercase)
@@ -214,6 +215,7 @@
#define FORMATOPTION_mr_quote_default (uint32_t) (1 << FORMATOPTION_NUM_mr_quote_default) // flag for controlling old quote behavior < 0.99.0
#define FORMATOPTION_mr_match_token_suffix (uint32_t) (1 << FORMATOPTION_NUM_mr_match_token_suffix)
+#define FORMATOPTION_print_octal (uint32_t) (1 << FORMATOPTION_NUM_print_octal)
#define FORMATOPTION_printembedded (uint32_t) (1 << FORMATOPTION_NUM_printembedded)
typedef struct {
@@ -240,6 +242,7 @@
{ FORMATOPTION_forceprefix , "--forceprefix <num>", "Force prefix to <num>" },
{ FORMATOPTION_print_iid_var , "--print-iid-var" , "IPv6 address IID variance"},
{ FORMATOPTION_no_prefixlength , "--no-prefixlength" , "Don't print prefix length if given on input"},
+ { FORMATOPTION_print_octal , "--print-octal" , "Print IPv4 address in dot-separated octal notation"},
};
/* Possible format option map */
@@ -253,7 +256,7 @@
{ FORMAT_eui64 , FORMATOPTION_printlowercase | FORMATOPTION_printuppercase },
{ FORMAT_base85 , 0 },
{ FORMAT_ifinet6 , 0 },
- { FORMAT_ipv4addr , FORMATOPTION_machinereadable | FORMATOPTION_no_prefixlength | FORMATOPTION_forceprefix | FORMATOPTION_maskprefix | FORMATOPTION_masksuffix | FORMATOPTION_printcompressed | FORMATOPTION_printuncompressed | FORMATOPTION_printfulluncompressed },
+ { FORMAT_ipv4addr , FORMATOPTION_machinereadable | FORMATOPTION_no_prefixlength | FORMATOPTION_forceprefix | FORMATOPTION_maskprefix | FORMATOPTION_masksuffix | FORMATOPTION_printcompressed | FORMATOPTION_printuncompressed | FORMATOPTION_printfulluncompressed | FORMATOPTION_print_octal },
{ FORMAT_iid_token , FORMATOPTION_printlowercase | FORMATOPTION_printuppercase },
{ FORMAT_octal , FORMATOPTION_printfulluncompressed },
{ FORMAT_ipv6literal , FORMATOPTION_machinereadable | FORMATOPTION_printlowercase | FORMATOPTION_printuppercase | FORMATOPTION_printcompressed | FORMATOPTION_printuncompressed | FORMATOPTION_printfulluncompressed },
diff -urN ipv6calc-3.2.0/lib/libipv4addr.c ipv6calc-openssl-3/lib/libipv4addr.c
--- ipv6calc-3.2.0/lib/libipv4addr.c 2021-07-14 05:25:36.000000000 +0200
+++ ipv6calc-openssl-3/lib/libipv4addr.c 2021-09-16 21:09:37.000000000 +0200
@@ -1,7 +1,7 @@
/*
* Project : ipv6calc/lib
* File : libipv4addr.c
- * Version : $Id: ba221abf4c010bcf430dbe84ff91f24aad7ff84e $
+ * Version : $Id: 5b3a69b12c8d15fff043313d5ae59164c0aa7657 $
* Copyright : 2002-2021 by Peter Bieringer <pb (at) bieringer.de> except the parts taken from kernel source
* License : GNU GPL v2
*
@@ -13,6 +13,7 @@
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
+#include <regex.h>
#include "config.h"
#include "libipv4addr.h"
@@ -440,6 +441,8 @@
unsigned int compat[5], i;
uint32_t typeinfo;
const char *p;
+ regex_t regex;
+ int revalue;
if (resultstring_length > 0)
resultstring[0] = '\0'; /* clear result string */
@@ -452,19 +455,40 @@
}
memset(compat, 0, sizeof(compat));
+
+ // catch octal notation
+ revalue = regcomp(®ex, "^0[0-7]{3}\\.0[0-7]{3}\\.0[0-7]{3}\\.0[0-7]{3}(/[0-9]{1,2})?$", REG_EXTENDED);
+ if (revalue != 0) {
+ fprintf(stderr, "FATAL - regular expression compilation issue");
+ exit(1);
+ };
+
+ if (regexec(®ex, addrstring, 0 , NULL, 0) == 0) {
+ if (sscanf(addrstring, "0%3o.0%3o.0%3o.0%3o/%2d", &compat[0], &compat[1], &compat[2], &compat[3], &compat[4]) == 5) {
+ // IPv4 address in octal format separated by . with prefix length
+ in_prefix_len = 1;
+ goto END_addr_to_ipv4addrstruct;
+ } else if (sscanf(addrstring, "0%3o.0%3o.0%3o.0%3o", &compat[0], &compat[1], &compat[2], &compat[3]) == 4) {
+ // IPv4 address in octal format separated by .
+ goto END_addr_to_ipv4addrstruct;
+ };
+ };
+ regfree(®ex);
+
+ // standard but potentially shortened notation
for (p = addrstring, i = 0; *p && i < (in_prefix_len ? 5 : 4); p++)
{
if (*p >= '0' && *p <= '9') {
digit = 1;
if (in_prefix_len && p[0] == '0' && p[1] && compat[i] == 0) {
snprintf(resultstring, resultstring_length, "Error in given IPv4 address, '%s' is not valid (CIDR prefix length cannot start with zero)!",
- addrstring);
+ addrstring);
return (1);
}
compat[i] = compat[i] * 10 + (*p - '0');
if (compat[i] > (in_prefix_len ? 32 : 255)) {
snprintf(resultstring, resultstring_length, "Error in given IPv4 address, '%s' is not valid (%d on position %d)!",
- addrstring, compat[i], (int)(p - addrstring + 1));
+ addrstring, compat[i], (int)(p - addrstring + 1));
return (1);
}
} else if (*p == '.' && !in_prefix_len && digit) {
@@ -476,13 +500,13 @@
i = 4;
} else {
snprintf(resultstring, resultstring_length, "Error in given IPv4 address, '%s' is not valid (illegal char at %d)!",
- addrstring, (int)(p - addrstring + 1));
+ addrstring, (int)(p - addrstring + 1));
return (1);
}
}
if (p[-1] == '/') {
snprintf(resultstring, resultstring_length, "Error in given IPv4 address, '%s' is not valid (illegal char at %d)!",
- addrstring, (int)(p - addrstring));
+ addrstring, (int)(p - addrstring));
return (1);
}
if (i >= (in_prefix_len ? 5 : 4)) {
@@ -500,16 +524,30 @@
return (1);
}
+END_addr_to_ipv4addrstruct:
ipv4addr_clearall(ipv4addrp);
+
if (in_prefix_len) {
ipv4addrp->flag_prefixuse = 1;
+
+ if (compat[4] > 32) {
+ snprintf(resultstring, resultstring_length, "Error in given IPv4 address, '%s' is not valid (prefix length is out-of-range 0..32)!", addrstring);
+ return (1);
+ };
ipv4addrp->prefixlength = (uint8_t) compat[4];
DEBUGPRINT_WA(DEBUG_libipv4addr, "prefix length %u", (unsigned int) ipv4addrp->prefixlength);
DEBUGPRINT_WA(DEBUG_libipv4addr, "flag_prefixuse %d", ipv4addrp->flag_prefixuse);
}
+
for ( i = 0; i <= 3; i++ ) {
DEBUGPRINT_WA(DEBUG_libipv4addr, "Octett %d = %d", i, compat[i]);
+
+ if (compat[i] > 255) {
+ snprintf(resultstring, resultstring_length, "Error in given IPv4 address, '%s' is not valid (decimal value %d on position %d)!", addrstring, compat[i], i+1);
+ return (1);
+ };
+
ipv4addr_setoctet(ipv4addrp, i, compat[i]);
};
@@ -607,7 +645,7 @@
for ( i = 0; i <= 3; i++ ) {
if ( ( compat[i] < 0 ) || ( compat[i] > 255 ) ) {
- snprintf(resultstring, resultstring_length, "Error in given hex notated IPv4 address, '%s' is not valid (%d on position %d)!", addronlystring, compat[i], i+1);
+ snprintf(resultstring, resultstring_length, "Error in given hex notated IPv4 address, '%s' is not valid (decimal value %d on position %d)!", addronlystring, compat[i], i+1);
retval = 1;
return (retval);
};
@@ -654,10 +692,22 @@
if ((formatoptions & FORMATOPTION_machinereadable) != 0) {
snprintf(resultstring, resultstring_length, "IPV4=%u.%u.%u.%u",
- (unsigned int) ipv4addr_getoctet(ipv4addrp, 0),
- (unsigned int) ipv4addr_getoctet(ipv4addrp, 1),
- (unsigned int) ipv4addr_getoctet(ipv4addrp, 2),
- (unsigned int) ipv4addr_getoctet(ipv4addrp, 3));
+ (unsigned int) ipv4addr_getoctet(ipv4addrp, 0),
+ (unsigned int) ipv4addr_getoctet(ipv4addrp, 1),
+ (unsigned int) ipv4addr_getoctet(ipv4addrp, 2),
+ (unsigned int) ipv4addr_getoctet(ipv4addrp, 3));
+ } else if ((formatoptions & FORMATOPTION_print_octal) != 0) {
+ snprintf(tempstring, sizeof(tempstring), "0%03o.0%03o.0%03o.0%03o",
+ (unsigned int) ipv4addr_getoctet(ipv4addrp, 0),
+ (unsigned int) ipv4addr_getoctet(ipv4addrp, 1),
+ (unsigned int) ipv4addr_getoctet(ipv4addrp, 2),
+ (unsigned int) ipv4addr_getoctet(ipv4addrp, 3));
+
+ if ((ipv4addrp->flag_prefixuse == 1) && ((formatoptions & FORMATOPTION_no_prefixlength) == 0)) {
+ snprintf(resultstring, resultstring_length, "%s/%d", tempstring, ipv4addrp->prefixlength);
+ } else {
+ snprintf(resultstring, resultstring_length, "%s", tempstring);
+ };
} else {
int oct_to_print = 4;
@@ -777,7 +827,7 @@
* function prints an IPv4 address in native octal format
*
* in: ipv4addr = IPv4 address structure
- * formatoptions
+ * in: formatoptions
* out: *resultstring = IPv4 address (modified)
* ret: ==0: ok, !=0: error
*/
diff -urN ipv6calc-3.2.0/lib/librfc3041.c ipv6calc-openssl-3/lib/librfc3041.c
--- ipv6calc-3.2.0/lib/librfc3041.c 2021-07-14 05:25:36.000000000 +0200
+++ ipv6calc-openssl-3/lib/librfc3041.c 2021-09-16 21:09:37.000000000 +0200
@@ -1,8 +1,8 @@
/*
* Project : ipv6calc
* File : librfc3041.c
- * Version : $Id: e65fa8f9895f2c85bff6337f77d75cafd73fb9e6 $
- * Copyright : 2001-2014 by Peter Bieringer <pb (at) bieringer.de>
+ * Version : $Id: 5b4efdcf9c12b31a1facb8ab23322af969f4b353 $
+ * Copyright : 2001-2021 by Peter Bieringer <pb (at) bieringer.de>
*
* Information:
* Function library for host identifier privacy extension defined in RFC 3041 / RFC 4941
@@ -22,8 +22,12 @@
#ifdef ENABLE_BUNDLED_MD5
#include "../md5/md5.h"
#else
+#ifdef ENABLE_OPENSSL_EVP_MD5
+#include <openssl/evp.h>
+#else
#include <openssl/md5.h>
#endif
+#endif
#include "libipv6calc.h"
#include "libipv6calcdebug.h"
@@ -38,41 +42,48 @@
* ret: ==0: ok, !=0: error
*/
int librfc3041_calc(ipv6calc_ipv6addr *identifier, ipv6calc_ipv6addr *token, ipv6calc_ipv6addr *newidentifier, ipv6calc_ipv6addr *newtoken) {
- int retval = 1, i;
+ int retval = 1;
+ unsigned int i;
char tempstring[IPV6CALC_STRING_MAX], tempstring2[IPV6CALC_STRING_MAX];
- unsigned char digest[MD5_DIGEST_LENGTH];
-
-#ifdef ENABLE_BUNDLED_MD5
- struct md5_ctx md5hash;
-#else
- MD5_CTX md5hash;
-#endif
DEBUGPRINT_WA(DEBUG_librfc3041, "Got identifier '%08x-%08x' and token '%08x-%08x'", (unsigned int) ipv6addr_getdword(identifier, 2), (unsigned int) ipv6addr_getdword(identifier, 3), (unsigned int) ipv6addr_getdword(token, 2), (unsigned int) ipv6addr_getdword(token, 3));
-#ifdef ENABLE_BUNDLED_MD5
- md5_init_ctx(&md5hash);
+#ifdef ENABLE_OPENSSL_EVP_MD5
+ unsigned int digest_len; // will be set by EVP_DigestFinal_ex
+ unsigned char digest[EVP_MAX_MD_SIZE];
+ EVP_MD_CTX *md5hash = EVP_MD_CTX_new();
+
+ EVP_DigestInit_ex(md5hash, EVP_md5(), NULL);
+ EVP_DigestUpdate(md5hash, &identifier->in6_addr.s6_addr[8], 8);
+ EVP_DigestUpdate(md5hash, &token->in6_addr.s6_addr[8], 8);
+ EVP_DigestFinal_ex(md5hash, digest, &digest_len);
+ EVP_MD_CTX_free(md5hash);
#else
- MD5_Init(&md5hash);
-#endif
+#ifdef ENABLE_OPENSSL_MD5
+ unsigned int digest_len = MD5_DIGEST_LENGTH;
+ unsigned char digest[MD5_DIGEST_LENGTH];
+ MD5_CTX md5hash;
-#ifdef ENABLE_BUNDLED_MD5
- md5_process_bytes(&identifier->in6_addr.s6_addr[8], 8, &md5hash);
- md5_process_bytes(&token->in6_addr.s6_addr[8], 8, &md5hash);
-#else
+ MD5_Init(&md5hash);
MD5_Update(&md5hash, &identifier->in6_addr.s6_addr[8], 8);
MD5_Update(&md5hash, &token->in6_addr.s6_addr[8], 8);
-#endif
+ MD5_Final(digest, &md5hash);
+#else
+ // fallback to bundled MD5
+ unsigned int digest_len = MD5_DIGEST_LENGTH;
+ unsigned char digest[MD5_DIGEST_LENGTH];
+ struct md5_ctx md5hash;
-#ifdef ENABLE_BUNDLED_MD5
+ md5_init_ctx(&md5hash);
+ md5_process_bytes(&identifier->in6_addr.s6_addr[8], 8, &md5hash);
+ md5_process_bytes(&token->in6_addr.s6_addr[8], 8, &md5hash);
md5_finish_ctx(&md5hash, digest);
-#else
- MD5_Final(digest, &md5hash);
+#endif
#endif
tempstring[0] = '\0';
- for (i = 0; i < MD5_DIGEST_LENGTH; i++) {
+ for (i = 0; i < digest_len; i++) {
snprintf(tempstring2, sizeof(tempstring2), "%s%02x", tempstring, (int) digest[i]);
snprintf(tempstring, sizeof(tempstring), "%s", tempstring2);
};
diff -urN ipv6calc-3.2.0/README ipv6calc-openssl-3/README
--- ipv6calc-3.2.0/README 2021-07-14 05:25:36.000000000 +0200
+++ ipv6calc-openssl-3/README 2021-09-16 21:09:37.000000000 +0200
@@ -1,6 +1,6 @@
ipv6calc will do some format changes and calculations for you
-(P) & (C) 2001-2020 by Peter Bieringer <pb (at) bieringer.de>
+(P) & (C) 2001-2021 by Peter Bieringer <pb (at) bieringer.de>
published under GNU GPLv2
For suggestions and bug report please contact author
@@ -46,6 +46,12 @@
Latest version of sources:
ftp://ftp.bieringer.de/pub/linux/IPv6/ipv6calc/
+ http://www.bieringer.de/ftp/pub/linux/IPv6/ipv6calc/
+ https://www.bieringer.de/ftp/pub/linux/IPv6/ipv6calc/
+
+ ftp://ftp.deepspace6.net/pub/ds6/sources/ipv6calc/
+ http://www.deepspace6.net/ftp/pub/ds6/sources/ipv6calc/
+ https://www.deepspace6.net/ftp/pub/ds6/sources/ipv6calc/
GitHub access:
https://github.com/pbiering/ipv6calc
@@ -57,13 +63,13 @@
Ready to use packages for several operating systems:
Linux:
Fedora (https://src.fedoraproject.org/rpms/ipv6calc)
- Core 6: developing platform, so use given hint above to create a RPM
+ Core 6: initial developing platform, so use given hint above to create a RPM
since 7: package is included
- Red Hat Enterprise Linux / CentOS (https://src.fedoraproject.org/rpms/ipv6calc):
+ Enterprise Linux (https://src.fedoraproject.org/rpms/ipv6calc / https://koji.fedoraproject.org/koji/packageinfo?packageID=366):
EL3: build from source package potentially still work but not tested anymore, OS is EOSL
EL4: build from source package potentially still work but not tested anymore, OS is EOSL
EL5: build from source package potentially still work but not tested anymore, OS is EOSL
- EL6: package is available via EPEL
+ EL6: build from source package potentially still work but not tested anymore, OS is EOSL
EL7: package is available via EPEL
EL8: package is available via EPEL
Mandrake (EOSL):
@@ -97,4 +103,4 @@
Subscription: http://lists.deepspace6.net/listinfo/ipv6calc
-$Id: 057076ec6542deac2af7ff4373c52afde97dd18b $
+$Id: 1ac2ac470b489f302b402a7e11ced4759f89ab0b $
diff -urN ipv6calc-3.2.0/tools/DBIP-update.sh.in ipv6calc-openssl-3/tools/DBIP-update.sh.in
--- ipv6calc-3.2.0/tools/DBIP-update.sh.in 2021-07-14 05:25:36.000000000 +0200
+++ ipv6calc-openssl-3/tools/DBIP-update.sh.in 2021-09-16 21:09:37.000000000 +0200
@@ -4,7 +4,7 @@
#
# Project : ipv6calc/DBIP
# File : DBIP-update.sh
-# Version : $Id: 51cd31806067116931ddbe33fccf69e4985de1bf $
+# Version : $Id: 6376bdd3db3def008cb0b86390d1658990665f88 $
# Copyright : 2014-2021 by Peter Bieringer <pb (at) bieringer.de>
# License : GNU GPL version 2
@@ -18,10 +18,12 @@
help() {
cat <<END
-Usage: $(basename "$0") [-v] [-s] [-D <dir>] [-U <url>] [-T <type>]
+Usage: $(basename "$0") [-v] [-s] [-c] [-D <dir>] [-C <days>] [-U <url>] [-T <type>]
-s skip download
+ -c skip decompress
-v verbose
-D <dir> database directory (optional)
+ -C <days> cleanup files older than given days (optional)
-U <url> use URL to download full database
-T <type> set type of via URL downloaded file
MMDB: country|isp|location|*location-isp*
@@ -46,8 +48,9 @@
}
skip_download=false
+skip_decompress=false
verbose=false
-while getopts "vT:D:U:sh\?" opt; do
+while getopts "vT:D:C:U:sch\?" opt; do
case $opt in
v)
verbose=true
@@ -55,6 +58,12 @@
s)
skip_download=true
;;
+ c)
+ skip_decompress=true
+ ;;
+ C)
+ DBIP_DAT_CLEANUP_DAYS="$OPTARG"
+ ;;
D)
DBIP_DAT_DIR="$OPTARG"
;;
@@ -138,6 +147,7 @@
fi
# create db/decompress mmdb files from downloaded files
+$skip_decompress && download_result=false
error=0
if $download_result; then
for file in $DBIP_DAT_FILES; do
@@ -190,4 +200,48 @@
esac
done
fi
+
+if [ -n "$DBIP_DAT_CLEANUP_DAYS" ]; then
+ # lookup softlinks
+ declare -A DBIP_DAT_SOFTLINKS
+ declare -A DBIP_DAT_SOFTLINKS_DEST
+ DBIP_DAT_SOFTLINKS=$(find $DBIP_DAT_DIR -type l -name 'dbip-*.mmdb' -o -name 'dbip-*.csv')
+ for key in ${DBIP_DAT_SOFTLINKS[@]}; do
+ $verbose && echo "DEBUG : check softlink : $key"
+ dest=$(readlink "$key")
+ if [ -n "$dest" ]; then
+ $verbose && echo "DEBUG : softlink resolved: $key -> $dest"
+ DBIP_DAT_SOFTLINKS_DEST[$dest]=$key
+ else
+ $verbose && echo "DEBUG : softlink broken : $key"
+ fi
+ done
+
+ # lookup files and check whether they are target of a softlink
+ declare -A DBIP_DAT_FILES
+ DBIP_DAT_FILES=$(find $DBIP_DAT_DIR -type f -mtime +$DBIP_DAT_CLEANUP_DAYS -name 'dbip-*-????-??.mmdb' -o -name 'dbip-*-????-??.csv')
+ for file in ${DBIP_DAT_FILES[@]}; do
+ basefile=$(basename "$file")
+ $verbose && echo "DEBUG : check file : $file ($basefile)"
+ if [ -n "${DBIP_DAT_SOFTLINKS_DEST[$file]}" ];then
+ $verbose && echo "DEBUG : target of softlink1: $file <- ${DBIP_DAT_SOFTLINKS_DEST[$file]}"
+ DBIP_DAT_FILES[$file]=2
+ elif [ -n "${DBIP_DAT_SOFTLINKS_DEST[$basefile]}" ];then
+ $verbose && echo "DEBUG : target of softlink2: $file <- ${DBIP_DAT_SOFTLINKS_DEST[$basefile]}"
+ DBIP_DAT_FILES[$file]=3
+ else
+ $verbose && echo "DEBUG : no softlink target : $file"
+ DBIP_DAT_FILES[$file]=1
+ fi
+ done
+
+ # delete unused files
+ for file in ${DBIP_DAT_FILES[@]}; do
+ if [ "${DBIP_DAT_FILES[$file]}" = "1" ]; then
+ echo "INFO : delete unused file : $file"
+ rm -f "$file"
+ fi
+ done
+fi
+
exit $error