tinydtls
0.8.6
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
session.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
*
15
*******************************************************************************/
16
17
#ifndef _DTLS_SESSION_H_
18
#define _DTLS_SESSION_H_
19
20
#include <string.h>
21
22
#include "
tinydtls.h
"
23
#include "
global.h
"
24
25
#ifdef WITH_CONTIKI
26
#include "ip/uip.h"
27
typedef
struct
{
28
unsigned
char
size;
29
uip_ipaddr_t addr;
30
unsigned
short
port;
31
int
ifindex;
32
}
session_t
;
33
34
#else
/* WITH_CONTIKI */
35
36
#include <sys/socket.h>
37
#include <netinet/in.h>
38
#include <arpa/inet.h>
39
40
typedef
struct
{
41
socklen_t
size
;
42
union
{
43
struct
sockaddr sa;
44
struct
sockaddr_storage st;
45
struct
sockaddr_in sin;
46
struct
sockaddr_in6 sin6;
47
} addr;
48
uint8_t
ifindex
;
49
}
session_t
;
50
#endif
/* WITH_CONTIKI */
51
59
void
dtls_session_init
(
session_t
*sess);
60
65
int
dtls_session_equals
(
const
session_t
*a,
const
session_t
*b);
66
67
#endif
/* _DTLS_SESSION_H_ */
tinydtls.h
public tinydtls API
session_t
Definition:
session.h:40
session_t::size
socklen_t size
Definition:
session.h:41
global.h
session_t::ifindex
uint8_t ifindex
Definition:
session.h:48
dtls_session_init
void dtls_session_init(session_t *sess)
Definition:
session.c:63
uint8_t
unsigned char uint8_t
Definition:
uthash.h:79
dtls_session_equals
int dtls_session_equals(const session_t *a, const session_t *b)
Definition:
session.c:70
Generated on Thu Oct 31 2019 17:28:28 for tinydtls by
1.8.11