/* Simple interface to ip_output_if. It finds the outgoing network interface and calls upon ip_output_if to do the actual work. */
err_t ip_output(struct pbuf *p, struct ip_addr *src, struct ip_addr *dest, u8_t ttl, u8_t tos, u8_t proto)
/* Simple interface to ip_output_if. It finds the outgoing network interface and calls upon ip_output_if to do the actual work. */
err_t ip_output(struct pbuf *p, struct ip_addr *src, struct ip_addr *dest, u8_t ttl, u8_t tos, u8_t proto)
{
  struct netif *netif;
  if ((netif = ip_route(dest)) == NULL) {
    return ERR_RTE;
  }
  return ip_output_if(p, src, dest, ttl, tos, proto, netif);
}