libnl: Lifetime Configuration Object

libnl 3.12.0

Lifetime Configuration Object

Abstract data type representing XFRM SA lifetime properties. More...

## Data Structures
struct | xfrmnl_sel

## Functions
void | xfrmnl_user_tmpl_free (struct xfrmnl_user_tmpl *utmpl)

## Variables
uint32_t | xfrmnl_sel::refcnt
struct nl_addr * | xfrmnl_sel::daddr
struct nl_addr * | xfrmnl_sel::saddr
uint16_t | xfrmnl_sel::dport
uint16_t | xfrmnl_sel::dport_mask
uint16_t | xfrmnl_sel::sport
uint16_t | xfrmnl_sel::sport_mask
uint16_t | xfrmnl_sel::family
uint8_t | xfrmnl_sel::prefixlen_d
uint8_t | xfrmnl_sel::prefixlen_s
uint8_t | xfrmnl_sel::proto
int32_t | xfrmnl_sel::ifindex
uint32_t | xfrmnl_sel::user

## XFRM Template Mode Translations
char * | xfrmnl_user_tmpl_mode2str (int mode, char *buf, size_t len)
int | xfrmnl_user_tmpl_str2mode (const char *name)

## Creating Selector
struct xfrmnl_ltime_cfg * | xfrmnl_ltime_cfg_alloc ()
| Allocate new lifetime config object.
struct xfrmnl_ltime_cfg * | xfrmnl_ltime_cfg_clone (struct xfrmnl_ltime_cfg *ltime)
| Clone existing lifetime config object.

## Managing Usage References
struct xfrmnl_ltime_cfg * | xfrmnl_ltime_cfg_get (struct xfrmnl_ltime_cfg *ltime)
void | xfrmnl_ltime_cfg_put (struct xfrmnl_ltime_cfg *ltime)
int | xfrmnl_ltime_cfg_shared (struct xfrmnl_ltime_cfg *ltime)
| Check whether an lifetime config object is shared.

## Miscellaneous
int | xfrmnl_ltime_cfg_cmp (struct xfrmnl_ltime_cfg *a, struct xfrmnl_ltime_cfg *b)
| Compares two lifetime config objects.

## Attributes
unsigned long long | xfrmnl_ltime_cfg_get_soft_bytelimit (struct xfrmnl_ltime_cfg *ltime)
int | xfrmnl_ltime_cfg_set_soft_bytelimit (struct xfrmnl_ltime_cfg *ltime, unsigned long long soft_byte_limit)
unsigned long long | xfrmnl_ltime_cfg_get_hard_bytelimit (struct xfrmnl_ltime_cfg *ltime)
int | xfrmnl_ltime_cfg_set_hard_bytelimit (struct xfrmnl_ltime_cfg *ltime, unsigned long long hard_byte_limit)
unsigned long long | xfrmnl_ltime_cfg_get_soft_packetlimit (struct xfrmnl_ltime_cfg *ltime)
int | xfrmnl_ltime_cfg_set_soft_packetlimit (struct xfrmnl_ltime_cfg *ltime, unsigned long long soft_packet_limit)
unsigned long long | xfrmnl_ltime_cfg_get_hard_packetlimit (struct xfrmnl_ltime_cfg *ltime)
int | xfrmnl_ltime_cfg_set_hard_packetlimit (struct xfrmnl_ltime_cfg *ltime, unsigned long long hard_packet_limit)
unsigned long long | xfrmnl_ltime_cfg_get_soft_addexpires (struct xfrmnl_ltime_cfg *ltime)
int | xfrmnl_ltime_cfg_set_soft_addexpires (struct xfrmnl_ltime_cfg *ltime, unsigned long long soft_add_expires_seconds)
unsigned long long | xfrmnl_ltime_cfg_get_hard_addexpires (struct xfrmnl_ltime_cfg *ltime)
int | xfrmnl_ltime_cfg_set_hard_addexpires (struct xfrmnl_ltime_cfg *ltime, unsigned long long hard_add_expires_seconds)
unsigned long long | xfrmnl_ltime_cfg_get_soft_useexpires (struct xfrmnl_ltime_cfg *ltime)
int | xfrmnl_ltime_cfg_set_soft_useexpires (struct xfrmnl_ltime_cfg *ltime, unsigned long long soft_use_expires_seconds)
unsigned long long | xfrmnl_ltime_cfg_get_hard_useexpires (struct xfrmnl_ltime_cfg *ltime)
int | xfrmnl_ltime_cfg_set_hard_useexpires (struct xfrmnl_ltime_cfg *ltime, unsigned long long hard_use_expires_seconds)

## Creating Selector
struct xfrmnl_sel * | xfrmnl_sel_alloc ()
| Allocate new selector object.
struct xfrmnl_sel * | xfrmnl_sel_clone (struct xfrmnl_sel *sel)
| Clone existing selector object.

## Managing Usage References
struct xfrmnl_sel * | xfrmnl_sel_get (struct xfrmnl_sel *sel)
void | xfrmnl_sel_put (struct xfrmnl_sel *sel)
int | xfrmnl_sel_shared (struct xfrmnl_sel *sel)
| Check whether an selector object is shared.

## Miscellaneous
int | xfrmnl_sel_cmp (struct xfrmnl_sel *a, struct xfrmnl_sel *b)
| Compares two selector objects.
void | xfrmnl_sel_dump (struct xfrmnl_sel *sel, struct nl_dump_params *p)

## Attributes
struct nl_addr * | xfrmnl_sel_get_daddr (struct xfrmnl_sel *sel)
int | xfrmnl_sel_set_daddr (struct xfrmnl_sel *sel, struct nl_addr *addr)
struct nl_addr * | xfrmnl_sel_get_saddr (struct xfrmnl_sel *sel)
int | xfrmnl_sel_set_saddr (struct xfrmnl_sel *sel, struct nl_addr *addr)
int | xfrmnl_sel_get_dport (struct xfrmnl_sel *sel)
int | xfrmnl_sel_set_dport (struct xfrmnl_sel *sel, unsigned int dport)
int | xfrmnl_sel_get_dportmask (struct xfrmnl_sel *sel)
int | xfrmnl_sel_set_dportmask (struct xfrmnl_sel *sel, unsigned int dport_mask)
int | xfrmnl_sel_get_sport (struct xfrmnl_sel *sel)
int | xfrmnl_sel_set_sport (struct xfrmnl_sel *sel, unsigned int sport)
int | xfrmnl_sel_get_sportmask (struct xfrmnl_sel *sel)
int | xfrmnl_sel_set_sportmask (struct xfrmnl_sel *sel, unsigned int sport_mask)
int | xfrmnl_sel_get_family (struct xfrmnl_sel *sel)
int | xfrmnl_sel_set_family (struct xfrmnl_sel *sel, unsigned int family)
int | xfrmnl_sel_get_prefixlen_d (struct xfrmnl_sel *sel)
int | xfrmnl_sel_set_prefixlen_d (struct xfrmnl_sel *sel, unsigned int prefixlen)
int | xfrmnl_sel_get_prefixlen_s (struct xfrmnl_sel *sel)
int | xfrmnl_sel_set_prefixlen_s (struct xfrmnl_sel *sel, unsigned int prefixlen)
int | xfrmnl_sel_get_proto (struct xfrmnl_sel *sel)
int | xfrmnl_sel_set_proto (struct xfrmnl_sel *sel, unsigned int protocol)
int | xfrmnl_sel_get_ifindex (struct xfrmnl_sel *sel)
int | xfrmnl_sel_set_ifindex (struct xfrmnl_sel *sel, unsigned int ifindex)
int | xfrmnl_sel_get_userid (struct xfrmnl_sel *sel)
int | xfrmnl_sel_set_userid (struct xfrmnl_sel *sel, unsigned int userid)

## Creating User Template Object
struct xfrmnl_user_tmpl * | xfrmnl_user_tmpl_alloc ()
| Allocate new user template object.
struct xfrmnl_user_tmpl * | xfrmnl_user_tmpl_clone (struct xfrmnl_user_tmpl *utmpl)
| Clone existing user template object.

## Miscellaneous
int | xfrmnl_user_tmpl_cmp (struct xfrmnl_user_tmpl *a, struct xfrmnl_user_tmpl *b)
| Compares two user template objects.
void | xfrmnl_user_tmpl_dump (struct xfrmnl_user_tmpl *tmpl, struct nl_dump_params *p)

## Attributes
struct nl_addr * | xfrmnl_user_tmpl_get_daddr (struct xfrmnl_user_tmpl *utmpl)
int | xfrmnl_user_tmpl_set_daddr (struct xfrmnl_user_tmpl *utmpl, struct nl_addr *addr)
int | xfrmnl_user_tmpl_get_spi (struct xfrmnl_user_tmpl *utmpl)
int | xfrmnl_user_tmpl_set_spi (struct xfrmnl_user_tmpl *utmpl, unsigned int spi)
int | xfrmnl_user_tmpl_get_proto (struct xfrmnl_user_tmpl *utmpl)
int | xfrmnl_user_tmpl_set_proto (struct xfrmnl_user_tmpl *utmpl, unsigned int protocol)
int | xfrmnl_user_tmpl_get_family (struct xfrmnl_user_tmpl *utmpl)
int | xfrmnl_user_tmpl_set_family (struct xfrmnl_user_tmpl *utmpl, unsigned int family)
struct nl_addr * | xfrmnl_user_tmpl_get_saddr (struct xfrmnl_user_tmpl *utmpl)
int | xfrmnl_user_tmpl_set_saddr (struct xfrmnl_user_tmpl *utmpl, struct nl_addr *addr)
int | xfrmnl_user_tmpl_get_reqid (struct xfrmnl_user_tmpl *utmpl)
int | xfrmnl_user_tmpl_set_reqid (struct xfrmnl_user_tmpl *utmpl, unsigned int reqid)
int | xfrmnl_user_tmpl_get_mode (struct xfrmnl_user_tmpl *utmpl)
int | xfrmnl_user_tmpl_set_mode (struct xfrmnl_user_tmpl *utmpl, unsigned int mode)
int | xfrmnl_user_tmpl_get_share (struct xfrmnl_user_tmpl *utmpl)
int | xfrmnl_user_tmpl_set_share (struct xfrmnl_user_tmpl *utmpl, unsigned int share)
int | xfrmnl_user_tmpl_get_optional (struct xfrmnl_user_tmpl *utmpl)
int | xfrmnl_user_tmpl_set_optional (struct xfrmnl_user_tmpl *utmpl, unsigned int optional)
int | xfrmnl_user_tmpl_get_aalgos (struct xfrmnl_user_tmpl *utmpl)
int | xfrmnl_user_tmpl_set_aalgos (struct xfrmnl_user_tmpl *utmpl, unsigned int aalgos)
int | xfrmnl_user_tmpl_get_ealgos (struct xfrmnl_user_tmpl *utmpl)
int | xfrmnl_user_tmpl_set_ealgos (struct xfrmnl_user_tmpl *utmpl, unsigned int ealgos)
int | xfrmnl_user_tmpl_get_calgos (struct xfrmnl_user_tmpl *utmpl)
int | xfrmnl_user_tmpl_set_calgos (struct xfrmnl_user_tmpl *utmpl, unsigned int calgos)

## Detailed Description

Abstract data type representing XFRM SA lifetime properties.

Abstract data type representing XFRM SA properties.

Abstract data type representing XFRM SA/SP selector properties.

## Header

#include <netlink/xfrm/lifetime.h>

## Header

#include <netlink/xfrm/selector.h>

## Header

#include <netlink/xfrm/template.h>

## Function Documentation

## ◆ xfrmnl_ltime_cfg_alloc()

struct xfrmnl_ltime_cfg * xfrmnl_ltime_cfg_alloc | ( | void |  | ) |

Allocate new lifetime config object.

Returns
  Newly allocated lifetime config object or NULL

Definition at line 79 of file lifetime.c.

Referenced by xfrmnl_ltime_cfg_clone().

Here is the caller graph for this function:

## ◆ xfrmnl_ltime_cfg_clone()

struct xfrmnl_ltime_cfg * xfrmnl_ltime_cfg_clone | ( | struct xfrmnl_ltime_cfg * | ltime | ) |

Clone existing lifetime config object.

Parameters

  ltime | Selector object.

Returns
  Newly allocated lifetime config object being a duplicate of the specified lifetime config object or NULL if a failure occured.

Definition at line 98 of file lifetime.c.

References xfrmnl_ltime_cfg_alloc().

Here is the call graph for this function:

## ◆ xfrmnl_ltime_cfg_get()

struct xfrmnl_ltime_cfg * xfrmnl_ltime_cfg_get | ( | struct xfrmnl_ltime_cfg * | ltime | ) |

Definition at line 116 of file lifetime.c.

## ◆ xfrmnl_ltime_cfg_put()

void xfrmnl_ltime_cfg_put | ( | struct xfrmnl_ltime_cfg * | ltime | ) |

Definition at line 123 of file lifetime.c.

## ◆ xfrmnl_ltime_cfg_shared()

int xfrmnl_ltime_cfg_shared | ( | struct xfrmnl_ltime_cfg * | ltime | ) |

Check whether an lifetime config object is shared.

Parameters

  addr | Selector object.

Returns
  Non-zero if the lifetime config object is shared, otherwise 0.

Definition at line 139 of file lifetime.c.

## ◆ xfrmnl_ltime_cfg_cmp()

int xfrmnl_ltime_cfg_cmp | ( | struct xfrmnl_ltime_cfg * | a,
|  | struct xfrmnl_ltime_cfg * | b )

Compares two lifetime config objects.

Parameters

  a | A lifetime config object.
  b | Another lifetime config object.

Returns
  Non zero if difference is found, 0 otherwise if both the objects are identical.

Definition at line 159 of file lifetime.c.

## ◆ xfrmnl_ltime_cfg_get_soft_bytelimit()

unsigned long long xfrmnl_ltime_cfg_get_soft_bytelimit | ( | struct xfrmnl_ltime_cfg * | ltime | ) |

Definition at line 182 of file lifetime.c.

## ◆ xfrmnl_ltime_cfg_set_soft_bytelimit()

int xfrmnl_ltime_cfg_set_soft_bytelimit | ( | struct xfrmnl_ltime_cfg * | ltime,
|  | unsigned long long | soft_byte_limit )

Definition at line 187 of file lifetime.c.

## ◆ xfrmnl_ltime_cfg_get_hard_bytelimit()

unsigned long long xfrmnl_ltime_cfg_get_hard_bytelimit | ( | struct xfrmnl_ltime_cfg * | ltime | ) |

Definition at line 194 of file lifetime.c.

## ◆ xfrmnl_ltime_cfg_set_hard_bytelimit()

int xfrmnl_ltime_cfg_set_hard_bytelimit | ( | struct xfrmnl_ltime_cfg * | ltime,
|  | unsigned long long | hard_byte_limit )

Definition at line 199 of file lifetime.c.

## ◆ xfrmnl_ltime_cfg_get_soft_packetlimit()

unsigned long long xfrmnl_ltime_cfg_get_soft_packetlimit | ( | struct xfrmnl_ltime_cfg * | ltime | ) |

Definition at line 206 of file lifetime.c.

## ◆ xfrmnl_ltime_cfg_set_soft_packetlimit()

int xfrmnl_ltime_cfg_set_soft_packetlimit | ( | struct xfrmnl_ltime_cfg * | ltime,
|  | unsigned long long | soft_packet_limit )

Definition at line 211 of file lifetime.c.

## ◆ xfrmnl_ltime_cfg_get_hard_packetlimit()

unsigned long long xfrmnl_ltime_cfg_get_hard_packetlimit | ( | struct xfrmnl_ltime_cfg * | ltime | ) |

Definition at line 218 of file lifetime.c.

## ◆ xfrmnl_ltime_cfg_set_hard_packetlimit()

int xfrmnl_ltime_cfg_set_hard_packetlimit | ( | struct xfrmnl_ltime_cfg * | ltime,
|  | unsigned long long | hard_packet_limit )

Definition at line 223 of file lifetime.c.

## ◆ xfrmnl_ltime_cfg_get_soft_addexpires()

unsigned long long xfrmnl_ltime_cfg_get_soft_addexpires | ( | struct xfrmnl_ltime_cfg * | ltime | ) |

Definition at line 230 of file lifetime.c.

## ◆ xfrmnl_ltime_cfg_set_soft_addexpires()

int xfrmnl_ltime_cfg_set_soft_addexpires | ( | struct xfrmnl_ltime_cfg * | ltime,
|  | unsigned long long | soft_add_expires_seconds )

Definition at line 235 of file lifetime.c.

## ◆ xfrmnl_ltime_cfg_get_hard_addexpires()

unsigned long long xfrmnl_ltime_cfg_get_hard_addexpires | ( | struct xfrmnl_ltime_cfg * | ltime | ) |

Definition at line 242 of file lifetime.c.

## ◆ xfrmnl_ltime_cfg_set_hard_addexpires()

int xfrmnl_ltime_cfg_set_hard_addexpires | ( | struct xfrmnl_ltime_cfg * | ltime,
|  | unsigned long long | hard_add_expires_seconds )

Definition at line 247 of file lifetime.c.

## ◆ xfrmnl_ltime_cfg_get_soft_useexpires()

unsigned long long xfrmnl_ltime_cfg_get_soft_useexpires | ( | struct xfrmnl_ltime_cfg * | ltime | ) |

Definition at line 254 of file lifetime.c.

## ◆ xfrmnl_ltime_cfg_set_soft_useexpires()

int xfrmnl_ltime_cfg_set_soft_useexpires | ( | struct xfrmnl_ltime_cfg * | ltime,
|  | unsigned long long | soft_use_expires_seconds )

Definition at line 259 of file lifetime.c.

## ◆ xfrmnl_ltime_cfg_get_hard_useexpires()

unsigned long long xfrmnl_ltime_cfg_get_hard_useexpires | ( | struct xfrmnl_ltime_cfg * | ltime | ) |

Definition at line 266 of file lifetime.c.

## ◆ xfrmnl_ltime_cfg_set_hard_useexpires()

int xfrmnl_ltime_cfg_set_hard_useexpires | ( | struct xfrmnl_ltime_cfg * | ltime,
|  | unsigned long long | hard_use_expires_seconds )

Definition at line 271 of file lifetime.c.

## ◆ xfrmnl_sel_alloc()

struct xfrmnl_sel * xfrmnl_sel_alloc | ( | void |  | ) |

Allocate new selector object.

Returns
  Newly allocated selector object or NULL

Definition at line 96 of file selector.c.

Referenced by xfrmnl_sel_clone().

Here is the caller graph for this function:

## ◆ xfrmnl_sel_clone()

struct xfrmnl_sel * xfrmnl_sel_clone | ( | struct xfrmnl_sel * | sel | ) |

Clone existing selector object.

Parameters

  sel | Selector object.

Returns
  Newly allocated selector object being a duplicate of the specified selector object or NULL if a failure occured.

Definition at line 115 of file selector.c.

References nl_addr_clone(), and xfrmnl_sel_alloc().

Here is the call graph for this function:

## ◆ xfrmnl_sel_get()

struct xfrmnl_sel * xfrmnl_sel_get | ( | struct xfrmnl_sel * | sel | ) |

Definition at line 137 of file selector.c.

## ◆ xfrmnl_sel_put()

void xfrmnl_sel_put | ( | struct xfrmnl_sel * | sel | ) |

Definition at line 144 of file selector.c.

## ◆ xfrmnl_sel_shared()

int xfrmnl_sel_shared | ( | struct xfrmnl_sel * | sel | ) |

Check whether an selector object is shared.

Parameters

  addr | Selector object.

Returns
  Non-zero if the selector object is shared, otherwise 0.

Definition at line 160 of file selector.c.

## ◆ xfrmnl_sel_cmp()

int xfrmnl_sel_cmp | ( | struct xfrmnl_sel * | a,
|  | struct xfrmnl_sel * | b )

Compares two selector objects.

Parameters

  a | A selector object.
  b | Another selector object.

Returns
  Non zero if difference is found, 0 otherwise if both the objects are identical.

Definition at line 180 of file selector.c.

References nl_addr_cmp_prefix().

Here is the call graph for this function:

## ◆ xfrmnl_sel_dump()

void xfrmnl_sel_dump | ( | struct xfrmnl_sel * | sel,
|  | struct nl_dump_params * | p )

Definition at line 197 of file selector.c.

## ◆ xfrmnl_sel_get_daddr()

struct nl_addr * xfrmnl_sel_get_daddr | ( | struct xfrmnl_sel * | sel | ) |

Definition at line 219 of file selector.c.

## ◆ xfrmnl_sel_set_daddr()

int xfrmnl_sel_set_daddr | ( | struct xfrmnl_sel * | sel,
|  | struct nl_addr * | addr )

Definition at line 224 of file selector.c.

## ◆ xfrmnl_sel_get_saddr()

struct nl_addr * xfrmnl_sel_get_saddr | ( | struct xfrmnl_sel * | sel | ) |

Definition at line 235 of file selector.c.

## ◆ xfrmnl_sel_set_saddr()

int xfrmnl_sel_set_saddr | ( | struct xfrmnl_sel * | sel,
|  | struct nl_addr * | addr )

Definition at line 240 of file selector.c.

## ◆ xfrmnl_sel_get_dport()

int xfrmnl_sel_get_dport | ( | struct xfrmnl_sel * | sel | ) |

Definition at line 251 of file selector.c.

## ◆ xfrmnl_sel_set_dport()

int xfrmnl_sel_set_dport | ( | struct xfrmnl_sel * | sel,
|  | unsigned int | dport )

Definition at line 256 of file selector.c.

## ◆ xfrmnl_sel_get_dportmask()

int xfrmnl_sel_get_dportmask | ( | struct xfrmnl_sel * | sel | ) |

Definition at line 263 of file selector.c.

## ◆ xfrmnl_sel_set_dportmask()

int xfrmnl_sel_set_dportmask | ( | struct xfrmnl_sel * | sel,
|  | unsigned int | dport_mask )

Definition at line 268 of file selector.c.

## ◆ xfrmnl_sel_get_sport()

int xfrmnl_sel_get_sport | ( | struct xfrmnl_sel * | sel | ) |

Definition at line 275 of file selector.c.

## ◆ xfrmnl_sel_set_sport()

int xfrmnl_sel_set_sport | ( | struct xfrmnl_sel * | sel,
|  | unsigned int | sport )

Definition at line 280 of file selector.c.

## ◆ xfrmnl_sel_get_sportmask()

int xfrmnl_sel_get_sportmask | ( | struct xfrmnl_sel * | sel | ) |

Definition at line 287 of file selector.c.

## ◆ xfrmnl_sel_set_sportmask()

int xfrmnl_sel_set_sportmask | ( | struct xfrmnl_sel * | sel,
|  | unsigned int | sport_mask )

Definition at line 292 of file selector.c.

## ◆ xfrmnl_sel_get_family()

int xfrmnl_sel_get_family | ( | struct xfrmnl_sel * | sel | ) |

Definition at line 299 of file selector.c.

## ◆ xfrmnl_sel_set_family()

int xfrmnl_sel_set_family | ( | struct xfrmnl_sel * | sel,
|  | unsigned int | family )

Definition at line 304 of file selector.c.

## ◆ xfrmnl_sel_get_prefixlen_d()

int xfrmnl_sel_get_prefixlen_d | ( | struct xfrmnl_sel * | sel | ) |

Definition at line 311 of file selector.c.

## ◆ xfrmnl_sel_set_prefixlen_d()

int xfrmnl_sel_set_prefixlen_d | ( | struct xfrmnl_sel * | sel,
|  | unsigned int | prefixlen )

Definition at line 316 of file selector.c.

## ◆ xfrmnl_sel_get_prefixlen_s()

int xfrmnl_sel_get_prefixlen_s | ( | struct xfrmnl_sel * | sel | ) |

Definition at line 323 of file selector.c.

## ◆ xfrmnl_sel_set_prefixlen_s()

int xfrmnl_sel_set_prefixlen_s | ( | struct xfrmnl_sel * | sel,
|  | unsigned int | prefixlen )

Definition at line 328 of file selector.c.

## ◆ xfrmnl_sel_get_proto()

int xfrmnl_sel_get_proto | ( | struct xfrmnl_sel * | sel | ) |

Definition at line 335 of file selector.c.

## ◆ xfrmnl_sel_set_proto()

int xfrmnl_sel_set_proto | ( | struct xfrmnl_sel * | sel,
|  | unsigned int | protocol )

Definition at line 340 of file selector.c.

## ◆ xfrmnl_sel_get_ifindex()

int xfrmnl_sel_get_ifindex | ( | struct xfrmnl_sel * | sel | ) |

Definition at line 347 of file selector.c.

## ◆ xfrmnl_sel_set_ifindex()

int xfrmnl_sel_set_ifindex | ( | struct xfrmnl_sel * | sel,
|  | unsigned int | ifindex )

Definition at line 352 of file selector.c.

## ◆ xfrmnl_sel_get_userid()

int xfrmnl_sel_get_userid | ( | struct xfrmnl_sel * | sel | ) |

Definition at line 359 of file selector.c.

## ◆ xfrmnl_sel_set_userid()

int xfrmnl_sel_set_userid | ( | struct xfrmnl_sel * | sel,
|  | unsigned int | userid )

Definition at line 364 of file selector.c.

## ◆ xfrmnl_user_tmpl_free()

void xfrmnl_user_tmpl_free | ( | struct xfrmnl_user_tmpl * | utmpl | ) |

Definition at line 57 of file template.c.

## ◆ xfrmnl_user_tmpl_alloc()

struct xfrmnl_user_tmpl * xfrmnl_user_tmpl_alloc | ( | void |  | ) |

Allocate new user template object.

Returns
  Newly allocated user template object or NULL

Definition at line 76 of file template.c.

Referenced by xfrmnl_user_tmpl_clone().

Here is the caller graph for this function:

## ◆ xfrmnl_user_tmpl_clone()

struct xfrmnl_user_tmpl * xfrmnl_user_tmpl_clone | ( | struct xfrmnl_user_tmpl * | utmpl | ) |

Clone existing user template object.

Parameters

  utmpl | Selector object.

Returns
  Newly allocated user template object being a duplicate of the specified user template object or NULL if a failure occured.

Definition at line 95 of file template.c.

References nl_addr_clone(), and xfrmnl_user_tmpl_alloc().

Here is the call graph for this function:

## ◆ xfrmnl_user_tmpl_mode2str()

char * xfrmnl_user_tmpl_mode2str | ( | int | mode,
|  | char * | buf,
|  | size_t | len )

Definition at line 124 of file template.c.

## ◆ xfrmnl_user_tmpl_str2mode()

int xfrmnl_user_tmpl_str2mode | ( | const char * | name | ) |

Definition at line 129 of file template.c.

## ◆ xfrmnl_user_tmpl_cmp()

int xfrmnl_user_tmpl_cmp | ( | struct xfrmnl_user_tmpl * | a,
|  | struct xfrmnl_user_tmpl * | b )

Compares two user template objects.

Parameters

  a | A user template object.
  b | Another user template object.

Returns
  Non zero if difference is found, 0 otherwise if both the objects are identical.

Definition at line 148 of file template.c.

References nl_addr_cmp_prefix().

Here is the call graph for this function:

## ◆ xfrmnl_user_tmpl_dump()

void xfrmnl_user_tmpl_dump | ( | struct xfrmnl_user_tmpl * | tmpl,
|  | struct nl_dump_params * | p )

Definition at line 168 of file template.c.

## ◆ xfrmnl_user_tmpl_get_daddr()

struct nl_addr * xfrmnl_user_tmpl_get_daddr | ( | struct xfrmnl_user_tmpl * | utmpl | ) |

Definition at line 193 of file template.c.

## ◆ xfrmnl_user_tmpl_set_daddr()

int xfrmnl_user_tmpl_set_daddr | ( | struct xfrmnl_user_tmpl * | utmpl,
|  | struct nl_addr * | addr )

Definition at line 198 of file template.c.

## ◆ xfrmnl_user_tmpl_get_spi()

int xfrmnl_user_tmpl_get_spi | ( | struct xfrmnl_user_tmpl * | utmpl | ) |

Definition at line 209 of file template.c.

## ◆ xfrmnl_user_tmpl_set_spi()

int xfrmnl_user_tmpl_set_spi | ( | struct xfrmnl_user_tmpl * | utmpl,
|  | unsigned int | spi )

Definition at line 214 of file template.c.

## ◆ xfrmnl_user_tmpl_get_proto()

int xfrmnl_user_tmpl_get_proto | ( | struct xfrmnl_user_tmpl * | utmpl | ) |

Definition at line 221 of file template.c.

## ◆ xfrmnl_user_tmpl_set_proto()

int xfrmnl_user_tmpl_set_proto | ( | struct xfrmnl_user_tmpl * | utmpl,
|  | unsigned int | protocol )

Definition at line 226 of file template.c.

## ◆ xfrmnl_user_tmpl_get_family()

int xfrmnl_user_tmpl_get_family | ( | struct xfrmnl_user_tmpl * | utmpl | ) |

Definition at line 233 of file template.c.

## ◆ xfrmnl_user_tmpl_set_family()

int xfrmnl_user_tmpl_set_family | ( | struct xfrmnl_user_tmpl * | utmpl,
|  | unsigned int | family )

Definition at line 238 of file template.c.

## ◆ xfrmnl_user_tmpl_get_saddr()

struct nl_addr * xfrmnl_user_tmpl_get_saddr | ( | struct xfrmnl_user_tmpl * | utmpl | ) |

Definition at line 245 of file template.c.

## ◆ xfrmnl_user_tmpl_set_saddr()

int xfrmnl_user_tmpl_set_saddr | ( | struct xfrmnl_user_tmpl * | utmpl,
|  | struct nl_addr * | addr )

Definition at line 250 of file template.c.

## ◆ xfrmnl_user_tmpl_get_reqid()

int xfrmnl_user_tmpl_get_reqid | ( | struct xfrmnl_user_tmpl * | utmpl | ) |

Definition at line 261 of file template.c.

## ◆ xfrmnl_user_tmpl_set_reqid()

int xfrmnl_user_tmpl_set_reqid | ( | struct xfrmnl_user_tmpl * | utmpl,
|  | unsigned int | reqid )

Definition at line 266 of file template.c.

## ◆ xfrmnl_user_tmpl_get_mode()

int xfrmnl_user_tmpl_get_mode | ( | struct xfrmnl_user_tmpl * | utmpl | ) |

Definition at line 273 of file template.c.

## ◆ xfrmnl_user_tmpl_set_mode()

int xfrmnl_user_tmpl_set_mode | ( | struct xfrmnl_user_tmpl * | utmpl,
|  | unsigned int | mode )

Definition at line 278 of file template.c.

## ◆ xfrmnl_user_tmpl_get_share()

int xfrmnl_user_tmpl_get_share | ( | struct xfrmnl_user_tmpl * | utmpl | ) |

Definition at line 285 of file template.c.

## ◆ xfrmnl_user_tmpl_set_share()

int xfrmnl_user_tmpl_set_share | ( | struct xfrmnl_user_tmpl * | utmpl,
|  | unsigned int | share )

Definition at line 290 of file template.c.

## ◆ xfrmnl_user_tmpl_get_optional()

int xfrmnl_user_tmpl_get_optional | ( | struct xfrmnl_user_tmpl * | utmpl | ) |

Definition at line 297 of file template.c.

## ◆ xfrmnl_user_tmpl_set_optional()

int xfrmnl_user_tmpl_set_optional | ( | struct xfrmnl_user_tmpl * | utmpl,
|  | unsigned int | optional )

Definition at line 302 of file template.c.

## ◆ xfrmnl_user_tmpl_get_aalgos()

int xfrmnl_user_tmpl_get_aalgos | ( | struct xfrmnl_user_tmpl * | utmpl | ) |

Definition at line 309 of file template.c.

## ◆ xfrmnl_user_tmpl_set_aalgos()

int xfrmnl_user_tmpl_set_aalgos | ( | struct xfrmnl_user_tmpl * | utmpl,
|  | unsigned int | aalgos )

Definition at line 314 of file template.c.

## ◆ xfrmnl_user_tmpl_get_ealgos()

int xfrmnl_user_tmpl_get_ealgos | ( | struct xfrmnl_user_tmpl * | utmpl | ) |

Definition at line 321 of file template.c.

## ◆ xfrmnl_user_tmpl_set_ealgos()

int xfrmnl_user_tmpl_set_ealgos | ( | struct xfrmnl_user_tmpl * | utmpl,
|  | unsigned int | ealgos )

Definition at line 326 of file template.c.

## ◆ xfrmnl_user_tmpl_get_calgos()

int xfrmnl_user_tmpl_get_calgos | ( | struct xfrmnl_user_tmpl * | utmpl | ) |

Definition at line 333 of file template.c.

## ◆ xfrmnl_user_tmpl_set_calgos()

int xfrmnl_user_tmpl_set_calgos | ( | struct xfrmnl_user_tmpl * | utmpl,
|  | unsigned int | calgos )

Definition at line 338 of file template.c.

## Variable Documentation

## ◆ refcnt

uint32_t xfrmnl_sel::refcnt

Definition at line 56 of file selector.c.

## ◆ daddr

struct nl_addr* xfrmnl_sel::daddr

Definition at line 57 of file selector.c.

## ◆ saddr

struct nl_addr* xfrmnl_sel::saddr

Definition at line 58 of file selector.c.

## ◆ dport

uint16_t xfrmnl_sel::dport

Definition at line 59 of file selector.c.

## ◆ dport_mask

uint16_t xfrmnl_sel::dport_mask

Definition at line 60 of file selector.c.

## ◆ sport

uint16_t xfrmnl_sel::sport

Definition at line 61 of file selector.c.

## ◆ sport_mask

uint16_t xfrmnl_sel::sport_mask

Definition at line 62 of file selector.c.

## ◆ family

uint16_t xfrmnl_sel::family

Definition at line 63 of file selector.c.

## ◆ prefixlen_d

uint8_t xfrmnl_sel::prefixlen_d

Definition at line 64 of file selector.c.

## ◆ prefixlen_s

uint8_t xfrmnl_sel::prefixlen_s

Definition at line 65 of file selector.c.

## ◆ proto

uint8_t xfrmnl_sel::proto

Definition at line 66 of file selector.c.

## ◆ ifindex

int32_t xfrmnl_sel::ifindex

Definition at line 67 of file selector.c.

## ◆ user

uint32_t xfrmnl_sel::user

Definition at line 68 of file selector.c.