summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2007-03-04 20:31:23 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2007-03-04 20:31:23 +0000
commit941a6e8494022e22ed98f50972034fda7cf7a9fb (patch)
treeb8aa0d38985dc389a7d58bfad488f4b3771d731e
parentdf71ee7c5de462c2ee97ffa6a1acacb2ed7db20f (diff)
rename struct prefix -> irr_prefix
-rw-r--r--usr.sbin/bgpctl/irr_output.c6
-rw-r--r--usr.sbin/bgpctl/irr_prefix.c22
-rw-r--r--usr.sbin/bgpctl/irrfilter.h6
3 files changed, 17 insertions, 17 deletions
diff --git a/usr.sbin/bgpctl/irr_output.c b/usr.sbin/bgpctl/irr_output.c
index 4c94f48a43a..8d6152d6a11 100644
--- a/usr.sbin/bgpctl/irr_output.c
+++ b/usr.sbin/bgpctl/irr_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: irr_output.c,v 1.8 2007/03/04 20:05:11 henning Exp $ */
+/* $OpenBSD: irr_output.c,v 1.9 2007/03/04 20:31:22 henning Exp $ */
/*
* Copyright (c) 2007 Henning Brauer <henning@openbsd.org>
@@ -37,7 +37,7 @@ int process_policies(FILE *, struct policy_head *);
void policy_prettyprint(FILE *, struct policy_item *);
void policy_torule(FILE *, struct policy_item *);
char *action_torule(char *);
-void print_rule(FILE *, struct policy_item *, char *, struct prefix *);
+void print_rule(FILE *, struct policy_item *, char *, struct irr_prefix *);
#define allowed_in_address(x) \
(isalnum(x) || x == '.' || x == ':' || x == '-')
@@ -195,7 +195,7 @@ action_torule(char *s)
void
print_rule(FILE *fh, struct policy_item *pi, char *sourceas,
- struct prefix *prefix)
+ struct irr_prefix *prefix)
{
char *fmt = "allow quick %s %s%s%s%s%s\n";
char *peer = "any";
diff --git a/usr.sbin/bgpctl/irr_prefix.c b/usr.sbin/bgpctl/irr_prefix.c
index 8bb0bc45fd5..e3669666e14 100644
--- a/usr.sbin/bgpctl/irr_prefix.c
+++ b/usr.sbin/bgpctl/irr_prefix.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: irr_prefix.c,v 1.2 2007/03/04 20:05:11 henning Exp $ */
+/* $OpenBSD: irr_prefix.c,v 1.3 2007/03/04 20:31:22 henning Exp $ */
/*
* Copyright (c) 2007 Henning Brauer <henning@openbsd.org>
@@ -29,7 +29,7 @@
#include "irrfilter.h"
-int prefix_compare(void *, void *);
+int prefix_compare(const void *, const void *);
int prefix_set_compare(struct prefix_set *, struct prefix_set *);
struct prefix_set
*prefix_set_find(char *);
@@ -67,10 +67,10 @@ prefixset_get(char *as)
int
prefixset_addmember(char *s)
{
- void *p;
- u_int i;
- struct prefix *pfx;
- int len;
+ void *p;
+ u_int i;
+ struct irr_prefix *pfx;
+ int len;
if (strchr(s, '/') == NULL)
errx(1, "prefix %s does not have the len specified", s);
@@ -103,11 +103,11 @@ prefixset_addmember(char *s)
}
int
-prefix_compare(void *a, void *b)
+prefix_compare(const void *a, const void *b)
{
- struct prefix *pa = a;
- struct prefix *pb = b;
- int r;
+ const struct irr_prefix *pa = a;
+ const struct irr_prefix *pb = b;
+ int r;
if ((r = pa->af - pb->af) != 0)
return (r);
@@ -116,7 +116,7 @@ prefix_compare(void *a, void *b)
ntohl(pb->addr.in.s_addr)) != 0)
return (r);
} else
- errx(1, "prefixcmp unknown af %u", pa->af);
+ errx(1, "prefix_compare unknown af %u", pa->af);
if ((r = pa->len - pb->len) != 0)
return (r);
diff --git a/usr.sbin/bgpctl/irrfilter.h b/usr.sbin/bgpctl/irrfilter.h
index efc509383de..386953fea7c 100644
--- a/usr.sbin/bgpctl/irrfilter.h
+++ b/usr.sbin/bgpctl/irrfilter.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: irrfilter.h,v 1.3 2007/03/04 20:05:11 henning Exp $ */
+/* $OpenBSD: irrfilter.h,v 1.4 2007/03/04 20:31:22 henning Exp $ */
/*
* Copyright (c) 2007 Henning Brauer <henning@openbsd.org>
@@ -68,7 +68,7 @@ struct as_set {
u_int n_as;
};
-struct prefix {
+struct irr_prefix {
union {
struct in_addr in;
} addr;
@@ -79,7 +79,7 @@ struct prefix {
struct prefix_set {
RB_ENTRY(prefix_set) entry;
char *as;
- struct prefix **prefix;
+ struct irr_prefix **prefix;
u_int prefixcnt;
};