Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Examples

Appication specific configurations


Detailed Description

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


Typedefs

typedef tcpip_uipstate uip_tcp_appstate_t
 The type of the application state that is to be stored in the uip_conn structure.
typedef tcpip_uipstate uip_udp_appstate_t
 The type of the application state that is to be stored in the uip_conn structure.


Typedef Documentation

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.

Definition at line 82 of file tcpip.h.

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 81 of file tcpip.h.


Generated on Thu Jun 22 17:45:43 2006 for Contiki 2.x by  doxygen 1.4.4