Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/rtadvd byebye __FUNCTIION__. sync w/kame



details:   https://anonhg.NetBSD.org/src/rev/e44ac8fab3f3
branches:  trunk
changeset: 533908:e44ac8fab3f3
user:      itojun <itojun%NetBSD.org@localhost>
date:      Wed Jul 10 21:11:43 2002 +0000

description:
byebye __FUNCTIION__.  sync w/kame

diffstat:

 usr.sbin/rtadvd/advcap.c |    4 +-
 usr.sbin/rtadvd/config.c |   76 +++++++++++-----------
 usr.sbin/rtadvd/dump.c   |    4 +-
 usr.sbin/rtadvd/if.c     |   22 +++---
 usr.sbin/rtadvd/rrenum.c |   40 ++++++------
 usr.sbin/rtadvd/rtadvd.c |  150 +++++++++++++++++++++++-----------------------
 usr.sbin/rtadvd/timer.c  |   10 +-
 7 files changed, 153 insertions(+), 153 deletions(-)

diffs (truncated from 1343 to 300 lines):

diff -r 278ad191cd74 -r e44ac8fab3f3 usr.sbin/rtadvd/advcap.c
--- a/usr.sbin/rtadvd/advcap.c  Wed Jul 10 21:01:06 2002 +0000
+++ b/usr.sbin/rtadvd/advcap.c  Wed Jul 10 21:11:43 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: advcap.c,v 1.7 2002/05/29 14:40:31 itojun Exp $        */
+/*     $NetBSD: advcap.c,v 1.8 2002/07/10 21:11:43 itojun Exp $        */
 /*     $KAME: advcap.c,v 1.9 2002/05/29 14:28:35 itojun Exp $  */
 
 /*
@@ -139,7 +139,7 @@
        }
        if (tf < 0) {
                syslog(LOG_INFO,
-                      "<%s> open: %s", __FUNCTION__, strerror(errno));
+                      "<%s> open: %s", __func__, strerror(errno));
                return (-2);
        }
        for (;;) {
diff -r 278ad191cd74 -r e44ac8fab3f3 usr.sbin/rtadvd/config.c
--- a/usr.sbin/rtadvd/config.c  Wed Jul 10 21:01:06 2002 +0000
+++ b/usr.sbin/rtadvd/config.c  Wed Jul 10 21:11:43 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: config.c,v 1.17 2002/06/15 01:28:39 matt Exp $ */
+/*     $NetBSD: config.c,v 1.18 2002/07/10 21:11:43 itojun Exp $       */
 /*     $KAME: config.c,v 1.62 2002/05/29 10:13:10 itojun Exp $ */
 
 /*
@@ -105,7 +105,7 @@
                       "<%s> %s isn't defined in the configuration file"
                       " or the configuration file doesn't exist."
                       " Treat it as default",
-                       __FUNCTION__, intface);
+                       __func__, intface);
        }
 
        tmp = (struct rainfo *)malloc(sizeof(*ralist));
@@ -127,7 +127,7 @@
                if ((tmp->sdl = if_nametosdl(intface)) == NULL) {
                        syslog(LOG_ERR,
                               "<%s> can't get information of %s",
-                              __FUNCTION__, intface);
+                              __func__, intface);
                        exit(1);
                }
                tmp->ifindex = tmp->sdl->sdl_index;
@@ -138,7 +138,7 @@
                tmp->phymtu = IPV6_MMTU;
                syslog(LOG_WARNING,
                       "<%s> can't get interface mtu of %s. Treat as %d",
-                      __FUNCTION__, intface, IPV6_MMTU);
+                      __func__, intface, IPV6_MMTU);
        }
 
        /*
@@ -148,7 +148,7 @@
        if (val < MIN_MAXINTERVAL || val > MAX_MAXINTERVAL) {
                syslog(LOG_ERR,
                       "<%s> maxinterval (%ld) on %s is invalid "
-                      "(must be between %e and %u)", __FUNCTION__, val,
+                      "(must be between %e and %u)", __func__, val,
                       intface, MIN_MAXINTERVAL, MAX_MAXINTERVAL);
                exit(1);
        }
@@ -158,7 +158,7 @@
                syslog(LOG_ERR,
                       "<%s> mininterval (%ld) on %s is invalid "
                       "(must be between %e and %d)",
-                      __FUNCTION__, val, intface, MIN_MININTERVAL,
+                      __func__, val, intface, MIN_MININTERVAL,
                       (tmp->maxinterval * 3) / 4);
                exit(1);
        }
@@ -177,7 +177,7 @@
        tmp->rtpref = val & ND_RA_FLAG_RTPREF_MASK;
        if (tmp->rtpref == ND_RA_FLAG_RTPREF_RSV) {
                syslog(LOG_ERR, "<%s> invalid router preference (%02x) on %s",
-                      __FUNCTION__, tmp->rtpref, intface);
+                      __func__, tmp->rtpref, intface);
                exit(1);
        }
 
@@ -186,7 +186,7 @@
                syslog(LOG_ERR,
                       "<%s> router lifetime (%ld) on %s is invalid "
                       "(must be 0 or between %d and %d)",
-                      __FUNCTION__, val, intface,
+                      __func__, val, intface,
                       tmp->maxinterval, MAXROUTERLIFETIME);
                exit(1);
        }
@@ -203,7 +203,7 @@
                       "<%s> non zero router lifetime is specified for %s, "
                       "which must not be allowed for hosts.  you must "
                       "change router lifetime or enable IPv6 forwarding.",
-                      __FUNCTION__, intface);
+                      __func__, intface);
                exit(1);
        }
        tmp->lifetime = val & 0xffff;
@@ -213,7 +213,7 @@
                syslog(LOG_ERR,
                       "<%s> reachable time (%ld) on %s is invalid "
                       "(must be no greater than %d)",
-                      __FUNCTION__, val, intface, MAXREACHABLETIME);
+                      __func__, val, intface, MAXREACHABLETIME);
                exit(1);
        }
        tmp->reachabletime = (u_int32_t)val;
@@ -221,7 +221,7 @@
        MAYHAVE(val64, "retrans", DEF_ADVRETRANSTIMER);
        if (val64 < 0 || val64 > 0xffffffff) {
                syslog(LOG_ERR, "<%s> retrans time (%lld) on %s out of range",
-                      __FUNCTION__, (long long)val64, intface);
+                      __func__, (long long)val64, intface);
                exit(1);
        }
        tmp->retranstimer = (u_int32_t)val64;
@@ -229,7 +229,7 @@
        if (agetnum("hapref") != -1 || agetnum("hatime") != -1) {
                syslog(LOG_ERR,
                       "<%s> mobile-ip6 configuration not supported",
-                      __FUNCTION__);
+                      __func__);
                exit(1);
        }
        /* prefix information */
@@ -248,7 +248,7 @@
                        syslog(LOG_ERR,
                               "<%s> conflicting prefix configuration for %s: "
                               "automatic and manual config at the same time",
-                              __FUNCTION__, intface);
+                              __func__, intface);
                        exit(1);
                }
                get_prefix(tmp);
@@ -263,7 +263,7 @@
                        if ((pfx = malloc(sizeof(struct prefix))) == NULL) {
                                syslog(LOG_ERR,
                                       "<%s> can't allocate enough memory",
-                                      __FUNCTION__);
+                                      __func__);
                                exit(1);
                        }
                        memset(pfx, 0, sizeof(*pfx));
@@ -280,28 +280,28 @@
                                syslog(LOG_ERR,
                                       "<%s> need %s as a prefix for "
                                       "interface %s",
-                                      __FUNCTION__, entbuf, intface);
+                                      __func__, entbuf, intface);
                                exit(1);
                        }
                        if (inet_pton(AF_INET6, addr,
                                      &pfx->prefix) != 1) {
                                syslog(LOG_ERR,
                                       "<%s> inet_pton failed for %s",
-                                      __FUNCTION__, addr);
+                                      __func__, addr);
                                exit(1);
                        }
                        if (IN6_IS_ADDR_MULTICAST(&pfx->prefix)) {
                                syslog(LOG_ERR,
                                       "<%s> multicast prefix (%s) must "
                                       "not be advertised on %s",
-                                      __FUNCTION__, addr, intface);
+                                      __func__, addr, intface);
                                exit(1);
                        }
                        if (IN6_IS_ADDR_LINKLOCAL(&pfx->prefix))
                                syslog(LOG_NOTICE,
                                       "<%s> link-local prefix (%s) will be"
                                       " advertised on %s",
-                                      __FUNCTION__, addr, intface);
+                                      __func__, addr, intface);
 
                        makeentry(entbuf, sizeof(entbuf), i, "prefixlen",
                            added);
@@ -309,7 +309,7 @@
                        if (val < 0 || val > 128) {
                                syslog(LOG_ERR, "<%s> prefixlen (%ld) for %s "
                                       "on %s out of range",
-                                      __FUNCTION__, val, addr, intface);
+                                      __func__, val, addr, intface);
                                exit(1);
                        }
                        pfx->prefixlen = (int)val;
@@ -326,7 +326,7 @@
                        if (val64 < 0 || val64 > 0xffffffff) {
                                syslog(LOG_ERR, "<%s> vltime (%lld) for "
                                    "%s/%d on %s is out of range",
-                                   __FUNCTION__, (long long)val64,
+                                   __func__, (long long)val64,
                                    addr, pfx->prefixlen, intface);
                                exit(1);
                        }
@@ -346,7 +346,7 @@
                                syslog(LOG_ERR,
                                    "<%s> pltime (%lld) for %s/%d on %s "
                                    "is out of range",
-                                   __FUNCTION__, (long long)val64,
+                                   __func__, (long long)val64,
                                    addr, pfx->prefixlen, intface);
                                exit(1);
                        }
@@ -366,7 +366,7 @@
        if (val < 0 || val > 0xffffffff) {
                syslog(LOG_ERR,
                       "<%s> mtu (%ld) on %s out of range",
-                      __FUNCTION__, val, intface);
+                      __func__, val, intface);
                exit(1);
        }
        tmp->linkmtu = (u_int32_t)val;
@@ -381,7 +381,7 @@
                syslog(LOG_ERR,
                       "<%s> advertised link mtu (%lu) on %s is invalid (must "
                       "be between least MTU (%d) and physical link MTU (%d)",
-                      __FUNCTION__, (unsigned long)tmp->linkmtu, intface,
+                      __func__, (unsigned long)tmp->linkmtu, intface,
                       IPV6_MMTU, tmp->phymtu);
                exit(1);
        }
@@ -417,7 +417,7 @@
        if (getifaddrs(&ifap) < 0) {
                syslog(LOG_ERR,
                       "<%s> can't get interface addresses",
-                      __FUNCTION__);
+                      __func__);
                exit(1);
        }
        for (ifa = ifap; ifa; ifa = ifa->ifa_next) {
@@ -437,7 +437,7 @@
                if (plen <= 0 || plen > 128) {
                        syslog(LOG_ERR, "<%s> failed to get prefixlen "
                               "or prefix is invalid",
-                              __FUNCTION__);
+                              __func__);
                        exit(1);
                }
                if (plen == 128)        /* XXX */
@@ -451,7 +451,7 @@
                if ((pp = malloc(sizeof(*pp))) == NULL) {
                        syslog(LOG_ERR,
                               "<%s> can't get allocate buffer for prefix",
-                              __FUNCTION__);
+                              __func__);
                        exit(1);
                }
                memset(pp, 0, sizeof(*pp));
@@ -469,12 +469,12 @@
                }
                if (!inet_ntop(AF_INET6, &pp->prefix, ntopbuf,
                    sizeof(ntopbuf))) {
-                       syslog(LOG_ERR, "<%s> inet_ntop failed", __FUNCTION__);
+                       syslog(LOG_ERR, "<%s> inet_ntop failed", __func__);
                        exit(1);
                }
                syslog(LOG_DEBUG,
                       "<%s> add %s/%d to prefix list on %s",
-                      __FUNCTION__, ntopbuf, pp->prefixlen, rai->ifname);
+                      __func__, ntopbuf, pp->prefixlen, rai->ifname);
 
                /* set other fields with protocol defaults */
                pp->validlifetime = DEF_ADVVALIDLIFETIME;
@@ -527,7 +527,7 @@
 
        if ((prefix = malloc(sizeof(*prefix))) == NULL) {
                syslog(LOG_ERR, "<%s> memory allocation failed",
-                      __FUNCTION__);
+                      __func__);
                return;         /* XXX: error or exit? */
        }
        memset(prefix, 0, sizeof(*prefix));
@@ -542,7 +542,7 @@
        insque(prefix, &rai->prefix);
 
        syslog(LOG_DEBUG, "<%s> new prefix %s/%d was added on %s",
-              __FUNCTION__, inet_ntop(AF_INET6, &ipr->ipr_prefix.sin6_addr,
+              __func__, inet_ntop(AF_INET6, &ipr->ipr_prefix.sin6_addr,
                                       ntopbuf, INET6_ADDRSTRLEN),
               ipr->ipr_plen, rai->ifname);
 
@@ -574,7 +574,7 @@
 
        remque(prefix);
        syslog(LOG_DEBUG, "<%s> prefix %s/%d was deleted on %s",
-              __FUNCTION__, inet_ntop(AF_INET6, &prefix->prefix,
+              __func__, inet_ntop(AF_INET6, &prefix->prefix,
                                       ntopbuf, INET6_ADDRSTRLEN),
               prefix->prefixlen, rai->ifname);
        free(prefix);
@@ -594,13 +594,13 @@
        int s;
 
        if ((s = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) {
-               syslog(LOG_ERR, "<%s> socket: %s", __FUNCTION__,
+               syslog(LOG_ERR, "<%s> socket: %s", __func__,
                       strerror(errno));
                exit(1);
        }



Home | Main Index | Thread Index | Old Index