
56
//LANSetup Sample Code
//------------------------------------------------------------------------
main(int argc, char *argv[])
{
int group =0, cmd =0, state=0;
char help[] = "-help";
char status[] = "-status";
char setup[] = "-setup";
char poweron[] = "poweron";
char poweroff[] = "poweroff";
char wdt[] = "wdt";
printf("LanSetup Utility version:1.00\n");
if(argc == 5)
{
if(strcmp(argv[1],setup) == 0){
group = (int) strtol(argv[2], NULL, 16);
state = (int) strtol(argv[4],NULL, 16);
if(strcmp(argv[3],poweron) == 0 ){cmd = 0x01;}
if(strcmp(argv[3],poweroff) == 0 ){cmd = 0x02;}
if(strcmp(argv[3],wdt) == 0 ){cmd = 0x03;}
//printf("LanSetup -setup [group:1~4] [poweron|poweroff|wdt]
[bypass:1|pass:0] :setup Lan bypass function setting\n");
if( (cmd == 0) || (group > 4) || (group < 0) || (state > 1) || ( state
< 0)){
printf("Command Error! use -help for detial\n");
return -1;
}else{
LanSetup((char)group,(char)cmd,(char)state);
printf("Lan Setup success!\n");
return 0;
}
Summary of Contents for NSP-2C30
Page 1: ...1 Network Security System NSP 2C30 Always at the forefront of innovation User Manual...
Page 7: ...7 Chapter 1 General Information...
Page 11: ...11 Figure 1 1 System Layout of NSP 2C30 1 4 System Layout...
Page 12: ...12 Front View With different combination of LAN Modules Rear View 1 5 Indicators Features...
Page 13: ...13 Chapter 2 Preparation...
Page 24: ...24 Chapter 3 Operation...
Page 29: ...29 Chapter 4 BIOS Setup...
Page 47: ...47 Chapter 5 Programming Guide...
Page 63: ...63 Chapter 6 Q A...