Index: uKadecot/trunk/uip/net/ip/psock.c
===================================================================
--- uKadecot/trunk/uip/net/ip/psock.c	(revision 157)
+++ uKadecot/trunk/uip/net/ip/psock.c	(revision 158)
@@ -37,7 +37,7 @@
 #include <string.h>
 
-#include "uipopt.h"
-#include "psock.h"
-#include "uip.h"
+#include "net/ip/uipopt.h"
+#include "net/ip/psock.h"
+#include "net/ip/uip.h"
 
 #define STATE_NONE 0
@@ -74,5 +74,5 @@
 static void
 buf_setup(struct psock_buf *buf,
-          u8_t *bufptr, u16_t bufsize)
+          uint8_t *bufptr, uint16_t bufsize)
 {
   buf->ptr = bufptr;
@@ -80,7 +80,7 @@
 }
 /*---------------------------------------------------------------------------*/
-static u8_t
-buf_bufdata(struct psock_buf *buf, u16_t len,
-            u8_t **dataptr, u16_t *datalen)
+static uint8_t
+buf_bufdata(struct psock_buf *buf, uint16_t len,
+            uint8_t **dataptr, uint16_t *datalen)
 {
   if(*datalen < buf->left) {
@@ -108,9 +108,9 @@
 }
 /*---------------------------------------------------------------------------*/
-static u8_t
-buf_bufto(register struct psock_buf *buf, u8_t endmarker,
-          register u8_t **dataptr, register u16_t *datalen)
-{
-  u8_t c;
+static uint8_t
+buf_bufto(register struct psock_buf *buf, uint8_t endmarker,
+          register uint8_t **dataptr, register uint16_t *datalen)
+{
+  uint8_t c;
   while(buf->left > 0 && *datalen > 0) {
     c = *buf->ptr = **dataptr;
@@ -244,5 +244,5 @@
 }
 /*---------------------------------------------------------------------------*/
-u16_t
+uint16_t
 psock_datalen(struct psock *psock)
 {
@@ -283,5 +283,5 @@
       PT_WAIT_UNTIL(&psock->psockpt, psock_newdata(psock));
       psock->state = STATE_READ;
-      psock->readptr = (u8_t *)uip_appdata;
+      psock->readptr = (uint8_t *)uip_appdata;
       psock->readlen = uip_datalen();
     }
@@ -311,5 +311,5 @@
       printf("Waited for newdata\n");
       psock->state = STATE_READ;
-      psock->readptr = (u8_t *)uip_appdata;
+      psock->readptr = (uint8_t *)uip_appdata;
       psock->readlen = uip_datalen();
     }
Index: uKadecot/trunk/uip/net/ip/psock.h
===================================================================
--- uKadecot/trunk/uip/net/ip/psock.h	(revision 157)
+++ uKadecot/trunk/uip/net/ip/psock.h	(revision 158)
@@ -82,6 +82,6 @@
 #define __PSOCK_H__
 
-#include "uipopt.h"
-#include "pt.h"
+#include "net/ip/uipopt.h"
+#include "sys/pt.h"
 
  /*
@@ -94,5 +94,5 @@
  */
 struct psock_buf {
-  u8_t *ptr;
+  uint8_t *ptr;
   unsigned short left;
 };
@@ -108,12 +108,12 @@
                             functions, and one that runs inside the
                             psock functions. */
-  const u8_t *sendptr;   /* Pointer to the next data to be sent. */
-  u8_t *readptr;         /* Pointer to the next data to be read. */
+  const uint8_t *sendptr;   /* Pointer to the next data to be sent. */
+  uint8_t *readptr;         /* Pointer to the next data to be read. */
 
   char *bufptr;          /* Pointer to the buffer used for buffering
                             incoming data. */
 
-  u16_t sendlen;         /* The number of bytes left to be sent. */
-  u16_t readlen;         /* The number of bytes left to be read. */
+  uint16_t sendlen;         /* The number of bytes left to be sent. */
+  uint16_t readlen;         /* The number of bytes left to be read. */
 
   struct psock_buf buf;  /* The structure holding the state of the
@@ -281,5 +281,5 @@
 #define PSOCK_DATALEN(psock) psock_datalen(psock)
 
-u16_t psock_datalen(struct psock *psock);
+uint16_t psock_datalen(struct psock *psock);
 
 /**
Index: uKadecot/trunk/uip/net/ip/uip-split.c
===================================================================
--- uKadecot/trunk/uip/net/ip/uip-split.c	(revision 157)
+++ uKadecot/trunk/uip/net/ip/uip-split.c	(revision 158)
@@ -36,8 +36,8 @@
 #include <string.h>
 
-#include "uip-split.h"
-#include "uip.h"
-#include "uip-fw.h"
-#include "uip_arch.h"
+#include "net/ip/uip-split.h"
+#include "net/ip/uip.h"
+#include "net/ipv4/uip-fw.h"
+#include "net/ip/uip_arch.h"
 
 
@@ -49,5 +49,5 @@
 uip_split_output(void)
 {
-  u16_t tcplen, len1, len2;
+  uint16_t tcplen, len1, len2;
 
   /* We only try to split maximum sized TCP segments. */
@@ -107,5 +107,5 @@
     
     /*    uip_appdata += len1;*/
-    memcpy(uip_appdata, (u8_t *)uip_appdata + len1, len2);
+    memcpy(uip_appdata, (uint8_t *)uip_appdata + len1, len2);
 
     uip_add32(BUF->seqno, len1);
Index: uKadecot/trunk/uip/net/ip/uip.h
===================================================================
--- uKadecot/trunk/uip/net/ip/uip.h	(revision 157)
+++ uKadecot/trunk/uip/net/ip/uip.h	(revision 158)
@@ -54,5 +54,5 @@
 #define __UIP_H__
 
-#include "uipopt.h"
+#include "net/ip/uipopt.h"
 
 /**
@@ -60,6 +60,6 @@
  *
  */
-typedef u16_t uip_ip4addr_t[2];
-typedef u16_t uip_ip6addr_t[8];
+typedef uint16_t uip_ip4addr_t[2];
+typedef uint16_t uip_ip6addr_t[8];
 #if UIP_CONF_IPV6
 typedef uip_ip6addr_t uip_ipaddr_t;
@@ -193,5 +193,5 @@
  * This function may be used at boot time to set the initial ip_id.
  */
-void uip_setipid(u16_t id);
+void uip_setipid(uint16_t id);
 
 /** @} */
@@ -421,7 +421,7 @@
  */
 #if 0
-extern u8_t uip_buf[UIP_BUFSIZE+2];
+extern uint8_t uip_buf[UIP_BUFSIZE+2];
 #else
-extern u8_t *uip_buf;
+extern uint8_t *uip_buf;
 #endif
 
@@ -452,5 +452,5 @@
  * \param port A 16-bit port number in network byte order.
  */
-void uip_listen(u16_t port);
+void uip_listen(uint16_t port);
 
 /**
@@ -466,5 +466,5 @@
  * \param port A 16-bit port number in network byte order.
  */
-void uip_unlisten(u16_t port);
+void uip_unlisten(uint16_t port);
 
 /**
@@ -500,5 +500,5 @@
  *
  */
-struct uip_conn *uip_connect(uip_ipaddr_t *ripaddr, u16_t port);
+struct uip_conn *uip_connect(uip_ipaddr_t *ripaddr, uint16_t port);
 
 
@@ -768,5 +768,5 @@
  * if no connection could be allocated.
  */
-struct uip_udp_conn *uip_udp_new(uip_ipaddr_t *ripaddr, u16_t rport);
+struct uip_udp_conn *uip_udp_new(uip_ipaddr_t *ripaddr, uint16_t rport);
 
 /**
@@ -843,6 +843,6 @@
  */
 #define uip_ipaddr(addr, addr0,addr1,addr2,addr3) do { \
-                     ((u16_t *)(addr))[0] = HTONS(((addr0) << 8) | (addr1)); \
-                     ((u16_t *)(addr))[1] = HTONS(((addr2) << 8) | (addr3)); \
+                     ((uint16_t *)(addr))[0] = HTONS(((addr0) << 8) | (addr1)); \
+                     ((uint16_t *)(addr))[1] = HTONS(((addr2) << 8) | (addr3)); \
                   } while(0)
 
@@ -855,12 +855,12 @@
  */
 #define uip_ip6addr(addr, addr0,addr1,addr2,addr3,addr4,addr5,addr6,addr7) do { \
-                     ((u16_t *)(addr))[0] = HTONS((addr0)); \
-                     ((u16_t *)(addr))[1] = HTONS((addr1)); \
-                     ((u16_t *)(addr))[2] = HTONS((addr2)); \
-                     ((u16_t *)(addr))[3] = HTONS((addr3)); \
-                     ((u16_t *)(addr))[4] = HTONS((addr4)); \
-                     ((u16_t *)(addr))[5] = HTONS((addr5)); \
-                     ((u16_t *)(addr))[6] = HTONS((addr6)); \
-                     ((u16_t *)(addr))[7] = HTONS((addr7)); \
+                     ((uint16_t *)(addr))[0] = HTONS((addr0)); \
+                     ((uint16_t *)(addr))[1] = HTONS((addr1)); \
+                     ((uint16_t *)(addr))[2] = HTONS((addr2)); \
+                     ((uint16_t *)(addr))[3] = HTONS((addr3)); \
+                     ((uint16_t *)(addr))[4] = HTONS((addr4)); \
+                     ((uint16_t *)(addr))[5] = HTONS((addr5)); \
+                     ((uint16_t *)(addr))[6] = HTONS((addr6)); \
+                     ((uint16_t *)(addr))[7] = HTONS((addr7)); \
                   } while(0)
 
@@ -885,6 +885,6 @@
 #if !UIP_CONF_IPV6
 #define uip_ipaddr_copy(dest, src) do { \
-                     ((u16_t *)dest)[0] = ((u16_t *)src)[0]; \
-                     ((u16_t *)dest)[1] = ((u16_t *)src)[1]; \
+                     ((uint16_t *)dest)[0] = ((uint16_t *)src)[0]; \
+                     ((uint16_t *)dest)[1] = ((uint16_t *)src)[1]; \
                   } while(0)
 #else /* !UIP_CONF_IPV6 */
@@ -913,6 +913,6 @@
  */
 #if !UIP_CONF_IPV6
-#define uip_ipaddr_cmp(addr1, addr2) (((u16_t *)addr1)[0] == ((u16_t *)addr2)[0] && \
-                                      ((u16_t *)addr1)[1] == ((u16_t *)addr2)[1])
+#define uip_ipaddr_cmp(addr1, addr2) (((uint16_t *)addr1)[0] == ((uint16_t *)addr2)[0] && \
+                                      ((uint16_t *)addr1)[1] == ((uint16_t *)addr2)[1])
 #else /* !UIP_CONF_IPV6 */
 #define uip_ipaddr_cmp(addr1, addr2) (memcmp(addr1, addr2, sizeof(uip_ip6addr_t)) == 0)
@@ -944,8 +944,8 @@
  */
 #define uip_ipaddr_maskcmp(addr1, addr2, mask) \
-                          (((((u16_t *)addr1)[0] & ((u16_t *)mask)[0]) == \
-                            (((u16_t *)addr2)[0] & ((u16_t *)mask)[0])) && \
-                           ((((u16_t *)addr1)[1] & ((u16_t *)mask)[1]) == \
-                            (((u16_t *)addr2)[1] & ((u16_t *)mask)[1])))
+                          (((((uint16_t *)addr1)[0] & ((uint16_t *)mask)[0]) == \
+                            (((uint16_t *)addr2)[0] & ((uint16_t *)mask)[0])) && \
+                           ((((uint16_t *)addr1)[1] & ((uint16_t *)mask)[1]) == \
+                            (((uint16_t *)addr2)[1] & ((uint16_t *)mask)[1])))
 
 
@@ -975,6 +975,6 @@
  */
 #define uip_ipaddr_mask(dest, src, mask) do { \
-                     ((u16_t *)dest)[0] = ((u16_t *)src)[0] & ((u16_t *)mask)[0]; \
-                     ((u16_t *)dest)[1] = ((u16_t *)src)[1] & ((u16_t *)mask)[1]; \
+                     ((uint16_t *)dest)[0] = ((uint16_t *)src)[0] & ((uint16_t *)mask)[0]; \
+                     ((uint16_t *)dest)[1] = ((uint16_t *)src)[1] & ((uint16_t *)mask)[1]; \
                   } while(0)
 
@@ -987,5 +987,5 @@
  \code
  uip_ipaddr_t ipaddr;
- u8_t octet;
+ uint8_t octet;
 
  uip_ipaddr(&ipaddr, 1,2,3,4);
@@ -997,5 +997,5 @@
  * \hideinitializer
  */
-#define uip_ipaddr1(addr) (htons(((u16_t *)(addr))[0]) >> 8)
+#define uip_ipaddr1(addr) (htons(((uint16_t *)(addr))[0]) >> 8)
 
 /**
@@ -1007,5 +1007,5 @@
  \code
  uip_ipaddr_t ipaddr;
- u8_t octet;
+ uint8_t octet;
 
  uip_ipaddr(&ipaddr, 1,2,3,4);
@@ -1017,5 +1017,5 @@
  * \hideinitializer
  */
-#define uip_ipaddr2(addr) (htons(((u16_t *)(addr))[0]) & 0xff)
+#define uip_ipaddr2(addr) (htons(((uint16_t *)(addr))[0]) & 0xff)
 
 /**
@@ -1027,5 +1027,5 @@
  \code
  uip_ipaddr_t ipaddr;
- u8_t octet;
+ uint8_t octet;
 
  uip_ipaddr(&ipaddr, 1,2,3,4);
@@ -1037,5 +1037,5 @@
  * \hideinitializer
  */
-#define uip_ipaddr3(addr) (htons(((u16_t *)(addr))[1]) >> 8)
+#define uip_ipaddr3(addr) (htons(((uint16_t *)(addr))[1]) >> 8)
 
 /**
@@ -1047,5 +1047,5 @@
  \code
  uip_ipaddr_t ipaddr;
- u8_t octet;
+ uint8_t octet;
 
  uip_ipaddr(&ipaddr, 1,2,3,4);
@@ -1057,5 +1057,5 @@
  * \hideinitializer
  */
-#define uip_ipaddr4(addr) (htons(((u16_t *)(addr))[1]) & 0xff)
+#define uip_ipaddr4(addr) (htons(((uint16_t *)(addr))[1]) & 0xff)
 
 /**
@@ -1072,5 +1072,5 @@
 #      define HTONS(n) (n)
 #   else /* UIP_BYTE_ORDER == UIP_BIG_ENDIAN */
-#      define HTONS(n) (u16_t)((((u16_t) (n)) << 8) | (((u16_t) (n)) >> 8))
+#      define HTONS(n) (uint16_t)((((uint16_t) (n)) << 8) | (((uint16_t) (n)) >> 8))
 #   endif /* UIP_BYTE_ORDER == UIP_BIG_ENDIAN */
 #else
@@ -1086,5 +1086,5 @@
  */
 #ifndef htons
-u16_t htons(u16_t val);
+uint16_t htons(uint16_t val);
 #endif /* htons */
 #ifndef ntohs
@@ -1104,5 +1104,5 @@
 
 #if UIP_URGDATA > 0
-/* u8_t *uip_urgdata:
+/* uint8_t *uip_urgdata:
  *
  * This pointer points to any urgent data that has been received. Only
@@ -1136,10 +1136,10 @@
  *
  */
-extern u16_t uip_len;
+extern uint16_t uip_len;
 
 /** @} */
 
 #if UIP_URGDATA > 0
-extern u16_t uip_urglen, uip_surglen;
+extern uint16_t uip_urglen, uip_surglen;
 #endif /* UIP_URGDATA > 0 */
 
@@ -1158,25 +1158,25 @@
   uip_ipaddr_t ripaddr;   /**< The IP address of the remote host. */
 
-  u16_t lport;        /**< The local TCP port, in network byte order. */
-  u16_t rport;        /**< The local remote TCP port, in network byte
+  uint16_t lport;        /**< The local TCP port, in network byte order. */
+  uint16_t rport;        /**< The local remote TCP port, in network byte
                          order. */
 
-  u8_t rcv_nxt[4];    /**< The sequence number that we expect to
+  uint8_t rcv_nxt[4];    /**< The sequence number that we expect to
                          receive next. */
-  u8_t snd_nxt[4];    /**< The sequence number that was last sent by
+  uint8_t snd_nxt[4];    /**< The sequence number that was last sent by
                          us. */
-  u16_t len;          /**< Length of the data that was previously sent. */
-  u16_t mss;          /**< Current maximum segment size for the
+  uint16_t len;          /**< Length of the data that was previously sent. */
+  uint16_t mss;          /**< Current maximum segment size for the
                          connection. */
-  u16_t initialmss;   /**< Initial maximum segment size for the
+  uint16_t initialmss;   /**< Initial maximum segment size for the
                          connection. */
-  u8_t sa;            /**< Retransmission time-out calculation state
+  uint8_t sa;            /**< Retransmission time-out calculation state
                          variable. */
-  u8_t sv;            /**< Retransmission time-out calculation state
+  uint8_t sv;            /**< Retransmission time-out calculation state
                          variable. */
-  u8_t rto;           /**< Retransmission time-out. */
-  u8_t tcpstateflags; /**< TCP state and flags. */
-  u8_t timer;         /**< The retransmission timer. */
-  u8_t nrtx;          /**< The number of retransmissions for the last
+  uint8_t rto;           /**< Retransmission time-out. */
+  uint8_t tcpstateflags; /**< TCP state and flags. */
+  uint8_t timer;         /**< The retransmission timer. */
+  uint8_t nrtx;          /**< The number of retransmissions for the last
                          segment sent. */
 
@@ -1203,5 +1203,5 @@
  * 4-byte array used for the 32-bit sequence number calculations.
  */
-extern u8_t uip_acc32[4];
+extern uint8_t uip_acc32[4];
 
 /** @} */
@@ -1214,7 +1214,7 @@
 struct uip_udp_conn {
   uip_ipaddr_t ripaddr;   /**< The IP address of the remote peer. */
-  u16_t lport;        /**< The local port number in network byte order. */
-  u16_t rport;        /**< The remote port number in network byte order. */
-  u8_t  ttl;          /**< Default time-to-live. */
+  uint16_t lport;        /**< The local port number in network byte order. */
+  uint16_t rport;        /**< The remote port number in network byte order. */
+  uint8_t  ttl;          /**< Default time-to-live. */
 
   /** The application state. */
@@ -1301,5 +1301,5 @@
  */
 /*---------------------------------------------------------------------------*/
-/* u8_t uip_flags:
+/* uint8_t uip_flags:
  *
  * When the application is called, uip_flags will contain the flags
@@ -1307,5 +1307,5 @@
  * infomation.
  */
-extern u8_t uip_flags;
+extern uint8_t uip_flags;
 
 /* The following flags may be set in the global variable uip_flags
@@ -1349,5 +1349,5 @@
  * The actual uIP function which does all the work.
  */
-void uip_process(u8_t flag);
+void uip_process(uint8_t flag);
 
 /* The following flags are passed as an argument to the uip_process()
@@ -1397,13 +1397,13 @@
 #if UIP_CONF_IPV6
   /* IPv6 header. */
-  u8_t vtc,
+  uint8_t vtc,
     tcflow;
-  u16_t flow;
-  u8_t len[2];
-  u8_t proto, ttl;
+  uint16_t flow;
+  uint8_t len[2];
+  uint8_t proto, ttl;
   uip_ip6addr_t srcipaddr, destipaddr;
 #else /* UIP_CONF_IPV6 */
   /* IPv4 header. */
-  u8_t vhl,
+  uint8_t vhl,
     tos,
     len[2],
@@ -1412,20 +1412,20 @@
     ttl,
     proto;
-  u16_t ipchksum;
-  u16_t srcipaddr[2],
+  uint16_t ipchksum;
+  uint16_t srcipaddr[2],
     destipaddr[2];
 #endif /* UIP_CONF_IPV6 */
 
   /* TCP header. */
-  u16_t srcport,
+  uint16_t srcport,
     destport;
-  u8_t seqno[4],
+  uint8_t seqno[4],
     ackno[4],
     tcpoffset,
     flags,
     wnd[2];
-  u16_t tcpchksum;
-  u8_t urgp[2];
-  u8_t optdata[4];
+  uint16_t tcpchksum;
+  uint8_t urgp[2];
+  uint8_t optdata[4];
 };
 
@@ -1434,13 +1434,13 @@
 #if UIP_CONF_IPV6
   /* IPv6 header. */
-  u8_t vtc,
+  uint8_t vtc,
     tcf;
-  u16_t flow;
-  u8_t len[2];
-  u8_t proto, ttl;
+  uint16_t flow;
+  uint8_t len[2];
+  uint8_t proto, ttl;
   uip_ip6addr_t srcipaddr, destipaddr;
 #else /* UIP_CONF_IPV6 */
   /* IPv4 header. */
-  u8_t vhl,
+  uint8_t vhl,
     tos,
     len[2],
@@ -1449,18 +1449,18 @@
     ttl,
     proto;
-  u16_t ipchksum;
-  u16_t srcipaddr[2],
+  uint16_t ipchksum;
+  uint16_t srcipaddr[2],
     destipaddr[2];
 #endif /* UIP_CONF_IPV6 */
 
   /* ICMP (echo) header. */
-  u8_t type, icode;
-  u16_t icmpchksum;
+  uint8_t type, icode;
+  uint16_t icmpchksum;
 #if !UIP_CONF_IPV6
-  u16_t id, seqno;
+  uint16_t id, seqno;
 #else /* !UIP_CONF_IPV6 */
-  u8_t flags, reserved1, reserved2, reserved3;
-  u8_t icmp6data[16];
-  u8_t options[1];
+  uint8_t flags, reserved1, reserved2, reserved3;
+  uint8_t icmp6data[16];
+  uint8_t options[1];
 #endif /* !UIP_CONF_IPV6 */
 };
@@ -1471,13 +1471,13 @@
 #if UIP_CONF_IPV6
   /* IPv6 header. */
-  u8_t vtc,
+  uint8_t vtc,
     tcf;
-  u16_t flow;
-  u8_t len[2];
-  u8_t proto, ttl;
+  uint16_t flow;
+  uint8_t len[2];
+  uint8_t proto, ttl;
   uip_ip6addr_t srcipaddr, destipaddr;
 #else /* UIP_CONF_IPV6 */
   /* IP header. */
-  u8_t vhl,
+  uint8_t vhl,
     tos,
     len[2],
@@ -1486,14 +1486,14 @@
     ttl,
     proto;
-  u16_t ipchksum;
-  u16_t srcipaddr[2],
+  uint16_t ipchksum;
+  uint16_t srcipaddr[2],
     destipaddr[2];
 #endif /* UIP_CONF_IPV6 */
 
   /* UDP header. */
-  u16_t srcport,
+  uint16_t srcport,
     destport;
-  u16_t udplen;
-  u16_t udpchksum;
+  uint16_t udplen;
+  uint16_t udpchksum;
 };
 
@@ -1555,5 +1555,5 @@
  */
 struct uip_eth_addr {
-  u8_t addr[6];
+  uint8_t addr[6];
 };
 
@@ -1574,5 +1574,5 @@
  * \return The Internet checksum of the buffer.
  */
-u16_t uip_chksum(u16_t *buf, u16_t len);
+uint16_t uip_chksum(uint16_t *buf, uint16_t len);
 
 /**
@@ -1585,5 +1585,5 @@
  * buffer.
  */
-u16_t uip_ipchksum(void);
+uint16_t uip_ipchksum(void);
 
 /**
@@ -1596,5 +1596,5 @@
  * to by uip_appdata.
  */
-u16_t uip_tcpchksum(void);
+uint16_t uip_tcpchksum(void);
 
 /**
@@ -1607,5 +1607,5 @@
  * to by uip_appdata.
  */
-u16_t uip_udpchksum(void);
+uint16_t uip_udpchksum(void);
 
 
Index: uKadecot/trunk/uip/net/ip/uip_arch.h
===================================================================
--- uKadecot/trunk/uip/net/ip/uip_arch.h	(revision 158)
+++ uKadecot/trunk/uip/net/ip/uip_arch.h	(revision 158)
@@ -0,0 +1,138 @@
+/**
+ * \addtogroup uip
+ * {@
+ */
+
+/**
+ * \defgroup uiparch Architecture specific uIP functions
+ * @{
+ *
+ * The functions in the architecture specific module implement the IP
+ * check sum and 32-bit additions.
+ *
+ * The IP checksum calculation is the most computationally expensive
+ * operation in the TCP/IP stack and it therefore pays off to
+ * implement this in efficient assembler. The purpose of the uip-arch
+ * module is to let the checksum functions to be implemented in
+ * architecture specific assembler.
+ *
+ */
+
+/**
+ * \file
+ * Declarations of architecture specific functions.
+ * \author Adam Dunkels <adam@dunkels.com>
+ */
+
+/*
+ * Copyright (c) 2001, Adam Dunkels.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote
+ *    products derived from this software without specific prior
+ *    written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This file is part of the uIP TCP/IP stack.
+ *
+ * $Id$
+ *
+ */
+
+#ifndef __UIP_ARCH_H__
+#define __UIP_ARCH_H__
+
+#include "net/ip/uip.h"
+
+/**
+ * Carry out a 32-bit addition.
+ *
+ * Because not all architectures for which uIP is intended has native
+ * 32-bit arithmetic, uIP uses an external C function for doing the
+ * required 32-bit additions in the TCP protocol processing. This
+ * function should add the two arguments and place the result in the
+ * global variable uip_acc32.
+ *
+ * \note The 32-bit integer pointed to by the op32 parameter and the
+ * result in the uip_acc32 variable are in network byte order (big
+ * endian).
+ *
+ * \param op32 A pointer to a 4-byte array representing a 32-bit
+ * integer in network byte order (big endian).
+ *
+ * \param op16 A 16-bit integer in host byte order.
+ */
+void uip_add32(uint8_t *op32, uint16_t op16);
+
+/**
+ * Calculate the Internet checksum over a buffer.
+ *
+ * The Internet checksum is the one's complement of the one's
+ * complement sum of all 16-bit words in the buffer.
+ *
+ * See RFC1071.
+ *
+ * \note This function is not called in the current version of uIP,
+ * but future versions might make use of it.
+ *
+ * \param buf A pointer to the buffer over which the checksum is to be
+ * computed.
+ *
+ * \param len The length of the buffer over which the checksum is to
+ * be computed.
+ *
+ * \return The Internet checksum of the buffer.
+ */
+uint16_t uip_chksum(uint16_t *buf, uint16_t len);
+
+/**
+ * Calculate the IP header checksum of the packet header in uip_buf.
+ *
+ * The IP header checksum is the Internet checksum of the 20 bytes of
+ * the IP header.
+ *
+ * \return The IP header checksum of the IP header in the uip_buf
+ * buffer.
+ */
+uint16_t uip_ipchksum(void);
+
+/**
+ * Calculate the TCP checksum of the packet in uip_buf and uip_appdata.
+ *
+ * The TCP checksum is the Internet checksum of data contents of the
+ * TCP segment, and a pseudo-header as defined in RFC793.
+ *
+ * \note The uip_appdata pointer that points to the packet data may
+ * point anywhere in memory, so it is not possible to simply calculate
+ * the Internet checksum of the contents of the uip_buf buffer.
+ *
+ * \return The TCP checksum of the TCP segment in uip_buf and pointed
+ * to by uip_appdata.
+ */
+uint16_t uip_tcpchksum(void);
+
+uint16_t uip_udpchksum(void);
+
+/** @} */
+/** @} */
+
+#endif /* __UIP_ARCH_H__ */
Index: uKadecot/trunk/uip/net/ip/uiplib.c
===================================================================
--- uKadecot/trunk/uip/net/ip/uiplib.c	(revision 157)
+++ uKadecot/trunk/uip/net/ip/uiplib.c	(revision 158)
@@ -35,6 +35,6 @@
 
 
-#include "uip.h"
-#include "uiplib.h"
+#include "net/ip/uip.h"
+#include "net/ip/uiplib.h"
 
 
Index: uKadecot/trunk/uip/net/ip/uipopt.h
===================================================================
--- uKadecot/trunk/uip/net/ip/uipopt.h	(revision 157)
+++ uKadecot/trunk/uip/net/ip/uipopt.h	(revision 158)
@@ -502,6 +502,6 @@
 
 struct httpd_state {
-  u8_t state;
-  u16_t count;
+  uint8_t state;
+  uint16_t count;
   char *dataptr;
   char *script;
