libosmovty 0.9.6-23.20170220git32ee5af8.fc42
Osmocom VTY library
|
#include <vty.h>
Public Types | |
enum | { VTY_NORMAL , VTY_CLOSE , VTY_MORE , VTY_MORELINE } |
Current vty status. | |
Data Fields | |
FILE * | file |
underlying file (if any) | |
void * | priv |
private data, specified by creator | |
int | fd |
File descripter of this vty. | |
enum vty_type | type |
Is this vty connect to file or not. | |
int | node |
Node status of this vty. | |
int | fail |
Failure count. | |
struct buffer * | obuf |
Output buffer. | |
char * | buf |
Command input buffer. | |
int | cp |
Command cursor point. | |
int | length |
Command length. | |
int | max |
Command max length. | |
char * | hist [VTY_MAXHIST] |
Histry of command. | |
int | hp |
History lookup current point. | |
int | hindex |
History insert end point. | |
void * | index |
For current referencing point of interface, route-map, access-list etc... | |
void * | index_sub |
For multiple level index treatment such as key chain and key. | |
unsigned char | escape |
For escape character. | |
enum vty:: { ... } | status |
Current vty status. | |
unsigned char | iac |
IAC handling. | |
unsigned char | iac_sb_in_progress |
IAC SB (option subnegotiation) handling. | |
unsigned char | sb_buf [TELNET_NAWS_SB_LEN] |
sub-negotiation buffer | |
size_t | sb_len |
How many subnegotiation characters have we received? | |
int | width |
Window width. | |
int | height |
Widnow height. | |
int | lines |
Configure lines. | |
int | monitor |
int | config |
In configure mode. | |
Internal representation of a single VTY
unsigned char vty::iac |
IAC handling.
IAC handling: was the last character received the IAC (interpret-as-command) escape character (and therefore the next character will be the command code)? Refer to Telnet RFC 854.
Referenced by vty_read().
size_t vty::sb_len |
How many subnegotiation characters have we received?
We just drop those that do not fit in the buffer.
Referenced by vty_read().