1%%
2%% %CopyrightBegin%
3%%
4%% Copyright Ericsson AB 2013-2017. All Rights Reserved.
5%%
6%% Licensed under the Apache License, Version 2.0 (the "License");
7%% you may not use this file except in compliance with the License.
8%% You may obtain a copy of the License at
9%%
10%%     http://www.apache.org/licenses/LICENSE-2.0
11%%
12%% Unless required by applicable law or agreed to in writing, software
13%% distributed under the License is distributed on an "AS IS" BASIS,
14%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15%% See the License for the specific language governing permissions and
16%% limitations under the License.
17%%
18%% %CopyrightEnd%
19%%
20
21%%
22%%----------------------------------------------------------------------
23%% Purpose: Record and constant defenitions for the DTLS-handshake protocol
24%% that differs from TLS see RFC 6347
25%%----------------------------------------------------------------------
26-ifndef(dtls_handshake).
27-define(dtls_handshake, true).
28
29-include("ssl_handshake.hrl"). %% Common TLS and DTLS records and Constantes
30-include("ssl_api.hrl").
31
32-define(HELLO_VERIFY_REQUEST, 3).
33-define(HELLO_VERIFY_REQUEST_VERSION, {254, 255}).
34
35-record(client_hello, {
36	  client_version,
37	  random,
38	  session_id,          % opaque SessionID<0..32>
39	  cookie,              % opaque<2..2^16-1>
40	  cipher_suites,       % cipher_suites<2..2^16-1>
41	  compression_methods, % compression_methods<1..2^8-1>,
42	  %% Extensions
43	  extensions
44	 }).
45
46-record(hello_verify_request, {
47	  protocol_version,
48	  cookie
49	 }).
50
51-record(handshake_fragment, {
52	  type,
53	  length,
54	  message_seq,
55	  fragment_offset,
56	  fragment_length,
57	  fragment
58	 }).
59
60-endif. % -ifdef(dtls_handshake).
61