r248: Add support for printing out the MAC address on nmblookup.
[tprouty/samba.git] / source3 / utils / nmblookup.c
index 3c5a22841eacda18f5bbc2e4dd6118d34d38d108..7285712c0b7b7e63a0953c11f15eb19490f83108 100644 (file)
@@ -102,11 +102,12 @@ static void do_node_status(int fd, const char *name, int type, struct in_addr ip
        struct nmb_name nname;
        int count, i, j;
        struct node_status *status;
+       struct node_status_extra extra;
        fstring cleanname;
 
        d_printf("Looking up status of %s\n",inet_ntoa(ip));
        make_nmb_name(&nname, name, type);
-       status = node_status_query(fd,&nname,ip, &count);
+       status = node_status_query(fd,&nname,ip, &count, &extra);
        if (status) {
                for (i=0;i<count;i++) {
                        pull_ascii_fstring(cleanname, status[i].name);
@@ -119,6 +120,9 @@ static void do_node_status(int fd, const char *name, int type, struct in_addr ip
                }
                SAFE_FREE(status);
        }
+       d_printf("\n\tMAC Address = %02X-%02X-%02X-%02X-%02X-%02X\n",
+                extra.mac_addr[0], extra.mac_addr[1], extra.mac_addr[2],
+                extra.mac_addr[3], extra.mac_addr[4], extra.mac_addr[5]);
        d_printf("\n");
 }