Example program with HTTPServer and sensor data streaming over TCPSockets, using Donatien Garnier's Net APIs and services code on top of LWIP. Files StreamServer.h and .cpp encapsulate streaming over TCPSockets. Broadcast is done by sendToAll(), and all incoming data is echoed back to the client. Echo code can be replaced with some remote control of the streaming interface. See main() that shows how to periodically send some data to all subscribed clients. To subscribe, a client should open a socket at <mbed_ip> port 123. I used few lines in TCL code to set up a quick sink for the data. HTTP files are served on port 80 concurrently to the streaming.
Auto generated API documentation and code listings for iva2k_NetHttpServerTcpSockets
api_msg | This struct contains a function to execute in another thread context and a struct api_msg_msg that serves as an argument for this function |
api_msg_msg | This struct includes everything that is necessary to execute a function for a netconn in another thread context (mainly used to process netconns in the tcpip_thread context to be thread safe) |
dhcp_msg | Minimum set of fields of any DHCP message |
dns_api_msg | As do_gethostbyname requires more arguments but doesn't require a netconn, it has its own struct (to avoid struct api_msg getting bigger than necessary) |
eth_hdr | Ethernet header |
eth_vlan_hdr | VLAN header inserted between ethernet header and payload if 'type' in ethernet header is ETHTYPE_VLAN |
etharp_hdr | ARP message, see RFC 826 ("Packet format") |
etharp_q_entry | Struct for queueing outgoing packets for unknown address defined here to be accessed by memp.h |
icmp_echo_hdr | This is the standard ICMP header only that the u32_t data is splitted to two u16_t like ICMP echo needs it |
igmp_group | Igmp group structure - there is a list of groups for each interface these should really be linked from the interface, but if we keep them separate we will not affect the lwip original code too much |
in_addr | For compatibility with BSD code |
memp_malloc_helper | This structure is used to save the pool one element came from |
mib_array_node | Derived node, points to a fixed size const array of sub-identifiers plus a 'child' pointer |
mib_external_node | Derived node, has access functions for mib object in external memory or device using 'tree_level' and 'idx', with a range 0 |
mib_list_rootnode | Derived node, points to a doubly linked list of sub-identifiers plus a 'child' pointer |
mib_node | Node "base class" layout, the mandatory fields for a node |
mib_ram_array_node | Derived node, points to a fixed size mem_malloced array of sub-identifiers plus a 'child' pointer |
netconn | A netconn descriptor |
netif | Generic data structure used for all lwIP network interfaces |
obj_def | Object definition returned by (get_object_def)() |
sha1_context | SHA-1 context structure |
snmp_obj_id | Internal object identifier representation |
snmp_resp_header_lengths | Output response message header length fields |
snmp_trap_header_lengths | Output response message header length fields |
Code
api.h [code] | |
api_msg.h [code] | |
arch.h [code] | |
asn1_dec.c [code] | Abstract Syntax Notation One (ISO 8824, 8825) decoding |
asn1_enc.c [code] | Abstract Syntax Notation One (ISO 8824, 8825) encoding |
ATIf.cpp [code] | |
ATIf.h [code] | |
auth.c [code] | |
auth.h [code] | |
autoip.c [code] | AutoIP Automatic LinkLocal IP Configuration |
autoip.h [code] | AutoIP Automatic LinkLocal IP Configuration |
base64.cpp [code] | |
base64.h [code] | |
cc.h [code] | |
chap.c [code] | |
chap.h [code] | |
chpms.c [code] | |
chpms.h [code] | |
dbg.cpp [code] | |
dbg.h [code] | |
debug.h [code] | |
def.c [code] | Common functions used throughout the stack |
def.h [code] | |
dhcp.c [code] | Dynamic Host Configuration Protocol client |
dhcp.h [code] | |
dns.c [code] | DNS - host name to IP address resolver |
dns.h [code] | |
DNSRequest.cpp [code] | |
DNSRequest.h [code] | |
emailMessage.cpp [code] | |
emailMessage.h [code] | |
err.h [code] | |
eth_drv.cpp [code] | |
eth_drv.h [code] | |
etharp.c [code] | Address Resolution Protocol module for IP over Ethernet |
etharp.h [code] | |
ethernetif.c [code] | Ethernet Interface Skeleton |
EthernetNetIf.cpp [code] | |
EthernetNetIf.h [code] | |
FSHandler.cpp [code] | |
FSHandler.h [code] | |
fsm.c [code] | |
fsm.h [code] | |
GPRSModem.cpp [code] | |
GPRSModem.h [code] | |
host.h [code] | |
HTTPClient.cpp [code] | |
HTTPClient.h [code] | |
HTTPData.cpp [code] | |
HTTPData.h [code] | |
HTTPFile.cpp [code] | |
HTTPFile.h [code] | |
HTTPMap.cpp [code] | |
HTTPMap.h [code] | |
HTTPRequestDispatcher.cpp [code] | |
HTTPRequestDispatcher.h [code] | |
HTTPRequestHandler.cpp [code] | |
HTTPRequestHandler.h [code] | |
HTTPServer.cpp [code] | |
HTTPServer.h [code] | |
HttpServerTcpSockets.cpp [code] | |
HTTPStream.cpp [code] | |
HTTPStream.h [code] | |
HTTPText.cpp [code] | |
HTTPText.h [code] | |
icmp.c [code] | ICMP - Internet Control Message Protocol |
icmp.h [code] | |
igmp.c [code] | IGMP - Internet Group Management Protocol |
igmp.h [code] | |
inet.c [code] | Functions common to all TCP/IPv4 modules, such as the byte order functions |
inet.h [code] | |
inet_chksum.c [code] | Incluse internet checksum functions |
inet_chksum.h [code] | |
init.c [code] | Modules initialization |
init.h [code] | |
ip.c [code] | This is the IPv4 layer implementation for incoming and outgoing IP traffic |
ip.h [code] | |
ip_addr.c [code] | This is the IPv4 address tools implementation |
ip_addr.h [code] | |
ip_frag.c [code] | This is the IPv4 packet segmentation and reassembly implementation |
ip_frag.h [code] | |
ipaddr.h [code] | |
ipcp.c [code] | |
ipcp.h [code] | |
lcp.c [code] | |
lcp.h [code] | |
lwipNetDnsRequest.cpp [code] | |
lwipNetDnsRequest.h [code] | |
LwipNetIf.cpp [code] | |
LwipNetIf.h [code] | |
lwipNetTcpSocket.cpp [code] | |
lwipNetTcpSocket.h [code] | |
lwipNetUdpSocket.cpp [code] | |
lwipNetUdpSocket.h [code] | |
lwipopts.h [code] | |
magic.c [code] | |
magic.h [code] | |
md5.c [code] | |
md5.h [code] | |
mem.c [code] | Dynamic memory manager |
mem.h [code] | |
memp.c [code] | Dynamic pool memory manager |
memp.h [code] | |
memp_std.h [code] | |
mib2.c [code] | Management Information Base II (RFC1213) objects and functions |
mib_structs.c [code] | MIB tree access/construction functions |
msg_in.c [code] | SNMP input message processing (RFC1157) |
msg_out.c [code] | SNMP output message processing (RFC1157) |
mycrypt.c [code] | |
mycrypt.h [code] | |
MySQLClient.cpp [code] | |
MySQLClient.h [code] | |
net.cpp [code] | |
net.h [code] | |
netbuf.h [code] | |
netCfg.h [code] | |
netdb.h [code] | |
netdnsrequest.cpp [code] | |
netdnsrequest.h [code] | |
netif.c [code] | LwIP network interface abstraction |
netif.cpp [code] | |
if/net/netif.h [code] | |
lwip/include/lwip/netif.h [code] | |
netifapi.h [code] | |
netservice.cpp [code] | |
netservice.h [code] | |
nettcpsocket.cpp [code] | |
nettcpsocket.h [code] | |
netudpsocket.cpp [code] | |
netudpsocket.h [code] | |
NTPClient.cpp [code] | |
NTPClient.h [code] | |
opt.h [code] | LwIP Options Configuration |
pap.c [code] | |
pap.h [code] | |
pbuf.c [code] | Packet buffer management |
pbuf.h [code] | |
perf.h [code] | |
ppp.c [code] | |
ppp.h [code] | |
ppp_oe.c [code] | |
ppp_oe.h [code] | |
pppdebug.h [code] | |
PPPNetIf.cpp [code] | |
PPPNetIf.h [code] | |
randm.c [code] | |
randm.h [code] | |
raw.c [code] | Implementation of raw protocol PCBs for low-level handling of different types of protocols besides (or overriding) those already available in lwIP |
raw.h [code] | |
README.txt.h [code] | |
RPCHandler.cpp [code] | |
RPCHandler.h [code] | |
SerialBuf.cpp [code] | |
SerialBuf.h [code] | |
sha1.c [code] | |
sha1.h [code] | Copyright (C) 2006-2010, Paul Bakker <polarssl_maintainer at polarssl.org> All rights reserved |
sha1config.h [code] | |
SimpleHandler.cpp [code] | |
SimpleHandler.h [code] | |
sio.cpp [code] | |
sio.h [code] | |
sioMgr.cpp [code] | |
sioMgr.h [code] | |
slipif.c [code] | SLIP Interface |
slipif.h [code] | |
SMTPClient.cpp [code] | |
SMTPClient.h [code] | |
snmp.h [code] | |
snmp_asn1.h [code] | Abstract Syntax Notation One (ISO 8824, 8825) codec |
snmp_msg.h [code] | SNMP Agent message handling structures |
snmp_structs.h [code] | Generic MIB tree structures |
sockets.h [code] | |
stats.c [code] | Statistics module |
stats.h [code] | |
StreamServer.cpp [code] | |
StreamServer.h [code] | |
sys.c [code] | LwIP Operating System abstraction |
sys.h [code] | |
sys_arch.cpp [code] | |
sys_arch.h [code] | |
tcp.c [code] | Transmission Control Protocol for IP |
tcp.h [code] | |
tcp_impl.h [code] | |
tcp_in.c [code] | Transmission Control Protocol, incoming traffic |
tcp_out.c [code] | Transmission Control Protocol, outgoing traffic |
tcpip.h [code] | |
TCPSocket.cpp [code] | |
TCPSocket.h [code] | |
telit.cpp [code] | |
telit.h [code] | |
timers.c [code] | Stack-internal timers implementation |
timers.h [code] | |
udp.c [code] | User Datagram Protocol module |
udp.h [code] | |
UDPSocket.cpp [code] | |
UDPSocket.h [code] | |
url.cpp [code] | |
url.h [code] | |
urlencode.cpp [code] | |
UsbEndpoint.cpp [code] | |
UsbEndpoint.h [code] | |
usbhost_cpu.h [code] | |
usbhost_err.h [code] | |
usbhost_inc.h [code] | |
usbhost_lpc17xx.c [code] | |
usbhost_lpc17xx.h [code] | |
UsbSerial.cpp [code] | |
UsbSerial.h [code] | |
usbserialif.cpp [code] | |
usbserialif.h [code] | |
vj.c [code] | |
vj.h [code] |