[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] udp changes in
From: |
David Haas |
Subject: |
[lwip-users] udp changes in |
Date: |
Mon, 10 Feb 2003 16:07:27 -0500 |
User-agent: |
Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.2b) Gecko/20021107 |
Hi Marc,
This was a question about your patch that I submitted. I looked at it and I
admit I missed this
side effect.
What do you think?
Hello David, others,
could you pls. clarify this patch in udp.c?
Suppose I have two redundant network links to a remote server from my
lwIP device, using the raw API. I am setting up a udp pcb to talk with the
remote server. I bind it to any local interface address IP_ADDR_ANY.
udp_connect() would force the lwIP device to only listen on one of the
interfaces, as its local address is bound to a particular interface by your
patch.
Can your functionality be solved in the netconn() instead??
Leon.
/* Nail down local IP for netconn_addr()/getsockname() */
if(ip_addr_isany(&pcb->local_ip) && !ip_addr_isany(&pcb->remote_ip)) {
struct netif *netif;
if((netif = ip_route(&(pcb->remote_ip))) == NULL) {
DEBUGF(UDP_DEBUG, ("udp_connect: No route to 0x%lx\n",
pcb->remote_ip.addr));
#ifdef UDP_STATS
++lwip_stats.udp.rterr;
#endif /* UDP_STATS */
return ERR_RTE;
}
pcb->local_ip = netif->ip_addr;
} else if(ip_addr_isany(&pcb->remote_ip)) {
pcb->local_ip.addr = 0;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lwip-users] udp changes in,
David Haas <=