xref: /illumos-gate/usr/src/man/man8/ifparse.8 (revision bbf21555)
te
Copyright (C) 2001, Sun Microsystems, Inc. All Rights Reserved
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
IFPARSE 8 "May 9, 2001"
NAME
ifparse - parse ifconfig command line
SYNOPSIS

/sbin/ifparse [-fs] addr_family commands
DESCRIPTION

Use the ifparse command to parse the ifconfig(8) command line options and output substrings, one per line, as appropriate. If no options are specified, ifparse returns the entire ifconfig command line as a series of substrings, one per line.

OPTIONS

The ifparse command supports the following options: -f

Lists only substrings of the ifconfig command line that are relevant to IP network multipath failover

-s

Lists only substrings of the ifconfig command line that are not relevant to IP network multipath failover

OPERANDS

The ifparse command does not support the interface operand of the ifconfig command.

EXAMPLES

Example 1 Parsing Command Line Options Relevant to Failover

The following example shows the use of the ifparse command to parse the command line options relevant to IP network multipath failover:

example# ifparse -f inet 1.2.3.4 up group one addif 1.2.3.5 -failover up
set 1.2.3.4 up

Example 2 Parsing Command Line Options That Are Not Relevant to Failover

The following example shows the use of the ifparse command to parse the command line options that are not relevant to IP network multipath failover:

example# ifparse -s inet 1.2.3.4 up group one addif 1.2.3.5 -failover up
group one
addif 1.2.3.5 -failover up

Example 3 Parsing the Command Line For All Options

The following example shows the use of the ifparse command to parse the command line for all ifconfig options:

example# ifparse inet 1.2.3.4 up group one addif 1.2.3.5 -failover up
group one
set 1.2.3.4 up
addif 1.2.3.5 -failover up
ATTRIBUTES

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE ATTRIBUTE VALUE
Stability Level Obsolete
SEE ALSO

attributes (7), ifconfig (8)

DIAGNOSTICS

usage: -fs <addr_family> <commands>

Description:

This message indicates an invalid command line.

ifparse: Not enough space

Description:

This message indicates insufficient memory.

ifparse: dhcp not supported for inet6

Description:

DHCP operations are not supported for the inet6 address family.

ifparse: Operation <operation> not supported for <addr_family>

Description:

Most operations cannot be used with all address families. For example, the broadcast operation is not supported on the inet6 address family.

ifparse: no argument for <operation>

Description:

Some operations, for example broadcast, require an argument.

NOTES

The ifparse command is classified as an obsolete interface. It will likely be removed in a future release. You should not develop applications that depend upon this interface.