summaryrefslogtreecommitdiffstats
path: root/sys/netgraph
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netgraph')
-rw-r--r--sys/netgraph/ng_UI.c4
-rw-r--r--sys/netgraph/ng_async.c6
-rw-r--r--sys/netgraph/ng_base.c10
-rw-r--r--sys/netgraph/ng_bpf.c2
-rw-r--r--sys/netgraph/ng_bridge.c20
-rw-r--r--sys/netgraph/ng_eiface.c6
-rw-r--r--sys/netgraph/ng_ether.c12
-rw-r--r--sys/netgraph/ng_frame_relay.c2
-rw-r--r--sys/netgraph/ng_gif.c12
-rw-r--r--sys/netgraph/ng_gif_demux.c2
-rw-r--r--sys/netgraph/ng_iface.c16
-rw-r--r--sys/netgraph/ng_ksocket.c4
-rw-r--r--sys/netgraph/ng_mppc.c16
-rw-r--r--sys/netgraph/ng_one2many.c14
-rw-r--r--sys/netgraph/ng_parse.c14
-rw-r--r--sys/netgraph/ng_ppp.c22
-rw-r--r--sys/netgraph/ng_pppoe.c2
-rw-r--r--sys/netgraph/ng_pptpgre.c12
-rw-r--r--sys/netgraph/ng_rfc1490.c4
-rw-r--r--sys/netgraph/ng_socket.c2
-rw-r--r--sys/netgraph/ng_split.c2
-rw-r--r--sys/netgraph/ng_tee.c4
-rw-r--r--sys/netgraph/ng_tty.c8
-rw-r--r--sys/netgraph/ng_vjc.c6
24 files changed, 101 insertions, 101 deletions
diff --git a/sys/netgraph/ng_UI.c b/sys/netgraph/ng_UI.c
index fdf03bd..e0733bc 100644
--- a/sys/netgraph/ng_UI.c
+++ b/sys/netgraph/ng_UI.c
@@ -200,7 +200,7 @@ ng_UI_rcvdata(hook_p hook, item_p item)
mtod(m, u_char *)[0] = HDLC_UI;
NG_FWD_NEW_DATA(error, item, priv->downlink, m); /* m -> NULL */
} else
- panic(__FUNCTION__);
+ panic(__func__);
done:
NG_FREE_M(m); /* does nothing if m == NULL */
@@ -237,7 +237,7 @@ ng_UI_disconnect(hook_p hook)
else if (hook == priv->uplink)
priv->uplink = NULL;
else
- panic(__FUNCTION__);
+ panic(__func__);
/*
* If we are not already shutting down,
* and we have no more hooks, then DO shut down.
diff --git a/sys/netgraph/ng_async.c b/sys/netgraph/ng_async.c
index 9208447..f88fd70 100644
--- a/sys/netgraph/ng_async.c
+++ b/sys/netgraph/ng_async.c
@@ -258,7 +258,7 @@ nga_rcvdata(hook_p hook, item_p item)
return (nga_rcv_sync(sc, item));
if (hook == sc->async)
return (nga_rcv_async(sc, item));
- panic(__FUNCTION__);
+ panic(__func__);
}
/*
@@ -374,9 +374,9 @@ nga_disconnect(hook_p hook)
else if (hook == sc->sync)
hookp = &sc->sync;
else
- panic(__FUNCTION__);
+ panic(__func__);
if (!*hookp)
- panic(__FUNCTION__ "2");
+ panic("%s 2", __func__);
*hookp = NULL;
bzero(&sc->stats, sizeof(sc->stats));
sc->lasttime = 0;
diff --git a/sys/netgraph/ng_base.c b/sys/netgraph/ng_base.c
index af11cb9..00b316b 100644
--- a/sys/netgraph/ng_base.c
+++ b/sys/netgraph/ng_base.c
@@ -336,12 +336,12 @@ static ng_ID_t nextID = 1;
int total; \
\
if (((m)->m_flags & M_PKTHDR) == 0) \
- panic("%s: !PKTHDR", __FUNCTION__); \
+ panic("%s: !PKTHDR", __func__); \
for (total = 0, n = (m); n != NULL; n = n->m_next) \
total += n->m_len; \
if ((m)->m_pkthdr.len != total) { \
panic("%s: %d != %d", \
- __FUNCTION__, (m)->m_pkthdr.len, total); \
+ __func__, (m)->m_pkthdr.len, total); \
} \
} while (0)
#else
@@ -2590,7 +2590,7 @@ ng_generic_msg(node_p here, item_p item, hook_p lasthook)
if (ni->hooks >= nhooks) {
log(LOG_ERR, "%s: number of %s changed\n",
- __FUNCTION__, "hooks");
+ __func__, "hooks");
break;
}
if (NG_HOOK_NOT_VALID(hook))
@@ -2645,7 +2645,7 @@ ng_generic_msg(node_p here, item_p item, hook_p lasthook)
if (nl->numnames >= num) {
log(LOG_ERR, "%s: number of %s changed\n",
- __FUNCTION__, "nodes");
+ __func__, "nodes");
break;
}
if (NG_NODE_NOT_VALID(node))
@@ -2693,7 +2693,7 @@ ng_generic_msg(node_p here, item_p item, hook_p lasthook)
if (tl->numtypes >= num) {
log(LOG_ERR, "%s: number of %s changed\n",
- __FUNCTION__, "types");
+ __func__, "types");
break;
}
strncpy(tp->type_name, type->name, NG_TYPELEN);
diff --git a/sys/netgraph/ng_bpf.c b/sys/netgraph/ng_bpf.c
index 54a6325..8977cec 100644
--- a/sys/netgraph/ng_bpf.c
+++ b/sys/netgraph/ng_bpf.c
@@ -460,7 +460,7 @@ ng_bpf_disconnect(hook_p hook)
{
const hinfo_p hip = NG_HOOK_PRIVATE(hook);
- KASSERT(hip != NULL, ("%s: null info", __FUNCTION__));
+ KASSERT(hip != NULL, ("%s: null info", __func__));
FREE(hip->prog, M_NETGRAPH_BPF);
bzero(hip, sizeof(*hip));
FREE(hip, M_NETGRAPH_BPF);
diff --git a/sys/netgraph/ng_bridge.c b/sys/netgraph/ng_bridge.c
index b549517..9d93201 100644
--- a/sys/netgraph/ng_bridge.c
+++ b/sys/netgraph/ng_bridge.c
@@ -533,9 +533,9 @@ ng_bridge_rcvdata(hook_p hook, item_p item)
/* Get link number */
linkNum = (int)NG_HOOK_PRIVATE(hook);
KASSERT(linkNum >= 0 && linkNum < NG_BRIDGE_MAX_LINKS,
- ("%s: linkNum=%u", __FUNCTION__, linkNum));
+ ("%s: linkNum=%u", __func__, linkNum));
link = priv->links[linkNum];
- KASSERT(link != NULL, ("%s: link%d null", __FUNCTION__, linkNum));
+ KASSERT(link != NULL, ("%s: link%d null", __func__, linkNum));
/* Sanity check packet and pull up header */
if (m->m_pkthdr.len < ETHER_HDR_LEN) {
@@ -654,7 +654,7 @@ ng_bridge_rcvdata(hook_p hook, item_p item)
/* If destination same as incoming link, do nothing */
KASSERT(destLink != NULL,
- ("%s: link%d null", __FUNCTION__, host->linkNum));
+ ("%s: link%d null", __func__, host->linkNum));
if (destLink == link) {
NG_FREE_ITEM(item);
NG_FREE_M(m);
@@ -768,7 +768,7 @@ ng_bridge_shutdown(node_p node)
KASSERT(priv->numLinks == 0 && priv->numHosts == 0,
("%s: numLinks=%d numHosts=%d",
- __FUNCTION__, priv->numLinks, priv->numHosts));
+ __func__, priv->numLinks, priv->numHosts));
FREE(priv->tab, M_NETGRAPH_BRIDGE);
FREE(priv, M_NETGRAPH_BRIDGE);
NG_NODE_SET_PRIVATE(node, NULL);
@@ -788,13 +788,13 @@ ng_bridge_disconnect(hook_p hook)
/* Get link number */
linkNum = (int)NG_HOOK_PRIVATE(hook);
KASSERT(linkNum >= 0 && linkNum < NG_BRIDGE_MAX_LINKS,
- ("%s: linkNum=%u", __FUNCTION__, linkNum));
+ ("%s: linkNum=%u", __func__, linkNum));
/* Remove all hosts associated with this link */
ng_bridge_remove_hosts(priv, linkNum);
/* Free associated link information */
- KASSERT(priv->links[linkNum] != NULL, ("%s: no link", __FUNCTION__));
+ KASSERT(priv->links[linkNum] != NULL, ("%s: no link", __func__));
FREE(priv->links[linkNum], M_NETGRAPH_BRIDGE);
priv->links[linkNum] = NULL;
priv->numLinks--;
@@ -851,7 +851,7 @@ ng_bridge_put(priv_p priv, const u_char *addr, int linkNum)
/* Assert that entry does not already exist in hashtable */
SLIST_FOREACH(hent, &priv->tab[bucket], next) {
KASSERT(!ETHER_EQUAL(hent->host.addr, addr),
- ("%s: entry %6D exists in table", __FUNCTION__, addr, ":"));
+ ("%s: entry %6D exists in table", __func__, addr, ":"));
}
#endif
@@ -998,7 +998,7 @@ ng_bridge_timeout(void *arg)
/* Make sure host's link really exists */
KASSERT(priv->links[hent->host.linkNum] != NULL,
("%s: host %6D on nonexistent link %d\n",
- __FUNCTION__, hent->host.addr, ":",
+ __func__, hent->host.addr, ":",
hent->host.linkNum));
/* Remove hosts we haven't heard from in a while */
@@ -1015,7 +1015,7 @@ ng_bridge_timeout(void *arg)
}
}
KASSERT(priv->numHosts == counter,
- ("%s: hosts: %d != %d", __FUNCTION__, priv->numHosts, counter));
+ ("%s: hosts: %d != %d", __func__, priv->numHosts, counter));
/* Decrease table size if necessary */
ng_bridge_rehash(priv);
@@ -1038,7 +1038,7 @@ ng_bridge_timeout(void *arg)
}
}
KASSERT(priv->numLinks == counter,
- ("%s: links: %d != %d", __FUNCTION__, priv->numLinks, counter));
+ ("%s: links: %d != %d", __func__, priv->numLinks, counter));
/* Done */
splx(s);
diff --git a/sys/netgraph/ng_eiface.c b/sys/netgraph/ng_eiface.c
index 2959d93..26e5f1d 100644
--- a/sys/netgraph/ng_eiface.c
+++ b/sys/netgraph/ng_eiface.c
@@ -163,7 +163,7 @@ ng_eiface_get_unit(int *unit)
}
bit = ffs(ng_eiface_units[index]) - 1;
KASSERT(bit >= 0 && bit <= UNITS_BITSPERWORD - 1,
- ("%s: word=%d bit=%d", __FUNCTION__, ng_eiface_units[index], bit));
+ ("%s: word=%d bit=%d", __func__, ng_eiface_units[index], bit));
ng_eiface_units[index] &= ~(1 << bit);
*unit = (index * UNITS_BITSPERWORD) + bit;
ng_units_in_use++;
@@ -181,9 +181,9 @@ ng_eiface_free_unit(int unit)
index = unit / UNITS_BITSPERWORD;
bit = unit % UNITS_BITSPERWORD;
KASSERT(index < ng_eiface_units_len,
- ("%s: unit=%d len=%d", __FUNCTION__, unit, ng_eiface_units_len));
+ ("%s: unit=%d len=%d", __func__, unit, ng_eiface_units_len));
KASSERT((ng_eiface_units[index] & (1 << bit)) == 0,
- ("%s: unit=%d is free", __FUNCTION__, unit));
+ ("%s: unit=%d is free", __func__, unit));
ng_eiface_units[index] |= (1 << bit);
/*
* XXX We could think about reducing the size of ng_eiface_units[]
diff --git a/sys/netgraph/ng_ether.c b/sys/netgraph/ng_ether.c
index 69e1b35..a3c14e9 100644
--- a/sys/netgraph/ng_ether.c
+++ b/sys/netgraph/ng_ether.c
@@ -297,11 +297,11 @@ ng_ether_attach(struct ifnet *ifp)
node_p node;
/* Create node */
- KASSERT(!IFP2NG(ifp), ("%s: node already exists?", __FUNCTION__));
+ KASSERT(!IFP2NG(ifp), ("%s: node already exists?", __func__));
snprintf(name, sizeof(name), "%s%d", ifp->if_name, ifp->if_unit);
if (ng_make_node_common(&ng_ether_typestruct, &node) != 0) {
log(LOG_ERR, "%s: can't %s for %s\n",
- __FUNCTION__, "create node", name);
+ __func__, "create node", name);
return;
}
@@ -309,7 +309,7 @@ ng_ether_attach(struct ifnet *ifp)
MALLOC(priv, priv_p, sizeof(*priv), M_NETGRAPH, M_NOWAIT | M_ZERO);
if (priv == NULL) {
log(LOG_ERR, "%s: can't %s for %s\n",
- __FUNCTION__, "allocate memory", name);
+ __func__, "allocate memory", name);
NG_NODE_UNREF(node);
return;
}
@@ -321,7 +321,7 @@ ng_ether_attach(struct ifnet *ifp)
/* Try to give the node the same name as the interface */
if (ng_name_node(node, name) != 0) {
log(LOG_WARNING, "%s: can't name node %s\n",
- __FUNCTION__, name);
+ __func__, name);
}
}
@@ -608,7 +608,7 @@ ng_ether_rcvdata(hook_p hook, item_p item)
return ng_ether_rcv_lower(node, m, meta);
if (hook == priv->upper)
return ng_ether_rcv_upper(node, m, meta);
- panic("%s: weird hook", __FUNCTION__);
+ panic("%s: weird hook", __func__);
#ifdef RESTARTABLE_PANICS /* so we don;t get an error msg in LINT */
return NULL;
#endif
@@ -721,7 +721,7 @@ ng_ether_disconnect(hook_p hook)
priv->lower = NULL;
priv->lowerOrphan = 0;
} else
- panic("%s: weird hook", __FUNCTION__);
+ panic("%s: weird hook", __func__);
if ((NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) == 0)
&& (NG_NODE_IS_VALID(NG_HOOK_NODE(hook))))
ng_rmnode_self(NG_HOOK_NODE(hook)); /* reset node */
diff --git a/sys/netgraph/ng_frame_relay.c b/sys/netgraph/ng_frame_relay.c
index b82831e..dc55592 100644
--- a/sys/netgraph/ng_frame_relay.c
+++ b/sys/netgraph/ng_frame_relay.c
@@ -400,7 +400,7 @@ ngfrm_rcvdata(hook_p hook, item_p item)
data[3] |= BYTEX_EA;
break;
default:
- panic(__FUNCTION__);
+ panic(__func__);
}
/* Send it */
diff --git a/sys/netgraph/ng_gif.c b/sys/netgraph/ng_gif.c
index 7661dad..c2c87eb 100644
--- a/sys/netgraph/ng_gif.c
+++ b/sys/netgraph/ng_gif.c
@@ -232,11 +232,11 @@ ng_gif_attach(struct ifnet *ifp)
node_p node;
/* Create node */
- KASSERT(!IFP2NG(ifp), ("%s: node already exists?", __FUNCTION__));
+ KASSERT(!IFP2NG(ifp), ("%s: node already exists?", __func__));
snprintf(name, sizeof(name), "%s%d", ifp->if_name, ifp->if_unit);
if (ng_make_node_common(&ng_gif_typestruct, &node) != 0) {
log(LOG_ERR, "%s: can't %s for %s\n",
- __FUNCTION__, "create node", name);
+ __func__, "create node", name);
return;
}
@@ -244,7 +244,7 @@ ng_gif_attach(struct ifnet *ifp)
MALLOC(priv, priv_p, sizeof(*priv), M_NETGRAPH, M_NOWAIT | M_ZERO);
if (priv == NULL) {
log(LOG_ERR, "%s: can't %s for %s\n",
- __FUNCTION__, "allocate memory", name);
+ __func__, "allocate memory", name);
NG_NODE_UNREF(node);
return;
}
@@ -255,7 +255,7 @@ ng_gif_attach(struct ifnet *ifp)
/* Try to give the node the same name as the interface */
if (ng_name_node(node, name) != 0) {
log(LOG_WARNING, "%s: can't name node %s\n",
- __FUNCTION__, name);
+ __func__, name);
}
}
@@ -451,7 +451,7 @@ ng_gif_rcvdata(hook_p hook, item_p item)
NG_FREE_ITEM(item);
if (hook == priv->lower)
return ng_gif_rcv_lower(node, m, meta);
- panic("%s: weird hook", __FUNCTION__);
+ panic("%s: weird hook", __func__);
}
/*
@@ -527,7 +527,7 @@ ng_gif_disconnect(hook_p hook)
priv->lower = NULL;
priv->lowerOrphan = 0;
} else
- panic("%s: weird hook", __FUNCTION__);
+ panic("%s: weird hook", __func__);
if ((NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) == 0)
&& (NG_NODE_IS_VALID(NG_HOOK_NODE(hook))))
ng_rmnode_self(NG_HOOK_NODE(hook)); /* reset node */
diff --git a/sys/netgraph/ng_gif_demux.c b/sys/netgraph/ng_gif_demux.c
index 9a5aab7..066bea6 100644
--- a/sys/netgraph/ng_gif_demux.c
+++ b/sys/netgraph/ng_gif_demux.c
@@ -393,7 +393,7 @@ ng_gif_demux_disconnect(hook_p hook)
else {
iffam = get_iffam_from_hook(priv, hook);
if (iffam == NULL)
- panic(__FUNCTION__);
+ panic(__func__);
*get_hook_from_iffam(priv, iffam) = NULL;
}
diff --git a/sys/netgraph/ng_iface.c b/sys/netgraph/ng_iface.c
index 384f328..2486fbd 100644
--- a/sys/netgraph/ng_iface.c
+++ b/sys/netgraph/ng_iface.c
@@ -302,7 +302,7 @@ ng_iface_get_unit(int *unit)
}
bit = ffs(ng_iface_units[index]) - 1;
KASSERT(bit >= 0 && bit <= UNITS_BITSPERWORD - 1,
- ("%s: word=%d bit=%d", __FUNCTION__, ng_iface_units[index], bit));
+ ("%s: word=%d bit=%d", __func__, ng_iface_units[index], bit));
ng_iface_units[index] &= ~(1 << bit);
*unit = (index * UNITS_BITSPERWORD) + bit;
ng_units_in_use++;
@@ -320,9 +320,9 @@ ng_iface_free_unit(int unit)
index = unit / UNITS_BITSPERWORD;
bit = unit % UNITS_BITSPERWORD;
KASSERT(index < ng_iface_units_len,
- ("%s: unit=%d len=%d", __FUNCTION__, unit, ng_iface_units_len));
+ ("%s: unit=%d len=%d", __func__, unit, ng_iface_units_len));
KASSERT((ng_iface_units[index] & (1 << bit)) == 0,
- ("%s: unit=%d is free", __FUNCTION__, unit));
+ ("%s: unit=%d is free", __func__, unit));
ng_iface_units[index] |= (1 << bit);
/*
* XXX We could think about reducing the size of ng_iface_units[]
@@ -471,7 +471,7 @@ ng_iface_output(struct ifnet *ifp, struct mbuf *m,
static void
ng_iface_start(struct ifnet *ifp)
{
- printf("%s%d: %s called?", ifp->if_name, ifp->if_unit, __FUNCTION__);
+ printf("%s%d: %s called?", ifp->if_name, ifp->if_unit, __func__);
}
/*
@@ -484,7 +484,7 @@ ng_iface_bpftap(struct ifnet *ifp, struct mbuf *m, sa_family_t family)
int32_t family4 = (int32_t)family;
struct mbuf m0;
- KASSERT(family != AF_UNSPEC, ("%s: family=AF_UNSPEC", __FUNCTION__));
+ KASSERT(family != AF_UNSPEC, ("%s: family=AF_UNSPEC", __func__));
if (ifp->if_bpf != NULL) {
bzero(&m0, sizeof(m0));
m0.m_next = m;
@@ -733,8 +733,8 @@ ng_iface_rcvdata(hook_p hook, item_p item)
NGI_GET_M(item, m);
NG_FREE_ITEM(item);
/* Sanity checks */
- KASSERT(iffam != NULL, ("%s: iffam", __FUNCTION__));
- KASSERT(m->m_flags & M_PKTHDR, ("%s: not pkthdr", __FUNCTION__));
+ KASSERT(iffam != NULL, ("%s: iffam", __func__));
+ KASSERT(m->m_flags & M_PKTHDR, ("%s: not pkthdr", __func__));
if (m == NULL)
return (EINVAL);
if ((ifp->if_flags & IFF_UP) == 0) {
@@ -786,7 +786,7 @@ ng_iface_disconnect(hook_p hook)
const iffam_p iffam = get_iffam_from_hook(priv, hook);
if (iffam == NULL)
- panic(__FUNCTION__);
+ panic(__func__);
*get_hook_from_iffam(priv, iffam) = NULL;
return (0);
}
diff --git a/sys/netgraph/ng_ksocket.c b/sys/netgraph/ng_ksocket.c
index a642122..f945f6a 100644
--- a/sys/netgraph/ng_ksocket.c
+++ b/sys/netgraph/ng_ksocket.c
@@ -965,7 +965,7 @@ static int
ng_ksocket_disconnect(hook_p hook)
{
KASSERT(NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) == 0,
- ("%s: numhooks=%d?", __FUNCTION__,
+ ("%s: numhooks=%d?", __func__,
NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook))));
if (NG_NODE_IS_VALID(NG_HOOK_NODE(hook)))
ng_rmnode_self(NG_HOOK_NODE(hook));
@@ -1032,7 +1032,7 @@ ng_ksocket_incoming2(node_p node, hook_p hook, void *arg1, int waitflag)
return;
}
/* so = priv->so; *//* XXX could have derived this like so */
- KASSERT(so == priv->so, ("%s: wrong socket", __FUNCTION__));
+ KASSERT(so == priv->so, ("%s: wrong socket", __func__));
/* Check whether a pending connect operation has completed */
if (priv->flags & KSF_CONNECTING) {
diff --git a/sys/netgraph/ng_mppc.c b/sys/netgraph/ng_mppc.c
index a1d6ce8..5f44386 100644
--- a/sys/netgraph/ng_mppc.c
+++ b/sys/netgraph/ng_mppc.c
@@ -387,7 +387,7 @@ ng_mppc_rcvdata(hook_p hook, item_p item)
}
/* Oops */
- panic("%s: unknown hook", __FUNCTION__);
+ panic("%s: unknown hook", __func__);
#ifdef RESTARTABLE_PANICS
return (EINVAL);
#endif
@@ -499,7 +499,7 @@ ng_mppc_compress(node_p node, struct mbuf *m, struct mbuf **resultp)
&destCnt, d->history, flags, 0);
/* Check return value */
- KASSERT(rtn != MPPC_INVALID, ("%s: invalid", __FUNCTION__));
+ KASSERT(rtn != MPPC_INVALID, ("%s: invalid", __func__));
if ((rtn & MPPC_EXPANDED) == 0
&& (rtn & MPPC_COMP_OK) == MPPC_COMP_OK) {
outlen -= destCnt;
@@ -587,7 +587,7 @@ ng_mppc_decompress(node_p node, struct mbuf *m, struct mbuf **resultp)
/* Check for insane jumps in sequence numbering (D.O.S. attack) */
numLost = ((cc - d->cc) & MPPC_CCOUNT_MASK);
if (numLost >= MPPC_INSANE_JUMP) {
- log(LOG_ERR, "%s: insane jump %d", __FUNCTION__, numLost);
+ log(LOG_ERR, "%s: insane jump %d", __func__, numLost);
priv->recv.cfg.enable = 0;
goto failed;
}
@@ -631,7 +631,7 @@ ng_mppc_decompress(node_p node, struct mbuf *m, struct mbuf **resultp)
/* Are we not expecting encryption? */
if ((d->cfg.bits & MPPE_BITS) == 0) {
log(LOG_ERR, "%s: rec'd unexpectedly %s packet",
- __FUNCTION__, "encrypted");
+ __func__, "encrypted");
goto failed;
}
@@ -651,7 +651,7 @@ ng_mppc_decompress(node_p node, struct mbuf *m, struct mbuf **resultp)
/* Are we expecting encryption? */
if ((d->cfg.bits & MPPE_BITS) != 0) {
log(LOG_ERR, "%s: rec'd unexpectedly %s packet",
- __FUNCTION__, "unencrypted");
+ __func__, "unencrypted");
goto failed;
}
}
@@ -663,7 +663,7 @@ ng_mppc_decompress(node_p node, struct mbuf *m, struct mbuf **resultp)
if ((header & MPPC_FLAG_COMPRESSED) != 0
&& (d->cfg.bits & MPPC_BIT) == 0) {
log(LOG_ERR, "%s: rec'd unexpectedly %s packet",
- __FUNCTION__, "compressed");
+ __func__, "compressed");
failed:
FREE(buf, M_NETGRAPH_MPPC);
return (EINVAL);
@@ -699,11 +699,11 @@ failed:
&sourceCnt, &destCnt, d->history, flags);
/* Check return value */
- KASSERT(rtn != MPPC_INVALID, ("%s: invalid", __FUNCTION__));
+ KASSERT(rtn != MPPC_INVALID, ("%s: invalid", __func__));
if ((rtn & MPPC_DEST_EXHAUSTED) != 0
|| (rtn & MPPC_DECOMP_OK) != MPPC_DECOMP_OK) {
log(LOG_ERR, "%s: decomp returned 0x%x",
- __FUNCTION__, rtn);
+ __func__, rtn);
FREE(decompbuf, M_NETGRAPH_MPPC);
goto failed;
}
diff --git a/sys/netgraph/ng_one2many.c b/sys/netgraph/ng_one2many.c
index ead577a..da1c7eb 100644
--- a/sys/netgraph/ng_one2many.c
+++ b/sys/netgraph/ng_one2many.c
@@ -391,12 +391,12 @@ ng_one2many_rcvdata(hook_p hook, item_p item)
linkNum = (int)NG_HOOK_PRIVATE(hook);
KASSERT(linkNum == NG_ONE2MANY_ONE_LINKNUM
|| (linkNum >= 0 && linkNum < NG_ONE2MANY_MAX_LINKS),
- ("%s: linkNum=%d", __FUNCTION__, linkNum));
+ ("%s: linkNum=%d", __func__, linkNum));
/* Figure out source link */
src = (linkNum == NG_ONE2MANY_ONE_LINKNUM) ?
&priv->one : &priv->many[linkNum];
- KASSERT(src->hook != NULL, ("%s: no src%d", __FUNCTION__, linkNum));
+ KASSERT(src->hook != NULL, ("%s: no src%d", __func__, linkNum));
/* Update receive stats */
src->stats.recvPackets++;
@@ -450,7 +450,7 @@ ng_one2many_rcvdata(hook_p hook, item_p item)
break;
#ifdef INVARIANTS
default:
- panic("%s: invalid xmitAlg", __FUNCTION__);
+ panic("%s: invalid xmitAlg", __func__);
#endif
}
} else {
@@ -475,7 +475,7 @@ ng_one2many_shutdown(node_p node)
const priv_p priv = NG_NODE_PRIVATE(node);
KASSERT(priv->numActiveMany == 0,
- ("%s: numActiveMany=%d", __FUNCTION__, priv->numActiveMany));
+ ("%s: numActiveMany=%d", __func__, priv->numActiveMany));
FREE(priv, M_NETGRAPH);
NG_NODE_SET_PRIVATE(node, NULL);
NG_NODE_UNREF(node);
@@ -495,7 +495,7 @@ ng_one2many_disconnect(hook_p hook)
linkNum = (int)NG_HOOK_PRIVATE(hook);
KASSERT(linkNum == NG_ONE2MANY_ONE_LINKNUM
|| (linkNum >= 0 && linkNum < NG_ONE2MANY_MAX_LINKS),
- ("%s: linkNum=%d", __FUNCTION__, linkNum));
+ ("%s: linkNum=%d", __func__, linkNum));
/* Nuke the link */
if (linkNum == NG_ONE2MANY_ONE_LINKNUM)
@@ -538,7 +538,7 @@ ng_one2many_update_many(priv_p priv)
break;
#ifdef INVARIANTS
default:
- panic("%s: invalid failAlg", __FUNCTION__);
+ panic("%s: invalid failAlg", __func__);
#endif
}
}
@@ -553,7 +553,7 @@ ng_one2many_update_many(priv_p priv)
break;
#ifdef INVARIANTS
default:
- panic("%s: invalid xmitAlg", __FUNCTION__);
+ panic("%s: invalid xmitAlg", __func__);
#endif
}
}
diff --git a/sys/netgraph/ng_parse.c b/sys/netgraph/ng_parse.c
index fa29c6b..a69cfa6 100644
--- a/sys/netgraph/ng_parse.c
+++ b/sys/netgraph/ng_parse.c
@@ -377,7 +377,7 @@ ng_int8_unparse(const struct ng_parse_type *type,
fval = (u_int8_t)val;
break;
default:
- panic("%s: unknown type", __FUNCTION__);
+ panic("%s: unknown type", __func__);
#ifdef RESTARTABLE_PANICS
return(0);
#endif
@@ -474,7 +474,7 @@ ng_int16_unparse(const struct ng_parse_type *type,
fval = (u_int16_t)val;
break;
default:
- panic("%s: unknown type", __FUNCTION__);
+ panic("%s: unknown type", __func__);
#ifdef RESTARTABLE_PANICS
return(0);
#endif
@@ -571,7 +571,7 @@ ng_int32_unparse(const struct ng_parse_type *type,
fval = (u_int32_t)val;
break;
default:
- panic("%s: unknown type", __FUNCTION__);
+ panic("%s: unknown type", __func__);
#ifdef RESTARTABLE_PANICS
return(0);
#endif
@@ -667,7 +667,7 @@ ng_int64_unparse(const struct ng_parse_type *type,
fval = (u_int64_t)val;
break;
default:
- panic("%s: unknown type", __FUNCTION__);
+ panic("%s: unknown type", __func__);
#ifdef RESTARTABLE_PANICS
return(0);
#endif
@@ -1411,7 +1411,7 @@ ng_get_composite_elem_default(const struct ng_parse_type *type,
break;
}
default:
- panic("%s", __FUNCTION__);
+ panic("%s", __func__);
}
/* Default to element type default */
@@ -1458,7 +1458,7 @@ ng_get_composite_len(const struct ng_parse_type *type,
return fi->length;
}
default:
- panic("%s", __FUNCTION__);
+ panic("%s", __func__);
}
return (0);
}
@@ -1495,7 +1495,7 @@ ng_get_composite_etype(const struct ng_parse_type *type,
break;
}
default:
- panic("%s", __FUNCTION__);
+ panic("%s", __func__);
}
return (etype);
}
diff --git a/sys/netgraph/ng_ppp.c b/sys/netgraph/ng_ppp.c
index c2bb76a..5cc71ba 100644
--- a/sys/netgraph/ng_ppp.c
+++ b/sys/netgraph/ng_ppp.c
@@ -606,7 +606,7 @@ ng_ppp_rcvdata(hook_p hook, item_p item)
/* Convert index into a link number */
linkNum = (u_int16_t)~index;
KASSERT(linkNum < NG_PPP_MAX_LINKS,
- ("%s: bogus index 0x%x", __FUNCTION__, index));
+ ("%s: bogus index 0x%x", __func__, index));
link = &priv->links[linkNum];
/* Stats */
@@ -732,7 +732,7 @@ ng_ppp_rcvdata(hook_p hook, item_p item)
}
break;
default:
- panic("%s: bogus index 0x%x", __FUNCTION__, index);
+ panic("%s: bogus index 0x%x", __func__, index);
}
/* Now figure out what to do with the frame */
@@ -1235,11 +1235,11 @@ ng_ppp_get_packet(node_p node, struct mbuf **mp, meta_p *metap)
qent = TAILQ_FIRST(&priv->frags);
KASSERT(!TAILQ_EMPTY(&priv->frags) && qent->first,
- ("%s: no packet", __FUNCTION__));
+ ("%s: no packet", __func__));
for (tail = NULL; qent != NULL; qent = qnext) {
qnext = TAILQ_NEXT(qent, f_qent);
KASSERT(!TAILQ_EMPTY(&priv->frags),
- ("%s: empty q", __FUNCTION__));
+ ("%s: empty q", __func__));
TAILQ_REMOVE(&priv->frags, qent, f_qent);
if (tail == NULL) {
tail = m = qent->data;
@@ -1285,7 +1285,7 @@ ng_ppp_frag_trim(node_p node)
break;
qnext = TAILQ_NEXT(qent, f_qent);
KASSERT(qnext != NULL,
- ("%s: last frag < MSEQ?", __FUNCTION__));
+ ("%s: last frag < MSEQ?", __func__));
if (qnext->seq != MP_NEXT_RECV_SEQ(priv, qent->seq)
|| qent->last || qnext->first) {
dead = 1;
@@ -1298,7 +1298,7 @@ ng_ppp_frag_trim(node_p node)
/* Remove fragment and all others in the same packet */
while ((qent = TAILQ_FIRST(&priv->frags)) != qnext) {
KASSERT(!TAILQ_EMPTY(&priv->frags),
- ("%s: empty q", __FUNCTION__));
+ ("%s: empty q", __func__));
priv->bundleStats.dropFragments++;
TAILQ_REMOVE(&priv->frags, qent, f_qent);
NG_FREE_M(qent->data);
@@ -1348,7 +1348,7 @@ ng_ppp_frag_process(node_p node)
/* Get oldest fragment */
KASSERT(!TAILQ_EMPTY(&priv->frags),
- ("%s: empty q", __FUNCTION__));
+ ("%s: empty q", __func__));
qent = TAILQ_FIRST(&priv->frags);
/* Bump MSEQ if necessary */
@@ -1442,7 +1442,7 @@ ng_ppp_frag_checkstale(node_p node)
/* Throw away junk fragments in front of the completed packet */
while ((qent = TAILQ_FIRST(&priv->frags)) != beg) {
KASSERT(!TAILQ_EMPTY(&priv->frags),
- ("%s: empty q", __FUNCTION__));
+ ("%s: empty q", __func__));
priv->bundleStats.dropFragments++;
TAILQ_REMOVE(&priv->frags, qent, f_qent);
NG_FREE_M(qent->data);
@@ -1491,9 +1491,9 @@ ng_ppp_frag_timeout(void *arg)
}
/* Reset timer state after timeout */
- KASSERT(priv->timerActive, ("%s: !timerActive", __FUNCTION__));
+ KASSERT(priv->timerActive, ("%s: !timerActive", __func__));
priv->timerActive = 0;
- KASSERT(node->nd_refs > 1, ("%s: nd_refs=%d", __FUNCTION__, node->nd_refs));
+ KASSERT(node->nd_refs > 1, ("%s: nd_refs=%d", __func__, node->nd_refs));
NG_NODE_UNREF(node);
/* Start timer again */
@@ -2076,7 +2076,7 @@ ng_ppp_stop_frag_timer(node_p node)
untimeout(ng_ppp_frag_timeout, node, priv->fragTimer);
priv->timerActive = 0;
KASSERT(node->nd_refs > 1,
- ("%s: nd_refs=%d", __FUNCTION__, node->nd_refs));
+ ("%s: nd_refs=%d", __func__, node->nd_refs));
NG_NODE_UNREF(node);
}
}
diff --git a/sys/netgraph/ng_pppoe.c b/sys/netgraph/ng_pppoe.c
index 6c9800b..0a1e1b9 100644
--- a/sys/netgraph/ng_pppoe.c
+++ b/sys/netgraph/ng_pppoe.c
@@ -40,7 +40,7 @@
* $Whistle: ng_pppoe.c,v 1.10 1999/11/01 09:24:52 julian Exp $
*/
#if 0
-#define AAA printf("pppoe: %s\n", __FUNCTION__ );
+#define AAA printf("pppoe: %s\n", __func__ );
#define BBB printf("-%d-", __LINE__ );
#else
#define AAA
diff --git a/sys/netgraph/ng_pptpgre.c b/sys/netgraph/ng_pptpgre.c
index 6576efd..f531353 100644
--- a/sys/netgraph/ng_pptpgre.c
+++ b/sys/netgraph/ng_pptpgre.c
@@ -399,7 +399,7 @@ ng_pptpgre_rcvdata(hook_p hook, item_p item)
return ng_pptpgre_xmit(node, item);
if (hook == priv->lower)
return ng_pptpgre_recv(node, item);
- panic("%s: weird hook", __FUNCTION__);
+ panic("%s: weird hook", __func__);
}
/*
@@ -436,7 +436,7 @@ ng_pptpgre_disconnect(hook_p hook)
else if (hook == priv->lower)
priv->lower = NULL;
else
- panic("%s: unknown hook", __FUNCTION__);
+ panic("%s: unknown hook", __func__);
/* Go away if no longer connected to anything */
if ((NG_NODE_NUMHOOKS(node) == 0)
@@ -745,7 +745,7 @@ ng_pptpgre_start_recv_ack_timer(node_p node)
/* Compute how long until oldest unack'd packet times out,
and reset the timer to that time. */
- KASSERT(a->rackTimerPtr == NULL, ("%s: rackTimer", __FUNCTION__));
+ KASSERT(a->rackTimerPtr == NULL, ("%s: rackTimer", __func__));
remain = (a->timeSent[0] + a->ato) - ng_pptpgre_time(node);
if (remain < 0)
remain = 0;
@@ -784,7 +784,7 @@ ng_pptpgre_recv_ack_timeout(void *arg)
/* This complicated stuff is needed to avoid race conditions */
FREE(arg, M_NETGRAPH);
- KASSERT(node->nd_refs > 0, ("%s: no nd_refs", __FUNCTION__));
+ KASSERT(node->nd_refs > 0, ("%s: no nd_refs", __func__));
if (NG_NODE_NOT_VALID(node)) { /* shutdown race condition */
NG_NODE_UNREF(node);
splx(s);
@@ -833,7 +833,7 @@ ng_pptpgre_start_send_ack_timer(node_p node, int ackTimeout)
int ticks;
/* Start new timer */
- KASSERT(a->sackTimerPtr == NULL, ("%s: sackTimer", __FUNCTION__));
+ KASSERT(a->sackTimerPtr == NULL, ("%s: sackTimer", __func__));
MALLOC(a->sackTimerPtr, node_p *, sizeof(node_p), M_NETGRAPH, M_NOWAIT);
if (a->sackTimerPtr == NULL) {
priv->stats.memoryFailures++;
@@ -864,7 +864,7 @@ ng_pptpgre_send_ack_timeout(void *arg)
/* This complicated stuff is needed to avoid race conditions */
FREE(arg, M_NETGRAPH);
- KASSERT(node->nd_refs > 0, ("%s: no nd_refs", __FUNCTION__));
+ KASSERT(node->nd_refs > 0, ("%s: no nd_refs", __func__));
if (NG_NODE_NOT_VALID(node)) { /* shutdown race condition */
NG_NODE_UNREF(node);
splx(s);
diff --git a/sys/netgraph/ng_rfc1490.c b/sys/netgraph/ng_rfc1490.c
index 0d7a2e4..ec1fc19 100644
--- a/sys/netgraph/ng_rfc1490.c
+++ b/sys/netgraph/ng_rfc1490.c
@@ -291,7 +291,7 @@ ng_rfc1490_rcvdata(hook_p hook, item_p item)
mtod(m, u_char *)[1] = NLPID_IP;
NG_FWD_NEW_DATA(error, item, priv->downlink, m);
} else
- panic(__FUNCTION__);
+ panic(__func__);
done:
if (item)
@@ -334,7 +334,7 @@ ng_rfc1490_disconnect(hook_p hook)
else if (hook == priv->ppp)
priv->ppp = NULL;
else
- panic(__FUNCTION__);
+ panic(__func__);
return (0);
}
diff --git a/sys/netgraph/ng_socket.c b/sys/netgraph/ng_socket.c
index 139aa0e..f570355 100644
--- a/sys/netgraph/ng_socket.c
+++ b/sys/netgraph/ng_socket.c
@@ -547,7 +547,7 @@ ng_detach_common(struct ngpcb *pcbp, int which)
priv->datasock = NULL;
break;
default:
- panic(__FUNCTION__);
+ panic(__func__);
}
if ((--priv->refs == 0) && (priv->node != NULL))
ng_rmnode_self(priv->node);
diff --git a/sys/netgraph/ng_split.c b/sys/netgraph/ng_split.c
index 2898369..359d310 100644
--- a/sys/netgraph/ng_split.c
+++ b/sys/netgraph/ng_split.c
@@ -172,7 +172,7 @@ ng_split_disconnect(hook_p hook)
{
hook_p *localhook = NG_HOOK_PRIVATE(hook);
- KASSERT(localhook != NULL, ("%s: null info", __FUNCTION__));
+ KASSERT(localhook != NULL, ("%s: null info", __func__));
*localhook = NULL;
if ((NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) == 0)
&& (NG_NODE_IS_VALID(NG_HOOK_NODE(hook)))) {
diff --git a/sys/netgraph/ng_tee.c b/sys/netgraph/ng_tee.c
index 7b47617..8cac1b1 100644
--- a/sys/netgraph/ng_tee.c
+++ b/sys/netgraph/ng_tee.c
@@ -310,7 +310,7 @@ ngt_rcvdata(hook_p hook, item_p item)
dup = NULL;
dest = &sc->left;
} else {
- panic("%s: no hook!", __FUNCTION__);
+ panic("%s: no hook!", __func__);
#ifdef RESTARTABLE_PANICS
return(EINVAL);
#endif
@@ -394,7 +394,7 @@ ngt_disconnect(hook_p hook)
{
struct hookinfo *const hinfo = NG_HOOK_PRIVATE(hook);
- KASSERT(hinfo != NULL, ("%s: null info", __FUNCTION__));
+ KASSERT(hinfo != NULL, ("%s: null info", __func__));
hinfo->hook = NULL;
if ((NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) == 0)
&& (NG_NODE_IS_VALID(NG_HOOK_NODE(hook))))
diff --git a/sys/netgraph/ng_tty.c b/sys/netgraph/ng_tty.c
index cb3c770..71eb758 100644
--- a/sys/netgraph/ng_tty.c
+++ b/sys/netgraph/ng_tty.c
@@ -108,7 +108,7 @@ typedef struct ngt_sc *sc_p;
k <= MAX_MBUFQ && *mp; \
k++, mp = &(*mp)->m_nextpkt); \
if (k != sc->qlen || k > MAX_MBUFQ || *mp || mp != sc->qtail) \
- panic(__FUNCTION__ ": queue"); \
+ panic("%s: queue", __func__); \
} while (0)
#else
#define QUEUECHECK(sc) do {} while (0)
@@ -536,7 +536,7 @@ ngt_disconnect(hook_p hook)
s = spltty();
if (hook != sc->hook)
- panic(__FUNCTION__);
+ panic(__func__);
sc->hook = NULL;
m_freem(sc->m);
sc->m = NULL;
@@ -576,7 +576,7 @@ ngt_rcvdata(hook_p hook, item_p item)
struct mbuf *m;
if (hook != sc->hook)
- panic(__FUNCTION__);
+ panic(__func__);
NGI_GET_M(item, m);
NG_FREE_ITEM(item);
@@ -666,7 +666,7 @@ ngt_mod_event(module_t mod, int event, void *data)
if ((ngt_ldisc = ldisc_register(NETGRAPHDISC, &ngt_disc)) < 0) {
splx(s);
log(LOG_ERR, "%s: can't register line discipline",
- __FUNCTION__);
+ __func__);
return (EIO);
}
splx(s);
diff --git a/sys/netgraph/ng_vjc.c b/sys/netgraph/ng_vjc.c
index 5a2e2da..528d129 100644
--- a/sys/netgraph/ng_vjc.c
+++ b/sys/netgraph/ng_vjc.c
@@ -442,7 +442,7 @@ ng_vjc_rcvdata(hook_p hook, item_p item)
hook = priv->vjcomp;
break;
default:
- panic("%s: type=%d", __FUNCTION__, type);
+ panic("%s: type=%d", __func__, type);
}
} else if (hook == priv->vjcomp) { /* incoming compressed packet */
int vjlen, need2pullup;
@@ -536,7 +536,7 @@ ng_vjc_rcvdata(hook_p hook, item_p item)
} else if (hook == priv->vjip) /* incoming regular packet (bypass) */
hook = priv->ip;
else
- panic("%s: unknown hook", __FUNCTION__);
+ panic("%s: unknown hook", __func__);
/* Send result back out */
NG_FWD_NEW_DATA(error, item, hook, m);
@@ -577,7 +577,7 @@ ng_vjc_disconnect(hook_p hook)
else if (hook == priv->vjip)
priv->vjip = NULL;
else
- panic("%s: unknown hook", __FUNCTION__);
+ panic("%s: unknown hook", __func__);
/* Go away if no hooks left */
if ((NG_NODE_NUMHOOKS(node) == 0)
OpenPOWER on IntegriCloud