Home
last modified time | relevance | path

Searched refs:p (Results 1 – 25 of 80) sorted by relevance

1234

/lib/liblwip/src/core/snmp/
Dasn1_dec.c52 snmp_asn1_dec_type(struct pbuf *p, u16_t ofs, u8_t *type) in snmp_asn1_dec_type() argument
58 while (p != NULL) in snmp_asn1_dec_type()
61 plen += p->len; in snmp_asn1_dec_type()
64 msg_ptr = (u8_t*)p->payload; in snmp_asn1_dec_type()
69 p = p->next; in snmp_asn1_dec_type()
85 snmp_asn1_dec_length(struct pbuf *p, u16_t ofs, u8_t *octets_used, u16_t *length) in snmp_asn1_dec_length() argument
91 while (p != NULL) in snmp_asn1_dec_length()
94 plen += p->len; in snmp_asn1_dec_length()
97 msg_ptr = (u8_t*)p->payload; in snmp_asn1_dec_length()
126 p = p->next; in snmp_asn1_dec_length()
[all …]
Dasn1_enc.c181 snmp_asn1_enc_type(struct pbuf *p, u16_t ofs, u8_t type) in snmp_asn1_enc_type() argument
187 while (p != NULL) in snmp_asn1_enc_type()
190 plen += p->len; in snmp_asn1_enc_type()
193 msg_ptr = (u8_t*)p->payload; in snmp_asn1_enc_type()
198 p = p->next; in snmp_asn1_enc_type()
213 snmp_asn1_enc_length(struct pbuf *p, u16_t ofs, u16_t length) in snmp_asn1_enc_length() argument
219 while (p != NULL) in snmp_asn1_enc_length()
222 plen += p->len; in snmp_asn1_enc_length()
225 msg_ptr = (u8_t*)p->payload; in snmp_asn1_enc_length()
240 p = p->next; in snmp_asn1_enc_length()
[all …]
Dmsg_out.c71 static u16_t snmp_resp_header_enc(struct snmp_msg_pstat *m_stat, struct pbuf *p);
72 static u16_t snmp_trap_header_enc(struct snmp_msg_trap *m_trap, struct pbuf *p);
73 static u16_t snmp_varbind_list_enc(struct snmp_varbind_root *root, struct pbuf *p, u16_t ofs);
116 struct pbuf *p; in snmp_send_response() local
125 p = pbuf_alloc(PBUF_TRANSPORT, tot_len, PBUF_POOL); in snmp_send_response()
126 if (p == NULL) in snmp_send_response()
137 p = pbuf_alloc(PBUF_TRANSPORT, tot_len, PBUF_POOL); 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()
148 snmp_varbind_list_enc(&m_stat->outvb, p, ofs); in snmp_send_response()
[all …]
/lib/liblwip/src/core/
Dpbuf.c209 struct pbuf *p, *q, *r; in pbuf_alloc() local
239 p = (struct pbuf *)memp_malloc(MEMP_PBUF_POOL); in pbuf_alloc()
240 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc: allocated pbuf %p\n", (void *)p)); in pbuf_alloc()
241 if (p == NULL) { in pbuf_alloc()
245 p->type = type; in pbuf_alloc()
246 p->next = NULL; in pbuf_alloc()
249 p->payload = LWIP_MEM_ALIGN((void *)((u8_t *)p + (SIZEOF_STRUCT_PBUF + offset))); in pbuf_alloc()
251 ((mem_ptr_t)p->payload % MEM_ALIGNMENT) == 0); in pbuf_alloc()
253 p->tot_len = length; in pbuf_alloc()
255 p->len = LWIP_MIN(length, PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset)); in pbuf_alloc()
[all …]
Dtcp_out.c98 struct pbuf *p = pbuf_alloc(PBUF_IP, TCP_HLEN + optlen + datalen, PBUF_RAM); in tcp_output_alloc_header() local
99 if (p != NULL) { in tcp_output_alloc_header()
101 (p->len >= TCP_HLEN + optlen)); in tcp_output_alloc_header()
102 tcphdr = (struct tcp_hdr *)p->payload; in tcp_output_alloc_header()
115 return p; in tcp_output_alloc_header()
159 tcp_create_segment(struct tcp_pcb *pcb, struct pbuf *p, u8_t flags, u32_t seqno, u8_t optflags) in tcp_create_segment() argument
166 pbuf_free(p); in tcp_create_segment()
171 seg->p = p; in tcp_create_segment()
172 seg->len = p->tot_len - optlen; in tcp_create_segment()
185 if (pbuf_header(p, TCP_HLEN)) { in tcp_create_segment()
[all …]
Dmemp.c217 memp_overflow_check_element_overflow(struct memp *p, u16_t memp_type) in memp_overflow_check_element_overflow() argument
222 m = (u8_t*)p + MEMP_SIZE + memp_sizes[memp_type]; in memp_overflow_check_element_overflow()
250 memp_overflow_check_element_underflow(struct memp *p, u16_t memp_type) in memp_overflow_check_element_underflow() argument
255 m = (u8_t*)p + MEMP_SIZE - MEMP_SANITY_REGION_BEFORE_ALIGNED; in memp_overflow_check_element_underflow()
284 struct memp *p; in memp_overflow_check_all() local
286 p = (struct memp *)LWIP_MEM_ALIGN(memp_memory); in memp_overflow_check_all()
288 p = p; in memp_overflow_check_all()
290 memp_overflow_check_element_overflow(p, i); in memp_overflow_check_all()
291 p = (struct memp*)((u8_t*)p + MEMP_SIZE + memp_sizes[i] + MEMP_SANITY_REGION_AFTER_ALIGNED); in memp_overflow_check_all()
294 p = (struct memp *)LWIP_MEM_ALIGN(memp_memory); in memp_overflow_check_all()
[all …]
Draw.c76 raw_input(struct pbuf *p, struct netif *inp) in raw_input() argument
85 iphdr = (struct ip_hdr *)p->payload; in raw_input()
104 if (pcb->recv(pcb->recv_arg, pcb, p, ip_current_src_addr()) != 0) { in raw_input()
106 p = NULL; in raw_input()
203 raw_sendto(struct raw_pcb *pcb, struct pbuf *p, ip_addr_t *ipaddr) in raw_sendto() argument
213 if (pbuf_header(p, IP_HLEN)) { in raw_sendto()
221 if (p->tot_len != 0) { in raw_sendto()
223 pbuf_chain(q, p); in raw_sendto()
226 …BUGF(RAW_DEBUG, ("raw_sendto: added header pbuf %p before given pbuf %p\n", (void *)q, (void *)p)); in raw_sendto()
229 q = p; in raw_sendto()
[all …]
Dudp.c151 udp_input(struct pbuf *p, struct netif *inp) argument
165 iphdr = (struct ip_hdr *)p->payload;
169 if (p->tot_len < (IPH_HL(iphdr) * 4 + UDP_HLEN) || pbuf_header(p, -(s16_t)(IPH_HL(iphdr) * 4))) {
172 ("udp_input: short UDP datagram (%"U16_F" bytes) discarded\n", p->tot_len));
176 pbuf_free(p);
180 udphdr = (struct udp_hdr *)p->payload;
185 LWIP_DEBUGF(UDP_DEBUG, ("udp_input: received datagram of length %"U16_F"\n", p->tot_len));
302 chklen = p->tot_len;
309 pbuf_free(p);
313 if (inet_chksum_pseudo_partial(p, &current_iphdr_src, &current_iphdr_dest,
[all …]
/lib/liblwip/src/api/
Dnetbuf.c62 buf->p = NULL; in netbuf_new()
90 if (buf->p != NULL) { in netbuf_delete()
91 pbuf_free(buf->p); in netbuf_delete()
92 buf->p = buf->ptr = NULL; in netbuf_delete()
112 if (buf->p != NULL) { in netbuf_alloc()
113 pbuf_free(buf->p); in netbuf_alloc()
115 buf->p = pbuf_alloc(PBUF_TRANSPORT, size, PBUF_RAM); in netbuf_alloc()
116 if (buf->p == NULL) { in netbuf_alloc()
120 (buf->p->len >= size)); in netbuf_alloc()
121 buf->ptr = buf->p; in netbuf_alloc()
[all …]
/lib/liblwip/src/core/ipv4/
Dicmp.c65 static void icmp_send_response(struct pbuf *p, u8_t type, u8_t code);
77 icmp_input(struct pbuf *p, struct netif *inp) in icmp_input() argument
91 iphdr = (struct ip_hdr *)p->payload; in icmp_input()
93 if (pbuf_header(p, -hlen) || (p->tot_len < sizeof(u16_t)*2)) { in icmp_input()
94 LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: short ICMP (%"U16_F" bytes) received\n", p->tot_len)); in icmp_input()
98 type = *((u8_t *)p->payload); in icmp_input()
100 code = *(((u8_t *)p->payload)+1); in icmp_input()
127 pbuf_free(p); in icmp_input()
133 if (p->tot_len < sizeof(struct icmp_echo_hdr)) { in icmp_input()
137 if (inet_chksum_pbuf(p) != 0) { in icmp_input()
[all …]
Dip.c166 ip_canforward(struct pbuf *p) in ip_canforward() argument
170 if (p->flags & PBUF_FLAG_LLBCAST) { in ip_canforward()
174 if ((p->flags & PBUF_FLAG_LLMCAST) && !IP_MULTICAST(addr)) { in ip_canforward()
202 ip_forward(struct pbuf *p, struct ip_hdr *iphdr, struct netif *inp) in ip_forward() argument
208 if (!ip_canforward(p)) { in ip_forward()
246 icmp_time_exceeded(p, ICMP_TE_TTL); in ip_forward()
269 if (netif->mtu && (p->tot_len > netif->mtu)) { in ip_forward()
272 ip_frag(p, netif, ip_current_dest_addr()); in ip_forward()
278 icmp_dest_unreach(p, ICMP_DUR_FRAG); in ip_forward()
283 netif->output(netif, p, &current_iphdr_dest); in ip_forward()
[all …]
Dip_frag.c162 struct pbuf *p; in ip_reass_free_complete_datagram() local
172 iprh = (struct ip_reass_helper *)ipr->p->payload; in ip_reass_free_complete_datagram()
176 p = ipr->p; in ip_reass_free_complete_datagram()
177 ipr->p = iprh->next_pbuf; in ip_reass_free_complete_datagram()
179 SMEMCPY(p->payload, &ipr->iphdr, IP_HLEN); in ip_reass_free_complete_datagram()
180 icmp_time_exceeded(p, ICMP_TE_FRAG); in ip_reass_free_complete_datagram()
181 clen = pbuf_clen(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()
191 while (p != NULL) { in ip_reass_free_complete_datagram()
[all …]
/sys/dev/
Dahci.c236 volatile AHCIPort *p = ahci->port[port]; in AHCI_DumpPort() local
239 kprintf("CLBA: 0x%016llx\n", p->clba); in AHCI_DumpPort()
240 kprintf("FB: 0x%016llx\n", p->fb); in AHCI_DumpPort()
241 kprintf("IS: 0x%08x\n", p->is); in AHCI_DumpPort()
242 kprintf("IE: 0x%08x\n", p->ie); in AHCI_DumpPort()
243 kprintf("CMD: 0x%08x\n", p->cmd); in AHCI_DumpPort()
244 kprintf("TFD: 0x%08x\n", p->tfd); in AHCI_DumpPort()
245 kprintf("SIG: 0x%08x\n", p->sig); in AHCI_DumpPort()
246 kprintf("SSTS: 0x%08x\n", p->ssts); in AHCI_DumpPort()
247 kprintf("SCTL: 0x%08x\n", p->sctl); in AHCI_DumpPort()
[all …]
/lib/liblwip/src/core/ipv6/
Dicmp6.c47 icmp_input(struct pbuf *p, struct netif *inp) in icmp_input() argument
58 type = ((u8_t *)p->payload)[0]; in icmp_input()
64 if (p->tot_len < sizeof(struct icmp_echo_hdr)) { in icmp_input()
67 pbuf_free(p); in icmp_input()
71 iecho = p->payload; in icmp_input()
72 iphdr = (struct ip_hdr *)((u8_t *)p->payload - IP_HLEN); in icmp_input()
73 if (inet_chksum_pbuf(p) != 0) { in icmp_input()
74 …ceived ICMP echo (%"X16_F")\n", inet_chksum_pseudo(p, &(iphdr->src), &(iphdr->dest), IP_PROTO_ICMP… 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()
89 …ceived ICMP echo (%"X16_F")\n", inet_chksum_pseudo(p, &(iphdr->src), &(iphdr->dest), IP_PROTO_ICMP… in icmp_input()
[all …]
Dip6.c96 ip_forward(struct pbuf *p, struct ip_hdr *iphdr) in ip_forward() argument
109 pbuf_free(p); in ip_forward()
117 icmp_time_exceeded(p, ICMP_TE_TTL); in ip_forward()
120 pbuf_free(p); in ip_forward()
143 netif->output(netif, p, (struct ip_addr *)&(iphdr->dest)); in ip_forward()
157 ip_input(struct pbuf *p, struct netif *inp) { in ip_input() argument
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()
[all …]
/lib/liblwip/src/netif/
Dethernetif.c123 low_level_output(struct netif *netif, struct pbuf *p)
131 pbuf_header(p, -ETH_PAD_SIZE); /* drop the padding word */
134 for(q = p; q != NULL; q = q->next) {
144 pbuf_header(p, ETH_PAD_SIZE); /* reclaim the padding word */
164 struct pbuf *p, *q;
176 p = pbuf_alloc(PBUF_RAW, len, PBUF_POOL);
178 if (p != NULL) {
181 pbuf_header(p, -ETH_PAD_SIZE); /* drop the padding word */
186 for(q = p; q != NULL; q = q->next) {
200 pbuf_header(p, ETH_PAD_SIZE); /* reclaim the padding word */
[all …]
Dslipif.c96 struct pbuf *p, *q; member
115 slipif_output(struct netif *netif, struct pbuf *p, ip_addr_t *ipaddr) in slipif_output() argument
124 LWIP_ASSERT("p != NULL", (p != NULL)); in slipif_output()
128 …(SLIP_DEBUG, ("slipif_output(%"U16_F"): sending %"U16_F" bytes\n", (u16_t)netif->num, p->tot_len)); in slipif_output()
135 for (q = p; q != NULL; q = q->next) { in slipif_output()
193 priv->p = priv->q = NULL; in slipif_rxbyte()
219 if (priv->p == NULL) { in slipif_rxbyte()
222 priv->p = pbuf_alloc(PBUF_LINK, (PBUF_POOL_BUFSIZE - PBUF_LINK_HLEN), PBUF_POOL); in slipif_rxbyte()
224 if (priv->p == NULL) { in slipif_rxbyte()
233 pbuf_cat(priv->q, priv->p); in slipif_rxbyte()
[all …]
Detharp.c159 LWIP_ASSERT("q->p != NULL", q->p != NULL); in free_etharp_q()
163 LWIP_ASSERT("r->p != NULL", (r->p != NULL)); in free_etharp_q()
164 pbuf_free(r->p); in free_etharp_q()
415 etharp_send_ip(struct netif *netif, struct pbuf *p, struct eth_addr *src, struct eth_addr *dst) in etharp_send_ip() argument
417 struct eth_hdr *ethhdr = (struct eth_hdr *)p->payload; in etharp_send_ip()
424 LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_send_ip: sending packet %p\n", (void *)p)); in etharp_send_ip()
426 return netif->linkoutput(netif, p); in etharp_send_ip()
494 struct pbuf *p; local
500 p = q->p;
505 struct pbuf *p = arp_table[i].q;
[all …]
/lib/liblwip/src/netif/ppp/
Dlcp.c213 char *p, *endp;
215 p = *argv;
217 while (*p) {
218 n = strtol(p, &endp, 16);
219 if (p == endp) {
220 option_error("escape parameter contains invalid hex number '%s'", p);
223 p = endp;
229 while (*p == ',' || *p == ' ')
230 ++p;
395 lcp_input(int unit, u_char *p, int len) in lcp_input() argument
[all …]
Dipcp.c258 ipcp_input(int unit, u_char *p, int len) in ipcp_input() argument
260 fsm_input(&ipcp_fsm[unit], p, len); in ipcp_input()
425 ipcp_ackci(fsm *f, u_char *p, int len) in ipcp_ackci() argument
444 GETCHAR(citype, p); \ in ipcp_ackci()
445 GETCHAR(cilen, p); \ in ipcp_ackci()
450 GETSHORT(cishort, p); \ in ipcp_ackci()
455 GETCHAR(cimaxslotindex, p); \ in ipcp_ackci()
459 GETCHAR(cicflag, p); \ in ipcp_ackci()
473 GETCHAR(citype, p); \ in ipcp_ackci()
474 GETCHAR(cilen, p); \ in ipcp_ackci()
[all …]
/lib/liblwip/src/include/lwip/
Dpbuf.h114 typedef void (*pbuf_free_custom_fn)(struct pbuf *p);
149 struct pbuf_custom *p, void *payload_mem,
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);
161 u16_t pbuf_copy_partial(struct pbuf *p, void *dataptr, u16_t len, u16_t offset);
163 struct pbuf *pbuf_coalesce(struct pbuf *p, pbuf_layer layer);
[all …]
Dsnmp_asn1.h77 err_t snmp_asn1_dec_type(struct pbuf *p, u16_t ofs, u8_t *type);
78 err_t snmp_asn1_dec_length(struct pbuf *p, u16_t ofs, u8_t *octets_used, u16_t *length);
79 err_t snmp_asn1_dec_u32t(struct pbuf *p, u16_t ofs, u16_t len, u32_t *value);
80 err_t snmp_asn1_dec_s32t(struct pbuf *p, u16_t ofs, u16_t len, s32_t *value);
81 err_t snmp_asn1_dec_oid(struct pbuf *p, u16_t ofs, u16_t len, struct snmp_obj_id *oid);
82 err_t snmp_asn1_dec_raw(struct pbuf *p, u16_t ofs, u16_t len, u16_t raw_len, u8_t *raw);
88 err_t snmp_asn1_enc_type(struct pbuf *p, u16_t ofs, u8_t type);
89 err_t snmp_asn1_enc_length(struct pbuf *p, u16_t ofs, u16_t length);
90 err_t snmp_asn1_enc_u32t(struct pbuf *p, u16_t ofs, u16_t octets_needed, u32_t value);
91 err_t snmp_asn1_enc_s32t(struct pbuf *p, u16_t ofs, u16_t octets_needed, s32_t value);
[all …]
/lib/liblwip/test/unit/tcp/
Dtcp_helper.c45 struct pbuf *p, *q; in tcp_create_segment_wnd() local
50 p = pbuf_alloc(PBUF_RAW, pbuf_len, PBUF_POOL); in tcp_create_segment_wnd()
51 EXPECT_RETNULL(p != NULL); in tcp_create_segment_wnd()
53 EXPECT_RETNULL(p->len >= (sizeof(struct ip_hdr) + sizeof(struct tcp_hdr))); in tcp_create_segment_wnd()
56 EXPECT_RETNULL(p->len > (sizeof(struct ip_hdr) + sizeof(struct tcp_hdr))); in tcp_create_segment_wnd()
59 for(q = p; q != NULL; q = q->next) { in tcp_create_segment_wnd()
63 iphdr = p->payload; in tcp_create_segment_wnd()
69 IPH_LEN_SET(iphdr, htons(p->tot_len)); in tcp_create_segment_wnd()
73 pbuf_header(p, -(s16_t)sizeof(struct ip_hdr)); in tcp_create_segment_wnd()
75 tcphdr = p->payload; in tcp_create_segment_wnd()
[all …]
/lib/liblwip/src/arch/
Detherif.c134 low_level_output(struct netif *netif, struct pbuf *p) in low_level_output() argument
145 for(q = p; q != NULL; q = q->next) { in low_level_output()
157 mbuf.len = p->tot_len; in low_level_output()
188 struct pbuf *p, *q; in low_level_input() local
221 p = pbuf_alloc(PBUF_RAW, len, PBUF_POOL); in low_level_input()
222 if (p != NULL) { in low_level_input()
226 for(q = p; q != NULL; q = q->next) { in low_level_input()
243 return p; in low_level_input()
259 struct pbuf *p; in ethernetif_input() local
262 p = low_level_input(netif); in ethernetif_input()
[all …]
/sys/kern/
Dprintf.c36 char *p = buf; in printnum() local
42 *p = numberstring_upper[num % base]; in printnum()
43 p++; in printnum()
47 *p = numberstring_lower[num % base]; in printnum()
48 p++; in printnum()
53 spaces = width - (p - buf); in printnum()
63 while (p != buf) { in printnum()
64 p--; in printnum()
65 func((int)*p, handle); in printnum()
80 const char *p; in kvprintf() local
[all …]

1234