]> cvs.zerfleddert.de Git - hmcfgusb/blobdiff - hmland.c
hmland: don't impersonate HM-CFG-LAN by default.
[hmcfgusb] / hmland.c
index 97a5b6c02bbbff28b13c20988ddab52960972791..73a08d40766e745b838d5c77f89b28c2a9734d87 100644 (file)
--- a/hmland.c
+++ b/hmland.c
@@ -718,8 +718,6 @@ static int socket_server(char *iface, int port, int flags)
                exit(EXIT_FAILURE);
        }
 
-       impersonate_hmlanif = 1;
-
        sock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
        if (sock == -1) {
                perror("Can't open socket");
@@ -813,6 +811,7 @@ void hmlan_syntax(char *prog)
        fprintf(stderr, "\t-D\t\tdebug mode\n");
        fprintf(stderr, "\t-d\t\tdaemon mode\n");
        fprintf(stderr, "\t-h\t\tthis help\n");
+       fprintf(stderr, "\t-I\t\tpretend to be HM-LAN-IF for compatibility with client-software (previous default)\n");
        fprintf(stderr, "\t-i\t\tinteractive mode (connect HM-CFG-USB to terminal)\n");
        fprintf(stderr, "\t-l ip\t\tlisten on given IP address only (for example 127.0.0.1)\n");
        fprintf(stderr, "\t-L logfile\tlog network-communication to logfile\n");
@@ -834,7 +833,7 @@ int main(int argc, char **argv)
        char *ep;
        int opt;
        
-       while((opt = getopt(argc, argv, "DdhiPp:Rr:l:L:vV")) != -1) {
+       while((opt = getopt(argc, argv, "DdhIiPp:Rr:l:L:vV")) != -1) {
                switch (opt) {
                        case 'D':
                                debug = 1;
@@ -843,6 +842,9 @@ int main(int argc, char **argv)
                        case 'd':
                                flags |= FLAG_DAEMON;
                                break;
+                       case 'I':
+                               impersonate_hmlanif = 1;
+                               break;
                        case 'i':
                                interactive = 1;
                                break;
@@ -894,7 +896,7 @@ int main(int argc, char **argv)
                                break;
                        case 'V':
                                printf("hmland " VERSION "\n");
-                               printf("Copyright (c) 2013 Michael Gernoth\n\n");
+                               printf("Copyright (c) 2013-15 Michael Gernoth\n\n");
                                exit(EXIT_SUCCESS);
                        case 'h':
                        case ':':
Impressum, Datenschutz