summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2013-04-21 06:42:44 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2013-04-21 06:42:44 +0000
commit1da21bf1712d277b342ee9b843a36026cfc29c9d (patch)
tree87444e1998570d4532274c7f92d683a02af00c3b
parentf3763db2364b6e7ee83cc9d8cdd8c304e9d4a329 (diff)
deregister. no binary change.
-rw-r--r--usr.sbin/mrouted/igmp.c2
-rw-r--r--usr.sbin/mrouted/inet.c14
-rw-r--r--usr.sbin/mrouted/main.c10
-rw-r--r--usr.sbin/mrouted/prune.c40
-rw-r--r--usr.sbin/mrouted/route.c76
-rw-r--r--usr.sbin/mrouted/rsrr.c4
-rw-r--r--usr.sbin/mrouted/vif.c70
7 files changed, 108 insertions, 108 deletions
diff --git a/usr.sbin/mrouted/igmp.c b/usr.sbin/mrouted/igmp.c
index f2c86586bb3..f32df762bb4 100644
--- a/usr.sbin/mrouted/igmp.c
+++ b/usr.sbin/mrouted/igmp.c
@@ -121,7 +121,7 @@ packet_kind(u_int type, u_int code)
void
accept_igmp(int recvlen)
{
- register u_int32_t src, dst, group;
+ u_int32_t src, dst, group;
struct ip *ip;
struct igmp *igmp;
int ipdatalen, iphdrlen, igmpdatalen;
diff --git a/usr.sbin/mrouted/inet.c b/usr.sbin/mrouted/inet.c
index eadbcfa9321..4f00bc6d9ba 100644
--- a/usr.sbin/mrouted/inet.c
+++ b/usr.sbin/mrouted/inet.c
@@ -31,7 +31,7 @@ char s4[SNAMLEN];
int
inet_valid_host(u_int32_t naddr)
{
- register u_int32_t addr;
+ u_int32_t addr;
addr = ntohl(naddr);
@@ -68,7 +68,7 @@ inet_valid_mask(u_int32_t mask)
int
inet_valid_subnet(u_int32_t nsubnet, u_int32_t nmask)
{
- register u_int32_t subnet, mask;
+ u_int32_t subnet, mask;
subnet = ntohl(nsubnet);
mask = ntohl(nmask);
@@ -106,7 +106,7 @@ inet_valid_subnet(u_int32_t nsubnet, u_int32_t nmask)
char *
inet_fmt(u_int32_t addr, char *s)
{
- register u_char *a;
+ u_char *a;
a = (u_char *)&addr;
snprintf(s, SNAMLEN, "%u.%u.%u.%u", a[0], a[1], a[2], a[3]);
@@ -121,7 +121,7 @@ inet_fmt(u_int32_t addr, char *s)
char *
inet_fmts(u_int32_t addr, u_int32_t mask, char *s)
{
- register u_char *a, *m;
+ u_char *a, *m;
int bits;
if ((addr == 0) && (mask == 0)) {
@@ -191,10 +191,10 @@ inet_parse(char *s)
int
inet_cksum(u_int16_t *addr, u_int len)
{
- register int nleft = (int)len;
- register u_int16_t *w = addr;
+ int nleft = (int)len;
+ u_int16_t *w = addr;
u_int16_t answer = 0;
- register int32_t sum = 0;
+ int32_t sum = 0;
/*
* Our algorithm is simple, using a 32 bit accumulator (sum),
diff --git a/usr.sbin/mrouted/main.c b/usr.sbin/mrouted/main.c
index 61bf49effd0..428b929241e 100644
--- a/usr.sbin/mrouted/main.c
+++ b/usr.sbin/mrouted/main.c
@@ -75,7 +75,7 @@ register_input_handler(int fd, ihfunc_t func)
int
main(int argc, char *argv[])
{
- register int recvlen;
+ int recvlen;
int dummy;
FILE *fp;
struct timeval now;
@@ -305,15 +305,15 @@ fasttimer(int i)
{
static unsigned int tlast;
static unsigned int nsent;
- register unsigned int t = tlast + 1;
- register int n;
+ unsigned int t = tlast + 1;
+ int n;
/*
* if we're in the last second, send everything that's left.
* otherwise send at least the fraction we should have sent by now.
*/
if (t >= ROUTE_REPORT_INTERVAL) {
- register int nleft = nroutes - nsent;
+ int nleft = nroutes - nsent;
while (nleft > 0) {
if ((n = report_next_chunk()) <= 0)
break;
@@ -322,7 +322,7 @@ fasttimer(int i)
tlast = 0;
nsent = 0;
} else {
- register unsigned int ncum = nroutes * t / ROUTE_REPORT_INTERVAL;
+ unsigned int ncum = nroutes * t / ROUTE_REPORT_INTERVAL;
while (nsent < ncum) {
if ((n = report_next_chunk()) <= 0)
break;
diff --git a/usr.sbin/mrouted/prune.c b/usr.sbin/mrouted/prune.c
index 30112cf3d0d..39a86d02e35 100644
--- a/usr.sbin/mrouted/prune.c
+++ b/usr.sbin/mrouted/prune.c
@@ -83,7 +83,7 @@ prun_add_ttls(struct gtable *gt)
* checks for scoped multicast addresses
*/
#define GET_SCOPE(gt) { \
- register vifi_t _i; \
+ vifi_t _i; \
if ((ntohl((gt)->gt_mcastgrp) & 0xff000000) == 0xef000000) \
for (_i = 0; _i < numvifs; _i++) \
if (scoped_addr(_i, (gt)->gt_mcastgrp)) \
@@ -108,8 +108,8 @@ scoped_addr(vifi_t vifi, u_int32_t addr)
int
grplst_mem(vifi_t vifi, u_int32_t mcastgrp)
{
- register struct listaddr *g;
- register struct uvif *v;
+ struct listaddr *g;
+ struct uvif *v;
v = &uvifs[vifi];
@@ -298,8 +298,8 @@ send_prune(struct gtable *gt)
static void
send_graft(struct gtable *gt)
{
- register char *p;
- register int i;
+ char *p;
+ int i;
int datalen;
u_int32_t src;
u_int32_t dst;
@@ -336,8 +336,8 @@ send_graft(struct gtable *gt)
static void
send_graft_ack(u_int32_t src, u_int32_t dst, u_int32_t origin, u_int32_t grp)
{
- register char *p;
- register int i;
+ char *p;
+ int i;
int datalen;
p = send_buf + MIN_IP_HEADER_LEN + IGMP_MINLEN;
@@ -1286,10 +1286,10 @@ accept_g_ack(u_int32_t src, u_int32_t dst, char *p, int datalen)
void
free_all_prunes(void)
{
- register struct rtentry *r;
- register struct gtable *g, *prev_g;
- register struct stable *s, *prev_s;
- register struct ptable *p, *prev_p;
+ struct rtentry *r;
+ struct gtable *g, *prev_g;
+ struct stable *s, *prev_s;
+ struct ptable *p, *prev_p;
for (r = routing_table; r; r = r->rt_next) {
g = r->rt_groups;
@@ -1340,9 +1340,9 @@ free_all_prunes(void)
void
steal_sources(struct rtentry *rt)
{
- register struct rtentry *rp;
- register struct gtable *gt, **gtnp;
- register struct stable *st, **stnp;
+ struct rtentry *rp;
+ struct gtable *gt, **gtnp;
+ struct stable *st, **stnp;
for (rp = rt->rt_next; rp; rp = rp->rt_next) {
if ((rt->rt_origin & rp->rt_originmask) == rp->rt_origin) {
@@ -1438,7 +1438,7 @@ age_table_entry(void)
/* retransmit graft if graft sent flag is still set */
if (gt->gt_grftsnt) {
- register int y;
+ int y;
CHK_GS(gt->gt_grftsnt++, y);
if (y)
send_graft(gt);
@@ -1671,11 +1671,11 @@ scaletime(u_long t)
void
dump_cache(FILE *fp2)
{
- register struct rtentry *r;
- register struct gtable *gt;
- register struct stable *st;
- register vifi_t i;
- register time_t thyme = time(0);
+ struct rtentry *r;
+ struct gtable *gt;
+ struct stable *st;
+ vifi_t i;
+ time_t thyme = time(0);
fprintf(fp2,
"Multicast Routing Cache Table (%d entries)\n%s", kroutes,
diff --git a/usr.sbin/mrouted/route.c b/usr.sbin/mrouted/route.c
index dca24f82ffe..c13fecb32ca 100644
--- a/usr.sbin/mrouted/route.c
+++ b/usr.sbin/mrouted/route.c
@@ -70,8 +70,8 @@ init_routes()
static int
init_children_and_leaves(struct rtentry *r, vifi_t parent)
{
- register vifi_t vifi;
- register struct uvif *v;
+ vifi_t vifi;
+ struct uvif *v;
vifbitmap_t old_children, old_leaves;
VIFM_COPY(r->rt_children, old_children);
@@ -113,8 +113,8 @@ init_children_and_leaves(struct rtentry *r, vifi_t parent)
void
add_vif_to_routes(vifi_t vifi)
{
- register struct rtentry *r;
- register struct uvif *v;
+ struct rtentry *r;
+ struct uvif *v;
v = &uvifs[vifi];
for (r = routing_table; r != NULL; r = r->rt_next) {
@@ -146,7 +146,7 @@ add_vif_to_routes(vifi_t vifi)
void
delete_vif_from_routes(vifi_t vifi)
{
- register struct rtentry *r;
+ struct rtentry *r;
for (r = routing_table; r != NULL; r = r->rt_next) {
if (r->rt_metric != UNREACHABLE) {
@@ -180,8 +180,8 @@ delete_vif_from_routes(vifi_t vifi)
void
delete_neighbor_from_routes(u_int32_t addr, vifi_t vifi)
{
- register struct rtentry *r;
- register struct uvif *v;
+ struct rtentry *r;
+ struct uvif *v;
v = &uvifs[vifi];
for (r = routing_table; r != NULL; r = r->rt_next) {
@@ -250,7 +250,7 @@ start_route_updates(void)
static int
find_route(u_int32_t origin, u_int32_t mask)
{
- register struct rtentry *r;
+ struct rtentry *r;
r = rtp->rt_next;
while (r != NULL) {
@@ -281,7 +281,7 @@ find_route(u_int32_t origin, u_int32_t mask)
static void
create_route(u_int32_t origin, u_int32_t mask)
{
- register struct rtentry *r;
+ struct rtentry *r;
if ((r = (struct rtentry *) malloc(sizeof(struct rtentry) +
(2 * numvifs * sizeof(u_int32_t)) +
@@ -318,7 +318,7 @@ create_route(u_int32_t origin, u_int32_t mask)
static void
discard_route(struct rtentry *prev_r)
{
- register struct rtentry *r;
+ struct rtentry *r;
r = prev_r->rt_next;
prev_r->rt_next = r->rt_next;
@@ -341,7 +341,7 @@ void
update_route(u_int32_t origin, u_int32_t mask, u_int metric, u_int32_t src,
vifi_t vifi)
{
- register struct rtentry *r;
+ struct rtentry *r;
u_int adj_metric;
/*
@@ -569,9 +569,9 @@ update_route(u_int32_t origin, u_int32_t mask, u_int metric, u_int32_t src,
void
age_routes(void)
{
- register struct rtentry *r;
- register struct rtentry *prev_r;
- register vifi_t vifi;
+ struct rtentry *r;
+ struct rtentry *prev_r;
+ vifi_t vifi;
for (prev_r = RT_ADDR, r = routing_table;
r != NULL;
@@ -651,7 +651,7 @@ age_routes(void)
void
expire_all_routes(void)
{
- register struct rtentry *r;
+ struct rtentry *r;
for (r = routing_table; r != NULL; r = r->rt_next) {
r->rt_metric = UNREACHABLE;
@@ -667,7 +667,7 @@ expire_all_routes(void)
void
free_all_routes(void)
{
- register struct rtentry *r;
+ struct rtentry *r;
r = RT_ADDR;
@@ -704,11 +704,11 @@ struct newrt {
static int
compare_rts(const void *rt1, const void *rt2)
{
- register struct newrt *r1 = (struct newrt *)rt1;
- register struct newrt *r2 = (struct newrt *)rt2;
- register u_int32_t m1 = ntohl(r1->mask);
- register u_int32_t m2 = ntohl(r2->mask);
- register u_int32_t o1, o2;
+ struct newrt *r1 = (struct newrt *)rt1;
+ struct newrt *r2 = (struct newrt *)rt2;
+ u_int32_t m1 = ntohl(r1->mask);
+ u_int32_t m2 = ntohl(r2->mask);
+ u_int32_t o1, o2;
if (m1 > m2)
return (-1);
@@ -733,7 +733,7 @@ accept_report(u_int32_t src, u_int32_t dst, char *p, int datalen,
u_int32_t level)
{
vifi_t vifi;
- register int width, i, nrt = 0;
+ int width, i, nrt = 0;
int metric;
u_int32_t mask;
u_int32_t origin;
@@ -827,9 +827,9 @@ accept_report(u_int32_t src, u_int32_t dst, char *p, int datalen,
void
report(int which_routes, vifi_t vifi, u_int32_t dst)
{
- register struct rtentry *r;
- register char *p;
- register int i;
+ struct rtentry *r;
+ char *p;
+ int i;
int datalen = 0;
int width = 0;
u_int32_t mask = 0;
@@ -913,9 +913,9 @@ report(int which_routes, vifi_t vifi, u_int32_t dst)
void
report_to_all_neighbors(int which_routes)
{
- register vifi_t vifi;
- register struct uvif *v;
- register struct rtentry *r;
+ vifi_t vifi;
+ struct uvif *v;
+ struct rtentry *r;
int routes_changed_before;
/*
@@ -961,10 +961,10 @@ report_to_all_neighbors(int which_routes)
static int
report_chunk(struct rtentry *start_rt, vifi_t vifi, u_int32_t dst)
{
- register struct rtentry *r;
- register char *p;
- register int i;
- register int nrt = 0;
+ struct rtentry *r;
+ char *p;
+ int i;
+ int nrt = 0;
int datalen = 0;
int width = 0;
u_int32_t mask = 0;
@@ -1032,10 +1032,10 @@ report_chunk(struct rtentry *start_rt, vifi_t vifi, u_int32_t dst)
int
report_next_chunk(void)
{
- register vifi_t vifi;
- register struct uvif *v;
- register struct rtentry *sr;
- register int i, n = 0, min = 20000;
+ vifi_t vifi;
+ struct uvif *v;
+ struct rtentry *sr;
+ int i, n = 0, min = 20000;
static int start_rt;
if (nroutes <= 0)
@@ -1085,8 +1085,8 @@ report_next_chunk(void)
void
dump_routes(FILE *fp)
{
- register struct rtentry *r;
- register vifi_t i;
+ struct rtentry *r;
+ vifi_t i;
fprintf(fp,
diff --git a/usr.sbin/mrouted/rsrr.c b/usr.sbin/mrouted/rsrr.c
index fa58b848984..317b1f1c673 100644
--- a/usr.sbin/mrouted/rsrr.c
+++ b/usr.sbin/mrouted/rsrr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rsrr.c,v 1.11 2013/04/21 00:24:42 deraadt Exp $ */
+/* $OpenBSD: rsrr.c,v 1.12 2013/04/21 06:42:43 tedu Exp $ */
/* $NetBSD: rsrr.c,v 1.3 1995/12/10 10:07:14 mycroft Exp $ */
/*
@@ -50,7 +50,7 @@
* checks for scoped multicast addresses
*/
#define GET_SCOPE(gt) { \
- register int _i; \
+ int _i; \
if (((gt)->gt_mcastgrp & 0xff000000) == 0xef000000) \
for (_i = 0; _i < numvifs; _i++) \
if (scoped_addr(_i, (gt)->gt_mcastgrp)) \
diff --git a/usr.sbin/mrouted/vif.c b/usr.sbin/mrouted/vif.c
index b8ef573bb0b..7b7a540afc7 100644
--- a/usr.sbin/mrouted/vif.c
+++ b/usr.sbin/mrouted/vif.c
@@ -159,8 +159,8 @@ init_installvifs(void)
void
check_vif_state(void)
{
- register vifi_t vifi;
- register struct uvif *v;
+ vifi_t vifi;
+ struct uvif *v;
struct ifreq ifr;
vifs_down = FALSE;
@@ -202,8 +202,8 @@ check_vif_state(void)
static void
send_probe_on_vif(struct uvif *v)
{
- register char *p;
- register int datalen = 0;
+ char *p;
+ int datalen = 0;
struct listaddr *nbr;
int i;
@@ -426,9 +426,9 @@ stop_all_vifs(void)
vifi_t
find_vif(u_int32_t src, u_int32_t dst)
{
- register vifi_t vifi;
- register struct uvif *v;
- register struct phaddr *p;
+ vifi_t vifi;
+ struct uvif *v;
+ struct phaddr *p;
for (vifi = 0, v = uvifs; vifi < numvifs; ++vifi, ++v) {
if (!(v->uv_flags & (VIFF_DOWN|VIFF_DISABLED))) {
@@ -456,9 +456,9 @@ find_vif(u_int32_t src, u_int32_t dst)
static void
age_old_hosts(void)
{
- register vifi_t vifi;
- register struct uvif *v;
- register struct listaddr *g;
+ vifi_t vifi;
+ struct uvif *v;
+ struct listaddr *g;
/*
* Decrement the old-hosts-present timer for each
@@ -477,8 +477,8 @@ age_old_hosts(void)
void
query_groups(void)
{
- register vifi_t vifi;
- register struct uvif *v;
+ vifi_t vifi;
+ struct uvif *v;
for (vifi = 0, v = uvifs; vifi < numvifs; vifi++, v++) {
if (v->uv_flags & VIFF_QUERIER) {
@@ -498,8 +498,8 @@ void
accept_membership_query(u_int32_t src, u_int32_t dst, u_int32_t group,
int tmo)
{
- register vifi_t vifi;
- register struct uvif *v;
+ vifi_t vifi;
+ struct uvif *v;
if ((vifi = find_vif(src, dst)) == NO_VIF ||
(uvifs[vifi].uv_flags & VIFF_TUNNEL)) {
@@ -535,9 +535,9 @@ void
accept_group_report(u_int32_t src, u_int32_t dst, u_int32_t group,
int r_type)
{
- register vifi_t vifi;
- register struct uvif *v;
- register struct listaddr *g;
+ vifi_t vifi;
+ struct uvif *v;
+ struct listaddr *g;
if ((vifi = find_vif(src, dst)) == NO_VIF ||
(uvifs[vifi].uv_flags & VIFF_TUNNEL)) {
@@ -603,9 +603,9 @@ accept_group_report(u_int32_t src, u_int32_t dst, u_int32_t group,
void
accept_leave_message(u_int32_t src, u_int32_t dst, u_int32_t group)
{
- register vifi_t vifi;
- register struct uvif *v;
- register struct listaddr *g;
+ vifi_t vifi;
+ struct uvif *v;
+ struct listaddr *g;
if ((vifi = find_vif(src, dst)) == NO_VIF ||
(uvifs[vifi].uv_flags & VIFF_TUNNEL)) {
@@ -665,8 +665,8 @@ accept_leave_message(u_int32_t src, u_int32_t dst, u_int32_t group)
void
probe_for_neighbors(void)
{
- register vifi_t vifi;
- register struct uvif *v;
+ vifi_t vifi;
+ struct uvif *v;
for (vifi = 0, v = uvifs; vifi < numvifs; vifi++, v++) {
if (!(v->uv_flags & (VIFF_DOWN|VIFF_DISABLED))) {
@@ -807,8 +807,8 @@ accept_neighbor_request2(u_int32_t src, u_int32_t dst)
datalen = 0;
for (vifi = 0, v = uvifs; vifi < numvifs; vifi++, v++) {
- register u_short vflags = v->uv_flags;
- register u_char rflags = 0;
+ u_short vflags = v->uv_flags;
+ u_char rflags = 0;
if (vflags & VIFF_TUNNEL)
rflags |= DVMRP_NF_TUNNEL;
if (vflags & VIFF_SRCRT)
@@ -981,8 +981,8 @@ int
update_neighbor(vifi_t vifi, u_int32_t addr, int msgtype, char *p,
int datalen, u_int32_t level)
{
- register struct uvif *v;
- register struct listaddr *n;
+ struct uvif *v;
+ struct listaddr *n;
u_int32_t genid = 0;
u_int32_t router;
u_int32_t send_tables = 0;
@@ -1182,10 +1182,10 @@ update_neighbor(vifi_t vifi, u_int32_t addr, int msgtype, char *p,
void
age_vifs(void)
{
- register vifi_t vifi;
- register struct uvif *v;
- register struct listaddr *a, *prev_a, *n;
- register u_int32_t addr;
+ vifi_t vifi;
+ struct uvif *v;
+ struct listaddr *a, *prev_a, *n;
+ u_int32_t addr;
for (vifi = 0, v = uvifs; vifi < numvifs; ++vifi, ++v ) {
if (v->uv_leaf_timer && (v->uv_leaf_timer -= TIMER_INTERVAL == 0)) {
@@ -1254,10 +1254,10 @@ neighbor_info(vifi_t vifi, u_int32_t addr)
void
dump_vifs(FILE *fp)
{
- register vifi_t vifi;
- register struct uvif *v;
- register struct listaddr *a;
- register struct phaddr *p;
+ vifi_t vifi;
+ struct uvif *v;
+ struct listaddr *a;
+ struct phaddr *p;
struct sioc_vif_req v_req;
fprintf(fp, "vifs_with_neighbors = %d\n", vifs_with_neighbors);
@@ -1415,7 +1415,7 @@ static void
SendQuery(void *arg)
{
cbk_t *cbk = (cbk_t *)arg;
- register struct uvif *v = &uvifs[cbk->vifi];
+ struct uvif *v = &uvifs[cbk->vifi];
send_igmp(v->uv_lcl_addr, cbk->g->al_addr,
IGMP_HOST_MEMBERSHIP_QUERY,