about summary refs log tree commit diff stats
path: root/inc/packet.h
diff options
context:
space:
mode:
authorRen Kararou <[email protected]>2024-12-26 01:50:22 -0600
committerRen Kararou <[email protected]>2024-12-26 01:50:22 -0600
commit746cd14f273a96c0348f4e64f9b347ce49a93f45 (patch)
tree813aee86d27bd8ec0b4416ea6cd5f22603666a89 /inc/packet.h
parent6b0cf95d75935308e142232fe646d56d0f9d418c (diff)
downloadnbtpd-746cd14f273a96c0348f4e64f9b347ce49a93f45.tar.gz
nbtpd-746cd14f273a96c0348f4e64f9b347ce49a93f45.tar.bz2
nbtpd-746cd14f273a96c0348f4e64f9b347ce49a93f45.zip
add ci; update packet structs; add makefile
Diffstat (limited to 'inc/packet.h')
-rw-r--r--inc/packet.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/inc/packet.h b/inc/packet.h
index d5f341c..a236f74 100644
--- a/inc/packet.h
+++ b/inc/packet.h
@@ -23,29 +23,29 @@ typedef enum {
 } nbt_tftp_ecode;
 
 typedef struct {
-	nbt_tftp_opcode opcode;
+	uint16_t opcode;
 	char* filename;
 	char* mode;
 } nbt_tftp_packet_rq;
 
 typedef struct {
-	nbt_tftp_opcode opcode;
+	uint16_t opcode;
 	uint16_t block_num;
 	char* data;
 } nbt_tftp_packet_data;
 
 typedef struct {
-	nbt_tftp_opcode opcode;
+	uint16_t opcode;
 	uint16_t block_num;
 } nbt_tftp_packet_ack;
 
 typedef struct {
-	nbt_tftp_opcode opcode;
-	nbt_tftp_ecode err;
+	uint16_t opcode;
+	uint16_t err;
 	char* emsg;
 } nbt_tftp_packet_error;
 
-
+char* nbt_tftp_error_to_message(nbt_tftp_ecode error);
 
 #endif