Lines Matching full:port
8 * @file port.h
9 * @brief PTP port data structure and interface to operate on PTP Ports.
36 * @brief Structure describing PTP Port.
41 /** PTP Port Dataset*/
43 /** Interface related to the Port. */
51 /** Structure of system timers used by the Port. */
71 /** Pointer to the Port's best Foreign TimeTransmitter. */
86 * @brief Function initializing PTP Port.
94 * @brief Function returning PTP Port's state.
96 * @param[in] port Pointer to the PTP Port structure.
98 * @return PTP Port's current state.
100 enum ptp_port_state ptp_port_state(struct ptp_port *port);
103 * @brief Function generating PTP Port events based on PTP Port's timers.
105 * @param[in] port Pointer to the PTP Port structure.
106 * @param[in] timer Pointer to the PTP Port's timer to be checked.
108 * @return PTP Port event.
110 enum ptp_port_event ptp_port_timer_event_gen(struct ptp_port *port, struct k_timer *timer);
112 * @brief Function generating PTP Port events based on messages
113 * that has been received on a PTP Port's socket.
115 * @param[in] port Pointer to the PTP Port structure.
116 * @param[in] idx Index of the PTP Port's socket to be checked.
118 * @return PTP Port event.
120 enum ptp_port_event ptp_port_event_gen(struct ptp_port *port, int idx);
123 * @brief Function handling PTP Port event.
125 * @param[in] port Pointer to the PTP Port structure.
126 * @param[in] event PTP Port Event to be processed.
129 void ptp_port_event_handle(struct ptp_port *port, enum ptp_port_event event, bool tt_diff);
132 * @brief Function checking if two port identities are equal.
134 * @param[in] p1 Pointer to the port identity structure.
135 * @param[in] p2 Pointer to the port identity structure.
137 * @return True if port identities are equal, False otherwise.
142 * @brief Function for getting a common dataset for the port's best foreign timeTransmitter clock.
144 * @param[in] port Pointer to the PTP Port structure.
146 * @return NULL if the port doesn't have best foreign timeTransmitter clock or
149 struct ptp_dataset *ptp_port_best_foreign_ds(struct ptp_port *port);
152 * @brief Compute PTP Port's best Foreign TimeTransmitter Clock.
154 * @param[in] port Pointer to the PTP Port.
156 * @return Pointer to the PTP Port's best Foreign TimeTransmitter.
158 struct ptp_foreign_tt_clock *ptp_port_best_foreign(struct ptp_port *port);
161 * @brief Function adding foreign TimeTransmitter Clock for the PTP Port based on specified message.
163 * @param[in] port Pointer to the PTP Port.
168 int ptp_port_add_foreign_tt(struct ptp_port *port, struct ptp_msg *msg);
171 * @brief Function freeing memory used by foreign timeTransmitters assigned to given PTP Port.
173 * @param[in] port Pointer to the PTP Port.
175 void ptp_port_free_foreign_tts(struct ptp_port *port);
178 * @brief Function updating current PTP TimeTransmitter Clock of the PTP Port
181 * @param[in] port Pointer to the PTP Port.
186 int ptp_port_update_current_time_transmitter(struct ptp_port *port, struct ptp_msg *msg);
189 * @brief Function processing received PTP Management message on the PTP Port's level.
191 * @param[in] port PTP Port to process the received message.
192 * @param[in] ingress Original PTP Port that received the message.
198 int ptp_port_management_msg_process(struct ptp_port *port,
206 * @param[in] port PTP Port that is going to send Management Error response.
212 int ptp_port_management_error(struct ptp_port *port, struct ptp_msg *msg, enum ptp_mgmt_err err);
215 * @brief Function for sending response on specific PTP PORT to received PTP Management message.
217 * @param[in] port PTP Port that will send response message.
223 int ptp_port_management_resp(struct ptp_port *port, struct ptp_msg *req, struct ptp_tlv_mgmt *tlv);