Files | |
file | uip-conf.h |
file | uipopt.h |
Defines | |
#define | UIP_LITTLE_ENDIAN 3412 |
#define | UIP_BIG_ENDIAN 1234 |
Project-specific configuration options | |
uIP has a number of configuration options that can be overridden for each project. These are kept in a project-specific uip-conf.h file and all configuration names have the prefix UIP_CONF. | |
typedef uint8_t | u8_t |
typedef uint16_t | u16_t |
typedef uint32_t | u32_t |
typedef unsigned short | uip_stats_t |
#define | ALIGN_STRUCT_END __attribute__((aligned(4))) |
#define | UIP_CONF_MAX_CONNECTIONS |
#define | UIP_CONF_MAX_LISTENPORTS |
#define | UIP_CONF_BUFFER_SIZE |
#define | UIP_CONF_BYTE_ORDER |
#define | UIP_CONF_LOGGING |
#define | UIP_CONF_UDP |
#define | UIP_CONF_UDP_CHECKSUMS |
#define | UIP_CONF_STATISTICS |
Appication specific configurations | |
An uIP application is implemented using a single application function that is called by uIP whenever a TCP/IP event occurs. The name of this function must be registered with uIP at compile time using the UIP_APPCALL definition. uIP applications can store the application state within the uip_conn structure by specifying the type of the application structure by typedef:ing the type uip_tcp_appstate_t and uip_udp_appstate_t. The file containing the definitions must be included in the uipopt.h file. The following example illustrates how this can look. void httpd_appcall(void); #define UIP_APPCALL httpd_appcall struct httpd_state { u8_t state; u16_t count; char *dataptr; char *script; }; typedef struct httpd_state uip_tcp_appstate_t | |
typedef struct hello_world_state | uip_tcp_appstate_t |
typedef struct dhcpc_state | uip_udp_appstate_t |
#define | UIP_APPCALL services_appcall |
General configuration options | |
| |
void | uip_log (char *msg) |
#define | UIP_BUFSIZE |
#define | UIP_STATISTICS |
#define | UIP_LOGGING |
#define | UIP_BROADCAST |
#define | UIP_LLH_LEN |
Static configuration options | |
These configuration options can be used for setting the IP address settings statically, but only if UIP_FIXEDADDR is set to 1. The configuration options for a specific node includes IP address, netmask and default router as well as the Ethernet address. The netmask, default router and Ethernet address are appliciable only if uIP should be run over Ethernet. All of these should be changed to suit your project. | |
#define | UIP_FIXEDADDR |
#define | UIP_PINGADDRCONF |
#define | UIP_FIXEDETHADDR |
IP configuration options | |
| |
#define | UIP_TTL 64 |
#define | UIP_REASSEMBLY |
#define | UIP_REASS_MAXAGE 40 |
UDP configuration options | |
| |
#define | UIP_UDP |
#define | UIP_UDP_CHECKSUMS |
#define | UIP_UDP_CONNS |
TCP configuration options | |
The name of the function that should be called when UDP datagrams arrive. | |
#define | UIP_ACTIVE_OPEN |
#define | UIP_CONNS |
#define | UIP_LISTENPORTS |
#define | UIP_URGDATA |
#define | UIP_RTO 3 |
#define | UIP_MAXRTX 8 |
#define | UIP_MAXSYNRTX 5 |
#define | UIP_TCP_MSS (UIP_BUFSIZE - UIP_LLH_LEN - UIP_TCPIP_HLEN) |
#define | UIP_RECEIVE_WINDOW |
#define | UIP_TIME_WAIT_TIMEOUT 120 |
ARP configuration options | |
| |
#define | UIP_ARPTAB_SIZE |
#define | UIP_ARP_MAXAGE 120 |
CPU architecture configuration | |
The CPU architecture configuration is where the endianess of the CPU on which uIP is to be run is specified. Most CPUs today are little endian, and the most notable exception are the Motorolas which are big endian. The BYTE_ORDER macro should be changed to reflect the CPU architecture on which uIP is to be run. | |
#define | UIP_BYTE_ORDER |
uIP is configured using the per-project configuration file uipopt.h. This file contains all compile-time options for uIP and should be tweaked to match each specific project. The uIP distribution contains a documented example "uipopt.h" that can be copied and modified for each project.
#define ALIGN_STRUCT_END __attribute__((aligned(4))) |
Representation of a 48-bit Ethernet address.
Definition at line 61 of file uip-conf.h.
#define UIP_ACTIVE_OPEN |
Determines if support for opening connections from uIP should be compiled in.
If the applications that are running on top of uIP for this project do not need to open outgoing TCP connections, this configration option can be turned off to reduce the code size of uIP.
define UIP_APPCALL services_appcall |
The name of the application function that uIP should call in response to TCP/IP events.
Definition at line 29 of file mult_uip.h.
#define UIP_ARP_MAXAGE 120 |
#define UIP_ARPTAB_SIZE |
#define UIP_BROADCAST |
#define UIP_BUFSIZE |
#define UIP_BYTE_ORDER |
#define UIP_CONF_BUFFER_SIZE |
uIP buffer size.
Definition at line 119 of file uip-conf.h.
#define UIP_CONF_BYTE_ORDER |
CPU byte order.
Definition at line 126 of file uip-conf.h.
#define UIP_CONF_LOGGING |
Logging on or off
Definition at line 133 of file uip-conf.h.
#define UIP_CONF_MAX_CONNECTIONS |
Maximum number of TCP connections.
Definition at line 105 of file uip-conf.h.
#define UIP_CONF_MAX_LISTENPORTS |
Maximum number of listening TCP ports.
Definition at line 112 of file uip-conf.h.
#define UIP_CONF_STATISTICS |
uIP statistics on or off
Definition at line 154 of file uip-conf.h.
#define UIP_CONF_UDP |
UDP support on or off
Definition at line 140 of file uip-conf.h.
#define UIP_CONF_UDP_CHECKSUMS |
UDP checksums on or off
Definition at line 147 of file uip-conf.h.
#define UIP_CONNS |
#define UIP_FIXEDADDR |
Determines if uIP should use a fixed IP address or not.
If uIP should use a fixed IP address, the settings are set in the uipopt.h file. If not, the macros uip_sethostaddr(), uip_setdraddr() and uip_setnetmask() should be used instead.
#define UIP_FIXEDETHADDR |
Specifies if the uIP ARP module should be compiled with a fixed Ethernet MAC address or not.
If this configuration option is 0, the macro uip_setethaddr() can be used to specify the Ethernet address at run-time.
#define UIP_LISTENPORTS |
#define UIP_LLH_LEN |
#define UIP_LOGGING |
#define UIP_MAXRTX 8 |
#define UIP_MAXSYNRTX 5 |
#define UIP_PINGADDRCONF |
Ping IP address asignment.
uIP uses a "ping" packets for setting its own IP address if this option is set. If so, uIP will start with an empty IP address and the destination IP address of the first incoming "ping" (ICMP echo) packet will be used for setting the hosts IP address.
#define UIP_REASS_MAXAGE 40 |
#define UIP_REASSEMBLY |
Turn on support for IP packet reassembly.
uIP supports reassembly of fragmented IP packets. This features requires an additonal amount of RAM to hold the reassembly buffer and the reassembly code size is approximately 700 bytes. The reassembly buffer is of the same size as the uip_buf buffer (configured by UIP_BUFSIZE).
#define UIP_RECEIVE_WINDOW |
#define UIP_RTO 3 |
#define UIP_STATISTICS |
#define UIP_TCP_MSS (UIP_BUFSIZE - UIP_LLH_LEN - UIP_TCPIP_HLEN) |
#define UIP_TIME_WAIT_TIMEOUT 120 |
#define UIP_TTL 64 |
#define UIP_UDP |
#define UIP_UDP_CHECKSUMS |
#define UIP_UDP_CONNS |
#define UIP_URGDATA |
typedef uint16_t u16_t |
16 bit datatype
This typedef defines the 16-bit type used throughout uIP.
Definition at line 79 of file uip-conf.h.
typedef uint32_t u32_t |
32 bit datatype
This typedef defines the 16-bit type used throughout uIP.
Definition at line 88 of file uip-conf.h.
typedef uint8_t u8_t |
8 bit datatype
This typedef defines the 8-bit type used throughout uIP.
Definition at line 70 of file uip-conf.h.
typedef unsigned short uip_stats_t |
Statistics datatype
This typedef defines the dataype used for keeping statistics in uIP.
Definition at line 98 of file uip-conf.h.
typedef uip_tcp_appstate_t |
The type of the application state that is to be stored in the uip_conn structure. This usually is typedef:ed to a struct holding application state information.
typedef uip_udp_appstate_t |
The type of the application state that is to be stored in the uip_conn structure. This usually is typedef:ed to a struct holding application state information.
Definition at line 33 of file mult_uip.h.
void uip_log | ( | char * | msg | ) |
Print out a uIP log message.
This function must be implemented by the module that uses uIP, and is called by uIP whenever a log message is generated.