Welcome to the Homepage of Manu Bhardwaj!

VTU

Here, you can read about the university projects I worked on to get my undergraduate engineering degree.

6ify

posted Apr 14, 2009 7:05 PM by Manu Bhardwaj   [ updated Apr 14, 2009 7:06 PM ]

15th December 2003: IPv4-IPv6 Header and Packet Translator

This project was implemented by Amit N Gandhi and me as a project requirement for the seventh semester Network Programming Laboratory. It is a basic protocol translator that captures packets at the Layer 2 level (as Ethernet frames), modifies or replaces the IP headers, and retransmits them on another interface.

To compile the source files, the libnet 1.1.1 and libpcap 0.7.2 ".a" files are required, and a minimum requirement for libpcap.0.7.so also exists.

CHAINS on the Web

posted Apr 14, 2009 7:03 PM by Manu Bhardwaj   [ updated Apr 14, 2009 7:04 PM ]

15th December 2003: The "Child Health and Nutrition Information System" database project, implemented using Perl and PostGreSQL

For our seventh semester Internet Programming Laboratory, Amit N Gandhi and me implemented the CHAINS on the Web project as an extension of our CHAINS project previously implemented using Visual Basic for our sixth semester Database Management Systems Laboratory.

CHAINS on the Web is an HTML+Perl+SQL implementation of CHAINS.

CUBISM!

posted Apr 14, 2009 7:01 PM by Manu Bhardwaj   [ updated Apr 14, 2009 7:02 PM ]

18th June 2003: Multiplatform GUI Graphics Editor

As part of the syllabus requirements for the VTU sixth semester Computer Graphics Lab, Amit N Gandhi and me created the dual platform CUBISM! Graphics Editor that utilizes the Allegro Graphics Programming Library . The GCC compiler for Windows, DJGPP , was used on Windows while GNU GCC was used on Linux.
  • It works on both the Linux and Windows platforms without any requirement for modification of source code.
  • It works in the non-GUI mode in both platforms.
  • The default graphics environment uses a 16-colour mode.
  • The BMP bitmap format is the default format for CUBISM! - it can open, modify and save bitmap files of any size.
  • It currently has a default size of 800x600 pixel viewable area, with a maximum bitmap size of 640x480 pixels.
  • The primitive operations that it can perform are Freehand Curves, Lines, Bezier Curves, Filled Rectangles, Unfilled Rectangles, Filled Circles, Unfilled Circles, Filled Ellipses, Unfilled Ellipses, Filled Polygons and Unfilled Polygons.
  • The support operations currently enabled are Scale, Clip, Erase, Undo, Fill.
  • The basic clipboard operations Cut, Copy and Paste are implemented.
  • The file operations it implements are New, Open, Save, Save As, Close, Quit.

IPv6 + Freenet6 Howto

posted Apr 14, 2009 6:56 PM by Manu Bhardwaj   [ updated Apr 14, 2009 7:00 PM ]

January 13, 2003: A step-by-step howto on how to connect to the 6Bone and have a unique global IPv6 identity, by tunneling to Freenet6 from inside an IPv4 NAT

Introduction

FreeNet6 provides people who have static IPv4 addresses with a convenient way to connect to the 6Bone , a worldwide IPv6-only network; by using an IPv6-over-IPv4 tunnel. My case is slightly different though - my computer is on a large 255.255.0.0 network, and I'm assigned a static 172.16.x.y address, and all my connections have to travel to and from the Internet via the gateway server, a computer running GNU/Linux and having a globally static IPv4 address.

My aim was to get a global, static IPv6 address which directly references my computer inside the LAN, and thus become a static member on the 6bone.

I succeeded.


Synopsis

The below howto is what I wrote down while I set up the FreeNet6 tunnel. FreeNet6's website does not explicitly mention a step-by-step procedure that a person in my situation should use - it just points the user to an old webpage that has the instructions for an old version of FreeNet6's software. I have created this howto for their latest software version.

I hope it helps.


Prologue

I connect to the Internet via a NAT. I have a private static IP address (say) 172.16.10.20, my gateway is (say) 172.16.0.1, and the gateway's globally static IP address is (say) 200.1.100.2. I use galeon and connect to KAME . I see a turtle that isn't swimming :-(. In other words, the connection I made to KAME was IPv4-only.


Step 1: The Kernel

I first made my own kernel. I couldn't get make xconfig to work for the latest beta kernel at the time (2.5.53) (Reason: xconfig relies on QT in 2.5.x!) , so I used the latest stable kernel (2.4.20) instead.

To enable IPv6, I had to say yes to the first option in Code Maturity Level Options. The IPv6 protocol comes under the subheading "Networking Options". I also had to choose a driver for my network card under "Network Device Support". I also enabled iptables here.

About Kernels and Images

In a few minutes, I had a new kernel image installed. Let me take this opportunity to plug for Debian GNU/Linux - it's make-kpkg option is fantastic - creating a new kernel required just three commands::

make xconfig make-kpkg kernel_image --revision=xxx dpkg -i ../linux-2.4.20xxx.deb


Step 2: Moving On

Booting into the new kernel, I used the command:

          ifconfig | grep inet6

to get the output as automagically assigned IPv6 addresses:

          inet6 addr: fe80::200:21ff:feaa:bbcc/10 Scope:Link [eth0]
inet6 addr: ::1/128 Scope:Host [lo]

You will notice that the inet6 address my eth0 has been assigned is a mangled 64-bit version of my 48-bit MAC address (00:00:21:AA:BB:CC). This has been done using an IETF specification for conversion of 48- to 64-bit MAC addresses, and then appending it to an fe80:: prefix.


Step 3: FreeNet Begins Its Role

I then proceeded to download the freenet6 Linux source  which was followed by the command:

          tar -zxvf freenet6-0.9.7.tgz

The README file included asked me to run the lines:

          make all target=linux
make install target=linux installdir=$INSTALLDIR

I warn you that this may overwrite your /etc/radvd.conf - make a backup of it first.

I recommend $INSTALLDIR==/usr/local/tsp as the default tspc.conf that comes with the source, contains that as default (i.e. the line tsp_dir=/usr/local/tsp). In any case, I will assume it to be true for now.


Step 4: More FreeNet6

I now had the freenet6 package ready. (Note: Debian users are advised that after an apt-get install freenet6, you may have to manually write your radvd.conf. In my case, I still don't have a radvd.conf on my box.)

On recommendation from freenet6.net, I then visited this site. It is an old page that talks about connecting to Freenet6 from behind a NAT (exactly my situation), and refers to a very old freenet6 package and old IPFilter rules.

The new freenet6 kit contains a configuration file (/usr/local/tsp/bin/tspc.conf) and an executable (/usr/local/tsp/bin/tspc).

In short, the page told me to modify /usr/local/tspc/bin/tspc.conf, and specifically change the following lines to the right values:

          username=xxxxx
passwd=yyyyy
client_v4=<your gateway's public IPv4 address>

Both the username and password can be received from freenet6.net by filling a form there; you can also achieve anonymous logins by default.


Step 5: Getting TSPC Up

I then ran:

          /usr/local/tsp/bin/tspc -vf /usr/local/tsp/bin/tspc.conf

and got the output:

          tspc - Tunnel Server Protocol Client
Loading configuration file

Connecting to server

Send request

Process response from server

TSP_HOST_TYPE host
TSP_TUNNEL_INTERFACE sit1
TSP_HOME_INTERFACE
TSP_CLIENT_ADDRESS_IPV4 200.1.100.2
TSP_CLIENT_ADDRESS_IPV6 3ffe:abcd:0001:dcba:0000:0000:0000:0002
TSP_SERVER_ADDRESS_IPV4 206.123.31.114
TSP_SERVER_ADDRESS_IPV6 3ffe:abcd:0001:dcba:0000:0000:0000:0001
TSP_TUNNEL_PREFIXLEN 128
TSP_VERBOSE 1
TSP_HOME_DIR /usr/local/tsp
--- Start of configuration script. ---
Script: linux.sh
sit1 setup
Setting up link to 206.123.31.114
This host is: 3ffe:abcd:0001:dcba:0000:0000:0000:0002/128
Adding default route
--- End of configuration script. ---
Closing, exit status: 0
Exiting with return code : 0 (0 = no error)

which you should too, if everything goes well.


Step 6: A Little Fine-Tuning

Note that the command:

          ifconfig

suddenly showed a THIRD device: sit1 (the IPv4 tunnel for the locally generated and locally bound IPv6 packets). The rest of the steps are very easy. Here is the general idea:

          eth0 has the v6 address fe80::200:21ff:feaa:bbcc
sit1 is the tunnel connecting you to the glorious v6 Internet. The tunnel has the (permanently static! globally accessible! free!) address
3ffe:abcd:0001:dcba:0000:0000:0000:0002

Now all that is left is to route all outgoing packets from lo/eth0 to sit1, and all incoming packets from sit1 to lo/eth0. I used the tool ip6tables (a v6 version of iptables) to do this.

This was done with the commands:

          sudo ip6tables -I OUTPUT -s fe80::200:21ff:feaa:bbcc -d 3ffe:abcd:1:dcba::2
sudo ip6tables -t filter -I INPUT -d fe80::200:21ff:feaa:bbcc -s 3ffe:abcd:1:dcba::2

for outgoing and incoming packets respectively.


Step 7: A Little Testing

Let's test it out!

  • I ping6 www.kame.net.
  • I access www.kame.net with an IPv6-enabled web browser. A dancing turtle is visible - IPv6 communication has occurred!

... and that's it!


Notes

A simple sequel for dialup users. I don't know if you are assigned globally static IP addresses during the course of you dialing up. If so, things become much simpler - no ip6tables is involved.... I think. If not, you just have to find your gateway's IP address out, and use your local IP as the equivalent of 172.16.10.20, and do the whole process above. By my reckoning, it should work.

Try it out, and correct me if I am wrong.

MSBang Text Editor

posted Apr 14, 2009 6:54 PM by Manu Bhardwaj   [ updated Apr 14, 2009 6:56 PM ]

30th December 2002: Console Text Editor for the *nix Platfom

As the fifth semester project for our System Software Laboratory in the Computer Science and Engineering course at PESIT, we designed a GNU/Linux-based screen text editor called MSBang, the first of the many VTU projects we have had to complete. The name is a twist of the creators' names, Manu S Bhardwaj and Amit N Gandhi.

Some of its main features are:
  • Macro operations that start recording, stop recording, save and load oft-repeated editing patterns
  • Multi-threaded search capabilities with choice of thread scheduling priorities
  • Syntax highlighting systems with an easy facility for the creation of user-defined highlighting rules
  • Extensive documentation that accompanies the program
  • AutoSave and complete recovery of files in case MSBang crashes due to unforseen circumstances
All versions have been published implementing the GNU General Public License. IDEseq requires SEQUEL, a circuit simulation package, available here . It also requires the g77 compiler for Fortran to be installed.

LaTeX: Document Preparation in Linux

posted Apr 14, 2009 6:49 PM by Manu Bhardwaj   [ updated Apr 14, 2009 6:53 PM ]

5th December 2002: Presentation on LaTeX at Linux Bangalore/2002

Hareesh Nagarajan and I presented a talk on LaTeX , a WYSIWYW system for very easy creation of presentation documents and PDFs. This talk was given at Linux Bangalore/2002, the primary Linux conference organized by the Bangalore Linux Users' Group. I was also a volunteer at that event.

Take a look at:

IPv6 Presentation

posted Apr 14, 2009 6:48 PM by Manu Bhardwaj   [ updated Apr 14, 2009 6:53 PM ]

8th August 2002: An Introduction to IPv6

I made a presentation titled An Introduction to IPv6 at the July/August 2002 meet of the former Bangalore Linux Users' Group.  The presentation contains short yet structured information about IPv4 and it's improvements over IPv4, and serves as a very good self-contained introduction to IPv6.

Anaconda

posted Apr 14, 2009 6:45 PM by Manu Bhardwaj   [ updated Apr 14, 2009 6:47 PM ]

February 2000: A 'Snake' game cloned using the Turbo C++ graphics library

This program was written as a mini-project for my Standard Twelve CBSE course in Computer Science. The requirement was a simple C++ program of our choice that showed our programming skills. Hari Balaji S and me created this snake program (now made so popular by the Nokia GSM handsets available in India) as the project. I personally was very happy with the results, and consider this among the best pieces of code I have written in my short, almost non-existent programming career.

‹ Prev    1-8 of 8    Next ›