mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-28 15:34:33 +00:00
Updated driver API for network talking
This commit is contained in:
parent
a9dacd1d21
commit
41f2221051
17
DAPI.hpp
17
DAPI.hpp
@ -3,13 +3,13 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief The driver API is a set of functions that the kernel provides to the drivers.
|
* @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 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 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 driver image will be freed after the driver is unloaded.
|
||||||
* - The kernel will unbind the interrupt handlers and the process handlers.
|
* - The kernel will unbind the interrupt handlers and the process handlers.
|
||||||
* - Kernel API will be freed after the driver is unloaded.
|
* - Kernel API will be freed after the driver is unloaded.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
enum DriverReturnCode
|
enum DriverReturnCode
|
||||||
@ -122,8 +122,17 @@ struct KernelCallback
|
|||||||
/** @brief When the kernel wants to send a packet. */
|
/** @brief When the kernel wants to send a packet. */
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
void *Data;
|
struct
|
||||||
unsigned long Length;
|
{
|
||||||
|
unsigned char *Data;
|
||||||
|
unsigned long Length;
|
||||||
|
} Send;
|
||||||
|
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
char Name[128];
|
||||||
|
unsigned long MAC;
|
||||||
|
} Fetch;
|
||||||
} NetworkCallback;
|
} NetworkCallback;
|
||||||
|
|
||||||
/** @brief When the kernel wants to write to disk. */
|
/** @brief When the kernel wants to write to disk. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user