*/\r
#ifndef NyLPC_uip_h\r
#define NyLPC_uip_h\r
-#include "../include/NyLPC_stdlib.h"\r
#include "../include/NyLPC_config.h"\r
+#include "../include/NyLPC_stdlib.h"\r
#include "NyLPC_uip_ethernet.h"\r
\r
#ifdef __cplusplus\r
#define NyLPC_TIPv4Addr_set(s,a0,a1,a2,a3) (s)->v=NyLPC_htonl((0xff000000&(((NyLPC_TUInt32)(a0))<<24))|(0x00ff0000&(((NyLPC_TUInt32)(a1))<<16))|(0x0000ff00&(((NyLPC_TUInt32)(a2))<<8))|(0x000000ff&((NyLPC_TUInt32)(a3))))\r
#define NyLPC_TIPv4Addr_pack(a0,a1,a2,a3) {NyLPC_HTONL((0xff000000&(((NyLPC_TUInt32)(a0))<<24))|(0x00ff0000&(((NyLPC_TUInt32)(a1))<<16))|(0x0000ff00&(((NyLPC_TUInt32)(a2))<<8))|(0x000000ff&((NyLPC_TUInt32)(a3))))}\r
\r
+/**\r
+ * IPアドレスを文字列に変換して返します。\r
+ */\r
+NyLPC_TInt16 NyLPC_TIPv4Addr_toString(const struct NyLPC_TIPv4Addr* i_ip,NyLPC_TChar* i_buf);\r
+\r
+\r
\r
\r
\r
*/\r
#define UIP_DEFAULT_IP_TTL 64\r
\r
-/**\r
- * RTOの最大値。ms単位である。\r
- * 64sが標準値である。\r
- */\r
-#define UIP_IP_RTO_MAX_RTO 64000\r
-\r
-/**\r
- * RTOの初期値。ms単位である。\r
- * 伝送路の特性に合わせて調整すること。\r
- */\r
-#define UIP_IP_RTOP_INITIAL 3000\r
-\r
-#define UIP_IP_RTO_MINIMUM 100\r
\r
\r
/**\r
*/\r
#define UIP_MAXRTX 8\r
\r
-/**\r
- * The maximum number of times a SYN segment should be retransmitted\r
- * before a connection request should be deemed to have been\r
- * unsuccessful.\r
- *\r
- * This should not need to be changed.\r
- */\r
-#define UIP_MAXSYNRTX 5\r
-/**\r
- * How long a connection should stay in the TIME_WAIT state.\r
- *\r
- * This configiration option has no real implication, and it should be\r
- * left untouched.\r
- */\r
-#define UIP_TIME_WAIT_TIMEOUT 120\r
+\r
\r
\r
\r
# define NyLPC_ntohl(n) (n)\r
# define NyLPC_HTONS(n) (n)\r
# define NyLPC_NTOHS(n) (n)\r
-# else /* UIP_BYTE_ORDER == UIP_BIG_ENDIAN */\r
+# else\r
# define NyLPC_htonl(n) NyLPC_TUInt32_bswap(n)\r
# define NyLPC_ntohl(n) NyLPC_TUInt32_bswap(n)\r
# define NyLPC_htons(n) NyLPC_TUInt16_bswap(n)\r
/**\r
* IPヘッダの長さを返す。\r
*/\r
-#define NyLPC_TIPv4Header_getHeaderLength(i_iph) ((i_iph->vhl & 0x0f)*4)\r
+#define NyLPC_TIPv4Header_getHeaderLength(i_iph) (((i_iph)->vhl & 0x0f)*4)\r
/**\r
* IPパケット全体の長さを返す。
*/\r
} PACK_STRUCT_END;\r
\r
\r
+/**\r
+ * i_req_addrを問い合わせるARP_REQUESTを生成します。\r
+ */\r
void NyLPC_TArpHeader_setArpRequest(\r
struct NyLPC_TArpHeader* i_struct,\r
const struct NyLPC_TIPv4Addr i_saddr,\r
const struct NyLPC_TEthAddr* i_srceth,\r
- const struct NyLPC_TIPv4Addr i_daddr);\r
+ const struct NyLPC_TIPv4Addr* i_req_addr);\r
\r
\r
typedef struct NyLPC_TcEthernetIIPayload NyLPC_TcEthernetIIPayload_t;\r