Indian Passport Renewal Application Procedure in USA (United States of America)

Indian passports are generally issued for 10 years duration, and are bound to expire eventually. If you are staying in USA and your Indian passport is going to expire within 6 months, you need to apply for passport renewal as soon as possible. In this article, I will outline the documents required to submit your application to Indian Embassy in USA.

  1. Fill the on-line application form at https://passport.gov.in/nri/OnlineRegistration.jsp?pocode=USAW and take its printout after you are done with filling application. The printed copy should be signed by the applicant.
  2. Write your contact telephone number as well as e-mail address on the front page (in some blank space) of the printed application. Your telephone number/e-mail address are required in case there is any need to contact you.
  3. 3 recent passport size photographs (3.5 cm x 3.5 cm -front facial pose) with white or a light coloured background. Note that Indian passport photo requirements are different than USA passport size (2 inch x 2 inch or approximately 5 cm x 5cm), so please do not submit US Passport size photographs.
  4. You must your old passport in original, and a photocopy of the first 5 and last 2 pages of your original old passport. If your old passport had any additional booklet, you need to send that original booklet too.
  5. I think you need not submit your I-94. Even if you want, you can submit a photocopy, but should not required.
  6. The applicant is required to submit the documents of his/her active status in USA. These documents includes USA visa photocopy, H1-B approval notice copy, Employment Authorization Card (EAD) copy, I-20 copy if student, or documents related to your Green Card application if application is in processing. All these documents should be notarized.
  7. A photocopy of proof of applicant’s residential address, which may include current Driving License, Utility bill such as Gas, Electric or Water or Rental Lease agreement or Home Mortgage bill showing the residential address.
  8. A non-refundable fee of US$40.00 for normal booklet (36 pages) or US$50.00 for Jumbo booklet (60 pages) has to be paid in cash (only at the counter) or by Certified cheque or Money Order payable to Embassy of India, Washington DC. Please note that personal checks are not accepted. If applying through mail include a separate Certified cheque or Money Order of US$20.00. Please note that the fee once paid is not refunded on account of refusal of service or delay in service. Please insist on a receipt for any money paid at the counter.
  9. If your passport does not include your spouse’s name and you want it to be included, then a notarized copy of marriage certificate must be submitted along with the application.
  10. If your passport expired more than a year ago then a notarized affidavit (http://www.indianembassy.org/download_file.php?action=download&mainfolder=form_files/&filename=Form_Pdf_35.pdf) is required. The applicant will be informed if an interview is required.
  11. If your appearance has changed significantly, a notarized copy of this form (http://www.indianembassy.org/download_file.php?action=download&mainfolder=form_files/&filename=Form_Pdf_34.pdf) with your recent photograph is also required.

Mailing Address or In Person Submission:

Embassy of India,
Consular Wing,
2536, Massachusetts Avenue, NW,
Washington DC 20008

Contact Number for Enquiries: 1-202-939-9888

Posted in VISA | Tagged | 1 Comment

USA (United States of America) VISA Correction Procedure

Every year, a large number of people apply for United States of America (USA) visas. USA visa application procedure is a tedious process, and if you find an error after you receive your passport with visa stamped, that seems like the end of world. Fortunately, you can get your visa corrected and you need to submit an application that you should do as soon as possible. In this article, I will focus on the procedure to submit a request application for visa correction. This article is written as per my experience in India, but I think that it should be applicable in other countries too (may be with slight modifications or may not be). You need to submit following documents:

  1. A nice request application stating the visa error, and why you want it to be corrected as soon as possible because of your impending travel plans.
  2. DS-160 application printout if you had stored in your local computer while filling the DS-160 application.
  3. DS-160 application confirmation letter with CEAC bar code, that you submitted when applying for visa interview.
  4. VFS Interview Letter.
  5. Documents showing your impending travel plans like itinerary.
  6. Fees (yes you need to submit a fees to get your visa corrected). At the time of writing, the fees was around Rs. 360 (In Indian currency).

You need to submit the above application at one of VFS centres. For example, one in New Delhi, India is located at:

VFS application center
International Trade Tower,
S-2 Level,
Opposite Satyam Cinema Place
Nehru Place,
New Delhi - 110019.

Note: You can try to submit this visa correction application at US consulate too, but it may not be always possible and they might ask to you to go to VFS and submit there.

Posted in VISA | Tagged | 2 Comments

B2 VISA (Visitor Visa) Documents Required During Interview at USA (United States of America) Embassy or Consulate

It is common for people to visit their relatives (sons/daughters, siblings etc.) and friends who are staying in United States of America (USA). USA offers a non-immigrant visa category, called B2 or visitor visa, for these kinds of personal visits. According to this visa category rules, an applicant who obtains B2 visa, can stay in USA for maximum of 6 months unless otherwise medically necessary. Like any non-immigrant visa category, B2 visa also requires an in-person interview at one of the US consulates in India. For the interview, the applicant needs to present a bunch of documents to support his/her visa application. In this article, I will focus on what documents the applicant needs to carry during B2 visa interview.

Mandatory documents:

  1. Applicant’s current valid passport (original and photocopy).
  2. Applicant’s previous passport(s) if applicable (original and photocopy).
  3. Applicant’s passport size (2 inch x 2 inch) recent photograph as specified here.
  4. DS-160 application confirmation letter with CEAC bar code: with the introduction of DS-160, one needs not carry the printout of complete application, only the confirmation letter is enough (printout).
  5. HDFC visa application fee receipts (original).
  6. VFS Interview appointment letter (printout.

Applicant’s assets documents (not mandatory, but important): The purpose of these documents is to prove that the applicant has enough assets in his/her home country. In other words, the applicant has significant ties in his/her home country and is not possible for him/her to stay permanently in USA.

  1. If the applicant owns a house, then the registry and evaluation papers of the house. This might act as a very important document since it shows that the applicant has immovable assets in his/her home country (original and photocopy).
  2. If the applicant owns a company or business or any active work, then the documents showing ownership and active company/work status (original and photocopy).
  3. If the applicant is retired and is getting pension, then the documents showing his/her pension related stuff (original and photocopy).
  4. Evaluation papers and documents of any other assets the applicant might have (original and photocopy).
  5. If the applicant has a vehicle (specifically a four vehicle like car), then vehicle documents. This is not really needed but might be just kept, as your never know (original and photocopy).
  6. Applicant’s professional business cards (original).

Applicant’s financial documents (or assets): If the applicant is self-sponsoring his/her trip to USA then the following financial documents might be helpful. Even if the applicant is not self-sponsoring, and being sponsored by the person you are visiting, it is good to have the following financial documents to show them as financial assets.

  1. Applicant’s bank statements, fixed deposits, and passbooks (original and photocopy).
  2. Applicant’s income tax return documents, specifically last three years of income tax returns (original and photocopy).

Documents provided by the applicant’s sponsor (the person the applicant is visiting):

  1. The sponsor’s affidavit of support documents: I-134 form (an original filled form).
  2. The sponsor’s bank statements (photocopy).
  3. The sponsor’s tax returns (photocopy).
  4. The sponsor’s recent pay stubs if employed (photocopy).
  5. The sponsor’s passport’s photocopy (photocopy).
  6. The sponsor’s active status in USA: for example, if the person is employed on H1-B visa then the employment letter, and a photocopy of his/her current H1-B approval notice. If the sponsor’s is studying then a photocopy of current I-20 (photocopy).
  7. One request letter to US embassy (original).
  8. One invitation letter to the applicant (original).

Note: In general, it is good to have at least 2 photocopies of each original document you are carrying with you. One set of photocopies you can carry with you, and another set of photocopies you can leave at home to have backup in case something is lost.

Posted in VISA | Tagged | 5 Comments

Resizing a Virtual (or Guest) Machine on Linux-based Fedora Distribution

Fedora operating system includes several tools for managing KVM, QEMU, and Xen based virtual machines (VMs), also called guest machines/systems. In this article, I will discuss one such tool called “virt-resize” that can be used to resize (expand or shrink) an already existing virtual machine (VM). The need for resizing a VM can arise due to several reasons, but I am not going to discuss them. Also there are several methods to resize a VM, however I found “virt-resize” command really easy to use. Specifically, I am going to discuss how to increase disk size of an existing VM using “virt-resize”. My system has up-to-date Fedora 14 as host machine and RHEL6 (kvm-based) as a guest machine. RHEL6 guest machine has disk image of 6GB that I want to increase to 8GB. Although the instructions provided in this article are tested on the previously stated setup, they should work with other guest operating systems (OS) too as far as the host machine uses the tools described here. Before going further, please make sure, you have “virt-resize” installed on your host machine. “virt-resize” is part of libguestfs-tools package that can be installed on Fedora using yum command (just for note, yum is packager manager on Fedora distribution) as follows (Note: you need to be root user to run all the commands described in this article or should have sudo permissions):

$yum install libguestfs-tools

Now locate the disk image of your VM on your system. Most likely, the VM’s disk image should be in the directory /var/lib/libvirt/images on Fedora-based host machine. I use “virt-manager” GUI (this can be installed by using “sudo yum install virt-manager” if not already installed) for managing my virtual machines. The name of my RHEL6 VM as viewed using virt-manager is “rhel6”, and the name of the its disk image is “rhel6.img” (Really there is no correlation between the VM’s name and its disk image’s name. Both can be different). So the disk image file “rhel6.img” exists in /var/lib/libvirt/images. Please make sure you choose the right image file. Please make sure that your VM is turned off, as virt-resize can only do offline resizing at the moment, and now run the following command on the host machine:

$sudo virt-filesystems –long -h –all -a rhel6.img
Name Type VFS Label Size Parent
/dev/sda1 filesystem ext4 – 500M –
/dev/vg_rhel6/lv_root filesystem ext4 – 3.5G –
/dev/vg_rhel6/lv_swap filesystem swap – 2.0G –
/dev/vg_rhel6/lv_root lv – – 3.5G /dev/vg_rhel6
/dev/vg_rhel6/lv_swap lv – – 2.0G /dev/vg_rhel6
/dev/vg_rhel6 vg – – 5.5G –
/dev/sda2 pv – – 5.5G –
/dev/sda1 partition – – 500M /dev/sda
/dev/sda2 partition – – 5.5G /dev/sda
/dev/sda device – – 6.0G –

The command “virt-filesystems” provides file system information of VMs. The important things to note in the output are that /dev/sda2 is the main partition, and /dev/sda1 is the boot partition. /dev/sda2 is further configured as 2 logical volumes that are “/dev/vg_rhel6/lv_root” and “/dev/vg_rhel6/lv_swap”. /dev/vg_rhel6/lv_root is the root partition and is of size 3.5 GB, whereas /dev/vg_rhel6/lv_swap is the swap partition. The boot partition (/dev/sda1) and the root partition (/dev/vg_rhel6/lv_root) are of ext4 type file systems. Here, our main goal is to increase the size of the root partition. Just to note, that my rhel6 VM was installed using virt-manager, and I selected default options (like partitions types and their size) during the installation. Another point to note is that “virt-resize” does not do in-place resizing, and one needs to create a new disk image of 8GB as follows:

$cd /var/lib/libvirt/images
$truncate -s 8G rhel6-new.img

“truncate” command creates a new file of size 8GB. This command is part of coreutils package on Fedora system, and must exist on your system. Next command is the virt-resize command that will help us achieve our main goal as follows:

$virt-resize –expand /dev/sda2 rhel6.img rhel6-new.img –LV-expand /dev/vg_rhel6/lv_root
Summary of changes:
/dev/sda1: partition will be left alone
/dev/sda2: partition will be resized from 5.5G to 7.5G
/dev/sda2: content will be expanded using the ‘pvresize’ method
/dev/vg_rhel6/lv_root: LV will be expanded to maximum size
/dev/vg_rhel6/lv_root: content will be expanded using the ‘resize2fs’ method
Copying /dev/sda1 …
[############################################################################]
Copying /dev/sda2 …
[############################################################################]
Expanding /dev/sda2 using the ‘pvresize’ method
Expanding /dev/vg_rhel6/lv_root using the ‘resize2fs’ method

The virt-resize command specifically tells that the /dev/sda2 should be expanded to the extra new space, and then the logical volume /dev/vg_rhel6/lv_root should be expanded. Since we do not want to change the size of /dev/sda1 and /dev/vg_rhel6/lv_swap, they remain same and are just copied to the new disk image as shown in the output. The new image “rhel6-new.img” now is a clone of the rhel6.img with size extended to 8GB. The output also shows some of the underlying commands (pvresize and resize2fs) used by virt-resize. In essence, the virt-resize command just automates the process of resizing the virtual machines, and makes it easier for users. Now if you run the following command again:

$virt-filesystems –long -h –all -a rhel6-new.img
Name Type VFS Label Size Parent
/dev/sda1 filesystem ext4 – 500M –
/dev/vg_rhel6/lv_root filesystem ext4 – 5.5G –
/dev/vg_rhel6/lv_swap filesystem swap – 2.0G –
/dev/vg_rhel6/lv_root lv – – 5.5G /dev/vg_rhel6
/dev/vg_rhel6/lv_swap lv – – 2.0G /dev/vg_rhel6
/dev/vg_rhel6 vg – – 7.5G –
/dev/sda2 pv – – 7.5G –
/dev/sda1 partition – – 500M /dev/sda
/dev/sda2 partition – – 7.5G /dev/sda
/dev/sda device – – 8.0G –

You can see the expanded size of /dev/sda, /dev/sda2, /dev/vg_rhel6, and /dev/vg_rhel6/lv_root by 2GB, as we aimed to increased the size of VM to 8GB from 6GB. This new disk image “rhel6-new.img” can be managed and started by importing using “virt-manager”, or can be given a new guest name and started using “virsh” command. Please see their man pages for details. One thing to note is that the above process creates a new image file “rhel6-new.img” (please make sure that this new image is also in the directory /var/lib/libvirt/images), and the old image file “rhel6.img” still exists in the same location /var/lib/libvirt/images. For caution, please boot the new VM (rhel6-new.img) and make sure everything is fine with the new image before deleting the old image.

Useful links:
http://libguestfs.org/virt-resize.1.html
http://libguestfs.org/virt-filesystems.1.html
http://virt-manager.et.redhat.com
http://www.linux-kvm.org
http://wiki.qemu.org

Posted in Technology | Tagged | 1 Comment

Software Source Code Browsing Using Doxygen

Frequently, software developers need to walk through software source codes, they are working on, for various reasons, such as for understanding the code flow or for debugging a particular problem. There are several tools available for this purpose though. However, I will describe here how to use a similar tool, called Doxygen, which can be used to create documentation from the source codes. The source code documentation can be created in the form of html files, and these html files can then be later used for source code browsing. One of the main advantages of Doxygen documentation is that the functional call references can be viewed in the form of graphs, which make code walk through very easy to understand. According to the Doxygen manual, it can be used to create documentation for several languages, such as C, C++, JAVA and many other languages. However, I have only used with C language code as this is the language I mostly use for my work. However, it does not make any difference as the instructions are same for creating documentation for all supported language. The first thing for creating Doxygen documentation is to create a configuration file with the extension “.cfg”. I have provided a sample configuration file below, and I have always used this configuration file for all of my projects. The instruction (provided below) of using Doxygen is also based on this configuration file. I have verified these instruction on Fedora 13 Linux distribution using Doxygen-1.7.1.

1. Before using the provided configuration file, first verify that your system has “doxygen”, “dot” and “perl” commands installed. Depending upon your configuration, you may not need “dot” program, but the sample configuration file below creates graphs, and “dot” command is required for creating graphs.

2. Now assume that the source code, you are working on, is available in the “myproject” directory, “cd” to this directory.

$cd /path/to/myproject

3. Copy the sample file provided below as “doxygen-configuration.cfg” in the “myproject” directory. You can give any name for this configuration file as far as the extension is “.cfg”.

4. Run Doxygen with the configuration file as follows:

$doxygen doxygen-configuration.cfg

After this, it may take a few minutes to complete the documentation creation depending upon your system speed. Once this process is complete, the documentation is in the directory “myproject-doxygen/html/” directory inside your “myproject”. You can always change this as you want to in your configuration file by changing “OUTPUT_DIRECTORY” parameter. Generally the naming format of created html files is as follows:

4a. If the name of a source code file is “xy.c”, then its created documentation will be “xy_8c.html”, and its source code will be “xy_8c_source.html”. Same is true for the header files (*.h).
4b. If the name of a source code file is “xy_wz.c”, then its created documentation will be “xy__wz_8c.html” (note double underscores “__”), and its source code will be “xy__wz_8c_source.html”. Same is true for the header files (*.h).

In addition to these files, Doxygen creates several other files too. The size of the complete documentation may be very large, sometimes in 100s of megabytes (Mbs), and even in gigabytes (Gbs) depending upon your configuration parameters.

5. You can start browsing the html documentation files in your favorite web browser. For a starting point for browsing the source code, assume that the “main()” function is in file “xy.c”, then you can open “/path/to/myproject/myproject-doxygen/html/xy_8c.html” in your web browser.

Customization of the Doxygen configuration file:
It is possible that you may not like the name of the Doxygen documentation directory “myproject-doxygen” as in the sample file above, and you want to give some other name to it, and also you want to store in some other location. Similarly, depending upon your project requirement, you may also want to change some or all of the configuration parameters according to your needs. I am only going to describe some of the configuration parameters here, you can follow the link http://www.stack.nl/~dimitri/doxygen/configuration.html to go through the complete description of each parameters. It is also possible that some of these parameters may get obsoleted in future. While running doxygen (as in step 4 above), it will output warnings about the obsoleted parameters and then you can modify the configuration file accordingly. Some of the Doxygen’s configuration parameters work in group, and if you modify one parameter, it may affect all other parameters in the group, so be careful about it.

1. GENERATE_HTML:  If you want to generate html files or not and I set it to YES.
2. GENERATE_LATEX: If you want to generate the documentation output in the latex file format. Latex files can be converted to pdf files. I did not want this so I set it to NO.
3. HTML_FILE_EXTENSION: I assume that this parameter is self-explanatory and allows to set the extension of html files. I set it to “.html”.
4. INCLUDE_GRAPH: If you want to generate the call graphs, I set it to YES.
5. The following parameters are language specific. As I am only using C, so I just set it for C, you can set it according to your language.
OPTIMIZE_FOR_FORTRAN   = NO
OPTIMIZE_OUTPUT_FOR_C  = YES
OPTIMIZE_OUTPUT_JAVA   = NO
OPTIMIZE_OUTPUT_VHDL   = NO

6. OUTPUT_DIRECTORY: where you want to store the Doxygen documentation.
7. OUTPUT_LANGUAGE: By default, it is English, but you can set it to the other supported language as per your requirements.
8. PROJECT_NAME: Name of the project, you are working on.
9. PROJECT_NUMBER: Version of the project, you are are working on.
10. SOURCE_BROWSER: If you want the Doxygen to create source code files in html format or not (*.source.html, as explained above in step 4).

Important Links:
http://www.stack.nl/~dimitri/doxygen/ : Main Doxygen website
http://www.stack.nl/~dimitri/doxygen/configuration.html : Here, you can find explanation to each of the configurations parameters, and can customize accordingly.

—–doxygen-configuration.cfg—————
ABBREVIATE_BRIEF       =
ALIASES                =
ALLEXTERNALS           = NO
ALPHABETICAL_INDEX     = YES
ALWAYS_DETAILED_SEC    = YES
BINARY_TOC             = NO
BRIEF_MEMBER_DESC      = YES
BUILTIN_STL_SUPPORT    = NO
CALLER_GRAPH           = YES
CALL_GRAPH             = YES
CASE_SENSE_NAMES       = YES
CHM_FILE               =
CHM_INDEX_ENCODING     =
CLASS_DIAGRAMS         = YES
CLASS_GRAPH            = YES
COLLABORATION_GRAPH    = YES
COLS_IN_ALPHA_INDEX    = 5
COMPACT_LATEX          = NO
COMPACT_RTF            = NO
CPP_CLI_SUPPORT        = NO
CREATE_SUBDIRS         = NO
DIRECTORY_GRAPH        = YES
DISABLE_INDEX          = NO
DISTRIBUTE_GROUP_DOC   = NO
DOCSET_BUNDLE_ID       = org.doxygen.Project
DOCSET_FEEDNAME        = “Doxygen generated docs”
DOT_CLEANUP            = YES
DOTFILE_DIRS           =
DOT_FONTNAME           = FreeSans
DOT_FONTPATH           =
DOT_FONTSIZE           = 10
DOT_GRAPH_MAX_NODES    = 50
DOT_IMAGE_FORMAT       = png
DOT_MULTI_TARGETS      = YES
DOT_PATH               =
DOT_TRANSPARENT        = NO
DOXYFILE_ENCODING      = UTF-8
ENABLED_SECTIONS       =
ENABLE_PREPROCESSING   = YES
ENUM_VALUES_PER_LINE   = 4
EXAMPLE_PATH           =
EXAMPLE_PATTERNS       =
EXAMPLE_RECURSIVE      = NO
EXCLUDE                =
EXCLUDE_PATTERNS       =
EXCLUDE_SYMBOLS        =
EXCLUDE_SYMLINKS       = NO
EXPAND_AS_DEFINED      =
EXPAND_ONLY_PREDEF     = NO
EXTERNAL_GROUPS        = YES
EXTRACT_ALL            = YES
EXTRACT_ANON_NSPACES   = NO
EXTRACT_LOCAL_CLASSES  = YES
EXTRACT_LOCAL_METHODS  = NO
EXTRACT_PRIVATE        = YES
EXTRACT_STATIC         = YES
EXTRA_PACKAGES         =
FILE_PATTERNS          =
FILE_VERSION_FILTER    =
FILTER_PATTERNS        =
FILTER_SOURCE_FILES    = NO
FORMULA_FONTSIZE       = 10
FULL_PATH_NAMES        = YES
GENERATE_AUTOGEN_DEF   = NO
GENERATE_BUGLIST       = YES
GENERATE_CHI           = NO
GENERATE_DOCSET        = NO
GENERATE_HTMLHELP      = NO
GENERATE_HTML          = YES
GENERATE_LATEX         = NO
GENERATE_LEGEND        = YES
GENERATE_MAN           = NO
GENERATE_PERLMOD       = NO
GENERATE_QHP           = NO
GENERATE_RTF           = NO
GENERATE_TAGFILE       =
GENERATE_TESTLIST      = YES
GENERATE_TODOLIST      = YES
GENERATE_TREEVIEW      = ALL
GENERATE_XML           = NO
GRAPHICAL_HIERARCHY    = YES
GROUP_GRAPHS           = YES
HAVE_DOT               = YES
HHC_LOCATION           =
HIDE_FRIEND_COMPOUNDS  = NO
HIDE_IN_BODY_DOCS      = NO
HIDE_SCOPE_NAMES       = NO
HIDE_UNDOC_CLASSES     = NO
HIDE_UNDOC_MEMBERS     = NO
HIDE_UNDOC_RELATIONS   = NO
HTML_ALIGN_MEMBERS     = YES
HTML_DYNAMIC_SECTIONS  = YES
HTML_FILE_EXTENSION    = .html
HTML_FOOTER            =
HTML_HEADER            =
HTML_OUTPUT            = html
HTML_STYLESHEET        =
IDL_PROPERTY_SUPPORT   = YES
IGNORE_PREFIX          =
IMAGE_PATH             =
INCLUDED_BY_GRAPH      = YES
INCLUDE_FILE_PATTERNS  =
INCLUDE_GRAPH          = YES
INCLUDE_PATH           =
INHERIT_DOCS           = YES
INLINE_INFO            = YES
INLINE_INHERITED_MEMB  = NO
INLINE_SOURCES         = YES
INPUT                  =
INPUT_ENCODING         = UTF-8
INPUT_FILTER           =
INTERNAL_DOCS          = NO
JAVADOC_AUTOBRIEF      = NO
LATEX_BATCHMODE        = NO
LATEX_CMD_NAME         = latex
LATEX_HEADER           =
LATEX_HIDE_INDICES     = NO
LATEX_OUTPUT           = latex
LAYOUT_FILE            =
MACRO_EXPANSION        = YES
MAKEINDEX_CMD_NAME     = makeindex
MAN_EXTENSION          = .3 .5 .8
MAN_LINKS              = YES
MAN_OUTPUT             = man
MAX_DOT_GRAPH_DEPTH    = 0
MAX_INITIALIZER_LINES  = 30
MSCGEN_PATH            =
MULTILINE_CPP_IS_BRIEF = NO
OPTIMIZE_FOR_FORTRAN   = NO
OPTIMIZE_OUTPUT_FOR_C  = YES
OPTIMIZE_OUTPUT_JAVA   = NO
OPTIMIZE_OUTPUT_VHDL   = NO
OUTPUT_DIRECTORY       = myproject-doxygen
OUTPUT_LANGUAGE        = English
PAPER_TYPE             = a4wide
PDF_HYPERLINKS         = YES
PERLMOD_LATEX          = NO
PERLMOD_MAKEVAR_PREFIX =
PERLMOD_PRETTY         = YES
PERL_PATH              = /usr/bin/perl
PREDEFINED             =
PROJECT_NAME           = myproject
PROJECT_NUMBER         =
QCH_FILE               =
QHG_LOCATION           =
QHP_NAMESPACE          = org.doxygen.Project
QHP_VIRTUAL_FOLDER     = doc
QT_AUTOBRIEF           = NO
QUIET                  = NO
RECURSIVE              = YES
REFERENCED_BY_RELATION = YES
REFERENCES_LINK_SOURCE = YES
REFERENCES_RELATION    = YES
REPEAT_BRIEF           = YES
RTF_EXTENSIONS_FILE    =
RTF_HYPERLINKS         = NO
RTF_OUTPUT             = rtf
RTF_STYLESHEET_FILE    =
SEARCHENGINE           = YES
SEARCH_INCLUDES        = YES
SEPARATE_MEMBER_PAGES  = NO
SHORT_NAMES            = NO
SHOW_DIRECTORIES       = YES
SHOW_FILES             = YES
SHOW_INCLUDE_FILES     = YES
SHOW_NAMESPACES        = YES
SHOW_USED_FILES        = YES
SIP_SUPPORT            = NO
SKIP_FUNCTION_MACROS   = YES
SORT_BRIEF_DOCS        = NO
SORT_BY_SCOPE_NAME     = NO
SORT_GROUP_NAMES       = NO
SORT_MEMBER_DOCS       = NO
SOURCE_BROWSER         = YES
STRIP_CODE_COMMENTS    = YES
STRIP_FROM_INC_PATH    =
STRIP_FROM_PATH        =
SUBGROUPING            = YES
SYMBOL_CACHE_SIZE      = 0
TAB_SIZE               = 8
TAGFILES               =
TEMPLATE_RELATIONS     = YES
TOC_EXPAND             = NO
TREEVIEW_WIDTH         = 250
TYPEDEF_HIDES_STRUCT   = NO
UML_LOOK               = NO
USE_HTAGS              = NO
USE_PDFLATEX           = NO
VERBATIM_HEADERS       = YES
WARN_FORMAT            = “$file:$line: $text”
WARN_IF_DOC_ERROR      = YES
WARN_IF_UNDOCUMENTED   = YES
WARNINGS               = YES
WARN_LOGFILE           =
WARN_NO_PARAMDOC       = NO
XML_DTD                =
XML_OUTPUT             = xml
XML_PROGRAMLISTING     = YES
XML_SCHEMA             =
—–doxygen-configuration.cfg—————

Frequently, software developers need to walk through software source codes, they are working on, for various reasons, such as for understanding the code flow or for debugging a particular problem. There are several tools available for this purpose though. However, I will describe here how to use a similar tool, called Doxygen, which can be used to create documentation from the source codes. The source code documentation can be created in the form of html files, and these html files can then be later used for source code browsing. One of the main advantages of Doxygen documentation is that the functional call references can be viewed in the form of graphs, which make code walk through very easy to understand. According to the Doxygen manual, it can be used to create documentation for several languages, such as C, C++, JAVA and many other languages. However, I have only used with C language code as this is the language I mostly use for my work. However, it does not make any difference as the instructions are same for creating documentation for all supported language. The first thing for creating Doxygen documentation is to create a configuration file with the extension “.cfg”. I have provided a sample configuration file below, and I have always used this configuration file for all of my projects. The instruction (provided below) of using Doxygen is also based on this configuration file. I have verified these instruction on Fedora 13 Linux distribution using Doxygen-1.7.1.

1.Before using the provided configuration file, first verify that your system has “doxygen”, “dot” and “perl” commands installed. Depending upon your configuration, you may not need “dot” program, but the sample configuration file below creates graphs, and “dot” command is required for creating graphs.

2.Now assume that the source code, you are working on, is available in the “myproject” directory, “cd” to this directory.

$cd /path/to/myproject

3.Copy the sample file provided below as “doxygen-configuration.cfg” in the “myproject” directory. You can give any name for this configuration file as far as the extension is “.cfg”.

4.Run Doxygen with the configuration file as follows:

$doxygen doxygen-configuration.cfg

After this, it may take a few minutes to complete the documentation creation depending upon your system speed. Once this process is complete, the documentation will be created in the directory “myproject-doxygen/html/” directory inside your “myproject”. You can always change this as you want to in your configuration file by changing “OUTPUT_DIRECTORY” parameter. Generally the naming format of created html files is as follows:

4a) If the name of a source code file is “xy.c”, then its created documentation will be “xy_8c.html”, and its source code will be “xy_8c_source.html”. Same is true for the header files (*.h).
4b) If the name of a source code file is “xy_wz.c”, then its created documentation will be “xy__wz_8c.html” (note double underscores “__”), and its source code will be “xy__wz_8c_source.html”. Same is true for the header files (*.h).

In addition to these files, Doxygen creates several other files too. The size of the complete documentation may be very large, sometimes in 100s of megabytes (Mbs), and even in gigabytes (Gbs) depending upon your configuration parameters.

5. You can start browsing the html documentation files in your favorite web browser. For a starting point for browsing the source code, assume that the “main()” function is in file “xy.c”, then you can open “/path/to/myproject/myproject-doxygen/html/xy_8c.html” in your web browser.

—–doxygen-configuration.cfg—————
ABBREVIATE_BRIEF       =
ALIASES                =
ALLEXTERNALS           = NO
ALPHABETICAL_INDEX     = YES
ALWAYS_DETAILED_SEC    = YES
BINARY_TOC             = NO
BRIEF_MEMBER_DESC      = YES
BUILTIN_STL_SUPPORT    = NO
CALLER_GRAPH           = YES
CALL_GRAPH             = YES
CASE_SENSE_NAMES       = YES
CHM_FILE               =
CHM_INDEX_ENCODING     =
CLASS_DIAGRAMS         = YES
CLASS_GRAPH            = YES
COLLABORATION_GRAPH    = YES
COLS_IN_ALPHA_INDEX    = 5
COMPACT_LATEX          = NO
COMPACT_RTF            = NO
CPP_CLI_SUPPORT        = NO
CREATE_SUBDIRS         = NO
DIRECTORY_GRAPH        = YES
DISABLE_INDEX          = NO
DISTRIBUTE_GROUP_DOC   = NO
DOCSET_BUNDLE_ID       = org.doxygen.Project
DOCSET_FEEDNAME        = “Doxygen generated docs”
DOT_CLEANUP            = YES
DOTFILE_DIRS           =
DOT_FONTNAME           = FreeSans
DOT_FONTPATH           =
DOT_FONTSIZE           = 10
DOT_GRAPH_MAX_NODES    = 50
DOT_IMAGE_FORMAT       = png
DOT_MULTI_TARGETS      = YES
DOT_PATH               =
DOT_TRANSPARENT        = NO
DOXYFILE_ENCODING      = UTF-8
ENABLED_SECTIONS       =
ENABLE_PREPROCESSING   = YES
ENUM_VALUES_PER_LINE   = 4
EXAMPLE_PATH           =
EXAMPLE_PATTERNS       =
EXAMPLE_RECURSIVE      = NO
EXCLUDE                =
EXCLUDE_PATTERNS       =
EXCLUDE_SYMBOLS        =
EXCLUDE_SYMLINKS       = NO
EXPAND_AS_DEFINED      =
EXPAND_ONLY_PREDEF     = NO
EXTERNAL_GROUPS        = YES
EXTRACT_ALL            = YES
EXTRACT_ANON_NSPACES   = NO
EXTRACT_LOCAL_CLASSES  = YES
EXTRACT_LOCAL_METHODS  = NO
EXTRACT_PRIVATE        = YES
EXTRACT_STATIC         = YES
EXTRA_PACKAGES         =
FILE_PATTERNS          =
FILE_VERSION_FILTER    =
FILTER_PATTERNS        =
FILTER_SOURCE_FILES    = NO
FORMULA_FONTSIZE       = 10
FULL_PATH_NAMES        = YES
GENERATE_AUTOGEN_DEF   = NO
GENERATE_BUGLIST       = YES
GENERATE_CHI           = NO
GENERATE_DOCSET        = NO
GENERATE_HTMLHELP      = NO
GENERATE_HTML          = YES
GENERATE_LATEX         = NO
GENERATE_LEGEND        = YES
GENERATE_MAN           = NO
GENERATE_PERLMOD       = NO
GENERATE_QHP           = NO
GENERATE_RTF           = NO
GENERATE_TAGFILE       =
GENERATE_TESTLIST      = YES
GENERATE_TODOLIST      = YES
GENERATE_TREEVIEW      = ALL
GENERATE_XML           = NO
GRAPHICAL_HIERARCHY    = YES
GROUP_GRAPHS           = YES
HAVE_DOT               = YES
HHC_LOCATION           =
HIDE_FRIEND_COMPOUNDS  = NO
HIDE_IN_BODY_DOCS      = NO
HIDE_SCOPE_NAMES       = NO
HIDE_UNDOC_CLASSES     = NO
HIDE_UNDOC_MEMBERS     = NO
HIDE_UNDOC_RELATIONS   = NO
HTML_ALIGN_MEMBERS     = YES
HTML_DYNAMIC_SECTIONS  = YES
HTML_FILE_EXTENSION    = .html
HTML_FOOTER            =
HTML_HEADER            =
HTML_OUTPUT            = html
HTML_STYLESHEET        =
IDL_PROPERTY_SUPPORT   = YES
IGNORE_PREFIX          =
IMAGE_PATH             =
INCLUDED_BY_GRAPH      = YES
INCLUDE_FILE_PATTERNS  =
INCLUDE_GRAPH          = YES
INCLUDE_PATH           =
INHERIT_DOCS           = YES
INLINE_INFO            = YES
INLINE_INHERITED_MEMB  = NO
INLINE_SOURCES         = YES
INPUT                  =
INPUT_ENCODING         = UTF-8
INPUT_FILTER           =
INTERNAL_DOCS          = NO
JAVADOC_AUTOBRIEF      = NO
LATEX_BATCHMODE        = NO
LATEX_CMD_NAME         = latex
LATEX_HEADER           =
LATEX_HIDE_INDICES     = NO
LATEX_OUTPUT           = latex
LAYOUT_FILE            =
MACRO_EXPANSION        = YES
MAKEINDEX_CMD_NAME     = makeindex
MAN_EXTENSION          = .3 .5 .8
MAN_LINKS              = YES
MAN_OUTPUT             = man
MAX_DOT_GRAPH_DEPTH    = 0
MAX_INITIALIZER_LINES  = 30
MSCGEN_PATH            =
MULTILINE_CPP_IS_BRIEF = NO
OPTIMIZE_FOR_FORTRAN   = NO
OPTIMIZE_OUTPUT_FOR_C  = YES
OPTIMIZE_OUTPUT_JAVA   = NO
OPTIMIZE_OUTPUT_VHDL   = NO
OUTPUT_DIRECTORY       = myproject-doxygen
OUTPUT_LANGUAGE        = English
PAPER_TYPE             = a4wide
PDF_HYPERLINKS         = YES
PERLMOD_LATEX          = NO
PERLMOD_MAKEVAR_PREFIX =
PERLMOD_PRETTY         = YES
PERL_PATH              = /usr/bin/perl
PREDEFINED             =
PROJECT_NAME           = myproject
PROJECT_NUMBER         =
QCH_FILE               =
QHG_LOCATION           =
QHP_NAMESPACE          = org.doxygen.Project
QHP_VIRTUAL_FOLDER     = doc
QT_AUTOBRIEF           = NO
QUIET                  = NO
RECURSIVE              = YES
REFERENCED_BY_RELATION = YES
REFERENCES_LINK_SOURCE = YES
REFERENCES_RELATION    = YES
REPEAT_BRIEF           = YES
RTF_EXTENSIONS_FILE    =
RTF_HYPERLINKS         = NO
RTF_OUTPUT             = rtf
RTF_STYLESHEET_FILE    =
SEARCHENGINE           = YES
SEARCH_INCLUDES        = YES
SEPARATE_MEMBER_PAGES  = NO
SHORT_NAMES            = NO
SHOW_DIRECTORIES       = YES
SHOW_FILES             = YES
SHOW_INCLUDE_FILES     = YES
SHOW_NAMESPACES        = YES
SHOW_USED_FILES        = YES
SIP_SUPPORT            = NO
SKIP_FUNCTION_MACROS   = YES
SORT_BRIEF_DOCS        = NO
SORT_BY_SCOPE_NAME     = NO
SORT_GROUP_NAMES       = NO
SORT_MEMBER_DOCS       = NO
SOURCE_BROWSER         = YES
STRIP_CODE_COMMENTS    = YES
STRIP_FROM_INC_PATH    =
STRIP_FROM_PATH        =
SUBGROUPING            = YES
SYMBOL_CACHE_SIZE      = 0
TAB_SIZE               = 8
TAGFILES               =
TEMPLATE_RELATIONS     = YES
TOC_EXPAND             = NO
TREEVIEW_WIDTH         = 250
TYPEDEF_HIDES_STRUCT   = NO
UML_LOOK               = NO
USE_HTAGS              = NO
USE_PDFLATEX           = NO
VERBATIM_HEADERS       = YES
WARN_FORMAT            = “$file:$line: $text”
WARN_IF_DOC_ERROR      = YES
WARN_IF_UNDOCUMENTED   = YES
WARNINGS               = YES
WARN_LOGFILE           =
WARN_NO_PARAMDOC       = NO
XML_DTD                =
XML_OUTPUT             = xml
XML_PROGRAMLISTING     = YES
XML_SCHEMA             =
—–doxygen-configuration.cfg—————

Customization of the Doxygen configuration file:

It is possible that you may not like the name of the Doxygen documentation directory “myproject-doxygen” as in the sample file above, and you want to give some other name to it, and also you want to store in some other location. Similarly, depending upon your project requirement, you may also want to change some or all of the configuration parameters according to your needs. I am only going to describe some of the configuration parameters here, you can follow the link http://www.stack.nl/~dimitri/doxygen/configuration.html to go through the complete description of each parameters. It is also possible that some of these parameters may get obsoleted in future. While running doxygen (as in step 4 above), it will output warnings about the obsoleted parameters and then you can modify the configuration file accordingly. Some of the Doxygen’s configuration parameters work in group, and if you modify one parameter, it may affect all other parameters in the group, so be careful about it.

1)GENERATE_HTML:  If you want to generate html files or not and I set it to YES.
2)GENERATE_LATEX: If you want to generate the documentation output in the latex file format. Latex files can be converted to pdf files. I did not want this so I set it to NO.
3)HTML_FILE_EXTENSION: I assume that this parameter is self-explanatory and allows to set the extension of html files. I set it to “.html”.
4)INCLUDE_GRAPH: If you want to generate the call graphs, I set it to YES.
5)The following parameters are language specific. As I am only using C, so I just set it for C, you can set it according to your language.
OPTIMIZE_FOR_FORTRAN   = NO
OPTIMIZE_OUTPUT_FOR_C  = YES
OPTIMIZE_OUTPUT_JAVA   = NO
OPTIMIZE_OUTPUT_VHDL   = NO

6)OUTPUT_DIRECTORY: where you want to store the Doxygen documentation.
7)OUTPUT_LANGUAGE: By default, it is English, but you can set it to the other supported language as per your requirements.
8)PROJECT_NAME: Name of the project, you are working on.
9)PROJECT_NUMBER: Version of the project, you are are working on.
10)SOURCE_BROWSER: If you want the Doxygen to create source code files in html format or not (*.source.html, as explained above in step 4).

Important Links:
http://www.stack.nl/~dimitri/doxygen/ : Main Doxygen website
http://www.stack.nl/~dimitri/doxygen/configuration.html : Here, you can find explanation to each of the configurations parameters, and can customize accordingly.

Posted in Technology | Tagged | 1 Comment

OlivePad: India's Answer to iPAD

Olive Telecom, an Indian-based multinational company, launched India’s first 3.5G Pad, named OlivePad-VT100. The main features of OlivePad are:

1.  Android platform.
2.  High-Speed Uplink Packet Access (HSUPA, a 3G mobile telephony protocol).
3.  Wireless connectivity (Wi-Fi).
4.  Bluetooth.
5.  3 mega pixel built-in camera and a front camera.
6.  Applications for web surfing, multimedia, instant messaging, social networking sites.
7.  GPS support.
8.  Gaming console.
9.  E-book reader.
10.  Television.
11.  Smartphone support for audio and video calling.
12.  Flash support.
13.  Mini-USB port.

The full press release from the company can be accessed here: http://www.olivetelecom.in/olive-news.html .

Posted in Technology | Tagged | 1 Comment