mirror of
https://github.com/elua/elua.git
synced 2025-01-08 20:56:17 +08:00
05ddf01cf3
- added the resolver application (src/uip/resolv.*) to eLua (configurable by BUILD_DNS in build.h) to allow DNS lookups - more functions in the "net" module, more tests, it seems to work fine now in both "server mode" and "client mode" - console over TCP works once again, or should I say "now works". It turns out that it never worked with the code in SVN, because I committed a wrong file a while ago.
39 lines
694 B
C
39 lines
694 B
C
// UIP "helper" for eLua
|
|
// Implements the eLua specific UIP application
|
|
|
|
#ifndef __ELUA_UIP_H__
|
|
#define __ELUA_UIP_H__
|
|
|
|
#include "type.h"
|
|
#include "elua_net.h"
|
|
|
|
// eLua UIP application states
|
|
enum
|
|
{
|
|
ELUA_UIP_STATE_IDLE = 0,
|
|
ELUA_UIP_STATE_SEND,
|
|
ELUA_UIP_STATE_RECV,
|
|
ELUA_UIP_STATE_RECV_2,
|
|
ELUA_UIP_STATE_CONNECT,
|
|
ELUA_UIP_STATE_CLOSE
|
|
};
|
|
|
|
// eLua UIP state
|
|
struct elua_uip_state
|
|
{
|
|
u8 state, res;
|
|
char* ptr;
|
|
elua_net_size len;
|
|
s16 readto;
|
|
};
|
|
|
|
struct uip_eth_addr;
|
|
|
|
// Helper functions
|
|
void elua_uip_appcall();
|
|
void elua_uip_udp_appcall();
|
|
void elua_uip_init( const struct uip_eth_addr* paddr );
|
|
void elua_uip_mainloop();
|
|
|
|
#endif
|