?? ipripng_cmd_show.c
字號:
/* * Copyright 2006 Wind River Systems, Inc. * * The right to copy, distribute, modify or otherwise make use * of this software may be licensed only pursuant to the terms * of an applicable Wind River license agreement. *//*modification history--------------------01a,12jun06,tlu Initial creation *//* **************************************************************************** * 1 DESCRIPTION **************************************************************************** * Implementation of ripng shell command to use for IPRIPng show routines * or telnet shell management. * * 'ripngctrl' A command to print RIPng route entries and RIPng interfaces. * *//* **************************************************************************** * 2 CONFIGURATION **************************************************************************** */#include "ipripng_config.h"/* **************************************************************************** * 3 INCLUDE FILES **************************************************************************** */#define IPCOM_USE_ANDORNOT#define IPCOM_USE_CLIB_PROTO#include <ipcom_clib.h>#include <ipcom_err.h>#include <ipcom_getopt.h>#include "ipripng.h"/* **************************************************************************** * 4 EXTERN PROTOTYPES **************************************************************************** */IP_GLOBAL void ipripng_rtdump(void);IP_GLOBAL void ipripng_ifdump(void);IP_GLOBAL Ip_err ripngStart(char * cmdString, int priority);IP_GLOBAL void ripngStop(void);/* **************************************************************************** * 5 DEFINES **************************************************************************** *//* **************************************************************************** * 6 TYPES **************************************************************************** *//* **************************************************************************** * 7 LOCAL PROTOTYPES **************************************************************************** */IP_PUBLIC int ipripng_cmd_ripngctrl(int argc, char **argv);/* **************************************************************************** * 8 DATA **************************************************************************** *//* **************************************************************************** * 9 FUNCTIONS **************************************************************************** *//* *=========================================================================== * ipripng_cmd_ripngctrl *=========================================================================== * Description: The 'ripngctrl' shell command. A command to print RIPng routes * and interfaces. * Parameters: Standard argc, argv * Returns: 0. * */IP_PUBLIC intipripng_cmd_ripngctrl(int argc, char **argv){ if(argc == 1) goto usage; /*********** rtprint ***********/ if(ipcom_strcmp(argv[1], "rtprint") == 0) { ipripng_rtdump(); } /*********** ifprint ***********/ else if(ipcom_strcmp(argv[1], "ifprint") == 0) { ipripng_ifdump(); } /*********** ripngStart ********/ else if(ipcom_strcmp(argv[1], "ripngStart") == 0) { if (argc != 4) goto usage; ripngStart((char *)argv[2], ipcom_atoi(argv[3])); } /*********** ripngStop ********/ else if(ipcom_strcmp(argv[1], "ripngStop") == 0) { ripngStop(); } else { goto usage; } return 0; usage: ipcom_printf("usage: ripngctrl rtprint"IP_LF " ifprint"IP_LF " ripngStart '[options]' [priority]"IP_LF " ripngStop"IP_LF); return 0;}/* **************************************************************************** * END OF FILE **************************************************************************** */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -