invalid command name "Agent/Security_packet"

475 views
Skip to first unread message

kaki2011rachid

unread,
May 5, 2016, 2:59:03 PM5/5/16
to Network Simulator 2 (NS2)

Hi all,

I wanted to enc/dec the packets in ns2.

I followed this link to add a new protocol for the same in ns2 "http://www.nsnam.com/2015/03/security-protocol-packet-in-ns2.html" and ended up with the following error.

invalid command name "Agent/Security_packet"

Can someone help me clear it??

knudfl

unread,
May 5, 2016, 5:44:07 PM5/5/16
to Network Simulator 2 (NS2)

kaki2011rachid

unread,
May 6, 2016, 6:28:58 AM5/6/16
to Network Simulator 2 (NS2)
hello
I am trying to add a new security protocol in ns2.35 I followed the instructions given in this link "http://www.nsnam.com/2015/03/security-protocol-packet-in-ns2.html". But I ended with the following error 

i'm trying like u say #7
$ ./install
$ cd ns-2.35/
$ sudo make install
$ cp ns ns235-security ( This is your backup )
$ sudo cp ns235-security /usr/local/bin/
i trying with cygwin and command sudo is not find
ns:
[code omitted because of length]
: invalid command name "Agent/Security_packet"
    while executing
"Agent/Security_packet set packetSize_ 0"
what i do ?
help me plz ^^

knudfl

unread,
May 6, 2016, 6:49:54 AM5/6/16
to Network Simulator 2 (NS2)
OK, Cygwin, I guess you have the root prompt only.  

...  Please start from scratch, in a new folder :

# tar xvf ns-allinone-2.35_gcc482.tar.gz
https
://drive.google.com/file/d/0B7S255p3kFXNSGJCZ2YzUGJDVk0/view?usp=sharing
 cd ns
-allinone-2.35/
# patch -p0 < security_ns235.patch
https
://drive.google.com/file/d/0B7S255p3kFXNZFNxcnppMDN4R2M/view?usp=sharing
# ./install
# cd ns-2.35/
# make install
# cp ns ns235-security (This is your backup, and "recognizable security ns")
# cp ns235-security /usr/local/bin/
Simulation :
# cd security/
# ns235-security security.tcl : Perfect.
( Or  # ../ns security.tcl )



-

kaki2011rachid

unread,
May 6, 2016, 9:50:12 AM5/6/16
to Network Simulator 2 (NS2)
I worked what u said to me but i have the same error 


lucas ron@PC-519 /home/knuf/ns-allinone-2.35/ns-2.35/security
$ ns235-security security.tcl
ns:
[code omitted because of length]
: invalid command name "Agent/Security_packet"
    while executing
"Agent/Security_packet set packetSize_ 0"

knudfl

unread,
May 6, 2016, 10:52:28 AM5/6/16
to Network Simulator 2 (NS2)
? Which version of gcc / g++ are you using ?

May be the 2015 Security doesn't work work with your version of g++  ?

-

knudfl

unread,
May 6, 2016, 10:57:22 AM5/6/16
to Network Simulator 2 (NS2)
Besides that, why not install a genuine Linux OS. Which is much more versatile than Cygwin.
( All major 'Linux OS' have multiple versions of gcc/g++.)

Easy : Install 'VirtualBox', and then install one or more "Linux OS's" into VirtualBox.


-

kaki2011rachid

unread,
May 6, 2016, 11:05:19 AM5/6/16
to Network Simulator 2 (NS2)
i use version :
Thread model: posix
gcc version 4.3.4 20090804 (release) 1 (GCC)
what y think ?

kaki2011rachid

unread,
May 6, 2016, 11:06:47 AM5/6/16
to Network Simulator 2 (NS2)
ok i will be install and tell u resulta thks 

knudfl

unread,
May 6, 2016, 1:16:37 PM5/6/16
to Network Simulator 2 (NS2)
The cygwin gcc version 4.3.4 should work OK with the 2011 ns-allinone-2.35.tar.gz .

-

kaki2011rachid .

unread,
May 7, 2016, 6:00:02 AM5/7/16
to ns-u...@googlegroups.com
i have error with make install
Inline image 1
??

--
You received this message because you are subscribed to a topic in the Google Groups "Network Simulator 2 (NS2)" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-users/N-znLbhZf_4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-users+u...@googlegroups.com.
To post to this group, send email to ns-u...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-users.
For more options, visit https://groups.google.com/d/optout.

knudfl

unread,
May 7, 2016, 7:13:19 AM5/7/16
to Network Simulator 2 (NS2)
»» i have error with make install «« : ? Which "Linux" are you using now ?  Cygwin ?

-

kaki2011rachid

unread,
May 7, 2016, 7:16:54 AM5/7/16
to Network Simulator 2 (NS2)
i'm using ubuntu  in vmware 

knudfl

unread,
May 7, 2016, 7:22:16 AM5/7/16
to Network Simulator 2 (NS2)
Please read  http://www.catb.org/~esr/faqs/smart-questions.html
I.e. you are supposed to supply some information when you ask a question.
Ubuntu version / architecture → → These two commands will tell :
$ uname -m
$ cat  /etc/issue

-

kaki2011rachid

unread,
May 7, 2016, 7:39:59 AM5/7/16
to Network Simulator 2 (NS2)
sorry   
$ uname -m 
i686
$ cat /etc/issue
VMware Easy Install 
.................

and  when i type ls i see just 2 fils Makefile.in and makefile.vc
where file Makefile ? 

knudfl

unread,
May 7, 2016, 7:56:38 AM5/7/16
to Network Simulator 2 (NS2)
I guess you know the Ubuntu version.  Please tell us what you have.
If you don't please try : $ cat  /etc/*release*  

-

kaki2011rachid

unread,
May 7, 2016, 8:01:03 AM5/7/16
to Network Simulator 2 (NS2)

kaki2011rachid

unread,
May 7, 2016, 8:26:39 AM5/7/16
to Network Simulator 2 (NS2)
version ubuntu >>>>

knudfl

unread,
May 7, 2016, 9:32:37 AM5/7/16
to Network Simulator 2 (NS2)
Please do not use images for a text :  You could simply type the answer = Ubuntu 16.04
.. Other text :  Please use  copy/paste  to get the text.

Ubuntu 16.04 and ns2 :
1) $ sudo apt-get update && sudo apt-get install g++ g++-4.8 patch make autoconf libtool libxmu-dev

2) And for the ns235 please use ns-allinone-2.35_gcc482.tar.gz

3) The build command is :
export CC=gcc-4.8 CXX=g++-4.8 && ./install

-

Praveen Salagar

unread,
Jun 24, 2016, 2:13:51 PM6/24/16
to Network Simulator 2 (NS2)

Charles Pandian

unread,
Jul 5, 2016, 11:45:01 AM7/5/16
to Network Simulator 2 (NS2)
Hello Rachid,

The error message is saying that you not yet successfully re-compiled ns2 after patching operation.
You may follow the steps "as it is" by understanding it from the original documentation "http://sce.uhcl.edu/transa/Sourcecode/NS-2_Security_Node_Document.doc"

Charles Pandian,

On Friday, May 6, 2016 at 12:29:03 AM UTC+5:30, Rachid wrote:

Praveen Salagar

unread,
Jul 5, 2016, 12:39:02 PM7/5/16
to ns-u...@googlegroups.com

Thanks a lot bro I got n combined with my MOVE TCL file thanks alot

--

Praveen Salagar

unread,
Jul 5, 2016, 12:40:26 PM7/5/16
to ns-u...@googlegroups.com

And can I get code for like data not integrity like sender sent a message "HI" and the revived receive "HELLO" message

On Jul 5, 2016 9:15 PM, "Charles Pandian" <igs...@gmail.com> wrote:
--

Bilal Erman Bilgin

unread,
Aug 2, 2016, 3:02:20 AM8/2/16
to Network Simulator 2 (NS2)
Hi Knudfl,

I installed security_ns235.patch according to your instruction.
It's working well.
But when I read the trace file, packet type seems as undefined. I put a few sentences of trace file. Can you help me?

+ 0.1 2 3 undefined 0 ------- 1 0.0 5.0 -1 7
- 0.1 2 3 undefined 0 ------- 1 0.0 5.0 -1 7
r 0.1 3 4 undefined 0 ------- 1 1.0 4.0 -1 6
r 0.11 2 3 undefined 0 ------- 1 0.0 5.0 -1 7
+ 0.11 3 5 undefined 0 ------- 1 0.0 5.0 -1 7
- 0.11 3 5 undefined 0 ------- 1 0.0 5.0 -1 7
r 0.12 3 5 undefined 0 ------- 1 0.0 5.0 -1 7



6 Mayıs 2016 Cuma 13:49:54 UTC+3 tarihinde knudfl yazdı:

Jeenat Sultana

unread,
Aug 30, 2016, 1:57:18 AM8/30/16
to Network Simulator 2 (NS2)
hello!
Can you please share me the file security_ns235.patch?
Reply all
Reply to author
Forward
0 new messages