Lines Matching refs:cs
55 static int NgDeliverMsg(int cs, const char *path,
64 NgSendMsg(int cs, const char *path, in NgSendMsg() argument
79 if (NgDeliverMsg(cs, path, &msg, args, arglen) < 0) in NgSendMsg()
89 NgSendAsciiMsg(int cs, const char *path, const char *fmt, ...) in NgSendAsciiMsg() argument
129 if (NgSendMsg(cs, path, NGM_GENERIC_COOKIE, NGM_ASCII2BINARY, in NgSendAsciiMsg()
137 if (NgAllocRecvMsg(cs, &reply, NULL) < 0) in NgSendAsciiMsg()
144 if (NgDeliverMsg(cs, in NgSendAsciiMsg()
159 NgSendReplyMsg(int cs, const char *path, in NgSendReplyMsg() argument
169 return (NgDeliverMsg(cs, path, &rep, args, arglen)); in NgSendReplyMsg()
177 NgDeliverMsg(int cs, const char *path, in NgDeliverMsg() argument
221 if (sendto(cs, msg, sizeof(*msg) + arglen, in NgDeliverMsg()
235 rfds.fd = cs; in NgDeliverMsg()
261 NgRecvMsg(int cs, struct ng_mesg *rep, size_t replen, char *path) in NgRecvMsg() argument
269 len = recvfrom(cs, rep, replen, 0, (struct sockaddr *) sg, &sglen); in NgRecvMsg()
299 NgAllocRecvMsg(int cs, struct ng_mesg **rep, char *path) in NgAllocRecvMsg() argument
305 if (getsockopt(cs, SOL_SOCKET, SO_RCVBUF, &len, &optlen) == -1 || in NgAllocRecvMsg()
308 if ((len = NgRecvMsg(cs, *rep, len, path)) < 0) in NgAllocRecvMsg()
317 NgRecvAsciiMsg(int cs, struct ng_mesg *reply, size_t replen, char *path) in NgRecvAsciiMsg() argument
331 if (NgRecvMsg(cs, msg, bufSize, path) < 0) in NgRecvAsciiMsg()
336 if (NgSendMsg(cs, path, NGM_GENERIC_COOKIE, in NgRecvAsciiMsg()
339 if (NgRecvMsg(cs, msg, bufSize, NULL) < 0) in NgRecvAsciiMsg()
362 NgAllocRecvAsciiMsg(int cs, struct ng_mesg **reply, char *path) in NgAllocRecvAsciiMsg() argument
368 if (getsockopt(cs, SOL_SOCKET, SO_RCVBUF, &len, &optlen) == -1 || in NgAllocRecvAsciiMsg()
371 if ((len = NgRecvAsciiMsg(cs, *reply, len, path)) < 0) in NgAllocRecvAsciiMsg()