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

[ns] How to use oif2link in .cc?



Hi, 
   I want to get the link information by interface so
that I can directly send packets to specific link. My
program is
     
   hdr_cmn* cmn = hdr_cmn::access(pkt);
   int iface = cmn->iface();
   tcl.evalf("[%s set node_] oif2link %d", name(),
iface);
   nm = tcl.result();

   But when the program is executed to "tcl.evalf()",
it generates the following errors.

ns: [_o375 set node_] oif2link 6: invalid command name
"6"
    while executing
"$oif set link_"
    (procedure "_o10" line 2)
    (Node oif2link line 2)
    invoked from within
"[_o375 set node_] oif2link 6


   Could you tell me what's the difference between
"oif" in TCL procedure "oif2link" and "iface" in
packet common header so that I can get link object by
oifs?

    Thanks very much!

David

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices. 
http://auctions.yahoo.com/