diff options
author | Eiichiro Watanabe <a16tochjp@gmail.com> | 2015-12-09 11:37:21 +0900 |
---|---|---|
committer | Eiichiro Watanabe <a16tochjp@gmail.com> | 2015-12-09 12:30:49 +0900 |
commit | 54addf3f4c04920283ca47f48e89eb07b9acbd55 (patch) | |
tree | ee5d335e6cf432c719aeef4b7ff97fb451a378e0 /packet | |
parent | 513d40f5431c72cc72bfc7e161c8f3880a5bca04 (diff) |
packet: define new constants in RTR
Diffstat (limited to 'packet')
-rw-r--r-- | packet/rtr.go | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/packet/rtr.go b/packet/rtr.go index dca8fa45..91a57b32 100644 --- a/packet/rtr.go +++ b/packet/rtr.go @@ -40,15 +40,17 @@ const ( ) const ( - RTR_SERIAL_NOTIFY_LEN = 12 - RTR_SERIAL_QUERY_LEN = 12 - RTR_RESET_QUERY_LEN = 8 - RTR_CACHE_RESPONSE_LEN = 8 - RTR_IPV4_PREFIX_LEN = 20 - RTR_IPV6_PREFIX_LEN = 32 - RTR_END_OF_DATA_LEN = 12 - RTR_CACHE_RESET_LEN = 8 - RTR_MIN_LEN = 8 + RTR_SERIAL_NOTIFY_LEN = 12 + RTR_SERIAL_QUERY_LEN = 12 + RTR_RESET_QUERY_LEN = 8 + RTR_CACHE_RESPONSE_LEN = 8 + RTR_IPV4_PREFIX_LEN = 20 + RTR_IPV6_PREFIX_LEN = 32 + RTR_END_OF_DATA_LEN = 12 + RTR_CACHE_RESET_LEN = 8 + RTR_MIN_LEN = 8 + RTR_ERROR_REPORT_ERR_PDU_LEN = 4 + RTR_ERROR_REPORT_ERR_TEXT_LEN = 4 ) const ( @@ -56,6 +58,17 @@ const ( ANNOUNCEMENT ) +const ( + CORRUPT_DATA uint16 = iota + INTERNAL_ERROR + NO_DATA_AVAILABLE + INVALID_REQUEST + UNSUPPORTED_PROTOCOL_VERSION + UNSUPPORTED_PDU_TYPE + WITHDRAWAL_OF_UNKNOWN_RECORD + DUPLICATE_ANNOUNCEMENT_RECORD +) + type RTRMessage interface { DecodeFromBytes([]byte) error Serialize() ([]byte, error) |