diff options
Diffstat (limited to 'host/include/uhd/device_addr.hpp')
-rw-r--r-- | host/include/uhd/device_addr.hpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/host/include/uhd/device_addr.hpp b/host/include/uhd/device_addr.hpp index 8ea580321..7673faff0 100644 --- a/host/include/uhd/device_addr.hpp +++ b/host/include/uhd/device_addr.hpp @@ -18,11 +18,11 @@ #ifndef INCLUDED_UHD_DEVICE_ADDR_HPP #define INCLUDED_UHD_DEVICE_ADDR_HPP +#include <uhd/config.hpp> #include <uhd/dict.hpp> +#include <boost/cstdint.hpp> #include <string> #include <iostream> -#include <netinet/ether.h> -#include <stdint.h> #include <vector> namespace uhd{ @@ -31,8 +31,8 @@ namespace uhd{ * Wrapper for an ethernet mac address. * Provides conversion between string and binary formats. */ - struct mac_addr_t{ - struct ether_addr mac_addr; + struct UHD_API mac_addr_t{ + boost::uint8_t mac_addr[6]; mac_addr_t(const std::string &mac_addr_str = "00:00:00:00:00:00"); std::string to_string(void) const; }; @@ -56,12 +56,14 @@ namespace uhd{ * \param device_addr a device address instance * \return the string representation */ - std::string device_addr_to_string(const device_addr_t &device_addr); + namespace device_addr{ + UHD_API std::string to_string(const device_addr_t &device_addr); + } } //namespace uhd //ability to use types with stream operators -std::ostream& operator<<(std::ostream &, const uhd::device_addr_t &); -std::ostream& operator<<(std::ostream &, const uhd::mac_addr_t &); +UHD_API std::ostream& operator<<(std::ostream &, const uhd::device_addr_t &); +UHD_API std::ostream& operator<<(std::ostream &, const uhd::mac_addr_t &); #endif /* INCLUDED_UHD_DEVICE_ADDR_HPP */ |