[ns] Re: [nse] getting some error due to bpf (URGENT)
Daniel Mahrenholz
mahrenho at ivs.cs.uni-magdeburg.de
Thu Jun 30 00:04:29 PDT 2005
Hi,
I will answer both of your mails at once.
On Thursday 30 June 2005 07:47, S RAVIKIRAN wrote:
> i am getting some error due to bpf i am not able to
> understand what is the error is it due to any file
> missing of any syntax error.
>
> i am sending the patch of error of an sample program
> given in emulate
> directory em2.tcl.
> please help me its urgent
>
>
> bpf0(_o11) on dev eth0, bpf1(_o12) on dev eth0:1,
> ipnet is _o13
> pcapnet obj(_o11): couldn't compile filter pgmproblem
> compiling/installing
> filter program
>
> (_o11 cmd line 1)
> invoked from within
> "_o11 cmd filter {(ip dst host bit) and (not ip host
> Venky) and (not
> ether
> broadcast)}"
> invoked from within
> "catch "$self cmd $args" ret"
> (procedure "_o11" line 2)
> (SplitObject unknown line 2)
> invoked from within
> "$bpf0 filter "(ip dst host bit) and $notme and
> $notbcast""
> invoked from within
> "set f0len [$bpf0 filter "(ip dst host bit) and $notme
> and $notbcast"]"
> (file
> "/home/vvenkat/ns-allinone-2.26/ns-2.26/emulate/em2.tcl"
> line
> 53)
On Thursday 30 June 2005 07:53, S RAVIKIRAN wrote:
> i could not find any /dev/bpf file in my system linux
> version 2.4-20-8
>
> how can i port dthis file in my system
On Linux der BPF (Berkley Packet Filter) is superseded by the LSF (Linux
Socket Filter). The main difference is that LSF does not uses any special
device (like /dev/bpf). You have to attach the filter code to a raw socket.
I don't know if there is a backward compatible device driver for Linux that
provides this interface. So you have three choices:
1. You can modify the original ns-2 code to use raw sockets. See the following
URL for a small example how to setup a raw socket with bpf:
http://www.rcpt.to/lsfcc/lsf.html
2. You find a device driver that provides /dev/bpf on Linux (maybe there is
something like this)
3. You can use the ns-2 version from Magdeburg with its emulation
improvements. It uses raw sockets and other TAPAgents. Code, documentation
etc. can be found at our website
http://www-ivs.cs.uni-magdeburg.de/EuK/forschung/projekte/nse/index.shtml
Regards,
Daniel.
--
Dipl.-Inf. Daniel Mahrenholz, University of Magdeburg, Germany
Homepage: http://ivs.cs.uni-magdeburg.de/~mahrenho
More information about the Ns-users
mailing list