Sun Dec 11 15:25:52 2011 UTC ()
Use __dead. No prototype for main.


(joerg)
diff -r1.36 -r1.37 src/usr.sbin/rtadvd/rtadvd.c

cvs diff -r1.36 -r1.37 src/usr.sbin/rtadvd/rtadvd.c (expand / switch to unified diff)

--- src/usr.sbin/rtadvd/rtadvd.c 2011/12/10 19:14:29 1.36
+++ src/usr.sbin/rtadvd/rtadvd.c 2011/12/11 15:25:52 1.37
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: rtadvd.c,v 1.36 2011/12/10 19:14:29 roy Exp $ */ 1/* $NetBSD: rtadvd.c,v 1.37 2011/12/11 15:25:52 joerg Exp $ */
2/* $KAME: rtadvd.c,v 1.92 2005/10/17 14:40:02 suz Exp $ */ 2/* $KAME: rtadvd.c,v 1.92 2005/10/17 14:40:02 suz Exp $ */
3 3
4/* 4/*
5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
6 * All rights reserved. 6 * All rights reserved.
7 *  7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
11 * 1. Redistributions of source code must retain the above copyright 11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer. 12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright 13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the 14 * notice, this list of conditions and the following disclaimer in the
@@ -134,29 +134,28 @@ struct sockaddr_in6 sin6_linklocal_allno @@ -134,29 +134,28 @@ struct sockaddr_in6 sin6_linklocal_allno
134 .sin6_addr = IN6ADDR_LINKLOCAL_ALLNODES_INIT, 134 .sin6_addr = IN6ADDR_LINKLOCAL_ALLNODES_INIT,
135}; 135};
136struct sockaddr_in6 sin6_linklocal_allrouters = { 136struct sockaddr_in6 sin6_linklocal_allrouters = {
137 .sin6_len = sizeof(sin6_linklocal_allrouters), 137 .sin6_len = sizeof(sin6_linklocal_allrouters),
138 .sin6_family = AF_INET6, 138 .sin6_family = AF_INET6,
139 .sin6_addr = IN6ADDR_LINKLOCAL_ALLROUTERS_INIT, 139 .sin6_addr = IN6ADDR_LINKLOCAL_ALLROUTERS_INIT,
140}; 140};
141struct sockaddr_in6 sin6_sitelocal_allrouters = { 141struct sockaddr_in6 sin6_sitelocal_allrouters = {
142 .sin6_len = sizeof(sin6_sitelocal_allrouters), 142 .sin6_len = sizeof(sin6_sitelocal_allrouters),
143 .sin6_family = AF_INET6, 143 .sin6_family = AF_INET6,
144 .sin6_addr = IN6ADDR_SITELOCAL_ALLROUTERS_INIT, 144 .sin6_addr = IN6ADDR_SITELOCAL_ALLROUTERS_INIT,
145}; 145};
146 146
147int main(int, char *[]); 
148static void set_die(int); 147static void set_die(int);
149static void die(void); 148static void die(void) __dead;
150static void sock_open(void); 149static void sock_open(void);
151static void rtsock_open(void); 150static void rtsock_open(void);
152static void rtadvd_input(void); 151static void rtadvd_input(void);
153static void rs_input(int, struct nd_router_solicit *, 152static void rs_input(int, struct nd_router_solicit *,
154 struct in6_pktinfo *, struct sockaddr_in6 *); 153 struct in6_pktinfo *, struct sockaddr_in6 *);
155static void ra_input(int, struct nd_router_advert *, 154static void ra_input(int, struct nd_router_advert *,
156 struct in6_pktinfo *, struct sockaddr_in6 *); 155 struct in6_pktinfo *, struct sockaddr_in6 *);
157static int prefix_check(struct nd_opt_prefix_info *, struct rainfo *, 156static int prefix_check(struct nd_opt_prefix_info *, struct rainfo *,
158 struct sockaddr_in6 *); 157 struct sockaddr_in6 *);
159static int nd6_options(struct nd_opt_hdr *, int, union nd_opts *, uint32_t); 158static int nd6_options(struct nd_opt_hdr *, int, union nd_opts *, uint32_t);
160static void free_ndopts(union nd_opts *); 159static void free_ndopts(union nd_opts *);
161static void ra_output(struct rainfo *); 160static void ra_output(struct rainfo *);
162static void rtmsg_input(void); 161static void rtmsg_input(void);