Provides a JSON interface to the network interface adapter(s).
Provides a JSON interface to the network interface adapter(s). This code allows on to perform operations and make queries about network interfaces. The results are returned in a JSON form for easy processing by AJAX requests. There are a variety of operations that can be performed (using the 'op' parameter):
<dl> <dt>op=single[&interface=eth0]</dt> <dd>Returns a JavaScript object with information for a particular interface.</dd> <dt>op=script</dt> <dd>Returns an entire "text/javascript" document describing ALL interfaces (typically included in the <head> section).</dd> <dt>op=bring-up&interface=eth0</dt> <dd>Puts interface in a UP state.</dd> <dt>op=take-down&interface=eth0</dt> <dd>Takes interface down.</dd> <dt>op=take-down&interface=eth0</dt> <dd>Puts interface in a UP PROMISC state.</dd> <dt>op=disable-promisc&interface=eth0</dt> <dd>Takes away PROMISC state from a interface.</dd> <dt>op=ip-show&show=link&interface=eth0</dt> <dd>Runs "ip SHOW show [INTERFACE]" and returns results.</dd> <dt>op=ethtool-drv&interface=eth0</dt> <dd>Runs "ethtool -i INTERFACE" and returns driver info results.</dd> <dt>op=ethtool-nic&interface=eth0</dt> <dd>Runs "ethtool INTERFACE" and returns NIC adapter setting results.</dd> <dt>op=ifconfig-info&interface=eth0</dt> <dd>Runs "ifconfig -i INTERFACE" and returns results.</dd> <dt>op=all-nics-setting&setting=flags</dt> <dd>Displays the 'setting' value for all NICs.</dd> </dl>
Return all NIC settings for a particular parameter.
Return all NIC settings for a particular parameter. This method returns the setting for all NICs:
To get these results, use the following parameters:
<dl> <dt>op=all-nics-setting</dt> <dd>To peform this operation.</dd> <dt>setting=SETTING</dt> <dd>The NIC setting you want to get for all NICs (e.g., duplex, speed, flags, etc). If omitted, we do nothing.</dd> </dl>
Bring up a specific interface (ip link set INTERFACE up).
Bring up a specific interface (ip link set INTERFACE up). This method runs the following commands:
ip link set INTERFACE upTo get these results, use the following parameters:
<dl> <dt>op=bring-up</dt> <dd>To peform this operation.</dd> <dt>interface=INTERFACE_NAME</dt> <dd>The interface to perform the operation on (like: "eth0") if omitted, we do nothing.</dd> </dl>
Return response of running a command.
Return response of running a command.
Exec a command string and return the results.
Exec a command string and return the results.
Take a interface out of the PROMISC state.
Take a interface out of the PROMISC state. This method runs the following commands:
ip link set promisc off INTERFACETo get these results, use the following parameters:
<dl> <dt>op=disable-promisc</dt> <dd>To peform this operation.</dd> <dt>interface=INTERFACE_NAME</dt> <dd>The interface to perform the operation on (like: "eth0") if omitted, we do nothing.</dd> </dl>
Put a specific interface in a UP PROMISC state.
Put a specific interface in a UP PROMISC state. This method runs the following commands:
ip link set up INTERFACE && ip link set promisc on INTERFACETo get these results, use the following parameters:
<dl> <dt>op=enable-promisc</dt> <dd>To peform this operation.</dd> <dt>interface=INTERFACE_NAME</dt> <dd>The interface to perform the operation on (like: "eth0") if omitted, we do nothing.</dd> </dl>
Get driver information from: ethtool -i INTERFACE.
Get driver information from: ethtool -i INTERFACE. This method runs the following commands:
ethtool -i INTERFACETo get these results, use the following parameters:
<dl> <dt>op=ethtool-drv</dt> <dd>To peform this operation.</dd> <dt>interface=INTERFACE_NAME</dt> <dd>The interface to perform the operation on (like: "eth0") if omitted, we do nothing.</dd> </dl>
Get NIC adapter information from: ethtool INTERFACE.
Get NIC adapter information from: ethtool INTERFACE. This method runs the following commands:
ethtool INTERFACETo get these results, use the following parameters:
<dl> <dt>op=ethtool-nic</dt> <dd>To peform this operation.</dd> <dt>interface=INTERFACE_NAME</dt> <dd>The interface to perform the operation on (like: "eth0") if omitted, we do nothing.</dd> </dl>
Get full path to a program to run.
Get full path to a program to run.
Get access to a CommandLine instance for execing commands.
Get access to a CommandLine instance for execing commands.
Returns PHP object with information about a particular interface.
Returns PHP object with information about a particular interface.
Get a list of interfaces on the system.
Get a list of interfaces on the system.
Get current micro time.
Get current micro time.
Get request parameter value (or default).
Get request parameter value (or default).
Get information from: ifconfig INTERFACE.
Get information from: ifconfig INTERFACE. This method runs the following commands:
ifconfig INTERFACETo get these results, use the following parameters:
<dl> <dt>op=ifconfig-info</dt> <dd>To peform this operation.</dd> <dt>interface=INTERFACE_NAME</dt> <dd>The interface to perform the operation on (like: "eth0") if omitted, we do nothing.</dd> </dl>
Get "show" information from the "ip" command.
Get "show" information from the "ip" command. This method runs the following commands:
ip SHOW show INTERFACETo get these results, use the following parameters:
<dl> <dt>op=ip-show</dt> <dd>To peform this operation.</dd> <dt>show=SHOW</dt> <dd>The ip information you want to show (link, rule, etc). If omitted, we do nothing.</dd> <dt>[interface=INTERFACE]</dt> <dd>The interface to perform the operation on (like: "eth0") (not required for all operations).</dd> </dl>
Prints out a JavaScript object for a particular interface.
Prints out a JavaScript object for a particular interface.
Generate JavaScript file for including as a <script>.
Generate JavaScript file for including as a <script>. To get these results, use the following parameters:
<dl> <dt>op=script</dt> <dd>This indicates that you want an entire JavaScript file with the list of ALL interfaces available.</dd> </dl>
Set header information for JSON response.
Set header information for JSON response.
Report information about a single interface.
Report information about a single interface. To get these results, use the following parameters:
<dl> <dt>op=single</dt> <dd>This indicates that you want the list returned as a JavaScript array of objects.</dd> <dt>[interface=INTERFACE_NAME]</dt> <dd>The interface to get information about (like: "eth0") if omitted, we will pick one for you.</dd> </dl>
Take down a specific interface (ip link set INTERFACE down).
Take down a specific interface (ip link set INTERFACE down). This method runs the following commands:
ip link set INTERFACE downTo get these results, use the following parameters:
<dl> <dt>op=take-down</dt> <dd>To peform this operation.</dd> <dt>interface=INTERFACE_NAME</dt> <dd>The interface to perform the operation on (like: "eth0") if omitted, we do nothing.</dd> </dl>
Documentation generated on Mon, 10 Sep 2012 09:57:13 -0400 by phpDocumentor 1.4.4