From 41f2221051cbd38a104a9fdf9f6d0395950b7b47 Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 24 Dec 2022 04:08:55 +0200 Subject: [PATCH] Updated driver API for network talking --- DAPI.hpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/DAPI.hpp b/DAPI.hpp index 5c5d947..85905a4 100644 --- a/DAPI.hpp +++ b/DAPI.hpp @@ -3,13 +3,13 @@ /** * @brief The driver API is a set of functions that the kernel provides to the drivers. - * + * * - The driver is responsible for the memory management. * - The kernel will NOT free any memory allocated by the driver. On @see StopReason the driver must free all the memory it allocated and disable the hardware it uses. * - The driver image will be freed after the driver is unloaded. * - The kernel will unbind the interrupt handlers and the process handlers. * - Kernel API will be freed after the driver is unloaded. - * + * */ enum DriverReturnCode @@ -122,8 +122,17 @@ struct KernelCallback /** @brief When the kernel wants to send a packet. */ struct { - void *Data; - unsigned long Length; + struct + { + unsigned char *Data; + unsigned long Length; + } Send; + + struct + { + char Name[128]; + unsigned long MAC; + } Fetch; } NetworkCallback; /** @brief When the kernel wants to write to disk. */