ASF Bugzilla – Attachment 25211 Details for
Bug 42848
add IP TOS support to apr_socket_opt_set()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to add SOL_IP/IP_TOS support to apr_socket_opt_set()
httpd-2.3.4-iptos-4.patch (text/plain), 2.77 KB, created by
Philip Prindeville
on 2010-03-30 04:54:44 UTC
(
hide
)
Description:
Patch to add SOL_IP/IP_TOS support to apr_socket_opt_set()
Filename:
MIME Type:
Creator:
Philip Prindeville
Created:
2010-03-30 04:54:44 UTC
Size:
2.77 KB
patch
obsolete
>--- httpd-2.3.4-alpha/srclib/apr/include/arch/unix/apr_arch_networkio.h.orig 2006-08-03 04:55:31.000000000 -0600 >+++ httpd-2.3.4-alpha/srclib/apr/include/arch/unix/apr_arch_networkio.h 2009-12-09 18:16:19.000000000 -0700 >@@ -52,6 +52,9 @@ > #if APR_HAVE_NETINET_TCP_H > #include <netinet/tcp.h> > #endif >+#if APR_HAVE_NETINET_IP_H >+#include <netinet/ip.h> >+#endif > #if APR_HAVE_NETINET_SCTP_UIO_H > #include <netinet/sctp_uio.h> > #endif >--- httpd-2.3.4-alpha/srclib/apr/include/apr.h.in.orig 2009-10-13 09:51:48.000000000 -0600 >+++ httpd-2.3.4-alpha/srclib/apr/include/apr.h.in 2010-03-29 22:51:48.000000000 -0600 >@@ -80,6 +80,7 @@ > #define APR_HAVE_LIMITS_H @limitsh@ > #define APR_HAVE_NETDB_H @netdbh@ > #define APR_HAVE_NETINET_IN_H @netinet_inh@ >+#define APR_HAVE_NETINET_IP_H @netinet_iph@ > #define APR_HAVE_NETINET_SCTP_H @netinet_sctph@ > #define APR_HAVE_NETINET_SCTP_UIO_H @netinet_sctp_uioh@ > #define APR_HAVE_NETINET_TCP_H @netinet_tcph@ >--- httpd-2.3.4-alpha/srclib/apr/include/apr_network_io.h.orig 2009-10-16 15:08:15.000000000 -0600 >+++ httpd-2.3.4-alpha/srclib/apr/include/apr_network_io.h 2009-12-09 18:01:19.000000000 -0700 >@@ -99,6 +99,8 @@ extern "C" { > * until data is available. > * @see apr_socket_accept_filter > */ >+#define APR_SO_IPTOS 65536 /**< Set IP ToS markings on traffic. >+ */ > > /** @} */ > >--- httpd-2.3.4-alpha/srclib/apr/configure.in.orig 2009-11-16 00:45:28.000000000 -0700 >+++ httpd-2.3.4-alpha/srclib/apr/configure.in 2010-03-29 22:50:51.000000000 -0600 >@@ -1392,6 +1392,7 @@ APR_FLAG_HEADERS( > kernel/OS.h \ > net/errno.h \ > netinet/in.h \ >+ netinet/ip.h \ > netinet/sctp.h \ > netinet/sctp_uio.h \ > sys/file.h \ >@@ -1444,6 +1445,7 @@ AC_SUBST(limitsh) > AC_SUBST(netdbh) > AC_SUBST(sys_syslimitsh) > AC_SUBST(netinet_inh) >+AC_SUBST(netinet_iph) > AC_SUBST(netinet_sctph) > AC_SUBST(netinet_sctp_uioh) > AC_SUBST(netinet_tcph) >--- httpd-2.3.4-alpha/srclib/apr/network_io/unix/sockopt.c.orig 2006-08-03 04:55:31.000000000 -0600 >+++ httpd-2.3.4-alpha/srclib/apr/network_io/unix/sockopt.c 2010-03-29 22:41:58.000000000 -0600 >@@ -17,6 +17,9 @@ > #include "apr_arch_networkio.h" > #include "apr_strings.h" > >+#if !defined(SOL_IP) >+#define SOL_IP IPPROTO_IP >+#endif > > static apr_status_t soblock(int sd) > { >@@ -318,6 +321,15 @@ apr_status_t apr_socket_opt_set(apr_sock > return APR_ENOTIMPL; > #endif > break; >+ case APR_SO_IPTOS: >+#if defined(IP_TOS) >+ if (setsockopt(sock->socketdes, SOL_IP, IP_TOS, (void *)&on, sizeof(int)) == -1) { >+ return errno; >+ } >+#else >+ return APR_ENOTIMPL; >+#endif >+ break; > default: > return APR_EINVAL; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 42848
:
24685
|
24687
|
25156
|
25211
|
25699
|
25700
|
27793