---
name: "rte_security_ctx"
section: "3"
platform: "linux"
package: "dpdk-doc"
version: "24.11.4-0+deb13u1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/rte_security_ctx"
---

# rte\_security\_ctx(3)

## NAME

rte\_security\_ctx

## SYNOPSIS

`#include <rte_security_driver.h>`

### Data Fields

void \* **device**\
 const struct **rte\_security\_ops** \* **ops**\
 uint32\_t **flags**\
 uint16\_t **sess\_cnt**\
 uint16\_t **macsec\_sc\_cnt**\
 uint16\_t **macsec\_sa\_cnt**\

## Detailed Description

Security context for crypto/eth devices

Security instance for each driver to register security operations. The application can get the security context from the crypto/eth device id using the APIs **rte\_cryptodev\_get\_sec\_ctx()**/rte\_eth\_dev\_get\_sec\_ctx() This structure is used to identify the device(crypto/eth) for which the security operations need to be performed.

Definition at line **48** of file **rte\_security\_driver.h**.

## Field Documentation

### void\* device

Crypto/ethernet device attached

Definition at line **49** of file **rte\_security\_driver.h**.

### const struct rte\_security\_ops\* ops

Pointer to security ops for the device

Definition at line **51** of file **rte\_security\_driver.h**.

### uint32\_t flags

Flags for security context

Definition at line **53** of file **rte\_security\_driver.h**.

### uint16\_t sess\_cnt

Number of sessions attached to this context

Definition at line **55** of file **rte\_security\_driver.h**.

### uint16\_t macsec\_sc\_cnt

Number of MACsec SC attached to this context

Definition at line **57** of file **rte\_security\_driver.h**.

### uint16\_t macsec\_sa\_cnt

Number of MACsec SA attached to this context

Definition at line **59** of file **rte\_security\_driver.h**.

## Author

Generated automatically by Doxygen for DPDK from the source code.
