uip_ipaddr(&addr, 192,168,1,2);
uip_sethostaddr(&addr);
-
+
\endcode
* \param addr A pointer to an IP address of type uip_ipaddr_t;
*
/**
* uIP initialization function.
*
- * This function should be called at boot up to initialise the uIP
+ * This function should be called at boot up to initialize the uIP
* TCP/IP stack.
*/
void uip_init(void);
\code
uip_ipaddr_t addr;
struct uip_udp_conn *c;
-
+
uip_ipaddr(&addr, 192,168,2,1);
c = uip_udp_new(&addr, HTONS(12345));
if(c != NULL) {
* These functions can be used for converting between different data
* formats used by uIP.
*/
-
+
/**
* Convert an IP address to four bytes separated by commas.
*
\code
uip_ipaddr_t ipaddr;
struct uip_conn *c;
-
+
uip_ipaddr(&ipaddr, 192,168,1,2);
c = uip_connect(&ipaddr, HTONS(80));
\endcode
} while(0)
/**
- * Construct an IPv6 address from eight 8-bit words.
+ * Construct an IPv6 address from sixteen 8-bit words.
*
* This function constructs an IPv6 address.
*
*/
struct uip_conn {
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
order. */
-
+
u8_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
layer. */
uip_stats_t sent; /**< Number of sent packets at the IP
layer. */
- uip_stats_t forwarded;/**< Number of forwarded packets at the IP
+ uip_stats_t forwarded;/**< Number of forwarded packets at the IP
layer. */
uip_stats_t drop; /**< Number of dropped packets at the IP
layer. */
* The actual uIP function which does all the work.
*/
void uip_process(u8_t flag);
-
+
/* The following flags are passed as an argument to the uip_process()
function. They are used to distinguish between the two cases where
uip_process() is called. It can be called either because we have
incoming data that should be processed, or because the periodic
timer has fired. These values are never used directly, but only in
the macros defined in this file. */
-
+
#define UIP_DATA 1 /* Tells uIP that there is incoming
data in the uip_buf buffer. The
length of the data is stored in the
#define UIP_TIME_WAIT 7
#define UIP_LAST_ACK 8
#define UIP_TS_MASK 15
-
+
#define UIP_STOPPED 16
/* The TCP and IP headers. */
u16_t ipchksum;
uip_ipaddr_t srcipaddr, destipaddr;
#endif /* UIP_CONF_IPV6 */
-
+
/* TCP header. */
u16_t srcport,
destport;
u16_t ipchksum;
uip_ipaddr_t srcipaddr, destipaddr;
#endif /* UIP_CONF_IPV6 */
-
+
/* ICMP header. */
u8_t type, icode;
u16_t icmpchksum;
u16_t ipchksum;
uip_ipaddr_t srcipaddr, destipaddr;
#endif /* UIP_CONF_IPV6 */
-
+
/* UDP header. */
u16_t srcport,
destport;
(((a)->u8[13]) == (m)->addr[3]) && \
(((a)->u8[14]) == (m)->addr[4]) && \
(((a)->u8[15]) == (m)->addr[5]))
-
+
#endif /*UIP_CONF_LL_802154*/
/**
/** @} */
+