Imported Upstream version 0.9.1
[platform/upstream/iotivity.git] / extlibs / tinydtls / 0001-Adding-autoconf-generated-files-in-tinydtls-repo.patch
1 From b44aa20e0ff2763468bf82ff4e996dec03e872bd Mon Sep 17 00:00:00 2001
2 From: Sachin Agrawal <sachin.agrawal@intel.com>
3 Date: Thu, 2 Apr 2015 15:21:40 -0700
4 Subject: [PATCH 1/1] Adding autoconf generated files in tinydtls repo
5
6 tinydtls build system uses autotools while Iotivity uses
7 scons build system. Since tinydtls contains few source files
8 and header files, it seems  convenient for Iotivity to use
9 scons to build tinydtls library.
10 This patch is to add autoconf generated files so that tinydtls
11 can be build using scons script.
12
13 Note: Since this change is a custom change and specifically
14 for Iotivity, I do not intend to submit this patch for
15 upstreaming.
16
17 Change-Id: I4da593a8abccd731466a88d365dca536f608c94a
18 Signed-off-by: Sachin Agrawal <sachin.agrawal@intel.com>
19 ---
20  extlibs/tinydtls/dtls_config.h |  171 ++++++++++++++++++++++++++++++++++++++++
21  extlibs/tinydtls/tinydtls.h    |   45 +++++++++++
22  2 files changed, 216 insertions(+)
23  create mode 100644 extlibs/tinydtls/dtls_config.h
24  create mode 100644 extlibs/tinydtls/tinydtls.h
25
26 diff --git a/extlibs/tinydtls/dtls_config.h b/extlibs/tinydtls/dtls_config.h
27 new file mode 100644
28 index 0000000..39df8c9
29 --- /dev/null
30 +++ b/extlibs/tinydtls/dtls_config.h
31 @@ -0,0 +1,171 @@
32 +/* dtls_config.h.  Generated from dtls_config.h.in by configure.  */
33 +/* tinydtls -- a very basic DTLS implementation
34 + *
35 + * Copyright (C) 2011--2014 Olaf Bergmann <bergmann@tzi.org>
36 + * Copyright (C) 2013 Hauke Mehrtens <hauke@hauke-m.de>
37 + *
38 + * Permission is hereby granted, free of charge, to any person
39 + * obtaining a copy of this software and associated documentation
40 + * files (the "Software"), to deal in the Software without
41 + * restriction, including without limitation the rights to use, copy,
42 + * modify, merge, publish, distribute, sublicense, and/or sell copies
43 + * of the Software, and to permit persons to whom the Software is
44 + * furnished to do so, subject to the following conditions:
45 + *
46 + * The above copyright notice and this permission notice shall be
47 + * included in all copies or substantial portions of the Software.
48 + *
49 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
50 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
51 + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
52 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
53 + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
54 + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
55 + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
56 + * SOFTWARE.
57 + */
58 +
59 +/**
60 + * @file dtls_config.h
61 + * @brief internal configuration for tinydtls library
62 + *
63 + * This file has been generated by configure from dtls_config.h.in.
64 + */
65 +
66 +/* dummy definitions for PACKAGE_NAME and PACKAGE_VERSION */
67 +#define PACKAGE_NAME "tinydtls"
68 +#define PACKAGE_STRING "tinydtls 0.8.1"
69 +#define PACKAGE_VERSION "0.8.1"
70 +
71 +#ifdef CONTIKI
72 +#include "contiki.h"
73 +#include "contiki-lib.h"
74 +#include "contiki-net.h"
75 +
76 +#include "contiki-conf.h"
77 +
78 +/* global constants for constrained devices running Contiki */
79 +#ifndef DTLS_PEER_MAX
80 +/** The maximum number DTLS peers (i.e. sessions). */
81 +#  define DTLS_PEER_MAX 1
82 +#endif
83 +
84 +#ifndef DTLS_HANDSHAKE_MAX
85 +/** The maximum number of concurrent DTLS handshakes. */
86 +#  define DTLS_HANDSHAKE_MAX 1
87 +#endif
88 +
89 +#ifndef DTLS_SECURITY_MAX
90 +/** The maximum number of concurrently used cipher keys */
91 +#  define DTLS_SECURITY_MAX (DTLS_PEER_MAX + DTLS_HANDSHAKE_MAX)
92 +#endif
93 +
94 +#ifndef DTLS_HASH_MAX
95 +/** The maximum number of hash functions that can be used in parallel. */
96 +#  define DTLS_HASH_MAX (3 * DTLS_PEER_MAX)
97 +#endif
98 +#endif /* CONTIKI */
99 +
100 +/* Define to 1 if you have the <assert.h> header file. */
101 +#define HAVE_ASSERT_H 1
102 +
103 +/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
104 +   to 0 otherwise. */
105 +#define HAVE_MALLOC 1
106 +
107 +/* Define to 1 if you have the <memory.h> header file. */
108 +#define HAVE_MEMORY_H 1
109 +
110 +/* Define to 1 if you have the `memset' function. */
111 +#define HAVE_MEMSET 1
112 +
113 +/* Define to 1 if you have the <stddef.h> header file. */
114 +#define HAVE_STDDEF_H 1
115 +
116 +/* Define to 1 if you have the <stdint.h> header file. */
117 +#define HAVE_STDINT_H 1
118 +
119 +/* Define to 1 if you have the <stdlib.h> header file. */
120 +#define HAVE_STDLIB_H 1
121 +
122 +/* Define to 1 if you have the `strdup' function. */
123 +#define HAVE_STRDUP 1
124 +
125 +/* Define to 1 if you have the `strerror' function. */
126 +#define HAVE_STRERROR 1
127 +
128 +/* Define to 1 if you have the <strings.h> header file. */
129 +#define HAVE_STRINGS_H 1
130 +
131 +/* Define to 1 if you have the <string.h> header file. */
132 +#define HAVE_STRING_H 1
133 +
134 +/* Define to 1 if you have the `strnlen' function. */
135 +#define HAVE_STRNLEN 1
136 +
137 +/* Define to 1 if you have the <time.h> header file. */
138 +#define HAVE_TIME_H 1
139 +
140 +/* Define to 1 if you have the `vprintf' function. */
141 +#define HAVE_VPRINTF 1
142 +
143 +/* Define to the address where bug reports for this package should be sent. */
144 +#define PACKAGE_BUGREPORT ""
145 +
146 +/* Define to the full name of this package. */
147 +#define PACKAGE_NAME "tinydtls"
148 +
149 +/* Define to the full name and version of this package. */
150 +#define PACKAGE_STRING "tinydtls 0.8.1"
151 +
152 +/* Define to the one symbol short name of this package. */
153 +#define PACKAGE_TARNAME "tinydtls"
154 +
155 +/* Define to the home page for this package. */
156 +#define PACKAGE_URL ""
157 +
158 +/* Define to the version of this package. */
159 +#define PACKAGE_VERSION "0.8.1"
160 +
161 +/* Define to 1 if you have the ANSI C header files. */
162 +#define STDC_HEADERS 1
163 +
164 +/* Define to `__inline__' or `__inline' if that's what the C compiler
165 +   calls it, or to nothing if 'inline' is not supported under any name.  */
166 +#ifndef __cplusplus
167 +/* #undef inline */
168 +#endif
169 +
170 +/* Define to rpl_malloc if the replacement function should be used. */
171 +/* #undef malloc */
172 +/* Define to `unsigned int' if <sys/types.h> does not define. */
173 +
174 +/* #undef size_t */
175 +
176 +/************************************************************************/
177 +/* Specific Contiki platforms                                           */
178 +/************************************************************************/
179 +
180 +#ifdef CONTIKI
181 +
182 +#if CONTIKI_TARGET_ECONOTAG
183 +#  include "platform-specific/config-econotag.h"
184 +#endif /* CONTIKI_TARGET_ECONOTAG */
185 +
186 +#ifdef CONTIKI_TARGET_CC2538DK
187 +#  include "platform-specific/config-cc2538dk.h"
188 +#endif /* CONTIKI_TARGET_CC2538DK */
189 +
190 +#ifdef CONTIKI_TARGET_WISMOTE
191 +#  include "platform-specific/config-wismote.h"
192 +#endif /* CONTIKI_TARGET_WISMOTE */
193 +
194 +#ifdef CONTIKI_TARGET_SKY
195 +#  include "platform-specific/config-sky.h"
196 +#endif /* CONTIKI_TARGET_SKY */
197 +
198 +#ifdef CONTIKI_TARGET_MINIMAL_NET
199 +#  include "platform-specific/config-minimal-net.h"
200 +#endif /* CONTIKI_TARGET_MINIMAL_NET */
201 +
202 +#endif /* CONTIKI */
203 diff --git a/extlibs/tinydtls/tinydtls.h b/extlibs/tinydtls/tinydtls.h
204 new file mode 100644
205 index 0000000..3fa228a
206 --- /dev/null
207 +++ b/extlibs/tinydtls/tinydtls.h
208 @@ -0,0 +1,45 @@
209 +/* tinydtls.h.  Generated from tinydtls.h.in by configure.  */
210 +/* tinydtls -- a very basic DTLS implementation
211 + *
212 + * Copyright (C) 2011--2014 Olaf Bergmann <bergmann@tzi.org>
213 + * Copyright (C) 2013 Hauke Mehrtens <hauke@hauke-m.de>
214 + *
215 + * Permission is hereby granted, free of charge, to any person
216 + * obtaining a copy of this software and associated documentation
217 + * files (the "Software"), to deal in the Software without
218 + * restriction, including without limitation the rights to use, copy,
219 + * modify, merge, publish, distribute, sublicense, and/or sell copies
220 + * of the Software, and to permit persons to whom the Software is
221 + * furnished to do so, subject to the following conditions:
222 + *
223 + * The above copyright notice and this permission notice shall be
224 + * included in all copies or substantial portions of the Software.
225 + *
226 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
227 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
228 + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
229 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
230 + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
231 + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
232 + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
233 + * SOFTWARE.
234 + */
235 +
236 +/**
237 + * @file tinydtls.h
238 + * @brief public tinydtls API
239 + */
240 +
241 +#ifndef _DTLS_TINYDTLS_H_
242 +#define _DTLS_TINYDTLS_H_
243 +
244 +/** Defined to 1 if tinydtls is built with support for ECC */
245 +/* #undef DTLS_ECC */
246 +
247 +/** Defined to 1 if tinydtls is built with support for PSK */
248 +#define DTLS_PSK 1
249 +
250 +/** Defined to 1 if tinydtls is built for Contiki OS */
251 +/* #undef WITH_CONTIKI */
252 +
253 +#endif /* _DTLS_TINYDTLS_H_ */
254 -- 
255 1.7.9.5
256