tinydtls  0.8.6
alert.h
Go to the documentation of this file.
1 /*******************************************************************************
2  *
3  * Copyright (c) 2011, 2012, 2013, 2014, 2015 Olaf Bergmann (TZI) and others.
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * and Eclipse Distribution License v. 1.0 which accompanies this distribution.
7  *
8  * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
9  * and the Eclipse Distribution License is available at
10  * http://www.eclipse.org/org/documents/edl-v10.php.
11  *
12  * Contributors:
13  * Olaf Bergmann - initial API and implementation
14  * Hauke Mehrtens - memory optimization, ECC integration
15  *
16  *******************************************************************************/
17 
23 #ifndef _DTLS_ALERT_H_
24 #define _DTLS_ALERT_H_
25 
26 typedef enum {
30 
31 typedef enum {
32  DTLS_ALERT_CLOSE_NOTIFY = 0, /* close_notify */
33  DTLS_ALERT_UNEXPECTED_MESSAGE = 10, /* unexpected_message */
34  DTLS_ALERT_BAD_RECORD_MAC = 20, /* bad_record_mac */
35  DTLS_ALERT_RECORD_OVERFLOW = 22, /* record_overflow */
36  DTLS_ALERT_DECOMPRESSION_FAILURE = 30, /* decompression_failure */
37  DTLS_ALERT_HANDSHAKE_FAILURE = 40, /* handshake_failure */
38  DTLS_ALERT_BAD_CERTIFICATE = 42, /* bad_certificate */
39  DTLS_ALERT_UNSUPPORTED_CERTIFICATE = 43, /* unsupported_certificate */
40  DTLS_ALERT_CERTIFICATE_REVOKED = 44, /* certificate_revoked */
41  DTLS_ALERT_CERTIFICATE_EXPIRED = 45, /* certificate_expired */
42  DTLS_ALERT_CERTIFICATE_UNKNOWN = 46, /* certificate_unknown */
43  DTLS_ALERT_ILLEGAL_PARAMETER = 47, /* illegal_parameter */
44  DTLS_ALERT_UNKNOWN_CA = 48, /* unknown_ca */
45  DTLS_ALERT_ACCESS_DENIED = 49, /* access_denied */
46  DTLS_ALERT_DECODE_ERROR = 50, /* decode_error */
47  DTLS_ALERT_DECRYPT_ERROR = 51, /* decrypt_error */
48  DTLS_ALERT_PROTOCOL_VERSION = 70, /* protocol_version */
49  DTLS_ALERT_INSUFFICIENT_SECURITY = 71, /* insufficient_security */
50  DTLS_ALERT_INTERNAL_ERROR = 80, /* internal_error */
51  DTLS_ALERT_USER_CANCELED = 90, /* user_canceled */
52  DTLS_ALERT_NO_RENEGOTIATION = 100, /* no_renegotiation */
53  DTLS_ALERT_UNSUPPORTED_EXTENSION = 110 /* unsupported_extension */
54 } dtls_alert_t;
55 
56 #define DTLS_EVENT_CONNECT 0x01DC
57 #define DTLS_EVENT_CONNECTED 0x01DE
59 #define DTLS_EVENT_RENEGOTIATE 0x01DF
61 static inline int
63 {
64  return -((level << 8) | desc);
65 }
66 
67 static inline int
69 {
71 }
72 
73 #endif /* _DTLS_ALERT_H_ */
static int dtls_alert_fatal_create(dtls_alert_t desc)
Definition: alert.h:69
dtls_alert_level_t
Definition: alert.h:26
static int dtls_alert_create(dtls_alert_level_t level, dtls_alert_t desc)
Definition: alert.h:63
dtls_alert_t
Definition: alert.h:31