JoeyHess2006-03-07ifdata1ifdataget network interface info without
parsing ifconfig outputifdataoptionsifaceDESCRIPTIONifdata can be used to check for
the existence of a network interface, or to get
information abut the interface, such as its IP
address. Unlike ifconfig or
ip, ifdata
has simple to parse output that is designed to be
easily used by a shell script.
OPTIONSPrint out a help summary.Test to see if the interface exists,
exit nonzero if it does not.Prints out the whole configuration of
the interface.Prints "yes" or "no" if the interface
exists or not.Prints the IPv4 address of the
interface.Prints the netmask of the
interface.Prints the network address of the
interface.Prints the broadcast address of the
interface.Prints the MTU of the interface.Prints the flags of the
interface.Prints out all the input statistics
of the interface.Prints the number of input packets.Prints the number of input bytes.Prints the number of input errors.Prints the number of input drops.Prints the number of input fifo overruns.Print the number of input compresed.Prints the number of input multicast.Prints out all the output statistics
of the interface.Prints the number of output packets.Prints the number of output bytes.Prints the number of output errors.Prints the number of output drops.Prints the number of output fifo overruns.Print the number of output collisions.Prints the number of output carrier loss.Prints the number of output multicast.