July 22, 2003

Bug in NetMon Utility

Bug in NetMon How to crash NetMon utility running on Windows 2000? (okay okay don't laugh, W2K is not that bad... W2K crashes less frequently).

The aim of my application is to genearte appropriate PPP packets and establish a dial-up connection with RRAS on W2K. I was using NetMon utility to monitor the flow of the PPP negotiations and debugging my application.

My application sends following Dummy PPP Packet to RRAS to kick start the PPP negotiation:

unsigned char DummyFrame[] = {
0x7E, 0xFF, 0x03, 0xC0, 0x21, // PPP Frame Header
0x01,                         // Configuration Request
0xFF,                         // Identification
0x00, 0x04,                   // Length - No contents
0xFE, 0x29,                   // CRC
0x7E,                         // PPP Frame End
'\0'
};

unsigned int uiLen = 12;           // Length of the DummyFrame

After a while, I thought of randomizing the Identification field, so I did the following change:
srand((unsigned)time(NULL));
DummyFrame[8] = (unsigned char) rand();
CalculateAndFillCRC(DummyFrame, uiLen);

Yes, I was dumb enough to calculate the Identification field's offset as 8 insted of 6. Insted of randomizing the Identification field, I was randomizing the Length field. But there is some one dumber out there...

I have theThe NetMon utility capturing the PPP packets and when I want to view the packets, NetMon crashes with an Access Violation. It seems, the NetMon expects that the packets it receive are flawless, so doesn't have any error checkings in it.

Also, it looks like the Protocol stack on W2K discards the erroneous DummyFrame silently (as my application never gets a Reject for that packet), but doesn't count the packet as an Error (that is, the error count in the connection Status dialog remains Zero!)

When I correct the offset value for Identification field, every thing works fine.
Posted by hari at 01:14 PM | Comments (0)

July 07, 2003

brahma kadigina paadamu

I Like the song "brahma kadigina paadamu..." composed by Sri Annamacharya. The song starts with praising vaamana, the incarnation of Lord Vishnu. Those who are interested to know the story of Vaamana and Emperor Bali, check this link

Few years back, I read some comments that the story of vaamana avatar supports saamraajya vaadam(Imperialism), as is the case with all other stories of dasa avatar. Though emperor Bali followed all Vedic-standards and performed many rituals, because he is a daanav (Asura), Lord Vishnu has to take human form and punish him. Otherwise he would be a threat to Indra (king of smaller Gods - Suras), who is a favorite king for Lord Vishnu.

Well, now I see the story of vaamana in a different way. I see the entire plot of vamana avataar is God's (or Lord Vishnu, if you choose to perceive God in this form) desperate attempt to make one of the fallen souls to realize its true Self!!

As most of the religious texts say (at least I believe that they say) that God has created man and gave him/her a free will. Now it is up to the (wo)man to use their free will to turn towards God.

Emperor Bali was so engrossed within his self that he doesn't want to see true Self, that "he" is nothing but "the image of the supreme God". Though he achieved the immortality, through tapas, he failed to come out of his ego.

Vaamana asks for three paces of land to be measured by his feet, towards his gift. And Bali agrees to it and asks vaamana to measure the land. Now vaamana shows Bali that entire space around him, including earth, sky, all planets, stars etc are made out of His Supreme Consciousness. Then Bali realizes that whatever he possesses (or so far feeling that he possesses) is nothing but made in the Consciousness of the Supreme Lord. There is nothing that he possesses, except his ego and his will. Realizing that, Bali offers himself (and his Will) to vaamana and in turn vaamana suppresses the ego that has been stopping Bali so far from this Self Realization.

Posted by hari at 04:12 PM | Comments (1)