Merge tag 'filesystems_for_v4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel...
[sfrench/cifs-2.6.git] / include / net / ip_fib.h
index c9b7b136939d7d9213af3bbbb372c2764baab873..c5969762a8f44b18b27d1776752331768743bf2f 100644 (file)
@@ -222,6 +222,17 @@ struct fib_table {
        unsigned long           __data[0];
 };
 
+struct fib_dump_filter {
+       u32                     table_id;
+       /* filter_set is an optimization that an entry is set */
+       bool                    filter_set;
+       bool                    dump_all_families;
+       unsigned char           protocol;
+       unsigned char           rt_type;
+       unsigned int            flags;
+       struct net_device       *dev;
+};
+
 int fib_table_lookup(struct fib_table *tb, const struct flowi4 *flp,
                     struct fib_result *res, int fib_flags);
 int fib_table_insert(struct net *, struct fib_table *, struct fib_config *,
@@ -229,7 +240,7 @@ int fib_table_insert(struct net *, struct fib_table *, struct fib_config *,
 int fib_table_delete(struct net *, struct fib_table *, struct fib_config *,
                     struct netlink_ext_ack *extack);
 int fib_table_dump(struct fib_table *table, struct sk_buff *skb,
-                  struct netlink_callback *cb);
+                  struct netlink_callback *cb, struct fib_dump_filter *filter);
 int fib_table_flush(struct net *net, struct fib_table *table);
 struct fib_table *fib_trie_unmerge(struct fib_table *main_tb);
 void fib_table_flush_external(struct fib_table *table);
@@ -373,6 +384,7 @@ static inline bool fib4_rules_early_flow_dissect(struct net *net,
 extern const struct nla_policy rtm_ipv4_policy[];
 void ip_fib_init(void);
 __be32 fib_compute_spec_dst(struct sk_buff *skb);
+bool fib_info_nh_uses_dev(struct fib_info *fi, const struct net_device *dev);
 int fib_validate_source(struct sk_buff *skb, __be32 src, __be32 dst,
                        u8 tos, int oif, struct net_device *dev,
                        struct in_device *idev, u32 *itag);
@@ -452,4 +464,7 @@ static inline void fib_proc_exit(struct net *net)
 
 u32 ip_mtu_from_fib_result(struct fib_result *res, __be32 daddr);
 
+int ip_valid_fib_dump_req(struct net *net, const struct nlmsghdr *nlh,
+                         struct fib_dump_filter *filter,
+                         struct netlink_callback *cb);
 #endif  /* _NET_FIB_H */