[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Net.Manager

Configure is effective in the Unix backend. The trick is to ifconfig appropriately the tun interface once it is created. The default configuration will simply assign a 10.0.X.1 ip address, where X is the id of the device in the Net stack of Mirage.Â

On 22 March 2013 11:10, Vincent Bernardoff <vb@xxxxxxxxxxxxxx> wrote:
On 22/03/2013 10:35, Richard Mortier wrote:
did you get any answers to this? still haven't had a response to my mail about problems on linux... :/

having said that, it sounds like your ocaml-tuntap will fix all this anyway:)

On 20 Mar 2013, at 18:34, Vincent Bernardoff wrote:

Hi Richard,

Yeah, I have a quite clear vision about what to do. If Iâm correct:

Tuntap support in macs is limited, they can only create transcient tun/tap interfaces through tuntaposx.

in order to create a tuntap interface you need to open an fd to a /dev/tapX or /dev/taunX. The device is open only while the problem is running and keeps the fd open. This is the case for both linux and mac. The difference is that on linux there is a tun daemon and thep tunctl command which can persist a tun interface without a requirement for an fd.Â

PCAP was used have macs able to attach to a tun/tap using a different library (PCAP). I donât know exactly why PCAP was used for.

Pcap is used in the unix backend in order to create a user space openflow switch in MacOSX. In such a setting you need to be able to have both tun/tap interfaces as well as ethernet network devices. In MacOSX there is no ethernet raw socket thing unfortunately and the best way to intercept traffic in such a case is through a bpf device.

My idea is to use ocaml-tuntap in macosx and linux the same way, creating transcient interfaces and passing the fd over a unix domain socket. This would work in all cases.

In this case you won't be able to integrate an existing network interface to the Mirage Network stack. You need at least to consider raw ethernet sockets for linux, bpf for MacOSX and find some nice abstraction to expose this through the Manager(?) API.Â
Currently Iâm blocked because obuild does not build ocaml-tuntap on macs (And since I donât want to change build systems Iâm currently trying to fix obuild).

Thatâs about it.



Charalampos Rotsos
PhD student
The University of Cambridge
Computer Laboratory
William Gates Building
JJ Thomson Avenue

Phone: +44-(0) 1223 767032
Email: cr409@xxxxxxxxxxxx



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.