Posts

NS2.35 installation in Fedora 15 and Ubuntu 11.10

NS 2.35 can be installed successfully in Fedora 15 and Ubuntu 11.10 using the following steps In Fedora 15 Download ns-allinone-2.35 from the NS2 website. The recent version was RC8 select the folder /home/username, untar the file using the command " tar zxvf ns-allinone-xxx.tar.gz " (without quotes). Go to the folder /home/username/ns-allinone-2.35/ using the command cd  /home/username/ns-allinone-2.35 /  and execute the command ./install (dot /install) You may encounter an error in the file mac_80211Ext.h and correct the error given in the following line Open the file /home/username/ns-allinone-2.35/ns-2.35/mac/mac_80211Ext.h and include the following line in the header file area #include <cstddef> Go to step3 and type ./install   Once installation completed, set the path information in .bash_profile (dot bash_profile) you need to set two path variables PATH and LD_LIBRARY_PATH please see this link for setting the path  http://prad...

C Interview Questions–to be solved

These programs were asked in various colleges/universities across India. These Questions were in my email dated 1999. So please let me know if any copyright information, so that I will remove it. But these questions are very much helpful for budding Student (engineers and interviewees). //  Carefully study the given program #include <stdio.h> #include <alloc.h> void main(void); typedef struct NType {     int i;     char c;     long x; }NewType; void main(void) {     NewType *c;     c=(NewType*)malloc(sizeof(NewType));     c->i=100;     c->c='C';     (*c).x=100l;     printf("%d,%c,%4ld",c->i,c->c,c->x); } /* What is the output of this program ? a)  It will produce a variable redefinition error b)  It w...

C programs–For practice (to be solved)

#include <stdio.h> #define A     2 #define B     3 #define C     A - B #define D    4 - C main() {     int x = D;         printf("x = %d\n", x); } ------------------- #include <stdio.h> main() {     int i =3;     printf("%d\n", i++);     printf("%d\n", i++); } --------------- #include <stdio.h> #define A      RAM #define RAM     ram main() {     char *ram = "hello ram!";     printf("%s\n", A); } ------------- #include <stdio.h> main() {     int i = 5, sum = 0;         do {         sum += 1/i;        } whil...

Fedora 12 Installation

Image
This post will show you the installation of Fedora along with Windows 7. This Post is mainly for Beginners of Linux those who entered the college just now who don’t have prior working knowledge on Linux Here we go…. I have taken DVD Version of Fedora 12 (32 Bit OS) Step 1: Create a Partition on windows to give space for Fedora, Just 20GB space is enough.. You can store all your files under windows and use it in linux whenever you need. So no extra space needed for Linux. (see the image below) Step 2:  Insert the DVD and boot from the DVD and select the first option (as shown below) “ Install or Upgrade an existing System” Once selected, the system asks you to check the correctness of the media (DVD ROM). if you have doubt with your DVD, please click OK else SKIP it. (see below) Once done, start proceeding with the installation as given in the following images Step 4: Select the language (as given below, If you have doubt, leave with the default and click next) Step 5: S...

Linux for NS2 (Network Simulator 2)

At many places, I happen to see researchers and students wanted to use Windows for NS2 rather than Linux. The reason may be, Linux is tough It occupies more space and more memory in my Computer Linux uses lot of commands and i am not aware of it Tough to handle dual boot OS (windows and Linux) always wanted to be in the cakewalk. (never try a new thing) etc But here are some basic tips for using NS2 under a Linux Machine. It is enough to know some basic Linux commands to work with NS2 (hardly not more than 20 commands) One should have a basic knowledge of how tree structure in Linux/Unix look like Finally, where to set the PATH information in Linux With all the above three, one can confidentally work on Linux. As for as windows is concerned, upto NS2.27 version is tested under windows and recent versions there is no hope (however it will work fine, but "Use at your Own Risk") Please see this post to install Fedora 12 in your Computer Now we will see some...

Tracegraph installation in Windows 7

How to install tracegraph in windows . here are the steps Download it from here Step 1: Unzip the tracegraph202.tar file to C: or D:  (in my case I extracted to D:/tracegraph202) Step 2: copy the path (DLL files) to the environmental variables (in my case the path is D:\tracegraph202\bin\win32 ) Step 3: that’s it run the trgraph.exe file which is available under the tracegraph202/ folder.

NS2.34 installation in Ubuntu 11.04

Already this blog posts various titles on installing NS2 in Linux distros. Here is the step for installing in Ubuntu 11.04. 1. Version taken is NS2.34 2. Since ubuntu 11.04 uses GCC-4.5.2, there should be some minor tweeks. 3. Two files should be edited ~ns-2.34/tools/ranvar.cc and ~ns-2.34/mobile/nakagami.cc  as given in the following post http://pradeepkumar.org/2011/06/installing-ns-2-34-in-fedora-14.html 4. Install the following things in Ubuntu sudo apt-get install build-essential autoconf automake libxmu-dev sudo apt-get install gcc-4.4 5. open the file ~ns-2.34/otcl-1.13/configure and change the line number 6304 to SHLIB_LD="gcc -shared" instead of SHLIB_LD="ld -shared" 6. open the file ~ns-2.34/otcl-1.13/Makefile.in and change the line CC    @CC@ to CC    gcc-4.4 7. Set the path in /home/<name>/ .bashrc as in http://pradeepkumar.org/2009/11/installing-ns2-under-ubuntu-910.html 8. After setting t...