summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorRichard Sharpe <sharpe@samba.org>2004-04-16 03:57:30 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:51:16 -0500
commit0374be5d931903f1040fd4e759e6b1d681be2047 (patch)
treeab3c2af8653c20f7d51e4763c420b3f0853aaba8 /source3/utils
parent4938095e77b0b5334935833b34e23bde74c6849d (diff)
downloadsamba-0374be5d931903f1040fd4e759e6b1d681be2047.tar.gz
samba-0374be5d931903f1040fd4e759e6b1d681be2047.tar.bz2
samba-0374be5d931903f1040fd4e759e6b1d681be2047.zip
r248: Add support for printing out the MAC address on nmblookup.
(This used to be commit bf9f02be5fc1d09c8c08c78c3f2df23b2099ba4f)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/nmblookup.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/utils/nmblookup.c b/source3/utils/nmblookup.c
index 3c5a22841e..7285712c0b 100644
--- a/source3/utils/nmblookup.c
+++ b/source3/utils/nmblookup.c
@@ -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");
}