Lines Matching refs:cs
56 static int NgDeliverMsg(int cs, const char *path,
65 NgSendMsg(int cs, const char *path, in NgSendMsg() argument
80 if (NgDeliverMsg(cs, path, &msg, args, arglen) < 0) in NgSendMsg()
90 NgSendAsciiMsg(int cs, const char *path, const char *fmt, ...) in NgSendAsciiMsg() argument
130 if (NgSendMsg(cs, path, NGM_GENERIC_COOKIE, NGM_ASCII2BINARY, in NgSendAsciiMsg()
138 if (NgAllocRecvMsg(cs, &reply, NULL) < 0) in NgSendAsciiMsg()
145 if (NgDeliverMsg(cs, in NgSendAsciiMsg()
160 NgSendReplyMsg(int cs, const char *path, in NgSendReplyMsg() argument
170 return (NgDeliverMsg(cs, path, &rep, args, arglen)); in NgSendReplyMsg()
178 NgDeliverMsg(int cs, const char *path, in NgDeliverMsg() argument
222 if (sendto(cs, msg, sizeof(*msg) + arglen, in NgDeliverMsg()
236 rfds.fd = cs; in NgDeliverMsg()
262 NgRecvMsg(int cs, struct ng_mesg *rep, size_t replen, char *path) in NgRecvMsg() argument
270 len = recvfrom(cs, rep, replen, 0, (struct sockaddr *) sg, &sglen); in NgRecvMsg()
300 NgAllocRecvMsg(int cs, struct ng_mesg **rep, char *path) in NgAllocRecvMsg() argument
306 if (getsockopt(cs, SOL_SOCKET, SO_RCVBUF, &len, &optlen) == -1 || in NgAllocRecvMsg()
309 if ((len = NgRecvMsg(cs, *rep, len, path)) < 0) in NgAllocRecvMsg()
318 NgRecvAsciiMsg(int cs, struct ng_mesg *reply, size_t replen, char *path) in NgRecvAsciiMsg() argument
332 if (NgRecvMsg(cs, msg, bufSize, path) < 0) in NgRecvAsciiMsg()
337 if (NgSendMsg(cs, path, NGM_GENERIC_COOKIE, in NgRecvAsciiMsg()
340 if (NgRecvMsg(cs, msg, bufSize, NULL) < 0) in NgRecvAsciiMsg()
363 NgAllocRecvAsciiMsg(int cs, struct ng_mesg **reply, char *path) in NgAllocRecvAsciiMsg() argument
369 if (getsockopt(cs, SOL_SOCKET, SO_RCVBUF, &len, &optlen) == -1 || in NgAllocRecvAsciiMsg()
372 if ((len = NgRecvAsciiMsg(cs, *reply, len, path)) < 0) in NgAllocRecvAsciiMsg()