Skip to content

Commit 4ff4d8d

Browse files
nolanltorvalds
authored andcommitted
um: add ucast ethernet transport
The ucast transport is similar to the mcast transport (and, in fact, shares most of its code), only it uses UDP unicast to move packets. Obviously this is only useful for point-to-point connections between virtual ethernet devices. Signed-off-by: Nolan Leake <nolan@cumulusnetworks.com> Signed-off-by: Richard Weinberger <richard@nod.at> Cc: David Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent d634f19 commit 4ff4d8d

8 files changed

Lines changed: 413 additions & 311 deletions

File tree

‎Documentation/virtual/uml/UserModeLinux-HOWTO.txt‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,6 +1182,16 @@
11821182
forge.net/> and explains these in detail, as well as
11831183
some other issues.
11841184

1185+
There is also a related point-to-point only "ucast" transport.
1186+
This is useful when your network does not support multicast, and
1187+
all network connections are simple point to point links.
1188+
1189+
The full set of command line options for this transport are
1190+
1191+
1192+
ethn=ucast,ethernet address,remote address,listen port,remote port
1193+
1194+
11851195

11861196

11871197
66..66.. TTUUNN//TTAAPP wwiitthh tthhee uummll__nneett hheellppeerr

‎arch/um/drivers/Makefile‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
slip-objs := slip_kern.o slip_user.o
1010
slirp-objs := slirp_kern.o slirp_user.o
1111
daemon-objs := daemon_kern.o daemon_user.o
12-
mcast-objs := mcast_kern.o mcast_user.o
12+
umcast-objs := umcast_kern.o umcast_user.o
1313
net-objs := net_kern.o net_user.o
1414
mconsole-objs := mconsole_kern.o mconsole_user.o
1515
hostaudio-objs := hostaudio_kern.o
@@ -44,7 +44,7 @@ obj-$(CONFIG_UML_NET_SLIP) += slip.o slip_common.o
4444
obj-$(CONFIG_UML_NET_SLIRP) += slirp.o slip_common.o
4545
obj-$(CONFIG_UML_NET_DAEMON) += daemon.o
4646
obj-$(CONFIG_UML_NET_VDE) += vde.o
47-
obj-$(CONFIG_UML_NET_MCAST) += mcast.o
47+
obj-$(CONFIG_UML_NET_MCAST) += umcast.o
4848
obj-$(CONFIG_UML_NET_PCAP) += pcap.o
4949
obj-$(CONFIG_UML_NET) += net.o
5050
obj-$(CONFIG_MCONSOLE) += mconsole.o

‎arch/um/drivers/mcast.h‎

Lines changed: 0 additions & 24 deletions
This file was deleted.

‎arch/um/drivers/mcast_kern.c‎

Lines changed: 0 additions & 120 deletions
This file was deleted.

‎arch/um/drivers/mcast_user.c‎

Lines changed: 0 additions & 165 deletions
This file was deleted.

‎arch/um/drivers/umcast.h‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
3+
* Licensed under the GPL
4+
*/
5+
6+
#ifndef __DRIVERS_UMCAST_H
7+
#define __DRIVERS_UMCAST_H
8+
9+
#include "net_user.h"
10+
11+
struct umcast_data {
12+
char *addr;
13+
unsigned short lport;
14+
unsigned short rport;
15+
void *listen_addr;
16+
void *remote_addr;
17+
int ttl;
18+
int unicast;
19+
void *dev;
20+
};
21+
22+
extern const struct net_user_info umcast_user_info;
23+
24+
extern int umcast_user_write(int fd, void *buf, int len,
25+
struct umcast_data *pri);
26+
27+
#endif

0 commit comments

Comments
 (0)