Go to the source code of this file.
Defines | |
#define | PPPUSER "me" |
#define | PPPPASS "secret" |
#define | PPPCHAT "TIMEOUT 2 '' CLIENT\\c CLIENTSERVER" |
#define | PPPCOM "uart0" |
#define | PPPSPEED 115200 |
#define | PPPRXTO 1000 |
#define | RXBUFFSIZE 256 |
#define | CC_STRING "AVRGCC" |
#define | DBGDEV devDebug1 |
#define | DBGCOM "uart1" |
#define | DBGSPEED 115200 |
Functions | |
void | ProcessRequests (FILE *stream) |
int | main (void) |
Variables | |
prog_char | vbanner_P [] = "\n\nPPP Client Sample - Nut/OS %s - " CC_STRING "\n" |
prog_char | banner_P [] = "200 Welcome to tcps. Type help to get help.\r\n" |
prog_char | help_P [] |
prog_char | thread_intro_P [] = "220 List of threads with name,state,prio,stack,mem,timeout follows\r\n" |
prog_char | timer_intro_P [] = "221 List of timers with ticks left and interval follows\r\n" |
prog_char | mem_fmt_P [] = "210 %u bytes RAM free\r\n" |
#define PPPUSER "me" |
#define PPPPASS "secret" |
#define PPPCHAT "TIMEOUT 2 '' CLIENT\\c CLIENTSERVER" |
#define PPPCOM "uart0" |
#define PPPSPEED 115200 |
#define PPPRXTO 1000 |
#define RXBUFFSIZE 256 |
#define DBGDEV devDebug1 |
#define DBGSPEED 115200 |
void ProcessRequests | ( | FILE * | stream | ) |
Definition at line 178 of file pppc.c.
References banner_P, DEADBEEF, fflush(), fgets(), fprintf(), fprintf_P, fputs(), fputs_P, help_P, malloc, mem_fmt_P, NutHeapAvailable(), nutThreadList, nutTimerList, RXBUFFSIZE, strchr(), strlen(), strncmp(), _NUTTHREADINFO::td_memory, _NUTTHREADINFO::td_name, _NUTTHREADINFO::td_next, _NUTTHREADINFO::td_priority, _NUTTHREADINFO::td_sp, _NUTTHREADINFO::td_state, _NUTTHREADINFO::td_timer, TDS_READY, TDS_RUNNING, TDS_SLEEP, TDS_TERM, thread_intro_P, timer_intro_P, _NUTTIMERINFO::tn_next, _NUTTIMERINFO::tn_ticks, and _NUTTIMERINFO::tn_ticks_left.
int main | ( | void | ) |
Definition at line 299 of file pppc.c.
References _fdopen(), _fileno(), _ioctl(), _O_BINARY, _O_RDWR, _open(), DBGDEV, DBGSPEED, _PPPDCB::dcb_ip_dns1, _PPPDCB::dcb_ip_dns2, _PPPDCB::dcb_local_ip, _PPPDCB::dcb_remote_ip, _NUTDEVICE::dev_dcb, devPpp, fclose(), freopen(), inet_ntoa(), NutChat(), NutDnsConfig2(), NutHeapAvailable(), NutIpRouteAdd(), NutNetIfConfig(), NutRegisterDevice(), NutSleep(), NutTcpAccept(), NutTcpCloseSocket(), NutTcpCreateSocket(), NutTracePPP(), NutVersionString(), PPPCHAT, PPPCOM, PPPPASS, PPPRXTO, PPPSPEED, PPPUSER, printf, printf_P(), ProcessRequests(), puts, stdout, UART_SETREADTIMEOUT, UART_SETSPEED, and vbanner_P.
prog_char vbanner_P[] = "\n\nPPP Client Sample - Nut/OS %s - " CC_STRING "\n" |
Definition at line 164 of file pppc.c.
Referenced by main().
prog_char banner_P[] = "200 Welcome to tcps. Type help to get help.\r\n" |
Definition at line 165 of file pppc.c.
Referenced by ProcessRequests().
prog_char help_P[] |
Initial value:
"400 List of commands follows\r\n" "m[emory]\tQueries number of RAM bytes free.\r\n" "t[hreads]\tLists all created threads.\r\n" "ti[mers]\tLists all running timers.\r\n" "q[uit]\t\tTerminates connection.\r\n" ".\r\n"
Definition at line 166 of file pppc.c.
Referenced by ProcessRequests().
prog_char thread_intro_P[] = "220 List of threads with name,state,prio,stack,mem,timeout follows\r\n" |
Definition at line 170 of file pppc.c.
Referenced by ProcessRequests().
prog_char timer_intro_P[] = "221 List of timers with ticks left and interval follows\r\n" |
Definition at line 171 of file pppc.c.
Referenced by ProcessRequests().
prog_char mem_fmt_P[] = "210 %u bytes RAM free\r\n" |
Definition at line 172 of file pppc.c.
Referenced by ProcessRequests().