Date: Fri, 3 Feb 2012 09:33:58 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r230936 - projects/multi-fibv6/head/sys/netinet6 Message-ID: <201202030933.q139Xwg0079721@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bz Date: Fri Feb 3 09:33:58 2012 New Revision: 230936 URL: http://svn.freebsd.org/changeset/base/230936 Log: Provide the IPv6 counterpart to the extended IPv4 rtalloc(9) KPI. Sponsored by: Cisco Systems, Inc. Modified: projects/multi-fibv6/head/sys/netinet6/in6_rmx.c projects/multi-fibv6/head/sys/netinet6/in6_var.h Modified: projects/multi-fibv6/head/sys/netinet6/in6_rmx.c ============================================================================== --- projects/multi-fibv6/head/sys/netinet6/in6_rmx.c Fri Feb 3 09:23:55 2012 (r230935) +++ projects/multi-fibv6/head/sys/netinet6/in6_rmx.c Fri Feb 3 09:33:58 2012 (r230936) @@ -445,3 +445,43 @@ in6_detachhead(void **head, int off) return (1); } #endif + +/* + * Extended API for IPv6 FIB support. + */ +void +in6_rtredirect(struct sockaddr *dst, struct sockaddr *gw, struct sockaddr *nm, + int flags, struct sockaddr *src, u_int fibnum) +{ + + rtredirect_fib(dst, gw, nm, flags, src, fibnum); +} + +int +in6_rtrequest(int req, struct sockaddr *dst, struct sockaddr *gw, + struct sockaddr *mask, int flags, struct rtentry **ret_nrt, u_int fibnum) +{ + + return (rtrequest_fib(req, dst, gw, mask, flags, ret_nrt, fibnum)); +} + +void +in6_rtalloc(struct route_in6 *ro, u_int fibnum) +{ + + rtalloc_ign_fib((struct route *)ro, 0ul, fibnum); +} + +void +in6_rtalloc_ign(struct route_in6 *ro, u_long ignflags, u_int fibnum) +{ + + rtalloc_ign_fib((struct route *)ro, ignflags, fibnum); +} + +struct rtentry * +in6_rtalloc1(struct sockaddr *dst, int report, u_long ignflags, u_int fibnum) +{ + + return (rtalloc1_fib(dst, report, ignflags, fibnum)); +} Modified: projects/multi-fibv6/head/sys/netinet6/in6_var.h ============================================================================== --- projects/multi-fibv6/head/sys/netinet6/in6_var.h Fri Feb 3 09:23:55 2012 (r230935) +++ projects/multi-fibv6/head/sys/netinet6/in6_var.h Fri Feb 3 09:33:58 2012 (r230936) @@ -792,6 +792,17 @@ void in6_ifaddloop(struct ifaddr *); int in6_is_addr_deprecated __P((struct sockaddr_in6 *)); int in6_src_ioctl __P((u_long, caddr_t)); + +/* + * Extended API for IPv6 FIB support. + */ +void in6_rtredirect(struct sockaddr *, struct sockaddr *, struct sockaddr *, + int, struct sockaddr *, u_int); +int in6_rtrequest(int, struct sockaddr *, struct sockaddr *, + struct sockaddr *, int, struct rtentry **, u_int); +void in6_rtalloc(struct route_in6 *, u_int); +void in6_rtalloc_ign(struct route_in6 *, u_long, u_int); +struct rtentry *in6_rtalloc1(struct sockaddr *, int, u_long, u_int); #endif /* _KERNEL */ #endif /* _NETINET6_IN6_VAR_H_ */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202030933.q139Xwg0079721>