23 #include <l4/re/namespace>
24 #include <l4/re/namespace-sys.h>
25 #include <l4/re/protocols>
27 #include <l4/util/util.h>
29 #include <l4/cxx/exceptions>
30 #include <l4/cxx/ipc_helper>
31 #include <l4/cxx/ipc_stream>
33 #include <l4/sys/err.h>
40 Namespace::_query(
char const *name,
unsigned len,
44 unsigned long res = len;
50 io << L4::Opcode(L4Re::Namespace_::Query)
59 bool const partly = err & Partly_resolved;
66 L4::Ipc::Snd_fpage cap;
68 if (cap.id_received())
70 *local_id = cap.data();
74 if (partly && iterate)
85 int timeout,
l4_umword_t *local_id,
bool iterate)
const throw()
95 ret = _query(name, len, target, local_id, iterate);
120 bool iterate)
const throw()
121 {
return query(name, strlen(name), target, timeout, local_id, iterate); }
125 unsigned flags)
const throw()
128 io << L4::Opcode(L4Re::Namespace_::Register)
129 << flags << L4::Ipc::Buf_cp_out<char const>(name, strlen(name));
131 io << L4::Ipc::Snd_fpage(o.fpage(L4_FPAGE_RWX & flags));
137 Namespace::unlink(
char const *name)
throw()
140 io << L4::Opcode(L4Re::Namespace_::Unlink)
147 Namespace::link(
char const *name,
unsigned len,
149 char const *src_name,
unsigned src_len,
150 unsigned flags)
throw()
153 io << L4::Opcode(L4Re::Namespace_::Link)
154 << flags << L4::Ipc::Buf_cp_out<char const>(name, len)
156 << L4::Ipc::Snd_fpage(src_dir.fpage());