diff options
author | Philippe Guibert <philippe.guibert@6wind.com> | 2017-02-09 08:42:32 +0100 |
---|---|---|
committer | Philippe Guibert <philippe.guibert@6wind.com> | 2017-02-14 13:59:00 +0100 |
commit | db42a173d67868b522b3a3a035372f582152b3c1 (patch) | |
tree | d488fce7f63a28f32cbc1ced2f41eae1d9c554d7 /lib/prefix.h | |
parent | bgpd: reflect mac handling change of apis to bgpd (diff) | |
download | frr-db42a173d67868b522b3a3a035372f582152b3c1.tar.xz frr-db42a173d67868b522b3a3a035372f582152b3c1.zip |
lib: simplify str2mac and use struct ethaddr structure
This commit simplified the string to mac conversion, since it uses
sscanf, instead of depicting each incoming character one by one, and
doing self analysis. Also,this commit changes the internal usage of the
mac address representation in mac handling function.
Signed-off-by: Lou Berger <lberger@labn.net>
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'lib/prefix.h')
-rw-r--r-- | lib/prefix.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/prefix.h b/lib/prefix.h index e384e0727..eb3ae3daf 100644 --- a/lib/prefix.h +++ b/lib/prefix.h @@ -327,8 +327,8 @@ extern void masklen2ip6 (const int, struct in6_addr *); extern const char *inet6_ntoa (struct in6_addr); -extern int prefix_str2mac(const char *str, char *mac); -extern char *prefix_mac2str(const char *mac, char *buf, int size); +extern int prefix_str2mac(const char *str, struct ethaddr *mac); +extern char *prefix_mac2str(const struct ethaddr *mac, char *buf, int size); static inline int ipv6_martian (struct in6_addr *addr) { |