Lines Matching refs:p

159   LWIP_ASSERT("q->p != NULL", q->p != NULL);
163 LWIP_ASSERT("r->p != NULL", (r->p != NULL));
164 pbuf_free(r->p);
184 LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_free_entry: freeing entry %"U16_F", packet queue %p.\n", (u16_t)i, (void *)(arp_table[i].q)));
379 LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting oldest pending entry %"U16_F", freeing packet queue %p\n", (u16_t)i, (void *)(arp_table[i].q)));
409 * @params p the packet to send, p->payload pointing to the (uninitialized) ethernet header
415 etharp_send_ip(struct netif *netif, struct pbuf *p, struct eth_addr *src, struct eth_addr *dst)
417 struct eth_hdr *ethhdr = (struct eth_hdr *)p->payload;
424 LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_send_ip: sending packet %p\n", (void *)p));
426 return netif->linkoutput(netif, p);
494 struct pbuf *p;
500 p = q->p;
505 struct pbuf *p = arp_table[i].q;
509 etharp_send_ip(netif, p, (struct eth_addr*)(netif->hwaddr), ethaddr);
511 pbuf_free(p);
629 * packet p is passed to the IP layer.
632 * @param p The IP packet that arrived on netif.
639 etharp_ip_input(struct netif *netif, struct pbuf *p)
648 ethhdr = (struct eth_hdr *)p->payload;
681 * @param p The ARP packet that arrived on netif. Is freed by this function.
688 etharp_arp_input(struct netif *netif, struct eth_addr *ethaddr, struct pbuf *p)
701 /* drop short ARP packets: we have to check for p->len instead of p->tot_len here
702 since a struct etharp_hdr is pointed to p->payload, so it musn't be chained! */
703 if (p->len < SIZEOF_ETHARP_PACKET) {
705 ("etharp_arp_input: packet dropped, too short (%"S16_F"/%"S16_F")\n", p->tot_len,
709 pbuf_free(p);
713 ethhdr = (struct eth_hdr *)p->payload;
731 pbuf_free(p);
807 netif->linkoutput(netif, p);
835 pbuf_free(p);
1079 struct pbuf *p;
1084 p = q;
1085 while (p) {
1086 LWIP_ASSERT("no packet queues allowed!", (p->len != p->tot_len) || (p->next == 0));
1087 if(p->type != PBUF_ROM) {
1091 p = p->next;
1095 p = pbuf_alloc(PBUF_RAW, p->tot_len, PBUF_RAM);
1096 if(p != NULL) {
1097 if (pbuf_copy(p, q) != ERR_OK) {
1098 pbuf_free(p);
1099 p = NULL;
1104 p = q;
1105 pbuf_ref(p);
1108 if (p != NULL) {
1116 new_entry->p = p;
1129 LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: queued packet %p on ARP entry %"S16_F"\n", (void *)q, (s16_t)i));
1133 pbuf_free(p);
1134 LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: could not queue a copy of PBUF_REF packet %p (out of memory)\n", (void *)q));
1140 LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: dropped previously queued packet %p for ARP entry %"S16_F"\n", (void *)q, (s16_t)i));
1143 arp_table[i].q = p;
1145 LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: queued packet %p on ARP entry %"S16_F"\n", (void *)q, (s16_t)i));
1149 LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: could not queue a copy of PBUF_REF packet %p (out of memory)\n", (void *)q));
1181 struct pbuf *p;
1192 p = pbuf_alloc(PBUF_RAW, SIZEOF_ETHARP_PACKET, PBUF_RAM);
1194 if (p == NULL) {
1201 (p->len >= SIZEOF_ETHARP_PACKET));
1203 ethhdr = (struct eth_hdr *)p->payload;
1239 result = netif->linkoutput(netif, p);
1242 pbuf_free(p);
1243 p = NULL;
1273 * @param p the recevied packet, p->payload pointing to the ethernet header
1277 ethernet_input(struct pbuf *p, struct netif *netif)
1285 if (p->len <= SIZEOF_ETH_HDR) {
1293 ethhdr = (struct eth_hdr *)p->payload;
1306 if (p->len <= SIZEOF_ETH_HDR + SIZEOF_VLAN_HDR) {
1319 pbuf_free(p);
1329 netif = LWIP_ARP_FILTER_NETIF_FN(p, netif, htons(type));
1338 p->flags |= PBUF_FLAG_LLMCAST;
1342 p->flags |= PBUF_FLAG_LLBCAST;
1355 etharp_ip_input(netif, p);
1358 if(pbuf_header(p, -ip_hdr_offset)) {
1363 ip_input(p, netif);
1371 /* pass p to ARP module */
1372 etharp_arp_input(netif, (struct eth_addr*)(netif->hwaddr), p);
1377 pppoe_disc_input(netif, p);
1381 pppoe_data_input(netif, p);
1396 pbuf_free(p);