User Tools

Site Tools


cli_entry

This is an old revision of the document!


Adding a menu entry for the CLI

This document shows how to add a menu entry for the CLI. Usually the first thing anyone would want to do for their protocol implementation is to enable that protocol for some of the available interfaces. Thus, in describing the steps to follow, we'll consider adding an Enable option for the RSTP protocol.

Step 1 : setting up protocol information

Most protocols have a small number of configurable parameters that influence the protocol's behaviour. Naturally, we'll want to store these parameters' values somewhere. LiSA stores all such information in a shared memory structure that is protected from concurrent accesses. So the first step is to define our own structure that contains protocol-specific data. Since all we want to do is enable the protocol, our structure will only have a field called enabled. We'll create a header file called rstp_client.h in the userspace/include/ folder where we'll keep CLI-interaction related information.

cli_entry.1244902617.txt.gz · Last modified: (external edit)