gtp: Add support for checking GTP device type
Subsystems (2)
RFC PATCH v2 2/5 gtp: Add support for checking GTP device type
From: Wojciech Drewek <[email protected]>
Add a function that checks if a net device type is GTP.
Signed-off-by Wojciech Drewek <[email protected]>
--- include/net/gtp.h | 6 ++++++ 1 file changed, 6 insertions(+)
include/net/gtp.h +6 -0
@@ -27,6 +27,12 @@ struct gtp1_header { /* According to 3GPP TS 29.060. */__be32 tid; } __attribute__ ((packed)); +static inline bool netif_is_gtp (const struct net_device *dev) +{ +return dev->rtnl_link_ops && + !strcmp (dev->rtnl_link_ops->kind,"gtp" ); +} +#define GTP1_F_NPDU 0x01#define GTP1_F_SEQ 0x02#define GTP1_F_EXTHDR 0x04
Signature · 1 line
2.31.1