Re: [Netnice-kernels] NNFS symlinks for VIF process attachment
Status: Alpha
Brought to you by:
taost6
From: Takashi O. <ta...@wi...> - 2004-10-20 20:48:34
|
hi scott, i got really impressed by the session. it's functioning!! you may use the page below for the progress report to the public. http://www.netnice.org/pukiwiki.php?Linux "ln" syntax won't be a problem, since users use commands, like netnice, not the direct operations. also, we'll wrap the syscall soon by an os-independent library, libnetnice. anyways. thanks for your help. it looks really great... -- taka Scott Brumbaugh wrote: > > Hi Takashi, > > I am moving along in the development and am at a point where much of > the API is in place. It is not done but it is getting there. At some > point we will need to agree that the API work is complete as it can be > given the missing internals. > > I have implemented the symlink operation for attaching a VIF to a > process. The syntax is different from FreeBSD. Under FreeBSD a command > like: > > # ln -s /nnfs/network/lo0/vif1 > > will create a symlink under <pid>/sockets called lo0 that points to > vif1. According to the man page for ln, this command should create a > symlink called vif1. > > Under Linux NNFS this command will return an error because vif1 is not > the name of a network interface. The command on Linux to attach a vif > to a process is: > > # ln -sf /nnfs/network/lo/vif1 lo > > This command says force the creation of the symlink named lo. The -f > switch is needed because a symlink named lo already exists. If you don't > want to use the -f switch you must first remove the symlink before creating > a new one like this: > > # rm lo > # ln -s /nnfs/netword/lo/vif1 lo > > Here is a sample session of the features that are in place and have been > commited to your CVS: > > [root@tamarack root]# uname -a > Linux tamarack.inyotech.local 2.6.7-nnice #9 SMP Wed Oct 20 09:12:36 PDT 2004 i686 i686 i386 GNU/Linux > [root@tamarack root]# /sbin/modprobe nnfs > [root@tamarack root]# mount -t nnfs none /nnfs > [root@tamarack root]# ls /nnfs/network/ > eth0 lo > [root@tamarack root]# mkdir /nnfs/network/eth0/vif1 > [root@tamarack root]# ls -l /nnfs/network/eth0/vif1/ > total 0 > -rw-r--r-- 1 root root 0 Oct 20 11:26 bandwidth > -rw-r--r-- 1 root root 0 Oct 20 11:26 drops > -rw-r--r-- 1 root root 0 Oct 20 11:26 filter > -rw-r--r-- 1 root root 0 Oct 20 11:26 port > -rw-r--r-- 1 root root 0 Oct 20 11:26 recv > -rw-r--r-- 1 root root 0 Oct 20 11:26 send > -rw-r--r-- 1 root root 0 Oct 20 11:26 type > -rw-r--r-- 1 root root 0 Oct 20 11:26 weight > [root@tamarack root]# cat /nnfs/network/eth0/vif1/bandwidth > 0 > [root@tamarack root]# echo 128K > /nnfs/network/eth0/vif1/bandwidth > [root@tamarack root]# cat /nnfs/network/eth0/vif1/bandwidth > 136000 > [root@tamarack root]# ps ax | grep sendmail > 1852 ? S 0:00 sendmail: accepting connections > 1863 ? S 0:00 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue > 2479 pts/1 S 0:00 grep sendmail > [root@tamarack root]# cd /nnfs/procs/1852/sockets/ > [root@tamarack sockets]# ls -l > total 0 > drwxr-xr-x 3 root root 0 Oct 20 11:28 3 > drwxr-xr-x 3 root root 0 Oct 20 11:28 4 > lrwxr-xr-x 1 root root 0 Oct 20 11:28 eth0 -> /nnfs/network/eth0 > lrwxr-xr-x 1 root root 0 Oct 20 11:28 lo -> /nnfs/network/lo > [root@tamarack sockets]# ln -sf /nnfs/network/eth0/vif1 eth0 > [root@tamarack sockets]# ls -l > total 0 > drwxr-xr-x 3 root root 0 Oct 20 11:28 3 > drwxr-xr-x 3 root root 0 Oct 20 11:28 4 > lrwxr-xr-x 1 root root 0 Oct 20 11:28 eth0 -> /nnfs/network/eth0/vif1 > lrwxr-xr-x 1 root root 0 Oct 20 11:28 lo -> /nnfs/network/lo > [root@tamarack sockets]# > > Thanks, > > Scott Brumbaugh > > ------------------------------------------------------- > This SF.net email is sponsored by: IT Product Guide on ITManagersJournal > Use IT products in your business? Tell us what you think of them. Give us > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more > http://productguide.itmanagersjournal.com/guidepromo.tmpl > _______________________________________________ > Netnice-kernels mailing list > Net...@li... > https://lists.sourceforge.net/lists/listinfo/netnice-kernels |