diff options
| author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2020-03-05 20:17:54 +0200 |
|---|---|---|
| committer | Donatas Abraitis <donatas.abraitis@gmail.com> | 2020-03-05 20:23:23 +0200 |
| commit | 15569c58f8001d37bccaed7f99b6987315125036 (patch) | |
| tree | b81f9925182682ee2ad7fd969eb1de6f0072ccf8 /pimd/pim_hello.c | |
| parent | 38e385615ac3355f09e3f8df99a25a1c30af249a (diff) | |
*: Replace __PRETTY_FUNCTION__/__FUNCTION__ to __func__
Just keep the code cool.
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'pimd/pim_hello.c')
| -rw-r--r-- | pimd/pim_hello.c | 79 |
1 files changed, 36 insertions, 43 deletions
diff --git a/pimd/pim_hello.c b/pimd/pim_hello.c index 34c5eb43bc..ecdb3a34a7 100644 --- a/pimd/pim_hello.c +++ b/pimd/pim_hello.c @@ -154,7 +154,7 @@ int pim_hello_recv(struct interface *ifp, struct in_addr src_addr, 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); @@ -180,8 +180,8 @@ int pim_hello_recv(struct interface *ifp, struct in_addr src_addr, 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); } @@ -198,9 +198,9 @@ int pim_hello_recv(struct interface *ifp, struct in_addr src_addr, 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); } @@ -211,8 +211,8 @@ int pim_hello_recv(struct interface *ifp, struct in_addr src_addr, 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) { @@ -264,8 +264,8 @@ int pim_hello_recv(struct interface *ifp, struct in_addr src_addr, 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: @@ -275,8 +275,8 @@ int pim_hello_recv(struct interface *ifp, struct in_addr src_addr, 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); } } @@ -288,44 +288,38 @@ int pim_hello_recv(struct interface *ifp, struct in_addr src_addr, */ 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); @@ -338,7 +332,7 @@ int pim_hello_recv(struct interface *ifp, struct in_addr src_addr, 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); } } @@ -363,16 +357,16 @@ int pim_hello_recv(struct interface *ifp, struct in_addr src_addr, 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 */ @@ -396,8 +390,7 @@ int pim_hello_recv(struct interface *ifp, struct in_addr src_addr, 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); } @@ -422,16 +415,16 @@ int pim_hello_recv(struct interface *ifp, struct in_addr src_addr, 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; @@ -473,7 +466,7 @@ int pim_hello_build_tlv(struct interface *ifp, uint8_t *tlv_buf, 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; } @@ -486,7 +479,7 @@ int pim_hello_build_tlv(struct interface *ifp, uint8_t *tlv_buf, 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; } @@ -502,7 +495,7 @@ int pim_hello_build_tlv(struct interface *ifp, uint8_t *tlv_buf, 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; } @@ -515,7 +508,7 @@ int pim_hello_build_tlv(struct interface *ifp, uint8_t *tlv_buf, 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; } @@ -528,7 +521,7 @@ int pim_hello_build_tlv(struct interface *ifp, uint8_t *tlv_buf, 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; } @@ -539,7 +532,7 @@ int pim_hello_build_tlv(struct interface *ifp, uint8_t *tlv_buf, 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; } |
