]> git.llucax.com Git - software/posixx.git/blobdiff - test/linux/tipc/common.hpp
Update Makeit.mak
[software/posixx.git] / test / linux / tipc / common.hpp
index 81cf51eaaae1aa30d01b47a4a724ecf805289f60..261966382c70a47c7784006df5288d66d0f72dd2 100644 (file)
@@ -2,40 +2,12 @@
 #define TEST_LINUX_TIPC_COMMON_HPP_
 
 #include <posixx/linux/tipc.hpp> // posixx::linux::tipc
-#include <ostream> // std::ostream
+#include <posixx/linux/tipc/print.hpp> // address output formatting
 
 #define PTYPE 10000
 #define INST1 10001
 #define INST2 10002
 
-static inline
-std::ostream& operator << (std::ostream& os,
-               const posixx::linux::tipc::sockaddr& sa) throw()
-{
-       using posixx::linux::tipc::sockaddr;
-       os << "tipc::sockaddr(scope=" << unsigned(sa.scope) << ", ";
-       switch (sa.type())
-       {
-       case sockaddr::ID:
-               os << "id(ref=" << sa.addr.id.ref
-                               << ", node=" << sa.addr.id.node << ")";
-               break;
-       case sockaddr::NAME:
-               os << "name(type=" << sa.addr.name.name.type
-                               << ", instance=" << sa.addr.name.name.instance
-                               << ", domain=" << sa.addr.name.domain << ")";
-               break;
-       case sockaddr::NAMESEQ:
-               os << "nameseq(type=" << sa.addr.nameseq.type
-                               << ", lower=" << sa.addr.nameseq.lower
-                               << ", upper=" << sa.addr.nameseq.upper << ")";
-               break;
-       default:
-               os << "UNKNOWN!";
-       }
-       return os << ")";
-}
-
 // no need to clean addresses
 #define clean_test_address(socket, addr)