blob: 6610b2198fa99c63fdbbbe533256548e0fdcaa28 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001// SPDX-License-Identifier: GPL-2.0
Linus Torvalds1da177e2005-04-16 15:20:36 -07002/*
3 * xfrm6_state.c: based on xfrm4_state.c
4 *
5 * Authors:
6 * Mitsuru KANDA @USAGI
Ian Morris67ba4152014-08-24 21:53:10 +01007 * Kazunori MIYAZAWA @USAGI
8 * Kunihiro Ishiguro <kunihiro@ipinfusion.com>
9 * IPv6 support
10 * YOSHIFUJI Hideaki @USAGI
11 * Split up af-specific portion
YOSHIFUJI Hideaki1ab14572007-02-09 23:24:49 +090012 *
Linus Torvalds1da177e2005-04-16 15:20:36 -070013 */
14
15#include <net/xfrm.h>
Herbert Xu36cf9ac2007-11-13 21:40:52 -080016
Linus Torvalds1da177e2005-04-16 15:20:36 -070017static struct xfrm_state_afinfo xfrm6_state_afinfo = {
18 .family = AF_INET6,
Herbert Xu36cf9ac2007-11-13 21:40:52 -080019 .proto = IPPROTO_IPV6,
Miika Komucdca7262007-02-06 14:24:56 -080020 .output = xfrm6_output,
Herbert Xu716062f2007-11-13 21:44:23 -080021 .transport_finish = xfrm6_transport_finish,
Hannes Frederic Sowa628e3412013-08-14 13:05:23 +020022 .local_error = xfrm6_local_error,
Linus Torvalds1da177e2005-04-16 15:20:36 -070023};
24
Daniel Lezcano0013cab2007-12-07 00:42:11 -080025int __init xfrm6_state_init(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -070026{
Daniel Lezcano0013cab2007-12-07 00:42:11 -080027 return xfrm_state_register_afinfo(&xfrm6_state_afinfo);
Linus Torvalds1da177e2005-04-16 15:20:36 -070028}
29
30void xfrm6_state_fini(void)
31{
32 xfrm_state_unregister_afinfo(&xfrm6_state_afinfo);
33}