[Asterisk-Dev] IPPROTO_IP is more common than SOL_IP

Thorsten Lockert tholo at sigmasoft.com
Wed Apr 23 12:57:02 MST 2003


This patch changes SOL_IP to IPPROTO_IP, which is much more common
in usage among diverse systems.

Index: rtp.c
===================================================================
RCS file: /usr/cvsroot/asterisk/rtp.c,v
retrieving revision 1.9
diff -u -r1.9 rtp.c
--- rtp.c	18 Apr 2003 14:39:26 -0000	1.9
+++ rtp.c	23 Apr 2003 19:38:39 -0000
@@ -575,7 +575,7 @@
 int ast_rtp_settos(struct ast_rtp *rtp, int tos)
 {
 	int res;
-	if ((res = setsockopt(rtp->s, SOL_IP, IP_TOS, &tos, sizeof(tos)))) 
+	if ((res = setsockopt(rtp->s, IPPROTO_IP, IP_TOS, &tos, sizeof(tos)))) 
 		ast_log(LOG_WARNING, "Unable to set TOS to %d\n", tos);
 	return res;
 }
Index: channels/chan_iax.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_iax.c,v
retrieving revision 1.4
diff -u -r1.4 chan_iax.c
--- channels/chan_iax.c	21 Apr 2003 18:00:26 -0000	1.4
+++ channels/chan_iax.c	23 Apr 2003 19:38:51 -0000
@@ -5134,7 +5139,7 @@
 	if (option_verbose > 1)
 		ast_verbose(VERBOSE_PREFIX_2 "Using TOS bits %d\n", tos);
 
-	if (setsockopt(netsocket, SOL_IP, IP_TOS, &tos, sizeof(tos))) 
+	if (setsockopt(netsocket, IPPROTO_IP, IP_TOS, &tos, sizeof(tos))) 
 		ast_log(LOG_WARNING, "Unable to set TOS to %d\n", tos);
 	
 	if (!res) {
Index: channels/chan_iax2.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_iax2.c,v
retrieving revision 1.13
diff -u -r1.13 chan_iax2.c
--- channels/chan_iax2.c	19 Apr 2003 18:14:54 -0000	1.13
+++ channels/chan_iax2.c	23 Apr 2003 19:39:09 -0000
@@ -5479,7 +5484,7 @@
 	if (option_verbose > 1)
 		ast_verbose(VERBOSE_PREFIX_2 "Using TOS bits %d\n", tos);
 
-	if (setsockopt(netsocket, SOL_IP, IP_TOS, &tos, sizeof(tos))) 
+	if (setsockopt(netsocket, IPPROTO_IP, IP_TOS, &tos, sizeof(tos))) 
 		ast_log(LOG_WARNING, "Unable to set TOS to %d\n", tos);
 	
 	if (!res) {
Index: channels/chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.88
diff -u -r1.88 chan_sip.c
--- channels/chan_sip.c	23 Apr 2003 18:50:53 -0000	1.88
+++ channels/chan_sip.c	23 Apr 2003 19:39:27 -0000
@@ -5258,7 +5263,7 @@
 				if (option_verbose > 1)
 					ast_verbose(VERBOSE_PREFIX_2 "Using TOS bits %d\n", tos);
 
-				if (setsockopt(sipsock, SOL_IP, IP_TOS, &tos, sizeof(tos))) 
+				if (setsockopt(sipsock, IPPROTO_IP, IP_TOS, &tos, sizeof(tos))) 
 					ast_log(LOG_WARNING, "Unable to set TOS to %d\n", tos);
 	
 			}
--
Thorsten Lockert      | tholo at sigmasoft.com | Universe, n.:
2121 N. Lakeshore Dr. | tholo at openbsd.org   |         The problem.
Chapel Hill, NC 27514 |                     |



More information about the asterisk-dev mailing list