Use mac_to_str
This commit is contained in:
parent
933ef7bab2
commit
e0cec73349
2 changed files with 5 additions and 12 deletions
|
|
@ -510,8 +510,7 @@ int ethsock_list_all(void)
|
|||
printf(" %-15s", "0.0.0.0");
|
||||
}
|
||||
|
||||
printf(" %02x:%02x:%02x:%02x:%02x:%02x", hwaddr[0], hwaddr[1],
|
||||
hwaddr[2], hwaddr[3], hwaddr[4], hwaddr[5]);
|
||||
printf(" %s", mac_to_str(hwaddr));
|
||||
|
||||
#ifdef NMRPFLASH_WINDOWS
|
||||
if (pretty) {
|
||||
|
|
|
|||
14
nmrp.c
14
nmrp.c
|
|
@ -381,11 +381,8 @@ int nmrp_do(struct nmrpd_args *args)
|
|||
|
||||
switch (rx.msg.code) {
|
||||
case NMRP_C_ADVERTISE:
|
||||
printf("Received NMRP advertisement from "
|
||||
"%02x:%02x:%02x:%02x:%02x:%02x.\n",
|
||||
rx.eh.ether_shost[0], rx.eh.ether_shost[1],
|
||||
rx.eh.ether_shost[2], rx.eh.ether_shost[3],
|
||||
rx.eh.ether_shost[4], rx.eh.ether_shost[5]);
|
||||
printf("Received NMRP advertisement from %s.\n",
|
||||
mac_to_str(rx.eh.ether_shost));
|
||||
err = 1;
|
||||
goto out;
|
||||
case NMRP_C_CONF_REQ:
|
||||
|
|
@ -403,11 +400,8 @@ int nmrp_do(struct nmrpd_args *args)
|
|||
|
||||
expect = NMRP_C_TFTP_UL_REQ;
|
||||
|
||||
printf("Received configuration request from "
|
||||
"%02x:%02x:%02x:%02x:%02x:%02x.\n",
|
||||
rx.eh.ether_shost[0], rx.eh.ether_shost[1],
|
||||
rx.eh.ether_shost[2], rx.eh.ether_shost[3],
|
||||
rx.eh.ether_shost[4], rx.eh.ether_shost[5]);
|
||||
printf("Received configuration request from %s.\n",
|
||||
mac_to_str(rx.eh.ether_shost));
|
||||
|
||||
memcpy(tx.eh.ether_dhost, rx.eh.ether_shost, 6);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue