|
29 | 29 | #include "net/gnrc/netif.h" |
30 | 30 | #include "net/gnrc/netif/hdr.h" |
31 | 31 | #include "net/ipv6/addr.h" |
| 32 | +#include "net/l2util.h" |
32 | 33 | #include "net/lora.h" |
33 | 34 | #include "net/loramac.h" |
34 | 35 | #include "net/netif.h" |
@@ -660,7 +661,7 @@ static void _netif_list(netif_t *iface) |
660 | 661 | if (res >= 0) { |
661 | 662 | char hwaddr_str[res * 3]; |
662 | 663 | printf(" HWaddr: %s ", |
663 | | - gnrc_netif_addr_to_str(hwaddr, res, hwaddr_str)); |
| 664 | + l2util_addr_to_str(hwaddr, res, hwaddr_str)); |
664 | 665 | } |
665 | 666 | res = netif_get_opt(iface, NETOPT_CHANNEL, 0, &u16, sizeof(u16)); |
666 | 667 | if (res >= 0) { |
@@ -788,7 +789,7 @@ static void _netif_list(netif_t *iface) |
788 | 789 | if (res >= 0) { |
789 | 790 | char hwaddr_str[res * 3]; |
790 | 791 | printf("Long HWaddr: "); |
791 | | - printf("%s ", gnrc_netif_addr_to_str(hwaddr, res, hwaddr_str)); |
| 792 | + printf("%s ", l2util_addr_to_str(hwaddr, res, hwaddr_str)); |
792 | 793 | line_thresh++; |
793 | 794 | } |
794 | 795 | line_thresh = _newline(0U, line_thresh); |
@@ -935,8 +936,8 @@ static void _netif_list(netif_t *iface) |
935 | 936 | for (unsigned i = 0; i < CONFIG_L2FILTER_LISTSIZE; i++) { |
936 | 937 | if (filter[i].addr_len > 0) { |
937 | 938 | char hwaddr_str[filter[i].addr_len * 3]; |
938 | | - gnrc_netif_addr_to_str(filter[i].addr, filter[i].addr_len, |
939 | | - hwaddr_str); |
| 939 | + l2util_addr_to_str(filter[i].addr, filter[i].addr_len, |
| 940 | + hwaddr_str); |
940 | 941 | printf(" %2i: %s\n", count++, hwaddr_str); |
941 | 942 | } |
942 | 943 | } |
@@ -1300,7 +1301,7 @@ static int _netif_set_lw_key(netif_t *iface, netopt_t opt, char *key_str) |
1300 | 1301 | static int _netif_set_addr(netif_t *iface, netopt_t opt, char *addr_str) |
1301 | 1302 | { |
1302 | 1303 | uint8_t addr[GNRC_NETIF_L2ADDR_MAXLEN]; |
1303 | | - size_t addr_len = gnrc_netif_addr_from_str(addr_str, addr); |
| 1304 | + size_t addr_len = l2util_addr_from_str(addr_str, addr); |
1304 | 1305 |
|
1305 | 1306 | if (addr_len == 0) { |
1306 | 1307 | printf("error: unable to parse address.\n" |
@@ -1449,7 +1450,7 @@ static int _netif_set_encrypt_key(netif_t *iface, netopt_t opt, char *key_str) |
1449 | 1450 | static int _netif_addrm_l2filter(netif_t *iface, char *val, bool add) |
1450 | 1451 | { |
1451 | 1452 | uint8_t addr[GNRC_NETIF_L2ADDR_MAXLEN]; |
1452 | | - size_t addr_len = gnrc_netif_addr_from_str(val, addr); |
| 1453 | + size_t addr_len = l2util_addr_from_str(val, addr); |
1453 | 1454 |
|
1454 | 1455 | if ((addr_len == 0) || (addr_len > CONFIG_L2FILTER_ADDR_MAXLEN)) { |
1455 | 1456 | printf("error: given address is invalid\n"); |
|
0 commit comments