luajitos

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

rtl8139.h (676B)


      1 #ifndef RTL8139_H
      2 #define RTL8139_H
      3 
      4 #include <stdint.h>
      5 #include <lua.h>
      6 
      7 /* RTL8139 Network Card Driver */
      8 
      9 /* Initialize the RTL8139 network card */
     10 int rtl8139_init(void);
     11 
     12 /* Send a packet */
     13 int rtl8139_send(const uint8_t* data, uint16_t length);
     14 
     15 /* Receive a packet (non-blocking) */
     16 int rtl8139_receive(uint8_t* buffer, uint16_t max_length);
     17 
     18 /* Get MAC address */
     19 void rtl8139_get_mac(uint8_t mac[6]);
     20 
     21 /* Check if card is initialized */
     22 int rtl8139_is_initialized(void);
     23 
     24 /* Lua bindings */
     25 int lua_rtl8139_init(lua_State* L);
     26 int lua_rtl8139_send(lua_State* L);
     27 int lua_rtl8139_receive(lua_State* L);
     28 int lua_rtl8139_get_mac(lua_State* L);
     29 
     30 #endif /* RTL8139_H */