Network Commands#
ifconfig#
Description#
Prints out interfaces information
Requirements#
Network Module
Synopsis#
ifconfig
Arguments#
None.
Notes / Warnings#
None.
net_ping#
Description#
Issue a ICMP Echo Request from the target. (IPv4 or IPv6)
Requirements#
Network Module
Synopsis#
net_ping ip_addr
Arguments#
ip_addr
Address of the remote host.
Notes / Warnings#
None.
net_if_start#
Description#
Start an interface.
Requirements#
Network Module
Synopsis#
net_if_start -i if_nbr
Arguments#
-i if_nbr
Specifies the interface to start.
Notes / Warnings#
None.
net_if_stop#
Description#
Stop an interface.
Requirements#
Network Module
Synopsis#
net_if_stop -i if_nbr
Arguments#
-i if_nbr
Specifies the which interface to stop.
Notes / Warnings#
None.
net_if_restart#
Description#
Restart a network interface.
Requirements#
Network Module
Synopsis#
net_if_restart -i if_nbr [-t wait_time ]
Arguments#
Argument | Detail |
---|---|
| Interface number to restart. |
| Time to wait after interface stop, before issuing the interface start command, in seconds. Default = 10s. |
Notes / Warnings#
None.
net_if_reset#
Description#
Reset interface(s); remove all configured addresses, IPv4 or IPv6 or both, on specified interface.
Requirements#
Network Module
Synopsis#
net_if_reset [-i if_nbr] [-4|-6]
Arguments#
Argument | Detail |
---|---|
| Specifies on which interface the reset will occur. If no interface is specified, all existing interfaces will be reset. |
| Specifies to clear only the IPv4 addresses of the interface. |
| Specifies to clear only the IPv6 addresses of the interface. |
Notes / Warnings#
None.
net_if_set_mtu#
Description#
Configure MTU of given Interface
Requirements#
Network Module
Synopsis#
net_if_set_mtu -i if_nbr -M mtu
Arguments#
Argument | Detail |
---|---|
| Specifies on which interface to set the MTU. |
| Specifies the new MTU value to configure. |
Notes / Warnings#
None.
net_if_buf_rx#
Description#
Get Rx large Buffer statistics
Requirements#
Network Module
Synopsis#
net_if_buf_rx [-i if_nbr]
Arguments#
-i if_nbr
Specifies the interface for which to return the number of large Rx buffers
Notes / Warnings#
None.
net_if_buf_tx_l#
Description#
Get Tx large Buffer statistics
Requirements#
Network Module
Synopsis#
net_if_buf_tx_l [-i interface_nbr]
Arguments#
-i [interface_nbr]
Specifies the interface for which to return the number of large Tx buffers
Notes / Warnings#
None.
net_if_buf_tx_s#
Description#
Get Tx small Buffer statistics
Requirements#
Network Module
Synopsis#
net_if_buf_tx_s [-i interface_nbr]
Arguments#
-i [interface_nbr]
, Specifies the interface for which to return the number of small Tx buffers
Notes / Warnings#
None.
net_ip_setup#
Description#
Configure an IPv4 address.
Requirements#
Network Module
Synopsis#
net_ip_setup -i if_nbr -a ip_addr -m mask
Arguments#
Argument | Detail |
---|---|
| Interface number to setup |
| IP address to assign to the interface |
| Subnet mask to assign to the interface |
Notes / Warnings#
None.
net_route_add#
Description#
Add IP address route
Requirements#
Network Module
Synopsis#
net_route_add -i if_nbr [-4 ip_addr mask gateway] [-6 ip_addr prefix_len]
Arguments#
Argument | Detail |
---|---|
| Specifies on which interface to add the route |
| IPv4 addresses. |
| IPv6 addresses. |
Notes / Warnings#
None.
net_route_remove#
Description#
Remove a route (previously added using net route add ).
Requirements#
Network Module
Synopsis#
net_route_remove {-i [if_nbr]} {-4 [IP Address] [Mask] [Gateway]} {-6 [IP Address] [Prefix Length]}
Arguments#
Argument | Detail |
---|---|
| Specified on which interface the reset will occur. If no interface is specified, all existing interfaces will be reset. |
| IPv4 addresses. |
| IPv6 addresses. |
Notes/Warnings#
None.
net_sock_accept#
Description#
Accept connection on a socket
Requirements#
Network Module
Synopsis#
net_sock_accept -s sock_id
Arguments#
-s sock_id
Specifies the Socket descriptor/handle identifier of listen socket
Notes / Warnings#
None.
net_sock_listen#
Description#
Set socket to listen for connection requests.
Requirements#
Network Module
Synopsis#
net_sock_listen -s sock_id -q queue_size
Arguments#
Argument | Detail |
---|---|
| Socket descriptor/handle identifier of socket to listen. |
| Maximum number of connection requests to accept & queue on listen socket. |
Notes / Warnings#
None.
net_sock_bind#
Description#
Bind a network socket to a local address.
Requirements#
Network Module
Synopsis#
net_sock_bind -s sock_id -p port_nbr -f family
Arguments#
Argument | Detail |
---|---|
| Specifies the Socket descriptor/handle identifier of listen socket |
| Port to bind on. |
| IP address family to use (4 or 6) |
Notes / Warnings#
None.
net_sock_open#
Description#
Open a network socket.
Requirements#
Network Module
Synopsis#
net_sock_open -f family -t protocol_type
Arguments#
Argument | Detail |
---|---|
| IP address family to use: IPv4 (4) or IPv6 (6) |
| Protocol type: stream (s) or datagram (d) |
Notes / Warnings#
None.
net_sock_close#
Description#
Close a network socket.
Requirements#
Network Module
Synopsis#
net_sock_close -s sock_id
Arguments#
-s sock_id
Specifies the Socket descriptor/handle identifier of the socket to close
Notes / Warnings#
None.
net_sock_connect#
Description#
Connect a network socket to a remote host.
Requirements#
Network Module
Synopsis#
net_sock_conn -s sock_id -p port_nbr ip_addr
Arguments#
Argument | Detail |
---|---|
| Specifies the Socket descriptor/handle identifier of listen socket |
| Port number to which to connect |
| IP Address to which to connect |
Notes / Warnings#
None.
net_sock_rx#
Description#
Receive data on a socket
Requirements#
Network Module
Synopsis#
net_sock_rx -s sock_id -l data_len -F outfmt [ -a address ] [-p port ] [-r retry ]
Arguments#
Argument | Detail |
---|---|
| Socket ID. |
| Data length to receive |
| Output format Hexadecimal (h) or Char/string (s) |
| IP address to receive from (optional) |
| Port number (optional; required if -a is specified) |
| Number of retry attempts after timeout |
Notes / Warnings#
None.
net_sock_tx#
Description#
Receive data on a socket
Requirements#
Network Module
Synopsis#
net_sock_tx -s sock_id -l data_len -d data
Arguments#
Argument | Detail |
---|---|
| Socket ID |
| Data length to send |
| Data to transmit |
Notes / Warnings#
None.
net_sock_opt_set_child#
Description#
Configure socket's child connection queue size
Requirements#
Network Module
Synopsis#
net_sock_opt_set_child -s sock_id -v queue_size
Arguments#
Argument | Detail |
---|---|
| Socket ID. |
| Desired child connection queue size |
Notes / Warnings#
None.
net_sock_mcast_join#
Description#
Join a multicast group
Requirements#
Network Module
Synopsis#
net_sock_mcast_join -i if_nbr -a ip_address
Arguments#
Argument | Detail |
---|---|
| Interface number onto which to join the multicast group. |
| IP address of the multicast group |
Notes / Warnings#
None.
net_sock_mcast_leave#
Description#
Leave a multicast group
Requirements#
Network Module
Synopsis#
net_sock_mcast_leave -i if_nbr -a ip_address
Arguments#
Argument | Detail |
---|---|
| Interface number from which to leave the multicast group. |
| IP address of the multicast group |
Notes / Warnings#
None.
net_wifi_create#
Description#
Create a WiFi Network.
Requirements#
Network Module
Synopsis#
net_wifi_create ssid -p pwd -c channel -i if_nbr -t net_type -s sec_type
Arguments#
Argument | Detail |
---|---|
| SSID of the Wi-Fi network to join |
| Password to use to access the WiFi network |
| Wi-Fi channel |
| Interface number on which to create the Wi-Fi network |
| Network Type (infra or adhoc) |
| Network security type (open, wep, wpa or wpa2) |
Notes / Warnings#
This command will failed if the interface has already joined or created an network. In this case, use net_wifi_leave command before.
The argument
[-p password]
is not applicable if the security_type specified is 'open'.
net_wifi_scan#
Description#
Scan for available WiFi SSID.
Requirements#
Network Module
Synopsis#
net_wifi_scan [ssid] -i if_nbr [-c channel]
Arguments#
Argument | Detail |
---|---|
| SSID to find (opt.) |
| Interface number to use |
| WiFi Channel to scan (opt.) |
Notes / Warnings#
None.
net_wifi_join#
Description#
Join a Wi-Fi Network.
Requirements#
Network Module
Synopsis#
net_wifi_join ssid -p pwd -i if_nbr -t net_type -s sec_type
Arguments#
Argument | Detail |
---|---|
| Wi-Fi network to join |
| Password to use to access the Wi-Fi network |
| Interface number on which to join the Wi-Fi network |
| Network Type (infra or adhoc) |
| Network security type (open, wep, wpa or wpa2). |
Notes / Warnings#
This command will failed if the interface has already joined or created an network. In this case, use 1 command before.
The argument
[-p password]
is not applicable if the security_type specified isopen
.
net_wifi_leave#
Description#
Leave a WiFi Network.
Requirements#
Network Module
Synopsis#
net_wifi_leave -i if_nbr
Arguments#
-i if_nbr
Interface number of the Wi-Fi network to leave.
Notes / Warnings#
None.
net_wifi_peer#
Description#
Output the peer information when acting as an Wi-Fi Access point.
Requirements#
Network Module
Synopsis#
net_wifi_peer -i if_nbr
Arguments#
-i if_nbr
Specified on which interface to use.
Notes / Warnings#
This command is applicable only if a Wi-Fi network is created by the interface.
sntp_help#
Description#
Displays information on how to use the SNTP client related commands.
Requirements#
SNTP Client
Synopsis#
sntp_help
Arguments#
None.
Notes / Warnings#
None.
sntp_get#
Description#
Retrieves and displays current time from a remote NTP server.
Requirements#
SNTP Client
Synopsis#
sntp_get [OPTION]
Arguments#
Argument | Detail | Example |
---|---|---|
| Test SNTP client using IPv6. | |
| Test SNTP client using IPv4. | |
| Retrieves time from hostname |
|
Notes / Warnings#
None.