Skip to contentSkip to conversation

interface: use hexadecimal for print extended addr

PATCH In review Alexander Aring 4 participants 6 messages May 7, 2015 – May 8, 2015 IEEE 802.15.4

lore
Share & tools
lore

Alexander Aring

author maintainer
#0 lore raw

PATCH v2 1/1 interface: use hexadecimal for print extended addr

This patch prints the extended addr in hexadecimal value. This is what the "0x...." prefix suggested.

---
changes since v2:
- s/inteface/interface/
- can't remove the v we are already at v2

 src/interface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/interface.c +1 -1
index 5e0ef89..e501763 100644
@@ -203,7 +203,7 @@ static int print_iface_handler(struct nl_msg *msg, void *arg)
 		printf("%s\twpan_dev 0x%llx\n", indent,
 		       (unsigned long long)nla_get_u64(tb_msg[NL802154_ATTR_WPAN_DEV]));
 	if (tb_msg[NL802154_ATTR_EXTENDED_ADDR])
-		printf("%s\textended_addr 0x%016" PRIu64 "\n", indent,
+		printf("%s\textended_addr 0x%016" PRIx64 "\n", indent,
 		       le64toh(nla_get_u64(tb_msg[NL802154_ATTR_EXTENDED_ADDR])));
 	if (tb_msg[NL802154_ATTR_SHORT_ADDR])
 		printf("%s\tshort_addr 0x%04x\n", indent,
Signature · 1 line
2.3.7
#1 lore raw
Quoted 9 lines · Alexander Aring

This patch prints the extended addr in hexadecimal value. This is what the "0x...." prefix suggested.

---
changes since v2:
- s/inteface/interface/
- can't remove the v we are already at v2

Nice. Reviewed-by: Varka Bhadram <[email protected]>

Quoted 16 lines
 src/interface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/interface.c +1 -1
index 5e0ef89..e501763 100644
@@ -203,7 +203,7 @@ static int print_iface_handler(struct nl_msg *msg, void *arg)
 		printf("%s\twpan_dev 0x%llx\n", indent,
 		       (unsigned long long)nla_get_u64(tb_msg[NL802154_ATTR_WPAN_DEV]));
 	if (tb_msg[NL802154_ATTR_EXTENDED_ADDR])
-		printf("%s\textended_addr 0x%016" PRIu64 "\n", indent,
+		printf("%s\textended_addr 0x%016" PRIx64 "\n", indent,
 		       le64toh(nla_get_u64(tb_msg[NL802154_ATTR_EXTENDED_ADDR])));
 	if (tb_msg[NL802154_ATTR_SHORT_ADDR])
 		printf("%s\tshort_addr 0x%04x\n", indent,
Signature · 1 line
Varka Bhadram
#2 lore raw
In reply to Alexander Aring
Quoted 18 lines · Alexander Aring

This patch prints the extended addr in hexadecimal value. This is what the "0x...." prefix suggested.

---
changes since v2:
- s/inteface/interface/
- can't remove the v we are already at v2

 src/interface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/interface.c +0 -0
index 5e0ef89..e501763 100644

src/interface.c static int print_iface_handler(struct nl_msg *msg, void *arg) · line 206

Quoted 5 lines
src/interface.c +1 -1
@@ -203,7 +203,7 @@ static int print_iface_handler(struct nl_msg *msg, void *arg)
 		printf("%s\twpan_dev 0x%llx\n", indent,
 		       (unsigned long long)nla_get_u64(tb_msg[NL802154_ATTR_WPAN_DEV]));
 	if (tb_msg[NL802154_ATTR_EXTENDED_ADDR])
-		printf("%s\textended_addr 0x%016" PRIu64 "\n", indent,
+		printf("%s\textended_addr 0x%016" PRIx64 "\n", indent,

ACK.
-- Guido

author maintainer Acked-by name of the great person which acked
#3 lore raw
Quoted 14 lines · Guido Günther
Quoted 13 lines · Alexander Aring

This patch prints the extended addr in hexadecimal value. This is what the "0x...." prefix suggested.

---
changes since v2:
- s/inteface/interface/
- can't remove the v we are already at v2

 src/interface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 12 lines

src/interface.c static int print_iface_handler(struct nl_msg *msg, void *arg) · line 206

Quoted 10 lines
src/interface.c +1 -1
index 5e0ef89..e501763 100644
@@ -203,7 +203,7 @@ static int print_iface_handler(struct nl_msg *msg, void *arg)
 		printf("%s\twpan_dev 0x%llx\n", indent,
 		       (unsigned long long)nla_get_u64(tb_msg[NL802154_ATTR_WPAN_DEV]));
 	if (tb_msg[NL802154_ATTR_EXTENDED_ADDR])
-		printf("%s\textended_addr 0x%016" PRIu64 "\n", indent,
+		printf("%s\textended_addr 0x%016" PRIx64 "\n", indent,

ACK.

Please answer with:

Acked-by name of the great person which acked <mail of great person>

then I can take it into the git log.

- Alex

#4 lore raw
Quoted 28 lines · Alexander Aring
Quoted 14 lines · Guido Günther
Quoted 13 lines · Alexander Aring

This patch prints the extended addr in hexadecimal value. This is what the "0x...." prefix suggested.

---
changes since v2:
- s/inteface/interface/
- can't remove the v we are already at v2

 src/interface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 12 lines

src/interface.c static int print_iface_handler(struct nl_msg *msg, void *arg) · line 206

Quoted 10 lines
src/interface.c +1 -1
index 5e0ef89..e501763 100644
@@ -203,7 +203,7 @@ static int print_iface_handler(struct nl_msg *msg, void *arg)
 		printf("%s\twpan_dev 0x%llx\n", indent,
 		       (unsigned long long)nla_get_u64(tb_msg[NL802154_ATTR_WPAN_DEV]));
 	if (tb_msg[NL802154_ATTR_EXTENDED_ADDR])
-		printf("%s\textended_addr 0x%016" PRIu64 "\n", indent,
+		printf("%s\textended_addr 0x%016" PRIx64 "\n", indent,

ACK.

Quoted 5 lines

Please answer with:

Acked-by name of the great person which acked <mail of great person>

then I can take it into the git log.

Although I'm certainly not a great person by any means:

Cheers,
-- Guido

Tested-by on v2 1/1
#5 lore raw
In reply to Alexander Aring

iwpan dev
phy#2

        Interface wpan2
                ifindex 12
                wpan_dev 0x200000002
                extended_addr 0x00039a000002012c
                short_addr 0xffff
                pan_id 0xffff
                type node
                max_frame_retries 4
                min_be 4
                max_be 9
                max_csma_backoffs 8
                lbt 0
phy#1
        Interface wpan1
                ifindex 9
                wpan_dev 0x100000002
                extended_addr 0x00039a000001012c
                short_addr 0x012c
                pan_id 0x0700
                type node
                max_frame_retries 4
                min_be 4
                max_be 9
                max_csma_backoffs 8
                lbt 0
phy#0
        Interface wpan0
                ifindex 6
                wpan_dev 0x2
                extended_addr 0x00039a000000012c
                short_addr 0x012c
                pan_id 0x0777
                type node
                max_frame_retries 4
                min_be 4
                max_be 9
                max_csma_backoffs 8
                lbt 0
Quoted 26 lines · Alexander Aring

This patch prints the extended addr in hexadecimal value. This is what the "0x...." prefix suggested.

---
changes since v2:
- s/inteface/interface/
- can't remove the v we are already at v2

 src/interface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/interface.c +1 -1
index 5e0ef89..e501763 100644
@@ -203,7 +203,7 @@ static int print_iface_handler(struct nl_msg *msg, void *arg)
 		printf("%s\twpan_dev 0x%llx\n", indent,
 		       (unsigned long long)nla_get_u64(tb_msg[NL802154_ATTR_WPAN_DEV]));
 	if (tb_msg[NL802154_ATTR_EXTENDED_ADDR])
-		printf("%s\textended_addr 0x%016" PRIu64 "\n", indent,
+		printf("%s\textended_addr 0x%016" PRIx64 "\n", indent,
 		       le64toh(nla_get_u64(tb_msg[NL802154_ATTR_EXTENDED_ADDR])));
 	if (tb_msg[NL802154_ATTR_SHORT_ADDR])
 		printf("%s\tshort_addr 0x%04x\n", indent,