Trying to implement secondary loopback

From: Thomas Martitz <hidden>
Date: 2013-03-11 09:45:38

Hello folks,

I'm Thomas Martitz, working on my Master Thesis: an Ethernet NIC. As 
part of my work I want to develop a custom loopback interface (for 
testing purposes).

However I'm facing a problem: It doesn't appear to be possible for a 
second loopback device to exist. Even when copying (and module'ifying) 
drivers/net/loopback.c the resulting device doesn't behave like the 
standard lo interface.

After examing the code I found this line (in loopback_net_init()):

loopback.c:206         net->loopback_dev = dev;

This suggests that the current network namespace can only have one 
loopback interface. And indeed after modifying my custom interface to 
include this particular line it begins to work, but obviously at the 
same time the standard lo interface stops working.

So my questions are:
* Is this on purpse/expected?
* Is there anyway around it so that I can have a custom loopback 
interface without touching lo's functionality.

Many thanks in advance.

Best regards.

-----
visit us at

CeBIT 2013 / March 5-9 / Hannover, Germany / hall 9, booth E08

OFC 2013 / March 19-21 / Anaheim Convention Center, CA, USA / booth 11807

www.hhi.fraunhofer.de/events
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help