26 lines
600 B
C
26 lines
600 B
C
#ifndef OMNI_LINUX_TIMESTAMPING_H
|
|
#define OMNI_LINUX_TIMESTAMPING_H
|
|
|
|
#include "omni_common.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef struct omni_tx_timestamp_event {
|
|
char event_name[OMNI_MAX_EVENT_NAME];
|
|
int64_t ts_unix_nano;
|
|
uint32_t ee_info;
|
|
uint32_t ee_data;
|
|
} omni_tx_timestamp_event_t;
|
|
|
|
int linux_timestamping_enable_udp_socket(int fd, int enable_rx);
|
|
int64_t linux_timestamping_parse_rx_timestamp(const struct msghdr *msg);
|
|
int linux_timestamping_parse_tx_timestamp(const struct msghdr *msg, omni_tx_timestamp_event_t *out_event);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|