Thread: System ping Linux questions

  1. #1
    Registered User
    Join Date
    Oct 2011

    System ping Linux questions

    System ping Linux questions

    I am trying to write a function to do a ping on a known IP address and then parse the output to see if "1 packet transmitted, 1 received..." is printed.

    I am new to this kind of programming and these commands and using Linux.

    I am thinking something along the lines of

    system("ping IP_ADDR_DEFINE -c 1");

    to start with , but don't to where to go from here to save the output and parse the output.

    Any help would be greatly appreciated.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    There's no need for double posting.
    System ping Linux questions
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. System ping Linux questions
    By knik653 in forum C++ Programming
    Replies: 3
    Last Post: 03-22-2022, 12:44 PM
  2. how do i ping some IPs through "system" function?
    By sparkle in forum C Programming
    Replies: 3
    Last Post: 01-13-2009, 02:59 AM
  3. A few questions on system()
    By Jetlaw in forum C++ Programming
    Replies: 5
    Last Post: 03-30-2006, 10:38 AM
  4. system software....many questions
    By planet_abhi in forum Tech Board
    Replies: 4
    Last Post: 04-26-2003, 03:52 AM

Tags for this Thread