Lines Matching refs:header
9 * dsi_stream_send: send a DSI header + data.
10 * dsi_stream_receive: read a DSI header + data.
42 /* Pack a DSI header in wire format */
45 buf[0] = dsi->header.dsi_flags;
46 buf[1] = dsi->header.dsi_command;
47 memcpy(buf + 2, &dsi->header.dsi_requestID, sizeof(dsi->header.dsi_requestID));
48 memcpy(buf + 4, &dsi->header.dsi_data.dsi_code, sizeof(dsi->header.dsi_data.dsi_code));
49 memcpy(buf + 8, &dsi->header.dsi_len, sizeof(dsi->header.dsi_len));
50 memcpy(buf + 12, &dsi->header.dsi_reserved, sizeof(dsi->header.dsi_reserved));
367 dsi->header.dsi_flags = DSIFL_REPLY;
368 dsi->header.dsi_len = htonl(length);
369 dsi->header.dsi_data.dsi_code = htonl(err);
537 if (!length) { /* just write the header */
538 LOG(log_maxdebug, logtype_dsi, "dsi_stream_send(%u bytes): DSI header, no data", sizeof(block));
570 if (towrite > length) { /* skip part of header */
607 /* read in the header */
611 dsi->header.dsi_flags = block[0];
612 dsi->header.dsi_command = block[1];
614 if (dsi->header.dsi_command == 0)
617 memcpy(&dsi->header.dsi_requestID, block + 2, sizeof(dsi->header.dsi_requestID));
618 memcpy(&dsi->header.dsi_data.dsi_code, block + 4, sizeof(dsi->header.dsi_data.dsi_code));
619 memcpy(&dsi->header.dsi_len, block + 8, sizeof(dsi->header.dsi_len));
620 memcpy(&dsi->header.dsi_reserved, block + 12, sizeof(dsi->header.dsi_reserved));
621 dsi->clientID = ntohs(dsi->header.dsi_requestID);
624 dsi->cmdlen = MIN(ntohl(dsi->header.dsi_len), dsi->server_quantum);