.\" 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 \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 .br This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.