Symbols
loading...
Files
loading...

pbuf::tot_len field

total length of this buffer and all next buffers in chain belonging to the same packet. For non-queue packet chains this is the invariant: p->tot_len == p->len + (p->next? p->next->tot_len: 0)

Syntax

u16_t tot_len;

Examples

pbuf::tot_len is referenced by 28 libraries and example projects.

References

LocationReferrerText
pbuf.h:200
u16_t tot_len;
api_lib.c:649netconn_recv_data()
len = ((struct pbuf *)buf)->tot_len;
api_lib.c:658netconn_recv_data()
len = netbuf_len((struct netbuf *)buf);
api_lib.c:737netconn_recv_data_tcp()
u16_t len = buf ? buf->tot_len : 1;
api_msg.c:271recv_udp()
len = p->tot_len;
api_msg.c:314recv_tcp()
tcp_recved(pcb, p->tot_len);
api_msg.c:325recv_tcp()
len = p->tot_len;
dhcp.c:1541dhcp_parse_reply()
options_idx_max = p->tot_len;
dns.c:724dns_skip_name()
if (offset + n >= p->tot_len) {
dns.c:1185dns_recv()
if (p->tot_len < (SIZEOF_DNS_HDR + SIZEOF_DNS_QUERY)) {
dns.c:1268dns_recv()
while ((nanswers > 0) && (res_idx < p->tot_len)) {
etharp.c:1009etharp_query()
LWIP_ASSERT("no packet queues allowed!", (p->len != p->tot_len) || (p->next == 0));
httpd.c:1995http_parse_request()
data_len = LWIP_MIN(hs->req->tot_len, LWIP_HTTPD_MAX_REQ_LENGTH);
httpd.c:2003http_parse_request()
if (p->len != p->tot_len) {
httpd.c:2109http_parse_request()
if ((hs->req->tot_len <= LWIP_HTTPD_REQ_BUFSIZE) &&
httpd.c:2526http_recv()
altcp_recved(pcb, p->tot_len);
httpd.c:2544http_recv()
altcp_recved(pcb, p->tot_len);
icmp.c:141icmp_input()
if (p->tot_len < sizeof(struct icmp_echo_hdr)) {
icmp.c:162icmp_input()
u16_t alloc_len = (u16_t)(p->tot_len + hlen);
icmp.c:163icmp_input()
if (alloc_len < p->tot_len) {
ip4.c:469ip4_input()
if (iphdr_len < p->tot_len) {
ip4.c:474ip4_input()
if ((iphdr_hlen > p->len) || (iphdr_len > p->tot_len) || (iphdr_hlen < IP_HLEN)) {
ip4.c:484ip4_input()
if (iphdr_len > p->tot_len) {
ip4.c:925ip4_output_if_src()
IPH_LEN_SET(iphdr, lwip_htons(p->tot_len));
ip4.c:1001ip4_output_if_src()
if (netif->mtu && (p->tot_len > netif->mtu)) {
ip4_frag.c:772ip4_frag()
left = (u16_t)(p->tot_len - IP_HLEN);
netbuf.c:163netbuf_ref()
buf->p->len = buf->p->tot_len = size;
pbuf.c:183pbuf_init_alloced_pbuf()
p->tot_len = tot_len;
pbuf.c:411pbuf_realloc()
if (new_len >= p->tot_len) {
pbuf.c:418pbuf_realloc()
shrink = (u16_t)(p->tot_len - new_len);
pbuf.c:428pbuf_realloc()
q->tot_len = (u16_t)(q->tot_len - shrink);
pbuf.c:449pbuf_realloc()
q->tot_len = q->len;
pbuf.c:489pbuf_add_header_impl()
if ((u16_t)(increment_magnitude + p->tot_len) < increment_magnitude) {
pbuf.c:524pbuf_add_header_impl()
p->tot_len = (u16_t)(p->tot_len + increment_magnitude);
pbuf.c:607pbuf_remove_header()
p->tot_len = (u16_t)(p->tot_len - increment_magnitude);
pbuf.c:863pbuf_cat()
p->tot_len = (u16_t)(p->tot_len + t->tot_len);
pbuf.c:866pbuf_cat()
LWIP_ASSERT("p->tot_len == p->len (of last pbuf in chain)", p->tot_len == p->len);
pbuf.c:869pbuf_cat()
p->tot_len = (u16_t)(p->tot_len + t->tot_len);
pbuf.c:921pbuf_dechain()
LWIP_ASSERT("p->tot_len == p->len + q->tot_len", q->tot_len == p->tot_len - p->len);
pbuf.c:923pbuf_dechain()
q->tot_len = (u16_t)(p->tot_len - p->len);
pbuf.c:927pbuf_dechain()
p->tot_len = p->len;
pbuf.c:938pbuf_dechain()
LWIP_ASSERT("p->tot_len == p->len", p->tot_len == p->len);
pbuf.c:970pbuf_copy()
(p_from != NULL) && (p_to->tot_len >= p_from->tot_len)), return ERR_ARG;);
pbuf.c:999pbuf_copy()
if ((p_from != NULL) && (p_from->len == p_from->tot_len)) {
pbuf.c:1004pbuf_copy()
if ((p_to != NULL) && (p_to->len == p_to->tot_len)) {
pbuf.c:1205pbuf_take()
LWIP_ERROR("pbuf_take: buf not large enough", (buf->tot_len >= len), return ERR_MEM;);
pbuf.c:1207pbuf_take()
if ((buf == NULL) || (dataptr == NULL) || (buf->tot_len < len)) {
pbuf.c:1246pbuf_take_at()
if ((q != NULL) && (q->tot_len >= target_offset + len)) {
pbuf.c:1310pbuf_clone()
q = pbuf_alloc(layer, p->tot_len, type);
pbuf.c:1441pbuf_memcmp()
if (p->tot_len < (offset + n)) {
pbuf.c:1479pbuf_memfind()
u16_t max_cmp_start = (u16_t)(p->tot_len - mem_len);
pbuf.c:1480pbuf_memfind()
if (p->tot_len >= mem_len + start_offset) {
pbuf.c:1506pbuf_strstr()
if ((substr == NULL) || (substr[0] == 0) || (p->tot_len == 0xFFFF)) {
sockets.c:972lwip_recv_tcp()
if (recv_left > p->tot_len) {
sockets.c:973lwip_recv_tcp()
copylen = p->tot_len;
sockets.c:995lwip_recv_tcp()
LWIP_ASSERT("invalid copylen", p->tot_len >= copylen);
sockets.c:996lwip_recv_tcp()
if (p->tot_len - copylen > 0) {
sockets.c:1121lwip_recvfrom_udp_raw()
buflen = buf->p->tot_len;
sockets.c:1532lwip_sendmsg()
p->len = p->tot_len = (u16_t)msg->msg_iov[i].iov_len;
sockets.c:1538lwip_sendmsg()
if (chain_buf.p->tot_len + p->len > 0xffff) {
sockets.c:1548lwip_sendmsg()
size = netbuf_len(&chain_buf);
tcp.c:1691tcp_recv_null()
tcp_recved(pcb, p->tot_len);
tcp_in.c:176tcp_input()
if ((hdrlen_bytes < TCP_HLEN) || (hdrlen_bytes > p->tot_len)) {
tcp_in.c:221tcp_input()
p->tot_len = (u16_t)(p->tot_len - opt2len);
tcp_in.c:224tcp_input()
LWIP_ASSERT("p->tot_len == p->next->tot_len", p->tot_len == p->next->tot_len);
tcp_in.c:235tcp_input()
tcplen = p->tot_len;
tcp_in.c:238tcp_input()
if (tcplen < p->tot_len) {
tcp_in.c:409tcp_input()
inseg.len = p->tot_len;
tcp_in.c:1431tcp_receive()
LWIP_ASSERT("pbuf too short!", (((s32_t)inseg.p->tot_len) >= off));
tcp_in.c:1433tcp_receive()
new_tot_len = (u16_t)(inseg.p->tot_len - off);
tcp_in.c:1437tcp_receive()
p->tot_len = new_tot_len;
tcp_in.c:1557tcp_receive()
if (inseg.p->tot_len > 0) {
tcp_out.c:176tcp_create_segment()
LWIP_ASSERT("p->tot_len >= optlen", p->tot_len >= optlen);
tcp_out.c:177tcp_create_segment()
seg->len = p->tot_len - optlen;
tcp_out.c:270tcp_pbuf_prealloc()
p->len = p->tot_len = length;
tcp_out.c:715tcp_write()
p->tot_len += oversize_used;
tcp_out.c:739tcp_write()
last_unsent->len += concat_p->tot_len;
tcp_out.c:745tcp_write()
p->tot_len += extendlen;
tcp_out.c:747tcp_write()
p->tot_len += extendlen;
tcp_out.c:885tcp_split_unsent_seg()
offset = useg->p->tot_len - useg->len + split;
tcp_out.c:932tcp_split_unsent_seg()
pbuf_realloc(useg->p, useg->p->tot_len - remainder);
tcp_out.c:1555tcp_output_segment()
seg->p->tot_len -= len;
tcp_out.c:2173tcp_zero_window_probe()
pbuf_copy_partial(seg->p, d, 1, seg->p->tot_len - seg->len);
udp.c:756udp_sendto_if_src()
if ((u16_t)(p->tot_len + UDP_HLEN) < p->tot_len) {
udp.c:768udp_sendto_if_src()
if (p->tot_len != 0) {
udp.c:850udp_sendto_if_src()
udphdr->len = lwip_htons(q->tot_len);