Thursday, July 23, 2009

Showing OTcl class name from C++ in NS2

Actually, C++ does not have any instruction to display the OTcl name. But if you have observed that each OTcl object has it own address which you can see by enter command "set ns [new Simulator]". The line comes after the command is the address of object ns which.
normally,in the form of "_oxx, xx=number".

You can show the object's class name,in this example $ns, by using two alternatives. "$ns info class" or "_oxx info class" (replaces xx with the number you see after the command "set ns [new Simulator]". From this characteristic, it gives the opportunity to display OTcl name
from C++ (Compiled Hierarchy).

The C++ instruction, "this->name()", gives "_oxx" of the object that pointer "this" inside
So, running this instruction (in C++ function)

tcl.evalf("puts \"OTcl name = [%s info class]\"",this->name());

will gives the OTcl name.

Some warning!!
"this" pointer can be used after the constructor only because it is initialized after running the constructor.

Monday, July 13, 2009

Greek symbol in blogger

The blogger has capability to interpret some html tags. I have test some of Greek symbol below

Alpha a , Beta b symbol.

It's work!!!

Saturday, July 11, 2009

Another bug in GNS3 + Running in Windows Vista

Another bug, I found, occured when I have connect line(fastethernet or serial) to cloud (NIO_UDP) which connect to virtual PC on Ubuntu Jaunty. The GN3 says that it cannot connect to NIO_UDP.

Then I decided to work with GNS3 as Root by invoking GNS3 in commandline in with user root. Everthing is going well until I save the project, the problems which occured to me are
1. GNS3 cannot save the workspace outside root directory (it just process as it saved the project, but actually it is not!!)
2. I cannot open project file (*.net) by double click it (open with default application), I have to open it from commandline (but my friend, same os version, has not!!??).

At last, I decided to work with GNS3 in Windows Vista. But the problem mostly occured in Windows Vista is that it does not provide telnet client at first installation. So I have to install telnet client in Control Panel > Program and Features > (on left pane) Turn windows feature on and off and activate telnet client.

Working with Windows telnet is not a comfortavle way for me, then I install the PuTTY for telnet client. The command that we have to config in Edit > Preferences > General > Terminal command is "start C:\progra~1\PuTTY\putty.exe -telnet %p"

---[ For Windows Vista ]---
1. We have to use address instead of localhost (%h) and %p is the router port number for telnet (console connection)
2. We have to change the path to PuTTY from C:\Program Files\PuTTY\putty.exe to C:\progra~1\PuTTY\putty.exe since it will error (Windows thainks that "C:\Program" is telnet program, ToT)
3. the word "start" is to invoke the commandline application

---[ For Both, Windows Vista and Ubuntu Jaunty ]---
1. The path specifies (both workspace and IOS path) in the project file (*.net) cannot use relative path, we have to enter the absolute path only!!

Friday, July 3, 2009

Bug in GNS3

There is little bug in GNS3 running on Ubuntu Jaunty (9.04). The GNS3 cannot display the workspace which has been configured in *.net file. The GNS3 team said that it is the problem of new vesion of qt library.

To solve the problem, you have to right click on project file *.net and select menu "Open with other application" and browse to gns3 application (If you install through synaptic, it would locate at /usr/bin/gns3) the saved project will show in the workspace.

Thank you to

Thursday, July 2, 2009

Cross platform printer sharing with password protection

After googling many sites, large number of people can setup a share folders,files or printers between Windows and Linux Platform, specifically Ubuntu, without password protection. To limit the access of share folder, pinters, the administrator setups the password for some user account.

In my environment, the Host computer which connect to printers is Windows XP platform and client computer is Ubuntu Jaunty Jackalope (9.04) with samba installed. To access shared printer with password protected, the clients have to follow these step
1. Open printer configuration in Administrator>Printing
2. click on New>Printer
3. On left menu, click on Windows printer via SAMBA
4. click browse to browse to target printer
5. activate Set authentication details now and insert username and password given by administrator (you can test that the printer and password match by click on button verify)
6. click forward
7. browse for target printer's brand and click forward
8. Select model then forward (it would load driver for target printer)
9. activate some options that you'd love to
10. In the last step, it would prompt you to print test page
11. Finish!!

Note :
- you can see the status of printing by clicking on properties of target printer, the status is shown in Printer state : field
- printer sharing works on same subnet only

Playing Warcraft III : Dot A in Ubuntu (9.04) Jaunty

There are several steps for configuration of Wine to make it run Warcraft III
1. Get the latest Wine, here
2. Run command in shell
$ wine "path_tp_warcraft/war3.exe" -opengl
3. to set resolution manually in regedit, you should run command
$ wine regedit
4. In HKEY_CURRENT_USER/Software/Blizzard Entertainment/Warcraft III/video, set reswidth and resheight to your resolution.