aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/xfrm.h
diff options
context:
space:
mode:
authorArnaud Ebalard <arno@natisbad.org>2008-10-05 16:33:42 -0400
committerDavid S. Miller <davem@davemloft.net>2008-10-05 16:33:42 -0400
commit13c1d18931ebb5cf407cb348ef2cd6284d68902d (patch)
tree6d590f85e48b4cce8f67e42c65b88fce8fcc49c6 /include/net/xfrm.h
parent95430c0b140c31cb9e39f876afe1c0e9947d1aaf (diff)
xfrm: MIGRATE enhancements (draft-ebalard-mext-pfkey-enhanced-migrate)
Provides implementation of the enhancements of XFRM/PF_KEY MIGRATE mechanism specified in draft-ebalard-mext-pfkey-enhanced-migrate-00. Defines associated PF_KEY SADB_X_EXT_KMADDRESS extension and XFRM/netlink XFRMA_KMADDRESS attribute. Signed-off-by: Arnaud Ebalard <arno@natisbad.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/xfrm.h')
-rw-r--r--include/net/xfrm.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index b98d2056f27f..11c890ad8ebb 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -492,6 +492,13 @@ struct xfrm_policy
492 struct xfrm_tmpl xfrm_vec[XFRM_MAX_DEPTH]; 492 struct xfrm_tmpl xfrm_vec[XFRM_MAX_DEPTH];
493}; 493};
494 494
495struct xfrm_kmaddress {
496 xfrm_address_t local;
497 xfrm_address_t remote;
498 u32 reserved;
499 u16 family;
500};
501
495struct xfrm_migrate { 502struct xfrm_migrate {
496 xfrm_address_t old_daddr; 503 xfrm_address_t old_daddr;
497 xfrm_address_t old_saddr; 504 xfrm_address_t old_saddr;
@@ -531,7 +538,7 @@ struct xfrm_mgr
531 int (*new_mapping)(struct xfrm_state *x, xfrm_address_t *ipaddr, __be16 sport); 538 int (*new_mapping)(struct xfrm_state *x, xfrm_address_t *ipaddr, __be16 sport);
532 int (*notify_policy)(struct xfrm_policy *x, int dir, struct km_event *c); 539 int (*notify_policy)(struct xfrm_policy *x, int dir, struct km_event *c);
533 int (*report)(u8 proto, struct xfrm_selector *sel, xfrm_address_t *addr); 540 int (*report)(u8 proto, struct xfrm_selector *sel, xfrm_address_t *addr);
534 int (*migrate)(struct xfrm_selector *sel, u8 dir, u8 type, struct xfrm_migrate *m, int num_bundles); 541 int (*migrate)(struct xfrm_selector *sel, u8 dir, u8 type, struct xfrm_migrate *m, int num_bundles, struct xfrm_kmaddress *k);
535}; 542};
536 543
537extern int xfrm_register_km(struct xfrm_mgr *km); 544extern int xfrm_register_km(struct xfrm_mgr *km);
@@ -1432,12 +1439,14 @@ extern int xfrm_bundle_ok(struct xfrm_policy *pol, struct xfrm_dst *xdst,
1432 1439
1433#ifdef CONFIG_XFRM_MIGRATE 1440#ifdef CONFIG_XFRM_MIGRATE
1434extern int km_migrate(struct xfrm_selector *sel, u8 dir, u8 type, 1441extern int km_migrate(struct xfrm_selector *sel, u8 dir, u8 type,
1435 struct xfrm_migrate *m, int num_bundles); 1442 struct xfrm_migrate *m, int num_bundles,
1443 struct xfrm_kmaddress *k);
1436extern struct xfrm_state * xfrm_migrate_state_find(struct xfrm_migrate *m); 1444extern struct xfrm_state * xfrm_migrate_state_find(struct xfrm_migrate *m);
1437extern struct xfrm_state * xfrm_state_migrate(struct xfrm_state *x, 1445extern struct xfrm_state * xfrm_state_migrate(struct xfrm_state *x,
1438 struct xfrm_migrate *m); 1446 struct xfrm_migrate *m);
1439extern int xfrm_migrate(struct xfrm_selector *sel, u8 dir, u8 type, 1447extern int xfrm_migrate(struct xfrm_selector *sel, u8 dir, u8 type,
1440 struct xfrm_migrate *m, int num_bundles); 1448 struct xfrm_migrate *m, int num_bundles,
1449 struct xfrm_kmaddress *k);
1441#endif 1450#endif
1442 1451
1443extern wait_queue_head_t km_waitq; 1452extern wait_queue_head_t km_waitq;