diff options
author | Benny Prijono <bennylp@teluu.com> | 2007-02-01 00:33:12 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2007-02-01 00:33:12 +0000 |
commit | 4c9fbd14de1ea36c638df692c1b1fd235c106d25 (patch) | |
tree | 88d2917ad3c733f6ec833aed263ee6ed86c6d010 /pjlib/include/pj | |
parent | 902ccf97f5c4ceccbcc8f5d5d6f71cf09aaa6eba (diff) |
Implement ticket #83: socket TOS abstraction
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@920 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/include/pj')
-rw-r--r-- | pjlib/include/pj/compat/os_auto.h.in | 1 | ||||
-rw-r--r-- | pjlib/include/pj/compat/socket.h | 5 | ||||
-rw-r--r-- | pjlib/include/pj/sock.h | 24 |
3 files changed, 30 insertions, 0 deletions
diff --git a/pjlib/include/pj/compat/os_auto.h.in b/pjlib/include/pj/compat/os_auto.h.in index 51481388..b1292373 100644 --- a/pjlib/include/pj/compat/os_auto.h.in +++ b/pjlib/include/pj/compat/os_auto.h.in @@ -50,6 +50,7 @@ #undef PJ_HAS_MALLOC_H #undef PJ_HAS_NETDB_H #undef PJ_HAS_NETINET_IN_H +#undef PJ_HAS_NETINET_IP_H #undef PJ_HAS_SETJMP_H #undef PJ_HAS_STDARG_H #undef PJ_HAS_STDDEF_H diff --git a/pjlib/include/pj/compat/socket.h b/pjlib/include/pj/compat/socket.h index e95bc125..e64afe8f 100644 --- a/pjlib/include/pj/compat/socket.h +++ b/pjlib/include/pj/compat/socket.h @@ -52,6 +52,11 @@ # include <netinet/in.h> #endif +#if defined(PJ_HAS_NETINET_IP_H) && PJ_HAS_NETINET_IP_H != 0 +/* To pull in IPTOS_* constants */ +# include <netinet/ip.h> +#endif + #if defined(PJ_HAS_ARPA_INET_H) && PJ_HAS_ARPA_INET_H != 0 # include <arpa/inet.h> #endif diff --git a/pjlib/include/pj/sock.h b/pjlib/include/pj/sock.h index 7321c5de..80d2ab7d 100644 --- a/pjlib/include/pj/sock.h +++ b/pjlib/include/pj/sock.h @@ -93,6 +93,30 @@ extern const pj_uint16_t PJ_SOL_TCP; /**< TCP level. */ extern const pj_uint16_t PJ_SOL_UDP; /**< UDP level. */ extern const pj_uint16_t PJ_SOL_IPV6; /**< IP version 6 */ + +/* IP_TOS + * + * Note: + * TOS CURRENTLY DOES NOT WORK IN Windows 2000 and above! + * See http://support.microsoft.com/kb/248611 + */ +extern const pj_uint16_t PJ_IP_TOS; /**< IP_TOS optname in setsockopt() */ + + +/* + * IP TOS related constats. + * + * Note: + * TOS CURRENTLY DOES NOT WORK IN Windows 2000 and above! + * See http://support.microsoft.com/kb/248611 + */ +extern const pj_uint16_t PJ_IPTOS_LOWDELAY; /**< Minimize delays */ +extern const pj_uint16_t PJ_IPTOS_THROUGHPUT; /**< Optimize throughput */ +extern const pj_uint16_t PJ_IPTOS_RELIABILITY; /**< Optimize for reliability*/ +extern const pj_uint16_t PJ_IPTOS_MINCOST; /**< "filler data" where slow + transmission does't matter */ + + /** * Values to be specified as \c optname when calling #pj_sock_setsockopt() * or #pj_sock_getsockopt(). |