Lines Matching refs:header

71 	msg.header.version = NG_VERSION;  in NgSendMsg()
72 msg.header.typecookie = cookie; in NgSendMsg()
73 msg.header.token = atomic_fetch_add(&gMsgId, 1) & INT_MAX; in NgSendMsg()
74 msg.header.flags = NGF_ORIG; in NgSendMsg()
75 msg.header.cmd = cmd; in NgSendMsg()
76 snprintf((char *)msg.header.cmdstr, NG_CMDSTRSIZ, "cmd%d", cmd); in NgSendMsg()
81 return (msg.header.token); in NgSendMsg()
122 strncpy((char *)ascii->header.cmdstr, cmd, in NgSendAsciiMsg()
123 sizeof(ascii->header.cmdstr) - 1); in NgSendAsciiMsg()
125 ascii->header.arglen = strlen(ascii->data) + 1; in NgSendAsciiMsg()
130 (u_char *)ascii, sizeof(*ascii) + ascii->header.arglen) < 0) { in NgSendAsciiMsg()
142 binary->header.token = atomic_fetch_add(&gMsgId, 1) & INT_MAX; in NgSendAsciiMsg()
143 binary->header.version = NG_VERSION; in NgSendAsciiMsg()
145 path, binary, binary->data, binary->header.arglen) < 0) { in NgSendAsciiMsg()
149 token = binary->header.token; in NgSendAsciiMsg()
166 rep.header.flags = NGF_RESP; in NgSendReplyMsg()
203 msg->header.arglen = arglen; in NgDeliverMsg()
215 (msg->header.flags & NGF_RESP) ? "RESPONSE" : "MESSAGE"); in NgDeliverMsg()
231 if (msg->header.cmd & NGM_HASREPLY && !(msg->header.flags & NGF_RESP)) { in NgDeliverMsg()
282 (rep->header.flags & NGF_RESP) ? "RESPONSE" : "MESSAGE"); in NgRecvMsg()
337 NGM_BINARY2ASCII, msg, sizeof(*msg) + msg->header.arglen) < 0) in NgRecvAsciiMsg()
343 if (sizeof(*ascii) + ascii->header.arglen > replen) { in NgRecvAsciiMsg()
351 strncpy(reply->data, ascii->data, ascii->header.arglen); in NgRecvAsciiMsg()