Lines Matching defs:netif
55 #include "lwip/netif.h"
73 /* check if PCB is bound to specific netif */
135 raw_input(struct pbuf *p, struct netif *inp)
250 * Bind an RAW PCB to a specific netif.
252 * are guaranteed to have come in via the specified netif, and all
253 * outgoing packets will go out via the specified netif.
255 * @param pcb RAW PCB to be bound with netif.
256 * @param netif netif to bind to. Can be NULL.
261 raw_bind_netif(struct raw_pcb *pcb, const struct netif *netif)
264 if (netif != NULL) {
265 pcb->netif_idx = netif_get_index(netif);
364 struct netif *netif;
378 netif = netif_get_by_index(pcb->netif_idx, group);
380 netif = netif_get_by_index(pcb->netif_idx);
384 netif = NULL;
388 * matching netif can be found. Otherwise, fall back to regular routing. */
390 netif = netif_get_by_index(pcb->mcast_ifindex, group);
392 netif = netif_get_by_index(pcb->mcast_ifindex);
396 if (netif == NULL)
400 netif = ip_route(&pcb->local_ip, ipaddr, group);
402 netif = ip_route(&pcb->local_ip, ipaddr);
407 if (netif == NULL) {
415 src_ip = ip_netif_get_local_ip(netif, ipaddr);
426 return raw_sendto_if_src(pcb, p, ipaddr, netif, src_ip);
432 * netif and source IP address. An IP header will be prepended to the packet,
439 * @param netif the netif used for sending
444 struct netif *netif, const ip_addr_t *src_ip)
453 if ((pcb == NULL) || (dst_ip == NULL) || (netif == NULL) || (src_ip == NULL) ||
476 NETIF_SET_HINTS(netif, &pcb->netif_hints);
477 err = ip_output_if_hdrincl(p, src_ip, dst_ip, netif);
478 NETIF_RESET_HINTS(netif);
513 if (!ip_get_option(pcb, SOF_BROADCAST) && ip_addr_isbroadcast(dst_ip, netif)) {
548 NETIF_SET_HINTS(netif, &pcb->netif_hints);
549 err = ip_output_if(q, src_ip, dst_ip, ttl, pcb->tos, pcb->protocol, netif);
550 NETIF_RESET_HINTS(netif);
683 /** This function is called from netif.c when address is changed
685 * @param old_addr IP address of the netif before change
686 * @param new_addr IP address of the netif after change