Lines Matching refs:header
76 static int msg_header_post_recv(struct ptp_header *header) in msg_header_post_recv() argument
78 if ((header->version & 0xF) != PTP_MAJOR_VERSION) { in msg_header_post_recv()
83 header->msg_length = ntohs(header->msg_length); in msg_header_post_recv()
84 header->correction = ntohll(header->correction); in msg_header_post_recv()
85 header->sequence_id = ntohs(header->sequence_id); in msg_header_post_recv()
87 msg_port_id_post_recv(&header->src_port_id); in msg_header_post_recv()
92 static void msg_header_pre_send(struct ptp_header *header) in msg_header_pre_send() argument
94 header->msg_length = htons(header->msg_length); in msg_header_pre_send()
95 header->correction = htonll(header->correction); in msg_header_pre_send()
96 header->sequence_id = htons(header->sequence_id); in msg_header_pre_send()
98 msg_port_id_pre_send(&header->src_port_id); in msg_header_pre_send()
259 return (enum ptp_msg_type)(msg->header.type_major_sdo_id & 0xF); in ptp_msg_type()
302 if (payload == ntohs(msg->header.msg_length)) { in ptp_msg_from_pkt()
313 msg_header_pre_send(&msg->header); in ptp_msg_pre_send()
381 if (msg_header_post_recv(&msg->header)) { in ptp_msg_post_recv()
436 if (msg_size[type] + tlv_len != msg->header.msg_length) { in ptp_msg_post_recv()
468 msg->header.msg_length += length; in ptp_msg_add_tlv()
487 return ptp_port_id_eq(&pds->port_id, &msg->header.src_port_id); in ptp_msg_current_parent()