FD.io VPP  v21.01.1
Vector Packet Processing
unix_cli_file_t Struct Reference

Unix CLI session. More...

+ Collaboration diagram for unix_cli_file_t:

Data Fields

u32 clib_file_index
 The file index held by unix.c. More...
 
u8output_vector
 Vector of output pending write to file descriptor. More...
 
u8input_vector
 Vector of input saved by Unix input node to be processed by CLI process. More...
 
u8 has_history
 This session has command history. More...
 
u8 ** command_history
 Array of vectors of commands in the history. More...
 
u8current_command
 The command currently pointed at by the history cursor. More...
 
i32 excursion
 How far from the end of the history array the user has browsed. More...
 
u32 history_limit
 Maximum number of history entries this session will store. More...
 
u32 command_number
 Current command line counter. More...
 
u8search_key
 The string being searched for in the history. More...
 
int search_mode
 If non-zero then the CLI is searching in the history array. More...
 
u32 cursor
 Position of the insert cursor on the current input line. More...
 
u8 line_mode
 Line mode or char mode. More...
 
u8 crlf_mode
 Set if the CRLF mode wants CR + LF. More...
 
u8 ansi_capable
 Can we do ANSI output? More...
 
u8 started
 Has the session started? More...
 
u8 no_pager
 Disable the pager? More...
 
u8 is_interactive
 Whether the session is interactive or not. More...
 
u8 is_socket
 Whether the session is attached to a socket. More...
 
u8 has_epipe
 If EPIPE has been detected, prevent further write-related activity on the descriptor. More...
 
u8 ** pager_vector
 Pager buffer. More...
 
unix_cli_pager_index_tpager_index
 Index of line fragments in the pager buffer. More...
 
u32 pager_start
 Line number of top of page. More...
 
u32 width
 Terminal width. More...
 
u32 height
 Terminal height. More...
 
u32 process_node_index
 Process node identifier. More...
 
u8 cursor_direction
 The current direction of cursor travel. More...
 
clib_macro_main_t macro_main
 Macro tables for this session. More...
 

Detailed Description

Unix CLI session.

Definition at line 149 of file cli.c.

Field Documentation

◆ ansi_capable

u8 unix_cli_file_t::ansi_capable

Can we do ANSI output?

Definition at line 194 of file cli.c.

◆ clib_file_index

u32 unix_cli_file_t::clib_file_index

The file index held by unix.c.

Definition at line 152 of file cli.c.

◆ command_history

u8** unix_cli_file_t::command_history

Array of vectors of commands in the history.

Definition at line 164 of file cli.c.

◆ command_number

u32 unix_cli_file_t::command_number

Current command line counter.

Definition at line 174 of file cli.c.

◆ crlf_mode

u8 unix_cli_file_t::crlf_mode

Set if the CRLF mode wants CR + LF.

Definition at line 191 of file cli.c.

◆ current_command

u8* unix_cli_file_t::current_command

The command currently pointed at by the history cursor.

Definition at line 166 of file cli.c.

◆ cursor

u32 unix_cli_file_t::cursor

Position of the insert cursor on the current input line.

Definition at line 185 of file cli.c.

◆ cursor_direction

u8 unix_cli_file_t::cursor_direction

The current direction of cursor travel.

This is important since when advancing left-to-right, at the right hand edge of the console the terminal typically defers wrapping the cursor to the next line until a character is actually displayed. This messes up our heuristic for whether to use ANSI to return the cursor to the end of the line and instead we have to nudge the cursor to the next line. A Value of 0 means we're advancing left-to-right; 1 means the opposite.

Definition at line 243 of file cli.c.

◆ excursion

i32 unix_cli_file_t::excursion

How far from the end of the history array the user has browsed.

Definition at line 168 of file cli.c.

◆ has_epipe

u8 unix_cli_file_t::has_epipe

If EPIPE has been detected, prevent further write-related activity on the descriptor.

Definition at line 212 of file cli.c.

◆ has_history

u8 unix_cli_file_t::has_history

This session has command history.

Definition at line 162 of file cli.c.

◆ height

u32 unix_cli_file_t::height

Terminal height.

Definition at line 227 of file cli.c.

◆ history_limit

u32 unix_cli_file_t::history_limit

Maximum number of history entries this session will store.

Definition at line 171 of file cli.c.

◆ input_vector

u8* unix_cli_file_t::input_vector

Vector of input saved by Unix input node to be processed by CLI process.

Definition at line 159 of file cli.c.

◆ is_interactive

u8 unix_cli_file_t::is_interactive

Whether the session is interactive or not.

Controls things like initial banner, the CLI prompt etc.

Definition at line 204 of file cli.c.

◆ is_socket

u8 unix_cli_file_t::is_socket

Whether the session is attached to a socket.

Definition at line 207 of file cli.c.

◆ line_mode

u8 unix_cli_file_t::line_mode

Line mode or char mode.

Definition at line 188 of file cli.c.

◆ macro_main

clib_macro_main_t unix_cli_file_t::macro_main

Macro tables for this session.

Definition at line 246 of file cli.c.

◆ no_pager

u8 unix_cli_file_t::no_pager

Disable the pager?

Definition at line 200 of file cli.c.

◆ output_vector

u8* unix_cli_file_t::output_vector

Vector of output pending write to file descriptor.

Definition at line 155 of file cli.c.

◆ pager_index

unix_cli_pager_index_t* unix_cli_file_t::pager_index

Index of line fragments in the pager buffer.

Definition at line 218 of file cli.c.

◆ pager_start

u32 unix_cli_file_t::pager_start

Line number of top of page.

Definition at line 221 of file cli.c.

◆ pager_vector

u8** unix_cli_file_t::pager_vector

Pager buffer.

Definition at line 215 of file cli.c.

◆ process_node_index

u32 unix_cli_file_t::process_node_index

Process node identifier.

Definition at line 230 of file cli.c.

◆ search_key

u8* unix_cli_file_t::search_key

The string being searched for in the history.

Definition at line 177 of file cli.c.

◆ search_mode

int unix_cli_file_t::search_mode

If non-zero then the CLI is searching in the history array.

  • -1 means search backwards.
  • 1 means search forwards.

Definition at line 182 of file cli.c.

◆ started

u8 unix_cli_file_t::started

Has the session started?

Definition at line 197 of file cli.c.

◆ width

u32 unix_cli_file_t::width

Terminal width.

Definition at line 224 of file cli.c.


The documentation for this struct was generated from the following file: