X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest-pmd%2Ficmpecho.c;fp=app%2Ftest-pmd%2Ficmpecho.c;h=774924e072ed7f5d7bba8cc53550b2deeb86b3b5;hb=ec3d82db2dc13d3b96b7d97801d85dcbaaa1d1cb;hp=7fd4b6df4f79ce6b62ba40a1da01721d10036baa;hpb=90924caf0831906ceac6b450048fd822659e22d3;p=dpdk.git diff --git a/app/test-pmd/icmpecho.c b/app/test-pmd/icmpecho.c index 7fd4b6df4f..774924e072 100644 --- a/app/test-pmd/icmpecho.c +++ b/app/test-pmd/icmpecho.c @@ -235,18 +235,6 @@ ip_proto_name(uint8_t ip_proto) return "UNASSIGNED"; } -static void -ether_addr_to_hexa(const struct ether_addr *ea, char *buf) -{ - sprintf(buf, "%02x:%02x:%02x:%02x:%02x:%02x", - ea->addr_bytes[0], - ea->addr_bytes[1], - ea->addr_bytes[2], - ea->addr_bytes[3], - ea->addr_bytes[4], - ea->addr_bytes[5]); -} - static void ipv4_addr_to_dot(uint32_t be_ipv4_addr, char *buf) { @@ -261,9 +249,9 @@ ipv4_addr_to_dot(uint32_t be_ipv4_addr, char *buf) static void ether_addr_dump(const char *what, const struct ether_addr *ea) { - char buf[18]; + char buf[ETHER_ADDR_FMT_SIZE]; - ether_addr_to_hexa(ea, buf); + ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, ea); if (what) printf("%s", what); printf("%s", buf);