]> git.zerfleddert.de Git - hmcfgusb/blobdiff - hmsniff.c
add option to bind socket to specified interface (e.g. localhost) only
[hmcfgusb] / hmsniff.c
index 67a2df6ae004e4fdd6b318c1154c87ed1ea75012..e8424533009813c0f47fc8d0cd3ee4020a6c96a5 100644 (file)
--- a/hmsniff.c
+++ b/hmsniff.c
@@ -138,12 +138,12 @@ struct recv_data {
        int wrong_hmid;
 };
 
-static void parse_hmcfgusb(uint8_t *buf, int buf_len, void *data)
+static int parse_hmcfgusb(uint8_t *buf, int buf_len, void *data)
 {
        struct recv_data *rdata = data;
 
        if (buf_len < 1)
-               return;
+               return 1;
 
        switch(buf[0]) {
                case 'E':
@@ -164,6 +164,8 @@ static void parse_hmcfgusb(uint8_t *buf, int buf_len, void *data)
                        hexdump(buf, buf_len, "Unknown> ");
                        break;
        }
+
+       return 1;
 }
 
 int main(int argc, char **argv)
Impressum, Datenschutz