From owner-svn-src-head@FreeBSD.ORG Sat Aug 17 19:23:37 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7601910C; Sat, 17 Aug 2013 19:23:37 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 62ADE2757; Sat, 17 Aug 2013 19:23:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7HJNble082546; Sat, 17 Aug 2013 19:23:37 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7HJNZcL082530; Sat, 17 Aug 2013 19:23:35 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201308171923.r7HJNZcL082530@svn.freebsd.org> From: Hiroki Sato Date: Sat, 17 Aug 2013 19:23:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254462 - head/usr.sbin/rtsold X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Aug 2013 19:23:37 -0000 Author: hrs Date: Sat Aug 17 19:23:35 2013 New Revision: 254462 URL: http://svnweb.freebsd.org/changeset/base/254462 Log: - Remove struct ifinfo *iflist. It is no longer used. - Suppress warnings about increase of alignment requirement. Modified: head/usr.sbin/rtsold/dump.c head/usr.sbin/rtsold/if.c head/usr.sbin/rtsold/probe.c head/usr.sbin/rtsold/rtsock.c head/usr.sbin/rtsold/rtsol.c head/usr.sbin/rtsold/rtsold.c head/usr.sbin/rtsold/rtsold.h Modified: head/usr.sbin/rtsold/dump.c ============================================================================== --- head/usr.sbin/rtsold/dump.c Sat Aug 17 18:51:38 2013 (r254461) +++ head/usr.sbin/rtsold/dump.c Sat Aug 17 19:23:35 2013 (r254462) @@ -50,8 +50,6 @@ static FILE *fp; -extern struct ifinfo *iflist; - static void dump_interface_status(void); static const char * const ifstatstr[] = {"IDLE", "DELAY", "PROBE", "DOWN", "TENTATIVE"}; Modified: head/usr.sbin/rtsold/if.c ============================================================================== --- head/usr.sbin/rtsold/if.c Sat Aug 17 18:51:38 2013 (r254461) +++ head/usr.sbin/rtsold/if.c Sat Aug 17 19:23:35 2013 (r254462) @@ -61,7 +61,6 @@ #include #include "rtsold.h" -extern int rssock; static int ifsock; static int get_llflag(const char *); @@ -304,13 +303,13 @@ if_nametosdl(char *name) lim = buf + len; for (next = buf; next < lim; next += ifm->ifm_msglen) { - ifm = (struct if_msghdr *)next; + ifm = (struct if_msghdr *)(void *)next; if (ifm->ifm_type == RTM_IFINFO) { sa = (struct sockaddr *)(ifm + 1); get_rtaddrs(ifm->ifm_addrs, sa, rti_info); if ((sa = rti_info[RTAX_IFP]) != NULL) { if (sa->sa_family == AF_LINK) { - sdl = (struct sockaddr_dl *)sa; + sdl = (struct sockaddr_dl *)(void *)sa; if (strlen(name) != sdl->sdl_nlen) continue; /* not same len */ if (strncmp(&sdl->sdl_data[0], @@ -397,7 +396,7 @@ get_llflag(const char *name) continue; if (ifa->ifa_addr->sa_family != AF_INET6) continue; - sin6 = (struct sockaddr_in6 *)ifa->ifa_addr; + sin6 = (struct sockaddr_in6 *)(void *)ifa->ifa_addr; if (!IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) continue; Modified: head/usr.sbin/rtsold/probe.c ============================================================================== --- head/usr.sbin/rtsold/probe.c Sat Aug 17 18:51:38 2013 (r254461) +++ head/usr.sbin/rtsold/probe.c Sat Aug 17 19:23:35 2013 (r254462) @@ -164,7 +164,7 @@ sendprobe(struct in6_addr *addr, struct cm->cmsg_level = IPPROTO_IPV6; cm->cmsg_type = IPV6_PKTINFO; cm->cmsg_len = CMSG_LEN(sizeof(struct in6_pktinfo)); - pi = (struct in6_pktinfo *)CMSG_DATA(cm); + pi = (struct in6_pktinfo *)(void *)CMSG_DATA(cm); memset(&pi->ipi6_addr, 0, sizeof(pi->ipi6_addr)); /*XXX*/ pi->ipi6_ifindex = ifindex; Modified: head/usr.sbin/rtsold/rtsock.c ============================================================================== --- head/usr.sbin/rtsold/rtsock.c Sat Aug 17 18:51:38 2013 (r254461) +++ head/usr.sbin/rtsold/rtsock.c Sat Aug 17 19:23:35 2013 (r254462) @@ -103,7 +103,7 @@ rtsock_input(int s) lim = msg + n; for (next = msg; next < lim; next += len) { - rtm = (struct rt_msghdr *)next; + rtm = (struct rt_msghdr *)(void *)next; if (lim - next < lenlim) break; len = rtm->rtm_msglen; @@ -138,7 +138,7 @@ static int rtsock_input_ifannounce(int s __unused, struct rt_msghdr *rtm, char *lim) { struct if_announcemsghdr *ifan; - struct ifinfo *ifinfo; + struct ifinfo *ifi; ifan = (struct if_announcemsghdr *)rtm; if ((char *)(ifan + 1) > lim) @@ -158,14 +158,14 @@ rtsock_input_ifannounce(int s __unused, case IFAN_DEPARTURE: warnmsg(LOG_WARNING, __func__, "interface %s removed", ifan->ifan_name); - ifinfo = find_ifinfo(ifan->ifan_index); - if (ifinfo) { + ifi = find_ifinfo(ifan->ifan_index); + if (ifi) { if (dflag > 1) { warnmsg(LOG_INFO, __func__, "bring interface %s to DOWN state", ifan->ifan_name); } - ifinfo->state = IFS_DOWN; + ifi->state = IFS_DOWN; } break; } Modified: head/usr.sbin/rtsold/rtsol.c ============================================================================== --- head/usr.sbin/rtsold/rtsol.c Sat Aug 17 18:51:38 2013 (r254461) +++ head/usr.sbin/rtsold/rtsol.c Sat Aug 17 19:23:35 2013 (r254462) @@ -205,7 +205,7 @@ sendpacket(struct ifinfo *ifi) cm->cmsg_level = IPPROTO_IPV6; cm->cmsg_type = IPV6_PKTINFO; cm->cmsg_len = CMSG_LEN(sizeof(struct in6_pktinfo)); - pi = (struct in6_pktinfo *)CMSG_DATA(cm); + pi = (struct in6_pktinfo *)(void *)CMSG_DATA(cm); memset(&pi->ipi6_addr, 0, sizeof(pi->ipi6_addr)); /*XXX*/ pi->ipi6_ifindex = ifi->sdl->sdl_index; @@ -275,13 +275,13 @@ rtsol_input(int s) if (cm->cmsg_level == IPPROTO_IPV6 && cm->cmsg_type == IPV6_PKTINFO && cm->cmsg_len == CMSG_LEN(sizeof(struct in6_pktinfo))) { - pi = (struct in6_pktinfo *)(CMSG_DATA(cm)); + pi = (struct in6_pktinfo *)(void *)(CMSG_DATA(cm)); ifindex = pi->ipi6_ifindex; } if (cm->cmsg_level == IPPROTO_IPV6 && cm->cmsg_type == IPV6_HOPLIMIT && cm->cmsg_len == CMSG_LEN(sizeof(int))) - hlimp = (int *)CMSG_DATA(cm); + hlimp = (int *)(void *)CMSG_DATA(cm); } if (ifindex == 0) { @@ -417,7 +417,7 @@ rtsol_input(int s) break; } - addr = (struct in6_addr *)(raoptp + sizeof(*rdnss)); + addr = (struct in6_addr *)(void *)(raoptp + sizeof(*rdnss)); while ((char *)addr < (char *)RA_OPT_NEXT_HDR(raoptp)) { if (inet_ntop(AF_INET6, addr, ntopbuf, sizeof(ntopbuf)) == NULL) { Modified: head/usr.sbin/rtsold/rtsold.c ============================================================================== --- head/usr.sbin/rtsold/rtsold.c Sat Aug 17 18:51:38 2013 (r254461) +++ head/usr.sbin/rtsold/rtsold.c Sat Aug 17 19:23:35 2013 (r254462) @@ -67,7 +67,6 @@ #define RTSOL_DUMPFILE "/var/run/rtsold.dump"; #define RTSOL_PIDFILE "/var/run/rtsold.pid"; -struct ifinfo *iflist; struct timespec tm_max; static int log_upto = 999; static int fflag = 0; Modified: head/usr.sbin/rtsold/rtsold.h ============================================================================== --- head/usr.sbin/rtsold/rtsold.h Sat Aug 17 18:51:38 2013 (r254461) +++ head/usr.sbin/rtsold/rtsold.h Sat Aug 17 19:23:35 2013 (r254462) @@ -176,6 +176,7 @@ extern int getinet6sysctl(int); extern int setinet6sysctl(int, int); /* rtsol.c */ +extern int rssock; extern int sockopen(void); extern void sendpacket(struct ifinfo *); extern void rtsol_input(int);