version 1.1.1.1, 2012/02/21 17:26:12
|
version 1.1.1.2, 2013/07/21 23:54:37
|
Line 194 bgp_dump_attr (struct peer *peer, struct attr *attr, c
|
Line 194 bgp_dump_attr (struct peer *peer, struct attr *attr, c
|
#endif /* HAVE_IPV6 */ |
#endif /* HAVE_IPV6 */ |
|
|
if (CHECK_FLAG (attr->flag, ATTR_FLAG_BIT (BGP_ATTR_LOCAL_PREF))) |
if (CHECK_FLAG (attr->flag, ATTR_FLAG_BIT (BGP_ATTR_LOCAL_PREF))) |
snprintf (buf + strlen (buf), size - strlen (buf), ", localpref %d", | snprintf (buf + strlen (buf), size - strlen (buf), ", localpref %u", |
attr->local_pref); |
attr->local_pref); |
|
|
if (CHECK_FLAG (attr->flag, ATTR_FLAG_BIT (BGP_ATTR_MULTI_EXIT_DISC))) |
if (CHECK_FLAG (attr->flag, ATTR_FLAG_BIT (BGP_ATTR_MULTI_EXIT_DISC))) |
snprintf (buf + strlen (buf), size - strlen (buf), ", metric %d", | snprintf (buf + strlen (buf), size - strlen (buf), ", metric %u", |
attr->med); |
attr->med); |
|
|
if (CHECK_FLAG (attr->flag, ATTR_FLAG_BIT (BGP_ATTR_COMMUNITIES))) |
if (CHECK_FLAG (attr->flag, ATTR_FLAG_BIT (BGP_ATTR_COMMUNITIES))) |
Line 243 bgp_notify_print(struct peer *peer, struct bgp_notify
|
Line 243 bgp_notify_print(struct peer *peer, struct bgp_notify
|
const char *direct) |
const char *direct) |
{ |
{ |
const char *subcode_str; |
const char *subcode_str; |
|
const char *code_str; |
|
|
subcode_str = ""; |
subcode_str = ""; |
|
code_str = LOOKUP_DEF (bgp_notify_msg, bgp_notify->code, |
|
"Unrecognized Error Code"); |
|
|
switch (bgp_notify->code) | switch (bgp_notify->code) |
{ |
{ |
case BGP_NOTIFY_HEADER_ERR: |
case BGP_NOTIFY_HEADER_ERR: |
subcode_str = LOOKUP (bgp_notify_head_msg, bgp_notify->subcode); | subcode_str = LOOKUP_DEF (bgp_notify_head_msg, bgp_notify->subcode, |
| "Unrecognized Error Subcode"); |
break; |
break; |
case BGP_NOTIFY_OPEN_ERR: |
case BGP_NOTIFY_OPEN_ERR: |
subcode_str = LOOKUP (bgp_notify_open_msg, bgp_notify->subcode); | subcode_str = LOOKUP_DEF (bgp_notify_open_msg, bgp_notify->subcode, |
| "Unrecognized Error Subcode"); |
break; |
break; |
case BGP_NOTIFY_UPDATE_ERR: |
case BGP_NOTIFY_UPDATE_ERR: |
subcode_str = LOOKUP (bgp_notify_update_msg, bgp_notify->subcode); | subcode_str = LOOKUP_DEF (bgp_notify_update_msg, bgp_notify->subcode, |
| "Unrecognized Error Subcode"); |
break; |
break; |
case BGP_NOTIFY_HOLD_ERR: |
case BGP_NOTIFY_HOLD_ERR: |
subcode_str = ""; |
|
break; |
break; |
case BGP_NOTIFY_FSM_ERR: |
case BGP_NOTIFY_FSM_ERR: |
subcode_str = ""; |
|
break; |
break; |
case BGP_NOTIFY_CEASE: |
case BGP_NOTIFY_CEASE: |
subcode_str = LOOKUP (bgp_notify_cease_msg, bgp_notify->subcode); | subcode_str = LOOKUP_DEF (bgp_notify_cease_msg, bgp_notify->subcode, |
| "Unrecognized Error Subcode"); |
break; |
break; |
case BGP_NOTIFY_CAPABILITY_ERR: |
case BGP_NOTIFY_CAPABILITY_ERR: |
subcode_str = LOOKUP (bgp_notify_capability_msg, bgp_notify->subcode); | subcode_str = LOOKUP_DEF (bgp_notify_capability_msg, bgp_notify->subcode, |
| "Unrecognized Error Subcode"); |
break; |
break; |
} |
} |
|
|
Line 275 bgp_notify_print(struct peer *peer, struct bgp_notify
|
Line 281 bgp_notify_print(struct peer *peer, struct bgp_notify
|
zlog_info ("%%NOTIFICATION: %s neighbor %s %d/%d (%s%s) %d bytes %s", |
zlog_info ("%%NOTIFICATION: %s neighbor %s %d/%d (%s%s) %d bytes %s", |
strcmp (direct, "received") == 0 ? "received from" : "sent to", |
strcmp (direct, "received") == 0 ? "received from" : "sent to", |
peer->host, bgp_notify->code, bgp_notify->subcode, |
peer->host, bgp_notify->code, bgp_notify->subcode, |
LOOKUP (bgp_notify_msg, bgp_notify->code), | code_str, subcode_str, bgp_notify->length, |
subcode_str, bgp_notify->length, | |
bgp_notify->data ? bgp_notify->data : ""); |
bgp_notify->data ? bgp_notify->data : ""); |
else if (BGP_DEBUG (normal, NORMAL)) |
else if (BGP_DEBUG (normal, NORMAL)) |
plog_debug (peer->log, "%s %s NOTIFICATION %d/%d (%s%s) %d bytes %s", |
plog_debug (peer->log, "%s %s NOTIFICATION %d/%d (%s%s) %d bytes %s", |
peer ? peer->host : "", |
peer ? peer->host : "", |
direct, bgp_notify->code, bgp_notify->subcode, |
direct, bgp_notify->code, bgp_notify->subcode, |
LOOKUP (bgp_notify_msg, bgp_notify->code), | code_str, subcode_str, bgp_notify->length, |
subcode_str, bgp_notify->length, | |
bgp_notify->data ? bgp_notify->data : ""); |
bgp_notify->data ? bgp_notify->data : ""); |
} |
} |
|
|