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

[ns] Packet header



The ns-documentation says that to add a new packet header I have to modify
the following
function in ns~/tcl/lib/ns-packet.tcl

foreach prot {
                AODV
                ARP
                aSRM
                Common
                CtrMcast
                Diffusion
                ......
                TORA
                UMP
        } {
                add-packet-header $prot
        }

But I find that I have the following function in the ns-packet file

        foreach pair {
                        { Common off_cmn_ }
                        { Mac off_mac_ }
                        { LL off_ll_ }
                        { Snoop off_snoop_ }
                        { IP off_ip_ }
                        { TCP off_tcp_ }
                        { TCPA off_tcpasym_ }
                        { Flags off_flags_ }
                        { RTP off_rtp_ }
                        { Message off_msg_ }
                        { IVS off_ivs_ }
                        { rtProtoDV off_DV_ }
                        { CtrMcast off_CtrMcast_ }
                        { Prune off_prune_ }
                        { Tap off_tap_ }
                        { aSRM off_asrm_ }
                        { SRM off_srm_ }} {
                set cl [lindex $pair 0]
                set var [lindex $pair 1]
                PacketHeaderManager set vartab_($cl) $var
        }

I guess these are 2 methods of adding a packet header.
I am having the file having the 2nd method . But I need the file with the
1st one.
How can I get the file ns-packet.tcl without having to download entire ns.
And I am working on ns2.1b6 in Redhat linux 6.2 .I want the version of the
file
which would work in this platform
Should I necessarily use the 2nd method for ns2.1b6?

Thank You
Madhan