summaryrefslogtreecommitdiff
path: root/lib/command.c
diff options
context:
space:
mode:
authorpaul <paul>2003-07-11 17:55:46 +0000
committerpaul <paul>2003-07-11 17:55:46 +0000
commit22e0a9e6c7bd7775da6bfb00d9a4114643cf9369 (patch)
tree354c3f19e19fc23059f94334a52eea9075d5bdf5 /lib/command.c
parent53db0feeb80e2003c3ed94bc05d05d46645f3e95 (diff)
2003-07-11 Vsevolod Sipakov <zebra@vs.megalink.ru>
* lib/command.c: Add missing HAVE_IPV6 defines. see bug id #23: http://bugzilla.dishone.st/show_bug.cgi?id=23
Diffstat (limited to 'lib/command.c')
-rw-r--r--lib/command.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/command.c b/lib/command.c
index ade413bb..c6203be4 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -715,6 +715,8 @@ cmd_ipv4_prefix_match (char *str)
#define STATE_SLASH 6
#define STATE_MASK 7
+#ifdef HAVE_IPV6
+
enum match_type
cmd_ipv6_match (char *str)
{
@@ -952,6 +954,8 @@ cmd_ipv6_prefix_match (char *str)
return exact_match;
}
+#endif /* HAVE_IPV6 */
+
#define DECIMAL_STRLEN_MAX 10
int
@@ -1046,6 +1050,7 @@ cmd_filter_by_completion (char *command, vector v, int index)
matched++;
}
}
+#ifdef HAVE_IPV6
else if (CMD_IPV6 (str))
{
if (cmd_ipv6_match (command))
@@ -1066,6 +1071,7 @@ cmd_filter_by_completion (char *command, vector v, int index)
matched++;
}
}
+#endif /* HAVE_IPV6 */
else if (CMD_IPV4 (str))
{
if (cmd_ipv4_match (command))
@@ -1160,6 +1166,7 @@ cmd_filter_by_string (char *command, vector v, int index)
matched++;
}
}
+#ifdef HAVE_IPV6
else if (CMD_IPV6 (str))
{
if (cmd_ipv6_match (command) == exact_match)
@@ -1178,6 +1185,7 @@ cmd_filter_by_string (char *command, vector v, int index)
matched++;
}
}
+#endif /* HAVE_IPV6 */
else if (CMD_IPV4 (str))
{
if (cmd_ipv4_match (command) == exact_match)
@@ -1272,6 +1280,7 @@ is_cmd_ambiguous (char *command, vector v, int index, enum match_type type)
match++;
}
break;
+#ifdef HAVE_IPV6
case ipv6_match:
if (CMD_IPV6 (str))
match++;
@@ -1285,6 +1294,7 @@ is_cmd_ambiguous (char *command, vector v, int index, enum match_type type)
match++;
}
break;
+#endif /* HAVE_IPV6 */
case ipv4_match:
if (CMD_IPV4 (str))
match++;
@@ -1350,6 +1360,7 @@ cmd_entry_function_desc (char *src, char *dst)
return NULL;
}
+#ifdef HAVE_IPV6
if (CMD_IPV6 (dst))
{
if (cmd_ipv6_match (src))
@@ -1365,6 +1376,7 @@ cmd_entry_function_desc (char *src, char *dst)
else
return NULL;
}
+#endif /* HAVE_IPV6 */
if (CMD_IPV4 (dst))
{