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

Lan interface and snoop



Hi,

I am trying to get the snoop implementation to work in ns2.1b6

In snoop.tcl, the wireless part is actually a Lan with an errormodel. The
tcl code from snoop.tcl is as follows:

proc add-error {lan src dst errmodel} {
	$lan instvar lanIface_
       
	set nif $lanIface_([$dst id])
	
	set filter [new Filter/Field]
	$nif add-receive-filter $filter
	$filter filter-target $errmodel
	$errmodel target [$filter target]
	$filter set offset_ [PktHdr_offset PacketHeader/Mac macSA_]
	$filter set match_ [$src node-addr] # will not work with hier.
routing
}

The problem is that I cannot access the LAN interface  and I
get the following error:

^^^^^^^^^^^^^^^^^^^^^^^^^^
can't read "lanIface_(1)": no such element in array
    while executing
"set nif $lanIface_([$dst id])"
    (procedure "add-error" line 4)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
Could some one tell me what to do about this ?

Thank you in advance.

Gurvesh Bhutiani
----------------------------------------------------------