Changeset 364 for asp3_tinet_ecnl_arm/trunk/asp3_dcre/tinet/netinet
- Timestamp:
- Feb 1, 2019, 9:57:09 PM (5 years ago)
- Location:
- asp3_tinet_ecnl_arm/trunk/asp3_dcre/tinet/netinet
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
asp3_tinet_ecnl_arm/trunk/asp3_dcre/tinet/netinet/icmp6.h
r352 r364 291 291 typedef struct t_router_advert_hdr { 292 292 T_ICMP6_HDR hdr; 293 uint32_t reachable; /* [ ms] 到達可能時間 */294 uint32_t retransmit; /* [ ms] 近隣要請送信間隔 */293 uint32_t reachable; /* [us] 到達可能時間 */ 294 uint32_t retransmit; /* [us] 近隣要請送信間隔 */ 295 295 /* この後にオプションが続く */ 296 296 } __attribute__((packed, aligned(2))) T_ROUTER_ADVERT_HDR; -
asp3_tinet_ecnl_arm/trunk/asp3_dcre/tinet/netinet/in4_subr.c
r352 r364 287 287 288 288 /* IP ヘッダを設定する。*/ 289 if ((error = in4_set_header(*nbuf, len, dstaddr, srcaddr, proto, ttl)) != E_OK) 289 if ((error = in4_set_header(*nbuf, len, dstaddr, srcaddr, proto, ttl)) != E_OK) { 290 syscall(rel_net_buf(*nbuf)); 291 *nbuf = NULL; 290 292 return error; 293 } 291 294 292 295 /* 4 オクテット境界までパディングで埋める。*/ -
asp3_tinet_ecnl_arm/trunk/asp3_dcre/tinet/netinet/in_itron.h
r352 r364 62 62 #define TFN_TCP_ALL (0) 63 63 64 #define TEV_TCP_RCV_OOB ( -0x201)64 #define TEV_TCP_RCV_OOB (0x201) 65 65 66 66 /* UDP 関係 */ … … 75 75 #define TFN_UDP_ALL (0) 76 76 77 #define TEV_UDP_RCV_DAT ( -0x221)77 #define TEV_UDP_RCV_DAT (0x221) 78 78 79 79 /* 一般 */ -
asp3_tinet_ecnl_arm/trunk/asp3_dcre/tinet/netinet/tcp_input.c
r352 r364 1364 1364 NTOHS(tcph->dport); 1365 1365 1366 /* SDU 長 より 緊急ポインタが大きい場合 */ 1367 if (tcph->urp > tcph->sum) 1368 goto drop; 1369 1366 1370 find_cep: 1367 1371 -
asp3_tinet_ecnl_arm/trunk/asp3_dcre/tinet/netinet/tcp_output.c
r352 r364 369 369 tcph->flags |= TCP_FLG_URG; 370 370 } 371 else 371 else { 372 tcph->urp = 0; 372 373 cep->snd_up = cep->snd_una; 374 } 373 375 374 376 #endif /* of #ifdef TCP_CFG_EXTENTIONS */ -
asp3_tinet_ecnl_arm/trunk/asp3_dcre/tinet/netinet/tcp_usrreq.c
r352 r364 897 897 898 898 /* tcp_rcv_buf の割当て長をリセットする。*/ 899 cep->rcv_buf_len = 0;899 cep->rcv_buf_len -= len; 900 900 901 901 /* 通信端点のロックを解除する。*/ -
asp3_tinet_ecnl_arm/trunk/asp3_dcre/tinet/netinet/udp_var.h
r352 r364 101 101 typedef ER (*t_udp_callback)(ID cepid, FN fncd, void *p_parblk); 102 102 103 typedef struct t_udp_rcv_dat_para { 104 uint_t len; 105 T_NET_BUF *input; 106 uint_t off; 107 union { 108 T_IPV4EP rep4; 109 T_IPV6EP rep6; 110 }; 111 } T_UDP_RCV_DAT_PARA; 112 103 113 /* 104 114 * UDP 通信端点 -
asp3_tinet_ecnl_arm/trunk/asp3_dcre/tinet/netinet/udpn_input.c
r352 r364 75 75 { 76 76 T_UDP_HDR *udph; 77 uint_t len;77 T_UDP_RCV_DAT_PARA para; 78 78 79 79 udph = (T_UDP_HDR *)(input->buf + off); 80 len = (uint_t)(ntohs(udph->ulen) - UDP_HDR_SIZE);80 para.len = (uint_t)(ntohs(udph->ulen) - UDP_HDR_SIZE); 81 81 82 82 if (cep->rcv_tskid != TA_NULL) { /* 非ノンブロッキングコールでペンディング中 */ … … 98 98 /* データをバッファに移す。*/ 99 99 memcpy(cep->rcv_data, GET_UDP_SDU(input, off), 100 (size_t)( len < cep->rcv_len ?len : cep->rcv_len));100 (size_t)(para.len < cep->rcv_len ? para.len : cep->rcv_len)); 101 101 syscall(rel_net_buf(input)); 102 102 … … 104 104 105 105 #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 106 (*cep->callback)(GET_UDP_CEPID(cep), TFN_UDP_RCV_DAT, (void*)(uint32_t) len);106 (*cep->callback)(GET_UDP_CEPID(cep), TFN_UDP_RCV_DAT, (void*)(uint32_t)para.len); 107 107 #else 108 (*cep->callback)(GET_UDP_CEPID(cep), TFN_UDP_RCV_DAT, (void*)& len);108 (*cep->callback)(GET_UDP_CEPID(cep), TFN_UDP_RCV_DAT, (void*)¶.len); 109 109 #endif 110 110 else … … 121 121 122 122 #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 123 (*cep->callback)(GET_UDP_CEPID(cep), TEV_UDP_RCV_DAT, (void*)(uint32_t) len);123 (*cep->callback)(GET_UDP_CEPID(cep), TEV_UDP_RCV_DAT, (void*)(uint32_t)para.len); 124 124 #else 125 (*cep->callback)(GET_UDP_CEPID(cep), TEV_UDP_RCV_DAT, (void*)&len); 125 para.input = input; 126 para.off = off; 127 #if API_PROTO == API_PROTO_IPV4 128 para.rep4.portno = ntohs(udph->sport); 129 IN_COPY_TO_HOST(¶.rep4.ipaddr, input); 130 #else 131 para.rep6.portno = ntohs(udph->sport); 132 IN_COPY_TO_HOST(¶.rep6.ipaddr, input); 133 #endif 134 (*cep->callback)(GET_UDP_CEPID(cep), TEV_UDP_RCV_DAT, (void*)¶.len); 126 135 #endif 127 136 /* … … 129 138 * データを読み出さなかったことになるので、捨てる。 130 139 */ 131 if (cep->cb_netbuf != NULL) 132 syscall(rel_net_buf(cep->cb_netbuf)); 140 if (cep->cb_netbuf != NULL) { 141 if ((input->flags & NB_FLG_NOREL_IFOUT) == 0) 142 syscall(rel_net_buf(cep->cb_netbuf)); 143 cep->cb_netbuf = NULL; 144 } 133 145 } 134 146 else { -
asp3_tinet_ecnl_arm/trunk/asp3_dcre/tinet/netinet/udpn_usrreq.c
r352 r364 411 411 return E_NOEXS; 412 412 #if defined(SUPPORT_INET6) 413 #endif 414 #if defined(SUPPORT_INET4) && defined(SUPPORT_IGMP) && TNUM_UDP4_CEPID > 0 413 #elif defined(SUPPORT_INET4) && defined(SUPPORT_IGMP) && TNUM_UDP4_CEPID > 0 415 414 switch (optname) { 416 415 case IP_MULTICAST_LOOP: … … 488 487 return E_NOEXS; 489 488 #if defined(SUPPORT_INET6) 490 #endif 491 #if defined(SUPPORT_INET4) && defined(SUPPORT_IGMP) && TNUM_UDP4_CEPID > 0 489 #elif defined(SUPPORT_INET4) && defined(SUPPORT_IGMP) && TNUM_UDP4_CEPID > 0 492 490 switch (optname) { 493 491 case IP_MULTICAST_LOOP: -
asp3_tinet_ecnl_arm/trunk/asp3_dcre/tinet/netinet/udpn_usrreq_nblk.c
r352 r364 122 122 123 123 #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 124 (*cep->callback)(GET_UDP_CEPID(cep), TFN_UDP_ RCV_DAT, (void*)error);124 (*cep->callback)(GET_UDP_CEPID(cep), TFN_UDP_CAN_CEP, (void*)error); 125 125 #else 126 (*cep->callback)(GET_UDP_CEPID(cep), TFN_UDP_ RCV_DAT, (void*)&error);126 (*cep->callback)(GET_UDP_CEPID(cep), TFN_UDP_CAN_CEP, (void*)&error); 127 127 #endif 128 128 else
Note:
See TracChangeset
for help on using the changeset viewer.