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 --- src/packet.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/packet.c (limited to 'src/packet.c') diff --git a/src/packet.c b/src/packet.c new file mode 100644 index 0000000..8f7a7e6 --- /dev/null +++ b/src/packet.c @@ -0,0 +1,24 @@ +#include "packet.h" + +char* nbt_tftp_error_to_message(nbt_tftp_ecode error) { + switch (error) { + case 0: + return "ERROR"; + case 1: + return "File not Found"; + case 2: + return "Access violation"; + case 3: + return "Disk full or allocation exceeded"; + case 4: + return "Illegal TFTP operation"; + case 5: + return "Unknown Transfer ID"; + case 6: + return "File already exists"; + case 7: + return "No such user"; + } + return "UNKNOWN ERROR"; +} + -- cgit 1.4.1-2-gfad0