Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ifparse(1m) [opensolaris man page]

ifparse(1M)						  System Administration Commands					       ifparse(1M)

NAME
ifparse - parse ifconfig command line SYNOPSIS
/sbin/ifparse [-fs] addr_family commands DESCRIPTION
Use the ifparse command to parse the ifconfig(1M) 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(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsr | +-----------------------------+-----------------------------+ |Stability Level |Obsolete | +-----------------------------+-----------------------------+ SEE ALSO
ifconfig(1M), attributes(5) 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 applica- tions that depend upon this interface. SunOS 5.11 9 May 2001 ifparse(1M)

Check Out this Related Man Page

IFCONFIG.IF(5)						      BSD File Formats Manual						    IFCONFIG.IF(5)

NAME
ifconfig.if -- interface-specific configuration files or variables DESCRIPTION
The ifconfig.if files or variables contain information regarding the configuration of each network interface. ifconfig.if is processed by /etc/rc.d/network at system boot time. For each interface (nnX) that is to be configured, there should be either an ifconfig_nnX variable in rc.conf(5), or an /etc/ifconfig.nnX file (such as the ifconfig_fxp0 variable or the /etc/ifconfig.fxp0 file for the fxp0 interface). Only characters allowed in sh(1) variables names should be used for nnX (ascii(7) uppercase and lowercase letters, digits, and underscore). The variable or file will get evaluated only if the interface exists on the system. Multiple lines can be placed in a variable or file, and will be evaluated sequentially. In the case of a variable, semicolons may be used instead of newlines, as described in rc.conf(5). <backslash><newline> sequences in files are ignored, so long logical lines may be made up of several shorter physical lines. Normally, a line will be evaluated as command line arguments to ifconfig(8). ``ifconfig nnX'' will be prepended on evaluation. Arguments with embedded shell metacharacters should be quoted in sh(1) style. If the line is equal to ``dhcp'', dhcpcd(8) will be started for the interface. However, it is instead recommended that dhcpcd is set to true in rc.conf(5) and any per interface configuration or restriction is done in dhcpcd.conf(5). If a line is empty, or starts with '#', the line will be ignored as comment. If a line starts with '!', the rest of line will get evaluated as shell script fragment. Shell variables declared in /etc/rc.d/network are accessible but may not be modified. The most useful variable is $int, as it will be bound to the interface being configured with the file. For example, the following illustrates static interface configuration: # IPv4, with an alias inet 10.0.1.12 netmask 255.255.255.0 media 100baseTX inet 10.0.1.13 netmask 255.255.255.255 alias # let us have IPv6 address on this interface inet6 2001:db8::1 prefixlen 64 alias # have subnet router anycast address too inet6 2001:db8:: prefixlen 64 alias anycast The following illustrates dynamic configuration setup with dhclient(8) and rtsol(8): up # autoconfigure IPv4 address !dhclient $int # autoconfigure IPv6 address. Be sure to set $ip6mode to autohost. !rtsol $int The following example sets a network name for a wireless interface (using quotes to protect special characters in the name), and starts dhcpcd(8): ssid 'my network' dhcp The following example is for dynamically-created pseudo interfaces like gif(4). Earlier versions of /etc/rc.d/network required an explicit 'create' command for such interfaces, but creation is now handled automatically. up # configure IPv6 default route toward the interface !route add -inet6 default ::1 !route change -inet6 default -ifp $int FILES
/etc/rc.d/network SEE ALSO
rc.conf(5), ifconfig(8) BSD
April 7, 2011 BSD
Man Page