diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2014-08-27 21:38:44 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2014-08-27 21:38:44 +0200 |
commit | a5352e212fcd4da83c8ff4fe542ef23c8e3187f8 (patch) | |
tree | 016dd4cf4a39ddef717a1de7f7ace0305ffa0e75 /include | |
parent | 91b2dfd68f5aecc290a449905aa7456f27f10326 (diff) | |
parent | c6e8f34a358f846aa15cb9f53251da3d6668abd1 (diff) |
Merge remote-tracking branch 'origin/upstream'
Diffstat (limited to 'include')
-rw-r--r-- | include/netinet/ip.h | 42 | ||||
-rw-r--r-- | include/sys/timex.h | 13 |
2 files changed, 40 insertions, 15 deletions
diff --git a/include/netinet/ip.h b/include/netinet/ip.h index 19e12492d..3fe58b9ee 100644 --- a/include/netinet/ip.h +++ b/include/netinet/ip.h @@ -188,7 +188,25 @@ struct ip_timestamp #define IPTOS_DSCP_EF 0xb8 /* - * Definitions for IP type of service (ip_tos) + * In RFC 2474, Section 4.2.2.1, the Class Selector Codepoints subsume + * the old ToS Precedence values. + */ +#define IPTOS_CLASS_MASK 0xe0 +#define IPTOS_CLASS(class) ((class) & IPTOS_CLASS_MASK) +#define IPTOS_CLASS_CS0 0x00 +#define IPTOS_CLASS_CS1 0x20 +#define IPTOS_CLASS_CS2 0x40 +#define IPTOS_CLASS_CS3 0x60 +#define IPTOS_CLASS_CS4 0x80 +#define IPTOS_CLASS_CS5 0xa0 +#define IPTOS_CLASS_CS6 0xc0 +#define IPTOS_CLASS_CS7 0xe0 + +#define IPTOS_CLASS_DEFAULT IPTOS_CLASS_CS0 + +/* + * Definitions for IP type of service (ip_tos) [deprecated; use DSCP + * and CS definitions above instead.] */ #define IPTOS_TOS_MASK 0x1E #define IPTOS_TOS(tos) ((tos) & IPTOS_TOS_MASK) @@ -199,18 +217,18 @@ struct ip_timestamp #define IPTOS_MINCOST IPTOS_LOWCOST /* - * Definitions for IP precedence (also in ip_tos) (hopefully unused) + * Definitions for IP precedence (also in ip_tos) [also deprecated.] */ -#define IPTOS_PREC_MASK 0xe0 -#define IPTOS_PREC(tos) ((tos) & IPTOS_PREC_MASK) -#define IPTOS_PREC_NETCONTROL 0xe0 -#define IPTOS_PREC_INTERNETCONTROL 0xc0 -#define IPTOS_PREC_CRITIC_ECP 0xa0 -#define IPTOS_PREC_FLASHOVERRIDE 0x80 -#define IPTOS_PREC_FLASH 0x60 -#define IPTOS_PREC_IMMEDIATE 0x40 -#define IPTOS_PREC_PRIORITY 0x20 -#define IPTOS_PREC_ROUTINE 0x00 +#define IPTOS_PREC_MASK IPTOS_CLASS_MASK +#define IPTOS_PREC(tos) IPTOS_CLASS(tos) +#define IPTOS_PREC_NETCONTROL IPTOS_CLASS_CS7 +#define IPTOS_PREC_INTERNETCONTROL IPTOS_CLASS_CS6 +#define IPTOS_PREC_CRITIC_ECP IPTOS_CLASS_CS5 +#define IPTOS_PREC_FLASHOVERRIDE IPTOS_CLASS_CS4 +#define IPTOS_PREC_FLASH IPTOS_CLASS_CS3 +#define IPTOS_PREC_IMMEDIATE IPTOS_CLASS_CS2 +#define IPTOS_PREC_PRIORITY IPTOS_CLASS_CS1 +#define IPTOS_PREC_ROUTINE IPTOS_CLASS_CS0 /* * Definitions for options. diff --git a/include/sys/timex.h b/include/sys/timex.h index 621afce62..57059bd14 100644 --- a/include/sys/timex.h +++ b/include/sys/timex.h @@ -20,6 +20,7 @@ #include <features.h> #include <sys/time.h> +#include <time.h> /* These definitions from linux/timex.h as of 2.2.0. */ @@ -66,8 +67,12 @@ struct timex #define ADJ_ESTERROR 0x0008 /* estimated time error */ #define ADJ_STATUS 0x0010 /* clock status */ #define ADJ_TIMECONST 0x0020 /* pll time constant */ -#define ADJ_TICK 0x4000 /* tick value */ -#define ADJ_OFFSET_SINGLESHOT 0x8001 /* old-fashioned adjtime */ +#define ADJ_TAI 0x0080 /* set TAI offset */ +#define ADJ_MICRO 0x1000 /* select microsecond resolution */ +#define ADJ_NANO 0x2000 /* select nanosecond resolution */ +#define ADJ_TICK 0x4000 /* tick value */ +#define ADJ_OFFSET_SINGLESHOT 0x8001 /* old-fashioned adjtime */ +#define ADJ_OFFSET_SS_READ 0xa001 /* read-only adjtime */ /* xntp 3.4 compatibility names */ #define MOD_OFFSET ADJ_OFFSET @@ -125,7 +130,9 @@ libc_hidden_proto(adjtimex) extern int ntp_gettime (struct ntptimeval *__ntv) __THROW; extern int ntp_adjtime (struct timex *__tntx) __THROW; #endif - +#if defined __UCLIBC_HAS_REALTIME__ +extern int clock_adjtime (clockid_t __clock_id, struct timex *__ntx) __THROW; +#endif __END_DECLS #endif /* sys/timex.h */ |