LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-06-2014, 11:12 AM   #16
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154

← #15 .
Quote:
.. try to execute this command $ patch -p0 < otcl_ns234_gcc-4.4.patch
this message was shown
patching file _p0
Something is really really wrong when the patch command is trying
to patch a file by name "_p0".

The patch is a very short text file (394B),
will edit otcl-1.13/Makefile.in, line 16 to :
SHLIB_LD= gcc -shared

Please read `otcl_ns234_gcc-4.4.patch´ :
Code:
diff -Naur otcl-1.13-orig/Makefile.in otcl-1.13/Makefile.in
--- otcl-1.13-orig/Makefile.in	2009-06-14 19:35:49.000000000 +0200
+++ otcl-1.13/Makefile.in	2014-09-30 11:31:47.000000000 +0200
@@ -13,7 +13,7 @@
 # how to compile, link, and name shared libraries
 #
 
-SHLIB_LD=	@SHLIB_LD@
+SHLIB_LD=	gcc -shared
 SHLIB_CFLAGS=	@SHLIB_CFLAGS@
 SHLIB_SUFFIX=	@SHLIB_SUFFIX@
 SHLD_FLAGS=	@SHLD_FLAGS@
May be you have a file by name `otcl_ns234_gcc-4.4.patch´
with a quite different content ?



Quote:
You cannot execute a text-file.tcl.
Tcl files are interpreted by the executable 'ns* '.
→ →
Please can you explain to me this point
Executables ( exe files ) can be executed. Text files cannot be executed.

-
 
Old 11-06-2014, 04:44 PM   #17
nassou19891
Member
 
Registered: Sep 2014
Posts: 56

Original Poster
Rep: Reputation: Disabled
Think you for your response
 
Old 04-27-2015, 09:17 AM   #18
Master_Stu
Member
 
Registered: Sep 2014
Posts: 38
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
Ref. #3, #4.

A new patch was created : Wimax.awg+lte+dccp+mptcp_ns234.patch.gz

-
Hi sir ,
i already installed ns2.34 successfully but when i add the patch should i re-install ns2.34 again?
what are these steps exactly please
 
Old 04-27-2015, 11:30 AM   #19
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
Re #18.

Just follow post #6.
If you already have a clean ns-2.34 ( No changes, no patches added )
... you can just apply the patch, and rerun ./install.

If you did some changes to your current ns-2.34 :
Build another one in a new folder in /home/name/.
You can have as many ns-allinone-2.xx as you want, installed at the same time.
But : Do never add any *PATH text to .bashrc .

-
 
Old 04-27-2015, 11:43 AM   #20
Master_Stu
Member
 
Registered: Sep 2014
Posts: 38
Blog Entries: 1

Rep: Reputation: Disabled
Thanks for your replay
Quote:
Originally Posted by knudfl View Post
Re #18.


If you already have a clean ns-2.34 ( No changes, no patches added )
-
How can i check if ns2.34 is clean ?
 
Old 04-27-2015, 12:25 PM   #21
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
Re #20.

Why even consider using the current ns-2.34 if you have any doubts ?
Takes about 5 minutes to setup a new one.
* I have about 170 times ns-allinone-2.xx on the same OS.
No problems at all having multiple ns2`s.
Just keep "all" your 'ns-<new-name>' executable`s in /usr/local/bin/.

* It will take much longer time to check the diff from an original ns-2.34 vs your current one than it will to build another one.

-
 
Old 04-27-2015, 01:28 PM   #22
Master_Stu
Member
 
Registered: Sep 2014
Posts: 38
Blog Entries: 1

Rep: Reputation: Disabled
thank you
 
Old 04-27-2015, 05:17 PM   #23
Master_Stu
Member
 
Registered: Sep 2014
Posts: 38
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post

$ export CC=gcc-4.4 CXX=g++-4.4 && ./install

-
Hi, please
this command not executed !! afther that
i executed the command $ export CC=gcc-4.4 CXX=g++-4.4
but the result of ./install was bash: ./install : permission non accordée
and when i typed sudo ./install
the password not accepted
 
Old 04-27-2015, 05:44 PM   #24
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
Re #23.

Try again : In /home/[name]/Wimax+LTE/ , please do :
$ tar xvf ns-allinone-2.34.tar.gz
... You can impossibly get 'permission non accordée', if 'tar' is used.
But 'Permission denied' happens very often when people use a Windows tool or 'sudo' for the un-compress.


-
 
Old 04-27-2015, 07:13 PM   #25
Master_Stu
Member
 
Registered: Sep 2014
Posts: 38
Blog Entries: 1

Rep: Reputation: Disabled
thanks for your support :^)
all steps completed with success and i tried with test-be-mod.tcl and the file out_mod_2.res was generated
thank you
can you offer to me tcl scripts for wimax and lte
i'll be very grateful
with regards Aziza
 
Old 04-28-2015, 07:05 PM   #26
Master_Stu
Member
 
Registered: Sep 2014
Posts: 38
Blog Entries: 1

Rep: Reputation: Disabled
Hi please Help me!
i have tried with many tcl scripts but no one works with me
also i have tried with files from ns-2.34/tcl/wimax
for exmple the error when i run the file wimax1.tcl (i tried with ns-new and ns)
Code:
aziza@aziza-VirtualBox:~/Bureau/ns/ns-allinone-2.34/ns-2.34/tcl/wimax$ ns-new wimax1.tcl
gap size=1
Configuration of hierarchical addressing done
num_nodes is set 3
Enter PropOFDMA::command
Number of arguments : 3
0th arg : cmd1st arg : topography2nd arg : _o10not match!
Enter PropOFDMA::command
Number of arguments : 3
0th arg : cmd1st arg : ITU_PDP2nd arg : PED_A
SelectedPDP in command() = PED_A
Enter PropOFDMA::LoadDataFile function
In LoadDataFile, SelectedPDP is PED_A
Path to the ns2 directory is: ./
Enter ReadTableFromFile()
Error opening file BLER_LookupTable.txt in directory ./
Error opening file BLER_LookupTable.txt in the current directory

Last edited by Master_Stu; 04-29-2015 at 08:09 AM.
 
Old 04-29-2015, 01:53 AM   #27
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
Re #26 : "Bold type" is for a few words.

Please edit post #26 to CODE Tags : [code]error output text[/code]


The data files BLER_LookupTable.txt, etc. are in the wimax-awg-2.6 source :
ms-2.34/{ BetaTable.txt, BLER_LookupTable.txt, PED_A, PED_B, VEHIC_A }.

And in the package "wimax-ex-all_04.2015.tar.gz"
https://drive.google.com/file/d/0B7S...ew?usp=sharing
... which is examples from all Wimax versions.

-
 
Old 04-29-2015, 08:09 AM   #28
Master_Stu
Member
 
Registered: Sep 2014
Posts: 38
Blog Entries: 1

Rep: Reputation: Disabled
thank you Sir
 
Old 04-29-2015, 09:54 AM   #29
Master_Stu
Member
 
Registered: Sep 2014
Posts: 38
Blog Entries: 1

Rep: Reputation: Disabled
the same think with dccp !!
tired from errors
Code:
aziza@aziza-VirtualBox:~/Bureau$ ns-new dccp-wireless.tcl
num_nodes is set 2
warning: no class variable Phy/WirelessPhy::OFDMA_

	see tcl-object.tcl in tclcl for info about this warning.

INITIALIZE THE LIST xListHead
warning: no class variable Phy/WirelessPhy::OFDMA_

	see tcl-object.tcl in tclcl for info about this warning.

Starting Simulation...
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5,  distCST_ = 550.0
SORTING LISTS ...DONE!
*** stack smashing detected ***: ns-new terminated
======= Backtrace: =========
/lib/i386-linux-gnu/libc.so.6(__fortify_fail+0x45)[0xea4dd5]
/lib/i386-linux-gnu/libc.so.6(+0xffd8a)[0xea4d8a]
ns-new(_ZN8CMUTrace10nam_formatEP6Packeti+0xbaf)[0x82c3ceb]
ns-new(_ZN8CMUTrace6formatEP6PacketPKc+0x6b)[0x82c3d61]
ns-new(_ZN8CMUTrace4recvEP6PacketP7Handler+0x71)[0x82c4085]
ns-new(_ZN5Agent4sendEP6PacketP7Handler+0x2c)[0x81baf56]
ns-new(_ZN9DCCPAgent6outputEb+0x74c)[0x82284c8]
ns-new(_ZN9DCCPAgent7sendmsgEiPKc+0x1a2)[0x822bf7a]
ns-new(_ZN5Agent7commandEiPKPKc+0x2f2)[0x81c6b02]
ns-new(_ZN9DCCPAgent7commandEiPKPKc+0xad)[0x822b287]
ns-new(_ZN16DCCPTCPlikeAgent7commandEiPKPKc+0x1f)[0x823254b]
ns-new(_ZN8TclClass12dispatch_cmdEPvP10Tcl_InterpiPPKc+0x32)[0x8441ede]
ns-new[0x844826f]
ns-new(TclInvokeStringCommand+0x6e)[0x844a85e]
ns-new(TclEvalObjvInternal+0x373)[0x844c563]
ns-new[0x847890a]
ns-new(TclCompEvalObj+0xdd)[0x847cb9d]
ns-new[0x8478c23]
ns-new(TclCompEvalObj+0xdd)[0x847cb9d]
ns-new(TclObjInterpProc+0x2a7)[0x84a6c17]
ns-new(TclProcInterpProc+0x80)[0x84a70d0]
ns-new[0x844848f]
ns-new(TclInvokeStringCommand+0x6e)[0x844a85e]
ns-new(TclEvalObjvInternal+0x373)[0x844c563]
ns-new[0x847890a]
ns-new(TclCompEvalObj+0xdd)[0x847cb9d]
ns-new(TclObjInterpProc+0x2a7)[0x84a6c17]
ns-new(TclProcInterpProc+0x80)[0x84a70d0]
ns-new[0x844826f]
ns-new(TclInvokeStringCommand+0x6e)[0x844a85e]
ns-new(TclEvalObjvInternal+0x373)[0x844c563]
ns-new(Tcl_EvalEx+0x4fc)[0x844d1fc]
ns-new(Tcl_Eval+0x3c)[0x844d49c]
ns-new(Tcl_GlobalEval+0x36)[0x844d536]
ns-new(_ZN3Tcl4evalEPc+0x1b)[0x844133d]
ns-new(_ZN9AtHandler6handleEP5Event+0x24)[0x81a922c]
ns-new(_ZN9Scheduler8dispatchEP5Eventd+0x94)[0x81a91e2]
ns-new(_ZN9Scheduler3runEv+0x2c)[0x81a9116]
ns-new(_ZN9Scheduler7commandEiPKPKc+0x6b)[0x81a92c3]
ns-new(_ZN8TclClass12dispatch_cmdEPvP10Tcl_InterpiPPKc+0x32)[0x8441ede]
ns-new[0x844826f]
ns-new(TclInvokeStringCommand+0x6e)[0x844a85e]
ns-new(TclEvalObjvInternal+0x373)[0x844c563]
ns-new[0x847890a]
ns-new(TclCompEvalObj+0xdd)[0x847cb9d]
ns-new[0x8478c23]
ns-new(TclCompEvalObj+0xdd)[0x847cb9d]
ns-new(TclObjInterpProc+0x2a7)[0x84a6c17]
ns-new(TclProcInterpProc+0x80)[0x84a70d0]
ns-new[0x844848f]
ns-new(TclInvokeStringCommand+0x6e)[0x844a85e]
ns-new(TclEvalObjvInternal+0x373)[0x844c563]
ns-new[0x847890a]
ns-new(TclCompEvalObj+0xdd)[0x847cb9d]
ns-new(TclObjInterpProc+0x2a7)[0x84a6c17]
ns-new(TclProcInterpProc+0x80)[0x84a70d0]
ns-new[0x844826f]
ns-new(TclInvokeStringCommand+0x6e)[0x844a85e]
ns-new(TclEvalObjvInternal+0x373)[0x844c563]
ns-new(Tcl_EvalEx+0x4fc)[0x844d1fc]
ns-new(Tcl_FSEvalFile+0x243)[0x8495d63]
ns-new(Tcl_Main+0x357)[0x8499407]
ns-new(nslibmain+0x20)[0x8440f3c]
======= Memory map: ========
00191000-001a1000 r-xp 00000000 08:01 1370       /usr/lib/i386-linux-gnu/libXext.so.6.4.0
001a1000-001a2000 r--p 0000f000 08:01 1370       /usr/lib/i386-linux-gnu/libXext.so.6.4.0
001a2000-001a3000 rw-p 00010000 08:01 1370       /usr/lib/i386-linux-gnu/libXext.so.6.4.0
001a3000-0027b000 r-xp 00000000 08:01 6850       /usr/lib/i386-linux-gnu/libstdc++.so.6.0.16
0027b000-0027c000 ---p 000d8000 08:01 6850       /usr/lib/i386-linux-gnu/libstdc++.so.6.0.16
0027c000-00280000 r--p 000d8000 08:01 6850       /usr/lib/i386-linux-gnu/libstdc++.so.6.0.16
00280000-00281000 rw-p 000dc000 08:01 6850       /usr/lib/i386-linux-gnu/libstdc++.so.6.0.16
00281000-00288000 rw-p 00000000 00:00 0 
002d6000-002d7000 r-xp 00000000 00:00 0          [vdso]
002d7000-00407000 r-xp 00000000 08:01 1368       /usr/lib/i386-linux-gnu/libX11.so.6.3.0
00407000-00408000 r--p 0012f000 08:01 1368       /usr/lib/i386-linux-gnu/libX11.so.6.3.0
00408000-0040a000 rw-p 00130000 08:01 1368       /usr/lib/i386-linux-gnu/libX11.so.6.3.0
0040a000-0040b000 rw-p 00000000 00:00 0 
00438000-00454000 r-xp 00000000 08:01 264837     /lib/i386-linux-gnu/libgcc_s.so.1
00454000-00455000 r--p 0001b000 08:01 264837     /lib/i386-linux-gnu/libgcc_s.so.1
00455000-00456000 rw-p 0001c000 08:01 264837     /lib/i386-linux-gnu/libgcc_s.so.1
005bb000-005d1000 r-xp 00000000 08:01 264861     /lib/i386-linux-gnu/libnsl-2.15.so
005d1000-005d2000 r--p 00015000 08:01 264861     /lib/i386-linux-gnu/libnsl-2.15.so
005d2000-005d3000 rw-p 00016000 08:01 264861     /lib/i386-linux-gnu/libnsl-2.15.so
005d3000-005d5000 rw-p 00000000 00:00 0 
00971000-0099b000 r-xp 00000000 08:01 264848     /lib/i386-linux-gnu/libm-2.15.so
0099b000-0099c000 r--p 00029000 08:01 264848     /lib/i386-linux-gnu/libm-2.15.so
0099c000-0099d000 rw-p 0002a000 08:01 264848     /lib/i386-linux-gnu/libm-2.15.so
00a89000-00a8b000 r-xp 00000000 08:01 6323       /usr/lib/i386-linux-gnu/libXau.so.6.0.0
00a8b000-00a8c000 r--p 00001000 08:01 6323       /usr/lib/i386-linux-gnu/libXau.so.6.0.0
00a8c000-00a8d000 rw-p 00002000 08:01 6323       /usr/lib/i386-linux-gnu/libXau.so.6.0.0
00aba000-00abf000 r-xp 00000000 08:01 6334       /usr/lib/i386-linux-gnu/libXdmcp.so.6.0.0
00abf000-00ac0000 r--p 00004000 08:01 6334       /usr/lib/i386-linux-gnu/libXdmcp.so.6.0.0
00ac0000-00ac1000 rw-p 00005000 08:01 6334       /usr/lib/i386-linux-gnu/libXdmcp.so.6.0.0
00b7e000-00b9d000 r-xp 00000000 08:01 1366       /usr/lib/i386-linux-gnu/libxcb.so.1.1.0
00b9d000-00b9e000 r--p 0001f000 08:01 1366       /usr/lib/i386-linux-gnu/libxcb.so.1.1.0
00b9e000-00b9f000 rw-p 00020000 08:01 1366       /usr/lib/i386-linux-gnu/libxcb.so.1.1.0
00c03000-00c23000 r-xp 00000000 08:01 264796     /lib/i386-linux-gnu/ld-2.15.so
00c23000-00c24000 r--p 0001f000 08:01 264796     /lib/i386-linux-gnu/ld-2.15.so
00c24000-00c25000 rw-p 00020000 08:01 264796     /lib/i386-linux-gnu/ld-2.15.so
00cba000-00cbd000 r-xp 00000000 08:01 264829     /lib/i386-linux-gnu/libdl-2.15.so
00cbd000-00cbe000 r--p 00002000 08:01 264829     /lib/i386-linux-gnu/libdl-2.15.so
00cbe000-00cbf000 rw-p 00003000 08:01 264829     /lib/i386-linux-gnu/libdl-2.15.so
00da5000-00f44000 r-xp 00000000 08:01 264816     /lib/i386-linux-gnu/libc-2.15.so
00f44000-00f46000 r--p 0019f000 08:01 264816     /lib/i386-linux-gnu/libc-2.15.so
00f46000-00f47000 rw-p 001a1000 08:01 264816     /lib/i386-linux-gnu/libc-2.15.so
00f47000-00f4a000 rw-p 00000000 00:00 0 
08048000-08617000 r-xp 00000000 08:01 183013     /usr/local/bin/ns-new
08618000-08619000 r--p 005cf000 08:01 183013     /usr/local/bin/ns-new
08619000-086ba000 rw-p 005d0000 08:01 183013     /usr/local/bin/ns-new
086ba000-08f98000 rw-p 00000000 00:00 0 
0ab9a000-0ae10000 rw-p 00000000 00:00 0          [heap]
b757b000-b757d000 rw-p 00000000 00:00 0 
b757d000-b777d000 r--p 00000000 08:01 9436       /usr/lib/locale/locale-archive
b777d000-b7782000 rw-p 00000000 00:00 0 
b778b000-b7792000 r--s 00000000 08:01 7236       /usr/lib/i386-linux-gnu/gconv/gconv-modules.cache
b7792000-b7793000 r--p 0085b000 08:01 9436       /usr/lib/locale/locale-archive
b7793000-b7795000 rw-p 00000000 00:00 0 
bf896000-bf8b7000 rw-p 00000000 00:00 0          [stack]
Abandon (core dumped)
aziza@aziza-VirtualBox:~/Bureau$
the file dccp-wireless.tcl :
Code:
# Copyright (c) 1997 Regents of the University of California.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
#    must display the following acknowledgement:
#      This product includes software developed by the Computer Systems
#      Engineering Group at Lawrence Berkeley Laboratory.
# 4. Neither the name of the University nor of the Laboratory may be used
#    to endorse or promote products derived from this software without
#    specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# simple-wireless.tcl
# A simple example for wireless simulation

# ======================================================================
# Define options
# ======================================================================
set val(chan)           Channel/WirelessChannel    ;# channel type
set val(prop)           Propagation/TwoRayGround   ;# radio-propagation model
set val(netif)          Phy/WirelessPhy            ;# network interface type
set val(mac)            Mac/802_11                 ;# MAC type
set val(ifq)            Queue/DropTail/PriQueue    ;# interface queue type
set val(ll)             LL                         ;# link layer type
set val(ant)            Antenna/OmniAntenna        ;# antenna model
set val(ifqlen)         50                         ;# max packet in ifq
set val(nn)             2                          ;# number of mobilenodes
set val(rp)             DSDV                       ;# routing protocol

# ======================================================================
# Main Program
# ======================================================================


#
# Initialize Global Variables
#
set ns_		[new Simulator]
set tracefd     [open simple.tr w]
set namtrace    [open simple.out w]
$ns_ trace-all $tracefd
$ns_ namtrace-all-wireless $namtrace 800 800

# set up topography object
set topo       [new Topography]

$topo load_flatgrid 800 800

#
# Create God
#
create-god $val(nn)

#
#  Create the specified number of mobilenodes [$val(nn)] and "attach" them
#  to the channel. 
#  Here two nodes are created : node(0) and node(1)

set chan_1_ [new $val(chan)]
# configure node

        $ns_ node-config -adhocRouting $val(rp) \
			 -llType $val(ll) \
			 -macType $val(mac) \
			 -ifqType $val(ifq) \
			 -ifqLen $val(ifqlen) \
			 -antType $val(ant) \
			 -propType $val(prop) \
			 -phyType $val(netif) \
			 -channel $chan_1_ \
			 -topoInstance $topo \
			 -agentTrace ON \
			 -routerTrace ON \
			 -macTrace OFF \
			 -movementTrace OFF			
			 
	for {set i 0} {$i < $val(nn) } {incr i} {
		set node_($i) [$ns_ node]	
		$node_($i) random-motion 0		;# disable random motion
	}

#
# Provide initial (X,Y, for now Z=0) co-ordinates for mobilenodes
#
$node_(0) set X_ 5.0
$node_(0) set Y_ 2.0
$node_(0) set Z_ 0.0

$node_(1) set X_ 390.0
$node_(1) set Y_ 385.0
$node_(1) set Z_ 0.0

#
# Now produce some simple node movements
# Node_(1) starts to move towards node_(0)
#
$ns_ at 50.0 "$node_(1) setdest 25.0 20.0 15.0"
$ns_ at 10.0 "$node_(0) setdest 20.0 18.0 1.0"

# Node_(1) then starts to move away from node_(0)
$ns_ at 100.0 "$node_(1) setdest 490.0 480.0 15.0" 

# Setup traffic flow between nodes
# TCP connections between node_(0) and node_(1)

#set dccp [new Agent/TCP]
set dccp [new Agent/DCCP/TCPlike]
#$tcp set class_ 2
set sink [new Agent/DCCP/TCPlike]
#set sink [new Agent/TCPSink]
$ns_ attach-agent $node_(0) $dccp
$ns_ attach-agent $node_(1) $sink

set ftp [new Application/FTP]
$ftp attach-agent $dccp

$ns_ connect $dccp $sink

# Add agent traces and variabale trace
$dccp set nam_tracevar_ true
$dccp attach $namtrace
$dccp add-agent-trace dccp
$dccp trace s_p_

$ns_ at 1.0 "$sink listen"
$ns_ at 10.0 "$ftp start" 

#
# Tell nodes when the simulation ends
#
for {set i 0} {$i < $val(nn) } {incr i} {
    $ns_ at 150.0 "$node_($i) reset";
}
$ns_ at 150.0 "stop"
$ns_ at 150.01 "puts \"NS EXITING...\" ; $ns_ halt"
proc stop {} {
    global ns_ tracefd namtrace
    $ns_ flush-trace
    close $tracefd
    close $namtrace
}

puts "Starting Simulation..."
$ns_ run
 
Old 04-29-2015, 10:38 AM   #30
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
Re #29.
Quote:
*** stack smashing detected ***
Works OK here : $ ns235-orig dccp-wireless_M-Stu.tcl
Also OK : $ ns235-wimax-awg dccp-wireless_M-Stu.tcl ,,, but no simple-w.nam !
* Do not expect a wimax patched ns2 to run default simulations.

OS used for the above : The 32bits 'PCLinuxOS 2015' :
* RPM based OS`s are more reliable with ns2.
Most of these are using a "style Redhat" glibc and gcc !


? Are you using a 64bits Ubuntu ? And which Ubuntu version ?


The dccp examples : dccp-examples-2014.tar.gz
https://drive.google.com/file/d/0B7S...ew?usp=sharing


-

Last edited by knudfl; 04-29-2015 at 10:46 AM.
 
  


Reply

Tags
ns2, wimax-awg, wimax.awg-lte-dccp-mptcp


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
want to install ns2.29.3 along with mannasim patch for ns2.29 jeevanpinto Linux - Software 4 10-02-2013 01:09 AM
how to install both ns2.28 and ns2.34 versions on ubuntu 10.04? popoaung Linux - Software 3 06-10-2013 05:52 PM
Erreur 403 : Forbidden to access to my courses wfirefox Linux - Server 27 10-29-2009 10:19 AM
Erreur port série tomdu85 Linux - Software 8 06-15-2009 08:15 AM


All times are GMT -5. The time now is 09:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration