summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorJamal Hadi Salim <hadi@cyberus.ca>2007-04-28 21:20:32 -0700
committerDavid S. Miller <davem@davemloft.net>2007-04-28 21:20:32 -0700
commitecfd6b183780c6d9e85873693b3ce6c5f4d08b58 (patch)
tree8ee1330176e3011d3fdf86e70b5933b50302b7e7 /include/net
parent5632c5152aa621885d87ea0b8fdd5a6bb9f69c6f (diff)
downloadlinux-3.10-ecfd6b183780c6d9e85873693b3ce6c5f4d08b58.tar.gz
linux-3.10-ecfd6b183780c6d9e85873693b3ce6c5f4d08b58.tar.bz2
linux-3.10-ecfd6b183780c6d9e85873693b3ce6c5f4d08b58.zip
[XFRM]: Export SPD info
With this patch you can use iproute2 in user space to efficiently see how many policies exist in different directions. Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/xfrm.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 8287081d77f..9561bf817b0 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -423,6 +423,18 @@ struct xfrm_sadinfo
u32 sadhmcnt; /* max allowed hash bkts */
u32 sadcnt; /* current running count */
};
+
+struct xfrm_spdinfo
+{
+ u32 incnt;
+ u32 outcnt;
+ u32 fwdcnt;
+ u32 inscnt;
+ u32 outscnt;
+ u32 fwdscnt;
+ u32 spdhcnt;
+ u32 spdhmcnt;
+};
#ifdef CONFIG_AUDITSYSCALL
extern void xfrm_audit_log(uid_t auid, u32 secid, int type, int result,
struct xfrm_policy *xp, struct xfrm_state *x);
@@ -946,6 +958,7 @@ extern struct xfrm_state *xfrm_find_acq_byseq(u32 seq);
extern int xfrm_state_delete(struct xfrm_state *x);
extern void xfrm_state_flush(u8 proto, struct xfrm_audit *audit_info);
extern void xfrm_sad_getinfo(struct xfrm_sadinfo *si);
+extern void xfrm_spd_getinfo(struct xfrm_spdinfo *si);
extern int xfrm_replay_check(struct xfrm_state *x, __be32 seq);
extern void xfrm_replay_advance(struct xfrm_state *x, __be32 seq);
extern void xfrm_replay_notify(struct xfrm_state *x, int event);