--- a/src/devices/wifi/ssid.cc Sun Mar 02 01:18:07 2008 +0100
+++ b/src/devices/wifi/ssid.cc Sun Mar 02 01:53:06 2008 +0100
@@ -136,6 +136,8 @@
return i;
}
+VALUE_HELPER_CPP (Ssid);
+
std::ostream &
operator << (std::ostream &os, const Ssid &ssid)
{
@@ -143,5 +145,13 @@
return os;
}
+std::istream &operator >> (std::istream &is, Ssid &ssid)
+{
+ std::string str;
+ is >> str;
+ ssid = Ssid (str.c_str ());
+ return is;
+}
+
} // namespace ns3
--- a/src/devices/wifi/ssid.h Sun Mar 02 01:18:07 2008 +0100
+++ b/src/devices/wifi/ssid.h Sun Mar 02 01:53:06 2008 +0100
@@ -22,6 +22,7 @@
#include <stdint.h>
#include "ns3/buffer.h"
+#include "ns3/attribute-helper.h"
namespace ns3 {
@@ -43,12 +44,17 @@
uint32_t GetSerializedSize (void) const;
Buffer::Iterator Serialize (Buffer::Iterator i) const;
Buffer::Iterator Deserialize (Buffer::Iterator i);
+
+ VALUE_HELPER_HEADER_1 (Ssid);
private:
uint8_t m_ssid[33];
uint8_t m_length;
};
std::ostream &operator << (std::ostream &os, const Ssid &ssid);
+std::istream &operator >> (std::istream &is, Ssid &ssid);
+
+VALUE_HELPER_HEADER_2 (Ssid);
} // namespace ns3