Ping Implementation

This is a discussion on Ping Implementation within the Linux Programming forums, part of the Platform Specific Boards category; hi friends.... at the time now i have some programs for implementing ping command in Linux. These programs have so ...

  1. #1
    Registered User
    Join Date
    Jul 2008
    Location
    India
    Posts
    2

    Question Ping Implementation

    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.

  2. #2
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    Huh?

  3. #3
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,453
    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.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  4. #4
    Registered User
    Join Date
    Mar 2008
    Posts
    43
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. ping script doesn't work?
    By userpingz in forum C Programming
    Replies: 3
    Last Post: 05-31-2009, 07:53 PM
  2. Replies: 8
    Last Post: 05-07-2009, 11:31 AM
  3. IPv6 ping in windows...problem..lots of ode:(
    By Neill KElly in forum C Programming
    Replies: 3
    Last Post: 04-27-2009, 11:50 PM
  4. rand() implementation
    By habert79 in forum C Programming
    Replies: 4
    Last Post: 02-07-2009, 12:18 PM
  5. ping client
    By cpp_is_fun in forum C Programming
    Replies: 4
    Last Post: 11-29-2006, 11:44 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21