hi friends....
at the time now i have some programs for implementing ping command in Linux. These programs have so many bugs. Please suggest me some key points to do it.
Printable View
hi friends....
at the time now i have some programs for implementing ping command in Linux. These programs have so many bugs. Please suggest me some key points to do it.
Huh?
Lemme see, these programs are in the "100% written, 0% tested" state?
Learn to write code a little at a time, and test as you go.
Why?
- If your most recent change breaks it, you know where to look (diff with the last known good)
- Finding a mistake is a lot easier if done soon after introducing the mistake.
- A program which is 50% written and 100% tested is a known quantity, you're exactly half way done.
- If you have a conceptual mistake, you don't repeat that several times before finding out that it was wrong.
This may be what you are looking for:
http://www.enderunix.org/docs/en/rawipspoof/
When using the ip and icmp headers you can define them yourself or they may differ from the example unless you specify you want the BSD style (look into your linux headers).
Also, some of the header options may need to be changed, like tos and off. I recommend a packet sniffer to compare what you're creating to what a working ping implementation does.