1 #ifndef TEST_LINUX_TIPC_COMMON_HPP_
2 #define TEST_LINUX_TIPC_COMMON_HPP_
4 #include <posixx/linux/tipc.hpp> // posixx::linux::tipc
5 #include <ostream> // std::ostream
12 std::ostream& operator << (std::ostream& os,
13 const posixx::linux::tipc::sockaddr& sa) throw()
15 using posixx::linux::tipc::sockaddr;
16 os << "tipc::sockaddr(scope=" << unsigned(sa.scope) << ", ";
20 os << "id(ref=" << sa.addr.id.ref
21 << ", node=" << sa.addr.id.node << ")";
24 os << "name(type=" << sa.addr.name.name.type
25 << ", instance=" << sa.addr.name.name.instance
26 << ", domain=" << sa.addr.name.domain << ")";
28 case sockaddr::NAMESEQ:
29 os << "nameseq(type=" << sa.addr.nameseq.type
30 << ", lower=" << sa.addr.nameseq.lower
31 << ", upper=" << sa.addr.nameseq.upper << ")";
39 // no need to clean addresses
40 #define clean_test_address(socket, addr)
42 static posixx::linux::tipc::sockaddr test_address1(
43 posixx::linux::tipc::name(PTYPE, INST1));
44 static posixx::linux::tipc::sockaddr test_address2(
45 posixx::linux::tipc::name(PTYPE, INST2));
47 #endif // TEST_LINUX_TIPC_COMMON_HPP_