mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-20 10:08:33 -04:00
This commit is contained in:
parent
014d7f5b8f
commit
22e434dfaf
134 changed files with 39468 additions and 39401 deletions
|
@ -95,7 +95,7 @@ typedef uip_ip4addr_t uip_ipaddr_t;
|
|||
|
||||
uip_ipaddr(&addr, 192,168,1,2);
|
||||
uip_sethostaddr(&addr);
|
||||
|
||||
|
||||
\endcode
|
||||
* \param addr A pointer to an IP address of type uip_ipaddr_t;
|
||||
*
|
||||
|
@ -419,7 +419,11 @@ void uip_setipid(u16_t id);
|
|||
}
|
||||
\endcode
|
||||
*/
|
||||
extern u8_t uip_buf[UIP_BUFSIZE+2];
|
||||
#ifndef UIP_CONF_EXTERNAL_BUFFER
|
||||
extern u8_t uip_buf[UIP_BUFSIZE+2];
|
||||
#else
|
||||
extern unsigned char *uip_buf;
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
|
||||
|
@ -749,7 +753,7 @@ void uip_send(const void *data, int len);
|
|||
\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) {
|
||||
|
@ -810,7 +814,7 @@ struct uip_udp_conn *uip_udp_new(uip_ipaddr_t *ripaddr, u16_t rport);
|
|||
* These functions can be used for converting between different data
|
||||
* formats used by uIP.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Construct an IP address from four bytes.
|
||||
*
|
||||
|
@ -822,7 +826,7 @@ struct uip_udp_conn *uip_udp_new(uip_ipaddr_t *ripaddr, u16_t rport);
|
|||
\code
|
||||
uip_ipaddr_t ipaddr;
|
||||
struct uip_conn *c;
|
||||
|
||||
|
||||
uip_ipaddr(&ipaddr, 192,168,1,2);
|
||||
c = uip_connect(&ipaddr, HTONS(80));
|
||||
\endcode
|
||||
|
@ -1152,11 +1156,11 @@ extern u16_t uip_urglen, uip_surglen;
|
|||
*/
|
||||
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
|
||||
|
@ -1352,7 +1356,7 @@ void uip_process(u8_t flag);
|
|||
incoming data that should be processed, or because the periodic
|
||||
timer has fired. These values are never used directly, but only in
|
||||
the macrose 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
|
||||
|
@ -1379,10 +1383,15 @@ void uip_process(u8_t flag);
|
|||
#define UIP_TIME_WAIT 7
|
||||
#define UIP_LAST_ACK 8
|
||||
#define UIP_TS_MASK 15
|
||||
|
||||
|
||||
#define UIP_STOPPED 16
|
||||
|
||||
/* The TCP and IP headers. */
|
||||
|
||||
#ifdef __ICCARM__
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
|
||||
struct uip_tcpip_hdr {
|
||||
#if UIP_CONF_IPV6
|
||||
/* IPv6 header. */
|
||||
|
@ -1405,7 +1414,7 @@ struct uip_tcpip_hdr {
|
|||
u16_t srcipaddr[2],
|
||||
destipaddr[2];
|
||||
#endif /* UIP_CONF_IPV6 */
|
||||
|
||||
|
||||
/* TCP header. */
|
||||
u16_t srcport,
|
||||
destport;
|
||||
|
@ -1419,7 +1428,15 @@ struct uip_tcpip_hdr {
|
|||
u8_t optdata[4];
|
||||
} PACK_STRUCT_END;
|
||||
|
||||
#ifdef __ICCARM__
|
||||
#pragma pack()
|
||||
#endif
|
||||
|
||||
/* The ICMP and IP headers. */
|
||||
#ifdef __ICCARM__
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
|
||||
struct uip_icmpip_hdr {
|
||||
#if UIP_CONF_IPV6
|
||||
/* IPv6 header. */
|
||||
|
@ -1442,7 +1459,7 @@ struct uip_icmpip_hdr {
|
|||
u16_t srcipaddr[2],
|
||||
destipaddr[2];
|
||||
#endif /* UIP_CONF_IPV6 */
|
||||
|
||||
|
||||
/* ICMP (echo) header. */
|
||||
u8_t type, icode;
|
||||
u16_t icmpchksum;
|
||||
|
@ -1455,8 +1472,16 @@ struct uip_icmpip_hdr {
|
|||
#endif /* !UIP_CONF_IPV6 */
|
||||
} PACK_STRUCT_END;
|
||||
|
||||
#ifdef __ICCARM__
|
||||
#pragma pack()
|
||||
#endif
|
||||
|
||||
|
||||
/* The UDP and IP headers. */
|
||||
#ifdef __ICCARM__
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
|
||||
struct uip_udpip_hdr {
|
||||
#if UIP_CONF_IPV6
|
||||
/* IPv6 header. */
|
||||
|
@ -1479,7 +1504,7 @@ struct uip_udpip_hdr {
|
|||
u16_t srcipaddr[2],
|
||||
destipaddr[2];
|
||||
#endif /* UIP_CONF_IPV6 */
|
||||
|
||||
|
||||
/* UDP header. */
|
||||
u16_t srcport,
|
||||
destport;
|
||||
|
@ -1487,6 +1512,10 @@ struct uip_udpip_hdr {
|
|||
u16_t udpchksum;
|
||||
} PACK_STRUCT_END;
|
||||
|
||||
#ifdef __ICCARM__
|
||||
#pragma pack()
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
@ -1539,10 +1568,18 @@ extern uip_ipaddr_t uip_hostaddr, uip_netmask, uip_draddr;
|
|||
/**
|
||||
* Representation of a 48-bit Ethernet address.
|
||||
*/
|
||||
#ifdef __ICCARM__
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
|
||||
struct uip_eth_addr {
|
||||
u8_t addr[6];
|
||||
} PACK_STRUCT_END;
|
||||
|
||||
#ifdef __ICCARM__
|
||||
#pragma pack()
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Calculate the Internet checksum over a buffer.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue