Lines Matching refs:p
211 static void dns_recv(void *s, struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *addr, u16_t port);
565 struct pbuf *p;
576 p = pbuf_alloc(PBUF_TRANSPORT, SIZEOF_DNS_HDR + DNS_MAX_NAME_LENGTH +
578 if (p != NULL) {
579 LWIP_ASSERT("pbuf must be in one piece", p->next == NULL);
581 hdr = (struct dns_hdr*)p->payload;
610 pbuf_realloc(p, (u16_t)((query + SIZEOF_DNS_QUERY) - ((char*)(p->payload))));
615 err = udp_sendto(dns_pcb, p, &dns_servers[numdns], DNS_SERVER_PORT);
618 pbuf_free(p);
733 dns_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *addr, u16_t port)
748 if (p->tot_len > DNS_MSG_SIZE) {
755 if (p->tot_len < (SIZEOF_DNS_HDR + SIZEOF_DNS_QUERY + SIZEOF_DNS_ANSWER)) {
762 if (pbuf_copy_partial(p, dns_payload, p->tot_len, 0) == p->tot_len) {
847 pbuf_free(p);