#LyX 1.6.5 created this file. For more info see http://www.lyx.org/
\lyxformat 345
\begin_document
\begin_header
\textclass docbook
\use_default_options false
\language english
\inputencoding auto
\font_roman default
\font_sans default
\font_typewriter default
\font_default_family default
\font_sc false
\font_osf false
\font_sf_scale 100
\font_tt_scale 100

\graphics default
\paperfontsize default
\spacing single
\use_hyperref false
\papersize default
\use_geometry false
\use_amsmath 1
\use_esint 0
\cite_engine basic
\use_bibtopic false
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\author "" 
\end_header

\begin_body

\begin_layout Title
The ipv6calc Homepage
\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout

<author><firstname>Peter</firstname><surname>Bieringer</surname><affiliation><ad
dress>pb at bieringer dot de</address></affiliation></author>
\end_layout

\end_inset


\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout

<revhistory> 
\end_layout

\end_inset


\end_layout

\begin_layout Standard
\begin_inset ERT
status open

\begin_layout Plain Layout

<revision> <revnumber>3.0</revnumber> <date>2010-03-01</date> <authorinitials>PB<
/authorinitials></revision>
\end_layout

\end_inset


\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout

</revhistory> 
\end_layout

\end_inset


\end_layout

\begin_layout Section
General
\end_layout

\begin_layout Standard
ipv6calc is a small utility written in programming language C to manipulate
 (not only) IPv6 addresses.
 Intentions were convering a given IPv6 address into compressed format,
 convering a given IPv6 address into the same format like shown in 
\shape italic
/proc/net/if_inet6
\shape default
 and (because it was not difficulty) migrating the Perl program 
\shape italic
ip6_int
\shape default
 into.
 Now only one utiltity is needed to do a lot.
\end_layout

\begin_layout Standard
This utility was also used in the past to extend features on network-functions-i
pv6 library, used by initscripts-ipv6.
\end_layout

\begin_layout Standard
Note: this tool got also its 
\begin_inset CommandInset href
LatexCommand href
name "freshmeat / ipv6calc"
target "http://freshmeat.net/projects/ipv6calc/"

\end_inset

 page (not maintained by the author)
\end_layout

\begin_layout Subsection
Included programs
\end_layout

\begin_layout Itemize
\begin_inset Quotes eld
\end_inset

ipv6calc
\begin_inset Quotes erd
\end_inset

: the main utility
\end_layout

\begin_layout Itemize
\begin_inset Quotes eld
\end_inset

ipv6calcweb
\begin_inset Quotes erd
\end_inset

: CGI wrapper for ipv6calc's address information output
\end_layout

\begin_layout Itemize
\begin_inset Quotes eld
\end_inset

ipv6logconv
\begin_inset Quotes erd
\end_inset

: log converter (IPv4/IPv6)
\end_layout

\begin_layout Itemize
\begin_inset Quotes eld
\end_inset

ipv6loganon
\begin_inset Quotes erd
\end_inset

: log anonymizer (IPv4/IPv6)
\end_layout

\begin_layout Itemize
\begin_inset Quotes eld
\end_inset

ipv6logstats
\begin_inset Quotes erd
\end_inset

: log statistic generator (IPv4/IPv6)
\end_layout

\begin_layout Section
License
\end_layout

\begin_layout Standard
The program is published under the GNU GPL version 2.
\end_layout

\begin_layout Section
Author
\end_layout

\begin_layout Standard
The author of ipv6calc is
\end_layout

\begin_layout Itemize
\begin_inset CommandInset href
LatexCommand href
name "Dr. Peter Bieringer"
target "mailto:pb@bieringer.de"

\end_inset

 with some minor contribution by others
\end_layout

\begin_layout Section
Where to get sources or binaries
\end_layout

\begin_layout Subsection
Latest version of sources:
\end_layout

\begin_layout Itemize
Via CVS at 
\begin_inset CommandInset href
LatexCommand href
name "DeepSpace6"
target "http://www.deepspace6.net/"

\end_inset

: 
\begin_inset CommandInset href
LatexCommand href
name "DeepSpace6 / CVS instructions"
target "http://www.deepspace6.net/sections/cvs.html"

\end_inset


\end_layout

\begin_layout Itemize
Via web interface to CVS at 
\begin_inset CommandInset href
LatexCommand href
name "DeepSpace6"
target "http://www.deepspace6.net/"

\end_inset

: 
\begin_inset CommandInset href
LatexCommand href
name "DeepSpace6 / CVS web interface"
target "http://cvs.deepspace6.net/view/ipv6calc/"

\end_inset


\end_layout

\begin_layout Itemize
Via FTP at 
\begin_inset CommandInset href
LatexCommand href
name "DeepSpace6"
target "http://www.deepspace6.net/"

\end_inset

: 
\begin_inset CommandInset href
LatexCommand href
name "DeepSpace6 / anonymous FTP"
target "ftp://ftp.deepspace6.net/pub/ds6/sources/ipv6calc/"

\end_inset


\end_layout

\begin_layout Itemize
Via FTP at 
\begin_inset CommandInset href
LatexCommand href
name "ftp://ftp.bieringer.de/pub/linux/IPv6/ipv6calc/"
target "ftp://ftp.bieringer.de/pub/linux/IPv6/ipv6calc/"

\end_inset


\end_layout

\begin_layout Subsection
Available formats:
\end_layout

\begin_layout Subsubsection
tar.gz
\end_layout

\begin_layout Standard
A SPEC file is included, so you can build a RPM from source tarball using
\end_layout

\begin_layout Code
$ rpmbuild -ta path/to/ipv6calc-$version.tar.gz
\end_layout

\begin_layout Subsubsection
as RPM
\end_layout

\begin_layout Standard
Currently only on 
\begin_inset CommandInset href
LatexCommand href
name "rpmfind / ipv6calc"
target "http://www.rpmfind.net/linux/rpm2html/search.php?query=ipv6calc"

\end_inset

, but there are plans to publish at least source RPMS on 
\begin_inset CommandInset href
LatexCommand href
name "DeepSpace6"
target "http://www.deepspace6.net/"

\end_inset

 some day.
\end_layout

\begin_layout Subsection
Ready to use packages for several operating systems:
\end_layout

\begin_layout Subsubsection
Fedora
\end_layout

\begin_layout Standard
Fedora 12 is the current developing platform, so use given hints above to
 create a RPM.
 Since Fedora 7 this package is included by default.
\end_layout

\begin_layout Subsubsection
Red Hat Enterprise Linux and clones
\end_layout

\begin_layout Standard
It's tested by the developer that creation of the RPM is working fine on
 RHEL4.
 Since RHEL5 this package is included by default.
\end_layout

\begin_layout Subsubsection
Mandrake:
\end_layout

\begin_layout Standard
Linux Mandrake is very similar to Red Hat Linux, therefore a rebuild should
 work, too.
\end_layout

\begin_layout Subsubsection
Debian GNU/Linux
\end_layout

\begin_layout Standard
Package is maintained, more information can be found at 
\begin_inset CommandInset href
LatexCommand href
name "http://packages.debian.org/ipv6calc"
target "http://packages.debian.org/ipv6calc"

\end_inset


\end_layout

\begin_layout Subsubsection
NetBSD:
\end_layout

\begin_layout Standard
See here for more: 
\begin_inset CommandInset href
LatexCommand href
name "http://www.netbsd.org/packages/net/ipv6calc/"
target "http://www.netbsd.org/packages/net/ipv6calc/"

\end_inset


\end_layout

\begin_layout Subsubsection
FreeBSD:
\end_layout

\begin_layout Standard
See here for more: 
\begin_inset CommandInset href
LatexCommand href
name "http://www.freebsd.org/cgi/cvsweb.cgi/ports/net/ipv6calc/"
target "http://www.freebsd.org/cgi/cvsweb.cgi/ports/net/ipv6calc/"

\end_inset

 (
\begin_inset CommandInset href
LatexCommand href
name "http://www.freebsd.org/cgi/query-pr.cgi?pr=34441"
target "http://www.freebsd.org/cgi/query-pr.cgi?pr=34441"

\end_inset

), 
\begin_inset CommandInset href
LatexCommand href
name "http://www.freshports.org/net-mgmt/ipv6calc/"
target "http://www.freshports.org/net-mgmt/ipv6calc/"

\end_inset


\end_layout

\begin_layout Subsubsection
OpenBSD:
\end_layout

\begin_layout Standard
See here for more: 
\begin_inset CommandInset href
LatexCommand href
name "http://www.openbsd.org/cgi-bin/cvsweb/ports/net/ipv6calc/"
target "http://www.openbsd.org/cgi-bin/cvsweb/ports/net/ipv6calc/"

\end_inset


\end_layout

\begin_layout Section
Mailling Lists
\end_layout

\begin_layout Subsection
ipv6calc-announce
\end_layout

\begin_layout Description
Reason: sending announcements of new versions
\end_layout

\begin_layout Description
Traffic: very low
\end_layout

\begin_layout Description
Postings: only moderators are allowed to post
\end_layout

\begin_layout Description
Information: 
\begin_inset CommandInset href
LatexCommand href
name "DeepSpace6 / maillist ipv6calc-announce"
target "http://lists.deepspace6.net/listinfo/ipv6calc-announce"

\end_inset


\end_layout

\begin_layout Subsection
ipv6calc
\end_layout

\begin_layout Description
Reason: discussions
\end_layout

\begin_layout Description
Traffic: low
\end_layout

\begin_layout Description
Postings: subscribers
\end_layout

\begin_layout Description
Information: 
\begin_inset CommandInset href
LatexCommand href
name "DeepSpace6 / maillist ipv6calc"
target "http://lists.deepspace6.net/listinfo/ipv6calc"

\end_inset


\end_layout

\begin_layout Section
Bug Reports
\end_layout

\begin_layout Standard
You can send bug reports to the author himself or subscribe to maillist
 
\begin_inset Quotes eld
\end_inset

ipv6calc
\begin_inset Quotes erd
\end_inset

 and send it to the list.
\end_layout

\begin_layout Section
Features of ipv6calc
\end_layout

\begin_layout Subsection
Description
\end_layout

\begin_layout Standard
The main program named 
\begin_inset Quotes eld
\end_inset

ipv6calc
\begin_inset Quotes erd
\end_inset

 is able to recognize many (not only) IPv6 address formats and depending
 on a selectable action (not required) a selectable output format can be
 specified.
 Also it has the capability to show detailed information of an IPv4/IPv6
 address or anonymize it.
\end_layout

\begin_layout Subsection
Examples
\end_layout

\begin_layout Subsubsection
Conversion
\end_layout

\begin_layout Standard
A simple example is the conversion of an IPv6 address to a DNS PTR query
 string:
\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

\begin_layout Standard
Like you see, input format was autodetected.
 And the given example can be extended because ipv6calc also understands
 netmask / prefix length values:
\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

\begin_layout Standard
Also you've also learnt now that switch '-q' (quiet) suppresses informational
 messages.
 You can use this now to start a DNS PTR query using:
\end_layout

\begin_layout Code
$ dig PTR `./ipv6calc -q --out revnibbles.arpa 2001:db8::1/64`
\end_layout

\begin_layout Standard
But ipv6calc can do many more for you! Next example shows you the extraction
 of the IPv4 address contained in a 6to4 IPv6 address:
\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

\begin_layout Standard
This also works vice-versa:
\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

\begin_layout Standard
There are many more features already implemented, if you miss one, send
 a note.
\end_layout

\begin_layout Subsubsection
Information
\end_layout

\begin_layout Standard
Information about a simple IPv6 address:
\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

\begin_layout Standard
Information about a Teredo IPv6 address:
\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, productive, teredo
\end_layout

\begin_layout Code
IPv4 address: 80.181.121.64
\end_layout

\begin_layout Code
IPv4 registry[80.181.121.64]: RIPENCC
\end_layout

\begin_layout Code
IPv4 address: 206.73.118.1
\end_layout

\begin_layout Code
IPv4 registry[206.73.118.1]: ARIN
\end_layout

\begin_layout Code
Address type is Teredo and included IPv4 server address is: 80.181.121.64 and
 client port: 4096
\end_layout

\begin_layout Code
IPv4 registry for Teredo server address: ARIN
\end_layout

\begin_layout Code
Registry for address: reserved
\end_layout

\begin_layout Standard
There exists also a machine readable output (e.g.
 used by 'ipv6calcweb.cgi') - in addition, here 
\begin_inset CommandInset href
LatexCommand href
name "IP2Location"
target "http://www.ip2location.com/"

\end_inset

 and/or 
\begin_inset CommandInset href
LatexCommand href
name "GeoIP"
target "http://www.maxmind.com/"

\end_inset

 information can be displayed, if databases are specified.
 Note that GeoIP currently still supports IPv4 only.
\end_layout

\begin_layout Code
$ ./ipv6calc -q -i -m --db-ip2location-ipv4 /usr/share/IP2Location/IP-COUNTRY-SAM
PLE.BIN --db-ip2location-ipv6 /var/local/share/IP2Location/IPV6-COUNTRY.BIN
 --db-geoip /usr/share/GeoIP/GeoIP.dat  3ffe:831f:ce49:7601:8000:efff:af4a:86BF
\end_layout

\begin_layout Code
IPV6=3ffe:831f:ce49:7601:8000:efff:af4a:86bf
\end_layout

\begin_layout Code
TYPE=unicast,6bone,global-unicast,productive,teredo
\end_layout

\begin_layout Code
IPV4_SOURCE[80.181.121.64]=TEREDO-CLIENT
\end_layout

\begin_layout Code
IPV4[80.181.121.64]=80.181.121.64
\end_layout

\begin_layout Code
IPV4_REGISTRY[80.181.121.64]=RIPENCC
\end_layout

\begin_layout Code
IP2LOCATION_DATABASE_INFO_IPV4=url=http://www.ip2location.com date=2005-06-17
 entries=20470 apiversion=2.1.3
\end_layout

\begin_layout Code
IP2LOCATION_COUNTRY_SHORT[80.181.121.64]=IT
\end_layout

\begin_layout Code
IP2LOCATION_COUNTRY_LONG[80.181.121.64]=ITALY
\end_layout

\begin_layout Code
IP2LOCATION_REGION[80.181.121.64]=This parameter is unavailable for selected
 data file.
 Please upgrade the data file.
\end_layout

\begin_layout Code
IP2LOCATION_CITY[80.181.121.64]=This parameter is unavailable for selected
 data file.
 Please upgrade the data file.
\end_layout

\begin_layout Code
IP2LOCATION_ISP[80.181.121.64]=This parameter is unavailable for selected data
 file.
 Please upgrade the data file.
\end_layout

\begin_layout Code
IP2LOCATION_LATITUDE[80.181.121.64]=0.000000
\end_layout

\begin_layout Code
IP2LOCATION_LONGITUDE[80.181.121.64]=0.000000
\end_layout

\begin_layout Code
IP2LOCATION_DOMAIN[80.181.121.64]=This parameter is unavailable for selected
 data file.
 Please upgrade the data file.
\end_layout

\begin_layout Code
IP2LOCATION_ZIPCODE[80.181.121.64]=This parameter is unavailable for selected
 data file.
 Please upgrade the data file.
\end_layout

\begin_layout Code
GEOIP_COUNTRY_SHORT[80.181.121.64]=IT
\end_layout

\begin_layout Code
GEOIP_COUNTRY_LONG[80.181.121.64]=Italy
\end_layout

\begin_layout Code
GEOIP_DATABASE_INFO=GEO-106FREE 20070201 Build 1 Copyright (c) 2007 MaxMind
 LLC All Rights Reserved apiversion=system
\end_layout

\begin_layout Code
IPV4_SOURCE[206.73.118.1]=TEREDO-SERVER
\end_layout

\begin_layout Code
IPV4[206.73.118.1]=206.73.118.1
\end_layout

\begin_layout Code
IPV4_REGISTRY[206.73.118.1]=ARIN
\end_layout

\begin_layout Code
IP2LOCATION_COUNTRY_SHORT[206.73.118.1]=??
\end_layout

\begin_layout Code
IP2LOCATION_COUNTRY_LONG[206.73.118.1]=This record is unavailable in demo version.
 Please subscribe.
\end_layout

\begin_layout Code
IP2LOCATION_REGION[206.73.118.1]=This parameter is unavailable for selected
 data file.
 Please upgrade the data file.
\end_layout

\begin_layout Code
IP2LOCATION_CITY[206.73.118.1]=This parameter is unavailable for selected data
 file.
 Please upgrade the data file.
\end_layout

\begin_layout Code
IP2LOCATION_ISP[206.73.118.1]=This parameter is unavailable for selected data
 file.
 Please upgrade the data file.
\end_layout

\begin_layout Code
IP2LOCATION_LATITUDE[206.73.118.1]=0.000000
\end_layout

\begin_layout Code
IP2LOCATION_LONGITUDE[206.73.118.1]=0.000000
\end_layout

\begin_layout Code
IP2LOCATION_DOMAIN[206.73.118.1]=This parameter is unavailable for selected
 data file.
 Please upgrade the data file.
\end_layout

\begin_layout Code
IP2LOCATION_ZIPCODE[206.73.118.1]=This parameter is unavailable for selected
 data file.
 Please upgrade the data file.
\end_layout

\begin_layout Code
GEOIP_COUNTRY_SHORT[206.73.118.1]=US
\end_layout

\begin_layout Code
GEOIP_COUNTRY_LONG[206.73.118.1]=United States
\end_layout

\begin_layout Code
TEREDO_PORT_CLIENT=4096
\end_layout

\begin_layout Code
IPV6_REGISTRY=reserved
\end_layout

\begin_layout Code
IP2LOCATION_DATABASE_INFO_IPV6=url=http://www.ip2location.com date=2007-05-26
 entries=7495 apiversion=2.1.3
\end_layout

\begin_layout Code
IP2LOCATION_COUNTRY_SHORT=-
\end_layout

\begin_layout Code
IP2LOCATION_COUNTRY_LONG=-
\end_layout

\begin_layout Code
IP2LOCATION_REGION=This parameter is unavailable for selected data file.
 Please upgrade the data file.
\end_layout

\begin_layout Code
IP2LOCATION_CITY=This parameter is unavailable for selected data file.
 Please upgrade the data file.
\end_layout

\begin_layout Code
IP2LOCATION_ISP=This parameter is unavailable for selected data file.
 Please upgrade the data file.
\end_layout

\begin_layout Code
IP2LOCATION_LATITUDE=0.000000
\end_layout

\begin_layout Code
IP2LOCATION_LONGITUDE=0.000000
\end_layout

\begin_layout Code
IP2LOCATION_DOMAIN=This parameter is unavailable for selected data file.
 Please upgrade the data file.
\end_layout

\begin_layout Code
IP2LOCATION_ZIPCODE=This parameter is unavailable for selected data file.
 Please upgrade the data file.
\end_layout

\begin_layout Code
IPV6CALC_NAME=ipv6calc
\end_layout

\begin_layout Code
IPV6CALC_VERSION=0.70.1
\end_layout

\begin_layout Code
IPV6CALC_COPYRIGHT="(P) & (C) 2001-2007 by Peter Bieringer <pb (at) bieringer.de>
"
\end_layout

\begin_layout Code
IPV6CALC_OUTPUT_VERSION=4
\end_layout

\begin_layout Subsection
Option style
\end_layout

\begin_layout Standard
Since version 0.40 new-style option handling was introduced, using
\end_layout

\begin_layout Itemize
--in <inputtype>
\end_layout

\begin_layout Itemize
--out <outputtype>
\end_layout

\begin_layout Itemize
--action <actiontype>
\end_layout

\begin_layout Standard
and many more conversions were added.
 A built-in check matrix should prevent misconversions.
\end_layout

\begin_layout Standard
Up to version 0.39, only old-style options (which perhaps - but it's not
 planned at the moment - are going obsolete sometimes the future) were available.
 They are one-in-all options, specifying input/action/output in one token.
 Internally this options will be converted into new-style options.
\end_layout

\begin_layout Subsection
Online help
\end_layout

\begin_layout Standard
Online help always shows the currently implemented features.
\end_layout

\begin_layout Subsubsection
Main online help:
\end_layout

\begin_layout Code
$ ./ipv6calc -?
\end_layout

\begin_layout Code
ipv6calc: version 0.70.1
\end_layout

\begin_layout Code
(P) & (C) 2001-2007 by Peter Bieringer <pb (at) bieringer.de>
\end_layout

\begin_layout Code

\end_layout

\begin_layout Code
 General:
\end_layout

\begin_layout Code
  [-d|--debug <debug value>] : debug value (bitwise like)
\end_layout

\begin_layout Code
  [-q|--quiet]               : be more quiet
\end_layout

\begin_layout Code

\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

\end_layout

\begin_layout Code
  Available input  types:  --in     -?|-h|--help
\end_layout

\begin_layout Code
  Available output types:  --out    -?|-h|--help
\end_layout

\begin_layout Code
  Available action types:  --action -?|-h|--help
\end_layout

\begin_layout Code

\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 --show_types            : show available types on '-m'
\end_layout

\begin_layout Code

\end_layout

\begin_layout Code
  [--db-ip2location-ipv4 <file>] : IP2Location IPv4 database file (optional)
\end_layout

\begin_layout Code
  [--db-ip2location-ipv6 <file>] : IP2Location IPv6 database file (optional)
\end_layout

\begin_layout Code
  [--db-geoip <file>]            : GeoIP database file (optional)
\end_layout

\begin_layout Code

\end_layout

\begin_layout Code
 To see old-style option use: --printoldoptions
\end_layout

\begin_layout Standard
Input-type options
\end_layout

\begin_layout Code
]$ ./ipv6calc --in -?
\end_layout

\begin_layout Code
ipv6calc: version 0.70.1
\end_layout

\begin_layout Code
(P) & (C) 2001-2007 by Peter Bieringer <pb (at) bieringer.de>
\end_layout

\begin_layout Code

\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
  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
  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 Standard
Output-type options:
\end_layout

\begin_layout Code
$ ./ipv6calc --out -?
\end_layout

\begin_layout Code
ipv6calc: version 0.70.1
\end_layout

\begin_layout Code
(P) & (C) 2001-2007 by Peter Bieringer <pb (at) bieringer.de>
\end_layout

\begin_layout Code

\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
 For examples and available format options use:
\end_layout

\begin_layout Code
    --out <type> --examples
\end_layout

\begin_layout Standard
Action-type options: 
\end_layout

\begin_layout Code
$ ./ipv6calc --action -?
\end_layout

\begin_layout Code
ipv6calc: version 0.70.1
\end_layout

\begin_layout Code

\end_layout

\begin_layout Code
(P) & (C) 2001-2007 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
  genprivacyiid : Generates a privacy interface ID out of a given one and
 a token
\end_layout

\begin_layout Code
  anonymize     : Anonymize IPv4/IPv6 address without loosing much information
\end_layout

\begin_layout Code
  prefixmac2ipv6: Generates an IPv6 address out of a prefix and a MAC address
\end_layout

\begin_layout Standard
Because of historical issues, there exists also a support of the old-styled
 options: 
\end_layout

\begin_layout Code
$ ./ipv6calc --printoldoptions
\end_layout

\begin_layout Code
ipv6calc: version 0.70.1
\end_layout

\begin_layout Code
(P) & (C) 2001-2007 by Peter Bieringer <pb (at) bieringer.de>
\end_layout

\begin_layout Code

\end_layout

\begin_layout Code
 Usage with old style (shortcut) options (going obsolete):
\end_layout

\begin_layout Code
  <shortcut option> [<format option> ...] <input data> [...]
\end_layout

\begin_layout Code
  --addr2ip6_int
\end_layout

\begin_layout Code
  --addr_to_ip6int
\end_layout

\begin_layout Code
  --addr2ip6_arpa
\end_layout

\begin_layout Code
  --addr_to_ip6arpa
\end_layout

\begin_layout Code
  --addr_to_bitstring
\end_layout

\begin_layout Code
  --addr2compaddr
\end_layout

\begin_layout Code
  --addr_to_compressed
\end_layout

\begin_layout Code
  --addr2uncompaddr
\end_layout

\begin_layout Code
  --addr_to_uncompressed
\end_layout

\begin_layout Code
  --addr_to_base85
\end_layout

\begin_layout Code
  --base85_to_addr
\end_layout

\begin_layout Code
  --mac_to_eui64
\end_layout

\begin_layout Code
  --addr2fulluncompaddr
\end_layout

\begin_layout Code
  --addr_to_fulluncompressed
\end_layout

\begin_layout Code
  --addr2if_inet6
\end_layout

\begin_layout Code
  --addr_to_ifinet6
\end_layout

\begin_layout Code
  --if_inet62addr
\end_layout

\begin_layout Code
  --ifinet6_to_compressed
\end_layout

\begin_layout Code
  --eui64_to_privacy
\end_layout

\begin_layout Code
  --ipv4_to_6to4addr
\end_layout

\begin_layout Section
Webserver log conversion helper program "ipv6logconv"
\end_layout

\begin_layout Standard
This program parses address tokens of a given webserver logfile and converts
 them to special strings, useful for statistics (e.g.
 created by using "analog").
\end_layout

\begin_layout Subsection
Examples
\end_layout

\begin_layout Standard
A demonstration about which kind of statistics are possible to produce is
 shown at 
\begin_inset CommandInset href
LatexCommand href
name "http://www.ipv6.bieringer.de/"
target "http://www.ipv6.bieringer.de/"

\end_inset

 (IPv6 only).
\end_layout

\begin_layout Section
Webserver log anonymization helper program "ipv6loganon"
\end_layout

\begin_layout Standard
On autoconfiguration, the interface part of an IPv6 address is based on
 the MAC address of the network interface card (NIC).
 This address is used for outgoing requests, if privacy option (RFC3041)
 is not enabled.
 This results in many privacy related information on web- or mail-server
 log files.
 Administrators, which won't (be allowed to) store such information over
 time, but still do not want to loose information about address type distributio
n should use 'ipv6loganon' to anonymize their log files.
\end_layout

\begin_layout Subsection
Anonymization details
\end_layout

\begin_layout Standard
The anonymizer would keep as much information as possible for IPv6 address
 types.
\end_layout

\begin_layout Standard
Client-side IID would be anonymized by
\end_layout

\begin_layout Itemize
UI-48 based: serial number would be zero'ed, keeping OID
\end_layout

\begin_layout Itemize
EUI-64 based: serial number would be zero'ed, keeping OID
\end_layout

\begin_layout Itemize
ISATAP: client IPv4 address would be anonymized by given IPv4 mask
\end_layout

\begin_layout Itemize
TEREDO: client IPv4 address would be anonymized by given IPv4 mask, client
 port would be zero'ed
\end_layout

\begin_layout Itemize
6to4(Microsoft): client IPv4 address would be anonymized by given IPv4 mask
\end_layout

\begin_layout Itemize
local: whole IID would be zero'ed
\end_layout

\begin_layout Standard
Client-side SLA would be anonymized by 
\end_layout

\begin_layout Itemize
SLA would be zero'ed
\end_layout

\begin_layout Standard
Prefix would be anonymized by
\end_layout

\begin_layout Itemize
6to4: client IPv4 address would be anonymized by given IPv4 mask
\end_layout

\begin_layout Standard
Compat/Mapped IPv4 addresses would be anonymized by
\end_layout

\begin_layout Itemize
IPv4 address would be anonymized by given IPv4 mask
\end_layout

\begin_layout Subsection
Supported log file formats
\end_layout

\begin_layout Standard
Currently native supported log files:
\end_layout

\begin_layout Itemize
Apache log file format, 1st token is IPv4 or IPv6 address
\end_layout

\begin_layout Standard
There are plans to support also mail server log files sometimes in the future,
 but because of different formats, this would be probably done by a Perl
 program which parses the log file and a (cached) 'ip6calc' call with action
 'anonymize'.
\end_layout

\begin_layout Subsection
Supported options
\end_layout

\begin_layout Code
$ ./ipv6loganon -?
\end_layout

\begin_layout Code
ipv6loganon: version 0.70.1
\end_layout

\begin_layout Code
(P) & (C) 2007 by Peter Bieringer <pb (at) bieringer.de>
\end_layout

\begin_layout Code

\end_layout

\begin_layout Code
This program anonymizes IPv4/IPv6 addresses in HTTP server log files
\end_layout

\begin_layout Code

\end_layout

\begin_layout Code
 General:
\end_layout

\begin_layout Code
  [-d|--debug <debug value>] : debug value (bitwise like)
\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
 Output anonymization:
\end_layout

\begin_layout Code
  --mask-ipv4 <bits>     : mask all IPv4 addresses [0-32], default 24
\end_layout

\begin_layout Code
                            even if occurs in IPv6-IID
\end_layout

\begin_layout Code
  --mask-ipv6 <bits>     : mask IPv6 prefix [0-64], default 48
\end_layout

\begin_layout Code
                            only applied to related address types
\end_layout

\begin_layout Code
  --no-mask-iid          : do not mask non-IPv4 based IPv6-IID
\end_layout

\begin_layout Code
  --anonymize-standard   : preset for standard anonymization
\end_layout

\begin_layout Code
  (default)                 mask-ipv4=24 mask-ipv6=48 mask-iid
\end_layout

\begin_layout Code
  --anonymize-careful    : preset for careful anonymization
\end_layout

\begin_layout Code
                            mask-ipv4=20 mask-ipv6=40 mask-iid
\end_layout

\begin_layout Code
  --anonymize-paranoid   : preset for paranoid anonymization
\end_layout

\begin_layout Code
                            mask-ipv4=16 mask-ipv6=32 mask-iid
\end_layout

\begin_layout Code

\end_layout

\begin_layout Code
 Takes data from stdin, outputs the processed data to stdout
\end_layout

\begin_layout Subsection
Usage
\end_layout

\begin_layout Standard
Currently, only offline conversion is supported.
 Implementation as pipe filter between Apache and 'cronolog' has been tested,
 but didn't work for unknown reason.
\end_layout

\begin_layout Code
$ cat /path/to/http_log | ./ipv6loganon >/path/to/http_log_anonymized
\end_layout

\begin_layout Section
Perl CGI wrapper program "ipv6calcweb.cgi"
\end_layout

\begin_layout Standard
Because calling C programs directly as CGI isn't really recommended (too
 much security troubles all the time), I wrote a small wrapper utility which
 calls "ipv6calc" to get information about client and server address for
 displaying on a web page.
 
\end_layout

\begin_layout Subsection
Examples
\end_layout

\begin_layout Standard
A demonstration about which kind of output is possible to produce is shown
 at
\end_layout

\begin_layout Itemize
\begin_inset CommandInset href
LatexCommand href
name "http://www.ipv6.bieringer.de/"
target "http://www.ipv6.bieringer.de/"

\end_inset

 (IPv6 only)
\end_layout

\begin_layout Itemize
\begin_inset CommandInset href
LatexCommand href
name "http://ipv6.aerasec.de/index2.html"
target "http://ipv6.aerasec.de/index2.html"

\end_inset

 (IPv4/IPv6)
\end_layout

\begin_layout Itemize
\begin_inset CommandInset href
LatexCommand href
name "http://www.sixxs.net/tools/ipv6calc/"
target "http://www.sixxs.net/tools/ipv6calc/"

\end_inset

 (IPv4/IPv6)
\end_layout

\begin_layout Itemize
\begin_inset CommandInset href
LatexCommand href
name "http://ipv6-info.internet2.edu/"
target "http://ipv6-info.internet2.edu/"

\end_inset


\end_layout

\begin_layout Section
Webserver log statistics helper program "ipv6logstats"
\end_layout

\begin_layout Standard
This program parses a given webserver logfile and count addresses, useful
 for time period statistics.
\end_layout

\begin_layout Subsection
Supported options
\end_layout

\begin_layout Code
$ ./ipv6logstats -?
\end_layout

\begin_layout Code
ipv6logstats: version 0.70.1
\end_layout

\begin_layout Code
(P) & (C) 2003-2005 by Peter Bieringer <pb (at) bieringer.de>
\end_layout

\begin_layout Code

\end_layout

\begin_layout Code
 General:
\end_layout

\begin_layout Code
  [-d|--debug <debug value>] : debug value (bitwise like)
\end_layout

\begin_layout Code
  [-u|--unknown]             : print unknown IP addresses to stderr
\end_layout

\begin_layout Code
  [-c|--colums]              : print statistics in colums
\end_layout

\begin_layout Code
  [-n|--noheader]            : don't print header in colums mode
\end_layout

\begin_layout Code
  [-o|--onlyheader]          : print only header in colums mode
\end_layout

\begin_layout Code
  [-p|--prefix <token>]      : print token as prefix
\end_layout

\begin_layout Code

\end_layout

\begin_layout Code
 Takes http log data from stdin and print a table on output
\end_layout

\begin_layout Subsection
Usage
\end_layout

\begin_layout Standard
There are a README and some helper scripts available in the package how
 to use this program and how to generate a graph using Gnuplot.
\end_layout

\begin_layout Subsection
Examples
\end_layout

\begin_layout Standard
A demonstration with real data is available at 
\begin_inset CommandInset href
LatexCommand href
name "http://mirrors.bieringer.de/stats/timeline.html"
target "http://mirrors.bieringer.de/stats/timeline.html"

\end_inset

.
\end_layout

\end_body
\end_document
