logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

rte_ipsec_sad.h

Author

       Generated automatically by Doxygen for DPDK from the source code.

DPDK                                             Version 24.11.2                              rte_ipsec_sad.h(3)

Detailed Description

       RTE IPsec security association database (SAD) support. Contains helper functions to lookup and maintain
       SAD

       Definition in file rte_ipsec_sad.h.

Enumeration Type Documentation

anonymousenum
       Type of key

       Definition at line 27 of file rte_ipsec_sad.h.

Function Documentation

intrte_ipsec_sad_add(structrte_ipsec_sad*sad,constunionrte_ipsec_sad_key*key,intkey_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 required extra synchronisation.

       Parameterssad 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

   intrte_ipsec_sad_del(structrte_ipsec_sad*sad,constunionrte_ipsec_sad_key*key,intkey_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 required extra synchronisation.

       Parameterssad 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

   structrte_ipsec_sad*rte_ipsec_sad_find_existing(constchar*name)
       Find an existing SAD object and return a pointer to it.

       Parametersname 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.

   voidrte_ipsec_sad_destroy(structrte_ipsec_sad*sad)
       Destroy SAD object.

       Parameterssad pointer to the SAD object

   intrte_ipsec_sad_lookup(conststructrte_ipsec_sad*sad,constunionrte_ipsec_sad_key*keys[],void*sa[],uint32_tn)
       Lookup multiple keys in the SAD.

       Parameterssad 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.

Macro Definition Documentation

#defineRTE_IPSEC_SAD_NAMESIZE64
       Max number of characters in SAD name.

       Definition at line 52 of file rte_ipsec_sad.h.

   #defineRTE_IPSEC_SAD_FLAG_IPV60x1
       Flag to create SAD with ipv6 dip and sip addresses

       Definition at line 54 of file rte_ipsec_sad.h.

   #defineRTE_IPSEC_SAD_FLAG_RW_CONCURRENCY0x2
       Flag to support reader writer concurrency

       Definition at line 56 of file rte_ipsec_sad.h.

Name

       rte_ipsec_sad.h

Synopsis

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

   DataStructures
       struct rte_ipsec_sad_confMacros
       #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)

See Also