diff options
author | Ren Kararou <[email protected]> | 2024-12-31 02:18:40 -0600 |
---|---|---|
committer | Ren Kararou <[email protected]> | 2024-12-31 02:18:40 -0600 |
commit | f6b4ac41eec72a25c703c63f43bd1104049a405c (patch) | |
tree | 6fc60798944ac010c22ede4e2e9e33d6b97d39e0 /inc/packet.h | |
parent | 810de0a90148d5dc7fe5919949220a00d14f6447 (diff) | |
download | nbtpd-f6b4ac41eec72a25c703c63f43bd1104049a405c.tar.gz nbtpd-f6b4ac41eec72a25c703c63f43bd1104049a405c.tar.bz2 nbtpd-f6b4ac41eec72a25c703c63f43bd1104049a405c.zip |
complete setup code; complete initial packet handling
Diffstat (limited to 'inc/packet.h')
-rw-r--r-- | inc/packet.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/inc/packet.h b/inc/packet.h index a236f74..abd6d3e 100644 --- a/inc/packet.h +++ b/inc/packet.h @@ -1,5 +1,5 @@ -#ifndef NBT_TFTP_PACKET_H -#define NBT_TFTP_PACKET_H +#ifndef NBD_TFTP_PACKET_H +#define NBD_TFTP_PACKET_H #include <stdint.h> @@ -9,7 +9,7 @@ typedef enum { DAT = 3, ACK = 4, ERR = 5, -} nbt_tftp_opcode; +} nbd_tftp_opcode; typedef enum { ERROR = 0, @@ -20,32 +20,32 @@ typedef enum { ETRANS = 5, EEXISTS = 6, EUSER = 7, -} nbt_tftp_ecode; +} nbd_tftp_ecode; typedef struct { uint16_t opcode; - char* filename; - char* mode; -} nbt_tftp_packet_rq; + char *filename; + char *mode; +} nbd_tftp_packet_rq; typedef struct { uint16_t opcode; uint16_t block_num; - char* data; -} nbt_tftp_packet_data; + char *data; +} nbd_tftp_packet_data; typedef struct { uint16_t opcode; uint16_t block_num; -} nbt_tftp_packet_ack; +} nbd_tftp_packet_ack; typedef struct { uint16_t opcode; uint16_t err; - char* emsg; -} nbt_tftp_packet_error; + char *emsg; +} nbd_tftp_packet_error; -char* nbt_tftp_error_to_message(nbt_tftp_ecode error); +char *nbd_tftp_error_to_message(nbd_tftp_ecode error); #endif |