ApertureOS
network.h
Go to the documentation of this file.
1 #ifndef _NETWORK_INTERFACE_DRIV_H_
2 #define _NETWORK_INTERFACE_DRIV_H_
3 
4 #include "types.h"
5 #include "rtl8139/rtl8139.h"
6 
7 //* Provides a means for a network device to be interfaced without regard for which device it is
8 typedef struct{
9  bool (*detect)(uint32_t); //*< Check if this network device is present
10  uint32_t (*init)(uint32_t); //*< Initialize the network device
11  uint32_t (*enable)(uint32_t); //*< Enable the network device
12  uint32_t (*disable)(uint32_t); //*< Disable the network device
13  uint32_t (*set_power_state)(uint32_t, //*< Set the power state for the network device
14  uint32_t);
15 
16  bool active;
17  bool present;
19 
20 //* Request a pointer to the packet transmission ring buffer
21 
22 //* \return pointer to the packet transmission ring buffer
23 //* \sa NI_RequestRecievePointer()
24 uint8_t*
26 
27 //* Request a pointer to the packet recieve ring buffer
28 
29 //* \return pointer to the packet recieve ring buffer
30 //* \sa NI_RequestTransmitPointer()
31 uint8_t*
33 
34 //* Initialize the network interface
35 
36 //* \sa NI_RequestTransmitPointer(), NI_RequestRecievePointer()
37 void
38 NI_Initialize(void);
39 
40 //* Start the network interface
41 
42 //* \sa NI_Initialize()
43 void
44 NI_Start(void);
45 
46 #endif
void NI_Start(void)
Definition: network.c:38
uint8_t bool
Definition: types.h:14
bool active
Definition: network.h:16
uint8_t * NI_RequestTransmitPointer(void)
void NI_Initialize(void)
Definition: network.c:16
bool present
Definition: network.h:17
Definition: network.h:8
uint8_t * NI_RequestRecievePointer(void)