Skip to content

Commit 36691a3

Browse files
Merge pull request #104 from F-i-f/ethers-lookup
Lookup up MAC addresses in system database.
2 parents 2cf305f + 09048cf commit 36691a3

3 files changed

Lines changed: 13 additions & 2 deletions

File tree

‎doc/macping.1‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ macping \- A tool for pinging other RouterOS or mactelnetd devices
77
.SH DESCRIPTION
88
This tool enables you to ping other RouterOS or MAC-Telnetd enabled
99
devices. You can ping either a hostname or a MAC address.
10-
If specified, the hostname (identity) will be looked up via MNDP discovery.
10+
If specified, the hostname (identity) will be looked up via
11+
.BR ether_hostton(3)
12+
(typically in
13+
.BR ethers(5) )
14+
or if that fails, MNDP discovery.
1115
.SH OPTIONS
1216
These programs follow the usual GNU command line syntax.
1317
A summary of options is included below.

‎doc/mactelnet.1‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ mactelnet \- A tool for telneting via MAC addresses
77
.SH DESCRIPTION
88
This tool enables you to telnet other RouterOS or MAC-Telnetd enabled
99
devices. You can connect to either a hostname or a MAC address.
10-
If specified, the hostname (identity) will be looked up via MNDP discovery.
10+
If specified, the hostname (identity) will be looked up via
11+
.BR ether_hostton(3)
12+
(typically in
13+
.BR ethers(5) )
14+
or if that fails, MNDP discovery.
1115
.SH OPTIONS
1216
These programs follow the usual GNU command line syntax.
1317
A summary of options is included below.

‎src/protocol.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,9 @@ int query_mndp_or_mac(char *address, unsigned char *dstmac, int verbose) {
533533
}
534534

535535
if (colons != 5) {
536+
if (ether_hostton(address, (struct ether_addr*)dstmac) == 0) {
537+
return 1;
538+
}
536539
/*
537540
* Not a valid mac-address.
538541
* Search for Router by identity name, using MNDP

0 commit comments

Comments
 (0)