]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - include/net/route.h
ipv4: Make rt->fl.iif tests lest obscure.
[net-next-2.6.git] / include / net / route.h
index cea533eaa8530fe22c9c102fbaeacdd02daa4999..5cd46d1c0e14cd679b5e342e497efa4ca3ace7b9 100644 (file)
@@ -71,6 +71,16 @@ struct rtable {
        struct inet_peer        *peer; /* long-living peer info */
 };
 
+static inline bool rt_is_input_route(struct rtable *rt)
+{
+       return rt->fl.iif != 0;
+}
+
+static inline bool rt_is_output_route(struct rtable *rt)
+{
+       return rt->fl.iif == 0;
+}
+
 struct ip_rt_acct {
        __u32   o_bytes;
        __u32   o_packets;