summaryrefslogtreecommitdiff
path: root/usr.sbin/rtsold/rtsol.c
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2002-06-10 19:57:36 +0000
committerMarc Espie <espie@cvs.openbsd.org>2002-06-10 19:57:36 +0000
commit35fd31a5849815bd4c982dfe259e378df50ccb9f (patch)
tree823dedb2be9a4ffb9ae1ce239d21c19a346f6318 /usr.sbin/rtsold/rtsol.c
parent6c92a002e822dbdbbbac9bc364854c2a215f8842 (diff)
Kill __FUNCTION__.
ok itojun@
Diffstat (limited to 'usr.sbin/rtsold/rtsol.c')
-rw-r--r--usr.sbin/rtsold/rtsol.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/usr.sbin/rtsold/rtsol.c b/usr.sbin/rtsold/rtsol.c
index a4052ac67ca..900563dfacc 100644
--- a/usr.sbin/rtsold/rtsol.c
+++ b/usr.sbin/rtsold/rtsol.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtsol.c,v 1.8 2002/05/31 21:24:28 itojun Exp $ */
+/* $OpenBSD: rtsol.c,v 1.9 2002/06/10 19:57:35 espie Exp $ */
/* $KAME: rtsol.c,v 1.15 2002/05/31 10:10:03 itojun Exp $ */
/*
@@ -80,12 +80,12 @@ sockopen()
sndcmsglen = rcvcmsglen = CMSG_SPACE(sizeof(struct in6_pktinfo)) +
CMSG_SPACE(sizeof(int));
if (rcvcmsgbuf == NULL && (rcvcmsgbuf = malloc(rcvcmsglen)) == NULL) {
- warnmsg(LOG_ERR, __FUNCTION__,
+ warnmsg(LOG_ERR, __func__,
"malloc for receive msghdr failed");
return(-1);
}
if (sndcmsgbuf == NULL && (sndcmsgbuf = malloc(sndcmsglen)) == NULL) {
- warnmsg(LOG_ERR, __FUNCTION__,
+ warnmsg(LOG_ERR, __func__,
"malloc for send msghdr failed");
return(-1);
}
@@ -94,13 +94,13 @@ sockopen()
sin6_allrouters.sin6_len = sizeof(sin6_allrouters);
if (inet_pton(AF_INET6, ALLROUTER,
&sin6_allrouters.sin6_addr.s6_addr) != 1) {
- warnmsg(LOG_ERR, __FUNCTION__, "inet_pton failed for %s",
+ warnmsg(LOG_ERR, __func__, "inet_pton failed for %s",
ALLROUTER);
return(-1);
}
if ((rssock = socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6)) < 0) {
- warnmsg(LOG_ERR, __FUNCTION__, "socket: %s", strerror(errno));
+ warnmsg(LOG_ERR, __func__, "socket: %s", strerror(errno));
return(-1);
}
@@ -109,14 +109,14 @@ sockopen()
#ifdef IPV6_RECVPKTINFO
if (setsockopt(rssock, IPPROTO_IPV6, IPV6_RECVPKTINFO, &on,
sizeof(on)) < 0) {
- warnmsg(LOG_ERR, __FUNCTION__, "IPV6_RECVPKTINFO: %s",
+ warnmsg(LOG_ERR, __func__, "IPV6_RECVPKTINFO: %s",
strerror(errno));
exit(1);
}
#else /* old adv. API */
if (setsockopt(rssock, IPPROTO_IPV6, IPV6_PKTINFO, &on,
sizeof(on)) < 0) {
- warnmsg(LOG_ERR, __FUNCTION__, "IPV6_PKTINFO: %s",
+ warnmsg(LOG_ERR, __func__, "IPV6_PKTINFO: %s",
strerror(errno));
exit(1);
}
@@ -127,14 +127,14 @@ sockopen()
#ifdef IPV6_RECVHOPLIMIT
if (setsockopt(rssock, IPPROTO_IPV6, IPV6_RECVHOPLIMIT, &on,
sizeof(on)) < 0) {
- warnmsg(LOG_ERR, __FUNCTION__, "IPV6_RECVHOPLIMIT: %s",
+ warnmsg(LOG_ERR, __func__, "IPV6_RECVHOPLIMIT: %s",
strerror(errno));
exit(1);
}
#else /* old adv. API */
if (setsockopt(rssock, IPPROTO_IPV6, IPV6_HOPLIMIT, &on,
sizeof(on)) < 0) {
- warnmsg(LOG_ERR, __FUNCTION__, "IPV6_HOPLIMIT: %s",
+ warnmsg(LOG_ERR, __func__, "IPV6_HOPLIMIT: %s",
strerror(errno));
exit(1);
}
@@ -145,7 +145,7 @@ sockopen()
ICMP6_FILTER_SETPASS(ND_ROUTER_ADVERT, &filt);
if (setsockopt(rssock, IPPROTO_ICMPV6, ICMP6_FILTER, &filt,
sizeof(filt)) == -1) {
- warnmsg(LOG_ERR, __FUNCTION__, "setsockopt(ICMP6_FILTER): %s",
+ warnmsg(LOG_ERR, __func__, "setsockopt(ICMP6_FILTER): %s",
strerror(errno));
return(-1);
}
@@ -202,7 +202,7 @@ sendpacket(struct ifinfo *ifinfo)
cm->cmsg_len = CMSG_LEN(sizeof(int));
memcpy(CMSG_DATA(cm), &hoplimit, sizeof(int));
- warnmsg(LOG_DEBUG, __FUNCTION__,
+ warnmsg(LOG_DEBUG, __func__,
"send RS on %s, whose state is %d",
ifinfo->ifname, ifinfo->state);
@@ -214,7 +214,7 @@ sendpacket(struct ifinfo *ifinfo)
* network cards on a mobile node. We ignore it.
*/
if (errno != ENETDOWN || dflag > 0)
- warnmsg(LOG_ERR, __FUNCTION__, "sendmsg on %s: %s",
+ warnmsg(LOG_ERR, __func__, "sendmsg on %s: %s",
ifinfo->ifname, strerror(errno));
}
@@ -234,7 +234,7 @@ rtsol_input(int s)
/* get message */
if ((i = recvmsg(s, &rcvmhdr, 0)) < 0) {
- warnmsg(LOG_ERR, __FUNCTION__, "recvmsg: %s", strerror(errno));
+ warnmsg(LOG_ERR, __func__, "recvmsg: %s", strerror(errno));
return;
}
@@ -254,18 +254,18 @@ rtsol_input(int s)
}
if (ifindex == 0) {
- warnmsg(LOG_ERR, __FUNCTION__,
+ warnmsg(LOG_ERR, __func__,
"failed to get receiving interface");
return;
}
if (hlimp == NULL) {
- warnmsg(LOG_ERR, __FUNCTION__,
+ warnmsg(LOG_ERR, __func__,
"failed to get receiving hop limit");
return;
}
if (i < sizeof(struct nd_router_advert)) {
- warnmsg(LOG_ERR, __FUNCTION__,
+ warnmsg(LOG_ERR, __func__,
"packet size(%d) is too short", i);
return;
}
@@ -273,7 +273,7 @@ rtsol_input(int s)
icp = (struct icmp6_hdr *)rcvmhdr.msg_iov[0].iov_base;
if (icp->icmp6_type != ND_ROUTER_ADVERT) {
- warnmsg(LOG_ERR, __FUNCTION__,
+ warnmsg(LOG_ERR, __func__,
"invalid icmp type(%d) from %s on %s", icp->icmp6_type,
inet_ntop(AF_INET6, &from.sin6_addr, ntopbuf,
INET6_ADDRSTRLEN),
@@ -282,7 +282,7 @@ rtsol_input(int s)
}
if (icp->icmp6_code != 0) {
- warnmsg(LOG_ERR, __FUNCTION__,
+ warnmsg(LOG_ERR, __func__,
"invalid icmp code(%d) from %s on %s", icp->icmp6_code,
inet_ntop(AF_INET6, &from.sin6_addr, ntopbuf,
INET6_ADDRSTRLEN),
@@ -291,7 +291,7 @@ rtsol_input(int s)
}
if (*hlimp != 255) {
- warnmsg(LOG_NOTICE, __FUNCTION__,
+ warnmsg(LOG_NOTICE, __func__,
"invalid RA with hop limit(%d) from %s on %s",
*hlimp,
inet_ntop(AF_INET6, &from.sin6_addr, ntopbuf,
@@ -301,7 +301,7 @@ rtsol_input(int s)
}
if (pi && !IN6_IS_ADDR_LINKLOCAL(&from.sin6_addr)) {
- warnmsg(LOG_NOTICE, __FUNCTION__,
+ warnmsg(LOG_NOTICE, __func__,
"invalid RA with non link-local source from %s on %s",
inet_ntop(AF_INET6, &from.sin6_addr, ntopbuf,
INET6_ADDRSTRLEN),
@@ -312,7 +312,7 @@ rtsol_input(int s)
/* xxx: more validation? */
if ((ifi = find_ifinfo(pi->ipi6_ifindex)) == NULL) {
- warnmsg(LOG_NOTICE, __FUNCTION__,
+ warnmsg(LOG_NOTICE, __func__,
"received RA from %s on an unexpeced IF(%s)",
inet_ntop(AF_INET6, &from.sin6_addr, ntopbuf,
INET6_ADDRSTRLEN),
@@ -320,7 +320,7 @@ rtsol_input(int s)
return;
}
- warnmsg(LOG_DEBUG, __FUNCTION__,
+ warnmsg(LOG_DEBUG, __func__,
"received RA from %s on %s, state is %d",
inet_ntop(AF_INET6, &from.sin6_addr, ntopbuf, INET6_ADDRSTRLEN),
ifi->ifname, ifi->state);