diff options
Diffstat (limited to 'pimd/pim_zlookup.c')
| -rw-r--r-- | pimd/pim_zlookup.c | 61 |
1 files changed, 28 insertions, 33 deletions
diff --git a/pimd/pim_zlookup.c b/pimd/pim_zlookup.c index 0454c0d69e..fc486f4998 100644 --- a/pimd/pim_zlookup.c +++ b/pimd/pim_zlookup.c @@ -56,7 +56,7 @@ static int zclient_lookup_connect(struct thread *t) 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 */ } @@ -79,7 +79,7 @@ static void zclient_lookup_sched(struct zclient *zlookup, int delay) &zlookup->t_connect); zlog_notice("%s: zclient lookup connection scheduled for %d seconds", - __PRETTY_FUNCTION__, delay); + __func__, delay); } /* Schedule connection for now. */ @@ -89,7 +89,7 @@ static void zclient_lookup_sched_now(struct zclient *zlookup) &zlookup->t_connect); zlog_notice("%s: zclient lookup immediate connection scheduled", - __PRETTY_FUNCTION__); + __func__); } /* Schedule reconnection, if needed. */ @@ -128,7 +128,7 @@ void zclient_lookup_new(void) zlookup = zclient_new(router->master, &zclient_options_default); if (!zlookup) { flog_err(EC_LIB_ZAPI_SOCKET, "%s: zclient_new() failure", - __PRETTY_FUNCTION__); + __func__); return; } @@ -138,8 +138,7 @@ void zclient_lookup_new(void) 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, @@ -163,7 +162,7 @@ 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); } @@ -175,8 +174,7 @@ static int zclient_read_nexthop(struct pim_instance *pim, &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; } @@ -198,8 +196,7 @@ static int zclient_read_nexthop(struct pim_instance *pim, 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 */ } @@ -228,8 +225,8 @@ static int zclient_read_nexthop(struct pim_instance *pim, 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; @@ -304,8 +301,8 @@ static int zclient_read_nexthop(struct pim_instance *pim, 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; } @@ -324,7 +321,7 @@ static int zclient_lookup_nexthop_once(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); } @@ -332,7 +329,7 @@ static int zclient_lookup_nexthop_once(struct pim_instance *pim, 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; } @@ -340,7 +337,7 @@ static int zclient_lookup_nexthop_once(struct pim_instance *pim, 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; } @@ -356,14 +353,14 @@ static int zclient_lookup_nexthop_once(struct pim_instance *pim, 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; } @@ -410,8 +407,8 @@ int zclient_lookup_nexthop(struct pim_instance *pim, 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; } @@ -448,9 +445,9 @@ int zclient_lookup_nexthop(struct pim_instance *pim, 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); @@ -477,8 +474,8 @@ int zclient_lookup_nexthop(struct pim_instance *pim, 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); } @@ -493,8 +490,7 @@ int zclient_lookup_nexthop(struct pim_instance *pim, 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; @@ -548,7 +544,7 @@ int pim_zlookup_sg_statistics(struct channel_oil *c_oil) flog_err( EC_LIB_SOCKET, "%s: writen() failure: %d writing to zclient lookup socket", - __PRETTY_FUNCTION__, errno); + __func__, errno); return -1; } @@ -566,8 +562,7 @@ int pim_zlookup_sg_statistics(struct channel_oil *c_oil) &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; } @@ -585,7 +580,7 @@ int pim_zlookup_sg_statistics(struct channel_oil *c_oil) 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); |
