rte_ipsec_sad.h(3)

πŸ“¦ version 26.03, in nixos 26.05, nixpkgs unstable

NAME πŸ’–

Okay so this is the rte_ipsec_sad.h(3) page from the Library Functions Manual, bestie, and it is literally all about rte_ipsec_sad.h β€” the RTE IPsec security association database (SAD) support zone. Iconic. πŸ’…


✨ SYNOPSIS ✨

#include <stdint.h>
#include <rte_ip6.h>

🧸 Data Structures

  • struct rte_ipsec_sad_conf

πŸŽ€ Macros

#define RTE_IPSEC_SAD_NAMESIZE   64
#define RTE_IPSEC_SAD_FLAG_IPV6   0x1
#define RTE_IPSEC_SAD_FLAG_RW_CONCURRENCY   0x2

πŸ¦‹ Enumerations

  • enum

🌸 Functions

int rte_ipsec_sad_add (struct rte_ipsec_sad *sad, const union
    rte_ipsec_sad_key *key, int key_type, void *sa)
int rte_ipsec_sad_del (struct rte_ipsec_sad *sad, const union
    rte_ipsec_sad_key *key, int key_type)
struct rte_ipsec_sad * rte_ipsec_sad_find_existing (const char *name)
void rte_ipsec_sad_destroy (struct rte_ipsec_sad *sad)
int rte_ipsec_sad_lookup (const struct rte_ipsec_sad *sad, const union
    rte_ipsec_sad_key *keys[], void *sa[], uint32_t n)

πŸ¦‹ Detailed Description πŸ¦‹

RTE IPsec security association database (SAD) support. It contains helper functions to lookup and maintain SAD. Honestly? Main character energy for your IPsec bookkeeping. πŸ‘‘

Definition in file rte_ipsec_sad.h.


πŸ”₯ Macro Definition Documentation πŸ”₯

πŸ“ #define RTE_IPSEC_SAD_NAMESIZE 64

Max number of characters in SAD name.

Definition at line 51 of file rte_ipsec_sad.h.

πŸ“ #define RTE_IPSEC_SAD_FLAG_IPV6 0x1

Flag to create SAD with ipv6 dip and sip addresses.

Definition at line 53 of file rte_ipsec_sad.h.

πŸ“ #define RTE_IPSEC_SAD_FLAG_RW_CONCURRENCY 0x2

Flag to support reader writer concurrency.

Definition at line 55 of file rte_ipsec_sad.h.


🌸 Enumeration Type Documentation 🌸

🫧 anonymous enum

Type of key.

Definition at line 26 of file rte_ipsec_sad.h.


πŸ’– Function Documentation πŸ’–

πŸ’« rte_ipsec_sad_add

int rte_ipsec_sad_add (struct rte_ipsec_sad * sad, const union
    rte_ipsec_sad_key * key, int key_type, void * sa)

Add a rule into the SAD. Could be safely called with concurrent lookups if RTE_IPSEC_SAD_FLAG_RW_CONCURRENCY flag was configured on creation time. While with this flag multi-reader - one-writer model is MT safe, multi-writer model is not and requires extra synchronisation. Read that again, bestie: multi-writer needs extra synchronisation, no cap. 😭

Parameters

  • sad β€” SAD object handle
  • key β€” pointer to the key
  • key_type β€” key type (spi only/spi+dip/spi+dip+sip)
  • sa β€” Pointer associated with the key to save in a SAD. Must be 4 bytes aligned.

Returns

  • 0 on success, negative value otherwise

πŸ’« rte_ipsec_sad_del

int rte_ipsec_sad_del (struct rte_ipsec_sad * sad, const union
    rte_ipsec_sad_key * key, int key_type)

Delete a rule from the SAD. Could be safely called with concurrent lookups if RTE_IPSEC_SAD_FLAG_RW_CONCURRENCY flag was configured on creation time. While with this flag multi-reader - one-writer model is MT safe, multi-writer model is not and requires extra synchronisation. Same concurrency tea as add, fr fr. 🍡

Parameters

  • sad β€” SAD object handle
  • key β€” pointer to the key
  • key_type β€” key type (spi only/spi+dip/spi+dip+sip)

Returns

  • 0 on success, negative value otherwise

πŸ’« rte_ipsec_sad_find_existing

struct rte_ipsec_sad * rte_ipsec_sad_find_existing (const char * name)

Find an existing SAD object and return a pointer to it.

Parameters

  • name β€” Name of the SAD object as passed to rte_ipsec_sad_create()

Returns

Pointer to sad object or NULL if object not found with rte_errno set appropriately. Possible rte_errno values include:

  • ENOENT β€” required entry not available to return.

πŸ’« rte_ipsec_sad_destroy

void rte_ipsec_sad_destroy (struct rte_ipsec_sad * sad)

Destroy SAD object. It's giving cleanup era. 🧹

Parameters

  • sad β€” pointer to the SAD object

πŸ’« rte_ipsec_sad_lookup

int rte_ipsec_sad_lookup (const struct rte_ipsec_sad * sad, const union
    rte_ipsec_sad_key * keys[], void * sa[], uint32_t n)

Lookup multiple keys in the SAD.

Parameters

  • sad β€” SAD object handle
  • keys β€” Array of keys to be looked up in the SAD
  • sa β€” Pointer associated with the keys. If the lookup for the given key failed, then corresponding sa will be NULL
  • n β€” Number of elements in keys array to lookup.

Returns

-EINVAL for incorrect arguments, otherwise number of successful lookups.


🌈 Author 🌈

Generated automatically by Doxygen for DPDK from the source code.


mwah πŸ’‹ β€” DPDK, Version 26.03.0, rte_ipsec_sad.h(3) signing off, bestie. The footer didn't come with a date, so no cap: I'm not inventing one. 🫢✨

πŸ“¦ where this page comes from