[lib] mes_lookup string lookup table argument should be marked const
2008-08-14 Stephen Hemminger <stephen.hemminger@vyatta.com>
* lib/log.{c,h}: struct message argument should point to const
* */*.c: adjust to suit,
Signed-off-by: Paul Jakma <paul@quagga.net>
diff --git a/lib/sockopt.c b/lib/sockopt.c
index a2038a5..2f01199 100644
--- a/lib/sockopt.c
+++ b/lib/sockopt.c
@@ -343,6 +343,19 @@
}
int
+setsockopt_ipv4_tos(int sock, int tos)
+{
+ int ret;
+
+ ret = setsockopt (sock, IPPROTO_IP, IP_TOS, &tos, sizeof (tos));
+ if (ret < 0)
+ zlog_warn ("Can't set IP_TOS option for fd %d to %#x: %s",
+ sock, tos, safe_strerror(errno));
+ return ret;
+}
+
+
+int
setsockopt_ifindex (int af, int sock, int val)
{
int ret = -1;