/lk-master/lib/minip/ |
A D | pktbuf.c | 83 p->data = p->buffer + header_sz; in pktbuf_add_buffer() 84 p->dlen = 0; in pktbuf_add_buffer() 86 p->cb = cb; in pktbuf_add_buffer() 105 if (!p) { in pktbuf_alloc() 117 return p; in pktbuf_alloc() 124 return p; in pktbuf_alloc_empty() 130 if (p->cb) { in pktbuf_free() 131 p->cb(p->buffer, p->cb_args); in pktbuf_free() 143 memcpy(p->data + p->dlen, data, sz); in pktbuf_append_data() 152 void *data = p->data + p->dlen; in pktbuf_append() [all …]
|
A D | minip.c | 127 pktbuf_t *p; in send_arp_request() local 149 minip_tx_handler(p); in send_arp_request() 185 size_t data_len = p->dlen; in minip_ipv4_send() 199 pktbuf_free(p, true); in minip_ipv4_send() 208 minip_tx_handler(p); in minip_ipv4_send() 219 pktbuf_t *p; in send_ping_reply() local 245 minip_tx_handler(p); in send_ping_reply() 284 if (p->dlen < header_len) { in handle_ipv4_packet() 297 if (htons(ip->len) > p->dlen) { in handle_ipv4_packet() 304 pktbuf_consume_tail(p, p->dlen - htons(ip->len)); in handle_ipv4_packet() [all …]
|
/lk-master/external/lib/lwip/core/snmp/ |
A D | asn1_dec.c | 69 p = p->next; in snmp_asn1_dec_type() 126 p = p->next; in snmp_asn1_dec_length() 161 p = p->next; in snmp_asn1_dec_length() 187 p = p->next; in snmp_asn1_dec_length() 219 p = p->next; in snmp_asn1_dec_length() 296 p = p->next; in snmp_asn1_dec_u32t() 315 p = p->next; in snmp_asn1_dec_u32t() 413 p = p->next; in snmp_asn1_dec_s32t() 494 p = p->next; in snmp_asn1_dec_oid() 578 p = p->next; in snmp_asn1_dec_oid() [all …]
|
A D | asn1_enc.c | 198 p = p->next; in snmp_asn1_enc_type() 240 p = p->next; in snmp_asn1_enc_length() 290 p = p->next; in snmp_asn1_enc_length() 332 p = p->next; in snmp_asn1_enc_u32t() 351 p = p->next; in snmp_asn1_enc_u32t() 366 p = p->next; in snmp_asn1_enc_u32t() 407 p = p->next; in snmp_asn1_enc_s32t() 422 p = p->next; in snmp_asn1_enc_s32t() 469 p = p->next; in snmp_asn1_enc_oid() 546 p = p->next; in snmp_asn1_enc_oid() [all …]
|
A D | msg_out.c | 116 struct pbuf *p; in snmp_send_response() local 126 if (p == NULL) in snmp_send_response() 139 if (p != NULL) in snmp_send_response() 147 ofs = snmp_resp_header_enc(m_stat, p); in snmp_send_response() 171 err = udp_send(m_stat->pcb, p); in snmp_send_response() 184 pbuf_free(p); in snmp_send_response() 218 struct pbuf *p; in snmp_send_trap() local 255 if (p != NULL) in snmp_send_trap() 269 pbuf_free(p); in snmp_send_trap() 630 snmp_asn1_enc_length(p, ofs, vb->olen); in snmp_varbind_list_enc() [all …]
|
/lk-master/external/lib/lwip/core/ |
A D | pbuf.c | 257 ((u8_t*)p->payload + p->len <= in pbuf_alloc() 314 p->len = p->tot_len = length; in pbuf_alloc() 335 p->len = p->tot_len = length; in pbuf_alloc() 407 p->pbuf.len = p->pbuf.tot_len = length; in pbuf_alloced_custom() 454 q = p; in pbuf_realloc() 711 p = p->next; in pbuf_clen() 753 for (p = h; p->next != NULL; p = p->next) { in pbuf_cat() 814 q->tot_len = p->tot_len - p->len; in pbuf_dechain() 818 p->tot_len = p->len; in pbuf_dechain() 935 for(p = buf; len != 0 && p != NULL; p = p->next) { in pbuf_copy_partial() [all …]
|
A D | tcp_out.c | 99 if (p != NULL) { in tcp_output_alloc_header() 115 return p; in tcp_output_alloc_header() 166 pbuf_free(p); in tcp_create_segment() 171 seg->p = p; in tcp_create_segment() 223 struct pbuf *p; in tcp_pbuf_prealloc() local 262 p->len = p->tot_len = length; in tcp_pbuf_prealloc() 263 return p; in tcp_pbuf_prealloc() 629 for (p = last_unsent->p; p; p = p->next) { in tcp_write() 885 pbuf_free(p); in tcp_send_empty_ack() 1227 pbuf_free(p); in tcp_rst() [all …]
|
/lk-master/lib/minip/include/lib/ |
A D | pktbuf.h | 42 pktbuf_t p; member 54 static inline u32 pktbuf_data_phys(pktbuf_t *p) { in pktbuf_data_phys() argument 55 return p->phys_base + (p->data - p->buffer); in pktbuf_data_phys() 59 static inline u32 pktbuf_avail_head(pktbuf_t *p) { in pktbuf_avail_head() argument 60 return p->data - p->buffer; in pktbuf_avail_head() 65 return p->blen - (p->data - p->buffer) - p->dlen; in pktbuf_avail_tail() 77 int pktbuf_free(pktbuf_t *p, bool reschedule); 84 void *pktbuf_append(pktbuf_t *p, size_t sz); 88 void *pktbuf_prepend(pktbuf_t *p, size_t sz); 94 void *pktbuf_consume(pktbuf_t *p, size_t sz); [all …]
|
/lk-master/external/lib/lwip/api/ |
A D | netbuf.c | 62 buf->p = NULL; in netbuf_new() 112 if (buf->p != NULL) { in netbuf_alloc() 113 pbuf_free(buf->p); in netbuf_alloc() 121 buf->ptr = buf->p; in netbuf_alloc() 135 pbuf_free(buf->p); in netbuf_free() 154 pbuf_free(buf->p); in netbuf_ref() 162 buf->p->len = buf->p->tot_len = size; in netbuf_ref() 163 buf->ptr = buf->p; in netbuf_ref() 178 pbuf_cat(head->p, tail->p); in netbuf_chain() 179 head->ptr = head->p; in netbuf_chain() [all …]
|
/lk-master/dev/virtio/net/ |
A D | virtio-net.c | 178 if (p) { in virtio_net_start() 190 pktbuf_t *p; in virtio_net_queue_tx_pktbuf() local 195 if (!p) in virtio_net_queue_tx_pktbuf() 258 if (!p) in virtio_net_queue_tx() 262 p->data = p->buffer; in virtio_net_queue_tx() 263 p->dlen = len; in virtio_net_queue_tx() 279 DEBUG_ASSERT(p); in virtio_net_queue_rx() 282 p->data = p->buffer; in virtio_net_queue_rx() 397 if (!p) in virtio_net_rx_worker() 430 LTRACEF("p %p, dlen %u, flags 0x%x\n", p, p->dlen, p->flags); in virtio_net_send_minip_pkt() [all …]
|
/lk-master/external/lib/lwip/core/ipv4/ |
A D | icmp.c | 93 if (pbuf_header(p, -hlen) || (p->tot_len < sizeof(u16_t)*2)) { in icmp_input() 98 type = *((u8_t *)p->payload); in icmp_input() 127 pbuf_free(p); in icmp_input() 139 pbuf_free(p); in icmp_input() 151 if (pbuf_header(p, hlen)) { in icmp_input() 175 pbuf_free(p); in icmp_input() 177 p = r; in icmp_input() 217 if(pbuf_header(p, hlen)) { in icmp_input() 235 pbuf_free(p); in icmp_input() 238 pbuf_free(p); in icmp_input() [all …]
|
A D | ip.c | 323 pbuf_free(p); 345 if ((iphdr_hlen > p->len) || (iphdr_len > p->tot_len)) { 357 pbuf_free(p); 371 pbuf_free(p); 480 pbuf_free(p); 503 pbuf_free(p); 512 p = ip_reass(p); 514 if (p == NULL) { 519 pbuf_free(p); 539 pbuf_free(p); [all …]
|
A D | ip_frag.c | 162 struct pbuf *p; in ip_reass_free_complete_datagram() local 176 p = ipr->p; in ip_reass_free_complete_datagram() 184 pbuf_free(p); in ip_reass_free_complete_datagram() 190 p = ipr->p; in ip_reass_free_complete_datagram() 194 pcur = p; in ip_reass_free_complete_datagram() 584 p = ipr->p; in ip_reass() 602 return p; in ip_reass() 611 pbuf_free(p); in ip_reass() 769 p->payload = (u8_t *)p->payload + poff; in ip_frag() 778 p = p->next; in ip_frag() [all …]
|
/lk-master/app/tests/ |
A D | mem_tests.c | 118 for (size_t p = 0; p < countof(pat); p++) { in do_mem_tests() local 119 if (do_pattern_test(ptr, len, pat[p]) < 0) in do_mem_tests() 123 for (uint32_t p = 1; p != 0; p <<= 1) { in do_mem_tests() local 124 if (do_pattern_test(ptr, len, p) < 0) in do_mem_tests() 128 for (uint16_t p = 1; p != 0; p <<= 1) { in do_mem_tests() local 129 if (do_pattern_test(ptr, len, ((~p) << 16) | p) < 0) in do_mem_tests() 135 for (size_t p = 0; p < countof(pat); p++) { in do_mem_tests() local 141 for (uint32_t p = 1; p != 0; p <<= 1) { in do_mem_tests() local 146 for (uint16_t p = 1; p != 0; p <<= 1) { in do_mem_tests() local 147 if (do_moving_inversion_test(ptr, len, ((~p) << 16) | p) < 0) in do_mem_tests() [all …]
|
/lk-master/external/lib/lwip/core/ipv6/ |
A D | icmp6.c | 47 icmp_input(struct pbuf *p, struct netif *inp) in icmp_input() argument 58 type = ((u8_t *)p->payload)[0]; in icmp_input() 67 pbuf_free(p); in icmp_input() 71 iecho = p->payload; in icmp_input() 73 if (inet_chksum_pbuf(p) != 0) { in icmp_input() 78 LWIP_DEBUGF(ICMP_DEBUG, ("icmp: p->len %"S16_F" p->tot_len %"S16_F"\n", p->len, p->tot_len)); in icmp_input() 102 pbuf_free(p); in icmp_input() 117 pbuf_free(p); in icmp_dest_unreach() 123 iphdr = p->payload; in icmp_dest_unreach() 155 pbuf_free(p); in icmp_time_exceeded() [all …]
|
A D | ip6.c | 109 pbuf_free(p); in ip_forward() 120 pbuf_free(p); in ip_forward() 165 ip_debug_print(p); in ip_input() 172 iphdr = p->payload; in ip_input() 178 ip_debug_print(p); in ip_input() 180 pbuf_free(p); in ip_input() 206 pbuf_free(p); in ip_input() 226 udp_input(p, inp); in ip_input() 241 pbuf_free(p); in ip_input() 277 iphdr = p->payload; in ip_output_if() [all …]
|
/lk-master/external/lib/lwip/netif/ |
A D | ethernetif.c | 164 struct pbuf *p, *q; 178 if (p != NULL) { 210 return p; 227 struct pbuf *p; 232 p = low_level_input(netif); 234 if (p == NULL) return; 236 ethhdr = p->payload; 250 pbuf_free(p); 251 p = NULL; 256 pbuf_free(p); [all …]
|
A D | slipif.c | 96 struct pbuf *p, *q; member 248 if (priv->p->next != NULL && priv->p->next->len > 0) { in slipif_rxbyte() 250 priv->p = priv->p->next; in slipif_rxbyte() 269 struct pbuf *p; in slipif_rxbyte_input() local 271 if (p != NULL) { in slipif_rxbyte_input() 273 pbuf_free(p); in slipif_rxbyte_input() 352 priv->p = NULL; in slipif_init() 428 pbuf_free(p); in slipif_process_rxqueue() 442 struct pbuf *p; in slipif_rxbyte_enqueue() local 447 if (p != NULL) { in slipif_rxbyte_enqueue() [all …]
|
/lk-master/external/lib/lwip/netif/ppp/ |
A D | lcp.c | 215 p = *argv; 217 while (*p) { 223 p = endp; 229 while (*p == ',' || *p == ' ') 230 ++p; 878 && p[0] == CI_AUTHTYPE && p[1] >= CILEN_SHORT && p[1] <= len) { in lcp_nakci() 1038 p = next; in lcp_nakci() 1736 c = *p++; in print_string() 1782 pstart = p; in lcp_printpkt() 1806 p -= 2; in lcp_printpkt() [all …]
|
A D | ipcp.c | 479 GETLONG(l, p); \ in ipcp_ackci() 505 GETLONG(l, p); \ in ipcp_ackci() 569 INCPTR(2, p); \ in ipcp_nakci() 570 GETLONG(l, p); \ in ipcp_nakci() 589 INCPTR(2, p); \ in ipcp_nakci() 601 INCPTR(2, p); \ in ipcp_nakci() 723 p = next; in ipcp_nakci() 771 INCPTR(2, p); \ in ipcp_rejci() 794 len -= p[1]; \ in ipcp_rejci() 795 INCPTR(2, p); \ in ipcp_rejci() [all …]
|
/lk-master/platform/armemu/ |
A D | net.c | 167 struct pbuf *p, *q; in low_level_input() local 189 if (p != NULL) { in low_level_input() 225 return p; in low_level_input() 261 struct pbuf *p; in ethernetif_input() local 266 p = low_level_input(netif); in ethernetif_input() 268 if (p == NULL) return; in ethernetif_input() 270 ethhdr = p->payload; in ethernetif_input() 276 ethhdr = p->payload; in ethernetif_input() 288 netif->input(p, netif); in ethernetif_input() 296 pbuf_free(p); in ethernetif_input() [all …]
|
/lk-master/external/lib/heap/dlmalloc/ |
A D | dlmalloc.c | 2330 #define prev_chunk(p) ((mchunkptr)( ((char*)(p)) - ((p)->prev_foot) )) argument 3069 #define ok_inuse(p) is_inuse(p) argument 3071 #define ok_pinuse(p) pinuse(p) argument 3311 assert(is_mmapped(p) || pinuse(p) || next_chunk(prev_chunk(p)) == p); in do_check_inuse_chunk() 3324 if (p != m->dv && p != m->top) { in do_check_free_chunk() 3331 assert(p->fd->bk == p); in do_check_free_chunk() 3332 assert(p->bk->fd == p); in do_check_free_chunk() 3423 for (; p != b; p = p->bk) { in do_check_smallbin() 3430 assert(p->bk == b || chunksize(p->bk) == chunksize(p)); in do_check_smallbin() 3450 } while ((p = p->fd) != b); in bin_find() [all …]
|
/lk-master/external/lib/lwip/include/lwip/ |
A D | pbuf.h | 114 typedef void (*pbuf_free_custom_fn)(struct pbuf *p); 152 void pbuf_realloc(struct pbuf *p, u16_t size); 153 u8_t pbuf_header(struct pbuf *p, s16_t header_size); 154 void pbuf_ref(struct pbuf *p); 155 u8_t pbuf_free(struct pbuf *p); 156 u8_t pbuf_clen(struct pbuf *p); 159 struct pbuf *pbuf_dechain(struct pbuf *p); 163 struct pbuf *pbuf_coalesce(struct pbuf *p, pbuf_layer layer); 169 u8_t pbuf_get_at(struct pbuf* p, u16_t offset); 170 u16_t pbuf_memcmp(struct pbuf* p, u16_t offset, const void* s2, u16_t n); [all …]
|
/lk-master/platform/zynq/ |
A D | gem.c | 106 hexdump8(p->data, p->dlen); in debug_rx_handler() 121 DEBUG_ASSERT(p); in free_completed_pbuf_frames() 134 pktbuf_t *p; in queue_pkts_in_tx_tbl() local 175 if (!p || !p->dlen) { in gem_send_raw_pkt() 184 arch_clean_cache_range((vaddr_t)p->data, p->dlen); in gem_send_raw_pkt() 293 if (!p || !b) { in gem_cfg_buffer_descs() 298 gem.rx_pbufs[n] = p; in gem_cfg_buffer_descs() 340 pktbuf_t *p; in gem_rx_thread() local 352 p->data = p->buffer + 2; in gem_rx_thread() 362 arch_invalidate_cache_range((vaddr_t)p->data, p->dlen); in gem_rx_thread() [all …]
|
/lk-master/lib/libcpp/ |
A D | new.cpp | 28 void operator delete (void *p) { in operator delete() argument 29 return free(p); in operator delete() 32 void operator delete[](void *p) { in operator delete[]() argument 33 return free(p); in operator delete[]() 36 void operator delete (void *p, size_t s) { in operator delete() argument 37 return free(p); in operator delete() 40 void operator delete[](void *p, size_t s) { in operator delete[]() argument 41 return free(p); in operator delete[]()
|