face: change default separator for ethernet::Address::toString() to ':'
Change-Id: I4c8d2e90bd0279cc6221ec58790de19d656f4ca3
diff --git a/daemon/face/ethernet-face.cpp b/daemon/face/ethernet-face.cpp
index 5f12103..02cc041 100644
--- a/daemon/face/ethernet-face.cpp
+++ b/daemon/face/ethernet-face.cpp
@@ -70,8 +70,8 @@
::snprintf(filter, sizeof(filter),
"(ether proto 0x%x) && (ether dst %s) && (not ether src %s)",
ETHERTYPE_NDN,
- m_destAddress.toString(':').c_str(),
- m_srcAddress.toString(':').c_str());
+ m_destAddress.toString().c_str(),
+ m_srcAddress.toString().c_str());
setPacketFilter(filter);
m_socket->async_read_some(boost::asio::null_buffers(),
diff --git a/daemon/face/ethernet.hpp b/daemon/face/ethernet.hpp
index a9b640d..b21f509 100644
--- a/daemon/face/ethernet.hpp
+++ b/daemon/face/ethernet.hpp
@@ -46,7 +46,7 @@
class Address : public boost::array<uint8_t, ADDR_LEN>
{
public:
- /// Constructs a null Ethernet address (00-00-00-00-00-00)
+ /// Constructs a null Ethernet address (00:00:00:00:00:00)
Address();
/// Constructs a new Ethernet address with the given octets
@@ -60,7 +60,7 @@
/// Copy constructor
Address(const Address& address);
- /// True if this is a broadcast address (FF-FF-FF-FF-FF-FF)
+ /// True if this is a broadcast address (ff:ff:ff:ff:ff:ff)
bool
isBroadcast() const;
@@ -68,7 +68,7 @@
bool
isMulticast() const;
- /// True if this is a null address (00-00-00-00-00-00)
+ /// True if this is a null address (00:00:00:00:00:00)
bool
isNull() const;
@@ -76,14 +76,14 @@
* @brief Converts the address to a human-readable string
*
* @param sep A character used to visually separate the octets,
- * usually a dash (the default value) or a colon
+ * usually ':' (the default value) or '-'
*/
std::string
- toString(char sep = '-') const;
+ toString(char sep = ':') const;
/**
* @brief Creates an Address from a string containing an Ethernet address
- * in hexadecimal notation, with colons or dashes as separators
+ * in hexadecimal notation, with colons or hyphens as separators
*
* @param str The string to be parsed
* @return Always an instance of Address, which will be null
@@ -93,7 +93,7 @@
fromString(const std::string& str);
};
-/// Returns the Ethernet broadcast address (FF-FF-FF-FF-FF-FF)
+/// Returns the Ethernet broadcast address (ff:ff:ff:ff:ff:ff)
inline Address
getBroadcastAddress()
{