30
u8 ipproto; /* The IP protocol for the tunnel. */
33
* Returns the length of the tunnel header that will be added in
34
* build_header() (i.e. excludes the IP header).
36
int (*hdr_len)(const struct ovs_key_ipv4_tunnel *);
38
* Builds header for given SKB. Space will have already been
39
* allocated at the start of the packet equal
40
* to sizeof(struct iphdr) + value returned by hdr_len().
42
void (*build_header)(const struct vport *, struct sk_buff *,
51
const struct tnl_ops *tnl_ops;
54
struct vport *ovs_tnl_create(const struct vport_parms *, const struct vport_ops *,
55
const struct tnl_ops *);
56
void ovs_tnl_destroy(struct vport *);
58
const char *ovs_tnl_get_name(const struct vport *vport);
59
int ovs_tnl_send(struct vport *vport, struct sk_buff *skb);
60
void ovs_tnl_rcv(struct vport *vport, struct sk_buff *skb);
29
struct rtable *find_route(struct net *net,
30
__be32 *saddr, __be32 daddr, u8 ipproto,
31
u8 tos, u32 skb_mark);
61
33
u16 ovs_tnl_get_src_port(struct sk_buff *skb);
63
static inline struct tnl_vport *tnl_vport_priv(const struct vport *vport)
65
return vport_priv(vport);
35
int ovs_tnl_send(struct vport *vport, struct sk_buff *skb,
36
u8 ipproto, int tunnel_hlen,
37
void (*build_header)(const struct vport *,
41
void ovs_tnl_rcv(struct vport *vport, struct sk_buff *skb,
42
struct ovs_key_ipv4_tunnel *tun_key);
68
44
static inline void tnl_tun_key_init(struct ovs_key_ipv4_tunnel *tun_key,
69
const struct iphdr *iph, __be64 tun_id, u32 tun_flags)
45
const struct iphdr *iph, __be64 tun_id,
71
48
tun_key->tun_id = tun_id;
72
49
tun_key->ipv4_src = iph->saddr;