| .. | .. |
|---|
| 37 | 37 | int gre_parse_header(struct sk_buff *skb, struct tnl_ptk_info *tpi, |
|---|
| 38 | 38 | bool *csum_err, __be16 proto, int nhs); |
|---|
| 39 | 39 | |
|---|
| 40 | | -bool is_gretap_dev(const struct net_device *dev); |
|---|
| 41 | | -bool is_ip6gretap_dev(const struct net_device *dev); |
|---|
| 40 | +static inline bool netif_is_gretap(const struct net_device *dev) |
|---|
| 41 | +{ |
|---|
| 42 | + return dev->rtnl_link_ops && |
|---|
| 43 | + !strcmp(dev->rtnl_link_ops->kind, "gretap"); |
|---|
| 44 | +} |
|---|
| 45 | + |
|---|
| 46 | +static inline bool netif_is_ip6gretap(const struct net_device *dev) |
|---|
| 47 | +{ |
|---|
| 48 | + return dev->rtnl_link_ops && |
|---|
| 49 | + !strcmp(dev->rtnl_link_ops->kind, "ip6gretap"); |
|---|
| 50 | +} |
|---|
| 42 | 51 | |
|---|
| 43 | 52 | static inline int gre_calc_hlen(__be16 o_flags) |
|---|
| 44 | 53 | { |
|---|