The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Functions | Variables
rlm_dpsk.c File Reference

Dynamic PSK for WiFi. More...

#include <freeradius-devel/server/base.h>
#include <freeradius-devel/server/module_rlm.h>
#include <freeradius-devel/server/tmpl_dcursor.h>
#include <freeradius-devel/unlang/xlat_func.h>
#include <freeradius-devel/util/base16.h>
#include <freeradius-devel/util/rb.h>
#include <openssl/ssl.h>
#include <openssl/evp.h>
#include <openssl/hmac.h>
#include <ctype.h>
+ Include dependency graph for rlm_dpsk.c:

Go to the source code of this file.

Data Structures

struct  dpsk_auth_call_env_t
 
struct  dpsk_autz_call_env_t
 
struct  eapol_attr_t
 
struct  eapol_key_frame_t
 
struct  rlm_dpsk_cache_t
 
struct  rlm_dpsk_mutable_t
 
struct  rlm_dpsk_s
 

Macros

#define PTHREAD_MUTEX_LOCK(_x)
 
#define PTHREAD_MUTEX_UNLOCK(_x)
 

Typedefs

typedef struct eapol_attr_t eapol_attr_t
 
typedef struct eapol_key_frame_t eapol_key_frame_t
 
typedef struct rlm_dpsk_s rlm_dpsk_t
 

Functions

static int mod_instantiate (module_inst_ctx_t const *mctx)
 

Variables

static fr_dict_attr_t const * attr_auth_type
 
static fr_dict_t const * dict_freeradius
 
static const conf_parser_t module_config []
 
module_rlm_t rlm_dpsk
 
fr_dict_autoload_t rlm_dpsk_dict []
 
fr_dict_attr_autoload_t rlm_dpsk_dict_attr []
 

Detailed Description

Dynamic PSK for WiFi.

Id
48664b9b936365c4aa180a87acb279142a05f64e

Definition in file rlm_dpsk.c.


Data Structure Documentation

◆ dpsk_auth_call_env_t

struct dpsk_auth_call_env_t

Definition at line 156 of file rlm_dpsk.c.

+ Collaboration diagram for dpsk_auth_call_env_t:
Data Fields
fr_value_box_t anonce
tmpl_t * anonce_tmpl
fr_value_box_t calledstation
fr_value_box_t filename
fr_value_box_t key_msg
tmpl_t * key_msg_tmpl
fr_value_box_t masterkey
tmpl_t * masterkey_tmpl
fr_value_box_t psk
tmpl_t * psk_dest_tmpl
fr_value_box_t psk_identity
tmpl_t * psk_identity_dest_tmpl
tmpl_t * psk_tmpl
fr_value_box_t ssid
tmpl_t * ssid_tmpl
fr_value_box_t username

◆ dpsk_autz_call_env_t

struct dpsk_autz_call_env_t

Definition at line 151 of file rlm_dpsk.c.

+ Collaboration diagram for dpsk_autz_call_env_t:
Data Fields
tmpl_t * anonce_tmpl
tmpl_t * key_msg_tmpl

◆ eapol_attr_t

struct eapol_attr_t

Definition at line 75 of file rlm_dpsk.c.

+ Collaboration diagram for eapol_attr_t:
Data Fields
eapol_key_frame_t frame
uint8_t header[4]

◆ eapol_key_frame_t

struct eapol_key_frame_t

Definition at line 62 of file rlm_dpsk.c.

Data Fields
uint16_t data_len
uint8_t descriptor
uint16_t information
uint8_t iv[16]
uint16_t length
uint8_t mic[16]
uint8_t nonce[32]
uint8_t replay_counter[8]
uint8_t reserved[8]
uint8_t rsc[8]

◆ rlm_dpsk_cache_t

struct rlm_dpsk_cache_t

Definition at line 90 of file rlm_dpsk.c.

+ Collaboration diagram for rlm_dpsk_cache_t:
Data Fields
fr_dlist_t dlist
fr_time_t expires
char * identity
size_t identity_len
rlm_dpsk_t const * inst
uint8_t mac[6]
fr_rb_node_t node
uint8_t pmk[32]
char * psk
size_t psk_len
uint8_t * ssid
size_t ssid_len

◆ rlm_dpsk_mutable_t

struct rlm_dpsk_mutable_t

Definition at line 109 of file rlm_dpsk.c.

+ Collaboration diagram for rlm_dpsk_mutable_t:
Data Fields
fr_rb_tree_t cache
fr_dlist_head_t head

◆ rlm_dpsk_s

struct rlm_dpsk_s

Definition at line 118 of file rlm_dpsk.c.

+ Collaboration diagram for rlm_dpsk_s:
Data Fields
fr_dict_enum_value_t const * auth_type
fr_time_delta_t cache_lifetime
uint32_t cache_size
rlm_dpsk_mutable_t * mutable

Macro Definition Documentation

◆ PTHREAD_MUTEX_LOCK

#define PTHREAD_MUTEX_LOCK (   _x)

Definition at line 84 of file rlm_dpsk.c.

◆ PTHREAD_MUTEX_UNLOCK

#define PTHREAD_MUTEX_UNLOCK (   _x)

Definition at line 85 of file rlm_dpsk.c.

Typedef Documentation

◆ eapol_attr_t

typedef struct eapol_attr_t eapol_attr_t

◆ eapol_key_frame_t

◆ rlm_dpsk_t

typedef struct rlm_dpsk_s rlm_dpsk_t

Definition at line 88 of file rlm_dpsk.c.

Function Documentation

◆ mod_instantiate()

static int mod_instantiate ( module_inst_ctx_t const *  mctx)
static

Definition at line 908 of file rlm_dpsk.c.

+ Here is the call graph for this function:

Variable Documentation

◆ attr_auth_type

fr_dict_attr_t const* attr_auth_type
static

Definition at line 135 of file rlm_dpsk.c.

◆ dict_freeradius

fr_dict_t const* dict_freeradius
static

Definition at line 127 of file rlm_dpsk.c.

◆ module_config

const conf_parser_t module_config[]
static
Initial value:
= {
{ FR_CONF_OFFSET("cache_size", rlm_dpsk_t, cache_size) },
{ FR_CONF_OFFSET("cache_lifetime", rlm_dpsk_t, cache_lifetime) },
}
#define CONF_PARSER_TERMINATOR
Definition cf_parse.h:662
#define FR_CONF_OFFSET(_name, _struct, _field)
conf_parser_t which parses a single CONF_PAIR, writing the result to a field in a struct
Definition cf_parse.h:284

Definition at line 144 of file rlm_dpsk.c.

◆ rlm_dpsk

module_rlm_t rlm_dpsk
Initial value:
= {
.common = {
.name = "dpsk",
.inst_size = sizeof(rlm_dpsk_t),
.instantiate = mod_instantiate,
},
}
#define MODULE_MAGIC_INIT
Stop people using different module/library/server versions together.
Definition dl_module.h:63
static const conf_parser_t config[]
Definition base.c:186
struct rlm_dpsk_s rlm_dpsk_t
Definition rlm_dpsk.c:88
static const conf_parser_t module_config[]
Definition rlm_dpsk.c:144
static int mod_instantiate(module_inst_ctx_t const *mctx)
Definition rlm_dpsk.c:908

Definition at line 960 of file rlm_dpsk.c.

◆ rlm_dpsk_dict

fr_dict_autoload_t rlm_dpsk_dict
Initial value:
= {
{ .out = &dict_freeradius, .proto = "freeradius" },
{ NULL }
}
static fr_dict_t const * dict_freeradius
Definition rlm_dpsk.c:127

Definition at line 130 of file rlm_dpsk.c.

◆ rlm_dpsk_dict_attr

fr_dict_attr_autoload_t rlm_dpsk_dict_attr
Initial value:
= {
{ .out = &attr_auth_type, .name = "Auth-Type", .type = FR_TYPE_UINT32, .dict = &dict_freeradius },
{ NULL }
}
@ FR_TYPE_UINT32
32 Bit unsigned integer.
static fr_dict_attr_t const * attr_auth_type
Definition rlm_dpsk.c:135

Definition at line 138 of file rlm_dpsk.c.