summaryrefslogtreecommitdiff
path: root/examples/l3fwd-acl
diff options
context:
space:
mode:
authorCunming Liang <cunming.liang@intel.com>2014-11-12 14:24:32 +0800
committerThomas Monjalon <thomas.monjalon@6wind.com>2014-11-13 00:48:16 +0100
commitec3d82db2dc13d3b96b7d97801d85dcbaaa1d1cb (patch)
treef6f83d4f8bd2d1190349dc95586bf01db446d71d /examples/l3fwd-acl
parent90924caf0831906ceac6b450048fd822659e22d3 (diff)
downloaddpdk-ec3d82db2dc13d3b96b7d97801d85dcbaaa1d1cb.zip
dpdk-ec3d82db2dc13d3b96b7d97801d85dcbaaa1d1cb.tar.gz
dpdk-ec3d82db2dc13d3b96b7d97801d85dcbaaa1d1cb.tar.xz
ether: new function to format mac address
Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Diffstat (limited to 'examples/l3fwd-acl')
-rw-r--r--examples/l3fwd-acl/main.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/examples/l3fwd-acl/main.c b/examples/l3fwd-acl/main.c
index e31a7d7..f12e5bb 100644
--- a/examples/l3fwd-acl/main.c
+++ b/examples/l3fwd-acl/main.c
@@ -1820,13 +1820,9 @@ parse_args(int argc, char **argv)
static void
print_ethaddr(const char *name, const struct ether_addr *eth_addr)
{
- printf("%s%02X:%02X:%02X:%02X:%02X:%02X", name,
- eth_addr->addr_bytes[0],
- eth_addr->addr_bytes[1],
- eth_addr->addr_bytes[2],
- eth_addr->addr_bytes[3],
- eth_addr->addr_bytes[4],
- eth_addr->addr_bytes[5]);
+ char buf[ETHER_ADDR_FMT_SIZE];
+ ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, eth_addr);
+ printf("%s%s", name, buf);
}
static int