BSL v1.1.1 - 19.g31939de
AMMOS Bundle Protocol Security Library (BSL)
Loading...
Searching...
No Matches
IdValPair.h File Reference

Defines the RFC 9172 Security Parameter of the Abstract Security Block. More...

#include <stdint.h>
#include <m-bstring.h>
#include <m-shared-ptr.h>
#include <m-array.h>
#include <m-dict.h>
#include <BPSecLib_Private.h>
+ Include dependency graph for IdValPair.h:
+ This graph shows which files directly or indirectly include this file:

Data Structures

struct  BSL_IdValPair_t
 Represents a security option, parameter, or result within in an ASB. More...
 

Macros

#define M_OPL_BSL_IdValPair_t()
 OPLIST for BSL_IdValPair_s.
 

Enumerations

enum  BSL_IdValPair_Type_e {
  BSL_IDVALPAIR_TYPE_UNKNOWN = 0 , BSL_IDVALPAIR_TYPE_INT64 , BSL_IDVALPAIR_TYPE_BYTESTR , BSL_IDVALPAIR_TYPE_TEXTSTR ,
  BSL_IDVALPAIR_TYPE_RAW
}
 Types of values in BSL_IdValPair_s. More...
 

Detailed Description

Defines the RFC 9172 Security Parameter of the Abstract Security Block.

Declaration of an (id, value) pair container.

The details from the RFC Section 3.6 [3] are as follows:

This field captures one or more security context parameters that should be used when processing the security service described by this security block. This field SHALL be represented by a CBOR array. Each entry in this array is a single security context parameter. A single parameter SHALL also be represented as a CBOR array comprising a 2-tuple of the Id and value of the parameter, as follows.

Parameter Id:

  • This field identifies which parameter is being specified.
  • This field SHALL be represented as a CBOR unsigned integer.
  • Parameter Ids are selected as described in Section 3.10.

Parameter Value:

  • This field captures the value associated with this parameter.
  • This field SHALL be represented by the applicable CBOR representation of the parameter, in accordance with Section 3.10.

Author
Bill..nosp@m.Van..nosp@m.Besie.nosp@m.n@jh.nosp@m.uapl..nosp@m.edu

Macro Definition Documentation

◆ M_OPL_BSL_IdValPair_t

#define M_OPL_BSL_IdValPair_t ( )
Value:
(INIT(API_2(BSL_IdValPair_Init)), INIT_SET(API_6(BSL_IdValPair_InitSet)), INIT_MOVE(0), \
CLEAR(API_2(BSL_IdValPair_Deinit)), SET(API_6(BSL_IdValPair_Set)), MOVE(API_6(BSL_IdValPair_Move)))
void BSL_IdValPair_Deinit(BSL_IdValPair_t *self)
De-initialize a parameter.
Definition IdValPair.c:51
void BSL_IdValPair_Init(BSL_IdValPair_t *self)
Initialize to a default empty state.
Definition IdValPair.c:34
void BSL_IdValPair_Set(BSL_IdValPair_t *self, const BSL_IdValPair_t *src)
Overwrite with a copy of another value.
Definition IdValPair.c:70
void BSL_IdValPair_Move(BSL_IdValPair_t *self, BSL_IdValPair_t *src)
Move from another value.
Definition IdValPair.c:108
void BSL_IdValPair_InitSet(BSL_IdValPair_t *self, const BSL_IdValPair_t *src)
Initialize to a copy of another value.
Definition IdValPair.c:41

OPLIST for BSL_IdValPair_s.

Enumeration Type Documentation

◆ BSL_IdValPair_Type_e

Types of values in BSL_IdValPair_s.

Security options, parameters, and results defined in RFC9173 may be unsigned integers or bytestrings.

Enumerator
BSL_IDVALPAIR_TYPE_UNKNOWN 

Indicates parsed value not of expected type.

BSL_IDVALPAIR_TYPE_INT64 

Indicates value type is a signed integer.

BSL_IDVALPAIR_TYPE_BYTESTR 

Indicates the value is a byte string.

BSL_IDVALPAIR_TYPE_TEXTSTR 

Indicates the value is a text string.

BSL_IDVALPAIR_TYPE_RAW 

Indicates the value is raw encoded bytes.