aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/route.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/route.h')
-rw-r--r--include/net/route.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/net/route.h b/include/net/route.h
index cea533eaa853..5cd46d1c0e14 100644
--- a/include/net/route.h
+++ b/include/net/route.h
@@ -71,6 +71,16 @@ struct rtable {
71 struct inet_peer *peer; /* long-living peer info */ 71 struct inet_peer *peer; /* long-living peer info */
72}; 72};
73 73
74static inline bool rt_is_input_route(struct rtable *rt)
75{
76 return rt->fl.iif != 0;
77}
78
79static inline bool rt_is_output_route(struct rtable *rt)
80{
81 return rt->fl.iif == 0;
82}
83
74struct ip_rt_acct { 84struct ip_rt_acct {
75 __u32 o_bytes; 85 __u32 o_bytes;
76 __u32 o_packets; 86 __u32 o_packets;