Changeset 5406 for source/ariba/utility/addressing
- Timestamp:
- Jul 29, 2009, 10:25:32 AM (15 years ago)
- Location:
- source/ariba/utility/addressing
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/utility/addressing/endpoint_set.hpp
r5284 r5406 247 247 /// checks whether two end-points are disjoint 248 248 /// (only check lower level addresses) 249 bool is_disjoint_to( const endpoint_set& set ) const {249 bool disjoint_to( const endpoint_set& set ) const { 250 250 scoped_lock lock(const_cast<boost::mutex&>(io_mutex)); 251 251 BOOST_FOREACH( const mac_address& mac, bluetooth ) … … 254 254 if (set.ip.count(ip_) !=0 ) return false; 255 255 return true; 256 } 257 258 bool intersects_with( const endpoint_set& set ) const { 259 return !disjoint_to(set); 260 } 261 262 bool is_subset_of( const endpoint_set& set ) const { 263 throw "Not implemented!"; 264 return false; 256 265 } 257 266 … … 387 396 this->tcp = rhs.tcp; 388 397 } 398 399 /// checks wheter the two endpoint sets are identical 400 bool operator== ( const endpoint_set& rhs ) const { 401 return (rhs.rfcomm == rfcomm && rhs.ip == ip && rhs.tcp == tcp && 402 rhs.bluetooth == bluetooth); 403 } 404 405 bool operator!= ( const endpoint_set& rhs ) const { 406 return !(*this==rhs); 407 } 389 408 }; 390 409 -
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.