summaryrefslogtreecommitdiffstats
path: root/lib/prefix.h
diff options
context:
space:
mode:
authorgdt <gdt>2004-01-13 14:55:40 +0000
committergdt <gdt>2004-01-13 14:55:40 +0000
commit95c8023b7df6f612a708e90ca8d8367a5cf989cc (patch)
tree92a752f4405a40ce448e3a96c734b83397ff530a /lib/prefix.h
parentc8eb9590dd9b00aba53b2f39d987f59b872899aa (diff)
downloadquagga-95c8023b7df6f612a708e90ca8d8367a5cf989cc.tar.bz2
quagga-95c8023b7df6f612a708e90ca8d8367a5cf989cc.tar.xz
Explain the dual use of struct prefix for CIDR prefixes and
address/netmask pairs, and clarify the two comparison functions.
Diffstat (limited to 'lib/prefix.h')
-rw-r--r--lib/prefix.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/prefix.h b/lib/prefix.h
index 7d7cde68..5884640a 100644
--- a/lib/prefix.h
+++ b/lib/prefix.h
@@ -23,6 +23,15 @@
#ifndef _ZEBRA_PREFIX_H
#define _ZEBRA_PREFIX_H
+/*
+ * A struct prefix contains an address family, a prefix length, and an
+ * address. This can represent either a 'network prefix' as defined
+ * by CIDR, where the 'host bits' of the prefix are 0
+ * (e.g. AF_INET:10.0.0.0/8), or an address and netmask
+ * (e.g. AF_INET:10.0.0.9/8), such as might be configured on an
+ * interface.
+ */
+
/* IPv4 and IPv6 unified prefix structure. */
struct prefix
{