summaryrefslogtreecommitdiffstats
path: root/include/net/dn_route.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-11-11 17:07:48 -0800
committerDavid S. Miller <davem@davemloft.net>2010-11-11 17:07:48 -0800
commitc753796769e4fb0cd813b6e5801b3c01f4681d4f (patch)
treef137ec0b76593a2aa1a6a263bcc1e4cf82bdf7b5 /include/net/dn_route.h
parented1deb7021b4dfee1d544b91edff4ef92f5c3b54 (diff)
ipv4: Make rt->fl.iif tests lest obscure.
When we test rt->fl.iif against zero, we're seeing if it's an output or an input route. Make that explicit with some helper functions. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/dn_route.h')
-rw-r--r--include/net/dn_route.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/net/dn_route.h b/include/net/dn_route.h
index ccadab3aa3f..9b185df265f 100644
--- a/include/net/dn_route.h
+++ b/include/net/dn_route.h
@@ -80,6 +80,16 @@ struct dn_route {
unsigned rt_type;
};
+static inline bool dn_is_input_route(struct dn_route *rt)
+{
+ return rt->fl.iif != 0;
+}
+
+static inline bool dn_is_output_route(struct dn_route *rt)
+{
+ return rt->fl.iif == 0;
+}
+
extern void dn_route_init(void);
extern void dn_route_cleanup(void);