Home
last modified time | relevance | path

Searched refs:csock (Results 1 – 16 of 16) sorted by relevance

/f-stack/tools/netstat/
H A Dnetgraph.c64 static int csock = -1; variable
86 if (csock == -1) in netgraphprotopr()
87 NgMkSockNode(NULL, &csock, NULL); in netgraphprotopr()
128 if (ngpcb.node_id == 0 || csock == -1) in netgraphprotopr()
131 if (NgSendMsg(csock, path, in netgraphprotopr()
134 if (NgRecvMsg(csock, resp, sizeof(rbuf), NULL) < 0) in netgraphprotopr()
/f-stack/tools/ngctl/
H A Dmsg.c92 if (NgSendAsciiMsg(csock, path, "%s%s", cmdstr, buf) < 0) { in MsgCmd()
106 FD_SET(csock, &rfds); in MsgCmd()
108 switch (select(csock + 1, &rfds, NULL, NULL, &tv)) { in MsgCmd()
137 if (NgAllocRecvMsg(csock, &m, path) < 0) { in MsgRead()
143 if (NgSendMsg(csock, path, NGM_GENERIC_COOKIE, in MsgRead()
145 || NgAllocRecvMsg(csock, &m2, NULL) < 0) { in MsgRead()
H A Dmain.c144 int csock, dsock; variable
146 int csock = -1, dsock = -1; variable
151 if (csock >= 0) { in close_ng_socks()
152 ng_close(csock); in close_ng_socks()
210 if (NgMkSockNode(name, &csock, &dsock) < 0)
282 const int maxfd = MAX(csock, dsock) + 1;
295 FD_SET(csock, &rfds);
401 const int maxfd = MAX(csock, dsock) + 1;
411 FD_SET(csock, &rfds);
423 FD_SET(csock, &rfds);
[all …]
H A Dconfig.c84 i = NgSendMsg(csock, path, NGM_GENERIC_COOKIE, in ConfigCmd()
87 i = NgSendMsg(csock, path, NGM_GENERIC_COOKIE, in ConfigCmd()
99 if (NgRecvMsg(csock, resp, sizeof(sbuf), NULL) < 0 in ConfigCmd()
H A Ddot.c108 if (NgSendMsg(csock, ".", NGM_GENERIC_COOKIE, NGM_LISTNODES, NULL, in DotCmd()
113 if (NgAllocRecvMsg(csock, &nlresp, NULL) < 0) { in DotCmd()
155 if (NgSendMsg(csock, path, NGM_GENERIC_COOKIE, NGM_LISTHOOKS, in DotCmd()
161 if (NgAllocRecvMsg(csock, &hlresp, NULL) < 0) { in DotCmd()
H A Dstatus.c78 if (NgSendMsg(csock, path, NGM_GENERIC_COOKIE, in StatusCmd()
89 if (NgRecvMsg(csock, resp, sizeof(sbuf), NULL) < 0 in StatusCmd()
H A Dtypes.c75 if (NgSendMsg(csock, ".", NGM_GENERIC_COOKIE, in TypesCmd()
80 if (NgAllocRecvMsg(csock, &resp, NULL) < 0) { in TypesCmd()
H A Dlist.c102 if (NgSendMsg(csock, ".", NGM_GENERIC_COOKIE, in ListCmd()
107 if (NgAllocRecvMsg(csock, &resp, NULL) < 0) { in ListCmd()
H A Dshow.c97 if (NgSendMsg(csock, path, NGM_GENERIC_COOKIE, in ShowCmd()
102 if (NgAllocRecvMsg(csock, &resp, NULL) < 0) { in ShowCmd()
H A Dshutdown.c71 if (NgSendMsg(csock, path, NGM_GENERIC_COOKIE, in ShutdownCmd()
H A Dname.c74 if (NgSendMsg(csock, path, NGM_GENERIC_COOKIE, in NameCmd()
H A Drmhook.c79 if (NgSendMsg(csock, path, NGM_GENERIC_COOKIE, in RmHookCmd()
H A Dmkpeer.c83 if (NgSendMsg(csock, path, NGM_GENERIC_COOKIE, in MkPeerCmd()
H A Dconnect.c83 if (NgSendMsg(csock, path, NGM_GENERIC_COOKIE, in ConnectCmd()
H A Dngctl.h83 extern int csock, dsock;
/f-stack/tools/libnetgraph/
H A Ddebug.c238 int arglen, csock = -1; in _NgDebugMsg() local
259 if (NgMkSockNode(NULL, &csock, NULL) < 0) in _NgDebugMsg()
273 if (NgSendMsg(csock, path, NGM_GENERIC_COOKIE, in _NgDebugMsg()
278 if (NgRecvMsg(csock, req, sizeof(buf), NULL) < 0) { in _NgDebugMsg()
300 if (csock != -1) in _NgDebugMsg()
301 (void)close(csock); in _NgDebugMsg()