From 51c82aaccf11b1de54b0940865d7e88fdf9299f8 Mon Sep 17 00:00:00 2001 From: david Date: Tue, 14 Jun 2011 19:46:50 +0000 Subject: [PATCH] Add ICMPv6 Parameter Problem reason code. --- portreasons.cc | 4 ++++ portreasons.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/portreasons.cc b/portreasons.cc index 00194f618..2746b54b6 100644 --- a/portreasons.cc +++ b/portreasons.cc @@ -164,6 +164,7 @@ reason_map_type::reason_map_type(){ reason_map[ER_NOROUTE] = reason_string("no-route", "no-routes"); reason_map[ER_BEYONDSCOPE] = reason_string("beyond-scope", "beyond-scopes"); reason_map[ER_REJECTROUTE] = reason_string("reject-route", "reject-routes"); + reason_map[ER_PARAMPROBLEM] = reason_string("param-problem", "param-problems"); } /* Map holding plural and singular versions of error codes */ @@ -241,6 +242,9 @@ static reason_codes icmpv6_to_reason(int icmp_type, int icmp_code) { } return ER_UNKNOWN; + case ICMPV6_PARAMPROBLEM: + return ER_PARAMPROBLEM; + case ICMPV6_TIMEXCEED: return ER_TIMEEXCEEDED; } diff --git a/portreasons.h b/portreasons.h index d65cf1bd1..fcf197d39 100644 --- a/portreasons.h +++ b/portreasons.h @@ -153,7 +153,7 @@ enum reason_codes { ER_ARPRESPONSE, ER_TCPRESPONSE, ER_NORESPONSE, ER_INITACK, ER_ABORT, ER_LOCALHOST, ER_SCRIPT, ER_UNKNOWN, ER_USER, - ER_NOROUTE, ER_BEYONDSCOPE, ER_REJECTROUTE, + ER_NOROUTE, ER_BEYONDSCOPE, ER_REJECTROUTE, ER_PARAMPROBLEM, }; /* A map of reason_codes to plural and singular *