OpenVPN
Data Structures | Macros | Functions | Variables
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

#define SID_SIZE   (sizeof(x_session_id_zero.id))

Definition at line 45 of file session_id.h.

Function Documentation

◆ session_id_defined()

static bool session_id_defined ( const struct session_id sid1)
inlinestatic

◆ session_id_equal()

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

Definition at line 48 of file session_id.h.

References session_id::id, and SID_SIZE.

Referenced by reliable_ack_read(), 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 49 of file session_id.c.

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

Referenced by tls_session_init().

◆ session_id_read()

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

◆ session_id_write()

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

Definition at line 73 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()

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

Definition at line 67 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

Definition at line 46 of file session_id.c.

Referenced by session_id_defined().