Changeset 429 for EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/udpn_input.c
- Timestamp:
- Jul 3, 2020, 7:19:17 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/udpn_input.c
r331 r429 88 88 { 89 89 T_UDP_HDR *udph; 90 uint_t len;90 T_UDP_RCV_DAT_PARA para; 91 91 92 92 udph = (T_UDP_HDR *)(input->buf + off); 93 len = (uint_t)(ntohs(udph->ulen) - UDP_HDR_SIZE);93 para.len = (uint_t)(ntohs(udph->ulen) - UDP_HDR_SIZE); 94 94 95 95 if (cep->rcv_tskid != TA_NULL) { /* éãã³ããããã³ã°ã³ã¼ã«ã§ãã³ãã£ã³ã°ä¸ */ … … 111 111 /* ãã¼ã¿ããããã¡ã«ç§»ãã*/ 112 112 memcpy(cep->rcv_data, GET_UDP_SDU(input, off), 113 (size_t)( len < cep->rcv_len ?len : cep->rcv_len));113 (size_t)(para.len < cep->rcv_len ? para.len : cep->rcv_len)); 114 114 syscall(rel_net_buf(input)); 115 115 … … 117 117 118 118 #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 119 (*cep->callback)(GET_UDP_CEPID(cep), TFN_UDP_RCV_DAT, (void*)(uint32_t) len);119 (*cep->callback)(GET_UDP_CEPID(cep), TFN_UDP_RCV_DAT, (void*)(uint32_t)para.len); 120 120 #else 121 (*cep->callback)(GET_UDP_CEPID(cep), TFN_UDP_RCV_DAT, (void*)& len);121 (*cep->callback)(GET_UDP_CEPID(cep), TFN_UDP_RCV_DAT, (void*)¶.len); 122 122 #endif 123 123 else … … 134 134 135 135 #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 136 (*cep->callback)(GET_UDP_CEPID(cep), TEV_UDP_RCV_DAT, (void*)(uint32_t) len);136 (*cep->callback)(GET_UDP_CEPID(cep), TEV_UDP_RCV_DAT, (void*)(uint32_t)para.len); 137 137 #else 138 (*cep->callback)(GET_UDP_CEPID(cep), TEV_UDP_RCV_DAT, (void*)&len); 138 para.input = input; 139 para.off = off; 140 #if API_PROTO == API_PROTO_IPV4 141 para.rep4.portno = ntohs(udph->sport); 142 IN_COPY_TO_HOST(¶.rep4.ipaddr, input); 143 #else 144 para.rep6.portno = ntohs(udph->sport); 145 IN_COPY_TO_HOST(¶.rep6.ipaddr, input); 146 #endif 147 (*cep->callback)(GET_UDP_CEPID(cep), TEV_UDP_RCV_DAT, (void*)¶.len); 139 148 #endif 140 149 /* … … 143 152 * ãã¼ã¿ãèªã¿åºããªãã£ããã¨ã«ãªãã®ã§ãæ¨ã¦ãã 144 153 */ 145 if (cep->cb_netbuf != NULL) 146 syscall(rel_net_buf(cep->cb_netbuf)); 154 if (cep->cb_netbuf != NULL) { 155 if ((input->flags & NB_FLG_NOREL_IFOUT) == 0) 156 syscall(rel_net_buf(cep->cb_netbuf)); 157 cep->cb_netbuf = NULL; 158 } 147 159 } 148 160 else {
Note:
See TracChangeset
for help on using the changeset viewer.