]> git.ipfire.org Git - people/ms/network.git/blobdiff - src/inetcalc.c
Add new libnetwork
[people/ms/network.git] / src / inetcalc.c
index da3444e00c5d283f405368d24676f67f20af66d7..1841c84065975b7e9beff194f8a67bc81118d12a 100644 (file)
@@ -28,6 +28,8 @@
 #include <string.h>
 #include <sys/socket.h>
 
+#include <network/libnetwork.h>
+
 typedef struct ip_address {
        int family;
        struct in6_addr addr;
@@ -513,7 +515,7 @@ int main(int argc, char** argv) {
        int family = AF_UNSPEC;
 
        while (1) {
-               int c = getopt_long(argc, argv, "46bcefgnpsv", long_options, &option_index);
+               int c = getopt_long(argc, argv, "46bcefgnpsviV", long_options, &option_index);
                if (c == -1)
                        break;
 
@@ -580,6 +582,11 @@ int main(int argc, char** argv) {
                                verbose = 1;
                                break;
 
+                       case 'V':
+                               printf("%s\n", network_version());
+                               exit(0);
+                               break;
+
                        case '?':
                                break;