Home
last modified time | relevance | path

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

/freebsd-9-stable/usr.sbin/ngctl/
Dmsg.c92 if (NgSendAsciiMsg(csock, path, "%s%s", cmdstr, buf) < 0) { in MsgCmd()
105 FD_SET(csock, &rfds); in MsgCmd()
107 switch (select(csock + 1, &rfds, NULL, NULL, &tv)) { in MsgCmd()
133 if (NgAllocRecvMsg(csock, &m, path) < 0) { in MsgRead()
139 if (NgSendMsg(csock, path, NGM_GENERIC_COOKIE, in MsgRead()
141 || NgAllocRecvMsg(csock, &m2, NULL) < 0) { in MsgRead()
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()
Dmain.c135 int csock, dsock; variable
176 if (NgMkSockNode(name, &csock, &dsock) < 0) in main()
244 const int maxfd = MAX(csock, dsock) + 1; in Monitor()
257 FD_SET(csock, &rfds); in Monitor()
348 const int maxfd = MAX(csock, dsock) + 1; in DoInteractive()
357 FD_SET(csock, &rfds); in DoInteractive()
367 FD_SET(csock, &rfds); in DoInteractive()
402 if (FD_ISSET(csock, rfds)) in ReadSockets()
Ddot.c101 if (NgSendMsg(csock, ".", NGM_GENERIC_COOKIE, NGM_LISTNODES, NULL, in DotCmd()
106 if (NgAllocRecvMsg(csock, &nlresp, NULL) < 0) { in DotCmd()
143 if (NgSendMsg(csock, path, NGM_GENERIC_COOKIE, NGM_LISTHOOKS, in DotCmd()
149 if (NgAllocRecvMsg(csock, &hlresp, NULL) < 0) { in DotCmd()
Dstatus.c78 if (NgSendMsg(csock, path, NGM_GENERIC_COOKIE, in StatusCmd()
89 if (NgRecvMsg(csock, resp, sizeof(sbuf), NULL) < 0 in StatusCmd()
Dtypes.c75 if (NgSendMsg(csock, ".", NGM_GENERIC_COOKIE, in TypesCmd()
80 if (NgAllocRecvMsg(csock, &resp, NULL) < 0) { in TypesCmd()
Dlist.c102 if (NgSendMsg(csock, ".", NGM_GENERIC_COOKIE, in ListCmd()
107 if (NgAllocRecvMsg(csock, &resp, NULL) < 0) { in ListCmd()
Dshow.c97 if (NgSendMsg(csock, path, NGM_GENERIC_COOKIE, in ShowCmd()
102 if (NgAllocRecvMsg(csock, &resp, NULL) < 0) { in ShowCmd()
Dshutdown.c71 if (NgSendMsg(csock, path, NGM_GENERIC_COOKIE, in ShutdownCmd()
Drmhook.c79 if (NgSendMsg(csock, path, NGM_GENERIC_COOKIE, in RmHookCmd()
Dname.c74 if (NgSendMsg(csock, path, NGM_GENERIC_COOKIE, in NameCmd()
Dconnect.c83 if (NgSendMsg(csock, path, NGM_GENERIC_COOKIE, in ConnectCmd()
Dmkpeer.c83 if (NgSendMsg(csock, path, NGM_GENERIC_COOKIE, in MkPeerCmd()
Dngctl.h77 extern int csock, dsock;
/freebsd-9-stable/usr.bin/netstat/
Dnetgraph.c62 static int csock = -1; variable
129 if (csock == -1) in netgraphprotopr()
130 NgMkSockNode(NULL, &csock, NULL); in netgraphprotopr()
174 if (info.node_id == 0 || csock == -1) in netgraphprotopr()
177 if (NgSendMsg(csock, path, in netgraphprotopr()
180 if (NgRecvMsg(csock, resp, sizeof(rbuf), NULL) < 0) in netgraphprotopr()
/freebsd-9-stable/lib/libnetgraph/
Ddebug.c225 int arglen, csock = -1; in _NgDebugMsg() local
246 if (NgMkSockNode(NULL, &csock, NULL) < 0) in _NgDebugMsg()
260 if (NgSendMsg(csock, path, NGM_GENERIC_COOKIE, in _NgDebugMsg()
265 if (NgRecvMsg(csock, req, sizeof(buf), NULL) < 0) { in _NgDebugMsg()
287 if (csock != -1) in _NgDebugMsg()
288 (void)close(csock); in _NgDebugMsg()
/freebsd-9-stable/usr.sbin/nghook/
Dmain.c81 int csock, dsock; in main() local
153 if (NgMkSockNode(NULL, &csock, &dsock) < 0) in main()
161 if (NgSendMsg(csock, ".", in main()
173 send_msgs(csock, path); in main()
180 send_msgs(csock, path); in main()
/freebsd-9-stable/usr.sbin/bsnmpd/modules/snmp_netgraph/
Dsnmp_netgraph.c116 static int csock, dsock; variable
280 if ((ret = NgRecvMsg(csock, mesg, resbufsiz + 1, path)) < 0) { in csock_read()
325 return (NgSendMsg(csock, path, (int)cookie, (int)opcode, arg, arglen)); in ng_output()
386 if (setsockopt(csock, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv)) == -1) in ng_dialog()
408 if (setsockopt(csock, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv)) == -1) in ng_dialog()
616 return (NgSendMsg(csock, ".:", in ng_connect_node()
627 return (NgSendMsg(csock, ".:", in ng_connect_id()
643 return (NgSendMsg(csock, path, in ng_connect2_id()
663 return (NgSendMsg(csock, path, in ng_connect2_tee_id()
742 if (NgSendMsg(csock, path, NGM_GENERIC_COOKIE, NGM_MKPEER, in ng_mkpeer_id()
[all …]