82 memset(mac, 0, MAC_MAX);
83 memset(ip, 0, IP_MAX);
101 static int aton(
const char* addr, uint8_t
ip[IP_MAX],
bool progmem =
false);
110 static int aton_P(
const char* addr, uint8_t
ip[IP_MAX])
111 __attribute__((always_inline))
113 return (
aton(addr,
ip,
true));
127 static int nametopath(
const char* hostname,
char* path,
bool progmem =
false);
140 __attribute__((always_inline))
167 static void print_addr(
IOStream& outs,
const uint8_t addr[IP_MAX], uint16_t port = 0);
177 static uint16_t
checksum(
const void* buf,
size_t count);
203 return ((
Socket*) m_ios.device());
220 virtual bool begin(
Socket* sock);
231 virtual int run(uint32_t ms = 0L);
271 virtual void on_request(
IOStream& ios) = 0;
static void print_mac(IOStream &outs, const uint8_t mac[MAC_MAX])
uint16_t port
Service port.
static int aton(const char *addr, uint8_t ip[IP_MAX], bool progmem=false)
virtual bool on_accept(IOStream &ios)
static bool is_illegal(uint8_t addr[IP_MAX], uint16_t port)
static uint16_t checksum(const void *buf, size_t count)
static int aton_P(const char *addr, uint8_t ip[IP_MAX])
uint8_t ip[IP_MAX]
Network address.
static void print_path(IOStream &outs, const char *path)
static const uint8_t IP_MAX
uint8_t mac[MAC_MAX]
Hardware address.
virtual void on_connect(IOStream &ios)
virtual void on_disconnect()
static const uint8_t MAC_MAX
static void print_addr(IOStream &outs, const uint8_t addr[IP_MAX], uint16_t port=0)
static const uint8_t PATH_MAX
static int nametopath_P(const char *hostname, char *path)
static int nametopath(const char *hostname, char *path, bool progmem=false)