All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Typedefs | Functions | Variables
radattr.c File Reference
#include <freeradius-devel/libradius.h>
#include <freeradius-devel/tmpl.h>
#include <freeradius-devel/map.h>
#include <freeradius-devel/parser.h>
#include <freeradius-devel/xlat.h>
#include <freeradius-devel/conf.h>
#include <freeradius-devel/radpaths.h>
#include <freeradius-devel/dhcp.h>
#include <ctype.h>
#include <assert.h>
#include <freeradius-devel/log.h>
#include <sys/wait.h>
+ Include dependency graph for radattr.c:

Go to the source code of this file.

Typedefs

typedef struct REQUEST REQUEST
 

Functions

static int decode_attr (char *buffer, char **endptr)
 
static int decode_vendor (char *buffer, char **endptr)
 
static int encode_data (char *p, uint8_t *output, size_t outlen)
 
static int encode_data_string (char *buffer, uint8_t *output, size_t outlen)
 
static int encode_data_tlv (char *buffer, char **endptr, uint8_t *output, size_t outlen)
 
static int encode_evs (char *buffer, uint8_t *output, size_t outlen)
 
static int encode_extended (char *buffer, uint8_t *output, size_t outlen)
 
static int encode_hex (char *p, uint8_t *output, size_t outlen)
 
static int encode_long_extended (char *buffer, uint8_t *output, size_t outlen)
 
static int encode_rfc (char *buffer, uint8_t *output, size_t outlen)
 
static int encode_tlv (char *buffer, uint8_t *output, size_t outlen)
 
static int encode_vsa (char *buffer, uint8_t *output, size_t outlen)
 
int main (int argc, char *argv[])
 
static void parse_condition (char const *input, char *output, size_t outlen)
 
static void parse_xlat (char const *input, char *output, size_t outlen)
 
static void process_file (fr_dict_t *dict, const char *root_dir, char const *filename)
 
pid_t rad_fork (void)
 
pid_t rad_waitpid (pid_t pid, int *status)
 
static void NEVER_RETURNS usage (void)
 
static ssize_t xlat_test (UNUSED char **out, UNUSED size_t outlen, UNUSED void const *mod_inst, UNUSED void const *xlat_inst, UNUSED REQUEST *request, UNUSED char const *fmt)
 

Variables

static char const hextab [] = "0123456789abcdef"
 
static RADIUS_PACKET my_original
 
static RADIUS_PACKET my_packet
 
static char const * my_secret = "testing123"
 
log_lvl_t rad_debug_lvl
 Global debugging level. More...
 

Typedef Documentation

typedef struct REQUEST REQUEST

Definition at line 27 of file radattr.c.

Function Documentation

static int decode_attr ( char *  buffer,
char **  endptr 
)
static

Definition at line 266 of file radattr.c.

+ Here is the caller graph for this function:

static int decode_vendor ( char *  buffer,
char **  endptr 
)
static

Definition at line 291 of file radattr.c.

+ Here is the caller graph for this function:

static int encode_data ( char *  p,
uint8_t *  output,
size_t  outlen 
)
static

Definition at line 210 of file radattr.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int encode_data_string ( char *  buffer,
uint8_t *  output,
size_t  outlen 
)
static

Definition at line 97 of file radattr.c.

+ Here is the caller graph for this function:

static int encode_data_tlv ( char *  buffer,
char **  endptr,
uint8_t *  output,
size_t  outlen 
)
static

Definition at line 143 of file radattr.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int encode_evs ( char *  buffer,
uint8_t *  output,
size_t  outlen 
)
static

Definition at line 381 of file radattr.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int encode_extended ( char *  buffer,
uint8_t *  output,
size_t  outlen 
)
static

Definition at line 406 of file radattr.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int encode_hex ( char *  p,
uint8_t *  output,
size_t  outlen 
)
static

Definition at line 177 of file radattr.c.

+ Here is the caller graph for this function:

static int encode_long_extended ( char *  buffer,
uint8_t *  output,
size_t  outlen 
)
static

Definition at line 432 of file radattr.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int encode_rfc ( char *  buffer,
uint8_t *  output,
size_t  outlen 
)
static

Definition at line 484 of file radattr.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int encode_tlv ( char *  buffer,
uint8_t *  output,
size_t  outlen 
)
static

Definition at line 325 of file radattr.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int encode_vsa ( char *  buffer,
uint8_t *  output,
size_t  outlen 
)
static

Definition at line 356 of file radattr.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int main ( int  argc,
char *  argv[] 
)

Definition at line 959 of file radattr.c.

+ Here is the call graph for this function:

static void parse_condition ( char const *  input,
char *  output,
size_t  outlen 
)
static

Definition at line 531 of file radattr.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void parse_xlat ( char const *  input,
char *  output,
size_t  outlen 
)
static

Definition at line 555 of file radattr.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void process_file ( fr_dict_t dict,
const char *  root_dir,
char const *  filename 
)
static

Definition at line 577 of file radattr.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

pid_t rad_fork ( void  )

Definition at line 53 of file radattr.c.

pid_t rad_waitpid ( pid_t  pid,
int *  status 
)

Definition at line 58 of file radattr.c.

static void NEVER_RETURNS usage ( void  )
static

Definition at line 948 of file radattr.c.

+ Here is the caller graph for this function:

static ssize_t xlat_test ( UNUSED char **  out,
UNUSED size_t  outlen,
UNUSED void const *  mod_inst,
UNUSED void const *  xlat_inst,
UNUSED REQUEST request,
UNUSED char const *  fmt 
)
static

Definition at line 63 of file radattr.c.

+ Here is the caller graph for this function:

Variable Documentation

char const hextab[] = "0123456789abcdef"
static

Definition at line 95 of file radattr.c.

RADIUS_PACKET my_original
static
Initial value:
= {
.sockfd = -1,
.id = 0,
.vector = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
}
RFC2865 - Access-Request.
Definition: radius.h:92

Definition at line 70 of file radattr.c.

RADIUS_PACKET my_packet
static
Initial value:
= {
.sockfd = -1,
.id = 0,
.vector = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
}
RFC2865 - Access-Accept.
Definition: radius.h:93

Definition at line 78 of file radattr.c.

char const* my_secret = "testing123"
static

Definition at line 86 of file radattr.c.

log_lvl_t rad_debug_lvl

Global debugging level.

Definition at line 49 of file log.c.