summaryrefslogtreecommitdiffstats
path: root/usr.sbin/map-mbone
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2004-08-01 18:32:17 +0000
committerderaadt <deraadt@openbsd.org>2004-08-01 18:32:17 +0000
commitf56bb1bd7ef91597b1c308891aae151d18bc0ac7 (patch)
tree9a33a25799920e408838c931715eda1fa2e2f5bc /usr.sbin/map-mbone
parentTrim include file list. (diff)
downloadwireguard-openbsd-f56bb1bd7ef91597b1c308891aae151d18bc0ac7.tar.xz
wireguard-openbsd-f56bb1bd7ef91597b1c308891aae151d18bc0ac7.zip
ansi cleanup; khalek@linuxgamers.net
Diffstat (limited to 'usr.sbin/map-mbone')
-rw-r--r--usr.sbin/map-mbone/mapper.c140
1 files changed, 48 insertions, 92 deletions
diff --git a/usr.sbin/map-mbone/mapper.c b/usr.sbin/map-mbone/mapper.c
index 4135b58d96a..c191d51916c 100644
--- a/usr.sbin/map-mbone/mapper.c
+++ b/usr.sbin/map-mbone/mapper.c
@@ -1,3 +1,4 @@
+/* $OpenBSD: mapper.c,v 1.16 2004/08/01 18:32:19 deraadt Exp $ */
/* $NetBSD: mapper.c,v 1.3 1995/12/10 11:12:04 mycroft Exp $ */
/* Mapper for connections between MRouteD multicast routers.
@@ -102,9 +103,7 @@ int get_number(int *var, int deflt, char ***pargv,
u_int32_t host_addr(char *name);
-Node *find_node(addr, ptr)
- u_int32_t addr;
- Node **ptr;
+Node *find_node(u_int32_t addr, Node **ptr)
{
Node *n = *ptr;
@@ -125,9 +124,7 @@ Node *find_node(addr, ptr)
}
-Interface *find_interface(addr, node)
- u_int32_t addr;
- Node *node;
+Interface *find_interface(u_int32_t addr, Node *node)
{
Interface *ifc;
@@ -145,9 +142,7 @@ Interface *find_interface(addr, node)
}
-Neighbor *find_neighbor(addr, node)
- u_int32_t addr;
- Node *node;
+Neighbor *find_neighbor(u_int32_t addr, Node *node)
{
Interface *ifc;
@@ -202,15 +197,13 @@ logit(int severity, int syserr, char *format, ...)
/*
* Send a neighbors-list request.
*/
-void ask(dst)
- u_int32_t dst;
+void ask(u_int32_t dst)
{
send_igmp(our_addr, dst, IGMP_DVMRP, DVMRP_ASK_NEIGHBORS,
htonl(MROUTED_LEVEL), 0);
}
-void ask2(dst)
- u_int32_t dst;
+void ask2(u_int32_t dst)
{
send_igmp(our_addr, dst, IGMP_DVMRP, DVMRP_ASK_NEIGHBORS2,
htonl(MROUTED_LEVEL), 0);
@@ -220,9 +213,8 @@ void ask2(dst)
/*
* Process an incoming group membership report.
*/
-void accept_group_report(src, dst, group, r_type)
- u_int32_t src, dst, group;
- int r_type;
+void accept_group_report(u_int32_t src, u_int32_t dst, u_int32_t group,
+ int r_type)
{
logit(LOG_INFO, 0, "ignoring IGMP group membership report from %s to %s",
inet_fmt(src, s1), inet_fmt(dst, s2));
@@ -232,10 +224,8 @@ void accept_group_report(src, dst, group, r_type)
/*
* Process an incoming neighbor probe message.
*/
-void accept_probe(src, dst, p, datalen, level)
- u_int32_t src, dst, level;
- char *p;
- int datalen;
+void accept_probe(u_int32_t src, u_int32_t dst, char *p, int datalen,
+ u_int32_t level)
{
logit(LOG_INFO, 0, "ignoring DVMRP probe from %s to %s",
inet_fmt(src, s1), inet_fmt(dst, s2));
@@ -245,10 +235,8 @@ void accept_probe(src, dst, p, datalen, level)
/*
* Process an incoming route report message.
*/
-void accept_report(src, dst, p, datalen, level)
- u_int32_t src, dst, level;
- char *p;
- int datalen;
+void accept_report(u_int32_t src, u_int32_t dst, char *p, int datalen,
+ u_int32_t level)
{
logit(LOG_INFO, 0, "ignoring DVMRP routing report from %s to %s",
inet_fmt(src, s1), inet_fmt(dst, s2));
@@ -258,8 +246,7 @@ void accept_report(src, dst, p, datalen, level)
/*
* Process an incoming neighbor-list request message.
*/
-void accept_neighbor_request(src, dst)
- u_int32_t src, dst;
+void accept_neighbor_request(u_int32_t src, u_int32_t dst)
{
if (src != our_addr)
logit(LOG_INFO, 0,
@@ -267,8 +254,7 @@ void accept_neighbor_request(src, dst)
inet_fmt(src, s1), inet_fmt(dst, s2));
}
-void accept_neighbor_request2(src, dst)
- u_int32_t src, dst;
+void accept_neighbor_request2(u_int32_t src, u_int32_t dst)
{
if (src != our_addr)
logit(LOG_INFO, 0,
@@ -280,10 +266,8 @@ void accept_neighbor_request2(src, dst)
/*
* Process an incoming neighbor-list message.
*/
-void accept_neighbors(src, dst, p, datalen, level)
- u_int32_t src, dst, level;
- u_char *p;
- int datalen;
+void accept_neighbors(u_int32_t src, u_int32_t dst, u_char *p, int datalen,
+ u_int32_t level)
{
Node *node = find_node(src, &routers);
@@ -441,10 +425,8 @@ void accept_neighbors(src, dst, p, datalen, level)
}
}
-void accept_neighbors2(src, dst, p, datalen, level)
- u_int32_t src, dst, level;
- u_char *p;
- int datalen;
+void accept_neighbors2(u_int32_t src, u_int32_t dst, u_char *p, int datalen,
+ u_int32_t level)
{
Node *node = find_node(src, &routers);
u_int broken_cisco = ((level & 0xffff) == 0x020a); /* 10.2 */
@@ -588,14 +570,13 @@ void accept_neighbors2(src, dst, p, datalen, level)
}
-void check_vif_state()
+void check_vif_state(void)
{
logit(LOG_NOTICE, 0, "network marked down...");
}
-int retry_requests(node)
- Node *node;
+int retry_requests(Node *node)
{
int result;
@@ -615,8 +596,7 @@ int retry_requests(node)
}
-char *inet_name(addr)
- u_int32_t addr;
+char *inet_name(u_int32_t addr)
{
struct hostent *e;
@@ -626,8 +606,7 @@ char *inet_name(addr)
}
-void print_map(node)
- Node *node;
+void print_map(Node *node)
{
if (node) {
char *name, *addr;
@@ -694,10 +673,7 @@ void print_map(node)
}
-char *graph_name(addr, buf, len)
- u_int32_t addr;
- char *buf;
- size_t len;
+char *graph_name(u_int32_t addr, char *buf, size_t len)
{
char *name;
@@ -710,8 +686,7 @@ char *graph_name(addr, buf, len)
}
-void graph_edges(node)
- Node *node;
+void graph_edges(Node *node)
{
Interface *ifc;
Neighbor *nb;
@@ -755,8 +730,7 @@ void graph_edges(node)
}
}
-void elide_aliases(node)
- Node *node;
+void elide_aliases(Node *node)
{
if (node) {
elide_aliases(node->left);
@@ -778,7 +752,7 @@ void elide_aliases(node)
}
}
-void graph_map()
+void graph_map(void)
{
time_t now = time(0);
char *nowstr = ctime(&now);
@@ -792,9 +766,7 @@ void graph_map()
}
-int get_number(var, deflt, pargv, pargc)
- int *var, *pargc, deflt;
- char ***pargv;
+int get_number(int *var, int deflt, char ***pargv, int *pargc)
{
if ((*pargv)[0][2] == '\0') { /* Get the value from the next argument */
if (*pargc > 1 && isdigit((*pargv)[1][0])) {
@@ -817,8 +789,7 @@ int get_number(var, deflt, pargv, pargc)
}
-u_int32_t host_addr(name)
- char *name;
+u_int32_t host_addr(char *name)
{
struct hostent *e = gethostbyname(name);
int addr;
@@ -835,9 +806,7 @@ u_int32_t host_addr(name)
}
-int main(argc, argv)
- int argc;
- char *argv[];
+int main(int argc, char *argv[])
{
int flood = FALSE, graph = FALSE;
@@ -977,53 +946,40 @@ int main(argc, argv)
}
/* dummies */
-void accept_prune(src, dst, p, datalen)
- u_int32_t src, dst;
- char *p;
- int datalen;
+void accept_prune(u_int32_t src, u_int32_t dst, char *p, int datalen)
{
}
-void accept_graft(src, dst, p, datalen)
- u_int32_t src, dst;
- char *p;
- int datalen;
+
+void accept_graft(u_int32_t src, u_int32_t dst, char *p, int datalen)
{
}
-void accept_g_ack(src, dst, p, datalen)
- u_int32_t src, dst;
- char *p;
- int datalen;
+
+void accept_g_ack(u_int32_t src, u_int32_t dst, char *p, int datalen)
{
}
-void add_table_entry(origin, mcastgrp)
- u_int32_t origin, mcastgrp;
+
+void add_table_entry(u_int32_t origin, u_int32_t mcastgrp)
{
}
-void accept_leave_message(src, dst, group)
- u_int32_t src, dst, group;
+
+void accept_leave_message(u_int32_t src, u_int32_t dst, u_int32_t group)
{
}
-void accept_mtrace(src, dst, group, data, no, datalen)
- u_int32_t src, dst, group;
- char *data;
- u_int no;
- int datalen;
+
+void accept_mtrace(u_int32_t src, u_int32_t dst, u_int32_t group, char *data,
+ u_int no, int datalen)
{
}
-void accept_membership_query(src, dst, group, tmo)
- u_int32_t src, dst, group;
- int tmo;
+
+void accept_membership_query(u_int32_t src, u_int32_t dst, u_int32_t group,
+ int tmo)
{
}
-void accept_info_request(src, dst, p, datalen)
- u_int32_t src, dst;
- u_char *p;
- int datalen;
+
+void accept_info_request(u_int32_t src, u_int32_t dst, u_char *p, int datalen)
{
}
-void accept_info_reply(src, dst, p, datalen)
- u_int32_t src, dst;
- u_char *p;
- int datalen;
+
+void accept_info_reply(u_int32_t src, u_int32_t dst, u_char *p, int datalen)
{
}