Lines Matching refs:cs
82 static int NgDeliverMsg(int cs, const char *path,
91 NgSendMsg(int cs, const char *path, in NgSendMsg() argument
106 if (NgDeliverMsg(cs, path, &msg, args, arglen) < 0) in NgSendMsg()
116 NgSendAsciiMsg(int cs, const char *path, const char *fmt, ...) in NgSendAsciiMsg() argument
156 if (NgSendMsg(cs, path, NGM_GENERIC_COOKIE, NGM_ASCII2BINARY, in NgSendAsciiMsg()
164 if (NgAllocRecvMsg(cs, &reply, NULL) < 0) in NgSendAsciiMsg()
171 if (NgDeliverMsg(cs, in NgSendAsciiMsg()
186 NgSendReplyMsg(int cs, const char *path, in NgSendReplyMsg() argument
196 return (NgDeliverMsg(cs, path, &rep, args, arglen)); in NgSendReplyMsg()
204 NgDeliverMsg(int cs, const char *path, in NgDeliverMsg() argument
248 if (sendto(cs, msg, sizeof(*msg) + arglen, in NgDeliverMsg()
263 rfds.fd = cs; in NgDeliverMsg()
290 NgRecvMsg(int cs, struct ng_mesg *rep, size_t replen, char *path) in NgRecvMsg() argument
298 len = recvfrom(cs, rep, replen, 0, (struct sockaddr *) sg, &sglen); in NgRecvMsg()
328 NgAllocRecvMsg(int cs, struct ng_mesg **rep, char *path) in NgAllocRecvMsg() argument
335 if (getsockopt(cs, SOL_SOCKET, SO_RCVBUF, &len, &optlen) == -1 || in NgAllocRecvMsg()
342 if ((len = NgRecvMsg(cs, *rep, len, path)) < 0) in NgAllocRecvMsg()
351 NgRecvAsciiMsg(int cs, struct ng_mesg *reply, size_t replen, char *path) in NgRecvAsciiMsg() argument
365 if (NgRecvMsg(cs, msg, bufSize, path) < 0) in NgRecvAsciiMsg()
370 if (NgSendMsg(cs, path, NGM_GENERIC_COOKIE, in NgRecvAsciiMsg()
373 if (NgRecvMsg(cs, msg, bufSize, NULL) < 0) in NgRecvAsciiMsg()
396 NgAllocRecvAsciiMsg(int cs, struct ng_mesg **reply, char *path) in NgAllocRecvAsciiMsg() argument
403 if (getsockopt(cs, SOL_SOCKET, SO_RCVBUF, &len, &optlen) == -1 || in NgAllocRecvAsciiMsg()
410 if ((len = NgRecvAsciiMsg(cs, *reply, len, path)) < 0) in NgAllocRecvAsciiMsg()