diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-08-14 17:59:25 +0100 |
---|---|---|
committer | Paul Jakma <paul@quagga.net> | 2008-08-22 19:52:58 +0100 |
commit | 1423c809cc4ddc2e013ba6264c49a11e5719c6f2 (patch) | |
tree | db0389e7de020bbcb9fd78d45417b0842a6adb0b /lib/sockopt.c | |
parent | 89d9fa301e146193093ff876f96b3612dc390bbb (diff) |
[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>
Diffstat (limited to 'lib/sockopt.c')
-rw-r--r-- | lib/sockopt.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/sockopt.c b/lib/sockopt.c index a2038a5c..2f01199a 100644 --- a/lib/sockopt.c +++ b/lib/sockopt.c @@ -343,6 +343,19 @@ setsockopt_ipv4_ifindex (int sock, int val) } 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; |