Just keep the code cool.
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
/* Don't try to register if Zebra doesn't know of this instance. */
if (!IS_BGP_INST_KNOWN_TO_ZEBRA(bgp)) {
if (BGP_DEBUG(zebra, ZEBRA))
- zlog_debug("%s: No zebra instance to talk to, not installing remote macip",
- __PRETTY_FUNCTION__);
+ zlog_debug(
+ "%s: No zebra instance to talk to, not installing remote macip",
+ __func__);
return 0;
}
s = zclient->obuf;
/* Don't try to register if Zebra doesn't know of this instance. */
if (!IS_BGP_INST_KNOWN_TO_ZEBRA(bgp)) {
if (BGP_DEBUG(zebra, ZEBRA))
- zlog_debug("%s: No zebra instance to talk to, not installing remote vtep",
- __PRETTY_FUNCTION__);
+ zlog_debug(
+ "%s: No zebra instance to talk to, not installing remote vtep",
+ __func__);
return 0;
}
if (bgp_getsockname(peer) < 0) {
flog_err_sys(EC_LIB_SOCKET,
"%s: bgp_getsockname(): failed for peer %s, fd %d",
- __FUNCTION__, peer->host, peer->fd);
+ __func__, peer->host, peer->fd);
bgp_notify_send(
peer, BGP_NOTIFY_FSM_ERR,
BGP_NOTIFY_SUBCODE_UNSPECIFIC); /* internal error */
if (BGP_DEBUG(nht, NHT)) {
zlog_debug(
"%s: Attempting to register with unknown AFI %d (not %d or %d)",
- __FUNCTION__, afi, AFI_IP, AFI_IP6);
+ __func__, afi, AFI_IP, AFI_IP6);
}
return 0;
}
if (!zapi_nexthop_update_decode(zclient->ibuf, &nhr)) {
if (BGP_DEBUG(nht, NHT))
zlog_debug("%s[%s]: Failure to decode nexthop update",
- __PRETTY_FUNCTION__, bgp->name_pretty);
+ __func__, bgp->name_pretty);
return;
}
if (BGP_DEBUG(nht, NHT)) {
zlog_debug(
"%s: Attempting to make prefix with unknown AFI %d (not %d or %d)",
- __FUNCTION__, afi, AFI_IP, AFI_IP6);
+ __func__, afi, AFI_IP, AFI_IP6);
}
break;
}
/* Don't try to register if Zebra doesn't know of this instance. */
if (!IS_BGP_INST_KNOWN_TO_ZEBRA(bnc->bgp)) {
if (BGP_DEBUG(zebra, ZEBRA))
- zlog_debug("%s: No zebra instance to talk to, not installing NHT entry",
- __PRETTY_FUNCTION__);
+ zlog_debug(
+ "%s: No zebra instance to talk to, not installing NHT entry",
+ __func__);
return;
}
if (!bgp_zebra_num_connects()) {
if (BGP_DEBUG(zebra, ZEBRA))
- zlog_debug("%s: We have not connected yet, cannot send nexthops",
- __PRETTY_FUNCTION__);
+ zlog_debug(
+ "%s: We have not connected yet, cannot send nexthops",
+ __func__);
}
p = &(bnc->node->p);
if ((command == ZEBRA_NEXTHOP_REGISTER
if (!CHECK_FLAG(bnc->flags, BGP_NEXTHOP_PEER_NOTIFIED)) {
if (BGP_DEBUG(nht, NHT))
- zlog_debug("%s: Updating peer (%s(%s)) status with NHT",
- __FUNCTION__, peer->host,
- peer->bgp->name_pretty);
+ zlog_debug(
+ "%s: Updating peer (%s(%s)) status with NHT",
+ __func__, peer->host,
+ peer->bgp->name_pretty);
bgp_fsm_event_update(peer, valid_nexthops);
SET_FLAG(bnc->flags, BGP_NEXTHOP_PEER_NOTIFIED);
}
if (!sockunion2hostprefix(&peer->su, &p)) {
if (BGP_DEBUG(nht, NHT))
zlog_debug("%s: Unable to convert prefix to sockunion",
- __PRETTY_FUNCTION__);
+ __func__);
return;
}
flog_warn(
EC_BGP_CAPABILITY_INVALID_DATA,
"%s: Received malformed hostname capability from peer %s",
- __FUNCTION__, peer->host);
+ __func__, peer->host);
return -1;
}
flog_warn(
EC_BGP_CAPABILITY_INVALID_DATA,
"%s: Received invalid domain name len (hostname capability) from peer %s",
- __FUNCTION__, peer->host);
+ __func__, peer->host);
return -1;
}
flog_warn(
EC_BGP_CAPABILITY_INVALID_DATA,
"%s: Received runt domain name (hostname capability) from peer %s",
- __FUNCTION__, peer->host);
+ __func__, peer->host);
return -1;
}
if (bgp_getsockname(peer) < 0) {
flog_err_sys(EC_LIB_SOCKET,
"%s: bgp_getsockname() failed for peer: %s",
- __FUNCTION__, peer->host);
+ __func__, peer->host);
return BGP_Stop;
}
peer->host);
if ((peer_clear(peer, NULL) < 0) && bgp_debug_neighbor_events(peer))
- zlog_debug("%s: %s peer_clear failed",
- __PRETTY_FUNCTION__, peer->host);
+ zlog_debug("%s: %s peer_clear failed", __func__, peer->host);
return 0;
}
->nexthop,
buf1, INET6_ADDRSTRLEN);
zlog_debug("%s(%s): NH unresolved",
- __FUNCTION__, buf1);
+ __func__, buf1);
}
bgp_path_info_unset_flag(rn, pi,
BGP_PATH_VALID);
inet_ntop(AF_INET,
(const void *)&attr_new->nexthop,
buf1, INET6_ADDRSTRLEN);
- zlog_debug("%s(%s): NH unresolved",
- __FUNCTION__, buf1);
+ zlog_debug("%s(%s): NH unresolved", __func__,
+ buf1);
}
bgp_path_info_unset_flag(rn, new, BGP_PATH_VALID);
}
INET6_ADDRSTRLEN);
zlog_debug(
"%s(%s): Route not in table, not advertising",
- __FUNCTION__, buf1);
+ __func__, buf1);
}
bgp_path_info_unset_flag(
rn, pi, BGP_PATH_VALID);
INET6_ADDRSTRLEN);
zlog_debug(
"%s(%s): Route not in table, not advertising",
- __FUNCTION__, buf1);
+ __func__, buf1);
}
bgp_path_info_unset_flag(rn, new, BGP_PATH_VALID);
}
return 0;
if (!IS_BGP_INST_KNOWN_TO_ZEBRA(bgp)) {
- zlog_debug("%s: No zebra instance to talk to, not installing information",
- __PRETTY_FUNCTION__);
+ zlog_debug(
+ "%s: No zebra instance to talk to, not installing information",
+ __func__);
return 0;
}
/* Don't try to register if Zebra doesn't know of this instance. */
if (!IS_BGP_INST_KNOWN_TO_ZEBRA(bgp)) {
if (BGP_DEBUG(zebra, ZEBRA))
- zlog_debug("%s: No zebra instance to talk to, cannot advertise subnet",
- __PRETTY_FUNCTION__);
+ zlog_debug(
+ "%s: No zebra instance to talk to, cannot advertise subnet",
+ __func__);
return 0;
}
/* Don't try to register if Zebra doesn't know of this instance. */
if (!IS_BGP_INST_KNOWN_TO_ZEBRA(bgp)) {
if (BGP_DEBUG(zebra, ZEBRA))
- zlog_debug("%s: No zebra instance to talk to, not installing gw_macip",
- __PRETTY_FUNCTION__);
+ zlog_debug(
+ "%s: No zebra instance to talk to, not installing gw_macip",
+ __func__);
return 0;
}
/* Don't try to register if Zebra doesn't know of this instance. */
if (!IS_BGP_INST_KNOWN_TO_ZEBRA(bgp)) {
if (BGP_DEBUG(zebra, ZEBRA))
- zlog_debug("%s: No zebra instance to talk to, not installing all vni",
- __PRETTY_FUNCTION__);
+ zlog_debug(
+ "%s: No zebra instance to talk to, not installing all vni",
+ __func__);
return 0;
}
if (!bgp_pbr && note != ZAPI_RULE_REMOVED) {
if (BGP_DEBUG(zebra, ZEBRA))
zlog_debug("%s: Fail to look BGP rule (%u)",
- __PRETTY_FUNCTION__, unique);
+ __func__, unique);
return 0;
}
}
switch (note) {
case ZAPI_RULE_FAIL_INSTALL:
if (BGP_DEBUG(zebra, ZEBRA))
- zlog_debug("%s: Received RULE_FAIL_INSTALL",
- __PRETTY_FUNCTION__);
+ zlog_debug("%s: Received RULE_FAIL_INSTALL", __func__);
if (bgp_pbra) {
bgp_pbra->installed = false;
bgp_pbra->install_in_progress = false;
bgp_pbr);
}
if (BGP_DEBUG(zebra, ZEBRA))
- zlog_debug("%s: Received RULE_INSTALLED",
- __PRETTY_FUNCTION__);
+ zlog_debug("%s: Received RULE_INSTALLED", __func__);
break;
case ZAPI_RULE_FAIL_REMOVE:
case ZAPI_RULE_REMOVED:
if (BGP_DEBUG(zebra, ZEBRA))
- zlog_debug("%s: Received RULE REMOVED",
- __PRETTY_FUNCTION__);
+ zlog_debug("%s: Received RULE REMOVED", __func__);
break;
}
if (!bgp_pbim) {
if (BGP_DEBUG(zebra, ZEBRA))
zlog_debug("%s: Fail to look BGP match ( %u, ID %u)",
- __PRETTY_FUNCTION__, note, unique);
+ __func__, note, unique);
return 0;
}
switch (note) {
case ZAPI_IPSET_FAIL_INSTALL:
if (BGP_DEBUG(zebra, ZEBRA))
- zlog_debug("%s: Received IPSET_FAIL_INSTALL",
- __PRETTY_FUNCTION__);
+ zlog_debug("%s: Received IPSET_FAIL_INSTALL", __func__);
bgp_pbim->installed = false;
bgp_pbim->install_in_progress = false;
break;
bgp_pbim->installed = true;
bgp_pbim->install_in_progress = false;
if (BGP_DEBUG(zebra, ZEBRA))
- zlog_debug("%s: Received IPSET_INSTALLED",
- __PRETTY_FUNCTION__);
+ zlog_debug("%s: Received IPSET_INSTALLED", __func__);
break;
case ZAPI_IPSET_FAIL_REMOVE:
case ZAPI_IPSET_REMOVED:
if (BGP_DEBUG(zebra, ZEBRA))
- zlog_debug("%s: Received IPSET REMOVED",
- __PRETTY_FUNCTION__);
+ zlog_debug("%s: Received IPSET REMOVED", __func__);
break;
}
unique);
if (!bgp_pbime) {
if (BGP_DEBUG(zebra, ZEBRA))
- zlog_debug("%s: Fail to look BGP match entry (%u, ID %u)",
- __PRETTY_FUNCTION__, note, unique);
+ zlog_debug(
+ "%s: Fail to look BGP match entry (%u, ID %u)",
+ __func__, note, unique);
return 0;
}
case ZAPI_IPSET_ENTRY_FAIL_INSTALL:
if (BGP_DEBUG(zebra, ZEBRA))
zlog_debug("%s: Received IPSET_ENTRY_FAIL_INSTALL",
- __PRETTY_FUNCTION__);
+ __func__);
bgp_pbime->installed = false;
bgp_pbime->install_in_progress = false;
break;
bgp_pbime->install_in_progress = false;
if (BGP_DEBUG(zebra, ZEBRA))
zlog_debug("%s: Received IPSET_ENTRY_INSTALLED",
- __PRETTY_FUNCTION__);
+ __func__);
/* link bgp_path_info to bpme */
path = (struct bgp_path_info *)bgp_pbime->path;
extra = bgp_path_info_extra_get(path);
case ZAPI_IPSET_ENTRY_REMOVED:
if (BGP_DEBUG(zebra, ZEBRA))
zlog_debug("%s: Received IPSET_ENTRY_REMOVED",
- __PRETTY_FUNCTION__);
+ __func__);
break;
}
return 0;
if (!bgpm) {
if (BGP_DEBUG(zebra, ZEBRA))
zlog_debug("%s: Fail to look BGP iptable (%u %u)",
- __PRETTY_FUNCTION__, note, unique);
+ __func__, note, unique);
return 0;
}
switch (note) {
case ZAPI_IPTABLE_FAIL_INSTALL:
if (BGP_DEBUG(zebra, ZEBRA))
zlog_debug("%s: Received IPTABLE_FAIL_INSTALL",
- __PRETTY_FUNCTION__);
+ __func__);
bgpm->installed_in_iptable = false;
bgpm->install_iptable_in_progress = false;
break;
bgpm->installed_in_iptable = true;
bgpm->install_iptable_in_progress = false;
if (BGP_DEBUG(zebra, ZEBRA))
- zlog_debug("%s: Received IPTABLE_INSTALLED",
- __PRETTY_FUNCTION__);
+ zlog_debug("%s: Received IPTABLE_INSTALLED", __func__);
bgpm->action->refcnt++;
break;
case ZAPI_IPTABLE_FAIL_REMOVE:
case ZAPI_IPTABLE_REMOVED:
if (BGP_DEBUG(zebra, ZEBRA))
- zlog_debug("%s: Received IPTABLE REMOVED",
- __PRETTY_FUNCTION__);
+ zlog_debug("%s: Received IPTABLE REMOVED", __func__);
break;
}
return 0;
return;
if (BGP_DEBUG(zebra, ZEBRA)) {
if (pbr)
- zlog_debug("%s: table %d (ip rule) %d",
- __PRETTY_FUNCTION__,
+ zlog_debug("%s: table %d (ip rule) %d", __func__,
pbra->table_id, install);
else
- zlog_debug("%s: table %d fwmark %d %d",
- __PRETTY_FUNCTION__,
+ zlog_debug("%s: table %d fwmark %d %d", __func__,
pbra->table_id, pbra->fwmark, install);
}
s = zclient->obuf;
if (pbrim->install_in_progress)
return;
if (BGP_DEBUG(zebra, ZEBRA))
- zlog_debug("%s: name %s type %d %d, ID %u",
- __PRETTY_FUNCTION__,
- pbrim->ipset_name, pbrim->type,
- install, pbrim->unique);
+ zlog_debug("%s: name %s type %d %d, ID %u", __func__,
+ pbrim->ipset_name, pbrim->type, install,
+ pbrim->unique);
s = zclient->obuf;
stream_reset(s);
if (pbrime->install_in_progress)
return;
if (BGP_DEBUG(zebra, ZEBRA))
- zlog_debug("%s: name %s %d %d, ID %u", __PRETTY_FUNCTION__,
- pbrime->backpointer->ipset_name,
- pbrime->unique, install, pbrime->unique);
+ zlog_debug("%s: name %s %d %d, ID %u", __func__,
+ pbrime->backpointer->ipset_name, pbrime->unique,
+ install, pbrime->unique);
s = zclient->obuf;
stream_reset(s);
if (pbm->install_iptable_in_progress)
return;
if (BGP_DEBUG(zebra, ZEBRA))
- zlog_debug("%s: name %s type %d mark %d %d, ID %u",
- __PRETTY_FUNCTION__, pbm->ipset_name,
- pbm->type, pba->fwmark, install,
+ zlog_debug("%s: name %s type %d mark %d %d, ID %u", __func__,
+ pbm->ipset_name, pbm->type, pba->fwmark, install,
pbm->unique2);
s = zclient->obuf;
stream_reset(s);
if (IS_BGP_INST_KNOWN_TO_ZEBRA(bgp)) {
if (BGP_DEBUG(zebra, ZEBRA))
zlog_debug("%s: Registering BGP instance %s to zebra",
- __PRETTY_FUNCTION__, name);
+ __func__, name);
bgp_zebra_instance_register(bgp);
}
ep = eigrp_fifo_next(ei->obuf);
if (!ep) {
flog_err(EC_LIB_DEVELOPMENT,
- "%s: Interface %s no packet on queue?",
- __PRETTY_FUNCTION__, ei->ifp->name);
+ "%s: Interface %s no packet on queue?", __func__,
+ ei->ifp->name);
goto out;
}
if (ep->length < EIGRP_HEADER_LEN) {
flog_err(EC_EIGRP_PACKET, "%s: Packet just has a header?",
- __PRETTY_FUNCTION__);
+ __func__);
eigrp_header_dump((struct eigrp_header *)ep->s->data);
eigrp_packet_delete(ei);
goto out;
break;
default:
flog_err(EC_LIB_DEVELOPMENT, "%s: Unexpected prefix length: %d",
- __PRETTY_FUNCTION__, pe->destination->prefixlen);
+ __func__, pe->destination->prefixlen);
return 0;
}
stream_putl(s, 0x00000000);
flog_err(
EC_EIGRP_PACKET,
"%s: Received prefix %s which we do not know about",
- __PRETTY_FUNCTION__,
+ __func__,
prefix2str(&dest_addr, buf, sizeof(buf)));
eigrp_IPv4_InternalTLV_free(tlv);
continue;
zlog_debug(
"%s: %s Should we have found this entry in the topo table?",
- __PRETTY_FUNCTION__,
+ __func__,
prefix2str(pe->destination, buf, sizeof(buf)));
}
route_unlock_node(rn);
break;
default:
flog_err(EC_LIB_DEVELOPMENT, "%s: Please implement handler",
- __PRETTY_FUNCTION__);
+ __func__);
break;
}
distance_done:
if (bfd_debug)
zlog_debug(
"%s: Suppressing BFD peer reg/dereg messages",
- __FUNCTION__);
+ __func__);
return;
}
zlog_debug(
"%s: Can't send BFD peer register, Zebra client not "
"established",
- __FUNCTION__);
+ __func__);
return;
}
zlog_debug(
"%s: Can't send BFD client register, Zebra client not "
"established",
- __FUNCTION__);
+ __func__);
return;
}
csv_record_t *mh_rec, *rec;
if (!p_ctxt) {
- ERRLOG("%s: no context \n", __FUNCTION__);
+ ERRLOG("%s: no context \n", __func__);
return -1;
}
/* append to the hdr record */
rec = csv_append_record(csv, rec, 1, key);
if (!rec) {
- ERRLOG("%s: Could not append key \n", __FUNCTION__);
+ ERRLOG("%s: Could not append key \n", __func__);
return -1;
}
/* append to the data record */
rec = csv_append_record(csv, rec, 1, val);
if (!rec) {
- ERRLOG("%s: Could not append val \n", __FUNCTION__);
+ ERRLOG("%s: Could not append val \n", __func__);
return -1;
}
csv = csv_init(NULL, NULL, PTMLIB_MSG_SZ);
if (!csv) {
- ERRLOG("%s: Could not allocate csv \n", __FUNCTION__);
+ ERRLOG("%s: Could not allocate csv \n", __func__);
return -1;
}
cmd_id, hdl->client_name);
if (!rec) {
- ERRLOG("%s: Could not allocate record \n", __FUNCTION__);
+ ERRLOG("%s: Could not allocate record \n", __func__);
csv_clean(csv);
csv_free(csv);
return -1;
p_ctxt = calloc(1, sizeof(*p_ctxt));
if (!p_ctxt) {
- ERRLOG("%s: Could not allocate context \n", __FUNCTION__);
+ ERRLOG("%s: Could not allocate context \n", __func__);
csv_clean(csv);
csv_free(csv);
return -1;
csv_t *csv;
if (!p_ctxt) {
- ERRLOG("%s: no context \n", __FUNCTION__);
+ ERRLOG("%s: no context \n", __func__);
return -1;
}
csv_record_t *rec;
if (!p_ctxt) {
- ERRLOG("%s: no context \n", __FUNCTION__);
+ ERRLOG("%s: no context \n", __func__);
return -1;
}
/* parse csv contents into string */
if (buf && len) {
if (csv_serialize(csv, buf, *len)) {
- ERRLOG("%s: cannot serialize\n", __FUNCTION__);
+ ERRLOG("%s: cannot serialize\n", __func__);
return -1;
}
*len = csvlen(csv);
csv_decode(csv, inbuf);
p_ctxt = calloc(1, sizeof(*p_ctxt));
if (!p_ctxt) {
- ERRLOG("%s: Could not allocate context \n",
- __FUNCTION__);
+ ERRLOG("%s: Could not allocate context \n", __func__);
csv_clean(csv);
csv_free(csv);
return -1;
char *rmap_name = dep_data->rname;
char *dep_name = data;
- zlog_debug("%s: Dependency for %s: %s", __FUNCTION__, dep_name,
- rmap_name);
+ zlog_debug("%s: Dependency for %s: %s", __func__, dep_name, rmap_name);
}
static int route_map_dep_update(struct hash *dephash, const char *dep_name,
/* initialise NS, in case VRF backend if NETNS */
ns_init();
if (debug_vrf)
- zlog_debug("%s: Initializing VRF subsystem",
- __PRETTY_FUNCTION__);
+ zlog_debug("%s: Initializing VRF subsystem", __func__);
vrf_master.vrf_new_hook = create;
vrf_master.vrf_enable_hook = enable;
struct vrf *vrf;
if (debug_vrf)
- zlog_debug("%s: Shutting down vrf subsystem",
- __PRETTY_FUNCTION__);
+ zlog_debug("%s: Shutting down vrf subsystem", __func__);
while (!RB_EMPTY(vrf_id_head, &vrfs_by_id)) {
vrf = RB_ROOT(vrf_id_head, &vrfs_by_id);
slot = (*wheel->slot_key)(item);
if (debug_timer_wheel)
- zlog_debug("%s: Inserting %p: %lld %lld", __PRETTY_FUNCTION__,
- item, slot, slot % wheel->slots);
+ zlog_debug("%s: Inserting %p: %lld %lld", __func__, item, slot,
+ slot % wheel->slots);
listnode_add(wheel->wheel_slot_lists[slot % wheel->slots], item);
return 0;
slot = (*wheel->slot_key)(item);
if (debug_timer_wheel)
- zlog_debug("%s: Removing %p: %lld %lld", __PRETTY_FUNCTION__,
- item, slot, slot % wheel->slots);
+ zlog_debug("%s: Removing %p: %lld %lld", __func__, item, slot,
+ slot % wheel->slots);
listnode_delete(wheel->wheel_slot_lists[slot % wheel->slots], item);
return 0;
ret = connect(sock, (struct sockaddr *)&zclient_addr, zclient_addr_len);
if (ret < 0) {
if (zclient_debug)
- zlog_debug("%s connect failure: %d(%s)",
- __PRETTY_FUNCTION__, errno,
- safe_strerror(errno));
+ zlog_debug("%s connect failure: %d(%s)", __func__,
+ errno, safe_strerror(errno));
close(sock);
return -1;
}
if (api->type >= ZEBRA_ROUTE_MAX) {
flog_err(EC_LIB_ZAPI_ENCODE,
"%s: Specified route type (%u) is not a legal value\n",
- __PRETTY_FUNCTION__, api->type);
+ __func__, api->type);
return -1;
}
stream_putc(s, api->type);
if (api->safi < SAFI_UNICAST || api->safi >= SAFI_MAX) {
flog_err(EC_LIB_ZAPI_ENCODE,
"%s: Specified route SAFI (%u) is not a legal value\n",
- __PRETTY_FUNCTION__, api->safi);
+ __func__, api->safi);
return -1;
}
stream_putc(s, api->safi);
if (api->type >= ZEBRA_ROUTE_MAX) {
flog_err(EC_LIB_ZAPI_ENCODE,
"%s: Specified route type: %d is not a legal value\n",
- __PRETTY_FUNCTION__, api->type);
+ __func__, api->type);
return -1;
}
if (api->safi < SAFI_UNICAST || api->safi >= SAFI_MAX) {
flog_err(EC_LIB_ZAPI_ENCODE,
"%s: Specified route SAFI (%u) is not a legal value\n",
- __PRETTY_FUNCTION__, api->safi);
+ __func__, api->safi);
return -1;
}
flog_err(
EC_LIB_ZAPI_ENCODE,
"%s: V4 prefixlen is %d which should not be more than 32",
- __PRETTY_FUNCTION__, api->prefix.prefixlen);
+ __func__, api->prefix.prefixlen);
return -1;
}
break;
flog_err(
EC_LIB_ZAPI_ENCODE,
"%s: v6 prefixlen is %d which should not be more than 128",
- __PRETTY_FUNCTION__, api->prefix.prefixlen);
+ __func__, api->prefix.prefixlen);
return -1;
}
break;
default:
flog_err(EC_LIB_ZAPI_ENCODE,
- "%s: Specified family %d is not v4 or v6",
- __PRETTY_FUNCTION__, api->prefix.family);
+ "%s: Specified family %d is not v4 or v6", __func__,
+ api->prefix.family);
return -1;
}
STREAM_GET(&api->prefix.u.prefix, s, PSIZE(api->prefix.prefixlen));
flog_err(
EC_LIB_ZAPI_ENCODE,
"%s: SRC Prefix prefixlen received: %d is too large",
- __PRETTY_FUNCTION__, api->src_prefix.prefixlen);
+ __func__, api->src_prefix.prefixlen);
return -1;
}
STREAM_GET(&api->src_prefix.prefix, s,
flog_err(
EC_LIB_ZAPI_ENCODE,
"%s: SRC prefix specified in some manner that makes no sense",
- __PRETTY_FUNCTION__);
+ __func__);
return -1;
}
}
STREAM_GETL(s, ifi);
if (zclient_debug)
- zlog_debug("%s: %u %u %u %u", __PRETTY_FUNCTION__, seq, prio,
- uni, ifi);
+ zlog_debug("%s: %u %u %u %u", __func__, seq, prio, uni, ifi);
*seqno = seq;
*priority = prio;
*unique = uni;
STREAM_GETL(s, uni);
if (zclient_debug)
- zlog_debug("%s: %u", __PRETTY_FUNCTION__, uni);
+ zlog_debug("%s: %u", __func__, uni);
*unique = uni;
return true;
STREAM_GET(ipset_name, s, ZEBRA_IPSET_NAME_SIZE);
if (zclient_debug)
- zlog_debug("%s: %u", __PRETTY_FUNCTION__, uni);
+ zlog_debug("%s: %u", __func__, uni);
*unique = uni;
return true;
STREAM_GETL(s, uni);
if (zclient_debug)
- zlog_debug("%s: %u", __PRETTY_FUNCTION__, uni);
+ zlog_debug("%s: %u", __func__, uni);
*unique = uni;
return true;
if (zl->route.prefix.prefixlen > IPV4_MAX_BITLEN) {
zlog_debug(
"%s: Specified prefix length %d is greater than a v4 address can support",
- __PRETTY_FUNCTION__,
- zl->route.prefix.prefixlen);
+ __func__, zl->route.prefix.prefixlen);
return -1;
}
STREAM_GET(&zl->route.prefix.u.prefix4.s_addr, s,
if (zl->route.prefix.prefixlen > IPV6_MAX_BITLEN) {
zlog_debug(
"%s: Specified prefix length %d is greater than a v6 address can support",
- __PRETTY_FUNCTION__,
- zl->route.prefix.prefixlen);
+ __func__, zl->route.prefix.prefixlen);
return -1;
}
STREAM_GET(&zl->route.prefix.u.prefix6, s, psize);
default:
flog_err(EC_LIB_ZAPI_ENCODE,
"%s: Specified family %u is not v4 or v6",
- __PRETTY_FUNCTION__, zl->route.prefix.family);
+ __func__, zl->route.prefix.family);
return -1;
}
fd = sock_open_unix(nhrp_event_socket_path);
if (fd < 0) {
zlog_warn("%s: failure connecting nhrp-event socket: %s",
- __PRETTY_FUNCTION__, strerror(errno));
+ __func__, strerror(errno));
zbufq_reset(&evmgr->obuf);
thread_add_timer(master, evmgr_reconnect, evmgr, 10,
&evmgr->t_reconnect);
fd = sock_open_unix("/var/run/charon.vici");
if (fd < 0) {
debugf(NHRP_DEBUG_VICI,
- "%s: failure connecting VICI socket: %s",
- __PRETTY_FUNCTION__, strerror(errno));
+ "%s: failure connecting VICI socket: %s", __func__,
+ strerror(errno));
thread_add_timer(master, vici_reconnect, vici, 2,
&vici->t_reconnect);
return 0;
&route->prefix)), buf,
sizeof(buf));
zlog_debug(
- "%s: route %s with cost %u is not best, ignore."
- , __PRETTY_FUNCTION__, buf,
+ "%s: route %s with cost %u is not best, ignore.",
+ __func__, buf,
route->path.cost);
}
return 0;
if (is_debug) {
prefix2str(&route->prefix, buf,
sizeof(buf));
- zlog_debug("%s: intra-prefix route %s with cost %u is not best, ignore."
- , __PRETTY_FUNCTION__, buf,
- route->path.cost);
+ zlog_debug(
+ "%s: intra-prefix route %s with cost %u is not best, ignore.",
+ __func__, buf,
+ route->path.cost);
}
return 0;
}
case OSPF6_LSTYPE_ROUTER:
case OSPF6_LSTYPE_NETWORK:
if (IS_OSPF6_DEBUG_EXAMIN_TYPE(lsa->header->type)) {
- zlog_debug("%s Examin LSA %s", __PRETTY_FUNCTION__,
- lsa->name);
+ zlog_debug("%s Examin LSA %s", __func__, lsa->name);
zlog_debug(" Schedule SPF Calculation for %s",
OSPF6_AREA(lsa->lsdb->data)->name);
}
if (IS_OSPF6_DEBUG_EXAMIN(AS_EXTERNAL)) {
prefix2str(&route->prefix, buf, sizeof(buf));
zlog_debug("%s: AS-External %u route add %s cost %u(%u) nh %u",
- __PRETTY_FUNCTION__,
+ __func__,
(route->path.type == OSPF6_PATH_TYPE_EXTERNAL1) ? 1
: 2,
buf, route->path.cost, route->path.u.cost_e2,
if (ospf6->rmap[arg_type].map) {
if (IS_OSPF6_DEBUG_ASBR)
zlog_debug("%s: route-map %s update, reset redist %s",
- __PRETTY_FUNCTION__,
- ospf6->rmap[arg_type].name,
+ __func__, ospf6->rmap[arg_type].name,
ZROUTE_NAME(arg_type));
ospf6_zebra_no_redistribute(arg_type);
args[1] = (void *)((ptrdiff_t)type);
if (IS_OSPF6_DEBUG_ASBR)
- zlog_debug("%s: trigger redistribute %s reset thread",
- __PRETTY_FUNCTION__, ZROUTE_NAME(type));
+ zlog_debug("%s: trigger redistribute %s reset thread", __func__,
+ ZROUTE_NAME(type));
ospf6->t_distribute_update = NULL;
thread_add_timer_msec(master, ospf6_asbr_routemap_update_timer,
if (IS_OSPF6_DEBUG_ASBR)
zlog_debug(
"%s: route-map %s update, reset redist %s",
- __PRETTY_FUNCTION__, mapname,
+ __func__, mapname,
ZROUTE_NAME(type));
route_map_counter_increment(
if (IS_OSPF6_DEBUG_LSA_TYPE(lsa->header->type)
|| IS_OSPF6_DEBUG_EXAMIN_TYPE(lsa->header->type))
zlog_debug("%s Install LSA: %s age %d seqnum %x in LSDB.",
- __PRETTY_FUNCTION__, lsa->name,
- ntohs(lsa->header->age), ntohl(lsa->header->seqnum));
+ __func__, lsa->name, ntohs(lsa->header->age),
+ ntohl(lsa->header->seqnum));
/* actually install */
lsa->installed = now;
if (is_debug)
zlog_debug(
"%s: Current copy of LSA %s is MAXAGE, but new has recent Age.",
- old->name, __PRETTY_FUNCTION__);
+ old->name, __func__);
ospf6_lsa_purge(old);
if (new->header->adv_router
return;
if (IS_OSPF6_DEBUG_EXAMIN(INTRA_PREFIX))
- zlog_debug("%s: LSA %s found", __PRETTY_FUNCTION__, lsa->name);
+ zlog_debug("%s: LSA %s found", __func__, lsa->name);
oa = OSPF6_AREA(lsa->lsdb->data);
if (old) {
if (IS_OSPF6_DEBUG_EXAMIN(INTRA_PREFIX)) {
prefix2str(&route->prefix, buf, sizeof(buf));
- zlog_debug("%s Update route: %s old cost %u new cost %u paths %u nh %u",
- __PRETTY_FUNCTION__, buf,
- old->path.cost, route->path.cost,
- listcount(route->paths),
- listcount(route->nh_list));
+ zlog_debug(
+ "%s Update route: %s old cost %u new cost %u paths %u nh %u",
+ __func__, buf, old->path.cost,
+ route->path.cost,
+ listcount(route->paths),
+ listcount(route->nh_list));
}
ospf6_intra_prefix_route_ecmp_path(oa, old, route);
} else {
if (IS_OSPF6_DEBUG_EXAMIN(INTRA_PREFIX)) {
prefix2str(&route->prefix, buf, sizeof(buf));
- zlog_debug("%s route %s add with cost %u paths %u nh %u",
- __PRETTY_FUNCTION__, buf,
- route->path.cost,
- listcount(route->paths),
- listcount(route->nh_list));
+ zlog_debug(
+ "%s route %s add with cost %u paths %u nh %u",
+ __func__, buf, route->path.cost,
+ listcount(route->paths),
+ listcount(route->nh_list));
}
ospf6_route_add(route, oa->route_table);
}
char buf[PREFIX2STR_BUFFER];
if (IS_OSPF6_DEBUG_EXAMIN(INTRA_PREFIX))
- zlog_debug("%s: %s disappearing", __PRETTY_FUNCTION__,
- lsa->name);
+ zlog_debug("%s: %s disappearing", __func__, lsa->name);
oa = OSPF6_AREA(lsa->lsdb->data);
if (IS_OSPF6_DEBUG_EXAMIN(INTRA_PREFIX)) {
prefix2str(&route->prefix, buf,
sizeof(buf));
- zlog_debug("%s: route remove %s with path type %u cost %u paths %u nh %u",
- __PRETTY_FUNCTION__, buf,
- route->path.type,
- route->path.cost,
- listcount(route->paths),
- listcount(route->nh_list));
+ zlog_debug(
+ "%s: route remove %s with path type %u cost %u paths %u nh %u",
+ __func__, buf, route->path.type,
+ route->path.cost,
+ listcount(route->paths),
+ listcount(route->nh_list));
}
ospf6_route_remove(route, oa->route_table);
}
if (IS_OSPF6_DEBUG_BROUTER_SPECIFIC_AREA_ID(oa->area_id) ||
IS_OSPF6_DEBUG_ROUTE(MEMORY))
- zlog_info("%s: border-router calculation for area %s",
- __PRETTY_FUNCTION__, oa->name);
+ zlog_info("%s: border-router calculation for area %s", __func__,
+ oa->name);
hook_add = oa->ospf6->brouter_table->hook_add;
hook_remove = oa->ospf6->brouter_table->hook_remove;
if (ospf6_route_lookup(&adv_prefix, oa->spf_table)) {
if (IS_OSPF6_DEBUG_BROUTER) {
- zlog_debug("%s: keep inter brouter %s as adv router 0x%x found in spf",
- __PRETTY_FUNCTION__,
- brouter_name,
- brouter->path.origin.adv_router);
+ zlog_debug(
+ "%s: keep inter brouter %s as adv router 0x%x found in spf",
+ __func__, brouter_name,
+ brouter->path.origin
+ .adv_router);
ospf6_brouter_debug_print(brouter);
}
UNSET_FLAG(brouter->flag, OSPF6_ROUTE_REMOVE);
brouter_id)
|| IS_OSPF6_DEBUG_BROUTER_SPECIFIC_AREA_ID(
oa->area_id))
- zlog_info("%s: brouter %s disappears via area %s",
- __PRETTY_FUNCTION__, brouter_name,
- oa->name);
+ zlog_info(
+ "%s: brouter %s disappears via area %s",
+ __func__, brouter_name, oa->name);
/* This is used to protect nbrouter from removed from
* the table. For an example, ospf6_abr_examin_summary,
* removes brouters which are marked for remove.
|| IS_OSPF6_DEBUG_BROUTER_SPECIFIC_AREA_ID(
oa->area_id))
zlog_info("%s: brouter %s appears via area %s",
- __PRETTY_FUNCTION__, brouter_name,
- oa->name);
+ __func__, brouter_name, oa->name);
/* newly added */
if (hook_add)
if (IS_OSPF6_DEBUG_BROUTER_SPECIFIC_AREA_ID(oa->area_id) ||
IS_OSPF6_DEBUG_ROUTE(MEMORY))
zlog_info("%s: border-router calculation for area %s: done",
- __PRETTY_FUNCTION__, oa->name);
+ __func__, oa->name);
}
static const struct ospf6_lsa_handler router_handler = {
if (IS_OSPF6_DEBUG_FLOODING
|| IS_OSPF6_DEBUG_MESSAGE(OSPF6_MESSAGE_TYPE_LSUPDATE, SEND))
- zlog_debug("%s: Send lsupdate with lsa %s (age %u)",
- __PRETTY_FUNCTION__, lsa->name,
- ntohs(lsa->header->age));
+ zlog_debug("%s: Send lsupdate with lsa %s (age %u)", __func__,
+ lsa->name, ntohs(lsa->header->age));
ospf6_send_lsupdate(on, NULL, oh);
if (IS_OSPF6_DEBUG_MESSAGE(
OSPF6_MESSAGE_TYPE_LSUPDATE, SEND))
zlog_debug("%s: LSUpdate length %d",
- __PRETTY_FUNCTION__,
- ntohs(oh->length));
+ __func__, ntohs(oh->length));
memset(sendbuf, 0, iobuflen);
oh = (struct ospf6_header *)sendbuf;
if (IS_OSPF6_DEBUG_SPF(PROCESS)) {
zlog_debug(
"%s: V lsa %s id %u, route id %u are different",
- __PRETTY_FUNCTION__, v->lsa->name,
+ __func__, v->lsa->name,
ntohl(v->lsa->header->id),
ntohl(route->path.origin.id));
}
rtr_lsa = ospf6_lsdb_next(end, rtr_lsa);
}
if (IS_OSPF6_DEBUG_SPF(PROCESS))
- zlog_debug("%s: adv_router %s num_lsa %u to convert.",
- __PRETTY_FUNCTION__, ifbuf, num_lsa);
+ zlog_debug("%s: adv_router %s num_lsa %u to convert.", __func__,
+ ifbuf, num_lsa);
if (num_lsa == 1)
return lsa;
if (num_lsa == 0) {
if (IS_OSPF6_DEBUG_SPF(PROCESS))
zlog_debug("%s: adv_router %s not found in LSDB.",
- __PRETTY_FUNCTION__, ifbuf);
+ __func__, ifbuf);
return NULL;
}
inet_ntop(AF_INET, &interface_id, ifbuf, sizeof(ifbuf));
zlog_debug(
"%s: Next Router LSA %s to aggreat with len %u interface_id %s",
- __PRETTY_FUNCTION__, rtr_lsa->name,
+ __func__, rtr_lsa->name,
ntohs(lsa_header->length), ifbuf);
}
if (IS_OSPF6_DEBUG_SPF(PROCESS))
zlog_debug("%s: LSA %s id %u type 0%x len %u num_lsa %u",
- __PRETTY_FUNCTION__, lsa->name,
- ntohl(lsa->header->id), ntohs(lsa->header->type),
- ntohs(lsa->header->length), num_lsa);
+ __func__, lsa->name, ntohl(lsa->header->id),
+ ntohs(lsa->header->type), ntohs(lsa->header->length),
+ num_lsa);
return lsa;
}
inet_ntop(AF_INET, &brouter_id, brouter_name,
sizeof(brouter_name));
zlog_debug("%s: brouter %s add with adv router %x nh count %u",
- __PRETTY_FUNCTION__, brouter_name,
+ __func__, brouter_name,
route->path.origin.adv_router,
listcount(route->nh_list));
}
inet_ntop(AF_INET, &brouter_id, brouter_name,
sizeof(brouter_name));
zlog_debug("%s: brouter %p %s del with adv router %x nh %u",
- __PRETTY_FUNCTION__, (void *)route, brouter_name,
+ __func__, (void *)route, brouter_name,
route->path.origin.adv_router,
listcount(route->nh_list));
}
if (IS_OSPF6_DEBUG_ZEBRA(RECV)) {
char buf[INET_ADDRSTRLEN];
- zlog_debug("%s: zebra router-id %s update",
- __PRETTY_FUNCTION__,
- inet_ntop(AF_INET, &router_id.u.prefix4,
- buf, INET_ADDRSTRLEN));
+ zlog_debug("%s: zebra router-id %s update", __func__,
+ inet_ntop(AF_INET, &router_id.u.prefix4, buf,
+ INET_ADDRSTRLEN));
}
ospf6_router_id_update();
retransmissions */
lsa->data->ls_age = htons(OSPF_LSA_MAXAGE);
if (IS_DEBUG_OSPF_EVENT)
- zlog_debug("%s: MAXAGE set to LSA %s", __PRETTY_FUNCTION__,
+ zlog_debug("%s: MAXAGE set to LSA %s", __func__,
inet_ntoa(lsa->data->id));
monotime(&lsa->tv_recv);
lsa->tv_orig = lsa->tv_recv;
if (IS_DEBUG_OSPF_EVENT)
zlog_debug("%s: ospf interface %s vrf %s id %u created",
- __PRETTY_FUNCTION__, ifp->name,
- ospf_get_name(ospf), ospf->vrf_id);
+ __func__, ifp->name, ospf_get_name(ospf),
+ ospf->vrf_id);
return oi;
}
if (IS_DEBUG_OSPF_EVENT)
zlog_debug("%s: ospf interface %s vrf %s id %u deleted",
- __PRETTY_FUNCTION__, oi->ifp->name,
+ __func__, oi->ifp->name,
ospf_vrf_id_to_name(oi->ifp->vrf_id),
oi->ifp->vrf_id);
} else {
if (IS_DEBUG_OSPF_EVENT)
zlog_debug("%s: lsa %s is not found in maxage db.",
- __PRETTY_FUNCTION__, dump_lsa_key(lsa));
+ __func__, dump_lsa_key(lsa));
}
}
zlog_info(
"%s:[%s:%s], %s -> %s): "
"scheduling new router-LSA origination",
- __PRETTY_FUNCTION__, inet_ntoa(nbr->router_id),
+ __func__, inet_ntoa(nbr->router_id),
ospf_get_name(oi->ospf),
lookup_msg(ospf_nsm_state_msg, old_state, NULL),
lookup_msg(ospf_nsm_state_msg, state, NULL));
}
if (IS_DEBUG_OSPF_PACKET(0, RECV))
- zlog_debug("%s: fd %d(%s) on interface %d(%s)",
- __PRETTY_FUNCTION__, fd, ospf_get_name(ospf),
- ifindex, *ifp ? (*ifp)->name : "Unknown");
+ zlog_debug("%s: fd %d(%s) on interface %d(%s)", __func__, fd,
+ ospf_get_name(ospf), ifindex,
+ *ifp ? (*ifp)->name : "Unknown");
return ibuf;
}
if (IS_DEBUG_OSPF_PACKET(0, RECV))
zlog_debug(
"%s: Unable to determine incoming interface from: %s(%s)",
- __PRETTY_FUNCTION__,
- inet_ntoa(iph->ip_src),
+ __func__, inet_ntoa(iph->ip_src),
ospf_get_name(ospf));
return OSPF_READ_CONTINUE;
}
if (oi->ospf->vrf_id)
zlog_debug(
"%s: Hello Tx interface %s ospf vrf %s id %u",
- __PRETTY_FUNCTION__, oi->ifp->name,
+ __func__, oi->ifp->name,
ospf_vrf_id_to_name(oi->ospf->vrf_id),
oi->ospf->vrf_id);
}
ospf_nbr_state_message(on, msgbuf, sizeof(msgbuf));
if (IS_DEBUG_OSPF_EVENT)
- zlog_info("%s: trap sent: %s now %s", __PRETTY_FUNCTION__,
+ zlog_info("%s: trap sent: %s now %s", __func__,
inet_ntoa(on->address.u.prefix4), msgbuf);
oid_copy_addr(index, &(on->address.u.prefix4), IN_ADDR_SIZE);
oid index[sizeof(oid) * (IN_ADDR_SIZE + 1)];
if (IS_DEBUG_OSPF_EVENT)
- zlog_info("%s: trap sent: %s now %s", __PRETTY_FUNCTION__,
+ zlog_info("%s: trap sent: %s now %s", __func__,
inet_ntoa(oi->address->u.prefix4),
lookup_msg(ospf_ism_state_msg, oi->state, NULL));
prefix2str(&router_id, buf, sizeof(buf));
zlog_debug(
"%s: ospf instance not found for vrf %s id %u router_id %s",
- __PRETTY_FUNCTION__,
- ospf_vrf_id_to_name(vrf_id), vrf_id, buf);
+ __func__, ospf_vrf_id_to_name(vrf_id), vrf_id,
+ buf);
}
}
return 0;
if (IS_DEBUG_OSPF_EVENT)
zlog_debug(
"%s: Rx Interface %s VRF change vrf_id %u New vrf %s id %u",
- __PRETTY_FUNCTION__, ifp->name, vrf_id,
+ __func__, ifp->name, vrf_id,
ospf_vrf_id_to_name(new_vrf_id), new_vrf_id);
/*if_update(ifp, ifp->name, strlen(ifp->name), new_vrf_id);*/
if (ospf->vrf_id != VRF_UNKNOWN) {
if (IS_DEBUG_OSPF_EVENT)
- zlog_debug("%s: Register VRF %s id %u",
- __PRETTY_FUNCTION__,
+ zlog_debug("%s: Register VRF %s id %u", __func__,
ospf_vrf_id_to_name(ospf->vrf_id),
ospf->vrf_id);
zclient_send_reg_requests(zclient, ospf->vrf_id);
if (ospf->vrf_id != VRF_DEFAULT && ospf->vrf_id != VRF_UNKNOWN) {
if (IS_DEBUG_OSPF_EVENT)
zlog_debug("%s: De-Register VRF %s id %u to Zebra.",
- __PRETTY_FUNCTION__,
- ospf_vrf_id_to_name(ospf->vrf_id),
+ __func__, ospf_vrf_id_to_name(ospf->vrf_id),
ospf->vrf_id);
/* Deregister for router-id, interfaces,
* redistributed routes. */
if (IS_DEBUG_OSPF_EVENT)
zlog_debug(
"%s: Create new ospf instance with vrf_name %s vrf_id %u",
- __PRETTY_FUNCTION__, name, new->vrf_id);
+ __func__, name, new->vrf_id);
} else {
new->vrf_id = VRF_DEFAULT;
vrf = vrf_lookup_by_id(VRF_DEFAULT);
if (IS_DEBUG_OSPF_EVENT)
zlog_debug(
"%s: interface %s ifp->vrf_id %u ospf vrf %s vrf_id %u router_id %s",
- __PRETTY_FUNCTION__, ifp->name, ifp->vrf_id,
+ __func__, ifp->name, ifp->vrf_id,
ospf_vrf_id_to_name(ospf->vrf_id), ospf->vrf_id,
inet_ntoa(ospf->router_id));
static int ospf_vrf_new(struct vrf *vrf)
{
if (IS_DEBUG_OSPF_EVENT)
- zlog_debug("%s: VRF Created: %s(%u)", __PRETTY_FUNCTION__,
- vrf->name, vrf->vrf_id);
+ zlog_debug("%s: VRF Created: %s(%u)", __func__, vrf->name,
+ vrf->vrf_id);
return 0;
}
static int ospf_vrf_delete(struct vrf *vrf)
{
if (IS_DEBUG_OSPF_EVENT)
- zlog_debug("%s: VRF Deletion: %s(%u)", __PRETTY_FUNCTION__,
- vrf->name, vrf->vrf_id);
+ zlog_debug("%s: VRF Deletion: %s(%u)", __func__, vrf->name,
+ vrf->vrf_id);
return 0;
}
return 0;
if (IS_DEBUG_OSPF_EVENT)
- zlog_debug("%s: VRF %s id %d disabled.", __PRETTY_FUNCTION__,
- vrf->name, vrf->vrf_id);
+ zlog_debug("%s: VRF %s id %d disabled.", __func__, vrf->name,
+ vrf->vrf_id);
ospf = ospf_lookup_by_name(vrf->name);
if (ospf) {
ospf_vrf_unlink(ospf, vrf);
ospf->oi_running = 0;
if (IS_DEBUG_OSPF_EVENT)
- zlog_debug("%s: ospf old_vrf_id %d unlinked",
- __PRETTY_FUNCTION__, old_vrf_id);
+ zlog_debug("%s: ospf old_vrf_id %d unlinked", __func__,
+ old_vrf_id);
thread_cancel(ospf->t_read);
close(ospf->fd);
ospf->fd = -1;
pbrm = pbrm_find(name);
if (!pbrm) {
DEBUGD(&pbr_dbg_map,
- "%s: Specified PBR-MAP(%s) does not exist?",
- __PRETTY_FUNCTION__, name);
+ "%s: Specified PBR-MAP(%s) does not exist?", __func__,
+ name);
return false;
}
bool install;
pbrm = pbrms->parent;
- DEBUGD(&pbr_dbg_map, "%s: for %s(%u)", __PRETTY_FUNCTION__,
- pbrm->name, pbrms->seqno);
+ DEBUGD(&pbr_dbg_map, "%s: for %s(%u)", __func__, pbrm->name,
+ pbrms->seqno);
if (pbr_map_check_valid(pbrm->name))
DEBUGD(&pbr_dbg_map, "We are totally valid %s",
pbrm->name);
if (pbrms->reason == PBR_MAP_VALID_SEQUENCE_NUMBER) {
install = true;
DEBUGD(&pbr_dbg_map, "%s: Installing %s(%u) reason: %" PRIu64,
- __PRETTY_FUNCTION__, pbrm->name, pbrms->seqno,
- pbrms->reason);
+ __func__, pbrm->name, pbrms->seqno, pbrms->reason);
DEBUGD(&pbr_dbg_map,
"\tSending PBR_MAP_POLICY_INSTALL event");
} else {
install = false;
- DEBUGD(&pbr_dbg_map,
- "%s: Removing %s(%u) reason: %" PRIu64,
- __PRETTY_FUNCTION__, pbrm->name,
- pbrms->seqno, pbrms->reason);
+ DEBUGD(&pbr_dbg_map, "%s: Removing %s(%u) reason: %" PRIu64,
+ __func__, pbrm->name, pbrms->seqno, pbrms->reason);
}
if (install)
/* Decremented again in pbr_nh_delete */
++nhrc->refcount;
- DEBUGD(&pbr_dbg_nht, "%s: Sending nexthop to Zebra",
- __PRETTY_FUNCTION__);
+ DEBUGD(&pbr_dbg_nht, "%s: Sending nexthop to Zebra", __func__);
pbr_send_rnh(new->nexthop, true);
--nhrc->refcount;
if (!nhrc || nhrc->refcount == 0) {
DEBUGD(&pbr_dbg_nht, "%s: Removing nexthop from Zebra",
- __PRETTY_FUNCTION__);
+ __func__);
pbr_send_rnh((*pnhc)->nexthop, false);
}
if (nhrc && nhrc->refcount == 0) {
strlcpy(new->name, pnhgc->name, sizeof(pnhgc->name));
new->table_id = pbr_nht_get_next_tableid(false);
- DEBUGD(&pbr_dbg_nht, "%s: NHT: %s assigned Table ID: %u",
- __PRETTY_FUNCTION__, new->name, new->table_id);
+ DEBUGD(&pbr_dbg_nht, "%s: NHT: %s assigned Table ID: %u", __func__,
+ new->name, new->table_id);
new->nhh = hash_create_size(8, pbr_nh_hash_key, pbr_nh_hash_equal,
"PBR NH Cache Hash");
if (!nhgc) {
DEBUGD(&pbr_dbg_nht, "%s: Could not find nhgc with name: %s\n",
- __PRETTY_FUNCTION__, name);
+ __func__, name);
return;
}
if (!pnhgc)
return;
- DEBUGD(&pbr_dbg_nht, "%s: Added nexthop-group %s", __PRETTY_FUNCTION__,
- name);
+ DEBUGD(&pbr_dbg_nht, "%s: Added nexthop-group %s", __func__, name);
pbr_map_check_nh_group_change(name);
}
if (!pbr_nht_get_next_tableid(true)) {
zlog_warn(
"%s: Exhausted all table identifiers; cannot create nexthop-group cache for nexthop-group '%s'",
- __PRETTY_FUNCTION__, nhgc->name);
+ __func__, nhgc->name);
return;
}
if (DEBUG_MODE_CHECK(&pbr_dbg_nht, DEBUG_MODE_ALL)) {
nexthop2str(nhop, debugstr, sizeof(debugstr));
DEBUGD(&pbr_dbg_nht, "%s: Added %s to nexthop-group %s",
- __PRETTY_FUNCTION__, debugstr, nhgc->name);
+ __func__, debugstr, nhgc->name);
}
pbr_nht_install_nexthop_group(pnhgc, nhgc->nhg);
if (DEBUG_MODE_CHECK(&pbr_dbg_nht, DEBUG_MODE_ALL)) {
nexthop2str(nhop, debugstr, sizeof(debugstr));
DEBUGD(&pbr_dbg_nht, "%s: Removed %s from nexthop-group %s",
- __PRETTY_FUNCTION__, debugstr, nhgc->name);
+ __func__, debugstr, nhgc->name);
}
if (pnhgc->nhh->count)
void pbr_nhgroup_delete_cb(const char *name)
{
- DEBUGD(&pbr_dbg_nht, "%s: Removed nexthop-group %s",
- __PRETTY_FUNCTION__, name);
+ DEBUGD(&pbr_dbg_nht, "%s: Removed nexthop-group %s", __func__, name);
/* delete group from all pbrms's */
pbr_nht_delete_group(name);
uint32_t *table_id = (uint32_t *)data;
if (pnhgc->table_id == *table_id) {
- DEBUGD(&pbr_dbg_nht, "%s: Table ID (%u) matches %s",
- __PRETTY_FUNCTION__, *table_id, pnhgc->name);
+ DEBUGD(&pbr_dbg_nht, "%s: Table ID (%u) matches %s", __func__,
+ *table_id, pnhgc->name);
/*
* If the table has been re-handled by zebra
if (!pbr_nht_get_next_tableid(true)) {
zlog_warn(
"%s: Exhausted all table identifiers; cannot create nexthop-group cache for nexthop-group '%s'",
- __PRETTY_FUNCTION__, find.name);
+ __func__, find.name);
return;
}
bool pbr_nht_nexthop_valid(struct nexthop_group *nhg)
{
- DEBUGD(&pbr_dbg_nht, "%s: %p", __PRETTY_FUNCTION__, nhg);
+ DEBUGD(&pbr_dbg_nht, "%s: %p", __func__, nhg);
return true;
}
struct pbr_nexthop_group_cache *pnhgc;
struct pbr_nexthop_group_cache lookup;
- DEBUGD(&pbr_dbg_nht, "%s: %s", __PRETTY_FUNCTION__, name);
+ DEBUGD(&pbr_dbg_nht, "%s: %s", __func__, name);
snprintf(lookup.name, sizeof(lookup.name), "%s", name);
pnhgc = hash_get(pbr_nhg_hash, &lookup, NULL);
if (!pnhgc)
return false;
- DEBUGD(&pbr_dbg_nht, "%s: \t%d %d", __PRETTY_FUNCTION__, pnhgc->valid,
+ DEBUGD(&pbr_dbg_nht, "%s: \t%d %d", __func__, pnhgc->valid,
pnhgc->installed);
if (pnhgc->valid && pnhgc->installed)
return true;
if (!pnhgc) {
DEBUGD(&pbr_dbg_nht,
"%s: Could not find nexthop-group cache w/ name '%s'",
- __PRETTY_FUNCTION__, name);
+ __func__, name);
return 5000;
}
/* Inteface addition message from zebra. */
int pbr_ifp_create(struct interface *ifp)
{
- DEBUGD(&pbr_dbg_zebra,
- "%s: %s", __PRETTY_FUNCTION__, ifp->name);
+ DEBUGD(&pbr_dbg_zebra, "%s: %s", __func__, ifp->name);
if (!ifp->info)
pbr_if_new(ifp);
int pbr_ifp_destroy(struct interface *ifp)
{
- DEBUGD(&pbr_dbg_zebra,
- "%s: %s", __PRETTY_FUNCTION__, ifp->name);
+ DEBUGD(&pbr_dbg_zebra, "%s: %s", __func__, ifp->name);
pbr_map_policy_interface_update(ifp, false);
c = zebra_interface_address_read(cmd, zclient->ibuf, vrf_id);
- DEBUGD(&pbr_dbg_zebra,
- "%s: %s added %s", __PRETTY_FUNCTION__,
+ DEBUGD(&pbr_dbg_zebra, "%s: %s added %s", __func__,
c ? c->ifp->name : "Unknown",
c ? prefix2str(c->address, buf, sizeof(buf)) : "Unknown");
if (!c)
return 0;
- DEBUGD(&pbr_dbg_zebra,
- "%s: %s deleted %s", __PRETTY_FUNCTION__, c->ifp->name,
+ DEBUGD(&pbr_dbg_zebra, "%s: %s deleted %s", __func__, c->ifp->name,
prefix2str(c->address, buf, sizeof(buf)));
connected_free(&c);
int pbr_ifp_up(struct interface *ifp)
{
- DEBUGD(&pbr_dbg_zebra,
- "%s: %s is up", __PRETTY_FUNCTION__, ifp->name);
+ DEBUGD(&pbr_dbg_zebra, "%s: %s is up", __func__, ifp->name);
pbr_nht_nexthop_interface_update(ifp);
int pbr_ifp_down(struct interface *ifp)
{
- DEBUGD(&pbr_dbg_zebra,
- "%s: %s is down", __PRETTY_FUNCTION__, ifp->name);
+ DEBUGD(&pbr_dbg_zebra, "%s: %s is down", __func__, ifp->name);
pbr_nht_nexthop_interface_update(ifp);
switch (note) {
case ZAPI_ROUTE_FAIL_INSTALL:
DEBUGD(&pbr_dbg_zebra,
- "%s: [%s] Route install failure for table: %u",
- __PRETTY_FUNCTION__, buf, table_id);
+ "%s: [%s] Route install failure for table: %u", __func__,
+ buf, table_id);
break;
case ZAPI_ROUTE_BETTER_ADMIN_WON:
DEBUGD(&pbr_dbg_zebra,
"%s: [%s] Route better admin distance won for table: %u",
- __PRETTY_FUNCTION__, buf, table_id);
+ __func__, buf, table_id);
break;
case ZAPI_ROUTE_INSTALLED:
DEBUGD(&pbr_dbg_zebra,
"%s: [%s] Route installed succeeded for table: %u",
- __PRETTY_FUNCTION__, buf, table_id);
+ __func__, buf, table_id);
pbr_nht_route_installed_for_table(table_id);
break;
case ZAPI_ROUTE_REMOVED:
DEBUGD(&pbr_dbg_zebra,
"%s: [%s] Route Removed succeeded for table: %u",
- __PRETTY_FUNCTION__, buf, table_id);
+ __func__, buf, table_id);
pbr_nht_route_removed_for_table(table_id);
break;
case ZAPI_ROUTE_REMOVE_FAIL:
DEBUGD(&pbr_dbg_zebra,
- "%s: [%s] Route remove fail for table: %u",
- __PRETTY_FUNCTION__, buf, table_id);
+ "%s: [%s] Route remove fail for table: %u", __func__,
+ buf, table_id);
break;
}
pbrms = pbrms_lookup_unique(unique, ifi, &pmi);
if (!pbrms) {
DEBUGD(&pbr_dbg_zebra,
- "%s: Failure to lookup pbrms based upon %u",
- __PRETTY_FUNCTION__, unique);
+ "%s: Failure to lookup pbrms based upon %u", __func__,
+ unique);
return 0;
}
static void zebra_connected(struct zclient *zclient)
{
- DEBUGD(&pbr_dbg_zebra, "%s: Registering for fun and profit",
- __PRETTY_FUNCTION__);
+ DEBUGD(&pbr_dbg_zebra, "%s: Registering for fun and profit", __func__);
zclient_send_reg_requests(zclient, VRF_DEFAULT);
}
{
struct zapi_route api;
- DEBUGD(&pbr_dbg_zebra, "%s for Table: %d", __PRETTY_FUNCTION__,
- pnhgc->table_id);
+ DEBUGD(&pbr_dbg_zebra, "%s for Table: %d", __func__, pnhgc->table_id);
memset(&api, 0, sizeof(api));
case AFI_L2VPN:
DEBUGD(&pbr_dbg_zebra,
"%s: Asked to install unsupported route type: L2VPN",
- __PRETTY_FUNCTION__);
+ __func__);
break;
case AFI_UNSPEC:
DEBUGD(&pbr_dbg_zebra,
- "%s: Asked to install unspecified route type",
- __PRETTY_FUNCTION__);
+ "%s: Asked to install unspecified route type", __func__);
break;
}
}
{
struct zapi_route api;
- DEBUGD(&pbr_dbg_zebra, "%s for Table: %d", __PRETTY_FUNCTION__,
- pnhgc->table_id);
+ DEBUGD(&pbr_dbg_zebra, "%s for Table: %d", __func__, pnhgc->table_id);
memset(&api, 0, sizeof(api));
api.vrf_id = VRF_DEFAULT;
case AFI_L2VPN:
DEBUGD(&pbr_dbg_zebra,
"%s: Asked to delete unsupported route type: L2VPN",
- __PRETTY_FUNCTION__);
+ __func__);
break;
case AFI_UNSPEC:
DEBUGD(&pbr_dbg_zebra,
- "%s: Asked to delete unspecified route type",
- __PRETTY_FUNCTION__);
+ "%s: Asked to delete unspecified route type", __func__);
break;
}
}
if (DEBUG_MODE_CHECK(&pbr_dbg_zebra, DEBUG_MODE_ALL)) {
DEBUGD(&pbr_dbg_zebra, "%s: Received Nexthop update: %s",
- __PRETTY_FUNCTION__,
- prefix2str(&nhr.prefix, buf, sizeof(buf)));
+ __func__, prefix2str(&nhr.prefix, buf, sizeof(buf)));
- DEBUGD(&pbr_dbg_zebra, "%s: (\tNexthops(%u)",
- __PRETTY_FUNCTION__, nhr.nexthop_num);
+ DEBUGD(&pbr_dbg_zebra, "%s: (\tNexthops(%u)", __func__,
+ nhr.nexthop_num);
for (i = 0; i < nhr.nexthop_num; i++) {
DEBUGD(&pbr_dbg_zebra,
"%s: \tType: %d: vrf: %d, ifindex: %d gate: %s",
- __PRETTY_FUNCTION__, nhr.nexthops[i].type,
+ __func__, nhr.nexthops[i].type,
nhr.nexthops[i].vrf_id, nhr.nexthops[i].ifindex,
inet_ntoa(nhr.nexthops[i].gate.ipv4));
}
if (zclient_send_rnh(zclient, command, &p,
false, nhop->vrf_id) < 0) {
- zlog_warn("%s: Failure to send nexthop to zebra",
- __PRETTY_FUNCTION__);
+ zlog_warn("%s: Failure to send nexthop to zebra", __func__);
}
}
is_installed &= pbrms->installed;
- DEBUGD(&pbr_dbg_zebra, "%s: for %s %d(%" PRIu64 ")",
- __PRETTY_FUNCTION__, pbrm->name, install, is_installed);
+ DEBUGD(&pbr_dbg_zebra, "%s: for %s %d(%" PRIu64 ")", __func__,
+ pbrm->name, install, is_installed);
/*
* If we are installed and asked to do so again
*/
stream_putl(s, 1);
- DEBUGD(&pbr_dbg_zebra, "%s: \t%s %s %d %s %u",
- __PRETTY_FUNCTION__, install ? "Installing" : "Deleting",
- pbrm->name, install, pmi->ifp->name, pmi->delete);
+ DEBUGD(&pbr_dbg_zebra, "%s: \t%s %s %d %s %u", __func__,
+ install ? "Installing" : "Deleting", pbrm->name, install,
+ pmi->ifp->name, pmi->delete);
pbr_encode_pbr_map_sequence(s, pbrms, pmi->ifp);
if (ch->ifassert_state != new_state) {
zlog_debug(
"%s: (S,G)=%s assert state changed from %s to %s on interface %s",
- __PRETTY_FUNCTION__, ch->sg_str,
+ __func__, ch->sg_str,
pim_ifchannel_ifassert_name(ch->ifassert_state),
pim_ifchannel_ifassert_name(new_state),
ch->interface->name);
sizeof(winner_str));
zlog_debug(
"%s: (S,G)=%s assert winner changed from %s to %s on interface %s",
- __PRETTY_FUNCTION__, ch->sg_str, was_str,
- winner_str, ch->interface->name);
+ __func__, ch->sg_str, was_str, winner_str,
+ ch->interface->name);
}
} /* PIM_DEBUG_PIM_EVENTS */
if (assert_action_a1(ch)) {
zlog_warn(
"%s: %s: (S,G)=%s assert_action_a1 failure on interface %s",
- __PRETTY_FUNCTION__, caller, ch->sg_str,
+ __func__, caller, ch->sg_str,
ch->interface->name);
/* log warning only */
}
case PIM_IFASSERT_NOINFO:
if (recv_metric.rpt_bit_flag) {
/* RPT bit set */
- if_could_assert_do_a1(__PRETTY_FUNCTION__, ch);
+ if_could_assert_do_a1(__func__, ch);
} else {
/* RPT bit clear */
if (inferior_assert(&ch->ifassert_my_metric,
&recv_metric)) {
- if_could_assert_do_a1(__PRETTY_FUNCTION__, ch);
+ if_could_assert_do_a1(__func__, ch);
} else if (acceptable_assert(&ch->ifassert_my_metric,
&recv_metric)) {
if (PIM_IF_FLAG_TEST_ASSERT_TRACKING_DESIRED(
default: {
zlog_warn(
"%s: (S,G)=%s invalid assert state %d on interface %s",
- __PRETTY_FUNCTION__, ch->sg_str, ch->ifassert_state,
- ifp->name);
+ __func__, ch->sg_str, ch->ifassert_state, ifp->name);
}
return -2;
}
int curr_size;
struct pim_interface *pim_ifp = NULL;
- on_trace(__PRETTY_FUNCTION__, ifp, src_addr);
+ on_trace(__func__, ifp, src_addr);
curr = buf;
curr_size = buf_size;
char src_str[INET_ADDRSTRLEN];
pim_inet4_dump("<src?>", src_addr, src_str, sizeof(src_str));
zlog_warn("%s: pim_parse_addr_group() failure: from %s on %s",
- __PRETTY_FUNCTION__, src_str, ifp->name);
+ __func__, src_str, ifp->name);
return -1;
}
curr += offset;
char src_str[INET_ADDRSTRLEN];
pim_inet4_dump("<src?>", src_addr, src_str, sizeof(src_str));
zlog_warn("%s: pim_parse_addr_ucast() failure: from %s on %s",
- __PRETTY_FUNCTION__, src_str, ifp->name);
+ __func__, src_str, ifp->name);
return -2;
}
curr += offset;
pim_inet4_dump("<src?>", src_addr, src_str, sizeof(src_str));
zlog_warn(
"%s: preference/metric size is less than 8 bytes: size=%d from %s on interface %s",
- __PRETTY_FUNCTION__, curr_size, src_str, ifp->name);
+ __func__, curr_size, src_str, ifp->name);
return -3;
}
pim_inet4_dump("<grp?>", sg.grp, group_str, sizeof(group_str));
zlog_debug(
"%s: from %s on %s: (S,G)=(%s,%s) pref=%u metric=%u rpt_bit=%u",
- __PRETTY_FUNCTION__, neigh_str, ifp->name, source_str,
- group_str, msg_metric.metric_preference,
- msg_metric.route_metric,
+ __func__, neigh_str, ifp->name, source_str, group_str,
+ msg_metric.metric_preference, msg_metric.route_metric,
PIM_FORCE_BOOLEAN(msg_metric.rpt_bit_flag));
}
sizeof(group_str));
zlog_warn(
"%s: failure encoding group address %s: space left=%d",
- __PRETTY_FUNCTION__, group_str, remain);
+ __func__, group_str, remain);
return -1;
}
sizeof(source_str));
zlog_warn(
"%s: failure encoding source address %s: space left=%d",
- __PRETTY_FUNCTION__, source_str, remain);
+ __func__, source_str, remain);
return -2;
}
if (!ifp) {
if (PIM_DEBUG_PIM_TRACE)
zlog_debug("%s: channel%s has no associated interface!",
- __PRETTY_FUNCTION__, ch->sg_str);
+ __func__, ch->sg_str);
return -1;
}
pim_ifp = ifp->info;
if (PIM_DEBUG_PIM_TRACE)
zlog_debug(
"%s: channel %s pim not enabled on interface: %s",
- __PRETTY_FUNCTION__, ch->sg_str, ifp->name);
+ __func__, ch->sg_str, ifp->name);
return -1;
}
if (pim_msg_size < 1) {
zlog_warn(
"%s: failure building PIM assert message: msg_size=%d",
- __PRETTY_FUNCTION__, pim_msg_size);
+ __func__, pim_msg_size);
return -2;
}
if (PIM_DEBUG_PIM_TRACE) {
zlog_debug("%s: to %s: (S,G)=%s pref=%u metric=%u rpt_bit=%u",
- __PRETTY_FUNCTION__, ifp->name, ch->sg_str,
+ __func__, ifp->name, ch->sg_str,
metric.metric_preference, metric.route_metric,
PIM_FORCE_BOOLEAN(metric.rpt_bit_flag));
}
qpim_all_pim_routers_addr, pim_msg, pim_msg_size,
ifp->name)) {
zlog_warn("%s: could not send PIM message on interface %s",
- __PRETTY_FUNCTION__, ifp->name);
+ __func__, ifp->name);
return -3;
}
if (PIM_DEBUG_PIM_TRACE) {
zlog_debug("%s: (S,G)=%s timer expired on interface %s",
- __PRETTY_FUNCTION__, ch->sg_str, ifp->name);
+ __func__, ch->sg_str, ifp->name);
}
ch->t_ifassert_timer = NULL;
if (PIM_DEBUG_PIM_EVENTS)
zlog_warn(
"%s: (S,G)=%s invalid assert state %d on interface %s",
- __PRETTY_FUNCTION__, ch->sg_str,
- ch->ifassert_state, ifp->name);
+ __func__, ch->sg_str, ch->ifassert_state,
+ ifp->name);
}
}
if (ch->t_ifassert_timer) {
zlog_debug(
"%s: (S,G)=%s cancelling timer on interface %s",
- __PRETTY_FUNCTION__, ch->sg_str,
- ch->interface->name);
+ __func__, ch->sg_str, ch->interface->name);
}
}
THREAD_OFF(ch->t_ifassert_timer);
if (PIM_DEBUG_PIM_TRACE) {
zlog_debug("%s: (S,G)=%s starting %u sec timer on interface %s",
- __PRETTY_FUNCTION__, ch->sg_str, interval,
- ch->interface->name);
+ __func__, ch->sg_str, interval, ch->interface->name);
}
thread_add_timer(router->master, on_assert_timer, ch, interval,
pim_ifp = ifp->info;
if (!pim_ifp) {
zlog_warn("%s: (S,G)=%s multicast not enabled on interface %s",
- __PRETTY_FUNCTION__, ch->sg_str, ifp->name);
+ __func__, ch->sg_str, ifp->name);
return -1; /* must return since pim_ifp is used below */
}
if (assert_action_a3(ch)) {
zlog_warn(
"%s: (S,G)=%s assert_action_a3 failure on interface %s",
- __PRETTY_FUNCTION__, ch->sg_str, ifp->name);
+ __func__, ch->sg_str, ifp->name);
/* warning only */
}
if (PIM_DEBUG_PIM_EVENTS)
zlog_warn(
"%s: channel%s not in expected PIM_IFASSERT_I_AM_WINNER state",
- __PRETTY_FUNCTION__, ch->sg_str);
+ __func__, ch->sg_str);
}
return 0;
if (PIM_DEBUG_PIM_EVENTS)
zlog_warn(
"%s: channel%s not in expected PIM_IFASSERT_I_AM_LOSER state",
- __PRETTY_FUNCTION__, ch->sg_str);
+ __func__, ch->sg_str);
}
}
if (PIM_DEBUG_PIM_EVENTS)
zlog_warn(
"%s: channel%s expected to be in PIM_IFASSERT_I_AM_WINNER state",
- __PRETTY_FUNCTION__, ch->sg_str);
+ __func__, ch->sg_str);
return -1;
}
if (pim_assert_send(ch)) {
zlog_warn("%s: (S,G)=%s failure sending assert on interface %s",
- __PRETTY_FUNCTION__, ch->sg_str, ch->interface->name);
+ __func__, ch->sg_str, ch->interface->name);
return -1;
}
{
if (pim_assert_cancel(ch)) {
zlog_warn("%s: failure sending AssertCancel%s on interface %s",
- __PRETTY_FUNCTION__, ch->sg_str, ch->interface->name);
+ __func__, ch->sg_str, ch->interface->name);
/* log warning only */
}
if (PIM_DEBUG_PIM_EVENTS)
zlog_warn(
"%s: channel%s not in PIM_IFASSERT_NOINFO state as expected",
- __PRETTY_FUNCTION__, ch->sg_str);
+ __func__, ch->sg_str);
}
}
if (PIM_DEBUG_PIM_EVENTS)
zlog_warn(
"%s: channel%s not in PIM_IFSSERT_NOINFO state as expected",
- __PRETTY_FUNCTION__, ch->sg_str);
+ __func__, ch->sg_str);
}
}
if (PIM_DEBUG_PIM_EVENTS)
zlog_warn(
"%s: channel%s not in PIM_IFASSERT_I_AM_LOSER state as expected",
- __PRETTY_FUNCTION__, ch->sg_str);
+ __func__, ch->sg_str);
}
}
char str[INET_ADDRSTRLEN];
pim_inet4_dump("<bfd_nbr?>", nbr->source_addr, str,
sizeof(str));
- zlog_debug("%s Nbr %s %s with BFD", __PRETTY_FUNCTION__, str,
+ zlog_debug("%s Nbr %s %s with BFD", __func__, str,
bfd_get_command_dbg_str(command));
}
if (pim_ifp->bfd_info) {
if (PIM_DEBUG_PIM_TRACE)
- zlog_debug("%s: interface %s has bfd_info",
- __PRETTY_FUNCTION__, ifp->name);
+ zlog_debug("%s: interface %s has bfd_info", __func__,
+ ifp->name);
}
if (command)
pim_bfd_reg_dereg_all_nbr(ifp, command);
rn = route_node_get(rt, grp);
if (!rn) {
- zlog_warn("%s: route node creation failed",
- __PRETTY_FUNCTION__);
+ zlog_warn("%s: route node creation failed", __func__);
return NULL;
}
bsgrp = XCALLOC(MTYPE_PIM_BSGRP_NODE, sizeof(struct bsgrp_node));
if (PIM_DEBUG_BSM)
zlog_debug("%s: Bootstrap Timer expired for scope: %d",
- __PRETTY_FUNCTION__, scope->sz_id);
+ __func__, scope->sz_id);
/* Remove next hop tracking for the bsr */
nht_p.family = AF_INET;
if (PIM_DEBUG_BSM) {
prefix2str(&nht_p, buf, sizeof(buf));
zlog_debug("%s: Deregister BSR addr %s with Zebra NHT",
- __PRETTY_FUNCTION__, buf);
+ __func__, buf);
}
pim_delete_tracked_nexthop(scope->pim, &nht_p, NULL, NULL,
is_bsr_tracking);
bsgrp_node = (struct bsgrp_node *)rn->info;
if (!bsgrp_node) {
if (PIM_DEBUG_BSM)
- zlog_debug("%s: bsgrp_node is null",
- __PRETTY_FUNCTION__);
+ zlog_debug("%s: bsgrp_node is null", __func__);
continue;
}
/* Give grace time for rp to continue for another hold time */
static void pim_bs_timer_stop(struct bsm_scope *scope)
{
if (PIM_DEBUG_BSM)
- zlog_debug("%s : BS timer being stopped of sz: %d",
- __PRETTY_FUNCTION__, scope->sz_id);
+ zlog_debug("%s : BS timer being stopped of sz: %d", __func__,
+ scope->sz_id);
THREAD_OFF(scope->bs_timer);
}
{
if (!scope) {
if (PIM_DEBUG_BSM)
- zlog_debug("%s : Invalid scope(NULL).",
- __PRETTY_FUNCTION__);
+ zlog_debug("%s : Invalid scope(NULL).", __func__);
return;
}
THREAD_OFF(scope->bs_timer);
if (PIM_DEBUG_BSM)
- zlog_debug("%s : starting bs timer for scope %d with timeout %d secs",
- __PRETTY_FUNCTION__, scope->sz_id, bs_timeout);
+ zlog_debug(
+ "%s : starting bs timer for scope %d with timeout %d secs",
+ __func__, scope->sz_id, bs_timeout);
thread_add_timer(router->master, pim_on_bs_timer, scope, bs_timeout,
&scope->bs_timer);
}
{
if (!bsrp) {
if (PIM_DEBUG_BSM)
- zlog_debug("%s : Invalid brsp(NULL).",
- __PRETTY_FUNCTION__);
+ zlog_debug("%s : Invalid brsp(NULL).", __func__);
return;
}
THREAD_OFF(bsrp->g2rp_timer);
zlog_debug(
"%s : starting g2rp timer for grp: %s - rp: %s with timeout %d secs(Actual Hold time : %d secs)",
- __PRETTY_FUNCTION__,
- prefix2str(&bsrp->bsgrp_node->group, buf, 48),
+ __func__, prefix2str(&bsrp->bsgrp_node->group, buf, 48),
inet_ntoa(bsrp->rp_address), hold_time,
bsrp->rp_holdtime);
}
char buf[48];
zlog_debug("%s : stopping g2rp timer for grp: %s - rp: %s",
- __PRETTY_FUNCTION__,
+ __func__,
prefix2str(&bsrp->bsgrp_node->group, buf, 48),
inet_ntoa(bsrp->rp_address));
}
if (!rn || (prefix_same(&rp_all->group, &bsgrp_node->group)
&& pim_rpf_addr_is_inaddr_none(&rp_all->rp))) {
if (PIM_DEBUG_BSM)
- zlog_debug("%s: Route node doesn't exist",
- __PRETTY_FUNCTION__);
+ zlog_debug("%s: Route node doesn't exist", __func__);
if (pend)
pim_rp_new(pim, pend->rp_address, bsgrp_node->group,
NULL, RP_SRC_BSR);
if (PIM_DEBUG_BSM) {
zlog_debug(
"%s: Both bsrp and partial list are empty",
- __PRETTY_FUNCTION__);
+ __func__);
}
pim_free_bsgrp_node(bsgrp_node->scope->bsrp_table,
&bsgrp_node->group);
&bsgrp_node->group);
if (PIM_DEBUG_BSM) {
zlog_debug("%s:Pend List is null,del grp node",
- __PRETTY_FUNCTION__);
+ __func__);
}
pim_free_bsgrp_data(bsgrp_node);
return;
if (PIM_DEBUG_BSM)
zlog_debug(
"%s: Partial list is empty, static rp exists",
- __PRETTY_FUNCTION__);
+ __func__);
pim_free_bsgrp_node(bsgrp_node->scope->bsrp_table,
&bsgrp_node->group);
pim_free_bsgrp_data(bsgrp_node);
char bsr_str[INET_ADDRSTRLEN];
pim_inet4_dump("<bsr?>", bsr, bsr_str, sizeof(bsr_str));
- zlog_debug("%s : No route to BSR address %s",
- __PRETTY_FUNCTION__, bsr_str);
+ zlog_debug("%s : No route to BSR address %s", __func__,
+ bsr_str);
}
return false;
}
prefix2str(&nht_p, buf, sizeof(buf));
zlog_debug(
"%s: Deregister BSR addr %s with Zebra NHT",
- __PRETTY_FUNCTION__, buf);
+ __func__, buf);
}
pim_delete_tracked_nexthop(pim, &nht_p, NULL, NULL,
is_bsr_tracking);
prefix2str(&nht_p, buf, sizeof(buf));
zlog_debug(
"%s: NHT Register BSR addr %s with Zebra NHT",
- __PRETTY_FUNCTION__, buf);
+ __func__, buf);
}
memset(&pnc, 0, sizeof(struct pim_nexthop_cache));
if (!pim_ifp) {
if (PIM_DEBUG_BSM)
zlog_debug("%s: Pim interface not available for %s",
- __PRETTY_FUNCTION__, ifp->name);
+ __func__, ifp->name);
return false;
}
if (pim_ifp->pim_sock_fd == -1) {
if (PIM_DEBUG_BSM)
zlog_debug("%s: Pim sock not available for %s",
- __PRETTY_FUNCTION__, ifp->name);
+ __func__, ifp->name);
return false;
}
if (pim_msg_send(pim_ifp->pim_sock_fd, pim_ifp->primary_address,
dst_addr, buf, len, ifp->name)) {
zlog_warn("%s: Could not send BSM message on interface: %s",
- __PRETTY_FUNCTION__, ifp->name);
+ __func__, ifp->name);
return false;
}
if (pim_mtu < (PIM_MIN_BSM_LEN)) {
zlog_warn(
"%s: mtu(pim mtu: %d) size less than minimum bootstrap len",
- __PRETTY_FUNCTION__, pim_mtu);
+ __func__, pim_mtu);
if (PIM_DEBUG_BSM)
zlog_debug(
"%s: mtu (pim mtu:%d) less than minimum bootstrap len",
- __PRETTY_FUNCTION__, pim_mtu);
+ __func__, pim_mtu);
return false;
}
dst_addr, no_fwd);
if (PIM_DEBUG_BSM)
zlog_debug("%s: pim_bsm_frag_send returned %s",
- __PRETTY_FUNCTION__,
- ret ? "TRUE" : "FALSE");
+ __func__, ret ? "TRUE" : "FALSE");
} else {
pim_msg_build_header(buf, len, PIM_MSG_TYPE_BOOTSTRAP,
no_fwd);
if (PIM_DEBUG_BSM)
zlog_debug(
"%s: pim_bsm_send_intf returned false",
- __PRETTY_FUNCTION__);
+ __func__);
}
}
}
if (!rn) {
if (PIM_DEBUG_BSM)
zlog_debug("%s: Route node doesn't exist for the group",
- __PRETTY_FUNCTION__);
+ __func__);
return NULL;
}
bsgrp = rn->info;
if (PIM_DEBUG_BSM)
zlog_debug(
"%s, bs_rpinfo node added to the partial bs_rplist.\r\n",
- __PRETTY_FUNCTION__);
+ __func__);
return true;
}
if (PIM_DEBUG_BSM)
- zlog_debug("%s: list node not added\n", __PRETTY_FUNCTION__);
+ zlog_debug("%s: list node not added\n", __func__);
XFREE(MTYPE_PIM_BSRP_NODE, bsm_rpinfo);
return false;
if (PIM_DEBUG_BSM)
zlog_debug(
"%s,Received a new BSM ,so clear the pending bs_rpinfo list.\r\n",
- __PRETTY_FUNCTION__);
+ __func__);
list_delete_all_node(bsgrp->partial_bsrp_list);
bsgrp->pend_rp_cnt = total_rp_count;
}
if (PIM_DEBUG_BSM)
zlog_debug(
"%s: buflen received %d is less than the internal data structure of the packet would suggest",
- __PRETTY_FUNCTION__, buflen);
+ __func__, buflen);
return false;
}
/* Extract Group tlv from BSM */
sizeof(grp_str));
zlog_debug(
"%s, Group %s Rpcount:%d Fragment-Rp-count:%d\r\n",
- __PRETTY_FUNCTION__, grp_str, grpinfo.rp_count,
+ __func__, grp_str, grpinfo.rp_count,
grpinfo.frag_rp_count);
}
grp_str, sizeof(grp_str));
zlog_debug(
"%s, Rp count is zero for group: %s\r\n",
- __PRETTY_FUNCTION__, grp_str);
+ __func__, grp_str);
}
return false;
}
group.family = AF_INET;
if (grpinfo.group.mask > IPV4_MAX_BITLEN) {
if (PIM_DEBUG_BSM)
- zlog_debug("%s, v4 prefix length specified: %d is too long",
- __PRETTY_FUNCTION__, grpinfo.group.mask);
+ zlog_debug(
+ "%s, v4 prefix length specified: %d is too long",
+ __func__, grpinfo.group.mask);
return false;
}
group.prefixlen = grpinfo.group.mask;
if (PIM_DEBUG_BSM)
zlog_debug(
"%s, Create new BSM Group node.\r\n",
- __PRETTY_FUNCTION__);
+ __func__);
/* create a new node to be added to the tree. */
bsgrp = pim_bsm_new_bsgrp_node(scope->bsrp_table,
if (!bsgrp) {
zlog_debug(
"%s, Failed to get the BSM group node.\r\n",
- __PRETTY_FUNCTION__);
+ __func__);
continue;
}
if (PIM_DEBUG_BSM)
zlog_debug(
"%s, buflen received: %u is less than the internal data structure of the packet would suggest",
- __PRETTY_FUNCTION__, buflen);
+ __func__, buflen);
return false;
}
rp_str, sizeof(rp_str));
zlog_debug(
"%s, Rp address - %s; pri:%d hold:%d\r\n",
- __PRETTY_FUNCTION__, rp_str,
- rpinfo.rp_pri, rpinfo.rp_holdtime);
+ __func__, rp_str, rpinfo.rp_pri,
+ rpinfo.rp_holdtime);
}
/* Call Install api to update grp-rp mappings */
if (PIM_DEBUG_BSM)
zlog_debug(
"%s, Recvd all the rps for this group, so bsrp list with penidng rp list.",
- __PRETTY_FUNCTION__);
+ __func__);
/* replace the bsrp_list with pending list */
pim_instate_pend_list(bsgrp);
}
if (!pim_ifp) {
if (PIM_DEBUG_BSM)
zlog_debug("%s: multicast not enabled on interface %s",
- __PRETTY_FUNCTION__, ifp->name);
+ __func__, ifp->name);
return -1;
}
/* Drop if bsm processing is disabled on interface */
if (!pim_ifp->bsm_enable) {
- zlog_warn("%s: BSM not enabled on interface %s",
- __PRETTY_FUNCTION__, ifp->name);
+ zlog_warn("%s: BSM not enabled on interface %s", __func__,
+ ifp->name);
pim_ifp->pim_ifstat_bsm_cfg_miss++;
pim->bsm_dropped++;
return -1;
if (buf_size < (PIM_MSG_HEADER_LEN + sizeof(struct bsm_hdr))) {
if (PIM_DEBUG_BSM)
- zlog_debug("%s: received buffer length of %d which is too small to properly decode",
- __PRETTY_FUNCTION__, buf_size);
+ zlog_debug(
+ "%s: received buffer length of %d which is too small to properly decode",
+ __func__, buf_size);
return -1;
}
if (PIM_DEBUG_BSM)
zlog_debug(
"%s : Administratively scoped range BSM received",
- __PRETTY_FUNCTION__);
+ __func__);
pim_ifp->pim_ifstat_bsm_invalid_sz++;
pim->bsm_dropped++;
return -1;
if (!is_preferred_bsr(pim, bshdr->bsr_addr.addr, bshdr->bsr_prio)) {
if (PIM_DEBUG_BSM)
zlog_debug("%s : Received a non-preferred BSM",
- __PRETTY_FUNCTION__);
+ __func__);
pim->bsm_dropped++;
return -1;
}
if (PIM_DEBUG_BSM)
zlog_debug(
"%s : nofwd_bsm received on %s when accpt_nofwd_bsm false",
- __PRETTY_FUNCTION__, bsr_str);
+ __func__, bsr_str);
pim->bsm_dropped++;
pim_ifp->pim_ifstat_ucast_bsm_cfg_miss++;
return -1;
if (PIM_DEBUG_BSM)
zlog_debug(
"%s : RPF check fail for BSR address %s",
- __PRETTY_FUNCTION__, bsr_str);
+ __func__, bsr_str);
pim->bsm_dropped++;
return -1;
}
if (PIM_DEBUG_BSM)
zlog_debug(
"%s : Unicast BSM not enabled on interface %s",
- __PRETTY_FUNCTION__, ifp->name);
+ __func__, ifp->name);
pim_ifp->pim_ifstat_ucast_bsm_cfg_miss++;
pim->bsm_dropped++;
return -1;
} else {
if (PIM_DEBUG_BSM)
zlog_debug("%s : Invalid destination address",
- __PRETTY_FUNCTION__);
+ __func__);
pim->bsm_dropped++;
return -1;
}
if (empty_bsm) {
if (PIM_DEBUG_BSM)
- zlog_debug("%s : Empty Pref BSM received",
- __PRETTY_FUNCTION__);
+ zlog_debug("%s : Empty Pref BSM received", __func__);
}
/* Parse Update bsm rp table and install/uninstall rp if required */
if (!pim_bsm_parse_install_g2rp(
(buf_size - PIM_BSM_HDR_LEN - PIM_MSG_HEADER_LEN),
frag_tag)) {
if (PIM_DEBUG_BSM) {
- zlog_debug("%s, Parsing BSM failed.\r\n",
- __PRETTY_FUNCTION__);
+ zlog_debug("%s, Parsing BSM failed.\r\n", __func__);
}
pim->bsm_dropped++;
return -1;
if (pim_ifp->pim->global_scope.bsm_frag_tag != frag_tag) {
if (PIM_DEBUG_BSM) {
zlog_debug("%s: Current frag tag: %d Frag teg rcvd: %d",
- __PRETTY_FUNCTION__,
+ __func__,
pim_ifp->pim->global_scope.bsm_frag_tag,
frag_tag);
}
pim_inet4_dump("<ifaddr?>", igmp->ifaddr, ifaddr_str,
sizeof(ifaddr_str));
zlog_debug("%s: Querier %s on %s reconfig query_interval=%d",
- __PRETTY_FUNCTION__, ifaddr_str, ifp->name,
+ __func__, ifaddr_str, ifp->name,
pim_ifp->igmp_default_query_interval);
}
struct list *hello_option_addr_list = 0;
if (PIM_DEBUG_PIM_HELLO)
- on_trace(__PRETTY_FUNCTION__, ifp, src_addr);
+ on_trace(__func__, ifp, src_addr);
pim_ifp = ifp->info;
zassert(pim_ifp);
sizeof(src_str));
zlog_debug(
"%s: short PIM hello TLV size=%d < min=%d from %s on interface %s",
- __PRETTY_FUNCTION__, remain,
- PIM_TLV_MIN_SIZE, src_str, ifp->name);
+ __func__, remain, PIM_TLV_MIN_SIZE,
+ src_str, ifp->name);
}
FREE_ADDR_LIST_THEN_RETURN(-1);
}
sizeof(src_str));
zlog_debug(
"%s: long PIM hello TLV type=%d length=%d > left=%td from %s on interface %s",
- __PRETTY_FUNCTION__, option_type,
- option_len, tlv_pastend - tlv_curr,
- src_str, ifp->name);
+ __func__, option_type, option_len,
+ tlv_pastend - tlv_curr, src_str,
+ ifp->name);
}
FREE_ADDR_LIST_THEN_RETURN(-2);
}
sizeof(src_str));
zlog_debug(
"%s: parse left_size=%d: PIM hello TLV type=%d length=%d from %s on %s",
- __PRETTY_FUNCTION__, remain, option_type,
- option_len, src_str, ifp->name);
+ __func__, remain, option_type, option_len,
+ src_str, ifp->name);
}
switch (option_type) {
sizeof(src_str));
zlog_debug(
"%s: ignoring PIM hello dense-mode state refresh TLV option type=%d length=%d from %s on interface %s",
- __PRETTY_FUNCTION__, option_type,
- option_len, src_str, ifp->name);
+ __func__, option_type, option_len,
+ src_str, ifp->name);
}
break;
default:
sizeof(src_str));
zlog_debug(
"%s: ignoring unknown PIM hello TLV type=%d length=%d from %s on interface %s",
- __PRETTY_FUNCTION__, option_type,
- option_len, src_str, ifp->name);
+ __func__, option_type, option_len,
+ src_str, ifp->name);
}
}
*/
if (PIM_DEBUG_PIM_HELLO) {
- tlv_trace_uint16(__PRETTY_FUNCTION__, "holdtime", ifp->name,
- src_addr,
+ tlv_trace_uint16(__func__, "holdtime", ifp->name, src_addr,
PIM_OPTION_IS_SET(hello_options,
PIM_OPTION_MASK_HOLDTIME),
hello_option_holdtime);
tlv_trace_uint16(
- __PRETTY_FUNCTION__, "propagation_delay", ifp->name,
- src_addr,
+ __func__, "propagation_delay", ifp->name, src_addr,
PIM_OPTION_IS_SET(hello_options,
PIM_OPTION_MASK_LAN_PRUNE_DELAY),
hello_option_propagation_delay);
tlv_trace_uint16(
- __PRETTY_FUNCTION__, "override_interval", ifp->name,
- src_addr,
+ __func__, "override_interval", ifp->name, src_addr,
PIM_OPTION_IS_SET(hello_options,
PIM_OPTION_MASK_LAN_PRUNE_DELAY),
hello_option_override_interval);
tlv_trace_bool(
- __PRETTY_FUNCTION__, "can_disable_join_suppression",
- ifp->name, src_addr,
+ __func__, "can_disable_join_suppression", ifp->name,
+ src_addr,
PIM_OPTION_IS_SET(hello_options,
PIM_OPTION_MASK_LAN_PRUNE_DELAY),
PIM_OPTION_IS_SET(
hello_options,
PIM_OPTION_MASK_CAN_DISABLE_JOIN_SUPPRESSION));
- tlv_trace_uint32(__PRETTY_FUNCTION__, "dr_priority", ifp->name,
- src_addr,
+ tlv_trace_uint32(__func__, "dr_priority", ifp->name, src_addr,
PIM_OPTION_IS_SET(hello_options,
PIM_OPTION_MASK_DR_PRIORITY),
hello_option_dr_priority);
tlv_trace_uint32_hex(
- __PRETTY_FUNCTION__, "generation_id", ifp->name,
- src_addr,
+ __func__, "generation_id", ifp->name, src_addr,
PIM_OPTION_IS_SET(hello_options,
PIM_OPTION_MASK_GENERATION_ID),
hello_option_generation_id);
- tlv_trace_list(__PRETTY_FUNCTION__, "address_list", ifp->name,
- src_addr,
+ tlv_trace_list(__func__, "address_list", ifp->name, src_addr,
PIM_OPTION_IS_SET(hello_options,
PIM_OPTION_MASK_ADDRESS_LIST),
hello_option_addr_list);
sizeof(src_str));
zlog_debug(
"%s: PIM hello missing holdtime from %s on interface %s",
- __PRETTY_FUNCTION__, src_str, ifp->name);
+ __func__, src_str, ifp->name);
}
}
sizeof(src_str));
zlog_warn(
"%s: failure creating PIM neighbor %s on interface %s",
- __PRETTY_FUNCTION__, src_str,
- ifp->name);
+ __func__, src_str, ifp->name);
}
FREE_ADDR_LIST_THEN_RETURN(-8);
}
/* Forward BSM if required */
if (!pim_bsm_new_nbr_fwd(neigh, ifp)) {
if (PIM_DEBUG_PIM_HELLO)
- zlog_debug("%s: forwarding bsm to new nbr failed",
- __PRETTY_FUNCTION__);
+ zlog_debug(
+ "%s: forwarding bsm to new nbr failed",
+ __func__);
}
/* actual addr list has been saved under neighbor */
sizeof(src_str));
zlog_debug(
"%s: GenId mismatch new=%08x old=%08x: replacing neighbor %s on %s",
- __PRETTY_FUNCTION__,
- hello_option_generation_id,
+ __func__, hello_option_generation_id,
neigh->generation_id, src_str,
ifp->name);
}
sizeof(src_str));
zlog_debug(
"%s: failure re-creating PIM neighbor %s on interface %s",
- __PRETTY_FUNCTION__, src_str,
- ifp->name);
+ __func__, src_str, ifp->name);
}
FREE_ADDR_LIST_THEN_RETURN(-9);
}
/* Forward BSM if required */
if (!pim_bsm_new_nbr_fwd(neigh, ifp)) {
if (PIM_DEBUG_PIM_HELLO)
- zlog_debug("%s: forwarding bsm to new nbr failed",
- __PRETTY_FUNCTION__);
+ zlog_debug(
+ "%s: forwarding bsm to new nbr failed",
+ __func__);
}
/* actual addr list is saved under neighbor */
return 0;
if (PIM_DEBUG_PIM_HELLO) {
zlog_debug(
"%s: could not set PIM hello Holdtime option for interface %s",
- __PRETTY_FUNCTION__, ifp->name);
+ __func__, ifp->name);
}
return -1;
}
if (PIM_DEBUG_PIM_HELLO) {
zlog_debug(
"%s: could not set PIM LAN Prune Delay option for interface %s",
- __PRETTY_FUNCTION__, ifp->name);
+ __func__, ifp->name);
}
return -1;
}
if (PIM_DEBUG_PIM_HELLO) {
zlog_debug(
"%s: could not set PIM hello DR Priority option for interface %s",
- __PRETTY_FUNCTION__, ifp->name);
+ __func__, ifp->name);
}
return -2;
}
if (PIM_DEBUG_PIM_HELLO) {
zlog_debug(
"%s: could not set PIM hello Generation ID option for interface %s",
- __PRETTY_FUNCTION__, ifp->name);
+ __func__, ifp->name);
}
return -3;
}
if (PIM_DEBUG_PIM_HELLO) {
zlog_debug(
"%s: could not set PIM hello v4 Secondary Address List option for interface %s",
- __PRETTY_FUNCTION__, ifp->name);
+ __func__, ifp->name);
}
return -4;
}
if (PIM_DEBUG_PIM_HELLO) {
zlog_debug(
"%s: could not sent PIM hello v6 secondary Address List option for interface %s",
- __PRETTY_FUNCTION__, ifp->name);
+ __func__, ifp->name);
}
return -4;
}
sizeof(new_prim_str));
pim_inet4_dump("<old?>", pim_ifp->primary_address, old_prim_str,
sizeof(old_prim_str));
- zlog_debug("%s: old=%s new=%s on interface %s: %s",
- __PRETTY_FUNCTION__, old_prim_str, new_prim_str,
- ifp->name, changed ? "changed" : "unchanged");
+ zlog_debug("%s: old=%s new=%s on interface %s: %s", __func__,
+ old_prim_str, new_prim_str, ifp->name,
+ changed ? "changed" : "unchanged");
}
if (changed) {
}
pim_ifp->update_source = source;
- detect_address_change(ifp, 0 /* force_prim_as_any */,
- __PRETTY_FUNCTION__);
+ detect_address_change(ifp, 0 /* force_prim_as_any */, __func__);
return PIM_SUCCESS;
}
char buf[BUFSIZ];
prefix2str(ifc->address, buf, BUFSIZ);
zlog_debug("%s: %s ifindex=%d disconnected IP address %s %s",
- __PRETTY_FUNCTION__, ifp->name, ifp->ifindex, buf,
+ __func__, ifp->name, ifp->ifindex, buf,
CHECK_FLAG(ifc->flags, ZEBRA_IFA_SECONDARY)
? "secondary"
: "primary");
}
- detect_address_change(ifp, force_prim_as_any, __PRETTY_FUNCTION__);
+ detect_address_change(ifp, force_prim_as_any, __func__);
pim_if_addr_del_igmp(ifc);
pim_if_addr_del_pim(ifc);
if (pim_ifp->mroute_vif_index > 0) {
zlog_warn("%s: vif_index=%d > 0 on interface %s ifindex=%d",
- __PRETTY_FUNCTION__, pim_ifp->mroute_vif_index,
- ifp->name, ifp->ifindex);
+ __func__, pim_ifp->mroute_vif_index, ifp->name,
+ ifp->ifindex);
return -1;
}
if (ifp->ifindex < 0) {
- zlog_warn("%s: ifindex=%d < 1 on interface %s",
- __PRETTY_FUNCTION__, ifp->ifindex, ifp->name);
+ zlog_warn("%s: ifindex=%d < 1 on interface %s", __func__,
+ ifp->ifindex, ifp->name);
return -2;
}
if (!ispimreg && !is_vxlan_term && PIM_INADDR_IS_ANY(ifaddr)) {
zlog_warn(
"%s: could not get address for interface %s ifindex=%d",
- __PRETTY_FUNCTION__, ifp->name, ifp->ifindex);
+ __func__, ifp->name, ifp->ifindex);
return -4;
}
if (pim_ifp->mroute_vif_index >= MAXVIFS) {
zlog_warn(
"%s: Attempting to configure more than MAXVIFS=%d on pim enabled interface %s",
- __PRETTY_FUNCTION__, MAXVIFS, ifp->name);
+ __func__, MAXVIFS, ifp->name);
return -3;
}
if (pim_ifp->mroute_vif_index < 1) {
zlog_warn("%s: vif_index=%d < 1 on interface %s ifindex=%d",
- __PRETTY_FUNCTION__, pim_ifp->mroute_vif_index,
- ifp->name, ifp->ifindex);
+ __func__, pim_ifp->mroute_vif_index, ifp->name,
+ ifp->ifindex);
return -1;
}
sizeof(source_str));
zlog_warn(
"%s: setsockopt(fd=%d) failure for IGMP group %s source %s ifindex %d on interface %s: errno=%d: %s",
- __PRETTY_FUNCTION__, join_fd, group_str, source_str,
- ifindex, ifname, errno, safe_strerror(errno));
+ __func__, join_fd, group_str, source_str, ifindex,
+ ifname, errno, safe_strerror(errno));
close(join_fd);
return -2;
sizeof(source_str));
zlog_warn(
"%s: igmp_join_sock() failure for IGMP group %s source %s on interface %s",
- __PRETTY_FUNCTION__, group_str, source_str, ifp->name);
+ __func__, group_str, source_str, ifp->name);
return 0;
}
sizeof(source_str));
zlog_debug(
"%s: issued static igmp join for channel (S,G)=(%s,%s) on interface %s",
- __PRETTY_FUNCTION__, source_str, group_str, ifp->name);
+ __func__, source_str, group_str, ifp->name);
}
return ferr_ok();
pim_ifp = ifp->info;
if (!pim_ifp) {
- zlog_warn("%s: multicast not enabled on interface %s",
- __PRETTY_FUNCTION__, ifp->name);
+ zlog_warn("%s: multicast not enabled on interface %s", __func__,
+ ifp->name);
return -1;
}
if (!pim_ifp->igmp_join_list) {
- zlog_warn("%s: no IGMP join on interface %s",
- __PRETTY_FUNCTION__, ifp->name);
+ zlog_warn("%s: no IGMP join on interface %s", __func__,
+ ifp->name);
return -2;
}
sizeof(source_str));
zlog_warn(
"%s: could not find IGMP group %s source %s on interface %s",
- __PRETTY_FUNCTION__, group_str, source_str, ifp->name);
+ __func__, group_str, source_str, ifp->name);
return -3;
}
sizeof(source_str));
zlog_warn(
"%s: failure closing sock_fd=%d for IGMP group %s source %s on interface %s: errno=%d: %s",
- __PRETTY_FUNCTION__, ij->sock_fd, group_str, source_str,
- ifp->name, errno, safe_strerror(errno));
+ __func__, ij->sock_fd, group_str, source_str, ifp->name,
+ errno, safe_strerror(errno));
/* warning only */
}
listnode_delete(pim_ifp->igmp_join_list, ij);
if (PIM_DEBUG_ZEBRA) {
zlog_debug(
"%s: %s index %d(%u) flags %ld metric %d mtu %d operative %d",
- __PRETTY_FUNCTION__, ifp->name, ifp->ifindex,
- ifp->vrf_id, (long)ifp->flags, ifp->metric, ifp->mtu,
+ __func__, ifp->name, ifp->ifindex, ifp->vrf_id,
+ (long)ifp->flags, ifp->metric, ifp->mtu,
if_is_operative(ifp));
}
if (PIM_DEBUG_ZEBRA) {
zlog_debug(
"%s: %s index %d(%u) flags %ld metric %d mtu %d operative %d",
- __PRETTY_FUNCTION__, ifp->name, ifp->ifindex,
- ifp->vrf_id, (long)ifp->flags, ifp->metric, ifp->mtu,
+ __func__, ifp->name, ifp->ifindex, ifp->vrf_id,
+ (long)ifp->flags, ifp->metric, ifp->mtu,
if_is_operative(ifp));
}
if (!master) {
zlog_debug(
"%s: Unable to find Master interface for %s",
- __PRETTY_FUNCTION__, vrf->name);
+ __func__, vrf->name);
return 0;
}
pim_zebra_interface_set_master(master, ifp);
if (PIM_DEBUG_ZEBRA) {
zlog_debug(
"%s: %s index %d(%u) flags %ld metric %d mtu %d operative %d",
- __PRETTY_FUNCTION__, ifp->name, ifp->ifindex,
- ifp->vrf_id, (long)ifp->flags, ifp->metric, ifp->mtu,
+ __func__, ifp->name, ifp->ifindex, ifp->vrf_id,
+ (long)ifp->flags, ifp->metric, ifp->mtu,
if_is_operative(ifp));
}
if (PIM_DEBUG_ZEBRA) {
zlog_debug(
"%s: %s index %d(%u) flags %ld metric %d mtu %d operative %d",
- __PRETTY_FUNCTION__, ifp->name, ifp->ifindex,
- ifp->vrf_id, (long)ifp->flags, ifp->metric, ifp->mtu,
+ __func__, ifp->name, ifp->ifindex, ifp->vrf_id,
+ (long)ifp->flags, ifp->metric, ifp->mtu,
if_is_operative(ifp));
}
while (!RB_EMPTY(pim_ifchannel_rb, &pim_ifp->ifchannel_rb)) {
ch = RB_ROOT(pim_ifchannel_rb, &pim_ifp->ifchannel_rb);
- pim_ifchannel_ifjoin_switch(__PRETTY_FUNCTION__,
- ch, PIM_IFJOIN_NOINFO);
+ pim_ifchannel_ifjoin_switch(__func__, ch, PIM_IFJOIN_NOINFO);
pim_ifchannel_delete(ch);
}
}
if (!pim_ifp) {
zlog_warn("%s: (S,G)=%s: multicast not enabled on interface %s",
- __PRETTY_FUNCTION__, pim_str_sg_dump(sg), ifp->name);
+ __func__, pim_str_sg_dump(sg), ifp->name);
return NULL;
}
if (PIM_DEBUG_PIM_EVENTS) {
zlog_debug("%s: (S,G)=%s membership now is %s on interface %s",
- __PRETTY_FUNCTION__, ch->sg_str,
+ __func__, ch->sg_str,
membership == PIM_IFMEMBERSHIP_INCLUDE ? "INCLUDE"
: "NOINFO",
ch->interface->name);
RB_INSERT(pim_ifchannel_rb, &pim_ifp->ifchannel_rb, ch);
- up = pim_upstream_add(pim_ifp->pim, sg, NULL, up_flags,
- __PRETTY_FUNCTION__, ch);
+ up = pim_upstream_add(pim_ifp->pim, sg, NULL, up_flags, __func__, ch);
ch->upstream = up;
PIM_IF_FLAG_UNSET_ASSERT_TRACKING_DESIRED(ch->flags);
if (PIM_DEBUG_PIM_TRACE)
- zlog_debug("%s: ifchannel %s is created ", __PRETTY_FUNCTION__,
+ zlog_debug("%s: ifchannel %s is created ", __func__,
ch->sg_str);
return ch;
static void ifjoin_to_noinfo(struct pim_ifchannel *ch, bool ch_del)
{
pim_forward_stop(ch, !ch_del);
- pim_ifchannel_ifjoin_switch(__PRETTY_FUNCTION__, ch, PIM_IFJOIN_NOINFO);
+ pim_ifchannel_ifjoin_switch(__func__, ch, PIM_IFJOIN_NOINFO);
if (ch_del)
delete_on_noinfo(ch);
}
ch = THREAD_ARG(t);
if (PIM_DEBUG_PIM_TRACE)
- zlog_debug("%s: ifchannel %s expiry timer", __PRETTY_FUNCTION__,
+ zlog_debug("%s: ifchannel %s expiry timer", __func__,
ch->sg_str);
ifjoin_to_noinfo(ch, true);
if (PIM_DEBUG_PIM_TRACE)
zlog_debug(
"%s: IFCHANNEL%s %s Prune Pending Timer Popped",
- __PRETTY_FUNCTION__, pim_str_sg_dump(&ch->sg),
+ __func__, pim_str_sg_dump(&ch->sg),
pim_ifchannel_ifjoin_name(ch->ifjoin_state, ch->flags));
if (ch->ifjoin_state == PIM_IFJOIN_PRUNE_PENDING) {
if (pim_rpf_addr_is_inaddr_any(&up->rpf)) {
/* RPF'(S,G) not found */
- zlog_warn("%s %s: RPF'%s not found", __FILE__,
- __PRETTY_FUNCTION__, up->sg_str);
+ zlog_warn("%s %s: RPF'%s not found", __FILE__, __func__,
+ up->sg_str);
return;
}
sizeof(rpf_str));
zlog_warn(
"%s %s: (S,G)=%s upstream=%s not directed to RPF'(S,G)=%s on interface %s",
- __FILE__, __PRETTY_FUNCTION__, up->sg_str, up_str,
- rpf_str, recv_ifp->name);
+ __FILE__, __func__, up->sg_str, up_str, rpf_str,
+ recv_ifp->name);
return;
}
/* upstream directed to RPF'(S,G) */
char up_str[INET_ADDRSTRLEN];
pim_inet4_dump("<upstream?>", upstream, up_str, sizeof(up_str));
zlog_warn("%s: recv %s (S,G)=%s to non-local upstream=%s on %s",
- __PRETTY_FUNCTION__, is_join ? "join" : "prune",
+ __func__, is_join ? "join" : "prune",
pim_str_sg_dump(sg), up_str, recv_ifp->name);
}
static void pim_ifchannel_ifjoin_handler(struct pim_ifchannel *ch,
struct pim_interface *pim_ifp)
{
- pim_ifchannel_ifjoin_switch(__PRETTY_FUNCTION__, ch,
- PIM_IFJOIN_JOIN);
+ pim_ifchannel_ifjoin_switch(__func__, ch, PIM_IFJOIN_JOIN);
PIM_IF_FLAG_UNSET_S_G_RPT(ch->flags);
/* check if the interface qualifies as an immediate
* OIF
pim_inet4_dump("<neigh?>", neigh_addr, neigh_str,
sizeof(neigh_str));
zlog_warn("%s: Assert Loser recv Join%s from %s on %s",
- __PRETTY_FUNCTION__, ch->sg_str, neigh_str,
- ifp->name);
+ __func__, ch->sg_str, neigh_str, ifp->name);
assert_action_a5(ch);
}
switch (ch->ifjoin_state) {
case PIM_IFJOIN_NOINFO:
- pim_ifchannel_ifjoin_switch(__PRETTY_FUNCTION__, ch,
- PIM_IFJOIN_JOIN);
+ pim_ifchannel_ifjoin_switch(__func__, ch, PIM_IFJOIN_JOIN);
if (pim_macro_chisin_oiflist(ch)) {
pim_upstream_inherited_olist(pim_ifp->pim,
ch->upstream);
& PIM_UPSTREAM_FLAG_MASK_SRC_LHR)) {
pim_upstream_ref(ch->upstream,
PIM_UPSTREAM_FLAG_MASK_SRC_LHR,
- __PRETTY_FUNCTION__);
+ __func__);
pim_upstream_keep_alive_timer_start(
ch->upstream, pim_ifp->pim->keep_alive_time);
}
break;
case PIM_IFJOIN_PRUNE:
if (source_flags & PIM_ENCODE_RPT_BIT)
- pim_ifchannel_ifjoin_switch(__PRETTY_FUNCTION__, ch,
+ pim_ifchannel_ifjoin_switch(__func__, ch,
PIM_IFJOIN_NOINFO);
else
pim_ifchannel_ifjoin_handler(ch, pim_ifp);
THREAD_OFF(ch->t_ifjoin_prune_pending_timer);
if (source_flags & PIM_ENCODE_RPT_BIT) {
THREAD_OFF(ch->t_ifjoin_expiry_timer);
- pim_ifchannel_ifjoin_switch(__PRETTY_FUNCTION__, ch,
+ pim_ifchannel_ifjoin_switch(__func__, ch,
PIM_IFJOIN_NOINFO);
} else {
pim_ifchannel_ifjoin_handler(ch, pim_ifp);
if (PIM_DEBUG_PIM_TRACE)
zlog_debug(
"%s: Received prune with no relevant ifchannel %s%s state: %d",
- __PRETTY_FUNCTION__, ifp->name,
- pim_str_sg_dump(sg), source_flags);
+ __func__, ifp->name, pim_str_sg_dump(sg),
+ source_flags);
return;
}
case PIM_IFJOIN_JOIN:
THREAD_OFF(ch->t_ifjoin_expiry_timer);
- pim_ifchannel_ifjoin_switch(__PRETTY_FUNCTION__, ch,
+ pim_ifchannel_ifjoin_switch(__func__, ch,
PIM_IFJOIN_PRUNE_PENDING);
if (listcount(pim_ifp->pim_neighbor_list) > 1)
pim_inet4_dump("<src?>", ch->sg.src, src_str, sizeof(src_str));
pim_inet4_dump("<grp?>", ch->sg.grp, grp_str, sizeof(grp_str));
zlog_debug("%s: CouldAssert(%s,%s,%s) changed from %d to %d",
- __PRETTY_FUNCTION__, src_str, grp_str,
- ch->interface->name, old_couldassert,
- new_couldassert);
+ __func__, src_str, grp_str, ch->interface->name,
+ old_couldassert, new_couldassert);
}
if (new_couldassert) {
new_addr_str, sizeof(new_addr_str));
zlog_debug(
"%s: my_assert_metric(%s,%s,%s) changed from %u,%u,%u,%s to %u,%u,%u,%s",
- __PRETTY_FUNCTION__, src_str, grp_str,
- ch->interface->name,
+ __func__, src_str, grp_str, ch->interface->name,
ch->ifassert_my_metric.rpt_bit_flag,
ch->ifassert_my_metric.metric_preference,
ch->ifassert_my_metric.route_metric, old_addr_str,
pim_inet4_dump("<grp?>", ch->sg.grp, grp_str, sizeof(grp_str));
zlog_debug(
"%s: AssertTrackingDesired(%s,%s,%s) changed from %d to %d",
- __PRETTY_FUNCTION__, src_str, grp_str,
- ch->interface->name, old_atd, new_atd);
+ __func__, src_str, grp_str, ch->interface->name,
+ old_atd, new_atd);
}
if (new_atd) {
} else {
zlog_warn(
"%s %s: IGMP socket fd=%d interface %s: could not solve %s to group address: errno=%d: %s",
- __FILE__, __PRETTY_FUNCTION__, fd,
- inet_ntoa(ifaddr), PIM_ALL_ROUTERS, errno,
- safe_strerror(errno));
+ __FILE__, __func__, fd, inet_ntoa(ifaddr),
+ PIM_ALL_ROUTERS, errno, safe_strerror(errno));
}
}
} else {
zlog_warn(
"%s %s: IGMP socket fd=%d interface %s: could not solve %s to group address: errno=%d: %s",
- __FILE__, __PRETTY_FUNCTION__, fd, inet_ntoa(ifaddr),
+ __FILE__, __func__, fd, inet_ntoa(ifaddr),
PIM_ALL_SYSTEMS, errno, safe_strerror(errno));
}
} else {
zlog_warn(
"%s %s: IGMP socket fd=%d interface %s: could not solve %s to group address: errno=%d: %s",
- __FILE__, __PRETTY_FUNCTION__, fd, inet_ntoa(ifaddr),
+ __FILE__, __func__, fd, inet_ntoa(ifaddr),
PIM_ALL_IGMP_ROUTERS, errno, safe_strerror(errno));
}
struct igmp_sock *igmp = array_get(igmp_sock_array, i);
zlog_debug("%s %s: [%d/%d] igmp_addr=%s fd=%d", __FILE__,
- __PRETTY_FUNCTION__, i, size,
- inet_ntoa(igmp->ifaddr), igmp->fd);
+ __func__, i, size, inet_ntoa(igmp->ifaddr),
+ igmp->fd);
}
}
#endif
char ifaddr_str[INET_ADDRSTRLEN];
pim_inet4_dump("<ifaddr?>", igmp->ifaddr, ifaddr_str,
sizeof(ifaddr_str));
- zlog_debug("%s: Querier %s resuming", __PRETTY_FUNCTION__,
- ifaddr_str);
+ zlog_debug("%s: Querier %s resuming", __func__, ifaddr_str);
}
/*
struct igmp_group *group;
struct in_addr group_addr;
- on_trace(__PRETTY_FUNCTION__, igmp->interface, from);
+ on_trace(__func__, igmp->interface, from);
if (igmp->mtrace_only)
return 0;
igmp->rx_stats.report_v1++;
if (PIM_DEBUG_IGMP_TRACE) {
- zlog_warn("%s %s: FIXME WRITEME", __FILE__,
- __PRETTY_FUNCTION__);
+ zlog_warn("%s %s: FIXME WRITEME", __FILE__, __func__);
}
memcpy(&group_addr, igmp_msg + 4, sizeof(struct in_addr));
char group_str[INET_ADDRSTRLEN];
pim_inet4_dump("<group?>", group->group_addr, group_str,
sizeof(group_str));
- zlog_debug("%s: Timer for group %s on interface %s",
- __PRETTY_FUNCTION__, group_str,
- group->group_igmp_sock->interface->name);
+ zlog_debug("%s: Timer for group %s on interface %s", __func__,
+ group_str, group->group_igmp_sock->interface->name);
}
zassert(group->group_filtermode_isexcl);
if (!pim_is_group_224_4(group_addr)) {
zlog_warn("%s: Group Specified is not part of 224.0.0.0/4",
- __PRETTY_FUNCTION__);
+ __func__);
return NULL;
}
if (PIM_DEBUG_IGMP_TRACE)
zlog_debug(
"%s: Group specified %s is part of 224.0.0.0/24",
- __PRETTY_FUNCTION__, inet_ntoa(group_addr));
+ __func__, inet_ntoa(group_addr));
return NULL;
}
/*
if (!up->rpf.source_nexthop.interface) {
if (PIM_DEBUG_TRACE)
- zlog_debug("%s: up %s RPF is not present",
- __PRETTY_FUNCTION__, up->sg_str);
+ zlog_debug("%s: up %s RPF is not present", __func__,
+ up->sg_str);
return false;
}
struct in_addr group_addr;
char group_str[INET_ADDRSTRLEN];
- on_trace(__PRETTY_FUNCTION__, igmp->interface, from);
+ on_trace(__func__, igmp->interface, from);
if (igmp->mtrace_only)
return 0;
struct in_addr group_addr;
char group_str[INET_ADDRSTRLEN];
- on_trace(__PRETTY_FUNCTION__, igmp->interface, from);
+ on_trace(__func__, igmp->interface, from);
if (igmp->mtrace_only)
return 0;
sizeof(source_str));
zlog_debug(
"%s: Source timer expired for group %s source %s on %s",
- __PRETTY_FUNCTION__, group_str, source_str,
+ __func__, group_str, source_str,
group->group_igmp_sock->interface->name);
}
static void source_channel_oil_detach(struct igmp_source *source)
{
if (source->source_channel_oil) {
- pim_channel_oil_del(source->source_channel_oil,
- __PRETTY_FUNCTION__);
+ pim_channel_oil_del(source->source_channel_oil, __func__);
source->source_channel_oil = NULL;
}
}
sizeof(source_str));
zlog_warn(
"%s: forwarding=ON(!) IGMP source %s for group %s from socket %d interface %s",
- __PRETTY_FUNCTION__, source_str, group_str,
+ __func__, source_str, group_str,
group->group_igmp_sock->fd,
group->group_igmp_sock->interface->name);
/* warning only */
struct in_addr group_addr, int num_sources,
struct in_addr *sources)
{
- on_trace(__PRETTY_FUNCTION__, igmp->interface, from, group_addr,
- num_sources, sources);
+ on_trace(__func__, igmp->interface, from, group_addr, num_sources,
+ sources);
allow(igmp, from, group_addr, num_sources, sources);
}
struct interface *ifp = igmp->interface;
struct igmp_group *group;
- on_trace(__PRETTY_FUNCTION__, ifp, from, group_addr, num_sources,
- sources);
+ on_trace(__func__, ifp, from, group_addr, num_sources, sources);
if (pim_is_group_filtered(ifp->info, &group_addr))
return;
struct interface *ifp = igmp->interface;
struct igmp_group *group;
- on_trace(__PRETTY_FUNCTION__, ifp, from, group_addr, num_sources,
- sources);
+ on_trace(__func__, ifp, from, group_addr, num_sources, sources);
/*
* If the requested filter mode is INCLUDE *and* the requested source
struct interface *ifp = igmp->interface;
struct igmp_group *group;
- on_trace(__PRETTY_FUNCTION__, ifp, from, group_addr, num_sources,
- sources);
+ on_trace(__func__, ifp, from, group_addr, num_sources, sources);
/* non-existant group is created as INCLUDE {empty} */
group = igmp_add_group_by_addr(igmp, group_addr);
struct in_addr group_addr, int num_sources,
struct in_addr *sources)
{
- on_trace(__PRETTY_FUNCTION__, igmp->interface, from, group_addr,
- num_sources, sources);
+ on_trace(__func__, igmp->interface, from, group_addr, num_sources,
+ sources);
allow(igmp, from, group_addr, num_sources, sources);
}
struct interface *ifp = igmp->interface;
struct igmp_group *group;
- on_trace(__PRETTY_FUNCTION__, ifp, from, group_addr, num_sources,
- sources);
+ on_trace(__func__, ifp, from, group_addr, num_sources, sources);
/* non-existant group is created as INCLUDE {empty} */
group = igmp_add_group_by_addr(igmp, group_addr);
sizeof(group_str));
zlog_debug(
"%s: group %s on %s: LMQC=%d LMQI=%d dsec LMQT=%d msec",
- __PRETTY_FUNCTION__, group_str, ifname, lmqc, lmqi_dsec,
+ __func__, group_str, ifname, lmqc, lmqi_dsec,
lmqt_msec);
}
sizeof(source_str));
zlog_debug(
"%s: group %s source %s on %s: LMQC=%d LMQI=%d dsec LMQT=%d msec",
- __PRETTY_FUNCTION__, group_str, source_str, ifname,
- lmqc, lmqi_dsec, lmqt_msec);
+ __func__, group_str, source_str, ifname, lmqc,
+ lmqi_dsec, lmqt_msec);
}
igmp_source_timer_on(group, source, lmqt_msec);
flog_err(
EC_LIB_DEVELOPMENT,
"%s %s: unable to send: msg_size=%zd larger than query_buf_size=%d",
- __FILE__, __PRETTY_FUNCTION__, msg_size,
- query_buf_size);
+ __FILE__, __func__, msg_size, query_buf_size);
return;
}
sizeof(group_str));
zlog_warn(
"%s: to %s on %s: group=%s sources=%d: s_flag is clear for general query!",
- __PRETTY_FUNCTION__, dst_str, ifname, group_str,
+ __func__, dst_str, ifname, group_str,
num_sources);
}
}
hash_name);
if (PIM_DEBUG_ZEBRA)
- zlog_debug("%s: NHT rpf hash init ", __PRETTY_FUNCTION__);
+ zlog_debug("%s: NHT rpf hash init ", __func__);
pim->ssm_info = pim_ssm_init();
{
struct pim_instance *pim = (struct pim_instance *)vrf->info;
- zlog_debug("%s: for %s", __PRETTY_FUNCTION__, vrf->name);
+ zlog_debug("%s: for %s", __func__, vrf->name);
pim_mroute_socket_enable(pim);
sizeof(neigh_str));
zlog_debug(
"%s: join (S,G)=%s rpt=%d wc=%d upstream=%s holdtime=%d from %s on %s",
- __PRETTY_FUNCTION__, pim_str_sg_dump(sg),
+ __func__, pim_str_sg_dump(sg),
!!(source_flags & PIM_RPT_BIT_MASK),
!!(source_flags & PIM_WILDCARD_BIT_MASK), up_str,
holdtime, neigh_str, ifp->name);
struct pim_rpf *rp = RP(pim_ifp->pim, sg->grp);
if (!rp) {
- zlog_warn("%s: Lookup of RP failed for %pSG4",
- __PRETTY_FUNCTION__, sg);
+ zlog_warn("%s: Lookup of RP failed for %pSG4", __func__,
+ sg);
return;
}
/*
sizeof(received_rp));
pim_inet4_dump("<local?>", rp->rpf_addr.u.prefix4,
local_rp, sizeof(local_rp));
- zlog_warn("%s: Specified RP(%s) in join is different than our configured RP(%s)",
- __PRETTY_FUNCTION__, received_rp, local_rp);
+ zlog_warn(
+ "%s: Specified RP(%s) in join is different than our configured RP(%s)",
+ __func__, received_rp, local_rp);
return;
}
sizeof(neigh_str));
zlog_debug(
"%s: prune (S,G)=%s rpt=%d wc=%d upstream=%s holdtime=%d from %s on %s",
- __PRETTY_FUNCTION__, pim_str_sg_dump(sg),
+ __func__, pim_str_sg_dump(sg),
source_flags & PIM_RPT_BIT_MASK,
source_flags & PIM_WILDCARD_BIT_MASK, up_str, holdtime,
neigh_str, ifp->name);
if (!rp) {
if (PIM_DEBUG_PIM_TRACE)
- zlog_debug("%s: RP for %pSG4 completely failed lookup",
- __PRETTY_FUNCTION__, sg);
+ zlog_debug(
+ "%s: RP for %pSG4 completely failed lookup",
+ __func__, sg);
return;
}
// Ignoring Prune *,G's at the moment.
char src_str[INET_ADDRSTRLEN];
pim_inet4_dump("<src?>", src_addr, src_str, sizeof(src_str));
zlog_warn("%s: pim_parse_addr_ucast() failure: from %s on %s",
- __PRETTY_FUNCTION__, src_str, ifp->name);
+ __func__, src_str, ifp->name);
return -1;
}
buf += addr_offset;
if (msg_upstream_addr.family != AF_INET) {
char src_str[INET_ADDRSTRLEN];
pim_inet4_dump("<src?>", src_addr, src_str, sizeof(src_str));
- zlog_warn("%s: ignoring join/prune directed to unexpected addr family=%d from %s on %s",
- __PRETTY_FUNCTION__, msg_upstream_addr.family,
- src_str, ifp->name);
+ zlog_warn(
+ "%s: ignoring join/prune directed to unexpected addr family=%d from %s on %s",
+ __func__, msg_upstream_addr.family, src_str, ifp->name);
return -2;
}
pim_inet4_dump("<src?>", src_addr, src_str, sizeof(src_str));
zlog_warn(
"%s: short join/prune message buffer for group list: size=%d minimum=%d from %s on %s",
- __PRETTY_FUNCTION__, remain, 4, src_str, ifp->name);
+ __func__, remain, 4, src_str, ifp->name);
return -4;
}
upstream_str, sizeof(upstream_str));
zlog_debug(
"%s: join/prune upstream=%s groups=%d holdtime=%d from %s on %s",
- __PRETTY_FUNCTION__, upstream_str, msg_num_groups,
- msg_holdtime, src_str, ifp->name);
+ __func__, upstream_str, msg_num_groups, msg_holdtime,
+ src_str, ifp->name);
}
/* Scan groups */
sizeof(src_str));
zlog_warn(
"%s: short join/prune buffer for source list: size=%d minimum=%d from %s on %s",
- __PRETTY_FUNCTION__, remain, 4, src_str,
- ifp->name);
+ __func__, remain, 4, src_str, ifp->name);
return -6;
}
sizeof(group_str));
zlog_debug(
"%s: join/prune upstream=%s group=%s/32 join_src=%d prune_src=%d from %s on %s",
- __PRETTY_FUNCTION__, upstream_str, group_str,
+ __func__, upstream_str, group_str,
msg_num_joined_sources, msg_num_pruned_sources,
src_str, ifp->name);
}
if (PIM_DEBUG_PIM_TRACE)
zlog_debug(
"%s: SGRpt flag is set, del inherit oif from up %s",
- __PRETTY_FUNCTION__,
- up->sg_str);
+ __func__, up->sg_str);
pim_channel_del_inherited_oif(
up->channel_oil,
starg_ch->interface,
ifp = ch->interface;
if (!ifp) {
- zlog_warn("%s: (S,G)=%s: null interface", __PRETTY_FUNCTION__,
- ch->sg_str);
+ zlog_warn("%s: (S,G)=%s: null interface", __func__, ch->sg_str);
return 0; /* false */
}
pim_ifp = ifp->info;
if (!pim_ifp) {
zlog_warn("%s: (S,G)=%s: multicast not enabled on interface %s",
- __PRETTY_FUNCTION__, ch->sg_str, ifp->name);
+ __func__, ch->sg_str, ifp->name);
return 0; /* false */
}
if (!pim_ifp) {
zlog_warn("%s: (S,G)=%s: multicast not enabled on interface %s",
- __PRETTY_FUNCTION__, ch->sg_str, ch->interface->name);
+ __func__, ch->sg_str, ch->interface->name);
return 0; /* false */
}
ifp = ch->interface;
if (!ifp) {
- zlog_warn("%s: (S,G)=%s: null interface", __PRETTY_FUNCTION__,
- ch->sg_str);
+ zlog_warn("%s: (S,G)=%s: null interface", __func__, ch->sg_str);
return 0; /* false */
}
ifp = ch->interface;
if (!ifp) {
- zlog_warn("%s: (S,G)=%s: null interface", __PRETTY_FUNCTION__,
- ch->sg_str);
+ zlog_warn("%s: (S,G)=%s: null interface", __func__, ch->sg_str);
return 0; /* false */
}
pim_ifp = ifp->info;
if (!pim_ifp) {
zlog_warn("%s: (S,G)=%s: multicast not enabled on interface %s",
- __PRETTY_FUNCTION__, ch->sg_str, ch->interface->name);
+ __func__, ch->sg_str, ch->interface->name);
return 0; /* false */
}
* doesn't already exist.
*/
if (!PIM_UPSTREAM_FLAG_TEST_MLAG_PEER(up->flags))
- pim_upstream_ref(up,
- PIM_UPSTREAM_FLAG_MASK_MLAG_PEER,
- __PRETTY_FUNCTION__);
+ pim_upstream_ref(up, PIM_UPSTREAM_FLAG_MASK_MLAG_PEER,
+ __func__);
} else {
PIM_UPSTREAM_FLAG_SET_MLAG_PEER(flags);
- up = pim_upstream_add(pim, &sg, NULL /*iif*/, flags,
- __PRETTY_FUNCTION__, NULL /*if_ch*/);
+ up = pim_upstream_add(pim, &sg, NULL /*iif*/, flags, __func__,
+ NULL /*if_ch*/);
if (!up) {
if (PIM_DEBUG_MLAG)
return;
PIM_UPSTREAM_FLAG_UNSET_MLAG_PEER(up->flags);
- up = pim_upstream_del(pim, up, __PRETTY_FUNCTION__);
+ up = pim_upstream_del(pim, up, __func__);
if (up)
pim_mlag_up_df_role_elect(pim, up);
}
* This is the deletion of the reference added
* above
*/
- pim_upstream_del(pim, up, __PRETTY_FUNCTION__);
+ pim_upstream_del(pim, up, __func__);
}
}
if (PIM_DEBUG_MROUTE_DETAIL)
zlog_debug(
"%s: Interface is not configured correctly to handle incoming packet: Could be !pim_ifp, !SM, !RP",
- __PRETTY_FUNCTION__);
+ __func__);
return 0;
}
if (PIM_DEBUG_MROUTE_DETAIL)
zlog_debug(
"%s: Received incoming packet that doesn't originate on our seg",
- __PRETTY_FUNCTION__);
+ __func__);
return 0;
}
if (!(PIM_I_am_DR(pim_ifp))) {
if (PIM_DEBUG_MROUTE_DETAIL)
- zlog_debug("%s: Interface is not the DR blackholing incoming traffic for %s",
- __PRETTY_FUNCTION__, pim_str_sg_dump(&sg));
+ zlog_debug(
+ "%s: Interface is not the DR blackholing incoming traffic for %s",
+ __func__, pim_str_sg_dump(&sg));
/*
* We are not the DR, but we are still receiving packets
* this for future reference.
*/
up = pim_upstream_find_or_add(
- &sg, ifp, PIM_UPSTREAM_FLAG_MASK_SRC_NOCACHE,
- __PRETTY_FUNCTION__);
- pim_upstream_mroute_add(up->channel_oil, __PRETTY_FUNCTION__);
+ &sg, ifp, PIM_UPSTREAM_FLAG_MASK_SRC_NOCACHE, __func__);
+ pim_upstream_mroute_add(up->channel_oil, __func__);
return 0;
}
up = pim_upstream_find_or_add(&sg, ifp, PIM_UPSTREAM_FLAG_MASK_FHR,
- __PRETTY_FUNCTION__);
+ __func__);
/*
* I moved this debug till after the actual add because
*/
if (PIM_DEBUG_MROUTE) {
zlog_debug("%s: Adding a Route %s for WHOLEPKT consumption",
- __PRETTY_FUNCTION__, up->sg_str);
+ __func__, up->sg_str);
}
PIM_UPSTREAM_FLAG_SET_SRC_STREAM(up->flags);
if (up && PIM_UPSTREAM_FLAG_TEST_CAN_BE_LHR(up->flags)) {
up = pim_upstream_add(pim_ifp->pim, &sg, ifp,
PIM_UPSTREAM_FLAG_MASK_SRC_LHR,
- __PRETTY_FUNCTION__, NULL);
+ __func__, NULL);
if (!up) {
if (PIM_DEBUG_MROUTE)
zlog_debug(
"%s: Unable to create upstream information for %s",
- __PRETTY_FUNCTION__,
- pim_str_sg_dump(&sg));
+ __func__, pim_str_sg_dump(&sg));
return 0;
}
pim_upstream_keep_alive_timer_start(
if (PIM_DEBUG_MROUTE)
zlog_debug("%s: Creating %s upstream on LHR",
- __PRETTY_FUNCTION__, up->sg_str);
+ __func__, up->sg_str);
return 0;
}
if (PIM_DEBUG_MROUTE_DETAIL) {
zlog_debug(
"%s: Unable to find upstream channel WHOLEPKT%s",
- __PRETTY_FUNCTION__, pim_str_sg_dump(&sg));
+ __func__, pim_str_sg_dump(&sg));
}
return 0;
}
if (!up->rpf.source_nexthop.interface) {
if (PIM_DEBUG_PIM_TRACE)
- zlog_debug("%s: up %s RPF is not present",
- __PRETTY_FUNCTION__, up->sg_str);
+ zlog_debug("%s: up %s RPF is not present", __func__,
+ up->sg_str);
return 0;
}
if ((pim_rpf_addr_is_inaddr_none(rpg)) || (!pim_ifp)
|| (!(PIM_I_am_DR(pim_ifp)))) {
if (PIM_DEBUG_MROUTE) {
- zlog_debug("%s: Failed Check send packet",
- __PRETTY_FUNCTION__);
+ zlog_debug("%s: Failed Check send packet", __func__);
}
return 0;
}
if (PIM_DEBUG_MROUTE)
zlog_debug(
"%s: WRONGVIF (S,G)=%s could not find input interface for input_vif_index=%d",
- __PRETTY_FUNCTION__, pim_str_sg_dump(&sg),
- msg->im_vif);
+ __func__, pim_str_sg_dump(&sg), msg->im_vif);
return -1;
}
if (PIM_DEBUG_MROUTE)
zlog_debug(
"%s: WRONGVIF (S,G)=%s multicast not enabled on interface %s",
- __PRETTY_FUNCTION__, pim_str_sg_dump(&sg),
- ifp->name);
+ __func__, pim_str_sg_dump(&sg), ifp->name);
return -2;
}
if (PIM_DEBUG_MROUTE)
zlog_debug(
"%s: WRONGVIF (S,G)=%s could not find channel on interface %s",
- __PRETTY_FUNCTION__, pim_str_sg_dump(&sg),
- ifp->name);
+ __func__, pim_str_sg_dump(&sg), ifp->name);
star_g.src.s_addr = INADDR_ANY;
ch = pim_ifchannel_find(ifp, &star_g);
if (PIM_DEBUG_MROUTE)
zlog_debug(
"%s: WRONGVIF (*,G)=%s could not find channel on interface %s",
- __PRETTY_FUNCTION__,
- pim_str_sg_dump(&star_g), ifp->name);
+ __func__, pim_str_sg_dump(&star_g),
+ ifp->name);
return -3;
}
}
if (PIM_DEBUG_MROUTE) {
zlog_debug(
"%s: WRONGVIF (S,G)=%s channel is not on Assert NoInfo state for interface %s",
- __PRETTY_FUNCTION__, ch->sg_str, ifp->name);
+ __func__, ch->sg_str, ifp->name);
}
return -4;
}
if (PIM_DEBUG_MROUTE) {
zlog_debug(
"%s: WRONGVIF (S,G)=%s interface %s is not downstream for channel",
- __PRETTY_FUNCTION__, ch->sg_str, ifp->name);
+ __func__, ch->sg_str, ifp->name);
}
return -5;
}
if (PIM_DEBUG_MROUTE) {
zlog_debug(
"%s: WRONGVIF (S,G)=%s assert_action_a1 failure on interface %s",
- __PRETTY_FUNCTION__, ch->sg_str, ifp->name);
+ __func__, ch->sg_str, ifp->name);
}
return -6;
}
pim_upstream_inherited_olist(pim_ifp->pim, up);
if (!up->channel_oil->installed)
pim_upstream_mroute_add(up->channel_oil,
- __PRETTY_FUNCTION__);
+ __func__);
} else {
if (I_am_RP(pim_ifp->pim, up->sg.grp)) {
if (pim_nexthop_lookup(pim_ifp->pim, &source,
pim_ifp = ifp->info;
if (pim_if_connected_to_source(ifp, sg.src)) {
up = pim_upstream_add(pim_ifp->pim, &sg, ifp,
- PIM_UPSTREAM_FLAG_MASK_FHR,
- __PRETTY_FUNCTION__, NULL);
+ PIM_UPSTREAM_FLAG_MASK_FHR, __func__,
+ NULL);
if (!up) {
if (PIM_DEBUG_MROUTE)
zlog_debug(
} else {
up = pim_upstream_add(pim_ifp->pim, &sg, ifp,
PIM_UPSTREAM_FLAG_MASK_SRC_NOCACHE,
- __PRETTY_FUNCTION__, NULL);
+ __func__, NULL);
if (!up->channel_oil->installed)
- pim_upstream_mroute_add(up->channel_oil,
- __PRETTY_FUNCTION__);
+ pim_upstream_mroute_add(up->channel_oil, __func__);
}
return 0;
zlog_debug(
"%s(%s): igmp kernel upcall on %s(%p) for %s -> %s",
- __PRETTY_FUNCTION__, pim->vrf->name, ifp->name,
- igmp, ip_src_str, ip_dst_str);
+ __func__, pim->vrf->name, ifp->name, igmp,
+ ip_src_str, ip_dst_str);
}
if (igmp)
pim_igmp_packet(igmp, (char *)buf, buf_size);
sizeof(grp_str));
zlog_debug(
"%s: no kernel upcall proto=%d src: %s dst: %s msg_size=%d",
- __PRETTY_FUNCTION__, ip_hdr->ip_p, src_str,
- grp_str, buf_size);
+ __func__, ip_hdr->ip_p, src_str, grp_str,
+ buf_size);
}
} else {
sizeof(grp_str));
zlog_debug(
"%s: pim kernel upcall %s type=%d ip_p=%d from fd=%d for (S,G)=(%s,%s) on %s vifi=%d size=%d",
- __PRETTY_FUNCTION__,
- igmpmsgtype2str[msg->im_msgtype],
+ __func__, igmpmsgtype2str[msg->im_msgtype],
msg->im_msgtype, ip_hdr->ip_p,
pim->mroute_socket, src_str, grp_str, ifp->name,
msg->im_vif, buf_size);
if (errno == EWOULDBLOCK || errno == EAGAIN)
break;
- zlog_warn("%s: failure reading rd=%d: fd=%d: errno=%d: %s",
- __PRETTY_FUNCTION__, rd, pim->mroute_socket,
- errno, safe_strerror(errno));
+ zlog_warn(
+ "%s: failure reading rd=%d: fd=%d: errno=%d: %s",
+ __func__, rd, pim->mroute_socket, errno,
+ safe_strerror(errno));
goto done;
}
int err;
if (PIM_DEBUG_MROUTE)
- zlog_debug("%s: Add Vif %d (%s[%s])", __PRETTY_FUNCTION__,
+ zlog_debug("%s: Add Vif %d (%s[%s])", __func__,
pim_ifp->mroute_vif_index, ifp->name,
pim_ifp->pim->vrf->name);
if (ifaddr.s_addr == INADDR_ANY) {
zlog_warn(
"%s: unnumbered interfaces are not supported on this platform",
- __PRETTY_FUNCTION__);
+ __func__);
return -1;
}
memcpy(&vc.vifc_lcl_addr, &ifaddr, sizeof(vc.vifc_lcl_addr));
zlog_warn(
"%s: failure: setsockopt(fd=%d,IPPROTO_IP,MRT_ADD_VIF,vif_index=%d,ifaddr=%s,flag=%d): errno=%d: %s",
- __PRETTY_FUNCTION__, pim_ifp->pim->mroute_socket,
- ifp->ifindex, ifaddr_str, flags, errno,
- safe_strerror(errno));
+ __func__, pim_ifp->pim->mroute_socket, ifp->ifindex,
+ ifaddr_str, flags, errno, safe_strerror(errno));
return -2;
}
int err;
if (PIM_DEBUG_MROUTE)
- zlog_debug("%s: Del Vif %d (%s[%s])", __PRETTY_FUNCTION__,
+ zlog_debug("%s: Del Vif %d (%s[%s])", __func__,
pim_ifp->mroute_vif_index, ifp->name,
pim_ifp->pim->vrf->name);
if (err) {
zlog_warn(
"%s %s: failure: setsockopt(fd=%d,IPPROTO_IP,MRT_DEL_VIF,vif_index=%d): errno=%d: %s",
- __FILE__, __PRETTY_FUNCTION__,
- pim_ifp->pim->mroute_socket, pim_ifp->mroute_vif_index,
- errno, safe_strerror(errno));
+ __FILE__, __func__, pim_ifp->pim->mroute_socket,
+ pim_ifp->mroute_vif_index, errno, safe_strerror(errno));
return -2;
}
if (err) {
zlog_warn(
"%s %s: failure: setsockopt(fd=%d,IPPROTO_IP,MRT_ADD_MFC): errno=%d: %s",
- __FILE__, __PRETTY_FUNCTION__, pim->mroute_socket,
- errno, safe_strerror(errno));
+ __FILE__, __func__, pim->mroute_socket, errno,
+ safe_strerror(errno));
return -2;
}
if (PIM_DEBUG_MROUTE) {
char buf[1000];
- zlog_debug("%s(%s), vrf %s Added Route: %s",
- __PRETTY_FUNCTION__, name, pim->vrf->name,
+ zlog_debug("%s(%s), vrf %s Added Route: %s", __func__, name,
+ pim->vrf->name,
pim_channel_oil_dump(c_oil, buf, sizeof(buf)));
}
char buf[1000];
zlog_debug(
"%s %s: vifi %d for route is %s not installed, do not need to send del req. ",
- __FILE__, __PRETTY_FUNCTION__,
- c_oil->oil.mfcc_parent,
+ __FILE__, __func__, c_oil->oil.mfcc_parent,
pim_channel_oil_dump(c_oil, buf, sizeof(buf)));
}
return -2;
if (PIM_DEBUG_MROUTE)
zlog_warn(
"%s %s: failure: setsockopt(fd=%d,IPPROTO_IP,MRT_DEL_MFC): errno=%d: %s",
- __FILE__, __PRETTY_FUNCTION__,
- pim->mroute_socket, errno,
+ __FILE__, __func__, pim->mroute_socket, errno,
safe_strerror(errno));
return -2;
}
if (PIM_DEBUG_MROUTE) {
char buf[1000];
- zlog_debug("%s(%s), vrf %s Deleted Route: %s",
- __PRETTY_FUNCTION__, name, pim->vrf->name,
+ zlog_debug("%s(%s), vrf %s Deleted Route: %s", __func__, name,
+ pim->vrf->name,
pim_channel_oil_dump(c_oil, buf, sizeof(buf)));
}
if (PIM_UPSTREAM_FLAG_TEST_SRC_MSDP(up->flags)) {
PIM_UPSTREAM_FLAG_UNSET_SRC_MSDP(up->flags);
sa->flags |= PIM_MSDP_SAF_UP_DEL_IN_PROG;
- up = pim_upstream_del(sa->pim, up, __PRETTY_FUNCTION__);
+ up = pim_upstream_del(sa->pim, up, __func__);
/* re-eval joinDesired; clearing peer-msdp-sa flag can
* cause JD to change
*/
/* RFC3618: "RP triggers a (S, G) join event towards the data source
* as if a JP message was rxed addressed to the RP itself." */
up = pim_upstream_add(sa->pim, &sa->sg, NULL /* iif */,
- PIM_UPSTREAM_FLAG_MASK_SRC_MSDP,
- __PRETTY_FUNCTION__, NULL);
+ PIM_UPSTREAM_FLAG_MASK_SRC_MSDP, __func__, NULL);
sa->up = up;
if (up) {
if (!ifp) {
flog_err(EC_LIB_INTERFACE,
"%s: Unable to lookup vrf interface: %s",
- __PRETTY_FUNCTION__, mp->pim->vrf->name);
+ __func__, mp->pim->vrf->name);
return -1;
}
if (pim_socket_bind(mp->fd, ifp)) {
flog_err_sys(EC_LIB_SOCKET,
"%s: Unable to bind to socket: %s",
- __PRETTY_FUNCTION__, safe_strerror(errno));
+ __func__, safe_strerror(errno));
close(mp->fd);
mp->fd = -1;
return -1;
pim_inet4_dump("<new_dr?>", pim_ifp->pim_dr_addr,
dr_new_str, sizeof(dr_new_str));
zlog_debug("%s: DR was %s now is %s on interface %s",
- __PRETTY_FUNCTION__, dr_old_str, dr_new_str,
- ifp->name);
+ __func__, dr_old_str, dr_new_str, ifp->name);
}
pim_ifp->pim_dr_election_last =
pim_inet4_dump("<src?>", neigh->source_addr, src_str,
sizeof(src_str));
zlog_debug("%s: starting %u sec timer for neighbor %s on %s",
- __PRETTY_FUNCTION__, neigh->holdtime, src_str,
+ __func__, neigh->holdtime, src_str,
neigh->interface->name);
}
pim_inet4_dump("<src?>", neigh->source_addr, src_str,
sizeof(src_str));
zlog_debug("%s:Sending JP Agg to %s on %s with %d groups",
- __PRETTY_FUNCTION__, src_str, neigh->interface->name,
+ __func__, src_str, neigh->interface->name,
neigh->upstream_jp_agg->count);
}
if (PIM_DEBUG_PIM_EVENTS) {
zlog_debug("%s: creating PIM neighbor %s on interface %s",
- __PRETTY_FUNCTION__, src_str, ifp->name);
+ __func__, src_str, ifp->name);
}
zlog_info("PIM NEIGHBOR UP: neighbor %s on interface %s", src_str,
if (PIM_DEBUG_PIM_TRACE_DETAIL) {
char str[INET_ADDRSTRLEN];
pim_inet4_dump("<nht_nbr?>", source_addr, str, sizeof(str));
- zlog_debug("%s: neighbor %s added ", __PRETTY_FUNCTION__, str);
+ zlog_debug("%s: neighbor %s added ", __func__, str);
}
/*
RFC 4601: 4.3.2. DR Election
if (PIM_DEBUG_PIM_TRACE) {
zlog_debug("%s: deleting PIM neighbor %s on interface %s",
- __PRETTY_FUNCTION__, src_str, ifp->name);
+ __func__, src_str, ifp->name);
}
// De-Register PIM Neighbor with BFD
#ifdef DUMP_PREFIX_LIST
zlog_debug(
"%s: DUMP_PREFIX_LIST old_prefix_list=%x old_size=%d new_prefix_list=%x new_size=%d",
- __PRETTY_FUNCTION__, (unsigned)neigh->prefix_list,
+ __func__, (unsigned)neigh->prefix_list,
neigh->prefix_list ? (int)listcount(neigh->prefix_list) : -1,
(unsigned)addr_list,
addr_list ? (int)listcount(addr_list) : -1);
flog_err(
EC_LIB_DEVELOPMENT,
"%s: internal error: trying to replace same prefix list=%p",
- __PRETTY_FUNCTION__, (void *)addr_list);
+ __func__, (void *)addr_list);
}
} else {
/* Delete existing secondary address list */
prefix2str(p, buf, sizeof(buf));
zlog_debug(
"%s: NHT %sregistered addr %s(%s) with Zebra ret:%d ",
- __PRETTY_FUNCTION__,
+ __func__,
(command == ZEBRA_NEXTHOP_REGISTER) ? " " : "de", buf,
pim->vrf->name, ret);
}
prefix2str(addr, buf, sizeof(buf));
zlog_debug(
"%s: NHT cache and zebra notification added for %s(%s)",
- __PRETTY_FUNCTION__, buf, pim->vrf->name);
+ __func__, buf, pim->vrf->name);
}
}
prefix2str(addr, buf, sizeof buf);
zlog_debug(
"%s: NHT %s(%s) rp_list count:%d upstream count:%ld",
- __PRETTY_FUNCTION__, buf, pim->vrf->name,
+ __func__, buf, pim->vrf->name,
pnc->rp_list->count, pnc->upstream_hash->count);
}
pim_inet4_dump("<addr?>", addr, addr_str, sizeof(addr_str));
zlog_warn(
"%s %s: could not find nexthop ifindex for address %s",
- __FILE__, __PRETTY_FUNCTION__, addr_str);
+ __FILE__, __func__, addr_str);
return false;
}
sizeof(addr_str));
zlog_debug(
"%s %s: could not find interface for ifindex %d (address %s)",
- __FILE__, __PRETTY_FUNCTION__,
- first_ifindex, addr_str);
+ __FILE__, __func__, first_ifindex,
+ addr_str);
}
i++;
continue;
sizeof(addr_str));
zlog_debug(
"%s: multicast not enabled on input interface %s (ifindex=%d, RPF for source %s)",
- __PRETTY_FUNCTION__, ifp->name,
- first_ifindex, addr_str);
+ __func__, ifp->name, first_ifindex,
+ addr_str);
}
i++;
continue;
sizeof(addr_str));
zlog_debug(
"%s %s: could not find interface for ifindex %d (address %s(%s))",
- __FILE__, __PRETTY_FUNCTION__,
- first_ifindex, addr_str,
- pim->vrf->name);
+ __FILE__, __func__, first_ifindex,
+ addr_str, pim->vrf->name);
}
nh_iter++;
continue;
sizeof(addr_str));
zlog_debug(
"%s: multicast not enabled on input interface %s(%s) (ifindex=%d, RPF for source %s)",
- __PRETTY_FUNCTION__, ifp->name,
- pim->vrf->name, first_ifindex,
- addr_str);
+ __func__, ifp->name, pim->vrf->name,
+ first_ifindex, addr_str);
}
nh_iter++;
continue;
if (PIM_DEBUG_PIM_NHT)
zlog_debug(
"%s: pim nbr not found on input interface %s(%s)",
- __PRETTY_FUNCTION__, ifp->name,
+ __func__, ifp->name,
pim->vrf->name);
nh_iter++;
continue;
if (PIM_DEBUG_PIM_NHT) {
- zlog_debug("%s: NHT upstream %s(%s) old ifp %s new ifp %s",
- __PRETTY_FUNCTION__, up->sg_str, pim->vrf->name,
- old.source_nexthop.interface
- ? old.source_nexthop.interface->name : "Unknown",
- up->rpf.source_nexthop.interface
- ? up->rpf.source_nexthop.interface->name : "Unknown");
+ zlog_debug(
+ "%s: NHT upstream %s(%s) old ifp %s new ifp %s",
+ __func__, up->sg_str, pim->vrf->name,
+ old.source_nexthop.interface ? old.source_nexthop
+ .interface->name
+ : "Unknown",
+ up->rpf.source_nexthop.interface ? up->rpf.source_nexthop
+ .interface->name
+ : "Unknown");
}
return HASHWALK_CONTINUE;
if (PIM_DEBUG_PIM_NHT)
zlog_debug(
"%s: current nexthop does not have nbr ",
- __PRETTY_FUNCTION__);
+ __func__);
} else {
/* update metric even if the upstream
* neighbor stays unchanged
sizeof(grp_str));
zlog_debug(
"%s: (%s,%s)(%s) current nexthop %s is valid, skipping new path selection",
- __PRETTY_FUNCTION__,
- src_str, grp_str,
- pim->vrf->name,
+ __func__, src_str,
+ grp_str, pim->vrf->name,
nexthop->interface->name);
}
return 1;
addr_str, sizeof(addr_str));
zlog_debug(
"%s %s: could not find interface for ifindex %d (address %s(%s))",
- __FILE__, __PRETTY_FUNCTION__,
- first_ifindex, addr_str,
- pim->vrf->name);
+ __FILE__, __func__, first_ifindex,
+ addr_str, pim->vrf->name);
}
if (nh_iter == mod_val)
mod_val++; // Select nexthpath
addr_str, sizeof(addr_str));
zlog_debug(
"%s: multicast not enabled on input interface %s(%s) (ifindex=%d, RPF for source %s)",
- __PRETTY_FUNCTION__, ifp->name,
- pim->vrf->name, first_ifindex,
- addr_str);
+ __func__, ifp->name, pim->vrf->name,
+ first_ifindex, addr_str);
}
if (nh_iter == mod_val)
mod_val++; // Select nexthpath
if (PIM_DEBUG_PIM_NHT)
zlog_debug(
"%s: pim nbr not found on input interface %s(%s)",
- __PRETTY_FUNCTION__, ifp->name,
+ __func__, ifp->name,
pim->vrf->name);
if (nh_iter == mod_val)
mod_val++; // Select nexthpath
buf, sizeof(buf));
zlog_debug(
"%s: (%s,%s)(%s) selected nhop interface %s addr %s mod_val %u iter %d ecmp %d",
- __PRETTY_FUNCTION__, buf2, buf3,
- pim->vrf->name, ifp->name, buf, mod_val,
- nh_iter, pim->ecmp_enable);
+ __func__, buf2, buf3, pim->vrf->name,
+ ifp->name, buf, mod_val, nh_iter,
+ pim->ecmp_enable);
}
}
nh_iter++;
if (PIM_DEBUG_PIM_NHT)
zlog_debug(
"%s: Decode of nexthop update from zebra failed",
- __PRETTY_FUNCTION__);
+ __func__);
return 0;
}
prefix2str(&rpf.rpf_addr, buf, sizeof(buf));
zlog_debug(
"%s: Skipping NHT update, addr %s is not in local cached DB.",
- __PRETTY_FUNCTION__, buf);
+ __func__, buf);
}
return 0;
}
char buf[NEXTHOP_STRLEN];
zlog_debug(
"%s: could not find interface for ifindex %d(%s) (addr %s)",
- __PRETTY_FUNCTION__,
- nexthop->ifindex,
+ __func__, nexthop->ifindex,
pim->vrf->name,
nexthop2str(nexthop, buf,
sizeof(buf)));
prefix2str(&nhr.prefix, p_str, sizeof(p_str));
zlog_debug(
"%s: NHT addr %s(%s) %d-nhop via %s(%s) type %d distance:%u metric:%u ",
- __PRETTY_FUNCTION__, p_str,
- pim->vrf->name, i + 1,
+ __func__, p_str, pim->vrf->name, i + 1,
inet_ntoa(nexthop->gate.ipv4),
ifp->name, nexthop->type, nhr.distance,
nhr.metric);
zlog_debug(
"%s: multicast not enabled on input interface %s(%s) (ifindex=%d, addr %s)",
- __PRETTY_FUNCTION__, ifp->name,
+ __func__, ifp->name,
pim->vrf->name,
nexthop->ifindex,
nexthop2str(nexthop, buf,
prefix2str(&nhr.prefix, buf, sizeof(buf));
zlog_debug(
"%s: NHT Update for %s(%s) num_nh %d num_pim_nh %d vrf:%u up %ld rp %d",
- __PRETTY_FUNCTION__, buf, pim->vrf->name,
- nhr.nexthop_num, pnc->nexthop_num, vrf_id,
- pnc->upstream_hash->count, listcount(pnc->rp_list));
+ __func__, buf, pim->vrf->name, nhr.nexthop_num,
+ pnc->nexthop_num, vrf_id, pnc->upstream_hash->count,
+ listcount(pnc->rp_list));
}
pim_rpf_set_refresh_time(pim);
pim_inet4_dump("<addr?>", src->u.prefix4, addr_str,
sizeof(addr_str));
zlog_debug("%s: Looking up: %s(%s), last lookup time: %lld",
- __PRETTY_FUNCTION__, addr_str, pim->vrf->name,
+ __func__, addr_str, pim->vrf->name,
nexthop->last_lookup_time);
}
if (PIM_DEBUG_PIM_NHT)
zlog_warn(
"%s: could not find nexthop ifindex for address %s(%s)",
- __PRETTY_FUNCTION__, addr_str, pim->vrf->name);
+ __func__, addr_str, pim->vrf->name);
return 0;
}
hash_val = pim_compute_ecmp_hash(src, grp);
mod_val = hash_val % consider;
if (PIM_DEBUG_PIM_NHT_DETAIL)
- zlog_debug("%s: hash_val %u mod_val %u",
- __PRETTY_FUNCTION__, hash_val, mod_val);
+ zlog_debug("%s: hash_val %u mod_val %u", __func__,
+ hash_val, mod_val);
}
i = 0;
if (PIM_DEBUG_PIM_NHT)
zlog_debug(
"%s %s: could not find interface for ifindex %d (address %s(%s))",
- __FILE__, __PRETTY_FUNCTION__,
- first_ifindex, addr_str,
- pim->vrf->name);
+ __FILE__, __func__, first_ifindex,
+ addr_str, pim->vrf->name);
if (i == mod_val)
mod_val++;
i++;
if (PIM_DEBUG_PIM_NHT)
zlog_debug(
"%s: multicast not enabled on input interface %s(%s) (ifindex=%d, RPF for source %s)",
- __PRETTY_FUNCTION__, ifp->name,
- pim->vrf->name, first_ifindex,
- addr_str);
+ __func__, ifp->name, pim->vrf->name,
+ first_ifindex, addr_str);
if (i == mod_val)
mod_val++;
i++;
if (PIM_DEBUG_PIM_NHT)
zlog_debug(
"%s: NBR not found on input interface %s(%s) (RPF for source %s)",
- __PRETTY_FUNCTION__, ifp->name,
+ __func__, ifp->name,
pim->vrf->name, addr_str);
continue;
}
nexthop_str, sizeof(nexthop_str));
zlog_debug(
"%s: found nhop %s for addr %s interface %s(%s) metric %d dist %d",
- __PRETTY_FUNCTION__, nexthop_str,
- addr_str, ifp->name, pim->vrf->name,
+ __func__, nexthop_str, addr_str,
+ ifp->name, pim->vrf->name,
nexthop_tab[i].route_metric,
nexthop_tab[i].protocol_distance);
}
if (PIM_DEBUG_PIM_NHT)
zlog_debug(
"%s: could not find nexthop ifindex for address %s(%s)",
- __PRETTY_FUNCTION__, addr_str, pim->vrf->name);
+ __func__, addr_str, pim->vrf->name);
return -1;
}
if (PIM_DEBUG_PIM_NHT)
zlog_debug(
"%s: found nexthop ifindex=%d (interface %s(%s)) for address %s",
- __PRETTY_FUNCTION__, ifindex,
- ifindex2ifname(ifindex, pim->vrf_id),
+ __func__, ifindex, ifindex2ifname(ifindex, pim->vrf_id),
pim->vrf->name, addr_str);
vif_index = pim_if_find_vifindex_by_ifindex(pim, ifindex);
if (PIM_DEBUG_PIM_NHT) {
zlog_debug(
"%s: low vif_index=%d(%s) < 1 nexthop for address %s",
- __PRETTY_FUNCTION__, vif_index, pim->vrf->name,
- addr_str);
+ __func__, vif_index, pim->vrf->name, addr_str);
}
return -2;
}
if (PIM_DEBUG_MROUTE)
zlog_debug(
"%s(%s): Existing oil for %pSG4 Ref Count: %d (Post Increment)",
- __PRETTY_FUNCTION__, name, sg,
- c_oil->oil_ref_count);
+ __func__, name, sg, c_oil->oil_ref_count);
return c_oil;
}
zlog_debug(
"%s(%s): Del oil for %pSG4, Ref Count: %d (Predecrement)",
- __PRETTY_FUNCTION__, name, &sg, c_oil->oil_ref_count);
+ __func__, name, &sg, c_oil->oil_ref_count);
}
--c_oil->oil_ref_count;
sizeof(source_str));
zlog_debug(
"%s %s: no existing protocol mask %u(%u) for requested OIF %s (vif_index=%d, min_ttl=%d) for channel (S,G)=(%s,%s)",
- __FILE__, __PRETTY_FUNCTION__, proto_mask,
+ __FILE__, __func__, proto_mask,
channel_oil
->oif_flags[pim_ifp->mroute_vif_index],
oif->name, pim_ifp->mroute_vif_index,
sizeof(source_str));
zlog_debug(
"%s %s: other protocol masks remain for requested OIF %s (vif_index=%d, min_ttl=%d) for channel (S,G)=(%s,%s)",
- __FILE__, __PRETTY_FUNCTION__, oif->name,
+ __FILE__, __func__, oif->name,
pim_ifp->mroute_vif_index,
channel_oil->oil
.mfcc_ttls[pim_ifp->mroute_vif_index],
/* clear mute; will be re-evaluated when the OIF becomes valid again */
channel_oil->oif_flags[pim_ifp->mroute_vif_index] &= ~PIM_OIF_FLAG_MUTE;
- if (pim_upstream_mroute_add(channel_oil, __PRETTY_FUNCTION__)) {
+ if (pim_upstream_mroute_add(channel_oil, __func__)) {
if (PIM_DEBUG_MROUTE) {
char group_str[INET_ADDRSTRLEN];
char source_str[INET_ADDRSTRLEN];
sizeof(source_str));
zlog_debug(
"%s %s: could not remove output interface %s (vif_index=%d) for channel (S,G)=(%s,%s)",
- __FILE__, __PRETTY_FUNCTION__, oif->name,
+ __FILE__, __func__, oif->name,
pim_ifp->mroute_vif_index, source_str,
group_str);
}
source_str, sizeof(source_str));
zlog_debug(
"%s(%s): (S,G)=(%s,%s): proto_mask=%u IIF:%d OIF=%s vif_index=%d",
- __PRETTY_FUNCTION__, caller, source_str, group_str,
- proto_mask, channel_oil->oil.mfcc_parent, oif->name,
+ __func__, caller, source_str, group_str, proto_mask,
+ channel_oil->oil.mfcc_parent, oif->name,
pim_ifp->mroute_vif_index);
}
c_oil->oif_flags[pim_ifp->mroute_vif_index] &=
~PIM_OIF_FLAG_MUTE;
- pim_upstream_mroute_add(c_oil, __PRETTY_FUNCTION__);
+ pim_upstream_mroute_add(c_oil, __func__);
}
/* pim_upstream has been set or cleared on the c_oil. re-eval mute state
sizeof(source_str));
zlog_debug(
"%s %s: existing protocol mask %u requested OIF %s (vif_index=%d, min_ttl=%d) for channel (S,G)=(%s,%s)",
- __FILE__, __PRETTY_FUNCTION__, proto_mask,
- oif->name, pim_ifp->mroute_vif_index,
+ __FILE__, __func__, proto_mask, oif->name,
+ pim_ifp->mroute_vif_index,
channel_oil->oil
.mfcc_ttls[pim_ifp->mroute_vif_index],
source_str, group_str);
source_str, sizeof(source_str));
zlog_warn(
"%s %s: new protocol mask %u requested nonexistent OIF %s (vif_index=%d, min_ttl=%d) for channel (S,G)=(%s,%s)",
- __FILE__, __PRETTY_FUNCTION__,
- proto_mask, oif->name,
- pim_ifp->mroute_vif_index,
+ __FILE__, __func__, proto_mask,
+ oif->name, pim_ifp->mroute_vif_index,
channel_oil->oil.mfcc_ttls
[pim_ifp->mroute_vif_index],
source_str, group_str);
sizeof(source_str));
zlog_debug(
"%s %s: interface %s (vif_index=%d) is existing output for channel (S,G)=(%s,%s)",
- __FILE__, __PRETTY_FUNCTION__, oif->name,
+ __FILE__, __func__, oif->name,
pim_ifp->mroute_vif_index, source_str,
group_str);
}
* valid to get installed in kernel.
*/
if (channel_oil->oil.mfcc_parent != MAXVIFS) {
- if (pim_upstream_mroute_add(channel_oil, __PRETTY_FUNCTION__)) {
+ if (pim_upstream_mroute_add(channel_oil, __func__)) {
if (PIM_DEBUG_MROUTE) {
char group_str[INET_ADDRSTRLEN];
char source_str[INET_ADDRSTRLEN];
channel_oil->oil.mfcc_origin, source_str,
sizeof(source_str));
zlog_debug(
- "%s %s: could not add output interface %s (vif_index=%d) for channel (S,G)=(%s,%s)",
- __FILE__, __PRETTY_FUNCTION__, oif->name,
- pim_ifp->mroute_vif_index, source_str,
- group_str);
+ "%s %s: could not add output interface %s (vif_index=%d) for channel (S,G)=(%s,%s)",
+ __FILE__, __func__, oif->name,
+ pim_ifp->mroute_vif_index, source_str,
+ group_str);
}
channel_oil->oil.mfcc_ttls[pim_ifp->mroute_vif_index]
source_str, sizeof(source_str));
zlog_debug(
"%s(%s): (S,G)=(%s,%s): proto_mask=%u OIF=%s vif_index=%d: DONE",
- __PRETTY_FUNCTION__, caller, source_str, group_str,
- proto_mask, oif->name, pim_ifp->mroute_vif_index);
+ __func__, caller, source_str, group_str, proto_mask,
+ oif->name, pim_ifp->mroute_vif_index);
}
return 0;
if (!ifp->info) {
flog_err(EC_PIM_CONFIG,
"%s: %s: but PIM not enabled on interface %s (!)",
- __PRETTY_FUNCTION__, delete_message, ifp->name);
+ __func__, delete_message, ifp->name);
return;
}
ifp->name, ip_hdr->ip_ttl, header->ver, pim_msg_len,
checksum);
if (PIM_DEBUG_PIM_PACKETDUMP_RECV) {
- pim_pkt_dump(__PRETTY_FUNCTION__, pim_msg, pim_msg_len);
+ pim_pkt_dump(__func__, pim_msg, pim_msg_len);
}
}
if (PIM_DEBUG_PIM_PACKETS)
zlog_debug(
"%s %s: non-hello PIM message type=%d from non-neighbor %s on %s",
- __FILE__, __PRETTY_FUNCTION__,
- header->type, src_str, ifp->name);
+ __FILE__, __func__, header->type,
+ src_str, ifp->name);
return -1;
}
pim_neighbor_timer_reset(neigh, neigh->holdtime);
if (PIM_DEBUG_PIM_PACKETS)
zlog_debug(
"%s %s: non-hello PIM message type=%d from non-neighbor %s on %s",
- __FILE__, __PRETTY_FUNCTION__,
- header->type, src_str, ifp->name);
+ __FILE__, __func__, header->type,
+ src_str, ifp->name);
return -1;
}
pim_neighbor_timer_reset(neigh, neigh->holdtime);
if (PIM_DEBUG_PIM_PACKETS)
zlog_debug(
"%s: Received incoming pim packet on interface(%s:%d) not yet configured for pim",
- __PRETTY_FUNCTION__,
- ifp ? ifp->name : "Unknown", ifindex);
+ __func__, ifp ? ifp->name : "Unknown",
+ ifindex);
goto done;
}
int fail = pim_pim_packet(ifp, buf, len);
if (fail) {
if (PIM_DEBUG_PIM_PACKETS)
zlog_debug("%s: pim_pim_packet() return=%d",
- __PRETTY_FUNCTION__, fail);
+ __func__, fail);
goto done;
}
sizeof(dst_str));
zlog_warn(
"%s: sendto() failure to %s: fd=%d msg_size=%zd: errno=%d: %s",
- __PRETTY_FUNCTION__, dst_str, fd, len,
- errno, safe_strerror(errno));
+ __func__, dst_str, fd, len, errno,
+ safe_strerror(errno));
}
return -1;
}
if (PIM_DEBUG_PIM_PACKETS) {
char dst_str[INET_ADDRSTRLEN];
pim_inet4_dump("<dst?>", dst, dst_str, sizeof(dst_str));
- zlog_debug("%s: to %s on %s: msg_size=%d checksum=%x",
- __PRETTY_FUNCTION__, dst_str, ifname, pim_msg_size,
- header->checksum);
+ zlog_debug("%s: to %s on %s: msg_size=%d checksum=%x", __func__,
+ dst_str, ifname, pim_msg_size, header->checksum);
}
memset(&to, 0, sizeof(to));
tolen = sizeof(to);
if (PIM_DEBUG_PIM_PACKETDUMP_SEND) {
- pim_pkt_dump(__PRETTY_FUNCTION__, pim_msg, pim_msg_size);
+ pim_pkt_dump(__func__, pim_msg, pim_msg_size);
}
pim_msg_send_frame(fd, (char *)buffer, sendlen, (struct sockaddr *)&to,
sizeof(dst_str));
zlog_debug(
"%s: to %s on %s: holdt=%u prop_d=%u overr_i=%u dis_join_supp=%d dr_prio=%u gen_id=%08x addrs=%d",
- __PRETTY_FUNCTION__, dst_str, ifp->name, holdtime,
+ __func__, dst_str, ifp->name, holdtime,
pim_ifp->pim_propagation_delay_msec,
pim_ifp->pim_override_interval_msec,
PIM_IF_TEST_PIM_CAN_DISABLE_JOIN_SUPRESSION(
if (PIM_DEBUG_PIM_HELLO) {
zlog_debug(
"%s: could not send PIM message on interface %s",
- __PRETTY_FUNCTION__, ifp->name);
+ __func__, ifp->name);
}
return -2;
}
pinfo = (struct pim_interface *)ifp->info;
if (!pinfo) {
if (PIM_DEBUG_PIM_TRACE)
- zlog_debug("%s: No pinfo!", __PRETTY_FUNCTION__);
+ zlog_debug("%s: No pinfo!", __func__);
return;
}
if (pim_msg_send(pinfo->pim_sock_fd, src, originator, buffer,
if (PIM_DEBUG_PIM_TRACE) {
zlog_debug(
"%s: could not send PIM register stop message on interface %s",
- __PRETTY_FUNCTION__, ifp->name);
+ __func__, ifp->name);
}
}
++pinfo->pim_ifstat_reg_stop_send;
if (!ifp) {
if (PIM_DEBUG_PIM_REG)
zlog_debug("%s: No interface to transmit register on",
- __PRETTY_FUNCTION__);
+ __func__);
return;
}
pinfo = (struct pim_interface *)ifp->info;
if (PIM_DEBUG_PIM_REG)
zlog_debug(
"%s: Interface: %s not configured for pim to trasmit on!\n",
- __PRETTY_FUNCTION__, ifp->name);
+ __func__, ifp->name);
return;
}
strlcpy(rp_str, inet_ntoa(rpg->rpf_addr.u.prefix4),
sizeof(rp_str));
zlog_debug("%s: Sending %s %sRegister Packet to %s on %s",
- __PRETTY_FUNCTION__, up->sg_str,
- null_register ? "NULL " : "", rp_str, ifp->name);
+ __func__, up->sg_str, null_register ? "NULL " : "",
+ rp_str, ifp->name);
}
memset(buffer, 0, 10000);
if (PIM_DEBUG_PIM_TRACE) {
zlog_debug(
"%s: could not send PIM register message on interface %s",
- __PRETTY_FUNCTION__, ifp->name);
+ __func__, ifp->name);
}
return;
}
if (PIM_DEBUG_PIM_TRACE)
zlog_debug(
"%s: Cannot send null-register for %s no valid iif",
- __PRETTY_FUNCTION__, up->sg_str);
+ __func__, up->sg_str);
return;
}
if (PIM_DEBUG_PIM_TRACE)
zlog_debug(
"%s: Cannot send null-register for %s no RPF to the RP",
- __PRETTY_FUNCTION__, up->sg_str);
+ __func__, up->sg_str);
return;
}
if (PIM_DEBUG_PIM_TRACE)
zlog_debug(
"%s: Cannot send null-register for %s vxlan-aa PIP unavailable",
- __PRETTY_FUNCTION__, up->sg_str);
+ __func__, up->sg_str);
return;
}
}
if (!upstream) {
upstream = pim_upstream_add(
pim_ifp->pim, &sg, ifp,
- PIM_UPSTREAM_FLAG_MASK_SRC_STREAM,
- __PRETTY_FUNCTION__, NULL);
+ PIM_UPSTREAM_FLAG_MASK_SRC_STREAM, __func__,
+ NULL);
if (!upstream) {
zlog_warn("Failure to create upstream state");
return 1;
if (PIM_DEBUG_PIM_TRACE)
zlog_debug("%s: pim upstream update for old upstream %s",
- __PRETTY_FUNCTION__,
- inet_ntoa(old_upstream_addr));
+ __func__, inet_ntoa(old_upstream_addr));
if (old_upstream_addr.s_addr == new_upstream_addr.s_addr)
return;
char buf[PREFIX2STR_BUFFER];
prefix2str(&nht_p, buf, sizeof(buf));
- zlog_debug("%s: Deregister upstream %s addr %s with Zebra NHT",
- __PRETTY_FUNCTION__, up->sg_str, buf);
+ zlog_debug(
+ "%s: Deregister upstream %s addr %s with Zebra NHT",
+ __func__, up->sg_str, buf);
}
pim_delete_tracked_nexthop(pim, &nht_p, up, NULL, false);
}
rpf_result = pim_rpf_update(pim, up, &old_rpf, __func__);
if (rpf_result == PIM_RPF_FAILURE)
- pim_mroute_del(up->channel_oil, __PRETTY_FUNCTION__);
+ pim_mroute_del(up->channel_oil, __func__);
/* update kernel multicast forwarding cache (MFC) */
if (up->rpf.source_nexthop.interface && up->channel_oil)
}
if (PIM_DEBUG_PIM_TRACE)
- zlog_debug("%s: Delete RP %s for the group %s",
- __PRETTY_FUNCTION__, rp_str, grp_str);
+ zlog_debug("%s: Delete RP %s for the group %s", __func__,
+ rp_str, grp_str);
/* While static RP is getting deleted, we need to check if dynamic RP
* present for the same group in BSM RP table, then install the dynamic
sizeof(bsrp_str)))
sprintf(bsrp_str, "<bsrp?>");
- zlog_debug("%s: BSM RP %s found for the group %s",
- __PRETTY_FUNCTION__,
- bsrp_str, grp_str);
+ zlog_debug(
+ "%s: BSM RP %s found for the group %s",
+ __func__, bsrp_str, grp_str);
}
return pim_rp_change(pim, bsrp->rp_address,
group, RP_SRC_BSR);
if (PIM_DEBUG_PIM_TRACE)
zlog_debug(
"%s: BSM RP not found for the group %s",
- __PRETTY_FUNCTION__, grp_str);
+ __func__, grp_str);
}
}
if (PIM_DEBUG_PIM_NHT_RP) {
char buf[PREFIX2STR_BUFFER];
prefix2str(&nht_p, buf, sizeof(buf));
- zlog_debug("%s: Deregister RP addr %s with Zebra ",
- __PRETTY_FUNCTION__, buf);
+ zlog_debug("%s: Deregister RP addr %s with Zebra ", __func__,
+ buf);
}
pim_delete_tracked_nexthop(pim, &nht_p, NULL, rp_info, false);
zlog_debug(
"%s:Found for Freeing: %p for rp_info: %p(%s) Lock: %d",
- __PRETTY_FUNCTION__, rn, rp_info,
+ __func__, rn, rp_info,
prefix2str(&rp_info->group, buf,
sizeof(buf)),
rn->lock);
prefix2str(&nht_p, buf, sizeof(buf));
zlog_debug("%s: Deregister RP addr %s with Zebra ",
- __PRETTY_FUNCTION__, buf);
+ __func__, buf);
}
pim_delete_tracked_nexthop(pim, &nht_p, NULL, rp_info, false);
}
prefix2str(&nht_p, buf, sizeof(buf));
prefix2str(&rp_info->group, buf1, sizeof(buf1));
zlog_debug("%s: NHT Register RP addr %s grp %s with Zebra ",
- __PRETTY_FUNCTION__, buf, buf1);
+ __func__, buf, buf1);
}
pim_find_or_track_nexthop(pim, &nht_p, NULL, rp_info, false, NULL);
prefix2str(&rp_info->group, buf1, sizeof(buf1));
zlog_debug(
"%s: NHT Register RP addr %s grp %s with Zebra",
- __PRETTY_FUNCTION__, buf, buf1);
+ __func__, buf, buf1);
}
pim_find_or_track_nexthop(pim, &nht_p, NULL, rp_info, false,
NULL);
&& (source.s_addr == INADDR_ANY))) {
if (PIM_DEBUG_PIM_NHT_RP)
zlog_debug("%s: Received a (*,G) with no RP configured",
- __PRETTY_FUNCTION__);
+ __func__);
up->s_addr = INADDR_ANY;
return 0;
}
pim->last_route_change_time = pim_time_monotonic_usec();
if (PIM_DEBUG_PIM_TRACE)
zlog_debug("%s: vrf(%s) New last route change time: %" PRId64,
- __PRETTY_FUNCTION__, pim->vrf->name,
+ __func__, pim->vrf->name,
pim->last_route_change_time);
}
pim_addr_dump("<nexthop?>", &nexthop->mrib_nexthop_addr,
nexthop_str, sizeof(nexthop_str));
zlog_debug(
- "%s: Using last lookup for %s at %lld, %" PRId64 " addr %s",
- __PRETTY_FUNCTION__, addr_str,
- nexthop->last_lookup_time,
+ "%s: Using last lookup for %s at %lld, %" PRId64
+ " addr %s",
+ __func__, addr_str, nexthop->last_lookup_time,
pim->last_route_change_time, nexthop_str);
}
pim->nexthop_lookups_avoided++;
sizeof(addr_str));
zlog_debug(
"%s: Looking up: %s, last lookup time: %lld, %" PRId64,
- __PRETTY_FUNCTION__, addr_str,
- nexthop->last_lookup_time,
+ __func__, addr_str, nexthop->last_lookup_time,
pim->last_route_change_time);
}
}
pim_inet4_dump("<addr?>", addr, addr_str, sizeof(addr_str));
zlog_warn(
"%s %s: could not find nexthop ifindex for address %s",
- __FILE__, __PRETTY_FUNCTION__, addr_str);
+ __FILE__, __func__, addr_str);
return false;
}
sizeof(addr_str));
zlog_debug(
"%s %s: could not find interface for ifindex %d (address %s)",
- __FILE__, __PRETTY_FUNCTION__,
- first_ifindex, addr_str);
+ __FILE__, __func__, first_ifindex,
+ addr_str);
}
i++;
continue;
sizeof(addr_str));
zlog_debug(
"%s: multicast not enabled on input interface %s (ifindex=%d, RPF for source %s)",
- __PRETTY_FUNCTION__, ifp->name,
- first_ifindex, addr_str);
+ __func__, ifp->name, first_ifindex,
+ addr_str);
}
i++;
} else if (neighbor_needed
sizeof(addr_str));
zlog_debug(
"%s %s: found nexthop %s for address %s: interface %s ifindex=%d metric=%d pref=%d",
- __FILE__, __PRETTY_FUNCTION__, nexthop_str,
- addr_str, ifp->name, first_ifindex,
+ __FILE__, __func__, nexthop_str, addr_str,
+ ifp->name, first_ifindex,
nexthop_tab[i].route_metric,
nexthop_tab[i].protocol_distance);
}
if (!up->rpf.source_nexthop.interface) {
zlog_warn("%s: missing RPF interface for upstream (S,G)=%s",
- __PRETTY_FUNCTION__, up->sg_str);
+ __func__, up->sg_str);
rpf_addr.s_addr = PIM_NET_INADDR_ANY;
return rpf_addr;
case AF_INET:
return rpf->rpf_addr.u.prefix4.s_addr == INADDR_NONE;
case AF_INET6:
- zlog_warn("%s: v6 Unimplmeneted", __PRETTY_FUNCTION__);
+ zlog_warn("%s: v6 Unimplmeneted", __func__);
return 1;
default:
return 0;
case AF_INET:
return rpf->rpf_addr.u.prefix4.s_addr == INADDR_ANY;
case AF_INET6:
- zlog_warn("%s: v6 Unimplmented", __PRETTY_FUNCTION__);
+ zlog_warn("%s: v6 Unimplmented", __func__);
return 1;
default:
return 0;
flog_err(
EC_LIB_DEVELOPMENT,
"%s %s: Missing IP_PKTINFO and IP_RECVDSTADDR: unable to get dst addr from recvmsg()",
- __FILE__, __PRETTY_FUNCTION__);
+ __FILE__, __func__);
close(fd);
return PIM_SOCK_ERR_DSTADDR;
#endif
}
if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &rcvbuf, sizeof(rcvbuf)))
- zlog_warn("%s: Failure to set buffer size to %d",
- __PRETTY_FUNCTION__, rcvbuf);
+ zlog_warn("%s: Failure to set buffer size to %d", __func__,
+ rcvbuf);
{
long flags;
if (!str2prefix(PIM_SSM_STANDARD_RANGE, &group_ssm))
flog_err(EC_LIB_DEVELOPMENT,
"%s: Failure to Read Group Address: %s",
- __PRETTY_FUNCTION__, PIM_SSM_STANDARD_RANGE);
+ __func__, PIM_SSM_STANDARD_RANGE);
first = 0;
}
if (fd < 0) {
flog_err_sys(EC_LIB_SOCKET,
"%s: could not create socket: errno=%d: %s",
- __PRETTY_FUNCTION__, errno, safe_strerror(errno));
+ __func__, errno, safe_strerror(errno));
return -1;
}
pim_inet4_dump("<addr?>", addr, addr_str, sizeof(addr_str));
zlog_warn(
"%s: bind(fd=%d,addr=%s,port=%d,len=%zu) failure: errno=%d: %s",
- __PRETTY_FUNCTION__, fd, addr_str, port,
- sizeof(sockaddr), errno, safe_strerror(errno));
+ __func__, fd, addr_str, port, sizeof(sockaddr), errno,
+ safe_strerror(errno));
close(fd);
return -1;
}
if (setsockopt(fd, IPPROTO_IP, IP_PKTINFO, &opt, sizeof(opt))) {
zlog_warn(
"%s: could not set IP_PKTINFO on socket fd=%d: errno=%d: %s",
- __PRETTY_FUNCTION__, fd, errno,
- safe_strerror(errno));
+ __func__, fd, errno, safe_strerror(errno));
}
#elif defined(HAVE_IP_RECVDSTADDR)
/* BSD IP_RECVDSTADDR */
sizeof(opt))) {
zlog_warn(
"%s: could not set IP_RECVDSTADDR on socket fd=%d: errno=%d: %s",
- __PRETTY_FUNCTION__, fd, errno,
- safe_strerror(errno));
+ __func__, fd, errno, safe_strerror(errno));
}
#else
flog_err(
EC_LIB_DEVELOPMENT,
"%s %s: missing IP_PKTINFO and IP_RECVDSTADDR: unable to get dst addr from recvmsg()",
- __FILE__, __PRETTY_FUNCTION__);
+ __FILE__, __func__);
close(fd);
return -1;
#endif
sizeof(reuse))) {
zlog_warn(
"%s: could not set Reuse Address Option on socket fd=%d: errno=%d: %s",
- __PRETTY_FUNCTION__, fd, errno,
- safe_strerror(errno));
+ __func__, fd, errno, safe_strerror(errno));
close(fd);
return -1;
}
sizeof(mttl))) {
zlog_warn(
"%s: could not set multicast TTL=%d on socket fd=%d: errno=%d: %s",
- __PRETTY_FUNCTION__, mttl, fd, errno,
- safe_strerror(errno));
+ __func__, mttl, fd, errno, safe_strerror(errno));
close(fd);
return -1;
}
if (setsockopt_ipv4_multicast_loop(fd, 0)) {
zlog_warn(
"%s: could not disable Multicast Loopback Option on socket fd=%d: errno=%d: %s",
- __PRETTY_FUNCTION__, fd, errno, safe_strerror(errno));
+ __func__, fd, errno, safe_strerror(errno));
close(fd);
return PIM_SOCK_ERR_LOOP;
}
sizeof(addr))) {
zlog_warn(
"%s: could not set Outgoing Interface Option on socket fd=%d: errno=%d: %s",
- __PRETTY_FUNCTION__, fd, errno, safe_strerror(errno));
+ __func__, fd, errno, safe_strerror(errno));
close(fd);
return -1;
}
if (flags < 0) {
zlog_warn(
"%s: could not get fcntl(F_GETFL,O_NONBLOCK) on socket fd=%d: errno=%d: %s",
- __PRETTY_FUNCTION__, fd, errno,
- safe_strerror(errno));
+ __func__, fd, errno, safe_strerror(errno));
close(fd);
return -1;
}
if (fcntl(fd, F_SETFL, flags | O_NONBLOCK)) {
zlog_warn(
"%s: could not set fcntl(F_SETFL,O_NONBLOCK) on socket fd=%d: errno=%d: %s",
- __PRETTY_FUNCTION__, fd, errno,
- safe_strerror(errno));
+ __func__, fd, errno, safe_strerror(errno));
close(fd);
return -1;
}
sizeof(source_str));
zlog_warn(
"%s: failure closing ssmpingd sock_fd=%d for source %s: errno=%d: %s",
- __PRETTY_FUNCTION__, ss->sock_fd, source_str, errno,
+ __func__, ss->sock_fd, source_str, errno,
safe_strerror(errno));
/* warning only */
}
if (sent < 0) {
zlog_warn(
"%s: sendto() failure to %s,%d: fd=%d len=%d: errno=%d: %s",
- __PRETTY_FUNCTION__, to_str, ntohs(to.sin_port),
+ __func__, to_str, ntohs(to.sin_port),
ss->sock_fd, len, errno, safe_strerror(errno));
} else {
zlog_warn(
"%s: sendto() partial to %s,%d: fd=%d len=%d: sent=%d",
- __PRETTY_FUNCTION__, to_str, ntohs(to.sin_port),
+ __func__, to_str, ntohs(to.sin_port),
ss->sock_fd, len, sent);
}
}
sizeof(source_str));
zlog_warn(
"%s: failure receiving ssmping for source %s on fd=%d: errno=%d: %s",
- __PRETTY_FUNCTION__, source_str, ss->sock_fd, errno,
+ __func__, source_str, ss->sock_fd, errno,
safe_strerror(errno));
return -1;
}
pim_inet4_dump("<to?>", to.sin_addr, to_str, sizeof(to_str));
zlog_warn(
"%s: bad ssmping type=%d from %s,%d to %s,%d on interface %s ifindex=%d fd=%d src=%s",
- __PRETTY_FUNCTION__, buf[0], from_str,
- ntohs(from.sin_port), to_str, ntohs(to.sin_port),
+ __func__, buf[0], from_str, ntohs(from.sin_port),
+ to_str, ntohs(to.sin_port),
ifp ? ifp->name : "<iface?>", ifindex, ss->sock_fd,
source_str);
return 0;
pim_inet4_dump("<to?>", to.sin_addr, to_str, sizeof(to_str));
zlog_debug(
"%s: recv ssmping from %s,%d to %s,%d on interface %s ifindex=%d fd=%d src=%s",
- __PRETTY_FUNCTION__, from_str, ntohs(from.sin_port),
- to_str, ntohs(to.sin_port),
- ifp ? ifp->name : "<iface?>", ifindex, ss->sock_fd,
- source_str);
+ __func__, from_str, ntohs(from.sin_port), to_str,
+ ntohs(to.sin_port), ifp ? ifp->name : "<iface?>",
+ ifindex, ss->sock_fd, source_str);
}
buf[0] = PIM_SSMPINGD_REPLY;
pim_inet4_dump("<src?>", source_addr, source_str,
sizeof(source_str));
zlog_warn("%s: ssmpingd_socket() failure for source %s",
- __PRETTY_FUNCTION__, source_str);
+ __func__, source_str);
return 0;
}
char source_str[INET_ADDRSTRLEN];
pim_inet4_dump("<src?>", source_addr, source_str,
sizeof(source_str));
- zlog_info("%s: starting ssmpingd for source %s",
- __PRETTY_FUNCTION__, source_str);
+ zlog_info("%s: starting ssmpingd for source %s", __func__,
+ source_str);
}
ss = ssmpingd_new(pim, source_addr);
char source_str[INET_ADDRSTRLEN];
pim_inet4_dump("<src?>", source_addr, source_str,
sizeof(source_str));
- zlog_warn("%s: ssmpingd_new() failure for source %s",
- __PRETTY_FUNCTION__, source_str);
+ zlog_warn("%s: ssmpingd_new() failure for source %s", __func__,
+ source_str);
return -1;
}
char source_str[INET_ADDRSTRLEN];
pim_inet4_dump("<src?>", source_addr, source_str,
sizeof(source_str));
- zlog_warn("%s: could not find ssmpingd for source %s",
- __PRETTY_FUNCTION__, source_str);
+ zlog_warn("%s: could not find ssmpingd for source %s", __func__,
+ source_str);
return -1;
}
char source_str[INET_ADDRSTRLEN];
pim_inet4_dump("<src?>", source_addr, source_str,
sizeof(source_str));
- zlog_info("%s: stopping ssmpingd for source %s",
- __PRETTY_FUNCTION__, source_str);
+ zlog_info("%s: stopping ssmpingd for source %s", __func__,
+ source_str);
}
ssmpingd_delete(ss);
if (result) {
flog_err_sys(EC_LIB_SYSTEM_CALL,
"%s: gettimeofday() failure: errno=%d: %s",
- __PRETTY_FUNCTION__, errno, safe_strerror(errno));
+ __func__, errno, safe_strerror(errno));
}
return result;
if (gettime_monotonic(&now_tv)) {
flog_err_sys(EC_LIB_SYSTEM_CALL,
"%s: gettime_monotonic() failure: errno=%d: %s",
- __PRETTY_FUNCTION__, errno, safe_strerror(errno));
+ __func__, errno, safe_strerror(errno));
return -1;
}
if (gettime_monotonic(&now_tv)) {
flog_err_sys(EC_LIB_SYSTEM_CALL,
"%s: gettime_monotonic() failure: errno=%d: %s",
- __PRETTY_FUNCTION__, errno, safe_strerror(errno));
+ __func__, errno, safe_strerror(errno));
return -1;
}
if (gettime_monotonic(&now_tv)) {
flog_err_sys(EC_LIB_SYSTEM_CALL,
"%s: gettime_monotonic() failure: errno=%d: %s",
- __PRETTY_FUNCTION__, errno, safe_strerror(errno));
+ __func__, errno, safe_strerror(errno));
return -1;
}
if (PIM_DEBUG_PIM_TRACE_DETAIL) {
zlog_debug(
"%s: number of encoded secondary unicast IPv4 addresses: %zu",
- __PRETTY_FUNCTION__, option_len / uel);
+ __func__, option_len / uel);
}
if (option_len < 1) {
{
const char *label = "holdtime";
- if (check_tlv_length(__PRETTY_FUNCTION__, label, ifname, src_addr,
+ if (check_tlv_length(__func__, label, ifname, src_addr,
sizeof(uint16_t), option_len)) {
return -1;
}
- check_tlv_redefinition_uint16(
- __PRETTY_FUNCTION__, label, ifname, src_addr, *hello_options,
- PIM_OPTION_MASK_HOLDTIME, PIM_TLV_GET_HOLDTIME(tlv_curr),
- *hello_option_holdtime);
+ check_tlv_redefinition_uint16(__func__, label, ifname, src_addr,
+ *hello_options, PIM_OPTION_MASK_HOLDTIME,
+ PIM_TLV_GET_HOLDTIME(tlv_curr),
+ *hello_option_holdtime);
PIM_OPTION_SET(*hello_options, PIM_OPTION_MASK_HOLDTIME);
uint16_t *hello_option_override_interval,
uint16_t option_len, const uint8_t *tlv_curr)
{
- if (check_tlv_length(__PRETTY_FUNCTION__, "lan_prune_delay", ifname,
- src_addr, sizeof(uint32_t), option_len)) {
+ if (check_tlv_length(__func__, "lan_prune_delay", ifname, src_addr,
+ sizeof(uint32_t), option_len)) {
return -1;
}
- check_tlv_redefinition_uint16(__PRETTY_FUNCTION__, "propagation_delay",
- ifname, src_addr, *hello_options,
+ check_tlv_redefinition_uint16(__func__, "propagation_delay", ifname,
+ src_addr, *hello_options,
PIM_OPTION_MASK_LAN_PRUNE_DELAY,
PIM_TLV_GET_PROPAGATION_DELAY(tlv_curr),
*hello_option_propagation_delay);
{
const char *label = "dr_priority";
- if (check_tlv_length(__PRETTY_FUNCTION__, label, ifname, src_addr,
+ if (check_tlv_length(__func__, label, ifname, src_addr,
sizeof(uint32_t), option_len)) {
return -1;
}
check_tlv_redefinition_uint32(
- __PRETTY_FUNCTION__, label, ifname, src_addr, *hello_options,
+ __func__, label, ifname, src_addr, *hello_options,
PIM_OPTION_MASK_DR_PRIORITY, PIM_TLV_GET_DR_PRIORITY(tlv_curr),
*hello_option_dr_priority);
{
const char *label = "generation_id";
- if (check_tlv_length(__PRETTY_FUNCTION__, label, ifname, src_addr,
+ if (check_tlv_length(__func__, label, ifname, src_addr,
sizeof(uint32_t), option_len)) {
return -1;
}
- check_tlv_redefinition_uint32_hex(__PRETTY_FUNCTION__, label, ifname,
- src_addr, *hello_options,
+ check_tlv_redefinition_uint32_hex(__func__, label, ifname, src_addr,
+ *hello_options,
PIM_OPTION_MASK_GENERATION_ID,
PIM_TLV_GET_GENERATION_ID(tlv_curr),
*hello_option_generation_id);
if (buf_size < ucast_encoding_min_len) {
zlog_warn(
"%s: unicast address encoding overflow: left=%d needed=%d",
- __PRETTY_FUNCTION__, buf_size, ucast_encoding_min_len);
+ __func__, buf_size, ucast_encoding_min_len);
return -1;
}
if (type) {
zlog_warn("%s: unknown unicast address encoding type=%d",
- __PRETTY_FUNCTION__, type);
+ __func__, type);
return -2;
}
if ((addr + sizeof(struct in_addr)) > pastend) {
zlog_warn(
"%s: IPv4 unicast address overflow: left=%zd needed=%zu",
- __PRETTY_FUNCTION__, pastend - addr,
+ __func__, pastend - addr,
sizeof(struct in_addr));
return -3;
}
if ((addr + sizeof(struct in6_addr)) > pastend) {
zlog_warn(
"%s: IPv6 unicast address overflow: left=%zd needed %zu",
- __PRETTY_FUNCTION__, pastend - addr,
+ __func__, pastend - addr,
sizeof(struct in6_addr));
return -3;
}
break;
default: {
zlog_warn("%s: unknown unicast address encoding family=%d from",
- __PRETTY_FUNCTION__, family);
+ __func__, family);
return -4;
}
}
if (buf_size < grp_encoding_min_len) {
zlog_warn(
"%s: group address encoding overflow: left=%d needed=%d",
- __PRETTY_FUNCTION__, buf_size, grp_encoding_min_len);
+ __func__, buf_size, grp_encoding_min_len);
return -1;
}
if (type) {
zlog_warn(
"%s: unknown group address encoding type=%d from",
- __PRETTY_FUNCTION__, type);
+ __func__, type);
return -2;
}
if ((addr + sizeof(struct in_addr)) > pastend) {
zlog_warn(
"%s: IPv4 group address overflow: left=%zd needed=%zu from",
- __PRETTY_FUNCTION__, pastend - addr,
+ __func__, pastend - addr,
sizeof(struct in_addr));
return -3;
}
default: {
zlog_warn(
"%s: unknown group address encoding family=%d mask_len=%d from",
- __PRETTY_FUNCTION__, family, mask_len);
+ __func__, family, mask_len);
return -4;
}
}
if (buf_size < src_encoding_min_len) {
zlog_warn(
"%s: source address encoding overflow: left=%d needed=%d",
- __PRETTY_FUNCTION__, buf_size, src_encoding_min_len);
+ __func__, buf_size, src_encoding_min_len);
return -1;
}
if (type) {
zlog_warn(
"%s: unknown source address encoding type=%d: %02x%02x%02x%02x",
- __PRETTY_FUNCTION__, type, buf[0], buf[1], buf[2],
- buf[3]);
+ __func__, type, buf[0], buf[1], buf[2], buf[3]);
return -2;
}
if ((addr + sizeof(struct in_addr)) > pastend) {
zlog_warn(
"%s: IPv4 source address overflow: left=%zd needed=%zu",
- __PRETTY_FUNCTION__, pastend - addr,
+ __func__, pastend - addr,
sizeof(struct in_addr));
return -3;
}
*/
if (mask_len != 32) {
zlog_warn("%s: IPv4 bad source address mask: %d",
- __PRETTY_FUNCTION__, mask_len);
+ __func__, mask_len);
return -4;
}
default: {
zlog_warn(
"%s: unknown source address encoding family=%d: %02x%02x%02x%02x",
- __PRETTY_FUNCTION__, family, buf[0], buf[1], buf[2],
- buf[3]);
+ __func__, family, buf[0], buf[1], buf[2], buf[3]);
return -5;
}
}
sizeof(src_str));
zlog_warn(
"%s: pim_parse_addr_ucast() failure: from %s on %s",
- __PRETTY_FUNCTION__, src_str, ifname);
+ __func__, src_str, ifname);
FREE_ADDR_LIST(*hello_option_addr_list);
return -1;
}
sizeof(src_str));
zlog_debug(
"%s: PIM hello TLV option: list_old_size=%d IPv4 address %s from %s on %s",
- __PRETTY_FUNCTION__,
+ __func__,
*hello_option_addr_list
? ((int)listcount(
- *hello_option_addr_list))
+ *hello_option_addr_list))
: -1,
addr_str, src_str, ifname);
} break;
sizeof(src_str));
zlog_debug(
"%s: PIM hello TLV option: list_old_size=%d UNKNOWN address family from %s on %s",
- __PRETTY_FUNCTION__,
+ __func__,
*hello_option_addr_list
? ((int)listcount(
- *hello_option_addr_list))
+ *hello_option_addr_list))
: -1,
src_str, ifname);
}
sizeof(src_str));
zlog_warn(
"%s: ignoring primary address in secondary list from %s on %s",
- __PRETTY_FUNCTION__, src_str, ifname);
+ __func__, src_str, ifname);
continue;
}
}
listnode_delete(up->sources, child);
if (PIM_UPSTREAM_FLAG_TEST_SRC_LHR(child->flags)) {
PIM_UPSTREAM_FLAG_UNSET_SRC_LHR(child->flags);
- child = pim_upstream_del(pim, child,
- __PRETTY_FUNCTION__);
+ child = pim_upstream_del(pim, child, __func__);
}
if (child) {
child->parent = NULL;
{
if (!up->rpf.source_nexthop.interface) {
if (PIM_DEBUG_PIM_TRACE)
- zlog_debug("%s: up %s RPF is not present",
- __PRETTY_FUNCTION__, up->sg_str);
+ zlog_debug("%s: up %s RPF is not present", __func__,
+ up->sg_str);
return;
}
char rpf_str[PREFIX_STRLEN];
pim_addr_dump("<rpf?>", &up->rpf.rpf_addr, rpf_str,
sizeof(rpf_str));
- zlog_debug("%s: RPF'%s=%s(%s) for Interface %s",
- __PRETTY_FUNCTION__, up->sg_str, rpf_str,
+ zlog_debug("%s: RPF'%s=%s(%s) for Interface %s", __func__,
+ up->sg_str, rpf_str,
pim_upstream_state2str(up->join_state),
up->rpf.source_nexthop.interface->name);
if (pim_rpf_addr_is_inaddr_any(&up->rpf)) {
zlog_debug("%s: can't send join upstream: RPF'%s=%s",
- __PRETTY_FUNCTION__, up->sg_str, rpf_str);
+ __func__, up->sg_str, rpf_str);
/* warning only */
}
}
if (!up->rpf.source_nexthop.interface) {
if (PIM_DEBUG_PIM_TRACE)
- zlog_debug("%s: up %s RPF is not present",
- __PRETTY_FUNCTION__, up->sg_str);
+ zlog_debug("%s: up %s RPF is not present", __func__,
+ up->sg_str);
return 0;
}
if (PIM_DEBUG_PIM_EVENTS) {
zlog_debug(
"%s: starting %d sec timer for upstream (S,G)=%s",
- __PRETTY_FUNCTION__, router->t_periodic,
- up->sg_str);
+ __func__, router->t_periodic, up->sg_str);
}
}
{
if (PIM_DEBUG_PIM_EVENTS) {
zlog_debug("%s: restarting %d msec timer for upstream (S,G)=%s",
- __PRETTY_FUNCTION__, interval_msec, up->sg_str);
+ __func__, interval_msec, up->sg_str);
}
THREAD_OFF(up->t_join_timer);
if (!up->rpf.source_nexthop.interface) {
if (PIM_DEBUG_PIM_TRACE)
- zlog_debug("%s: up %s RPF is not present",
- __PRETTY_FUNCTION__, up->sg_str);
+ zlog_debug("%s: up %s RPF is not present", __func__,
+ up->sg_str);
return;
}
pim_inet4_dump("<rpf?>", rpf_addr, rpf_str, sizeof(rpf_str));
zlog_debug(
"%s %s: detected Join%s to RPF'(S,G)=%s: join_timer=%ld msec t_joinsuppress=%ld msec",
- __FILE__, __PRETTY_FUNCTION__, up->sg_str, rpf_str,
+ __FILE__, __func__, up->sg_str, rpf_str,
join_timer_remain_msec, t_joinsuppress_msec);
}
if (PIM_DEBUG_PIM_TRACE) {
zlog_debug(
"%s %s: suppressing Join(S,G)=%s for %ld msec",
- __FILE__, __PRETTY_FUNCTION__, up->sg_str,
+ __FILE__, __func__, up->sg_str,
t_joinsuppress_msec);
}
if (!up->rpf.source_nexthop.interface) {
if (PIM_DEBUG_PIM_TRACE)
- zlog_debug("%s: up %s RPF is not present",
- __PRETTY_FUNCTION__, up->sg_str);
+ zlog_debug("%s: up %s RPF is not present", __func__,
+ up->sg_str);
return;
}
pim_ifp = up->rpf.source_nexthop.interface->info;
else {
if (PIM_DEBUG_PIM_TRACE)
- zlog_debug("%s: up %s RPF is not present",
- __PRETTY_FUNCTION__, up->sg_str);
+ zlog_debug("%s: up %s RPF is not present", __func__,
+ up->sg_str);
}
if (pim_ifp && PIM_I_am_DR(pim_ifp)
if (up->upstream_addr.s_addr == INADDR_ANY) {
if (PIM_DEBUG_PIM_EVENTS)
- zlog_debug("%s: RPF not configured for %s",
- __PRETTY_FUNCTION__, up->sg_str);
+ zlog_debug("%s: RPF not configured for %s", __func__,
+ up->sg_str);
return;
}
if (!up->rpf.source_nexthop.interface) {
if (PIM_DEBUG_PIM_EVENTS)
- zlog_debug("%s: RP not reachable for %s",
- __PRETTY_FUNCTION__, up->sg_str);
+ zlog_debug("%s: RP not reachable for %s", __func__,
+ up->sg_str);
return;
}
if (PIM_DEBUG_PIM_EVENTS) {
zlog_debug("%s: PIM_UPSTREAM_%s: (S,G) old: %s new: %s",
- __PRETTY_FUNCTION__, up->sg_str,
+ __func__, up->sg_str,
pim_upstream_state2str(up->join_state),
pim_upstream_state2str(new_state));
}
sg->grp)) {
if (PIM_DEBUG_PIM_TRACE)
zlog_debug("%s: Received a (*,G) with no RP configured",
- __PRETTY_FUNCTION__);
+ __func__);
}
up->parent = pim_upstream_find_parent(pim, up);
up->join_state = PIM_UPSTREAM_NOTJOINED;
up->reg_state = PIM_REG_NOINFO;
up->state_transition = pim_time_monotonic_sec();
- up->channel_oil =
- pim_channel_oil_add(pim, &up->sg, __PRETTY_FUNCTION__);
+ up->channel_oil = pim_channel_oil_add(pim, &up->sg, __func__);
up->sptbit = PIM_UPSTREAM_SPTBIT_FALSE;
up->rpf.source_nexthop.interface = NULL;
if (PIM_DEBUG_PIM_TRACE)
zlog_debug(
"%s: Attempting to create upstream(%s), Unable to RPF for source",
- __PRETTY_FUNCTION__, up->sg_str);
+ __func__, up->sg_str);
}
if (up->rpf.source_nexthop.interface) {
if (PIM_DEBUG_PIM_TRACE) {
zlog_debug(
"%s: Created Upstream %s upstream_addr %s ref count %d increment",
- __PRETTY_FUNCTION__, up->sg_str,
- inet_ntoa(up->upstream_addr), up->ref_count);
+ __func__, up->sg_str, inet_ntoa(up->upstream_addr),
+ up->ref_count);
}
return up;
++up->ref_count;
if (PIM_DEBUG_PIM_TRACE)
zlog_debug("%s(%s): upstream %s ref count %d increment",
- __PRETTY_FUNCTION__, name, up->sg_str,
- up->ref_count);
+ __func__, name, up->sg_str, up->ref_count);
}
struct pim_upstream *pim_upstream_add(struct pim_instance *pim,
char buf[PREFIX2STR_BUFFER];
prefix2str(&up->rpf.rpf_addr, buf, sizeof(buf));
zlog_debug("%s(%s): %s, iif %s (%s) found: %d: ref_count: %d",
- __PRETTY_FUNCTION__, name,
+ __func__, name,
up->sg_str, buf, up->rpf.source_nexthop.interface ?
up->rpf.source_nexthop.interface->name : "Unknown" ,
found, up->ref_count);
} else
- zlog_debug("%s(%s): (%s) failure to create",
- __PRETTY_FUNCTION__, name,
- pim_str_sg_dump(sg));
+ zlog_debug("%s(%s): (%s) failure to create", __func__,
+ name, pim_str_sg_dump(sg));
}
return up;
sizeof(rpf_addr_str));
zlog_debug(
"%s: matching neigh=%s against upstream (S,G)=%s[%s] joined=%d rpf_addr=%s",
- __PRETTY_FUNCTION__, neigh_str, up->sg_str,
- pim->vrf->name,
+ __func__, neigh_str, up->sg_str, pim->vrf->name,
up->join_state == PIM_UPSTREAM_JOINED,
rpf_addr_str);
}
PIM_UPSTREAM_FLAG_UNSET_SRC_STREAM(up->flags);
/* Return if upstream entry got deleted.*/
- if (!pim_upstream_del(pim, up, __PRETTY_FUNCTION__))
+ if (!pim_upstream_del(pim, up, __func__))
return NULL;
}
if (PIM_UPSTREAM_FLAG_TEST_SRC_NOCACHE(up->flags)) {
PIM_UPSTREAM_FLAG_UNSET_SRC_NOCACHE(up->flags);
- if (!pim_upstream_del(pim, up, __PRETTY_FUNCTION__))
+ if (!pim_upstream_del(pim, up, __func__))
return NULL;
}
struct pim_upstream *parent = up->parent;
PIM_UPSTREAM_FLAG_UNSET_SRC_LHR(up->flags);
- up = pim_upstream_del(pim, up, __PRETTY_FUNCTION__);
+ up = pim_upstream_del(pim, up, __func__);
if (parent) {
pim_jp_agg_single_upstream_send(&parent->rpf, parent,
if (PIM_DEBUG_PIM_TRACE)
zlog_debug(
"%s: Incoming Interface: %s is different than RPF_interface(S) %s",
- __PRETTY_FUNCTION__, incoming->name,
+ __func__, incoming->name,
up->rpf.source_nexthop.interface->name);
return;
}
// AND JoinDesired(S,G) == true
if (!pim_upstream_evaluate_join_desired(up->channel_oil->pim, up)) {
if (PIM_DEBUG_PIM_TRACE)
- zlog_debug("%s: %s Join is not Desired",
- __PRETTY_FUNCTION__, up->sg_str);
+ zlog_debug("%s: %s Join is not Desired", __func__,
+ up->sg_str);
return;
}
up->sg.src)) {
if (PIM_DEBUG_PIM_TRACE)
zlog_debug("%s: %s is directly connected to the source",
- __PRETTY_FUNCTION__, up->sg_str);
+ __func__, up->sg_str);
up->sptbit = PIM_UPSTREAM_SPTBIT_TRUE;
return;
}
if (PIM_DEBUG_PIM_TRACE)
zlog_debug(
"%s: %s RPF_interface(S) != RPF_interface(RP(G))",
- __PRETTY_FUNCTION__, up->sg_str);
+ __func__, up->sg_str);
up->sptbit = PIM_UPSTREAM_SPTBIT_TRUE;
pim_jp_agg_single_upstream_send(&starup->rpf, starup, true);
&& pim_upstream_empty_inherited_olist(up)) {
if (PIM_DEBUG_PIM_TRACE)
zlog_debug("%s: %s OR inherited_olist(S,G,rpt) == NULL",
- __PRETTY_FUNCTION__, up->sg_str);
+ __func__, up->sg_str);
up->sptbit = PIM_UPSTREAM_SPTBIT_TRUE;
return;
}
if (up->parent && pim_rpf_is_same(&up->rpf, &up->parent->rpf)) {
if (PIM_DEBUG_PIM_TRACE)
zlog_debug("%s: %s RPF'(S,G) is the same as RPF'(*,G)",
- __PRETTY_FUNCTION__, up->sg_str);
+ __func__, up->sg_str);
up->sptbit = PIM_UPSTREAM_SPTBIT_TRUE;
return;
}
if (PIM_DEBUG_PIM_TRACE) {
char state_str[PIM_REG_STATE_STR_LEN];
zlog_debug("%s: (S,G)=%s[%s] upstream register stop timer %s",
- __PRETTY_FUNCTION__, up->sg_str, pim->vrf->name,
- pim_reg_state2str(up->reg_state, state_str, sizeof(state_str)));
+ __func__, up->sg_str, pim->vrf->name,
+ pim_reg_state2str(up->reg_state, state_str,
+ sizeof(state_str)));
}
switch (up->reg_state) {
if (!up->rpf.source_nexthop.interface) {
if (PIM_DEBUG_PIM_TRACE)
zlog_debug("%s: up %s RPF is not present",
- __PRETTY_FUNCTION__, up->sg_str);
+ __func__, up->sg_str);
return 0;
}
if (PIM_DEBUG_PIM_TRACE)
zlog_debug(
"%s: Interface: %s is not configured for pim",
- __PRETTY_FUNCTION__,
+ __func__,
up->rpf.source_nexthop.interface->name);
return 0;
}
if (PIM_DEBUG_PIM_TRACE)
zlog_debug(
"%s: Stop sending the register, because I am the RP and we haven't seen a packet in a while",
- __PRETTY_FUNCTION__);
+ __func__);
return 0;
}
pim_null_register_send(up);
if (PIM_DEBUG_PIM_TRACE) {
zlog_debug(
"%s: (S,G)=%s Starting upstream register stop timer %d",
- __PRETTY_FUNCTION__, up->sg_str, time);
+ __func__, up->sg_str, time);
}
thread_add_timer(router->master, pim_upstream_register_stop_timer, up,
time, &up->t_rs_timer);
if (!up->rpf.source_nexthop.interface)
if (PIM_DEBUG_PIM_TRACE)
- zlog_debug("%s: up %s RPF is not present",
- __PRETTY_FUNCTION__, up->sg_str);
+ zlog_debug("%s: up %s RPF is not present", __func__,
+ up->sg_str);
FOR_ALL_INTERFACES (pim->vrf, ifp) {
if (!ifp->info)
if (up->upstream_addr.s_addr == INADDR_ANY) {
if (PIM_DEBUG_PIM_TRACE)
zlog_debug(
- "%s: RP not configured for Upstream %s",
- __PRETTY_FUNCTION__, up->sg_str);
+ "%s: RP not configured for Upstream %s",
+ __func__, up->sg_str);
continue;
}
if (PIM_DEBUG_PIM_TRACE)
zlog_debug(
"%s: Upstream %s without a path to send join, checking",
- __PRETTY_FUNCTION__, up->sg_str);
+ __func__, up->sg_str);
old.source_nexthop.interface =
up->rpf.source_nexthop.interface;
rpf_result = pim_rpf_update(pim, up, &old, __func__);
struct pim_upstream *up;
while ((up = rb_pim_upstream_first(&pim->upstream_head))) {
- pim_upstream_del(pim, up, __PRETTY_FUNCTION__);
+ pim_upstream_del(pim, up, __func__);
}
rb_pim_upstream_fini(&pim->upstream_head);
if (!up->channel_oil->installed) {
if (PIM_DEBUG_PIM_TRACE)
zlog_debug("%s: %s%s is not installed in mroute",
- __PRETTY_FUNCTION__, up->sg_str,
- pim->vrf->name);
+ __func__, up->sg_str, pim->vrf->name);
return;
}
if (PIM_DEBUG_PIM_TRACE)
zlog_debug(
"%s: Handling unscanned inherited_olist for %s[%s]",
- __PRETTY_FUNCTION__, up->sg_str,
- pim->vrf->name);
+ __func__, up->sg_str, pim->vrf->name);
pim_upstream_inherited_olist_decide(pim, up);
up->channel_oil->oil_inherited_rescan = 0;
}
if (PIM_DEBUG_PIM_TRACE) {
zlog_debug(
"%s[%s]: %s old packet count is equal or lastused is greater than 30, (%ld,%ld,%lld)",
- __PRETTY_FUNCTION__, up->sg_str, pim->vrf->name,
+ __func__, up->sg_str, pim->vrf->name,
up->channel_oil->cc.oldpktcnt,
up->channel_oil->cc.pktcnt,
up->channel_oil->cc.lastused / 100);
"source reference created on kat restart %s[%s]",
up->sg_str, pim->vrf->name);
- pim_upstream_ref(up,
- PIM_UPSTREAM_FLAG_MASK_SRC_STREAM,
- __PRETTY_FUNCTION__);
+ pim_upstream_ref(up, PIM_UPSTREAM_FLAG_MASK_SRC_STREAM,
+ __func__);
PIM_UPSTREAM_FLAG_SET_SRC_STREAM(up->flags);
pim_upstream_fhr_kat_start(up);
}
* origination mroutes active sources but just in
* case
*/
- up = pim_upstream_del(vxlan_sg->pim, up,
- __PRETTY_FUNCTION__);
+ up = pim_upstream_del(vxlan_sg->pim, up, __func__);
}
/* if there are other references register the source
* for nht
}
/* We are acting FHR; clear out use_rpt setting if any */
pim_upstream_update_use_rpt(up, false /*update_mroute*/);
- pim_upstream_ref(up, flags, __PRETTY_FUNCTION__);
+ pim_upstream_ref(up, flags, __func__);
vxlan_sg->up = up;
pim_vxlan_orig_mr_up_iif_update(vxlan_sg);
/* mute pimreg on origination mroutes */
pim->regiface->info);
} else {
up = pim_upstream_add(vxlan_sg->pim, &vxlan_sg->sg,
- vxlan_sg->iif, flags,
- __PRETTY_FUNCTION__, NULL);
+ vxlan_sg->iif, flags, __func__, NULL);
vxlan_sg->up = up;
}
/* enable MLAG designated-forwarder election on termination mroutes */
PIM_UPSTREAM_FLAG_SET_MLAG_VXLAN(flags);
- up = pim_upstream_add(vxlan_sg->pim, &vxlan_sg->sg,
- NULL /* iif */, flags,
- __PRETTY_FUNCTION__, NULL);
+ up = pim_upstream_add(vxlan_sg->pim, &vxlan_sg->sg, NULL /* iif */,
+ flags, __func__, NULL);
vxlan_sg->up = up;
if (!up) {
up->flags &= ~(PIM_UPSTREAM_FLAG_MASK_SRC_VXLAN_TERM |
PIM_UPSTREAM_FLAG_MASK_MLAG_VXLAN);
pim_mlag_up_local_del(vxlan_sg->pim, up);
- pim_upstream_del(vxlan_sg->pim, up,
- __PRETTY_FUNCTION__);
+ pim_upstream_del(vxlan_sg->pim, up, __func__);
}
}
old_iif = pim->vxlan.default_iif;
if (PIM_DEBUG_VXLAN)
zlog_debug("%s: vxlan default iif changed from %s to %s",
- __PRETTY_FUNCTION__,
- old_iif ? old_iif->name : "-",
- ifp ? ifp->name : "-");
+ __func__, old_iif ? old_iif->name : "-",
+ ifp ? ifp->name : "-");
old_iif = pim_vxlan_orig_mr_iif_get(pim);
pim->vxlan.default_iif = ifp;
return;
if (PIM_DEBUG_VXLAN)
- zlog_debug("%s: vxlan orig iif changed from %s to %s",
- __PRETTY_FUNCTION__, old_iif ? old_iif->name : "-",
- ifp ? ifp->name : "-");
+ zlog_debug("%s: vxlan orig iif changed from %s to %s", __func__,
+ old_iif ? old_iif->name : "-",
+ ifp ? ifp->name : "-");
/* add/del upstream entries for the existing vxlan SG when the
* interface becomes available
old_iif = pim->vxlan.peerlink_rif;
if (PIM_DEBUG_VXLAN)
zlog_debug("%s: vxlan peerlink_rif changed from %s to %s",
- __PRETTY_FUNCTION__, old_iif ? old_iif->name : "-",
- ifp ? ifp->name : "-");
+ __func__, old_iif ? old_iif->name : "-",
+ ifp ? ifp->name : "-");
old_iif = pim_vxlan_orig_mr_iif_get(pim);
old_oif = pim_vxlan_orig_mr_oif_get(pim);
if (old_iif != new_iif) {
if (PIM_DEBUG_VXLAN)
zlog_debug("%s: vxlan orig iif changed from %s to %s",
- __PRETTY_FUNCTION__,
- old_iif ? old_iif->name : "-",
- new_iif ? new_iif->name : "-");
+ __func__, old_iif ? old_iif->name : "-",
+ new_iif ? new_iif->name : "-");
/* add/del upstream entries for the existing vxlan SG when the
* interface becomes available
if (old_oif != new_oif) {
if (PIM_DEBUG_VXLAN)
zlog_debug("%s: vxlan orig oif changed from %s to %s",
- __PRETTY_FUNCTION__,
- old_oif ? old_oif->name : "-",
- new_oif ? new_oif->name : "-");
+ __func__, old_oif ? old_oif->name : "-",
+ new_oif ? new_oif->name : "-");
if (pim->vxlan.sg_hash)
hash_iterate(pim->vxlan.sg_hash,
pim_vxlan_sg_peerlink_oif_update,
return 0;
if (PIM_DEBUG_ZEBRA)
- zlog_debug("%s: %s updating from %u to %u",
- __PRETTY_FUNCTION__,
- ifp->name, vrf_id, new_vrf_id);
+ zlog_debug("%s: %s updating from %u to %u", __func__, ifp->name,
+ vrf_id, new_vrf_id);
if_update_to_new_vrf(ifp, new_vrf_id);
char buf[BUFSIZ];
prefix2str(p, buf, BUFSIZ);
zlog_debug("%s: %s(%u) connected IP address %s flags %u %s",
- __PRETTY_FUNCTION__, c->ifp->name, vrf_id, buf,
- c->flags,
+ __func__, c->ifp->name, vrf_id, buf, c->flags,
CHECK_FLAG(c->flags, ZEBRA_IFA_SECONDARY)
? "secondary"
: "primary");
zlog_warn(
"%s: %s : forcing secondary flag on %s",
- __PRETTY_FUNCTION__, c->ifp->name, buf);
+ __func__, c->ifp->name, buf);
}
SET_FLAG(c->flags, ZEBRA_IFA_SECONDARY);
}
prefix2str(p, buf, BUFSIZ);
zlog_debug(
"%s: %s(%u) disconnected IP address %s flags %u %s",
- __PRETTY_FUNCTION__, c->ifp->name, vrf_id, buf,
- c->flags,
+ __func__, c->ifp->name, vrf_id, buf, c->flags,
CHECK_FLAG(c->flags, ZEBRA_IFA_SECONDARY)
? "secondary"
: "primary");
*/
if (!up->channel_oil->installed)
pim_upstream_mroute_add(up->channel_oil,
- __PRETTY_FUNCTION__);
+ __func__);
/*
* RFC 4601: 4.5.7. Sending (S,G)
pim_jp_agg_switch_interface(old, &up->rpf, up);
if (!up->channel_oil->installed)
- pim_upstream_mroute_add(up->channel_oil,
- __PRETTY_FUNCTION__);
+ pim_upstream_mroute_add(up->channel_oil, __func__);
}
/* FIXME can join_desired actually be changed by pim_rpf_update()
/* Start refresh timer */
if (PIM_DEBUG_ZEBRA) {
- zlog_debug("%s: triggering %ld msec timer", __PRETTY_FUNCTION__,
+ zlog_debug("%s: triggering %ld msec timer", __func__,
router->rpf_cache_refresh_delay_msec);
}
zclient_init(zclient, ZEBRA_ROUTE_PIM, 0, &pimd_privs);
if (PIM_DEBUG_PIM_TRACE) {
- zlog_notice("%s: zclient socket initialized",
- __PRETTY_FUNCTION__);
+ zlog_notice("%s: zclient socket initialized", __func__);
}
zclient_lookup_new();
source = source_new(group, src_addr);
if (!source) {
- zlog_warn("%s: Failure to create * source",
- __PRETTY_FUNCTION__);
+ zlog_warn("%s: Failure to create * source", __func__);
return;
}
if (PIM_DEBUG_IGMP_TRACE) {
zlog_debug(
- "%s: (S,G)=%s igmp_sock=%d oif=%s fwd=%d",
- __PRETTY_FUNCTION__, pim_str_sg_dump(&sg),
+ "%s: (S,G)=%s igmp_sock=%d oif=%s fwd=%d", __func__,
+ pim_str_sg_dump(&sg),
source->source_group->group_igmp_sock->fd,
source->source_group->group_igmp_sock->interface->name,
IGMP_SOURCE_TEST_FORWARDING(source->source_flags));
pim_oif = group->group_igmp_sock->interface->info;
if (!pim_oif) {
if (PIM_DEBUG_IGMP_TRACE) {
- zlog_debug(
- "%s: multicast not enabled on oif=%s ?",
- __PRETTY_FUNCTION__,
+ zlog_debug("%s: multicast not enabled on oif=%s ?",
+ __func__,
source->source_group->group_igmp_sock
- ->interface->name);
+ ->interface->name);
}
return;
}
if (!pim_rp_set_upstream_addr(pim, &vif_source,
source->source_addr, sg.grp)) {
/*Create a dummy channel oil */
- source->source_channel_oil = pim_channel_oil_add(
- pim, &sg, __PRETTY_FUNCTION__);
+ source->source_channel_oil =
+ pim_channel_oil_add(pim, &sg, __func__);
}
else {
pim_inet4_dump("<source?>", vif_source, buf2,
sizeof(buf2));
- zlog_debug("%s: NHT %s vif_source %s vif_index:%d ",
- __PRETTY_FUNCTION__,
- pim_str_sg_dump(&sg),
- buf2, input_iface_vif_index);
+ zlog_debug(
+ "%s: NHT %s vif_source %s vif_index:%d ",
+ __func__, pim_str_sg_dump(&sg), buf2,
+ input_iface_vif_index);
}
if (input_iface_vif_index < 1) {
source->source_addr,
source_str, sizeof(source_str));
zlog_debug(
- "%s %s: could not find input interface for source %s",
- __FILE__, __PRETTY_FUNCTION__,
- source_str);
+ "%s %s: could not find input interface for source %s",
+ __FILE__, __func__, source_str);
}
source->source_channel_oil =
- pim_channel_oil_add(
- pim, &sg,
- __PRETTY_FUNCTION__);
+ pim_channel_oil_add(pim, &sg, __func__);
}
else {
*/
if (PIM_DEBUG_IGMP_TRACE) {
zlog_debug(
- "%s: ignoring request for looped MFC entry (S,G)=%s: igmp_sock=%d oif=%s vif_index=%d",
- __PRETTY_FUNCTION__,
- pim_str_sg_dump(&sg),
- source->source_group
- ->group_igmp_sock->fd,
- source->source_group
- ->group_igmp_sock
- ->interface->name,
- input_iface_vif_index);
+ "%s: ignoring request for looped MFC entry (S,G)=%s: igmp_sock=%d oif=%s vif_index=%d",
+ __func__,
+ pim_str_sg_dump(&sg),
+ source->source_group
+ ->group_igmp_sock
+ ->fd,
+ source->source_group
+ ->group_igmp_sock
+ ->interface->name,
+ input_iface_vif_index);
}
return;
}
source->source_channel_oil =
- pim_channel_oil_add(
- pim, &sg,
- __PRETTY_FUNCTION__);
+ pim_channel_oil_add(pim, &sg, __func__);
if (!source->source_channel_oil) {
if (PIM_DEBUG_IGMP_TRACE) {
zlog_debug(
- "%s %s: could not create OIL for channel (S,G)=%s",
- __FILE__,
- __PRETTY_FUNCTION__,
- pim_str_sg_dump(&sg));
+ "%s %s: could not create OIL for channel (S,G)=%s",
+ __FILE__, __func__,
+ pim_str_sg_dump(&sg));
}
return;
}
}
} else {
if (PIM_DEBUG_IGMP_TRACE)
- zlog_debug("%s: %s was received on %s interface but we are not DR for that interface",
- __PRETTY_FUNCTION__,
- pim_str_sg_dump(&sg),
- group->group_igmp_sock->interface->name);
+ zlog_debug(
+ "%s: %s was received on %s interface but we are not DR for that interface",
+ __func__, pim_str_sg_dump(&sg),
+ group->group_igmp_sock->interface->name);
return;
}
false /*is_vxlan*/)) {
if (PIM_DEBUG_MROUTE)
zlog_warn("%s: Failure to add local membership for %s",
- __PRETTY_FUNCTION__, pim_str_sg_dump(&sg));
+ __func__, pim_str_sg_dump(&sg));
pim_channel_del_oif(source->source_channel_oil,
group->group_igmp_sock->interface,
if (PIM_DEBUG_IGMP_TRACE) {
zlog_debug(
- "%s: (S,G)=%s igmp_sock=%d oif=%s fwd=%d",
- __PRETTY_FUNCTION__, pim_str_sg_dump(&sg),
+ "%s: (S,G)=%s igmp_sock=%d oif=%s fwd=%d", __func__,
+ pim_str_sg_dump(&sg),
source->source_group->group_igmp_sock->fd,
source->source_group->group_igmp_sock->interface->name,
IGMP_SOURCE_TEST_FORWARDING(source->source_flags));
sizeof(group_str));
pim_inet4_dump("<upstream?>", up->upstream_addr, upstream_str,
sizeof(upstream_str));
- zlog_debug("%s: (S,G)=(%s,%s) oif=%s (%s)", __PRETTY_FUNCTION__,
+ zlog_debug("%s: (S,G)=(%s,%s) oif=%s (%s)", __func__,
source_str, group_str, ch->interface->name,
inet_ntoa(up->upstream_addr));
}
if (PIM_DEBUG_PIM_TRACE) {
zlog_debug("%s: (S,G)=%s oif=%s install_it: %d installed: %d",
- __PRETTY_FUNCTION__, ch->sg_str, ch->interface->name,
+ __func__, ch->sg_str, ch->interface->name,
install_it, up->channel_oil->installed);
}
PIM_OIF_FLAG_PROTO_PIM, __func__);
if (install_it && !up->channel_oil->installed)
- pim_upstream_mroute_add(up->channel_oil, __PRETTY_FUNCTION__);
+ pim_upstream_mroute_add(up->channel_oil, __func__);
}
void pim_zebra_zclient_update(struct vty *vty)
if (zclient_socket_connect(zlookup) < 0) {
++zlookup->fail;
zlog_warn("%s: failure connecting zclient socket: failures=%d",
- __PRETTY_FUNCTION__, zlookup->fail);
+ __func__, zlookup->fail);
} else {
zlookup->fail = 0; /* reset counter on connection */
}
&zlookup->t_connect);
zlog_notice("%s: zclient lookup connection scheduled for %d seconds",
- __PRETTY_FUNCTION__, delay);
+ __func__, delay);
}
/* Schedule connection for now. */
&zlookup->t_connect);
zlog_notice("%s: zclient lookup immediate connection scheduled",
- __PRETTY_FUNCTION__);
+ __func__);
}
/* Schedule reconnection, if needed. */
zlookup = zclient_new(router->master, &zclient_options_default);
if (!zlookup) {
flog_err(EC_LIB_ZAPI_SOCKET, "%s: zclient_new() failure",
- __PRETTY_FUNCTION__);
+ __func__);
return;
}
zclient_lookup_sched_now(zlookup);
- zlog_notice("%s: zclient lookup socket initialized",
- __PRETTY_FUNCTION__);
+ zlog_notice("%s: zclient lookup socket initialized", __func__);
}
static int zclient_read_nexthop(struct pim_instance *pim,
if (PIM_DEBUG_PIM_NHT_DETAIL) {
char addr_str[INET_ADDRSTRLEN];
pim_inet4_dump("<addr?>", addr, addr_str, sizeof(addr_str));
- zlog_debug("%s: addr=%s(%s)", __PRETTY_FUNCTION__, addr_str,
+ zlog_debug("%s: addr=%s(%s)", __func__, addr_str,
pim->vrf->name);
}
&version, &vrf_id, &command);
if (err < 0) {
flog_err(EC_LIB_ZAPI_MISSMATCH,
- "%s: zclient_read_header() failed",
- __PRETTY_FUNCTION__);
+ "%s: zclient_read_header() failed", __func__);
zclient_lookup_failed(zlookup);
return -1;
}
pim_inet4_dump("<addr?>", addr, addr_str, sizeof(addr_str));
pim_inet4_dump("<raddr?>", raddr, raddr_str, sizeof(raddr_str));
zlog_warn("%s: address mismatch: addr=%s(%s) raddr=%s",
- __PRETTY_FUNCTION__, addr_str, pim->vrf->name,
- raddr_str);
+ __func__, addr_str, pim->vrf->name, raddr_str);
/* warning only */
}
sizeof(addr_str));
zlog_warn(
"%s: found too many nexthop ifindexes (%d > %d) for address %s(%s)",
- __PRETTY_FUNCTION__, (num_ifindex + 1),
- tab_size, addr_str, pim->vrf->name);
+ __func__, (num_ifindex + 1), tab_size, addr_str,
+ pim->vrf->name);
return num_ifindex;
}
nexthop_tab[num_ifindex].protocol_distance = distance;
sizeof(addr_str));
zlog_warn(
"%s: found non-ifindex nexthop type=%d for address %s(%s)",
- __PRETTY_FUNCTION__, nexthop_type,
- addr_str, pim->vrf->name);
+ __func__, nexthop_type, addr_str,
+ pim->vrf->name);
}
break;
}
if (PIM_DEBUG_PIM_NHT_DETAIL) {
char addr_str[INET_ADDRSTRLEN];
pim_inet4_dump("<addr?>", addr, addr_str, sizeof(addr_str));
- zlog_debug("%s: addr=%s(%s)", __PRETTY_FUNCTION__, addr_str,
+ zlog_debug("%s: addr=%s(%s)", __func__, addr_str,
pim->vrf->name);
}
if (zlookup->sock < 0) {
flog_err(EC_LIB_ZAPI_SOCKET,
"%s: zclient lookup socket is not connected",
- __PRETTY_FUNCTION__);
+ __func__);
zclient_lookup_failed(zlookup);
return -1;
}
if (pim->vrf->vrf_id == VRF_UNKNOWN) {
zlog_notice(
"%s: VRF: %s does not fully exist yet, delaying lookup",
- __PRETTY_FUNCTION__, pim->vrf->name);
+ __func__, pim->vrf->name);
return -1;
}
flog_err(
EC_LIB_SOCKET,
"%s: writen() failure: %d writing to zclient lookup socket",
- __PRETTY_FUNCTION__, errno);
+ __func__, errno);
zclient_lookup_failed(zlookup);
return -2;
}
if (ret == 0) {
flog_err_sys(EC_LIB_SOCKET,
"%s: connection closed on zclient lookup socket",
- __PRETTY_FUNCTION__);
+ __func__);
zclient_lookup_failed(zlookup);
return -3;
}
sizeof(addr_str));
zlog_debug(
"%s: lookup=%d/%d: could not find nexthop ifindex for address %s(%s)",
- __PRETTY_FUNCTION__, lookup, max_lookup,
- addr_str, pim->vrf->name);
+ __func__, lookup, max_lookup, addr_str,
+ pim->vrf->name);
}
return -1;
}
sizeof(addr_str));
zlog_debug(
"%s: lookup=%d/%d: found non-recursive ifindex=%d for address %s(%s) dist=%d met=%d",
- __PRETTY_FUNCTION__, lookup,
- max_lookup, first_ifindex,
- addr_str, pim->vrf->name,
+ __func__, lookup, max_lookup,
+ first_ifindex, addr_str,
+ pim->vrf->name,
nexthop_tab[0]
.protocol_distance,
nexthop_tab[0].route_metric);
sizeof(nexthop_str));
zlog_debug(
"%s: lookup=%d/%d: zebra returned recursive nexthop %s for address %s(%s) dist=%d met=%d",
- __PRETTY_FUNCTION__, lookup, max_lookup,
- nexthop_str, addr_str, pim->vrf->name,
+ __func__, lookup, max_lookup, nexthop_str,
+ addr_str, pim->vrf->name,
nexthop_tab[0].protocol_distance,
nexthop_tab[0].route_metric);
}
pim_inet4_dump("<addr?>", addr, addr_str, sizeof(addr_str));
zlog_warn(
"%s: lookup=%d/%d: failure searching recursive nexthop ifindex for address %s(%s)",
- __PRETTY_FUNCTION__, lookup, max_lookup, addr_str,
- pim->vrf->name);
+ __func__, lookup, max_lookup, addr_str, pim->vrf->name);
}
return -2;
flog_err(
EC_LIB_SOCKET,
"%s: writen() failure: %d writing to zclient lookup socket",
- __PRETTY_FUNCTION__, errno);
+ __func__, errno);
return -1;
}
&version, &vrf_id, &command);
if (err < 0) {
flog_err(EC_LIB_ZAPI_MISSMATCH,
- "%s: zclient_read_header() failed",
- __PRETTY_FUNCTION__);
+ "%s: zclient_read_header() failed", __func__);
zclient_lookup_failed(zlookup);
return -1;
}
flog_err(
EC_LIB_ZAPI_MISSMATCH,
"%s: Received wrong %s(%s) information requested",
- __PRETTY_FUNCTION__, pim_str_sg_dump(&more),
+ __func__, pim_str_sg_dump(&more),
c_oil->pim->vrf->name);
}
zclient_lookup_failed(zlookup);
flog_err(
EC_LIB_SOCKET,
"%s %s: could not solve %s to group address: errno=%d: %s",
- __FILE__, __PRETTY_FUNCTION__, PIM_ALL_PIM_ROUTERS,
- errno, safe_strerror(errno));
+ __FILE__, __func__, PIM_ALL_PIM_ROUTERS, errno,
+ safe_strerror(errno));
zassert(0);
return;
}
if (metric > RIP_METRIC_INFINITY) {
zlog_info(
"%s: Metric specified: %ld is greater than RIP_METRIC_INFINITY, using INFINITY instead",
- __PRETTY_FUNCTION__, metric);
+ __func__, metric);
mod->metric = RIP_METRIC_INFINITY;
} else
mod->metric = metric;
return mod;
if (metric > RIPNG_METRIC_INFINITY) {
- zlog_info("%s: Metric specified: %ld is being converted into METRIC_INFINITY",
- __PRETTY_FUNCTION__,
- metric);
+ zlog_info(
+ "%s: Metric specified: %ld is being converted into METRIC_INFINITY",
+ __func__, metric);
mod->metric = RIPNG_METRIC_INFINITY;
} else
mod->metric = metric;
}
if (zclient_send_rnh(zclient, command, p, connected, vrf_id) < 0)
- zlog_warn("%s: Failure to send nexthop to zebra",
- __PRETTY_FUNCTION__);
+ zlog_warn("%s: Failure to send nexthop to zebra", __func__);
}
static int sharp_debug_nexthops(struct zapi_route *api)
struct zapi_route nhr;
if (!zapi_nexthop_update_decode(zclient->ibuf, &nhr)) {
- zlog_warn("%s: Decode of update failed", __PRETTY_FUNCTION__);
+ zlog_warn("%s: Decode of update failed", __func__);
return 0;
}
struct zapi_route api;
if (zapi_route_decode(zclient->ibuf, &api) < 0)
- zlog_warn("%s: Decode of redistribute failed: %d",
- __PRETTY_FUNCTION__,
+ zlog_warn("%s: Decode of redistribute failed: %d", __func__,
ZEBRA_REDISTRIBUTE_ROUTE_ADD);
zlog_debug("%s: %pFX (%s)", zserv_command_string(cmd),
if (vty)
vty_out(vty, "%% Malformed address\n");
else
- zlog_warn("%s: Malformed address: %s",
- __PRETTY_FUNCTION__, dest_str);
+ zlog_warn("%s: Malformed address: %s", __func__,
+ dest_str);
return CMD_WARNING_CONFIG_FAILED;
}
vty_out(vty, "%% Malformed address\n");
else
zlog_warn("%s: Malformed address: %s",
- __PRETTY_FUNCTION__,
- mask_str);
+ __func__, mask_str);
return CMD_WARNING_CONFIG_FAILED;
}
p.prefixlen = ip_masklen(mask);
else
zlog_warn(
"%s: Malformed source address: %s",
- __PRETTY_FUNCTION__, src_str);
+ __func__, src_str);
return CMD_WARNING_CONFIG_FAILED;
}
src_p = (struct prefix_ipv6 *)&src;
"%% Table %s overlaps vrf table %u\n",
table_str, svrf->vrf->data.l.table_id);
else
- zlog_warn(
- "%s: Table %s overlaps vrf table %u",
- __PRETTY_FUNCTION__,
- table_str, svrf->vrf->data.l.table_id);
+ zlog_warn("%s: Table %s overlaps vrf table %u",
+ __func__, table_str,
+ svrf->vrf->data.l.table_id);
return CMD_WARNING_CONFIG_FAILED;
}
}
else
zlog_warn(
"%s: MPLS not turned on in kernel ignoring static route to %s",
- __PRETTY_FUNCTION__, dest_str);
+ __func__, dest_str);
return CMD_WARNING_CONFIG_FAILED;
}
int rc = mpls_str2label(label_str, &snh_label.num_labels,
else
zlog_warn(
"%s: Malformed labels specified for route %s",
- __PRETTY_FUNCTION__, dest_str);
+ __func__, dest_str);
break;
case -2:
if (vty)
else
zlog_warn(
"%s: Cannot use reserved labels (%d-%d) for %s",
- __PRETTY_FUNCTION__,
+ __func__,
MPLS_LABEL_RESERVED_MIN,
MPLS_LABEL_RESERVED_MAX,
dest_str);
else
zlog_warn(
"%s: Too many labels, Enter %d or fewer for %s",
- __PRETTY_FUNCTION__,
- MPLS_MAX_LABELS, dest_str);
+ __func__, MPLS_MAX_LABELS,
+ dest_str);
break;
}
return CMD_WARNING_CONFIG_FAILED;
else
zlog_warn(
"%s: %s: Nexthop interface name can not be from reserved keywords (Null0, reject, blackhole)",
- __PRETTY_FUNCTION__, dest_str);
+ __func__, dest_str);
return CMD_WARNING_CONFIG_FAILED;
}
}
flag_str);
else
zlog_warn("%s: Malformed flag %s for %s",
- __PRETTY_FUNCTION__, flag_str,
- dest_str);
+ __func__, flag_str, dest_str);
return CMD_WARNING_CONFIG_FAILED;
}
}
else
zlog_warn(
"%s: Malformed nexthop address %s for %s",
- __PRETTY_FUNCTION__, gate_str,
- dest_str);
+ __func__, gate_str, dest_str);
return CMD_WARNING_CONFIG_FAILED;
}
gatep = &gate;
case ZAPI_ROUTE_FAIL_INSTALL:
static_nht_mark_state(&p, vrf_id, STATIC_NOT_INSTALLED);
zlog_warn("%s: Route %s failed to install for table: %u",
- __PRETTY_FUNCTION__, buf, table_id);
+ __func__, buf, table_id);
break;
case ZAPI_ROUTE_BETTER_ADMIN_WON:
static_nht_mark_state(&p, vrf_id, STATIC_NOT_INSTALLED);
- zlog_warn("%s: Route %s over-ridden by better route for table: %u",
- __PRETTY_FUNCTION__, buf, table_id);
+ zlog_warn(
+ "%s: Route %s over-ridden by better route for table: %u",
+ __func__, buf, table_id);
break;
case ZAPI_ROUTE_INSTALLED:
static_nht_mark_state(&p, vrf_id, STATIC_INSTALLED);
case ZAPI_ROUTE_REMOVE_FAIL:
static_nht_mark_state(&p, vrf_id, STATIC_INSTALLED);
zlog_warn("%s: Route %s failure to remove for table: %u",
- __PRETTY_FUNCTION__, buf, table_id);
+ __func__, buf, table_id);
break;
}
}
if (zclient_send_rnh(zclient, cmd, &p, false, si->nh_vrf_id) < 0)
- zlog_warn("%s: Failure to send nexthop to zebra",
- __PRETTY_FUNCTION__);
+ zlog_warn("%s: Failure to send nexthop to zebra", __func__);
}
extern void static_zebra_route_add(struct route_node *rn,
#define EXPECT_TRUE(expr, res) \
if (!(expr)) { \
- printf("Test failure in %s line %u: %s\n", __FUNCTION__, \
- __LINE__, #expr); \
+ printf("Test failure in %s line %u: %s\n", __func__, __LINE__, \
+ #expr); \
(res) = TEST_FAILED; \
}
zclient_init(zclient, ZEBRA_ROUTE_VRRP, 0, &vrrp_privs);
- zlog_notice("%s: zclient socket initialized", __PRETTY_FUNCTION__);
+ zlog_notice("%s: zclient socket initialized", __func__);
}
zvrf = zebra_vrf_lookup_by_id(ifp->vrf_id);
if (!zvrf) {
- flog_err(EC_ZEBRA_VRF_NOT_FOUND,
- "%s: Received Up for interface but no associated zvrf: %d",
- __PRETTY_FUNCTION__, ifp->vrf_id);
+ flog_err(
+ EC_ZEBRA_VRF_NOT_FOUND,
+ "%s: Received Up for interface but no associated zvrf: %d",
+ __func__, ifp->vrf_id);
return;
}
if (!CHECK_FLAG(ifc->conf, ZEBRA_IFC_REAL))
zvrf = zebra_vrf_lookup_by_id(ifp->vrf_id);
if (!zvrf) {
- flog_err(EC_ZEBRA_VRF_NOT_FOUND,
- "%s: Received Up for interface but no associated zvrf: %d",
- __PRETTY_FUNCTION__, ifp->vrf_id);
+ flog_err(
+ EC_ZEBRA_VRF_NOT_FOUND,
+ "%s: Received Up for interface but no associated zvrf: %d",
+ __func__, ifp->vrf_id);
return;
}
len = h->nlmsg_len - NLMSG_LENGTH(sizeof(struct ifinfomsg));
if (len < 0) {
- zlog_err("%s: Message received from netlink is of a broken size: %d %zu",
- __PRETTY_FUNCTION__,
- h->nlmsg_len,
- (size_t)NLMSG_LENGTH(sizeof(struct ifinfomsg)));
+ zlog_err(
+ "%s: Message received from netlink is of a broken size: %d %zu",
+ __func__, h->nlmsg_len,
+ (size_t)NLMSG_LENGTH(sizeof(struct ifinfomsg)));
return -1;
}
len = h->nlmsg_len - NLMSG_LENGTH(sizeof(struct ifaddrmsg));
if (len < 0) {
- zlog_err("%s: Message received from netlink is of a broken size: %d %zu",
- __PRETTY_FUNCTION__,
- h->nlmsg_len,
- (size_t)NLMSG_LENGTH(sizeof(struct ifaddrmsg)));
+ zlog_err(
+ "%s: Message received from netlink is of a broken size: %d %zu",
+ __func__, h->nlmsg_len,
+ (size_t)NLMSG_LENGTH(sizeof(struct ifaddrmsg)));
return -1;
}
len = h->nlmsg_len - NLMSG_LENGTH(sizeof(struct ifinfomsg));
if (len < 0) {
- zlog_err("%s: Message received from netlink is of a broken size %d %zu",
- __PRETTY_FUNCTION__, h->nlmsg_len,
- (size_t)NLMSG_LENGTH(sizeof(struct ifinfomsg)));
+ zlog_err(
+ "%s: Message received from netlink is of a broken size %d %zu",
+ __func__, h->nlmsg_len,
+ (size_t)NLMSG_LENGTH(sizeof(struct ifinfomsg)));
return -1;
}
return 1;
if (new_speed != ifp->speed) {
- zlog_info("%s: %s old speed: %u new speed: %u",
- __PRETTY_FUNCTION__, ifp->name, ifp->speed,
- new_speed);
+ zlog_info("%s: %s old speed: %u new speed: %u", __func__,
+ ifp->name, ifp->speed, new_speed);
ifp->speed = new_speed;
if_add_update(ifp);
changed = true;
* but noticing it for later.
*/
err_nlh = &err->msg;
- zlog_debug("%s: Received %s extended Ack",
- __PRETTY_FUNCTION__,
+ zlog_debug("%s: Received %s extended Ack", __func__,
nl_msg_type_to_str(err_nlh->nlmsg_type));
}
}
if (IS_ZEBRA_DEBUG_KERNEL) {
zlog_debug(
"%s: %s ACK: type=%s(%u), seq=%u, pid=%u",
- __FUNCTION__, nl->name,
+ __func__, nl->name,
nl_msg_type_to_str(
err->msg.nlmsg_type),
err->msg.nlmsg_type,
if (afi == 0 || afi >= AFI_MAX) {
flog_warn(EC_ZEBRA_REDISTRIBUTE_UNKNOWN_AF,
- "%s: Specified afi %d does not exist",
- __PRETTY_FUNCTION__, afi);
+ "%s: Specified afi %d does not exist", __func__, afi);
return;
}
if (type == 0 || type >= ZEBRA_ROUTE_MAX) {
zlog_debug("%s: Specified Route Type %d does not exist",
- __PRETTY_FUNCTION__, type);
+ __func__, type);
return;
}
if (afi == 0 || afi >= AFI_MAX) {
flog_warn(EC_ZEBRA_REDISTRIBUTE_UNKNOWN_AF,
- "%s: Specified afi %d does not exist",
- __PRETTY_FUNCTION__, afi);
+ "%s: Specified afi %d does not exist", __func__, afi);
return;
}
if (type == 0 || type >= ZEBRA_ROUTE_MAX) {
zlog_debug("%s: Specified Route Type %d does not exist",
- __PRETTY_FUNCTION__, type);
+ __func__, type);
return;
}
if (afi == 0 || afi >= AFI_MAX) {
flog_warn(EC_ZEBRA_REDISTRIBUTE_UNKNOWN_AF,
- "%s: Specified afi %u does not exist",
- __PRETTY_FUNCTION__, afi);
+ "%s: Specified afi %u does not exist", __func__, afi);
return;
}
if (afi == 0 || afi >= AFI_MAX) {
flog_warn(EC_ZEBRA_REDISTRIBUTE_UNKNOWN_AF,
- "%s: Specified afi %u does not exist",
- __PRETTY_FUNCTION__, afi);
+ "%s: Specified afi %u does not exist", __func__, afi);
return;
}
*/
zlog_debug(
"%s: Please add this protocol(%d) to proper rt_netlink.c handling",
- __PRETTY_FUNCTION__, proto);
+ __func__, proto);
proto = RTPROT_ZEBRA;
break;
}
*/
zlog_debug(
"%s: Please add this protocol(%d) to proper rt_netlink.c handling",
- __PRETTY_FUNCTION__, proto);
+ __func__, proto);
proto = ZEBRA_ROUTE_KERNEL;
break;
}
flog_warn(
EC_ZEBRA_UNKNOWN_INTERFACE,
"%s: Unknown interface %u specified, defaulting to VRF_DEFAULT",
- __PRETTY_FUNCTION__, index);
+ __func__, index);
nh_vrf_id = VRF_DEFAULT;
}
} else
len = h->nlmsg_len - NLMSG_LENGTH(sizeof(struct rtmsg));
if (len < 0) {
- zlog_err("%s: Message received from netlink is of a broken size %d %zu",
- __PRETTY_FUNCTION__, h->nlmsg_len,
- (size_t)NLMSG_LENGTH(sizeof(struct rtmsg)));
+ zlog_err(
+ "%s: Message received from netlink is of a broken size %d %zu",
+ __func__, h->nlmsg_len,
+ (size_t)NLMSG_LENGTH(sizeof(struct rtmsg)));
return -1;
}
len = h->nlmsg_len - NLMSG_LENGTH(sizeof(struct rtmsg));
if (len < 0) {
- zlog_err("%s: Message received from netlink is of a broken size: %d %zu",
- __PRETTY_FUNCTION__,
- h->nlmsg_len,
- (size_t)NLMSG_LENGTH(sizeof(struct rtmsg)));
+ zlog_err(
+ "%s: Message received from netlink is of a broken size: %d %zu",
+ __func__, h->nlmsg_len,
+ (size_t)NLMSG_LENGTH(sizeof(struct rtmsg)));
return -1;
}
flog_warn(
EC_ZEBRA_UNKNOWN_INTERFACE,
"%s: Unknown nexthop interface %u received, defaulting to VRF_DEFAULT",
- __PRETTY_FUNCTION__, nh.ifindex);
+ __func__, nh.ifindex);
nh.vrf_id = VRF_DEFAULT;
}
if (len < 0) {
zlog_warn(
"%s: Message received from netlink is of a broken size %d %zu",
- __PRETTY_FUNCTION__, h->nlmsg_len,
+ __func__, h->nlmsg_len,
(size_t)NLMSG_LENGTH(sizeof(struct nhmsg)));
return -1;
}
if (!ifp || !ifp->info) {
if (IS_ZEBRA_DEBUG_KERNEL)
zlog_debug("\t%s without associated interface: %u",
- __PRETTY_FUNCTION__, ndm->ndm_ifindex);
+ __func__, ndm->ndm_ifindex);
return 0;
}
if (!IS_ZEBRA_IF_BRIDGE_SLAVE(ifp)) {
if (IS_ZEBRA_DEBUG_KERNEL)
zlog_debug("\t%s Not interested in %s, not a slave",
- __PRETTY_FUNCTION__, ifp->name);
+ __func__, ifp->name);
return 0;
}
if (ndm->ndm_state & NUD_PERMANENT) {
if (IS_ZEBRA_DEBUG_KERNEL)
zlog_debug("\t%s Entry is PERMANENT, dropping",
- __PRETTY_FUNCTION__);
+ __func__);
return 0;
}
addattr32(&req.n, sizeof(req), NDA_MASTER, br_if->ifindex);
if (IS_ZEBRA_DEBUG_KERNEL)
- zlog_debug("%s: Tx family %s IF %s(%u) MAC %s vid %u",
- __PRETTY_FUNCTION__,
+ zlog_debug("%s: Tx family %s IF %s(%u) MAC %s vid %u", __func__,
nl_family_to_str(req.ndm.ndm_family), br_if->name,
br_if->ifindex,
prefix_mac2str(mac, buf, sizeof(buf)), vid);
if (IS_ZEBRA_DEBUG_KERNEL)
zlog_debug("%s: neigh request IF %s(%u) IP %s vrf_id %u",
- __PRETTY_FUNCTION__, vlan_if->name,
- vlan_if->ifindex,
- ipaddr2str(ip, buf, sizeof(buf)),
- vlan_if->vrf_id);
+ __func__, vlan_if->name, vlan_if->ifindex,
+ ipaddr2str(ip, buf, sizeof(buf)), vlan_if->vrf_id);
ret = netlink_request_specific_neigh_in_vlan(zns, RTM_GETNEIGH, ip,
vlan_if->ifindex);
/* Length validity. */
len = h->nlmsg_len - NLMSG_LENGTH(sizeof(struct ndmsg));
if (len < 0) {
- zlog_err("%s: Message received from netlink is of a broken size %d %zu",
- __PRETTY_FUNCTION__, h->nlmsg_len,
- (size_t)NLMSG_LENGTH(sizeof(struct ndmsg)));
+ zlog_err(
+ "%s: Message received from netlink is of a broken size %d %zu",
+ __func__, h->nlmsg_len,
+ (size_t)NLMSG_LENGTH(sizeof(struct ndmsg)));
return -1;
}
len = h->nlmsg_len - NLMSG_LENGTH(sizeof(struct fib_rule_hdr));
if (len < 0) {
- zlog_err("%s: Message received from netlink is of a broken size: %d %zu",
- __PRETTY_FUNCTION__, h->nlmsg_len,
- (size_t)NLMSG_LENGTH(sizeof(struct fib_rule_hdr)));
+ zlog_err(
+ "%s: Message received from netlink is of a broken size: %d %zu",
+ __func__, h->nlmsg_len,
+ (size_t)NLMSG_LENGTH(sizeof(struct fib_rule_hdr)));
return -1;
}
enum zebra_dplane_result kernel_add_pbr_rule(struct zebra_pbr_rule *rule)
{
flog_err(EC_LIB_UNAVAILABLE, "%s not Implemented for this platform",
- __PRETTY_FUNCTION__);
+ __func__);
return ZEBRA_DPLANE_REQUEST_FAILURE;
}
enum zebra_dplane_result kernel_del_pbr_rule(struct zebra_pbr_rule *rule)
{
flog_err(EC_LIB_UNAVAILABLE, "%s not Implemented for this platform",
- __PRETTY_FUNCTION__);
+ __func__);
return ZEBRA_DPLANE_REQUEST_FAILURE;
}
if (p.prefixlen > IPV4_MAX_BITLEN) {
zlog_debug(
"%s: Specified prefix hdr->length %d is too large for a v4 address",
- __PRETTY_FUNCTION__, p.prefixlen);
+ __func__, p.prefixlen);
return;
}
STREAM_GET(&p.u.prefix4.s_addr, s, IPV4_MAX_BYTELEN);
if (p.prefixlen > IPV6_MAX_BITLEN) {
zlog_debug(
"%s: Specified prefix hdr->length %d is to large for a v6 address",
- __PRETTY_FUNCTION__, p.prefixlen);
+ __func__, p.prefixlen);
return;
}
STREAM_GET(&p.u.prefix6, s, IPV6_MAX_BYTELEN);
if (p.prefixlen > IPV4_MAX_BITLEN) {
zlog_debug(
"%s: Specified prefix hdr->length %d is to large for a v4 address",
- __PRETTY_FUNCTION__, p.prefixlen);
+ __func__, p.prefixlen);
return;
}
STREAM_GET(&p.u.prefix4.s_addr, s, IPV4_MAX_BYTELEN);
if (p.prefixlen > IPV6_MAX_BITLEN) {
zlog_debug(
"%s: Specified prefix hdr->length %d is to large for a v6 address",
- __PRETTY_FUNCTION__, p.prefixlen);
+ __func__, p.prefixlen);
return;
}
STREAM_GET(&p.u.prefix6, s, IPV6_MAX_BYTELEN);
&& p.prefixlen > IPV6_MAX_BITLEN)) {
zlog_debug(
"%s: Specified prefix hdr->length: %d is to long for %d",
- __PRETTY_FUNCTION__, p.prefixlen, p.family);
+ __func__, p.prefixlen, p.family);
return;
}
l += 5;
&& p.prefixlen > IPV6_MAX_BITLEN)) {
zlog_debug(
"%s: Received prefix hdr->length %d which is greater than %d can support",
- __PRETTY_FUNCTION__, p.prefixlen, p.family);
+ __func__, p.prefixlen, p.family);
return;
}
l += 5;
if (zapi_route_decode(s, &api) < 0) {
if (IS_ZEBRA_DEBUG_RECV)
zlog_debug("%s: Unable to decode zapi_route sent",
- __PRETTY_FUNCTION__);
+ __func__);
return;
}
flog_warn(
EC_ZEBRA_NEXTHOP_CREATION_FAILED,
"%s: Nexthops Specified: %d but we failed to properly create one",
- __PRETTY_FUNCTION__, api.nexthop_num);
+ __func__, api.nexthop_num);
nexthop_group_delete(&ng);
XFREE(MTYPE_RE, re);
return;
if (afi != AFI_IP6 && CHECK_FLAG(api.message, ZAPI_MESSAGE_SRCPFX)) {
flog_warn(EC_ZEBRA_RX_SRCDEST_WRONG_AFI,
"%s: Received SRC Prefix but afi is not v6",
- __PRETTY_FUNCTION__);
+ __func__);
nexthop_group_delete(&ng);
XFREE(MTYPE_RE, re);
return;
if (afi != AFI_IP6 && CHECK_FLAG(api.message, ZAPI_MESSAGE_SRCPFX)) {
flog_warn(EC_ZEBRA_RX_SRCDEST_WRONG_AFI,
"%s: Received a src prefix while afi is not v6",
- __PRETTY_FUNCTION__);
+ __func__);
return;
}
if (CHECK_FLAG(api.message, ZAPI_MESSAGE_SRCPFX))
if (zapi_labels_decode(s, &zl) < 0) {
if (IS_ZEBRA_DEBUG_RECV)
zlog_debug("%s: Unable to decode zapi_labels sent",
- __PRETTY_FUNCTION__);
+ __func__);
return;
}
if (zapi_labels_decode(s, &zl) < 0) {
if (IS_ZEBRA_DEBUG_RECV)
zlog_debug("%s: Unable to decode zapi_labels sent",
- __PRETTY_FUNCTION__);
+ __func__);
return;
}
if (zapi_labels_decode(s, &zl) < 0) {
if (IS_ZEBRA_DEBUG_RECV)
zlog_debug("%s: Unable to decode zapi_labels sent",
- __PRETTY_FUNCTION__);
+ __func__);
return;
}
if (!netlink_route_info_fill(ri, cmd, dest, re))
return 0;
- zfpm_log_route_info(ri, __FUNCTION__);
+ zfpm_log_route_info(ri, __func__);
return netlink_route_info_encode(ri, in_buf, in_buf_len);
}
if (!CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_ACTIVE)) {
if (IS_ZEBRA_DEBUG_RIB_DETAILED)
zlog_debug("\t%s: Unable to find a active nexthop",
- __PRETTY_FUNCTION__);
+ __func__);
return 0;
}
zvrf = zebra_vrf_lookup_by_id(nexthop->vrf_id);
if (!zvrf) {
if (IS_ZEBRA_DEBUG_RIB_DETAILED)
- zlog_debug("\t%s: zvrf is NULL", __PRETTY_FUNCTION__);
+ zlog_debug("\t%s: zvrf is NULL", __func__);
return CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_ACTIVE);
}
XFREE(MTYPE_TMP, lookup);
} else
zlog_debug("%s: Rule being deleted we know nothing about",
- __PRETTY_FUNCTION__);
+ __func__);
}
static void zebra_pbr_cleanup_rules(struct hash_bucket *b, void *data)
} else
zlog_debug(
"%s: IPSet Entry being deleted we know nothing about",
- __PRETTY_FUNCTION__);
+ __func__);
}
struct pbr_ipset_name_lookup {
XFREE(MTYPE_TMP, lookup);
} else
zlog_debug("%s: IPSet being deleted we know nothing about",
- __PRETTY_FUNCTION__);
+ __func__);
}
static void *pbr_iptable_alloc_intern(void *arg)
if (set_nonblocking(sock) < 0) {
if (IS_ZEBRA_DEBUG_EVENT)
zlog_debug("%s: Unable to set socket non blocking[%s]",
- __PRETTY_FUNCTION__, safe_strerror(errno));
+ __func__, safe_strerror(errno));
close(sock);
return -1;
}
if (IS_ZEBRA_DEBUG_NHT_DETAILED) {
char buf[PREFIX_STRLEN];
- zlog_debug("%s: %s Being examined for Nexthop Tracking Count: %zd",
- __PRETTY_FUNCTION__,
- srcdest_rnode2str(rn, buf, sizeof(buf)),
- dest ? rnh_list_count(&dest->nht) : 0);
+ zlog_debug(
+ "%s: %s Being examined for Nexthop Tracking Count: %zd",
+ __func__,
+ srcdest_rnode2str(rn, buf, sizeof(buf)),
+ dest ? rnh_list_count(&dest->nht) : 0);
}
if (!dest) {
rn = rn->parent;
char buf[PREFIX_STRLEN];
char buf1[PREFIX_STRLEN];
- zlog_debug("%s: %u:%s removed from tracking on %s",
- __PRETTY_FUNCTION__, rnh->vrf_id,
+ zlog_debug("%s: %u:%s removed from tracking on %s", __func__,
+ rnh->vrf_id,
prefix2str(&rnh->node->p, buf, sizeof(buf)),
srcdest_rnode2str(rn, buf1, sizeof(buf)));
}
char buf[PREFIX_STRLEN];
char buf1[PREFIX_STRLEN];
- zlog_debug("%s: %u:%s added for tracking on %s",
- __PRETTY_FUNCTION__, rnh->vrf_id,
+ zlog_debug("%s: %u:%s added for tracking on %s", __func__,
+ rnh->vrf_id,
prefix2str(&rnh->node->p, buf, sizeof(buf)),
srcdest_rnode2str(rn, buf1, sizeof(buf)));
}
char buf[PREFIX_STRLEN];
char buf1[PREFIX_STRLEN];
- zlog_debug("%s: %u:%s Resolved Import Entry to %s",
- __PRETTY_FUNCTION__, rnh->vrf_id,
+ zlog_debug("%s: %u:%s Resolved Import Entry to %s", __func__,
+ rnh->vrf_id,
prefix2str(&rnh->node->p, buf, sizeof(buf)),
srcdest_rnode2str(rn, buf1, sizeof(buf)));
}
return memcmp(&hle1->p.u.prefix6, &hle2->p.u.prefix6,
IPV6_MAX_BYTELEN);
} else {
- zlog_debug("%s: Unexpected family type: %d",
- __PRETTY_FUNCTION__, hle1->p.family);
+ zlog_debug("%s: Unexpected family type: %d", __func__,
+ hle1->p.family);
return 0;
}
}
if (CHECK_FLAG(nbr->flags, ZEBRA_NEIGH_DUPLICATE)) {
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug(
- "%s: duplicate addr MAC %s IP %s flags 0x%x skip installing, learn count %u recover time %u",
- __PRETTY_FUNCTION__,
+ "%s: duplicate addr MAC %s IP %s flags 0x%x skip installing, learn count %u recover time %u",
+ __func__,
prefix_mac2str(&nbr->emac, buf, sizeof(buf)),
ipaddr2str(&nbr->ip, buf1, sizeof(buf1)),
nbr->flags, nbr->dad_count,
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug(
"%s: duplicate addr MAC %s IP %s flags 0x%x detection time passed, reset learn count %u",
- __PRETTY_FUNCTION__,
+ __func__,
prefix_mac2str(&nbr->emac, buf, sizeof(buf)),
ipaddr2str(&nbr->ip, buf1, sizeof(buf1)),
nbr->flags, nbr->dad_count);
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug(
"%s: duplicate addr MAC %s IP %s flags 0x%x auto recovery time %u start",
- __PRETTY_FUNCTION__,
- prefix_mac2str(&nbr->emac, buf, sizeof(buf)),
- ipaddr2str(&nbr->ip, buf1, sizeof(buf1)),
- nbr->flags, zvrf->dad_freeze_time);
+ __func__,
+ prefix_mac2str(&nbr->emac, buf,
+ sizeof(buf)),
+ ipaddr2str(&nbr->ip, buf1,
+ sizeof(buf1)),
+ nbr->flags, zvrf->dad_freeze_time);
thread_add_timer(zrouter.master,
zebra_vxlan_dad_ip_auto_recovery_exp,
if (IS_ZEBRA_DEBUG_VXLAN) {
char buf[ETHER_ADDR_STRLEN];
- zlog_debug("%s: Del MAC %s flags 0x%x",
- __PRETTY_FUNCTION__,
- prefix_mac2str(&mac->macaddr,
- buf, sizeof(buf)),
- mac->flags);
+ zlog_debug(
+ "%s: Del MAC %s flags 0x%x", __func__,
+ prefix_mac2str(&mac->macaddr, buf, sizeof(buf)),
+ mac->flags);
}
wctx->uninstall = 0;
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug(
"%s: IP %s (flags 0x%x intf %s) is remote and duplicate, read kernel for local entry",
- __PRETTY_FUNCTION__,
+ __func__,
ipaddr2str(ipaddr, buf1, sizeof(buf1)),
n->flags,
vlan_if ? vlan_if->name : "Unknown");
CHECK_FLAG(mac->flags, ZEBRA_MAC_DUPLICATE) &&
CHECK_FLAG(mac->flags, ZEBRA_MAC_REMOTE)) {
if (IS_ZEBRA_DEBUG_VXLAN)
- zlog_debug("%s: MAC %s (flags 0x%x) is remote and duplicate, read kernel for local entry",
- __PRETTY_FUNCTION__,
- prefix_mac2str(macaddr, buf,
- sizeof(buf)),
- mac->flags);
+ zlog_debug(
+ "%s: MAC %s (flags 0x%x) is remote and duplicate, read kernel for local entry",
+ __func__,
+ prefix_mac2str(macaddr, buf,
+ sizeof(buf)),
+ mac->flags);
macfdb_read_specific_mac(zns, zif->brslave_info.br_if,
macaddr, vxl->access_vlan);
}
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug("%s: clear neigh %s in dup state, flags 0x%x seq %u",
- __PRETTY_FUNCTION__, buf, nbr->flags,
- nbr->loc_seq);
+ __func__, buf, nbr->flags, nbr->loc_seq);
UNSET_FLAG(nbr->flags, ZEBRA_NEIGH_DUPLICATE);
nbr->dad_count = 0;
if (IS_ZEBRA_DEBUG_VXLAN) {
ipaddr2str(&nbr->ip, buf, sizeof(buf));
- zlog_debug(
- "%s: clear neigh %s dup state, flags 0x%x seq %u",
- __PRETTY_FUNCTION__, buf,
- nbr->flags, nbr->loc_seq);
+ zlog_debug("%s: clear neigh %s dup state, flags 0x%x seq %u",
+ __func__, buf, nbr->flags, nbr->loc_seq);
}
UNSET_FLAG(nbr->flags, ZEBRA_NEIGH_DUPLICATE);
zvni = zvni_from_svi(ifp, link_if);
if (!zvni) {
if (IS_ZEBRA_DEBUG_VXLAN)
- zlog_debug("%s: Del neighbor %s VNI is not present for interface %s",
- __PRETTY_FUNCTION__,
- ipaddr2str(ip, buf, sizeof(buf)), ifp->name);
+ zlog_debug(
+ "%s: Del neighbor %s VNI is not present for interface %s",
+ __func__, ipaddr2str(ip, buf, sizeof(buf)),
+ ifp->name);
return 0;
}
zvrf = vrf_info_lookup(zvni->vxlan_if->vrf_id);
if (!zvrf) {
- zlog_debug("%s: VNI %u vrf lookup failed.",
- __PRETTY_FUNCTION__, zvni->vni);
+ zlog_debug("%s: VNI %u vrf lookup failed.", __func__,
+ zvni->vni);
return -1;
}
if (!is_evpn_enabled()) {
zlog_debug(
"%s: EVPN is not enabled yet we have received a vtep del command",
- __PRETTY_FUNCTION__);
+ __func__);
return;
}
if (!is_evpn_enabled()) {
zlog_debug(
"%s: EVPN not enabled yet we received a vtep_add zapi call",
- __PRETTY_FUNCTION__);
+ __func__);
return;
}
zl3vni->mac_vlan_if = zl3vni_map_to_mac_vlan_if(zl3vni);
if (IS_ZEBRA_DEBUG_VXLAN)
- zlog_debug("%s: l3vni %u svi_if %s mac_vlan_if %s",
- __PRETTY_FUNCTION__, vni,
- zl3vni->svi_if ?
- zl3vni->svi_if->name : "NIL",
- zl3vni->mac_vlan_if ?
- zl3vni->mac_vlan_if->name : "NIL");
+ zlog_debug(
+ "%s: l3vni %u svi_if %s mac_vlan_if %s",
+ __func__, vni,
+ zl3vni->svi_if ? zl3vni->svi_if->name : "NIL",
+ zl3vni->mac_vlan_if ? zl3vni->mac_vlan_if->name
+ : "NIL");
/* formulate l2vni list */
hash_iterate(zvrf_evpn->vni_table, zvni_add_to_l3vni_list,
return 0;
if (IS_ZEBRA_DEBUG_VXLAN)
- zlog_debug("%s: duplicate addr MAC %s IP %s flags 0x%x learn count %u vni %u auto recovery expired",
- __PRETTY_FUNCTION__,
- prefix_mac2str(&nbr->emac, buf2, sizeof(buf2)),
- ipaddr2str(&nbr->ip, buf1, sizeof(buf1)),
- nbr->flags,
- nbr->dad_count, zvni->vni);
+ zlog_debug(
+ "%s: duplicate addr MAC %s IP %s flags 0x%x learn count %u vni %u auto recovery expired",
+ __func__,
+ prefix_mac2str(&nbr->emac, buf2, sizeof(buf2)),
+ ipaddr2str(&nbr->ip, buf1, sizeof(buf1)), nbr->flags,
+ nbr->dad_count, zvni->vni);
UNSET_FLAG(nbr->flags, ZEBRA_NEIGH_DUPLICATE);
nbr->dad_count = 0;