@@ -15,9 +15,13 @@ var completionsTool = &complete.Command{
1515 "next" : completionsToolNext ,
1616 "prev" : completionsToolPrev ,
1717 "is_v4" : completionsToolIsV4 ,
18+ "is_v6" : completionsToolIsV6 ,
19+ "is_valid" : completionsToolIsValid ,
20+ "is_one_ip" : completionsToolIsOneIp ,
1821 "unmap" : completionsToolUnmap ,
1922 "lower" : completionsToolLower ,
2023 "upper" : completionsToolUpper ,
24+ "is_v4in6" : completionsToolIs4In6 ,
2125 "ip2n" : completionsToolIP2n ,
2226 "n2ip" : completionsToolN2IP ,
2327 "n2ip6" : completionsToolN2IP6 ,
@@ -39,9 +43,12 @@ Commands:
3943 prev get the previous IP of the input IP
4044 is_v4 reports whether input is an IPv4 address.
4145 is_v6 reports whether input is an IPv6 address.
46+ is_valid reports whether an IP is valid.
47+ is_one_ip checks whether a CIDR or IP Range contains exactly one IP.
4248 unmap returns ip with any IPv4-mapped IPv6 address prefix removed.
4349 lower get start IP of IPs, IP ranges, and CIDRs.
4450 upper get end IP of IPs, IP ranges, and CIDRs.
51+ is_v4in6 get whether the IP is an IPv4-mapped IPv6 address.
4552 ip2n converts an IPv4 or IPv6 address to its decimal representation.
4653 n2ip evaluates a mathematical expression and converts it to an IPv4 or IPv6.
4754 n2ip6 evaluates a mathematical expression and converts it to an IPv6.
@@ -83,12 +90,18 @@ func cmdTool() error {
8390 err = cmdToolIsV4 ()
8491 case cmd == "is_v6" :
8592 err = cmdToolIsV6 ()
93+ case cmd == "is_valid" :
94+ err = cmdToolIsValid ()
95+ case cmd == "is_one_ip" :
96+ err = cmdToolIsOneIp ()
8697 case cmd == "unmap" :
8798 err = cmdToolUnmap ()
8899 case cmd == "lower" :
89100 err = cmdToolLower ()
90101 case cmd == "upper" :
91102 err = cmdToolUpper ()
103+ case cmd == "is_v4in6" :
104+ err = cmdToolIsV4In6 ()
92105 case cmd == "ip2n" :
93106 err = cmdToolIP2n ()
94107 case cmd == "n2ip" :
0 commit comments