libos-nuse / net-next-nuse

Network Stack in Userspace
Other
289 stars 67 forks source link

add nuse-config.c and nuse.conf instead of env variables for the issue #6 #12

Closed upa closed 9 years ago

upa commented 9 years ago

This is the idea 2 of the issue #6. And, retry of pr #10 .

All existing configurations through env variables are removed and collected to a configuration file. env NUSECONF specifies a config file for a nuse process.

ex) sudo NUSECONF=nuse.conf ./nuse ping 172.16.0.2

And, syntax of configuration file is shown below. Multiple interface/route definitions are naturally supported.

# interface definition
interface p1p1
        address 172.16.0.1
        netmask 255.255.255.0
        macaddr 00:01:01:01:01:02
        viftype TAP

# route entry definition.
route
        network 0.0.0.0
        netmask 0.0.0.0
        gateway 192.168.0.1
thehajime commented 9 years ago

follow up work may include