OpenVPN
session_id.h File Reference
#include "basic.h"
#include "buffer.h"
Include dependency graph for session_id.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  session_id

Macros

#define SID_SIZE   (sizeof(x_session_id_zero.id))

Functions

static bool session_id_equal (const struct session_id *sid1, const struct session_id *sid2)
static bool session_id_defined (const struct session_id *sid1)
static bool session_id_read (struct session_id *sid, struct buffer *buf)
static bool session_id_write_prepend (const struct session_id *sid, struct buffer *buf)
static bool session_id_write (const struct session_id *sid, struct buffer *buf)
void session_id_random (struct session_id *sid)
const char * session_id_print (const struct session_id *sid, struct gc_arena *gc)

Variables

const struct session_id x_session_id_zero

Macro Definition Documentation

◆ SID_SIZE

Function Documentation

◆ session_id_defined()

◆ session_id_equal()

bool session_id_equal ( const struct session_id * sid1,
const struct session_id * sid2 )
inlinestatic

Definition at line 47 of file session_id.h.

References session_id::id, and SID_SIZE.

Referenced by reliable_ack_read(), session_id_hash_equal(), and tls_pre_decrypt().

◆ session_id_print()

const char * session_id_print ( const struct session_id * sid,
struct gc_arena * gc )

◆ session_id_random()

void session_id_random ( struct session_id * sid)

Definition at line 48 of file session_id.c.

References session_id::id, prng_bytes(), and SID_SIZE.

Referenced by test_sid_hash_list(), and tls_session_init().

◆ session_id_read()

bool session_id_read ( struct session_id * sid,
struct buffer * buf )
inlinestatic

◆ session_id_write()

bool session_id_write ( const struct session_id * sid,
struct buffer * buf )
inlinestatic

Definition at line 71 of file session_id.h.

References buf_write(), session_id::id, and SID_SIZE.

Referenced by reliable_ack_write(), and tls_wrap_control().

◆ session_id_write_prepend()

bool session_id_write_prepend ( const struct session_id * sid,
struct buffer * buf )
inlinestatic

Definition at line 65 of file session_id.h.

References buf_write_prepend(), session_id::id, and SID_SIZE.

Referenced by tls_wrap_control().

Variable Documentation

◆ x_session_id_zero

const struct session_id x_session_id_zero
extern

Definition at line 45 of file session_id.c.

Referenced by session_id_defined().