From 746cd14f273a96c0348f4e64f9b347ce49a93f45 Mon Sep 17 00:00:00 2001 From: Ren Kararou Date: Thu, 26 Dec 2024 01:50:22 -0600 Subject: add ci; update packet structs; add makefile --- inc/packet.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'inc') 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 -- cgit 1.4.1-2-gfad0