Changeset 5406 for source/ariba/utility/addressing/ip_address.hpp
- Timestamp:
- Jul 29, 2009, 10:25:32 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/utility/addressing/ip_address.hpp
r5284 r5406 128 128 //--- address info -------------------------------------------------------- 129 129 130 const std::string& type_name() const{130 static const std::string& type_name() { 131 131 return type_name_ip; 132 132 } 133 133 134 const uint16_t type_id() const{134 static const uint16_t type_id() { 135 135 return 0x81DD; 136 136 } … … 148 148 } 149 149 150 bool is_link_local() const { 151 if (addr.is_v4()) return false; 152 return addr.to_v6().is_link_local(); 153 } 154 155 bool is_multicast_link_local() const { 156 if (addr.is_v4()) return false; 157 return addr.to_v6().is_multicast_link_local(); 158 159 } 160 161 bool is_multicast_node_local() const { 162 if (addr.is_v4()) return false; 163 return addr.to_v6().is_multicast_node_local(); 164 } 165 166 167 bool is_multicast_site_local() const { 168 if (addr.is_v4()) return false; 169 return addr.to_v6().is_multicast_site_local(); 170 } 171 150 172 bool is_any() const { 151 173 if (addr.is_v4()) return addr.to_v4() == address_v4::any(); … … 153 175 } 154 176 177 bool is_v4_compatible() const { 178 if (addr.is_v4()) return true; 179 return addr.to_v6().is_v4_compatible(); 180 } 181 182 bool is_v4_mapped() { 183 if (addr.is_v4()) return true; 184 return addr.to_v6().is_v4_mapped(); 185 } 186 155 187 bool is_v4() const { 156 188 return addr.is_v4(); … … 176 208 namespace boost { 177 209 210 // boost hash function 178 211 template<> 179 212 struct hash<ariba::addressing::ip_address>: public std::unary_function<ariba::addressing::ip_address, std::size_t> {
Note:
See TracChangeset
for help on using the changeset viewer.