Lines Matching defs:header

314 	struct gb_operation_msg_hdr *header;
316 header = message->buffer;
318 message->header = header;
319 message->payload = payload_size ? header + 1 : NULL;
325 * arriving data so there's no need to initialize the message header.
328 u16 message_size = (u16)(sizeof(*header) + payload_size);
339 header->size = cpu_to_le16(message_size);
340 header->operation_id = 0;
341 header->type = type;
342 header->result = 0;
348 * Both types of message contain a common header. The request message
350 * for an incoming operation. The message header for an outbound
357 * message header \_ these combined are
365 struct gb_operation_msg_hdr *header;
366 size_t message_size = payload_size + sizeof(*header);
486 * request message header (as-is, in little-endian order).
488 request_header = operation->request->header;
489 response->header->operation_id = request_header->operation_id;
501 * For outgoing requests, the request message's header will be
505 * response message header will eventually be overwritten, so there's
511 * no need to initialize the message header. Responsibility for
637 /* Caller has made sure we at least have a message header. */
651 memcpy(operation->request->header, data, size);
726 struct gb_operation_msg_hdr *header;
744 * Assign the operation's id, and store it in the request header.
754 header = operation->request->header;
755 header->operation_id = cpu_to_le16(operation->id);
851 /* Fill in the response header and send it */
852 operation->response->header->result = gb_operation_errno_map(errno);
914 const struct gb_operation_msg_hdr *header,
922 operation_id = le16_to_cpu(header->operation_id);
923 type = header->type;
958 const struct gb_operation_msg_hdr *header,
967 operation_id = le16_to_cpu(header->operation_id);
984 errno = gb_operation_status_map(header->result);
986 message_size = sizeof(*header) + message->payload_size;
990 connection->name, header->type,
995 message->payload_size = size - sizeof(*header);
999 connection->name, header->type,
1007 size = sizeof(*header);
1029 struct gb_operation_msg_hdr header;
1040 if (size < sizeof(header)) {
1047 memcpy(&header, data, sizeof(header));
1048 msg_size = le16_to_cpu(header.size);
1053 le16_to_cpu(header.operation_id),
1054 header.type, size, msg_size);
1058 if (header.type & GB_MESSAGE_TYPE_RESPONSE) {
1059 gb_connection_recv_response(connection, &header, data,
1062 gb_connection_recv_request(connection, &header, data,