File: ip6_route.h

package info (click to toggle)
openvswitch 2.6.2~pre%2Bgit20161223-3
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 42,772 kB
  • ctags: 37,668
  • sloc: sh: 499,654; ansic: 261,360; xml: 21,326; python: 14,843; makefile: 450; perl: 409
file content (39 lines) | stat: -rw-r--r-- 1,014 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef __NET_IP6_ROUTE_WRAPPER
#define __NET_IP6_ROUTE_WRAPPER

#include <net/route.h>
#include <net/ip.h>                /* For OVS_VPORT_OUTPUT_PARAMS */
#include <net/ipv6.h>

#include_next<net/ip6_route.h>

#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)

static inline
struct dst_entry *rpl_ip6_route_output(struct net *net, const struct sock *sk,
				   struct flowi6 *fl6)
{
	struct flowi fl;

	memset(&fl, 0, sizeof(fl));
	fl.oif = fl6->flowi6_oif;
	fl.fl6_dst = fl6->daddr;
	fl.fl6_src = fl6->saddr;
	fl.mark = fl6->flowi6_mark;
	fl.proto = fl6->flowi6_proto;

	return ip6_route_output(net, (struct sock *) sk, &fl);
}
#define ip6_route_output rpl_ip6_route_output

#define ip6_dst_hoplimit(dst) dst_metric(dst, RTAX_HOPLIMIT)

#endif /* 2.6.39 */

#ifndef HAVE_NF_IPV6_OPS_FRAGMENT
int rpl_ip6_fragment(struct sock *sk, struct sk_buff *skb,
		     int (*output)(OVS_VPORT_OUTPUT_PARAMS));
#define ip6_fragment rpl_ip6_fragment
#endif /* HAVE_NF_IPV6_OPS_FRAGMENT */

#endif /* _NET_IP6_ROUTE_WRAPPER */