From fcc66b0fa04b25b206e702110ed652fd4c113823 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Fri, 28 Mar 2025 20:29:16 +0100 Subject: fw: replace netboot with bootnet. Signed-off-by: Amlal El Mahrouss --- lib/bootnet.h | 30 ++++++++++++++++++++++++++++++ lib/netboot.h | 30 ------------------------------ 2 files changed, 30 insertions(+), 30 deletions(-) create mode 100644 lib/bootnet.h delete mode 100644 lib/netboot.h (limited to 'lib') diff --git a/lib/bootnet.h b/lib/bootnet.h new file mode 100644 index 0000000..3ce6763 --- /dev/null +++ b/lib/bootnet.h @@ -0,0 +1,30 @@ +/* ------------------------------------------- + + Copyright (C) 2025, Amlal EL Mahrouss, all rights reserved. + +------------------------------------------- */ + +#pragma once + +#include + +#define BOOTNET_INET_MAGIC "NETB" +#define BOOTNET_INET_MAGIC_LEN 4 + +/// @brief Netboot Internet Header +/// Consists of 4 magic characters, and a set of fields describing the current patch that's being sent (if m_preflight = 0) +/// @note Can be used to patch ROMs too (if m_implies_rom = 1) +typedef struct bootnet_inet_header +{ + char m_nb1; /// magic char 1 'N' + char m_nb2; /// magic char 2 'E' + char m_nb3; /// magic char 3 'T' + char m_nb4; /// magic char 4 'B' + + char m_patch_name[255]; /// example: ColdChoco + int32_t m_length; /// The patch's length. + char m_target[255]; /// The target file. + uint8_t m_implies_rom; /// does it imply an EEPROM program? + uint8_t m_preflight; /// Do we just check if this endpoint exists/is valid? + uint8_t m_blob[]; +} bootnet_inet_header; diff --git a/lib/netboot.h b/lib/netboot.h deleted file mode 100644 index 4c85394..0000000 --- a/lib/netboot.h +++ /dev/null @@ -1,30 +0,0 @@ -/* ------------------------------------------- - - Copyright (C) 2025, Amlal EL Mahrouss, all rights reserved. - -------------------------------------------- */ - -#pragma once - -#include - -#define NETBOOT_INET_MAGIC "NETB" -#define NETBOOT_INET_MAGIC_LEN 4 - -/// @brief Netboot Internet Header -/// Consists of 4 magic characters, and a set of fields describing the current patch that's being sent (if m_preflight = 0) -/// @note Can be used to patch ROMs too (if m_implies_rom = 1) -typedef struct NETBOOT_INET_HEADER -{ - char m_nb1; /// magic char 1 'N' - char m_nb2; /// magic char 2 'E' - char m_nb3; /// magic char 3 'T' - char m_nb4; /// magic char 4 'B' - - char m_patch_name[255]; /// example: ColdChoco - int32_t m_length; /// The patch's length. - char m_target[255]; /// The target file. - uint8_t m_implies_rom; /// does it imply an EEPROM program? - uint8_t m_preflight; /// Do we just check if this endpoint exists/is valid? - uint8_t m_blob[]; -} NETBOOT_INET_HEADER; -- cgit v1.2.3