The Enet CLI library provides a command line interpreter for networking applications.
Module | Command | Description |
---|---|---|
enet_cfg | enet_cfg mqprio <port_num> [{-i❘-e} <map0> ... <map7>] | Modifies priority remap registers on the CPSW. Use -i tag to modify VLAN priority regeneration map. Use -e to modify QoS egress priority map. Specifying only the port will show the current remap register values of the port. |
enet_cfg tracelvl [<lvl>] | Sets the trace level for enet processes to lvl . Refer to this for more information on trace levels. Prints current trace level if lvl is not specified | |
enet_cfg classifier [-r] [-c <rx_chn>] [-e <ether_type>] [-p <mac_port>] [-sm <src_mac_addr>] [-dm <dest_mac_addr>] [-sip <src_ipv4_addr>] [-dip <dest_ipv4_addr>] [-iv <inner_vid>] [-ov <outer_vid>] [-pcp <priority>] | Configures a classifier with the specified rules. Use the -r tag to remove the classifer with the specified rules. Specifying rx_chn along with -r tag will remove all classifiers associated to the specified Rx channel. | |
enet_cfg help | Prints a list of all commands available in the enet_cfg module. | |
enet_dbg | enet_dbg cpswstats <port_num> [-r] | Prints the CPSW statistics data of the specified port. Use the -r tag to reset the data after its printed. |
enet_dbg dumpale | Prints the ALE table. (Works only in debug mode.) | |
enet_dbg dumppolicer | Prints the policer table. | |
enet_dbg help | Prints a list of all commands available in the enet_dbg module. | |
phy | phy_scan | Prints a list of available PHYs. |
phy status [<mac_port>] | Prints the link status of the PHY at the specified MAC port. Prints the link status of all PHYs, if mac_port is not specified. | |
phy dump <mac_port> | Prints the data of PHY registers at the specified MAC port. | |
phy write <mac_port> <addr> <data> | Writes the data to the PHY register with address addr attached to the specified MAC port. | |
phy read <mac_port> <addr> | Prints the data stored in the PHY register with address addr attached to the specified MAC port. | |
phy help | Prints a list of all commands available in the phy module. | |
utils | utils cpuload | Prints current CPU usage. |
utils readmem <start_addr> [<num_of_words>] | Prints value stored in memory starting from start_addr . Prints only one word if num_of_words is not specified. | |
utils writemem <start_addr> <word1> ... | Writes to memory starting from start_addr . | |
utils help | Prints a list of all commands available in the utils module. |
For details on the APIs, refer to Enet CLI API.
EnetCli_init()
.EnetCli_registerBuiltInCommands()
function.EnetCli_processCommand()
function. A command can return more than one line of output and the function might be required to run several times to get the full output. A sample code snippet to handle this case: Depending on the command interpreter used, the procedure to add custom commands will vary.
CLI_Command_Definition_t
. For more information on defining commands refer to the FreeRTOS+CLI documentation.EnetCli_registerCustomCommands()
function to register the commands to the command interpreter.EnetCli_processCommand()
function.