From a6163888f3c56123b1db313743c6147ba498732c Mon Sep 17 00:00:00 2001 From: Yuval Adam Date: Fri, 8 Aug 2014 14:42:07 +0300 Subject: Add third_party libs --- third_party/ptpd-1.1.0/src/dep/constants_dep.h | 99 ++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 third_party/ptpd-1.1.0/src/dep/constants_dep.h (limited to 'third_party/ptpd-1.1.0/src/dep/constants_dep.h') diff --git a/third_party/ptpd-1.1.0/src/dep/constants_dep.h b/third_party/ptpd-1.1.0/src/dep/constants_dep.h new file mode 100644 index 0000000..54afaf1 --- /dev/null +++ b/third_party/ptpd-1.1.0/src/dep/constants_dep.h @@ -0,0 +1,99 @@ +/** + * @file constants_dep.h + * @date Tue Jul 20 16:16:23 2010 + * + * @brief Platform dependent constants + * + * + */ + +#ifndef CONSTANTS_DEP_H +#define CONSTANTS_DEP_H + +#include + +#if !defined(linux) && !defined(__NetBSD__) && !defined(__FreeBSD__) +#error Not ported to this architecture, please update. +#endif + +#ifdef linux +#include +#include +#include +#define IFACE_NAME_LENGTH IF_NAMESIZE +#define NET_ADDRESS_LENGTH INET_ADDRSTRLEN + +#define IFCONF_LENGTH 10 + +#include +#if __BYTE_ORDER == __LITTLE_ENDIAN +#define PTPD_LSBF +#elif __BYTE_ORDER == __BIG_ENDIAN +#define PTPD_MSBF +#endif +#endif /* linux */ + + +#if defined(__NetBSD__) || defined(__FreeBSD__) +#include +#include +#include +#include +#include +#include +#if defined(__FreeBSD__) +#include +#include +#else +#include +#endif +#include +#define IFACE_NAME_LENGTH IF_NAMESIZE +#define NET_ADDRESS_LENGTH INET_ADDRSTRLEN + +#define IFCONF_LENGTH 10 + +#define adjtimex ntp_adjtime + +#include +#if BYTE_ORDER == LITTLE_ENDIAN +#define PTPD_LSBF +#elif BYTE_ORDER == BIG_ENDIAN +#define PTPD_MSBF +#endif +#endif + + +#define ADJ_FREQ_MAX 512000 + +/* UDP/IPv4 dependent */ + +#define SUBDOMAIN_ADDRESS_LENGTH 4 +#define PORT_ADDRESS_LENGTH 2 + +#define PACKET_SIZE 300 + +#define PTP_EVENT_PORT 319 +#define PTP_GENERAL_PORT 320 + +#define DEFAULT_PTP_DOMAIN_ADDRESS "224.0.1.129" +#define ALTERNATE_PTP_DOMAIN1_ADDRESS "224.0.1.130" +#define ALTERNATE_PTP_DOMAIN2_ADDRESS "224.0.1.131" +#define ALTERNATE_PTP_DOMAIN3_ADDRESS "224.0.1.132" + +#define HEADER_LENGTH 40 +#define SYNC_PACKET_LENGTH 124 +#define DELAY_REQ_PACKET_LENGTH 124 +#define FOLLOW_UP_PACKET_LENGTH 52 +#define DELAY_RESP_PACKET_LENGTH 60 +#define MANAGEMENT_PACKET_LENGTH 136 + +#define MM_STARTING_BOUNDARY_HOPS 0x7fff + +/* others */ + +#define SCREEN_BUFSZ 128 +#define SCREEN_MAXSZ 80 + +#define MAXTIMESTR 32 +#endif -- cgit v1.3.1