Lines Matching refs:header

165 	msg->header.src_port_id.port_number = ntohs(msg->header.src_port_id.port_number);  in port_delay_req_timestamp_cb()
167 if (!ptp_port_id_eq(&port->port_ds.id, &msg->header.src_port_id) || in port_delay_req_timestamp_cb()
178 if (req->header.sequence_id != msg->header.sequence_id) { in port_delay_req_timestamp_cb()
196 ntohs(msg->header.sequence_id)); in port_delay_req_timestamp_cb()
213 msg->header.src_port_id.port_number = ntohs(msg->header.src_port_id.port_number); in port_sync_timestamp_cb()
215 if (ptp_port_id_eq(&port->port_ds.id, &msg->header.src_port_id) && in port_sync_timestamp_cb()
226 resp->header.type_major_sdo_id = PTP_MSG_FOLLOW_UP; in port_sync_timestamp_cb()
227 resp->header.version = PTP_VERSION; in port_sync_timestamp_cb()
228 resp->header.msg_length = sizeof(struct ptp_follow_up_msg); in port_sync_timestamp_cb()
229 resp->header.domain_number = dds->domain; in port_sync_timestamp_cb()
230 resp->header.flags[1] = tpds->flags; in port_sync_timestamp_cb()
231 resp->header.src_port_id = port->port_ds.id; in port_sync_timestamp_cb()
232 resp->header.sequence_id = port->seq_id.sync++; in port_sync_timestamp_cb()
233 resp->header.log_msg_interval = port->port_ds.log_sync_interval; in port_sync_timestamp_cb()
261 msg->header.type_major_sdo_id = PTP_MSG_ANNOUNCE; in port_announce_msg_transmit()
262 msg->header.version = PTP_VERSION; in port_announce_msg_transmit()
263 msg->header.msg_length = sizeof(struct ptp_announce_msg); in port_announce_msg_transmit()
264 msg->header.domain_number = dds->domain; in port_announce_msg_transmit()
265 msg->header.flags[1] = tpds->flags; in port_announce_msg_transmit()
266 msg->header.src_port_id = port->port_ds.id; in port_announce_msg_transmit()
267 msg->header.sequence_id = port->seq_id.announce++; in port_announce_msg_transmit()
268 msg->header.log_msg_interval = port->port_ds.log_sync_interval; in port_announce_msg_transmit()
299 msg->header.type_major_sdo_id = PTP_MSG_DELAY_REQ; in port_delay_req_msg_transmit()
300 msg->header.version = PTP_VERSION; in port_delay_req_msg_transmit()
301 msg->header.msg_length = sizeof(struct ptp_delay_req_msg); in port_delay_req_msg_transmit()
302 msg->header.domain_number = dds->domain; in port_delay_req_msg_transmit()
303 msg->header.src_port_id = port->port_ds.id; in port_delay_req_msg_transmit()
304 msg->header.sequence_id = port->seq_id.delay++; in port_delay_req_msg_transmit()
305 msg->header.log_msg_interval = DEFAULT_LOG_MSG_INTERVAL; in port_delay_req_msg_transmit()
335 msg->header.type_major_sdo_id = PTP_MSG_SYNC; in port_sync_msg_transmit()
336 msg->header.version = PTP_VERSION; in port_sync_msg_transmit()
337 msg->header.msg_length = sizeof(struct ptp_sync_msg); in port_sync_msg_transmit()
338 msg->header.domain_number = dds->domain; in port_sync_msg_transmit()
339 msg->header.flags[0] = PTP_MSG_TWO_STEP_FLAG; in port_sync_msg_transmit()
340 msg->header.flags[1] = tpds->flags; in port_sync_msg_transmit()
341 msg->header.src_port_id = port->port_ds.id; in port_sync_msg_transmit()
342 msg->header.sequence_id = port->seq_id.sync; in port_sync_msg_transmit()
343 msg->header.log_msg_interval = port->port_ds.log_sync_interval; in port_sync_msg_transmit()
400 if (msg->header.log_msg_interval <= -31) { in foreign_clock_cleanup()
402 } else if (msg->header.log_msg_interval >= 31) { in foreign_clock_cleanup()
404 } else if (msg->header.log_msg_interval > 0) { in foreign_clock_cleanup()
406 (1 << msg->header.log_msg_interval) * NSEC_PER_SEC; in foreign_clock_cleanup()
409 (1 << (-msg->header.log_msg_interval)); in foreign_clock_cleanup()
486 msg->header.sequence_id == last->header.sequence_id) { in port_sync_fup_ooo_handle()
491 last->header.correction, in port_sync_fup_ooo_handle()
492 msg->header.correction); in port_sync_fup_ooo_handle()
498 msg->header.sequence_id == last->header.sequence_id) { in port_sync_fup_ooo_handle()
503 msg->header.correction, in port_sync_fup_ooo_handle()
504 last->header.correction); in port_sync_fup_ooo_handle()
570 if (port->port_ds.log_sync_interval != msg->header.log_msg_interval) { in port_sync_msg_process()
571 port->port_ds.log_sync_interval = msg->header.log_msg_interval; in port_sync_msg_process()
574 msg->header.correction += port->port_ds.delay_asymmetry; in port_sync_msg_process()
576 if (!(msg->header.flags[0] & PTP_MSG_TWO_STEP_FLAG)) { in port_sync_msg_process()
580 msg->header.correction, in port_sync_msg_process()
625 resp->header.type_major_sdo_id = PTP_MSG_DELAY_RESP; in port_delay_req_msg_process()
626 resp->header.version = PTP_VERSION; in port_delay_req_msg_process()
627 resp->header.msg_length = sizeof(struct ptp_delay_resp_msg); in port_delay_req_msg_process()
628 resp->header.domain_number = dds->domain; in port_delay_req_msg_process()
629 resp->header.correction = msg->header.correction; in port_delay_req_msg_process()
630 resp->header.src_port_id = port->port_ds.id; in port_delay_req_msg_process()
631 resp->header.sequence_id = msg->header.sequence_id; in port_delay_req_msg_process()
632 resp->header.log_msg_interval = port->port_ds.log_min_delay_req_interval; in port_delay_req_msg_process()
637 resp->delay_resp.req_port_id = msg->header.src_port_id; in port_delay_req_msg_process()
639 if (msg->header.flags[0] & PTP_MSG_UNICAST_FLAG) { in port_delay_req_msg_process()
641 resp->header.flags[0] |= PTP_MSG_UNICAST_FLAG; in port_delay_req_msg_process()
672 if (msg->header.sequence_id == ntohs(req->header.sequence_id)) { in port_delay_resp_msg_process()
684 t4c = t4 - (msg->header.correction >> 16); in port_delay_resp_msg_process()
691 port->port_ds.log_min_delay_req_interval = msg->header.log_msg_interval; in port_delay_resp_msg_process()
703 resp->header.type_major_sdo_id = PTP_MSG_MANAGEMENT; in port_management_resp_prepare()
704 resp->header.version = PTP_VERSION; in port_management_resp_prepare()
705 resp->header.msg_length = sizeof(struct ptp_management_msg); in port_management_resp_prepare()
706 resp->header.domain_number = dds->domain; in port_management_resp_prepare()
707 resp->header.src_port_id = port->port_ds.id; in port_management_resp_prepare()
708 resp->header.sequence_id = req->header.sequence_id; in port_management_resp_prepare()
709 resp->header.log_msg_interval = port->port_ds.log_min_delay_req_interval; in port_management_resp_prepare()
719 &req->header.src_port_id, in port_management_resp_prepare()
844 resp->header.msg_length += sizeof(*container->tlv) + container->tlv->length; in port_management_resp_tlv_fill()
1074 if (ptp_port_id_eq(&msg->header.src_port_id, &port->port_ds.id)) { in ptp_port_event_gen()
1354 if (ptp_port_id_eq(&msg->header.src_port_id, &foreign->dataset.sender)) { in ptp_port_add_foreign_tt()
1362 port_id_str(&msg->header.src_port_id)); in ptp_port_add_foreign_tt()
1373 &msg->header.src_port_id, in ptp_port_add_foreign_tt()
1423 !ptp_port_id_eq(&msg->header.src_port_id, &foreign->dataset.sender)) { in ptp_port_update_current_time_transmitter()