openssh-unix-dev May 2011 archive
Main Archive Page > Month Archives  > openssh-unix-dev archives
openssh-unix-dev: IPTOS constants

IPTOS constants

From: Dag-Erling Smørgrav <des_at_nospam>
Date: Tue May 03 2011 - 20:50:29 GMT
To: openssh-unix-dev@mindrot.org

defines.h defines a bunch of IPTOS constants if they're not already
available:

#ifndef IPTOS_LOWDELAY
# define IPTOS_LOWDELAY 0x10
# define IPTOS_THROUGHPUT 0x08
# define IPTOS_RELIABILITY 0x04
# define IPTOS_LOWCOST 0x02
# define IPTOS_MINCOST IPTOS_LOWCOST
#endif /* IPTOS_LOWDELAY */

A few lines further down, it includes <netinet/ip.h>, which is where
those constants are defined (at least in FreeBSD).

--- /home/des/freebsd/base/vendor-crypto/openssh/dist/defines.h
    2011-01-17 11:15:31.000000000 +0100
+++ defines.h 2011-05-03 22:34:47.724047823 +0200
@@ -45,6 +45,7 @@
 /*
  * Definitions for IP type of service (ip_tos)
  */
+#include <netinet/ip.h>
 #ifndef IPTOS_LOWDELAY
 # define IPTOS_LOWDELAY 0x10
 # define IPTOS_THROUGHPUT 0x08
@@ -57,7 +58,6 @@
  * Definitions for DiffServ Codepoints as per RFC2474
  */
 #include <netinet/in_systm.h>
-#include <netinet/ip.h>
 #ifndef IPTOS_DSCP_AF11
 # define IPTOS_DSCP_AF11 0x28
 # define IPTOS_DSCP_AF12 0x30

These include directives should really be moved to includes.h - in fact,
<netinet/in_systm.h> is already there.

DES
-- Dag-Erling Smørgrav - des@des.no _______________________________________________ openssh-unix-dev mailing list openssh-unix-dev@mindrot.org https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev