summaryrefslogtreecommitdiffstats
path: root/include/net.h
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2014-05-14 16:08:04 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-05-15 08:16:30 +0200
commitbe0404c21f22da2d736168b2e56a9ae583cc3e95 (patch)
tree637570fff15aee4bc8f44376a04b4068fbeeb38f /include/net.h
parent22b878d2518a2b31c5991f9c47a2b176f0ac246d (diff)
downloadbarebox-be0404c21f22da2d736168b2e56a9ae583cc3e95.tar.gz
barebox-be0404c21f22da2d736168b2e56a9ae583cc3e95.tar.xz
net: Allow to use multiple network interfaces at once
In barebox network packets always go out at the current ethernet device and are expected to be received from the current interface. This has some side effects. When for example an NFS is mounted when one interface is active and the interface is changed afterwards the NFS packets leave the new interface, but the NFS server won't be reachable there. Instead of changing the whole network traffic to the current ethernet interface we now initialize a network connection with the current network interface, but then the connection will continue to use that interface even when the current interface is changed. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/net.h')
-rw-r--r--include/net.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net.h b/include/net.h
index a1665524cb..c0f7517c34 100644
--- a/include/net.h
+++ b/include/net.h
@@ -68,7 +68,7 @@ struct eth_device {
int eth_register(struct eth_device* dev); /* Register network device */
void eth_unregister(struct eth_device* dev); /* Unregister network device */
-int eth_send(void *packet, int length); /* Send a packet */
+int eth_send(struct eth_device *edev, void *packet, int length); /* Send a packet */
int eth_rx(void); /* Check for received packets */
/* associate a MAC address to a ethernet device. Should be called by
@@ -419,6 +419,7 @@ struct net_connection {
struct ethernet *et;
struct iphdr *ip;
struct udphdr *udp;
+ struct eth_device *edev;
struct icmphdr *icmp;
unsigned char *packet;
struct list_head list;