summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2013-06-03 05:14:41 -0700
committerDaniil Baturin <daniil@baturin.org>2013-06-03 05:14:41 -0700
commita1fab61d26f36e965253c591b6052e67c025fb85 (patch)
tree9295b1790b9c44d9254a2ee04b44d1c630245eef /man
parent62850cbe4e9b038cdaf250732794aaaf9f355225 (diff)
downloadipaddrcheck-a1fab61d26f36e965253c591b6052e67c025fb85.tar.gz
ipaddrcheck-a1fab61d26f36e965253c591b6052e67c025fb85.zip
Add a man page draft.
Diffstat (limited to 'man')
-rw-r--r--man/Makefile.am9
-rw-r--r--man/ipaddrcheck.1131
-rw-r--r--man/ipaddrcheck.x32
-rwxr-xr-xman/mkman.sh3
4 files changed, 175 insertions, 0 deletions
diff --git a/man/Makefile.am b/man/Makefile.am
new file mode 100644
index 0000000..113a4aa
--- /dev/null
+++ b/man/Makefile.am
@@ -0,0 +1,9 @@
+man1_MANS = ipaddrcheck.1
+dist_man1_MANS = ipaddrcheck.1
+
+# If anyone knows how to execute it only if target binary is actually executable
+# (i.e. not cross-compiled), please tell
+#ipaddrcheck.1:
+# $(HELP2MAN) --no-info --include ipaddrcheck.x -o ipaddrcheck.1 $(top_srcdir)/src/ipaddrcheck
+
+
diff --git a/man/ipaddrcheck.1 b/man/ipaddrcheck.1
new file mode 100644
index 0000000..3bb4f19
--- /dev/null
+++ b/man/ipaddrcheck.1
@@ -0,0 +1,131 @@
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.38.2.
+.TH IPADDRCHECK "1" "June 2013" "ipaddrcheck 0.1" "User Commands"
+.SH NAME
+ipaddrcheck \- an IPv4 and IPv6 validator suitable for use in scripts
+.SH SYNOPSIS
+.B ipaddrcheck
+\fI<OPTIONS> \fR[\fISTRING\fR]
+.SH DESCRIPTION
+ipaddrcheck is capable of checking various facts about IPv4 and IPv6 addresses,
+from checking whether the address is valid to checking whether it is an IPv4
+multicast address, host or network address and many more.
+.SH OPTIONS
+If more than one option is given, they work as logical AND (i.e. if one of them
+fails, overall check result is fail). Logical consistency of the options is
+left up to the user. The program does not detect whether given options are
+compatible, so a mutually exclusive combination like "--is-ipv4 --is-ipv6"
+will be accepted and simply return fail for any argument.
+.TP
+\fB\-\-is\-valid\fR
+Check if STRING is a valid IPv4 or IPv6 address
+with or without prefix length
+.TP
+\fB\-\-is\-any\-cidr\fR
+Check if STRING is a valid IPv4 or IPv6 address
+with prefix length
+.TP
+\fB\-\-is\-any\-single\fR
+Check if STRING is a valid single IPv4 or IPv6 address
+.TP
+\fB\-\-is\-any\-host\fR
+Check if STRING is a valid IPv4 or IPv6 host address
+.TP
+\fB\-\-is\-any\-net\fR
+Check if STRING is a valid IPv4 or IPv6 network address
+.TP
+\fB\-\-is\-ipv4\fR
+Check if STRING is a valid IPv4 address with mask
+.TP
+\fB\-\-is\-ipv4\-cidr\fR
+Check if STRING is a valid CIDR\-formatted address
+.TP
+\fB\-\-is\-ipv4\-single\fR
+Check if STRING is a valid single address
+(i.e. with no mask)
+.TP
+\fB\-\-is\-ipv4\-host\fR
+Check if STRING is a host address
+.TP
+\fB\-\-is\-ipv4\-net\fR
+Check if STRING is a network address
+.TP
+\fB\-\-is\-ipv4\-broadcast\fR
+Check if STRING is a broadcast address
+.TP
+\fB\-\-is\-ipv4\-multicast\fR
+Check if STRING is a multicast address
+.TP
+\fB\-\-is\-ipv4\-loopback\fR
+Check if STRING is a loopback address
+.TP
+\fB\-\-is\-ipv4\-link\-local\fR
+Check if STRING is a link\-local address
+.TP
+\fB\-\-is\-ipv4\-rfc1918\fR
+Check if STRING is a private (RFC1918) address
+.TP
+\fB\-\-is\-ipv6\fR
+Check if STRING is a valid IPv6 address
+.TP
+\fB\-\-is\-ipv6\-cidr\fR
+Check if STRING is a CIDR\-formatted IPv6 address
+.TP
+\fB\-\-is\-ipv6\-single\fR
+Check if STRING is an IPv6 address with no mask
+.TP
+\fB\-\-is\-ipv6\-host\fR
+Check if STRING is an IPv6 host address
+.TP
+\fB\-\-is\-ipv6\-net\fR
+Check if STRING is an IPv6 network address
+.TP
+\fB\-\-is\-ipv6\-multicast\fR
+Check if STRING is an IPv6 multicast address
+.TP
+\fB\-\-is\-ipv6\-link\-local\fR
+Check if STRING is an IPv6 link\-local address
+.TP
+\fB\-\-is\-valid\-intf\-address\fR
+Check if STRING is an IPv4 or IPv6 address that
+can be assigned to a network interface
+.TP
+\fB\-\-allow\-loopback\fR
+When used with \fB\-\-is\-valid\-intf\-address\fR,
+makes IPv4 loopback addresses pass the check
+.TP
+\fB\-\-version\fR
+Print version information and exit
+.TP
+\fB\-\-help\fR
+Print help message and exit
+.SS "Exit codes:"
+.TP
+0
+if check passed,
+.TP
+1
+if check failed,
+.TP
+2
+if a problem occured (wrong option, internal error etc.)
+.SH EXAMPLES
+Check if the argument is a valid IPv4 host address:
+ipaddrcheck --is-ipv4-host 192.0.2.78/24
+
+Check if the argument is an address that can be assigned to a loopback interface:
+ipaddrcheck --allow-loopback --is-valid-intf-address 127.0.0.7/8
+.SH DEFINITIONS
+Broadcast address: the last address of an IPv4 subnet.
+
+Interface address: address passes --is-valid-intf-address check if
+prefix length is specified, it is not a broadcast address, not a multicast
+address, not unspecified address, not from IPv4 THIS network, not a network address
+and not the IPv4 limited broadcast address.
+.SH AUTHOR
+Written by SO3Group.
+.SH COPYRIGHT
+Copyright \(co SO3Group 2013.
+License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>
+.br
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
diff --git a/man/ipaddrcheck.x b/man/ipaddrcheck.x
new file mode 100644
index 0000000..11b9bcf
--- /dev/null
+++ b/man/ipaddrcheck.x
@@ -0,0 +1,32 @@
+[NAME]
+ipaddrcheck \- an IPv4 and IPv6 validator suitable for use in scripts
+
+[DESCRIPTION]
+ipaddrcheck is capable of checking various facts about IPv4 and IPv6 addresses,
+from checking whether the address is valid to checking whether it is an IPv4
+multicast address, host or network address and many more.
+
+[OPTIONS]
+If more than one option is given, they work as logical AND (i.e. if one of them
+fails, overall check result is fail). Logical consistency of the options is
+left up to the user. The program does not detect whether given options are
+compatible, so a mutually exclusive combination like "--is-ipv4 --is-ipv6"
+will be accepted and simply return fail for any argument.
+
+[DEFINITIONS]
+Broadcast address: the last address of an IPv4 subnet.
+
+Interface address: address passes --is-valid-intf-address check if
+prefix length is specified, it is not a broadcast address, not a multicast
+address, not unspecified address, not from IPv4 THIS network, not a network address
+and not the IPv4 limited broadcast address.
+
+[EXAMPLES]
+Check if the argument is a valid IPv4 host address:
+ipaddrcheck --is-ipv4-host 192.0.2.78/24
+
+Check if the argument is an address that can be assigned to a loopback interface:
+ipaddrcheck --allow-loopback --is-valid-intf-address 127.0.0.7/8
+
+[AUTHOR]
+Written by SO3Group.
diff --git a/man/mkman.sh b/man/mkman.sh
new file mode 100755
index 0000000..945598b
--- /dev/null
+++ b/man/mkman.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+help2man --no-info --include ipaddrcheck.x -o ipaddrcheck.1 ../src/ipaddrcheck