The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Functions | Variables
base.c File Reference

TFTP protocol. More...

#include <freeradius-devel/util/pair.h>
#include "tftp.h"
#include "attrs.h"
+ Include dependency graph for base.c:

Go to the source code of this file.

Functions

void fr_tftp_global_free (void)
 
int fr_tftp_global_init (void)
 

Variables

fr_dict_attr_t const * attr_packet_type
 
fr_dict_attr_t const * attr_tftp_block
 
fr_dict_attr_t const * attr_tftp_block_size
 
fr_dict_attr_t const * attr_tftp_data
 
fr_dict_attr_t const * attr_tftp_error_code
 
fr_dict_attr_t const * attr_tftp_error_message
 
fr_dict_attr_t const * attr_tftp_filename
 
fr_dict_attr_t const * attr_tftp_mode
 
fr_dict_attr_t const * attr_tftp_opcode
 
fr_dict_t const * dict_tftp
 
char const * fr_tftp_codes [FR_TFTP_MAX_CODE]
 
char const * fr_tftp_error_codes [FR_TFTP_MAX_ERROR_CODE]
 
static uint32_t instance_count = 0
 
fr_dict_autoload_t libfreeradius_tftp []
 
fr_dict_attr_autoload_t libfreeradius_tftp_dict_attr []
 

Detailed Description

TFTP protocol.

Id
ca66b3b60cd49ac9f8018242acf907e48bf043cc
Author
Jorge Pereira jpere.nosp@m.ira@.nosp@m.freer.nosp@m.adiu.nosp@m.s.org

Definition in file base.c.

Function Documentation

◆ fr_tftp_global_free()

void fr_tftp_global_free ( void  )

Definition at line 114 of file base.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fr_tftp_global_init()

int fr_tftp_global_init ( void  )

Definition at line 90 of file base.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ attr_packet_type

fr_dict_attr_t const* attr_packet_type

Definition at line 53 of file base.c.

◆ attr_tftp_block

fr_dict_attr_t const* attr_tftp_block

Definition at line 44 of file base.c.

◆ attr_tftp_block_size

fr_dict_attr_t const* attr_tftp_block_size

Definition at line 45 of file base.c.

◆ attr_tftp_data

fr_dict_attr_t const* attr_tftp_data

Definition at line 46 of file base.c.

◆ attr_tftp_error_code

fr_dict_attr_t const* attr_tftp_error_code

Definition at line 47 of file base.c.

◆ attr_tftp_error_message

fr_dict_attr_t const* attr_tftp_error_message

Definition at line 48 of file base.c.

◆ attr_tftp_filename

fr_dict_attr_t const* attr_tftp_filename

Definition at line 49 of file base.c.

◆ attr_tftp_mode

fr_dict_attr_t const* attr_tftp_mode

Definition at line 51 of file base.c.

◆ attr_tftp_opcode

fr_dict_attr_t const* attr_tftp_opcode

Definition at line 50 of file base.c.

◆ dict_tftp

fr_dict_t const* dict_tftp

Definition at line 36 of file base.c.

◆ fr_tftp_codes

char const* fr_tftp_codes[FR_TFTP_MAX_CODE]
Initial value:
= {
[FR_PACKET_TYPE_VALUE_READ_REQUEST] = "Read-Request",
[FR_PACKET_TYPE_VALUE_WRITE_REQUEST] = "Write-Request",
[FR_PACKET_TYPE_VALUE_DATA] = "Data",
[FR_PACKET_TYPE_VALUE_ACKNOWLEDGEMENT] = "Acknowledgement",
[FR_PACKET_TYPE_VALUE_ERROR] = "Error",
[FR_PACKET_TYPE_VALUE_DO_NOT_RESPOND] = "Do-Not-Respond"
}

Definition at line 71 of file base.c.

◆ fr_tftp_error_codes

char const* fr_tftp_error_codes[FR_TFTP_MAX_ERROR_CODE]
Initial value:
= {
[FR_ERROR_CODE_VALUE_FILE_NOT_FOUND] = "File not found",
[FR_ERROR_CODE_VALUE_ACCESS_VIOLATION] = "Access violation",
[FR_ERROR_CODE_VALUE_DISK_FULL] = "Disk Full",
[FR_ERROR_CODE_VALUE_ILLEGAL_OPERATION] = "Illegal TFTP operation",
[FR_ERROR_CODE_VALUE_UNKNOWN_TRANSFER_ID] = "Unknown transfer ID",
[FR_ERROR_CODE_VALUE_FILE_ALREADY_EXISTS] = "File already exists",
[FR_ERROR_CODE_VALUE_NO_SUCH_USER] = "No such user"
}

Definition at line 80 of file base.c.

◆ instance_count

uint32_t instance_count = 0
static

Definition at line 34 of file base.c.

◆ libfreeradius_tftp

fr_dict_autoload_t libfreeradius_tftp
Initial value:
= {
{ .out = &dict_tftp, .proto = "tftp" },
{ NULL }
}
fr_dict_t const * dict_tftp
Definition: base.c:36

Definition at line 39 of file base.c.

◆ libfreeradius_tftp_dict_attr

fr_dict_attr_autoload_t libfreeradius_tftp_dict_attr
Initial value:
= {
{ .out = &attr_tftp_block, .name = "Block", .type = FR_TYPE_UINT16, .dict = &dict_tftp },
{ .out = &attr_tftp_block_size, .name = "Block-Size", .type = FR_TYPE_UINT16, .dict = &dict_tftp },
{ .out = &attr_tftp_data, .name = "Data", .type = FR_TYPE_OCTETS, .dict = &dict_tftp },
{ .out = &attr_tftp_error_code, .name = "Error-Code", .type = FR_TYPE_UINT16, .dict = &dict_tftp },
{ .out = &attr_tftp_error_message, .name = "Error-Message", .type = FR_TYPE_STRING, .dict = &dict_tftp },
{ .out = &attr_tftp_filename, .name = "Filename", .type = FR_TYPE_STRING, .dict = &dict_tftp },
{ .out = &attr_tftp_opcode, .name = "Opcode", .type = FR_TYPE_UINT16, .dict = &dict_tftp },
{ .out = &attr_tftp_mode, .name = "Mode", .type = FR_TYPE_UINT8, .dict = &dict_tftp },
{ .out = &attr_packet_type, .name = "Packet-Type", .type = FR_TYPE_UINT32, .dict = &dict_tftp },
{ NULL }
}
fr_dict_attr_t const * attr_packet_type
Definition: base.c:91
@ FR_TYPE_STRING
String of printable characters.
Definition: merged_model.c:83
@ FR_TYPE_UINT16
16 Bit unsigned integer.
Definition: merged_model.c:98
@ FR_TYPE_UINT8
8 Bit unsigned integer.
Definition: merged_model.c:97
@ FR_TYPE_UINT32
32 Bit unsigned integer.
Definition: merged_model.c:99
@ FR_TYPE_OCTETS
Raw octets.
Definition: merged_model.c:84
fr_dict_attr_t const * attr_tftp_mode
Definition: base.c:51
fr_dict_attr_t const * attr_tftp_opcode
Definition: base.c:50
fr_dict_attr_t const * attr_tftp_error_message
Definition: base.c:48
fr_dict_attr_t const * attr_tftp_filename
Definition: base.c:49
fr_dict_attr_t const * attr_tftp_block
Definition: base.c:44
fr_dict_attr_t const * attr_tftp_data
Definition: base.c:46
fr_dict_attr_t const * attr_tftp_block_size
Definition: base.c:45
fr_dict_attr_t const * attr_tftp_error_code
Definition: base.c:47

Definition at line 56 of file base.c.