diff options
| author | Philippe Guibert <philippe.guibert@6wind.com> | 2017-02-01 18:41:38 +0100 |
|---|---|---|
| committer | Philippe Guibert <philippe.guibert@6wind.com> | 2017-02-14 13:58:59 +0100 |
| commit | b2bc8e2331ad67f282d423c17204a27f6b69525a (patch) | |
| tree | 7a1695d2d09b90566d39de1317ebc5f618345945 | |
| parent | 0362b0a7ec8bdd58cea755d97972c2f2ae4a9bbf (diff) | |
bgpd: use mac2str() function utility to display mac address
VNC uses the prefix API to handle mac string.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
| -rw-r--r-- | bgpd/rfapi/rfapi_vty.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/bgpd/rfapi/rfapi_vty.c b/bgpd/rfapi/rfapi_vty.c index dbc2a430bc..997f1d3c34 100644 --- a/bgpd/rfapi/rfapi_vty.c +++ b/bgpd/rfapi/rfapi_vty.c @@ -314,19 +314,7 @@ rfapiL2o2Qprefix (struct rfapi_l2address_option *l2o, struct prefix *pfx) char * rfapiEthAddr2Str (const struct ethaddr *ea, char *buf, int bufsize) { - int i; - char *p = buf; - - assert (bufsize > (3 * ETHER_ADDR_LEN)); - - for (i = 0; i <= ETHER_ADDR_LEN; ++i) - { - sprintf (p, "%02x", ea->octet[i]); - if (i < (ETHER_ADDR_LEN - 1)) - *(p + 2) = ':'; - p += 3; - } - return buf; + return mac2str (ea->octet, buf, bufsize); } int |
