[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ns] ERRORS IN LAN
hi,
i need to attach an errormodel to the LAN i have created. there was some
help available in user archives. i am using following code to insert
errors between two lannodes node(0) and node(1) [my lan consists of only 2
nodes]
proc add-error {lan src dst errmodel} {
$lan instvar lanIface_
set nif $lanIface_($dst)
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.
}
add-error $lan $node(0) $node(1) $error_mod
but i am getting this error:
(_o41 cmd line 1)
invoked from within
"_o41 cmd target"
invoked from within
"catch "$self cmd $args" ret"
(procedure "_o41" line 2)
(SplitObject unknown line 2)
invoked from within
"$mac_ target"
(procedure "_o38" line 3)
(LanIface add-receive-filter line 3)
invoked from within
"$nif add-receive-filter $filter"
(procedure "add-error" line 6)
invoked from within
"add-error $lan $node(0) $node(1) $error_mod"
(file "errlan.tcl" line 60)
can anyone PLEASE HELP
Shailesh Sheoran
M.ASc.
Department of Electrical Engineering
University of British Columbia