Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
xfrm_state.c File Reference
#include <linux/workqueue.h>
#include <net/xfrm.h>
#include <linux/pfkeyv2.h>
#include <linux/ipsec.h>
#include <linux/module.h>
#include <linux/cache.h>
#include <linux/audit.h>
#include <asm/uaccess.h>
#include <linux/ktime.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include "xfrm_hash.h"

Go to the source code of this file.

Functions

int __xfrm_state_delete (struct xfrm_state *x)
 
int km_query (struct xfrm_state *x, struct xfrm_tmpl *t, struct xfrm_policy *pol)
 
void km_state_expired (struct xfrm_state *x, int hard, u32 portid)
 
int xfrm_register_type (const struct xfrm_type *type, unsigned short family)
 
 EXPORT_SYMBOL (xfrm_register_type)
 
int xfrm_unregister_type (const struct xfrm_type *type, unsigned short family)
 
 EXPORT_SYMBOL (xfrm_unregister_type)
 
int xfrm_register_mode (struct xfrm_mode *mode, int family)
 
 EXPORT_SYMBOL (xfrm_register_mode)
 
int xfrm_unregister_mode (struct xfrm_mode *mode, int family)
 
 EXPORT_SYMBOL (xfrm_unregister_mode)
 
struct xfrm_statexfrm_state_alloc (struct net *net)
 
 EXPORT_SYMBOL (xfrm_state_alloc)
 
void __xfrm_state_destroy (struct xfrm_state *x)
 
 EXPORT_SYMBOL (__xfrm_state_destroy)
 
 EXPORT_SYMBOL (__xfrm_state_delete)
 
int xfrm_state_delete (struct xfrm_state *x)
 
 EXPORT_SYMBOL (xfrm_state_delete)
 
int xfrm_state_flush (struct net *net, u8 proto, struct xfrm_audit *audit_info)
 
 EXPORT_SYMBOL (xfrm_state_flush)
 
void xfrm_sad_getinfo (struct net *net, struct xfrmk_sadinfo *si)
 
 EXPORT_SYMBOL (xfrm_sad_getinfo)
 
struct xfrm_statexfrm_state_find (const xfrm_address_t *daddr, const xfrm_address_t *saddr, const struct flowi *fl, struct xfrm_tmpl *tmpl, struct xfrm_policy *pol, int *err, unsigned short family)
 
struct xfrm_statexfrm_stateonly_find (struct net *net, u32 mark, xfrm_address_t *daddr, xfrm_address_t *saddr, unsigned short family, u8 mode, u8 proto, u32 reqid)
 
 EXPORT_SYMBOL (xfrm_stateonly_find)
 
void xfrm_state_insert (struct xfrm_state *x)
 
 EXPORT_SYMBOL (xfrm_state_insert)
 
int xfrm_state_add (struct xfrm_state *x)
 
 EXPORT_SYMBOL (xfrm_state_add)
 
int xfrm_state_update (struct xfrm_state *x)
 
 EXPORT_SYMBOL (xfrm_state_update)
 
int xfrm_state_check_expire (struct xfrm_state *x)
 
 EXPORT_SYMBOL (xfrm_state_check_expire)
 
struct xfrm_statexfrm_state_lookup (struct net *net, u32 mark, const xfrm_address_t *daddr, __be32 spi, u8 proto, unsigned short family)
 
 EXPORT_SYMBOL (xfrm_state_lookup)
 
struct xfrm_statexfrm_state_lookup_byaddr (struct net *net, u32 mark, const xfrm_address_t *daddr, const xfrm_address_t *saddr, u8 proto, unsigned short family)
 
 EXPORT_SYMBOL (xfrm_state_lookup_byaddr)
 
struct xfrm_statexfrm_find_acq (struct net *net, struct xfrm_mark *mark, u8 mode, u32 reqid, u8 proto, const xfrm_address_t *daddr, const xfrm_address_t *saddr, int create, unsigned short family)
 
 EXPORT_SYMBOL (xfrm_find_acq)
 
struct xfrm_statexfrm_find_acq_byseq (struct net *net, u32 mark, u32 seq)
 
 EXPORT_SYMBOL (xfrm_find_acq_byseq)
 
u32 xfrm_get_acqseq (void)
 
 EXPORT_SYMBOL (xfrm_get_acqseq)
 
int xfrm_alloc_spi (struct xfrm_state *x, u32 low, u32 high)
 
 EXPORT_SYMBOL (xfrm_alloc_spi)
 
int xfrm_state_walk (struct net *net, struct xfrm_state_walk *walk, int(*func)(struct xfrm_state *, int, void *), void *data)
 
 EXPORT_SYMBOL (xfrm_state_walk)
 
void xfrm_state_walk_init (struct xfrm_state_walk *walk, u8 proto)
 
 EXPORT_SYMBOL (xfrm_state_walk_init)
 
void xfrm_state_walk_done (struct xfrm_state_walk *walk)
 
 EXPORT_SYMBOL (xfrm_state_walk_done)
 
void km_policy_notify (struct xfrm_policy *xp, int dir, const struct km_event *c)
 
void km_state_notify (struct xfrm_state *x, const struct km_event *c)
 
 EXPORT_SYMBOL (km_policy_notify)
 
 EXPORT_SYMBOL (km_state_notify)
 
 EXPORT_SYMBOL (km_state_expired)
 
 EXPORT_SYMBOL (km_query)
 
int km_new_mapping (struct xfrm_state *x, xfrm_address_t *ipaddr, __be16 sport)
 
 EXPORT_SYMBOL (km_new_mapping)
 
void km_policy_expired (struct xfrm_policy *pol, int dir, int hard, u32 portid)
 
 EXPORT_SYMBOL (km_policy_expired)
 
int km_report (struct net *net, u8 proto, struct xfrm_selector *sel, xfrm_address_t *addr)
 
 EXPORT_SYMBOL (km_report)
 
int xfrm_user_policy (struct sock *sk, int optname, u8 __user *optval, int optlen)
 
 EXPORT_SYMBOL (xfrm_user_policy)
 
int xfrm_register_km (struct xfrm_mgr *km)
 
 EXPORT_SYMBOL (xfrm_register_km)
 
int xfrm_unregister_km (struct xfrm_mgr *km)
 
 EXPORT_SYMBOL (xfrm_unregister_km)
 
int xfrm_state_register_afinfo (struct xfrm_state_afinfo *afinfo)
 
 EXPORT_SYMBOL (xfrm_state_register_afinfo)
 
int xfrm_state_unregister_afinfo (struct xfrm_state_afinfo *afinfo)
 
 EXPORT_SYMBOL (xfrm_state_unregister_afinfo)
 
void xfrm_state_delete_tunnel (struct xfrm_state *x)
 
 EXPORT_SYMBOL (xfrm_state_delete_tunnel)
 
int xfrm_state_mtu (struct xfrm_state *x, int mtu)
 
int __xfrm_init_state (struct xfrm_state *x, bool init_replay)
 
 EXPORT_SYMBOL (__xfrm_init_state)
 
int xfrm_init_state (struct xfrm_state *x)
 
 EXPORT_SYMBOL (xfrm_init_state)
 
int __net_init xfrm_state_init (struct net *net)
 
void xfrm_state_fini (struct net *net)
 

Function Documentation

int __xfrm_init_state ( struct xfrm_state x,
bool  init_replay 
)

Definition at line 1927 of file xfrm_state.c.

int __xfrm_state_delete ( struct xfrm_state x)

Definition at line 541 of file xfrm_state.c.

void __xfrm_state_destroy ( struct xfrm_state x)

Definition at line 528 of file xfrm_state.c.

EXPORT_SYMBOL ( xfrm_register_type  )
EXPORT_SYMBOL ( xfrm_unregister_type  )
EXPORT_SYMBOL ( xfrm_register_mode  )
EXPORT_SYMBOL ( xfrm_unregister_mode  )
EXPORT_SYMBOL ( xfrm_state_alloc  )
EXPORT_SYMBOL ( __xfrm_state_destroy  )
EXPORT_SYMBOL ( __xfrm_state_delete  )
EXPORT_SYMBOL ( xfrm_state_delete  )
EXPORT_SYMBOL ( xfrm_state_flush  )
EXPORT_SYMBOL ( xfrm_sad_getinfo  )
EXPORT_SYMBOL ( xfrm_stateonly_find  )
EXPORT_SYMBOL ( xfrm_state_insert  )
EXPORT_SYMBOL ( xfrm_state_add  )
EXPORT_SYMBOL ( xfrm_state_update  )
EXPORT_SYMBOL ( xfrm_state_check_expire  )
EXPORT_SYMBOL ( xfrm_state_lookup  )
EXPORT_SYMBOL ( xfrm_state_lookup_byaddr  )
EXPORT_SYMBOL ( xfrm_find_acq  )
EXPORT_SYMBOL ( xfrm_find_acq_byseq  )
EXPORT_SYMBOL ( xfrm_get_acqseq  )
EXPORT_SYMBOL ( xfrm_alloc_spi  )
EXPORT_SYMBOL ( xfrm_state_walk  )
EXPORT_SYMBOL ( xfrm_state_walk_init  )
EXPORT_SYMBOL ( xfrm_state_walk_done  )
EXPORT_SYMBOL ( km_policy_notify  )
EXPORT_SYMBOL ( km_state_notify  )
EXPORT_SYMBOL ( km_state_expired  )
EXPORT_SYMBOL ( km_query  )
EXPORT_SYMBOL ( km_new_mapping  )
EXPORT_SYMBOL ( km_policy_expired  )
EXPORT_SYMBOL ( km_report  )
EXPORT_SYMBOL ( xfrm_user_policy  )
EXPORT_SYMBOL ( xfrm_register_km  )
EXPORT_SYMBOL ( xfrm_unregister_km  )
EXPORT_SYMBOL ( xfrm_state_register_afinfo  )
EXPORT_SYMBOL ( xfrm_state_unregister_afinfo  )
EXPORT_SYMBOL ( xfrm_state_delete_tunnel  )
EXPORT_SYMBOL ( __xfrm_init_state  )
EXPORT_SYMBOL ( xfrm_init_state  )
int km_new_mapping ( struct xfrm_state x,
xfrm_address_t ipaddr,
__be16  sport 
)

Definition at line 1712 of file xfrm_state.c.

void km_policy_expired ( struct xfrm_policy pol,
int  dir,
int  hard,
u32  portid 
)

Definition at line 1729 of file xfrm_state.c.

void km_policy_notify ( struct xfrm_policy xp,
int  dir,
const struct km_event c 
)

Definition at line 1653 of file xfrm_state.c.

int km_query ( struct xfrm_state x,
struct xfrm_tmpl t,
struct xfrm_policy pol 
)

Definition at line 1696 of file xfrm_state.c.

int km_report ( struct net net,
u8  proto,
struct xfrm_selector sel,
xfrm_address_t addr 
)

Definition at line 1767 of file xfrm_state.c.

void km_state_expired ( struct xfrm_state x,
int  hard,
u32  portid 
)

Definition at line 1677 of file xfrm_state.c.

void km_state_notify ( struct xfrm_state x,
const struct km_event c 
)

Definition at line 1664 of file xfrm_state.c.

int xfrm_alloc_spi ( struct xfrm_state x,
u32  low,
u32  high 
)

Definition at line 1519 of file xfrm_state.c.

struct xfrm_state* xfrm_find_acq ( struct net net,
struct xfrm_mark mark,
u8  mode,
u32  reqid,
u8  proto,
const xfrm_address_t daddr,
const xfrm_address_t saddr,
int  create,
unsigned short  family 
)
read

Definition at line 1421 of file xfrm_state.c.

struct xfrm_state* xfrm_find_acq_byseq ( struct net net,
u32  mark,
u32  seq 
)
read

Definition at line 1495 of file xfrm_state.c.

u32 xfrm_get_acqseq ( void  )

Definition at line 1506 of file xfrm_state.c.

int xfrm_init_state ( struct xfrm_state x)

Definition at line 2016 of file xfrm_state.c.

int xfrm_register_km ( struct xfrm_mgr km)

Definition at line 1826 of file xfrm_state.c.

int xfrm_register_mode ( struct xfrm_mode mode,
int  family 
)

Definition at line 259 of file xfrm_state.c.

int xfrm_register_type ( const struct xfrm_type type,
unsigned short  family 
)

Definition at line 189 of file xfrm_state.c.

void xfrm_sad_getinfo ( struct net net,
struct xfrmk_sadinfo si 
)

Definition at line 657 of file xfrm_state.c.

int xfrm_state_add ( struct xfrm_state x)

Definition at line 1085 of file xfrm_state.c.

struct xfrm_state* xfrm_state_alloc ( struct net net)
read

Definition at line 496 of file xfrm_state.c.

int xfrm_state_check_expire ( struct xfrm_state x)

Definition at line 1368 of file xfrm_state.c.

int xfrm_state_delete ( struct xfrm_state x)

Definition at line 569 of file xfrm_state.c.

void xfrm_state_delete_tunnel ( struct xfrm_state x)

Definition at line 1899 of file xfrm_state.c.

struct xfrm_state* xfrm_state_find ( const xfrm_address_t daddr,
const xfrm_address_t saddr,
const struct flowi fl,
struct xfrm_tmpl tmpl,
struct xfrm_policy pol,
int err,
unsigned short  family 
)
read

Definition at line 801 of file xfrm_state.c.

void xfrm_state_fini ( struct net net)

Definition at line 2057 of file xfrm_state.c.

int xfrm_state_flush ( struct net net,
u8  proto,
struct xfrm_audit audit_info 
)

Definition at line 613 of file xfrm_state.c.

int __net_init xfrm_state_init ( struct net net)

Definition at line 2023 of file xfrm_state.c.

void xfrm_state_insert ( struct xfrm_state x)

Definition at line 998 of file xfrm_state.c.

struct xfrm_state* xfrm_state_lookup ( struct net net,
u32  mark,
const xfrm_address_t daddr,
__be32  spi,
u8  proto,
unsigned short  family 
)
read

Definition at line 1394 of file xfrm_state.c.

struct xfrm_state* xfrm_state_lookup_byaddr ( struct net net,
u32  mark,
const xfrm_address_t daddr,
const xfrm_address_t saddr,
u8  proto,
unsigned short  family 
)
read

Definition at line 1407 of file xfrm_state.c.

int xfrm_state_mtu ( struct xfrm_state x,
int  mtu 
)

Definition at line 1913 of file xfrm_state.c.

int xfrm_state_register_afinfo ( struct xfrm_state_afinfo afinfo)

Definition at line 1844 of file xfrm_state.c.

int xfrm_state_unregister_afinfo ( struct xfrm_state_afinfo afinfo)

Definition at line 1861 of file xfrm_state.c.

int xfrm_state_update ( struct xfrm_state x)

Definition at line 1297 of file xfrm_state.c.

int xfrm_state_walk ( struct net net,
struct xfrm_state_walk walk,
int(*)(struct xfrm_state *, int, void *)  func,
void data 
)

Definition at line 1574 of file xfrm_state.c.

void xfrm_state_walk_done ( struct xfrm_state_walk walk)

Definition at line 1623 of file xfrm_state.c.

void xfrm_state_walk_init ( struct xfrm_state_walk walk,
u8  proto 
)

Definition at line 1614 of file xfrm_state.c.

struct xfrm_state* xfrm_stateonly_find ( struct net net,
u32  mark,
xfrm_address_t daddr,
xfrm_address_t saddr,
unsigned short  family,
u8  mode,
u8  proto,
u32  reqid 
)
read

Definition at line 911 of file xfrm_state.c.

int xfrm_unregister_km ( struct xfrm_mgr km)

Definition at line 1835 of file xfrm_state.c.

int xfrm_unregister_mode ( struct xfrm_mode mode,
int  family 
)

Definition at line 291 of file xfrm_state.c.

int xfrm_unregister_type ( const struct xfrm_type type,
unsigned short  family 
)

Definition at line 208 of file xfrm_state.c.

int xfrm_user_policy ( struct sock sk,
int  optname,
u8 __user optval,
int  optlen 
)

Definition at line 1786 of file xfrm_state.c.