diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2017-03-18 21:58:51 -0300 | 
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2017-03-20 21:42:14 -0300 | 
| commit | 0f7b5df9259347bfc425c73fe7cf1ffc89cf2269 (patch) | |
| tree | 1d6397c74b240d22d72db8629583f994c2bc47e2 /ldpd/packet.c | |
| parent | f2725627317af322faa926fb9098e0adb9c60ae4 (diff) | |
ldpd: provide more detailed information in some show commands
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ldpd/packet.c')
| -rw-r--r-- | ldpd/packet.c | 36 | 
1 files changed, 36 insertions, 0 deletions
diff --git a/ldpd/packet.c b/ldpd/packet.c index a7be0f6b42..46893b992b 100644 --- a/ldpd/packet.c +++ b/ldpd/packet.c @@ -572,6 +572,42 @@ session_read(struct thread *thread)  				return (0);  			} +			/* no errors - update per neighbor message counters */ +			switch (type) { +			case MSG_TYPE_NOTIFICATION: +				nbr->stats.notif_rcvd++; +				break; +			case MSG_TYPE_KEEPALIVE: +				nbr->stats.kalive_rcvd++; +				break; +			case MSG_TYPE_CAPABILITY: +				nbr->stats.capability_rcvd++; +				break; +			case MSG_TYPE_ADDR: +				nbr->stats.addr_rcvd++; +				break; +			case MSG_TYPE_ADDRWITHDRAW: +				nbr->stats.addrwdraw_rcvd++; +				break; +			case MSG_TYPE_LABELMAPPING: +				nbr->stats.labelmap_rcvd++; +				break; +			case MSG_TYPE_LABELREQUEST: +				nbr->stats.labelreq_rcvd++; +				break; +			case MSG_TYPE_LABELWITHDRAW: +				nbr->stats.labelwdraw_rcvd++; +				break; +			case MSG_TYPE_LABELRELEASE: +				nbr->stats.labelrel_rcvd++; +				break; +			case MSG_TYPE_LABELABORTREQ: +				nbr->stats.labelabreq_rcvd++; +				break; +			default: +				break; +			} +  			/* Analyse the next message */  			pdu += msg_size;  			len -= msg_size;  | 
