60 static struct raw_pcb *raw_pcbs;
80 raw_input(
struct pbuf *p,
struct netif *inp)
82 struct raw_pcb *pcb, *prev;
96 while ((eaten == 0) && (pcb !=
NULL)) {
97 if ((pcb->protocol == proto) &&
100 #if IP_SOF_BROADCAST_RECV 106 if (pcb->recv !=
NULL) {
115 prev->next = pcb->next;
116 pcb->next = raw_pcbs;
146 raw_bind(
struct raw_pcb *pcb,
ip_addr_t *ipaddr)
166 raw_connect(
struct raw_pcb *pcb,
ip_addr_t *ipaddr)
187 raw_recv(
struct raw_pcb *pcb, raw_recv_fn recv,
void *recv_arg)
191 pcb->recv_arg = recv_arg;
207 raw_sendto(
struct raw_pcb *pcb,
struct pbuf *p,
ip_addr_t *ipaddr)
230 LWIP_DEBUGF(
RAW_DEBUG, (
"raw_sendto: added header pbuf %p before given pbuf %p\n", (
void *)q, (
void *)p));
235 LWIP_ASSERT(
"Can't restore header we just removed!", 0);
267 src_ip = &(pcb->local_ip);
270 #if LWIP_NETIF_HWADDRHINT 271 netif->addr_hint = &(pcb->addr_hint);
273 err =
ip_output_if (q, src_ip, ipaddr, pcb->ttl, pcb->tos, pcb->protocol, netif);
274 #if LWIP_NETIF_HWADDRHINT 275 netif->addr_hint =
NULL;
294 raw_send(
struct raw_pcb *pcb,
struct pbuf *p)
296 return raw_sendto(pcb, p, &pcb->remote_ip);
308 raw_remove(
struct raw_pcb *pcb)
310 struct raw_pcb *pcb2;
312 if (raw_pcbs == pcb) {
314 raw_pcbs = raw_pcbs->next;
317 for(pcb2 = raw_pcbs; pcb2 !=
NULL; pcb2 = pcb2->next) {
319 if (pcb2->next !=
NULL && pcb2->next == pcb) {
321 pcb2->next = pcb->next;
349 os_memset(pcb, 0,
sizeof(
struct raw_pcb));
350 pcb->protocol = proto;
352 pcb->next = raw_pcbs;
#define ip4_addr3_16(ipaddr)
void memp_free(memp_t type, void *mem) ICACHE_FLASH_ATTR
#define ip_current_src_addr()
#define ip_addr_set(dest, src)
ip_addr_t current_iphdr_dest
const ip_addr_t ip_addr_any ICACHE_RODATA_ATTR
#define ICACHE_FLASH_ATTR
void * memp_malloc(memp_t type) ICACHE_FLASH_ATTR
struct netif * ip_route(ip_addr_t *dest) ICACHE_FLASH_ATTR
#define LWIP_DEBUGF(debug, message)
#define ip_addr_cmp(addr1, addr2)
#define LWIP_DBG_LEVEL_SERIOUS
err_t ip_output_if(struct pbuf *p, ip_addr_t *src, ip_addr_t *dest, u8_t ttl, u8_t tos, u8_t proto, struct netif *netif) ICACHE_FLASH_ATTR
typedefPACK_STRUCT_END struct ip_addr ip_addr_t
#define LWIP_DBG_LEVEL_WARNING
#define ip4_addr4_16(ipaddr)
void pbuf_chain(struct pbuf *head, struct pbuf *tail) ICACHE_FLASH_ATTR
#define ip_addr_isany(addr1)
u8_t pbuf_free(struct pbuf *p) ICACHE_FLASH_ATTR
#define ip_addr_isbroadcast(ipaddr, netif)
u8_t pbuf_header(struct pbuf *p, s16_t header_size) ICACHE_FLASH_ATTR
#define ip4_addr1_16(ipaddr)
#define LWIP_ASSERT(message, assertion)
#define ip4_addr2_16(ipaddr)
#define LWIP_UNUSED_ARG(x)
struct pbuf * pbuf_alloc(pbuf_layer l, u16_t length, pbuf_type type) ICACHE_FLASH_ATTR