=pod

=head1 NAME

B<ipinfo> - a tool for displaying IP address information

=head1 DESCRIPTION

This program gives as much information about an IP address (and netmask)
as possible, i.e. network, broadcast class etc.

=head1 SYNOPSIS

B<ipinfo> [options] B<ip> [netmask]

=head1 OPTIONS

  -a, --all            Display all (default)
  -i, --ip             Display given IP address
  -c, --class          Display class information
  -m, --netmask        Display netmask
  -p, --prefix         Display prefix
  -n, --network        Display network address
  -w, --wildcard       Display wildcard
  -b, --broadcast      Display broadcast address
  -t, --ipcount        Display count af all IP addresses
  -H, --hostcount      Display count of host IP addresses
  -I, --hostmin        Display first usable IP address of a host
  -A, --hostmax        Display last usable IP address of a host

  -l, --legend         Force display legend
  -h, --help, --usage  Print usage information

  ip and netmask can be specified in one of these formats:
    a.b.c.d/prefix   (mask is not specified)
    a.b.c.d prefix
    a.b.c.d/e.f.g.h  (IP address/netmask address)
    a.b.c.d e.f.g.h
    a.b.c.d          (netmask will be determined)

=head1 OUTPUT

If no options are defined, the program displays all possible information.

If only one information is selected to be displayed, legend will not be
displayed (only if I<-l> is set), this can be usefull in scripts. If there
are more information to display, legend is allways displayed.

If I<-a> is set, all other options are ignored and everything will be
displayed.

Values I<Host count>, I<Host min> and I<Host max> have no sense if prefix is
higher than 30, in this case these values will not be displayed. This can
cause no output.

=head1 EXAMPLES

B<ipinfo 192.168.0.1>

=begin man

.PP
IP address: 192.168.0.1
.br
Class:      C (private 192.168/16)
.br
Netmask:    255.255.255.0
.br
Prefix:     24
.br
Network:    192.168.0.0
.br
Wildcard:   0.0.0.255
.br
Broadcast:  192.168.0.255
.br
IP count:   256
.br
Host count: 254
.br
Host min:   192.168.0.1
.br
Host max:   192.168.0.254

=end man

B<ipinfo -n -b 10.0.0.1/24>

=begin man

.PP
Network:    10.0.0.0
.br
Broadcast:  10.0.0.255

=end man

B<ipinfo -l -n 10.0.0.0 255.255.255.0>

Network:    10.0.0.0

B<ipinfo -n 10.0.0.0>

10.0.0.0

=head1 AUTHOR

=begin man

Written by C. McCohy <mccohy@kyberdigi.cz>
.br
See http://www.kyberdigi.cz/projects/ipinfo/ for more information.

=end man

=cut

