Functions to encode/decode TFTP packets.
More...
#include <freeradius-devel/protocol/tftp/freeradius.internal.h>
#include <freeradius-devel/protocol/tftp/rfc1350.h>
#include <freeradius-devel/util/dbuff.h>
Go to the source code of this file.
Functions to encode/decode TFTP packets.
- Id
- 3b323f24f463f53855b91bdfcc9da3a2365f0ab5
- Author
- Jorge Pereira jpere.nosp@m.ira@.nosp@m.freer.nosp@m.adiu.nosp@m.s.org
- Copyright
- 2021 The FreeRADIUS server project.
-
2021 Network RADIUS SAS (legal.nosp@m.@net.nosp@m.workr.nosp@m.adiu.nosp@m.s.com)
Definition in file tftp.h.
◆ FR_TFTP_BLOCK_MAX_SIZE
#define FR_TFTP_BLOCK_MAX_SIZE 65464 |
◆ FR_TFTP_BLOCK_MIN_SIZE
#define FR_TFTP_BLOCK_MIN_SIZE 8 |
◆ FR_TFTP_DEFAULT_BLOCK_SIZE
#define FR_TFTP_DEFAULT_BLOCK_SIZE 1024 |
◆ FR_TFTP_HDR_LEN
#define FR_TFTP_HDR_LEN (4) /* at least: 2-bytes opcode + 2-bytes */ |
◆ FR_TFTP_MAX_CODE
#define FR_TFTP_MAX_CODE (FR_PACKET_TYPE_VALUE_DO_NOT_RESPOND+1) |
◆ FR_TFTP_MAX_ERROR_CODE
#define FR_TFTP_MAX_ERROR_CODE (FR_ERROR_CODE_VALUE_NO_SUCH_USER+1) |
◆ FR_TFTP_MAX_FILESIZE
◆ fr_tftp_decode()
2 bytes 2 bytes
| Opcode | Block # |
Figure 5-3: ACK packet
2 bytes 2 bytes string 1 byte
| Opcode | ErrorCode | ErrMsg | 0 |
Figure 5-4: ERROR packet
Definition at line 74 of file decode.c.
◆ fr_tftp_encode()
2 bytes 2 bytes
| Opcode | Block # |
Figure 5-3: ACK packet
2 bytes 2 bytes string 1 byte
| Opcode | ErrorCode | ErrMsg | 0 |
Figure 5-4: ERROR packet
Definition at line 75 of file encode.c.
◆ fr_tftp_global_free()
void fr_tftp_global_free |
( |
void |
| ) |
|
◆ fr_tftp_global_init()
int fr_tftp_global_init |
( |
void |
| ) |
|
◆ fr_tftp_codes
◆ fr_tftp_error_codes