mbed port of tinydtls
alert.h@1:bc8a649bad13, 2013-10-11 (annotated)
- Committer:
- ashleymills
- Date:
- Fri Oct 11 08:46:21 2013 +0000
- Revision:
- 1:bc8a649bad13
- Parent:
- 0:04990d454f45
Cleaned up all the debug stuff I added finding the hash table bug.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ashleymills | 0:04990d454f45 | 1 | /* alert.h -- DTLS alert protocol |
ashleymills | 0:04990d454f45 | 2 | * |
ashleymills | 0:04990d454f45 | 3 | * Copyright (C) 2012 Olaf Bergmann <bergmann@tzi.org> |
ashleymills | 0:04990d454f45 | 4 | * |
ashleymills | 0:04990d454f45 | 5 | * Permission is hereby granted, free of charge, to any person |
ashleymills | 0:04990d454f45 | 6 | * obtaining a copy of this software and associated documentation |
ashleymills | 0:04990d454f45 | 7 | * files (the "Software"), to deal in the Software without |
ashleymills | 0:04990d454f45 | 8 | * restriction, including without limitation the rights to use, copy, |
ashleymills | 0:04990d454f45 | 9 | * modify, merge, publish, distribute, sublicense, and/or sell copies |
ashleymills | 0:04990d454f45 | 10 | * of the Software, and to permit persons to whom the Software is |
ashleymills | 0:04990d454f45 | 11 | * furnished to do so, subject to the following conditions: |
ashleymills | 0:04990d454f45 | 12 | * |
ashleymills | 0:04990d454f45 | 13 | * The above copyright notice and this permission notice shall be |
ashleymills | 0:04990d454f45 | 14 | * included in all copies or substantial portions of the Software. |
ashleymills | 0:04990d454f45 | 15 | * |
ashleymills | 0:04990d454f45 | 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
ashleymills | 0:04990d454f45 | 17 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
ashleymills | 0:04990d454f45 | 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
ashleymills | 0:04990d454f45 | 19 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS |
ashleymills | 0:04990d454f45 | 20 | * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN |
ashleymills | 0:04990d454f45 | 21 | * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
ashleymills | 0:04990d454f45 | 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
ashleymills | 0:04990d454f45 | 23 | * SOFTWARE. |
ashleymills | 0:04990d454f45 | 24 | */ |
ashleymills | 0:04990d454f45 | 25 | |
ashleymills | 0:04990d454f45 | 26 | /** |
ashleymills | 0:04990d454f45 | 27 | * @file alert.h |
ashleymills | 0:04990d454f45 | 28 | * @brief DTLS alert protocol |
ashleymills | 0:04990d454f45 | 29 | */ |
ashleymills | 0:04990d454f45 | 30 | |
ashleymills | 0:04990d454f45 | 31 | #ifndef _ALERT_H_ |
ashleymills | 0:04990d454f45 | 32 | #define _ALERT_H_ |
ashleymills | 0:04990d454f45 | 33 | |
ashleymills | 0:04990d454f45 | 34 | #include "config.h" |
ashleymills | 0:04990d454f45 | 35 | |
ashleymills | 0:04990d454f45 | 36 | typedef enum { |
ashleymills | 0:04990d454f45 | 37 | DTLS_ALERT_LEVEL_WARNING=1, |
ashleymills | 0:04990d454f45 | 38 | DTLS_ALERT_LEVEL_FATAL=2 |
ashleymills | 0:04990d454f45 | 39 | } dtls_alert_level_t; |
ashleymills | 0:04990d454f45 | 40 | |
ashleymills | 0:04990d454f45 | 41 | typedef enum { |
ashleymills | 0:04990d454f45 | 42 | DTLS_ALERT_CLOSE=0, |
ashleymills | 0:04990d454f45 | 43 | DTLS_ALERT_UNEXPECTED_MESSAGE=10, |
ashleymills | 0:04990d454f45 | 44 | DTLS_ALERT_BAD_RECORD_MAC=20, |
ashleymills | 0:04990d454f45 | 45 | DTLS_ALERT_RECORD_OVERFLOW=22, |
ashleymills | 0:04990d454f45 | 46 | DTLS_ALERT_DECOMPRESSION_FAILURE=30, |
ashleymills | 0:04990d454f45 | 47 | DTLS_ALERT_HANDSHAKE_FAILURE=40, |
ashleymills | 0:04990d454f45 | 48 | DTLS_ALERT_ILLEGAL_PARAMETER=47, |
ashleymills | 0:04990d454f45 | 49 | DTLS_ALERT_ACCESS_DENIED=49, |
ashleymills | 0:04990d454f45 | 50 | DTLS_ALERT_DECODE_ERROR=50, |
ashleymills | 0:04990d454f45 | 51 | DTLS_ALERT_DECRYPT_ERROR=51, |
ashleymills | 0:04990d454f45 | 52 | DTLS_ALERT_PROTOCOL_VERSION=70, |
ashleymills | 0:04990d454f45 | 53 | DTLS_ALERT_INSUFFICIENT_SECURITY=70, |
ashleymills | 0:04990d454f45 | 54 | DTLS_ALERT_INTERNAL_ERROR=80, |
ashleymills | 0:04990d454f45 | 55 | DTLS_ALERT_USER_CANCELED=90, |
ashleymills | 0:04990d454f45 | 56 | DTLS_ALERT_NO_RENEGOTIATION=100, |
ashleymills | 0:04990d454f45 | 57 | DTLS_ALERT_UNSUPPORTED_EXTENSION=110 |
ashleymills | 0:04990d454f45 | 58 | } dtls_alert_t; |
ashleymills | 0:04990d454f45 | 59 | |
ashleymills | 0:04990d454f45 | 60 | #define DTLS_EVENT_CONNECTED 0x01DE |
ashleymills | 0:04990d454f45 | 61 | |
ashleymills | 0:04990d454f45 | 62 | #endif /* _ALERT_H_ */ |