version 1.1.1.1, 2012/02/21 17:26:12
|
version 1.1.1.3, 2013/07/21 23:54:39
|
Line 84 static const char *default_motd =
|
Line 84 static const char *default_motd =
|
"\r\n\ |
"\r\n\ |
Hello, this is " QUAGGA_PROGNAME " (version " QUAGGA_VERSION ").\r\n\ |
Hello, this is " QUAGGA_PROGNAME " (version " QUAGGA_VERSION ").\r\n\ |
" QUAGGA_COPYRIGHT "\r\n\ |
" QUAGGA_COPYRIGHT "\r\n\ |
\r\n"; | " GIT_INFO "\r\n"; |
|
|
|
|
static const struct facility_map { |
static const struct facility_map { |
Line 868 cmd_ipv6_match (const char *str)
|
Line 868 cmd_ipv6_match (const char *str)
|
if (ret == 1) |
if (ret == 1) |
return exact_match; |
return exact_match; |
|
|
while (*str != '\0') | return no_match; |
{ | |
switch (state) | |
{ | |
case STATE_START: | |
if (*str == ':') | |
{ | |
if (*(str + 1) != ':' && *(str + 1) != '\0') | |
return no_match; | |
colons--; | |
state = STATE_COLON; | |
} | |
else | |
{ | |
sp = str; | |
state = STATE_ADDR; | |
} | |
| |
continue; | |
case STATE_COLON: | |
colons++; | |
if (*(str + 1) == ':') | |
state = STATE_DOUBLE; | |
else | |
{ | |
sp = str + 1; | |
state = STATE_ADDR; | |
} | |
break; | |
case STATE_DOUBLE: | |
if (double_colon) | |
return no_match; | |
| |
if (*(str + 1) == ':') | |
return no_match; | |
else | |
{ | |
if (*(str + 1) != '\0') | |
colons++; | |
sp = str + 1; | |
state = STATE_ADDR; | |
} | |
| |
double_colon++; | |
nums++; | |
break; | |
case STATE_ADDR: | |
if (*(str + 1) == ':' || *(str + 1) == '\0') | |
{ | |
if (str - sp > 3) | |
return no_match; | |
| |
nums++; | |
state = STATE_COLON; | |
} | |
if (*(str + 1) == '.') | |
state = STATE_DOT; | |
break; | |
case STATE_DOT: | |
state = STATE_ADDR; | |
break; | |
default: | |
break; | |
} | |
| |
if (nums > 8) | |
return no_match; | |
| |
if (colons > 7) | |
return no_match; | |
| |
str++; | |
} | |
| |
#if 0 | |
if (nums < 11) | |
return partly_match; | |
#endif /* 0 */ | |
| |
return exact_match; | |
} |
} |
|
|
static enum match_type |
static enum match_type |
Line 1033 cmd_ipv6_prefix_match (const char *str)
|
Line 954 cmd_ipv6_prefix_match (const char *str)
|
if (*(str + 1) == ':') |
if (*(str + 1) == ':') |
state = STATE_COLON; |
state = STATE_COLON; |
else if (*(str + 1) == '.') |
else if (*(str + 1) == '.') |
state = STATE_DOT; | { |
| if (colons || double_colon) |
| state = STATE_DOT; |
| else |
| return no_match; |
| } |
else if (*(str + 1) == '/') |
else if (*(str + 1) == '/') |
state = STATE_SLASH; |
state = STATE_SLASH; |
} |
} |
Line 2400 DEFUN (config_exit,
|
Line 2326 DEFUN (config_exit,
|
case BGP_NODE: |
case BGP_NODE: |
case RIP_NODE: |
case RIP_NODE: |
case RIPNG_NODE: |
case RIPNG_NODE: |
|
case BABEL_NODE: |
case OSPF_NODE: |
case OSPF_NODE: |
case OSPF6_NODE: |
case OSPF6_NODE: |
case ISIS_NODE: |
case ISIS_NODE: |
Line 2449 DEFUN (config_end,
|
Line 2376 DEFUN (config_end,
|
case ZEBRA_NODE: |
case ZEBRA_NODE: |
case RIP_NODE: |
case RIP_NODE: |
case RIPNG_NODE: |
case RIPNG_NODE: |
|
case BABEL_NODE: |
case BGP_NODE: |
case BGP_NODE: |
case BGP_VPNV4_NODE: |
case BGP_VPNV4_NODE: |
case BGP_IPV4_NODE: |
case BGP_IPV4_NODE: |
Line 2481 DEFUN (show_version,
|
Line 2409 DEFUN (show_version,
|
{ |
{ |
vty_out (vty, "Quagga %s (%s).%s", QUAGGA_VERSION, host.name?host.name:"", |
vty_out (vty, "Quagga %s (%s).%s", QUAGGA_VERSION, host.name?host.name:"", |
VTY_NEWLINE); |
VTY_NEWLINE); |
vty_out (vty, "%s%s", QUAGGA_COPYRIGHT, VTY_NEWLINE); | vty_out (vty, "%s%s%s", QUAGGA_COPYRIGHT, GIT_INFO, VTY_NEWLINE); |
|
|
return CMD_SUCCESS; |
return CMD_SUCCESS; |
} |
} |