diff options
Diffstat (limited to 'usr.sbin/rtsold/if.c')
-rw-r--r-- | usr.sbin/rtsold/if.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/usr.sbin/rtsold/if.c b/usr.sbin/rtsold/if.c index 7456c330ed7..b421b488282 100644 --- a/usr.sbin/rtsold/if.c +++ b/usr.sbin/rtsold/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.17 2003/10/05 15:29:28 deraadt Exp $ */ +/* $OpenBSD: if.c,v 1.18 2004/01/05 20:32:50 itojun Exp $ */ /* $KAME: if.c,v 1.18 2002/05/31 10:10:03 itojun Exp $ */ /* @@ -299,6 +299,22 @@ getinet6sysctl(int code) return value; } +int +setinet6sysctl(int code, int newval) +{ + int mib[] = { CTL_NET, PF_INET6, IPPROTO_IPV6, 0 }; + int value; + size_t size; + + mib[3] = code; + size = sizeof(value); + if (sysctl(mib, sizeof(mib)/sizeof(mib[0]), &value, &size, + &newval, sizeof(newval)) < 0) + return -1; + else + return value; +} + /*------------------------------------------------------------*/ /* get ia6_flags for link-local addr on if. returns -1 on error. */ |