Lines Matching refs:p
95 /* q is the whole pbuf chain for a packet, p is the current pbuf in the chain */
96 struct pbuf *p, *q;
110 * @param p the pbuf chaing packet to send
115 slipif_output(struct netif *netif, struct pbuf *p, ip_addr_t *ipaddr)
124 LWIP_ASSERT("p != NULL", (p != NULL));
128 LWIP_DEBUGF(SLIP_DEBUG, ("slipif_output(%"U16_F"): sending %"U16_F" bytes\n", (u16_t)netif->num, p->tot_len));
135 for (q = p; q != NULL; q = q->next) {
193 priv->p = priv->q = NULL;
219 if (priv->p == NULL) {
222 priv->p = pbuf_alloc(PBUF_LINK, (PBUF_POOL_BUFSIZE - PBUF_LINK_HLEN), PBUF_POOL);
224 if (priv->p == NULL) {
233 pbuf_cat(priv->q, priv->p);
235 /* p is the first pbuf in the chain */
236 priv->q = priv->p;
241 if ((priv->p != NULL) && (priv->recved <= SLIP_MAX_SIZE)) {
242 ((u8_t *)priv->p->payload)[priv->i] = c;
245 if (priv->i >= priv->p->len) {
248 if (priv->p->next != NULL && priv->p->next->len > 0) {
249 /* p is a chain, on to the next in the chain */
250 priv->p = priv->p->next;
252 /* p is a single pbuf, set it to NULL so next time a new
254 priv->p = NULL;
269 struct pbuf *p;
270 p = slipif_rxbyte(netif, c);
271 if (p != NULL) {
272 if (netif->input(p, netif) != ERR_OK) {
273 pbuf_free(p);
352 priv->p = NULL;
414 struct pbuf *p = priv->rxpackets;
417 struct pbuf *q = p;
427 if (netif->input(p, netif) != ERR_OK) {
428 pbuf_free(p);
442 struct pbuf *p;
446 p = slipif_rxbyte(netif, data);
447 if (p != NULL) {
452 struct pbuf *q = p;
456 q->next = p;
463 priv->rxpackets = p;