Lines Matching +full:cs +full:- +full:3
1 /*-
2 * SPDX-License-Identifier: BSD-3-Clause
16 * 3. Neither the name of the copyright holder nor the names of its
34 #include <atf-c.h>
45 static int cs = -1, ds = -1; variable
80 CHECK(, -1 != NgSendMsg(cs, path1, in _ng_connect()
96 CHECK(, -1 != NgSendMsg(cs, path1, in _ng_mkpeer()
109 CHECK(, -1 != NgSendMsg(cs, path, in _ng_rmhook()
122 CHECK(, -1 != NgSendMsg(cs, path, in _ng_name()
131 CHECK(, -1 != NgSendMsg(cs, path, in _ng_shutdown()
142 ATF_REQUIRE(NULL != (p->hook = strdup(hook))); in ng_register_data()
143 ATF_REQUIRE(NULL != (p->handler = proc)); in ng_register_data()
152 CHECK(, -1 != NgSendData(ds, hook, data, len)); in _ng_send_data()
167 ATF_REQUIRE(-1 != NgAllocRecvMsg(cs, &m, path)); in handle_msg()
186 if (0 == strcmp(hnd->hook, hook)) in handle_data()
191 (*(hnd->handler)) (data, len, ctx); in handle_data()
200 int maxfd = (ds < cs) ? cs : ds; in ng_handle_event()
204 FD_SET(cs, &fds); in ng_handle_event()
209 case -1: in ng_handle_event()
215 if (FD_ISSET(cs, &fds)) in ng_handle_event()
236 CHECK(-1, -1 != (res = NgSendAsciiMsg(cs, path, "%s", msg))); in _ng_send_msg()
252 if (cs >= 0) /* prevent reinit */ in _ng_init()
255 CHECK(, 0 == NgMkSockNode(NULL, &cs, &ds)); in _ng_init()
256 NgSetDebug(3); in _ng_init()
271 GD(3)