Home
last modified time | relevance | path

Searched refs:tot_len (Results 1 – 25 of 126) sorted by relevance

123456

/third_party/lwip/
D0040-add-huge-snd_buf.patch20 - p->tot_len = (u16_t)(p->tot_len + t->tot_len);
21 + p->tot_len = p->tot_len + t->tot_len;
24 LWIP_ASSERT("p->tot_len == p->len (of last pbuf in chain)", p->tot_len == p->len);
27 - p->tot_len = (u16_t)(p->tot_len + t->tot_len);
28 + p->tot_len = p->tot_len + t->tot_len;
34 /* Update the tot_len field in the first part */
36 - i->tot_len = (u16_t)(i->tot_len - r->tot_len);
37 + i->tot_len = tot_len_front;
38 LWIP_ASSERT("tot_len/len mismatch in last pbuf",
39 (i->next != NULL) || (i->tot_len == i->len));
[all …]
D0071-fix-pbuf-tot_len-incorrect-after-pbuf_split_64k-is-c.patch4 Subject: [PATCH] fix pbuf->tot_len incorrect after pbuf_split_64k is called
16 /* Update the tot_len field in the first part */
18 - i->tot_len = tot_len_front;
19 + i->tot_len = (u16_t)(i->tot_len - r->tot_len);
20 LWIP_ASSERT("tot_len/len mismatch in last pbuf",
21 (i->next != NULL) || (i->tot_len == i->len));
24 /* tot_len field in rest does not need modifications */
27 - r->tot_len = r->len;
29 - p->tot_len = tot_len_front;
D0056-fix-tso-small-packet-drop-in-kernel-server.patch84 + _seg->len = _p->tot_len - _optlen; \
158 + pbuf_remove_header(seg->p, seg->p->tot_len - seg->len);
163 + new_pbuf->tot_len += seg->p->len;
198 - pbuf_remove_header(seg->p, seg->p->tot_len - seg->len);
202 - first_pbuf->tot_len += seg->p->len;
254 - pbuf_remove_header(new_seg.p, new_seg.p->tot_len - new_seg.len - TCPH_HDRLEN_BYTES(new_seg.t…
255 - new_seg.p->tot_len = new_seg.p->len;
258 + pbuf_remove_header(new_seg.p, new_seg.p->tot_len - new_seg.len - TCP_HLEN);
259 + new_seg.p->tot_len = new_seg.p->len;
D0070-add-CHECKSUM_UDP-when-not-support-OFFLOAD_UDP_CHECKS.patch25 ret = (u64_t)ip_chksum_pseudo(p, IP_PROTO_TCP, p->tot_len,
40 + ret = ip_chksum_pseudo(p, IP_PROTO_UDP, p->tot_len,
46 if (ip_chksum_pseudo(p, IP_PROTO_UDP, p->tot_len,
60 + udpchksum = ip_chksum_pseudo_offload(IP_PROTO_UDP, q->tot_len, &pcb->local_ip, &pcb->r…
62 + udpchksum = ip_chksum_pseudo(q, IP_PROTO_UDP, q->tot_len,
66 udpchksum = ip_chksum_pseudo(q, IP_PROTO_UDP, q->tot_len,
D0038-add-tso.patch59 - if (netif->mtu && (p->tot_len > netif->mtu)) {
64 + if (netif->mtu && (p->tot_len > netif->mtu)) {
119 + seg->len = p->tot_len - optlen;
263 + pbuf_remove_header(seg->p, seg->p->tot_len - seg->len);
267 + first_pbuf->tot_len += seg->p->len;
300 + pbuf_remove_header(new_seg.p, new_seg.p->tot_len - new_seg.len - TCPH_HDRLEN_BYTES(new_seg.t…
301 + new_seg.p->tot_len = new_seg.p->len;
326 …seg->tcphdr->chksum = ip_chksum_pseudo_offload(IP_PROTO_TCP,seg->p->tot_len, &pcb->local_ip, &pcb-…
D0074-gazelle-offloads-are-registered-to-lwip.patch60 if (netif->mtu && (p->tot_len > netif->mtu)) {
127 ret = (u64_t)ip_chksum_pseudo(p, IP_PROTO_TCP, p->tot_len,
148 …seg->tcphdr->chksum = ip_chksum_pseudo_offload(IP_PROTO_TCP,seg->p->tot_len, &pcb->local_ip, &pcb-…
157 tcphdr->chksum = ip_chksum_pseudo_offload(IP_PROTO_TCP, p->tot_len, src, dst);
171 ret = ip_chksum_pseudo(p, IP_PROTO_UDP, p->tot_len,
179 … udpchksum = ip_chksum_pseudo_offload(IP_PROTO_UDP, q->tot_len, &pcb->local_ip, &pcb->remote_ip);
/third_party/lwip/src/apps/snmp/
Dsnmp_traps.c178 u16_t i, tot_len; in snmp_send_trap() local
205 tot_len = snmp_trap_varbind_sum(&trap_msg, varbinds); in snmp_send_trap()
206 tot_len = snmp_trap_header_sum(&trap_msg, tot_len); in snmp_send_trap()
209 p = pbuf_alloc(PBUF_TRANSPORT, tot_len, PBUF_RAM); in snmp_send_trap()
212 snmp_pbuf_stream_init(&pbuf_stream, p, 0, tot_len); in snmp_send_trap()
283 u16_t tot_len; in snmp_trap_varbind_sum() local
286 tot_len = 0; in snmp_trap_varbind_sum()
292 tot_len += 1 + len.vb_len_len + len.vb_value_len; in snmp_trap_varbind_sum()
298 trap->vbseqlen = tot_len; in snmp_trap_varbind_sum()
300 tot_len += 1 + tot_len_len; in snmp_trap_varbind_sum()
[all …]
/third_party/lwip/src/core/
Dpbuf.c179 pbuf_init_alloced_pbuf(struct pbuf *p, void *payload, u16_t tot_len, u16_t len, pbuf_type type, u8_… in pbuf_init_alloced_pbuf() argument
183 p->tot_len = tot_len; in pbuf_init_alloced_pbuf()
411 if (new_len >= p->tot_len) { in pbuf_realloc()
418 shrink = (u16_t)(p->tot_len - new_len); in pbuf_realloc()
428 q->tot_len = (u16_t)(q->tot_len - shrink); in pbuf_realloc()
449 q->tot_len = q->len; in pbuf_realloc()
489 if ((u16_t)(increment_magnitude + p->tot_len) < increment_magnitude) { in pbuf_add_header_impl()
524 p->tot_len = (u16_t)(p->tot_len + increment_magnitude); in pbuf_add_header_impl()
607 p->tot_len = (u16_t)(p->tot_len - increment_magnitude); in pbuf_remove_header()
863 p->tot_len = (u16_t)(p->tot_len + t->tot_len); in pbuf_cat()
[all …]
Dudp.c232 ("udp_input: short UDP datagram (%"U16_F" bytes) discarded\n", p->tot_len));
245 LWIP_DEBUGF(UDP_DEBUG, ("udp_input: received datagram of length %"U16_F"\n", p->tot_len));
359 chklen = p->tot_len;
367 p->tot_len, chklen,
375 if (ip_chksum_pseudo(p, IP_PROTO_UDP, p->tot_len,
802 if ((u16_t)(p->tot_len + UDP_HLEN) < p->tot_len) {
814 if (p->tot_len != 0) {
843 LWIP_DEBUGF(UDP_DEBUG, ("udp_send: sending datagram of length %"U16_F"\n", q->tot_len));
849 LWIP_DEBUGF(UDP_DEBUG, ("udp_send: UDP LITE packet length %"U16_F"\n", q->tot_len));
852 if ((chklen < sizeof(struct udp_hdr)) || (chklen > q->tot_len)) {
[all …]
Dtcp_out.c188 LWIP_ASSERT("p->tot_len >= optlen", p->tot_len >= optlen); in tcp_create_segment()
189 seg->len = p->tot_len - optlen; in tcp_create_segment()
282 p->len = p->tot_len = length; in tcp_pbuf_prealloc()
727 p->tot_len += oversize_used; in tcp_write()
751 last_unsent->len += concat_p->tot_len; in tcp_write()
757 p->tot_len += extendlen; in tcp_write()
759 p->tot_len += extendlen; in tcp_write()
897 offset = useg->p->tot_len - useg->len + split; in tcp_split_unsent_seg()
945 pbuf_realloc(useg->p, useg->p->tot_len - remainder); in tcp_split_unsent_seg()
961 offset = q->tot_len - useg->len; /* Offset due to exposed headers */ in tcp_split_unsent_seg()
[all …]
Dtcp_in.c150 …LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: short packet (%"U16_F" bytes) discarded\n", p->tot_len));
165 u16_t chksum = ip_chksum_pseudo(p, IP_PROTO_TCP, p->tot_len,
179 if ((hdrlen_bytes < TCP_HLEN) || (hdrlen_bytes > p->tot_len)) {
224 p->tot_len = (u16_t)(p->tot_len - opt2len);
227 LWIP_ASSERT("p->tot_len == p->next->tot_len", p->tot_len == p->next->tot_len);
238 tcplen = p->tot_len;
241 if (tcplen < p->tot_len) {
426 inseg.len = p->tot_len;
1466 LWIP_ASSERT("pbuf too short!", (((s32_t)inseg.p->tot_len) >= off));
1468 new_tot_len = (u16_t)(inseg.p->tot_len - off);
[all …]
/third_party/lwip/test/unit/core/
Dtest_pbuf.c90 p2->len = p2->tot_len = 0; in START_TEST()
96 p3 = pbuf_alloc(PBUF_RAW, p1->tot_len, PBUF_POOL); in START_TEST()
116 fail_unless(p->tot_len == 1); in START_TEST()
155 fail_unless(p1->tot_len == TESTBUFSIZE_1); in START_TEST()
156 fail_unless(rest2->tot_len == (u16_t)((TESTBUFSIZE_2+TESTBUFSIZE_3) & 0xFFFF)); in START_TEST()
158 fail_unless(rest2->tot_len == TESTBUFSIZE_2); in START_TEST()
159 fail_unless(rest3->tot_len == TESTBUFSIZE_3); in START_TEST()
188 fail_if(p->tot_len == p->len); in START_TEST()
240 fail_if(p->tot_len == p->len); in START_TEST()
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/ap/
Ddhcp_snoop.c42 u16 tot_len; in handle_dhcp() local
49 tot_len = ntohs(b->iph.tot_len); in handle_dhcp()
50 if (tot_len > (unsigned int) (len - ETH_HLEN)) in handle_dhcp()
57 end = (const u8 *) b + tot_len; in handle_dhcp()
/third_party/lwip/src/netif/
Dlowpan6.c388 LWIP_ASSERT("this needs a pbuf in one piece", p_frag->len == p_frag->tot_len); in lowpan6_frag()
415 remaining_len = p->tot_len; in lowpan6_frag()
432 buffer[ieee_header_len] = 0xc0 | (((p->tot_len + hidden_header_len) >> 8) & 0x7); in lowpan6_frag()
433 buffer[ieee_header_len + 1] = (p->tot_len + hidden_header_len) & 0xff; in lowpan6_frag()
450 p_frag->len = p_frag->tot_len = ieee_header_len + 4 + frag_len + 2; /* add 2 bytes for crc*/ in lowpan6_frag()
457 MIB2_STATS_NETIF_ADD(netif, ifoutoctets, p_frag->tot_len); in lowpan6_frag()
476 pbuf_copy_partial(p, buffer + ieee_header_len + 5, frag_len, p->tot_len - remaining_len); in lowpan6_frag()
481 p_frag->len = p_frag->tot_len = frag_len + 5 + ieee_header_len + 2; in lowpan6_frag()
488 MIB2_STATS_NETIF_ADD(netif, ifoutoctets, p_frag->tot_len); in lowpan6_frag()
501 p_frag->len = p_frag->tot_len = frag_len + lowpan6_header_len + ieee_header_len + 2; in lowpan6_frag()
[all …]
Dlowpan6_ble.c246 p_frag = pbuf_alloc(PBUF_RAW, p->tot_len, PBUF_RAM); in rfc7668_compress()
251 LWIP_ASSERT("this needs a pbuf in one piece", p_frag->len == p_frag->tot_len); in rfc7668_compress()
266 remaining_len = p->tot_len; in rfc7668_compress()
272 p_frag->len = p_frag->tot_len = remaining_len + lowpan6_header_len; in rfc7668_compress()
275 MIB2_STATS_NETIF_ADD(netif, ifoutoctets, p_frag->tot_len); in rfc7668_compress()
351 MIB2_STATS_NETIF_ADD(netif, ifinoctets, p->tot_len); in rfc7668_input()
Dzepif.c146 if (zep->len != p->tot_len - sizeof(struct zep_hdr)) { in zepif_udp_recv()
155 pbuf_realloc(p, p->tot_len - 2); in zepif_udp_recv()
178 if (p->tot_len > ZEP_MAX_DATA_LEN) { in zepif_linkoutput()
186 q = pbuf_alloc(PBUF_TRANSPORT, sizeof(struct zep_hdr) + p->tot_len, PBUF_RAM); in zepif_linkoutput()
202 zep->len = (u8_t)p->tot_len; in zepif_linkoutput()
204 err = pbuf_copy_partial_pbuf(q, p, p->tot_len, sizeof(struct zep_hdr)); in zepif_linkoutput()
/third_party/lwip/test/unit/tcp/
Dtcp_helper.c76 IPH_LEN_SET(iphdr, htons(p->tot_len)); in tcp_create_segment_wnd()
103 IP_PROTO_TCP, p->tot_len, src_ip, dst_ip); in tcp_create_segment_wnd()
200 EXPECT_RET(counters->recved_bytes + p->tot_len <= counters->expected_data_len); in test_tcp_counters_check_rxdata()
209 EXPECT(received == counters->recved_bytes + p->tot_len); in test_tcp_counters_check_rxdata()
224 counters->recved_bytes += p->tot_len; in test_tcp_counters_recv()
227 counters->recved_bytes_after_close += p->tot_len; in test_tcp_counters_recv()
282 txcounters->num_tx_bytes += p->tot_len; in test_tcp_netif_output()
284 struct pbuf *p_copy = pbuf_alloc(PBUF_LINK, p->tot_len, PBUF_RAM); in test_tcp_netif_output()
/third_party/lwip/src/netif/ppp/
Dpppoe.c214 u16_t tot_len; in pppoe_write() local
234 tot_len = ph->tot_len; in pppoe_write()
244 MIB2_STATS_NETIF_ADD(ppp->netif, ifoutoctets, (u16_t)tot_len); in pppoe_write()
257 u16_t tot_len; in pppoe_netif_output() local
278 tot_len = pb->tot_len; in pppoe_netif_output()
287 MIB2_STATS_NETIF_ADD(ppp->netif, ifoutoctets, tot_len); in pppoe_netif_output()
425 if(pb->tot_len == pb->len) { in pppoe_disc_input()
429 pb->tot_len = pb->len = framelen; in pppoe_disc_input()
705 if (pb->tot_len < plen) { in pppoe_data_input()
742 pb->tot_len)); in pppoe_output()
[all …]
Dpppol2tp.c170 u16_t tot_len; in pppol2tp_write() local
187 tot_len = ph->tot_len; in pppol2tp_write()
197 MIB2_STATS_NETIF_ADD(ppp->netif, ifoutoctets, (u16_t)tot_len); in pppol2tp_write()
210 u16_t tot_len; in pppol2tp_netif_output() local
231 tot_len = pb->tot_len; in pppol2tp_netif_output()
240 MIB2_STATS_NETIF_ADD(ppp->netif, ifoutoctets, tot_len); in pppol2tp_netif_output()
526 if (p->tot_len == 0) { in pppol2tp_dispatch_control_packet()
829 LWIP_ASSERT("pb->tot_len == pb->len", pb->tot_len == pb->len); in pppol2tp_send_sccrq()
924 LWIP_ASSERT("pb->tot_len == pb->len", pb->tot_len == pb->len); in pppol2tp_send_scccn()
971 LWIP_ASSERT("pb->tot_len == pb->len", pb->tot_len == pb->len); in pppol2tp_send_icrq()
[all …]
Dpppos.c224 nb->tot_len = p->len; in pppos_write()
274 nb->tot_len = pb->tot_len; in pppos_netif_output()
305 … ("pppos_netif_output[%d]: proto=0x%"X16_F", len = %d\n", ppp->netif->num, protocol, pb->tot_len)); in pppos_netif_output()
307 …_output[%d]: output failed proto=0x%"X16_F", len = %d\n", ppp->netif->num, protocol, pb->tot_len)); in pppos_netif_output()
541 pppos->in_tail->tot_len = pppos->in_tail->len; in pppos_input()
546 pppos->in_tail->tot_len = pppos->in_tail->len; in pppos_input()
551 pbuf_realloc(pppos->in_head, pppos->in_head->tot_len - 2); in pppos_input()
657 pppos->in_tail->tot_len = pppos->in_tail->len; in pppos_input()
880 MIB2_STATS_NETIF_ADD(ppp->netif, ifoutoctets, nb->tot_len); in pppos_output_last()
/third_party/lwip/src/core/ipv4/
Dicmp.c101 LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: short ICMP (%"U16_F" bytes) received\n", p->tot_len)); in icmp_input()
141 if (p->tot_len < sizeof(struct icmp_echo_hdr)) { in icmp_input()
162 u16_t alloc_len = (u16_t)(p->tot_len + hlen); in icmp_input()
163 if (alloc_len < p->tot_len) { in icmp_input()
355 if (p->tot_len < response_pkt_len) { in icmp_send_response()
356 response_pkt_len = p->tot_len; in icmp_send_response()
Dip4.c382 if (netif->mtu && (p->tot_len > netif->mtu)) {
506 if (iphdr_len < p->tot_len) {
511 if ((iphdr_hlen > p->len) || (iphdr_len > p->tot_len) || (iphdr_hlen < IP_HLEN)) {
521 if (iphdr_len > p->tot_len) {
524 iphdr_len, p->tot_len));
681 …lwip_ntohs(IPH_ID(iphdr)), p->tot_len, lwip_ntohs(IPH_LEN(iphdr)), (u16_t)!!(IPH_OFFSET(iphdr) & P…
722 LWIP_DEBUGF(IP_DEBUG, ("ip4_input: p->len %"U16_F" p->tot_len %"U16_F"\n", p->len, p->tot_len));
966 IPH_LEN_SET(iphdr, lwip_htons(p->tot_len));
1042 if (netif->mtu && (p->tot_len > netif->mtu)) {
/third_party/lwip/doc/
DNO_SYS_SampleCode.c27 MIB2_STATS_NETIF_ADD(netif, ifoutoctets, p->tot_len); in netif_output()
36 pbuf_copy_partial(p, mac_send_buffer, p->tot_len, 0); in netif_output()
104 MIB2_STATS_NETIF_ADD(netif, ifinoctets, p->tot_len); in main()
/third_party/lwip/src/core/ipv6/
Dicmp6.c104 if (ip6_chksum_pseudo(p, IP6_NEXTH_ICMP6, p->tot_len, ip6_current_src_addr(), in icmp6_input()
147 r = pbuf_alloc(PBUF_IP, p->tot_len, PBUF_RAM); in icmp6_input()
188 IP6_NEXTH_ICMP6, r->tot_len, reply_src, ip6_current_src_addr()); in icmp6_input()
394 u16_t datalen = LWIP_MIN(p->tot_len, LWIP_ICMP6_DATASIZE); in icmp6_send_response_with_addrs_and_netif()
428 icmp6hdr->chksum = ip6_chksum_pseudo(q, IP6_NEXTH_ICMP6, q->tot_len, in icmp6_send_response_with_addrs_and_netif()
/third_party/lwip/src/apps/lwiperf/
Dlwiperf.c459 u16_t tot_len; in lwiperf_tcp_recv() local
482 tot_len = p->tot_len; in lwiperf_tcp_recv()
488 if (p->tot_len < sizeof(lwiperf_settings_t)) { in lwiperf_tcp_recv()
523 tcp_recved(tpcb, p->tot_len); in lwiperf_tcp_recv()
555 LWIP_ASSERT("count mismatch", packet_idx == p->tot_len); in lwiperf_tcp_recv()
557 tcp_recved(tpcb, tot_len); in lwiperf_tcp_recv()

123456