1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
29
30
31
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
86
/* ... */
#ifndef __MAIN_H
#define __MAIN_H
#define USE_DHCP
#include "stm32f4xx_hal.h"
#ifdef USE_LCD
#include "stm324xg_eval_lcd.h"
#include "lcd_log.h"
/* ... */#endif
#include "stm324xg_eval.h"
#define HTTP_RESPONSE \
"HTTP/1.0 200 OK\r\nContent-Type: text/html\r\n\r\n" \
"<h2>mbed TLS Test Server</h2>\r\n" \
"<p>Successful connection using: %s</p>\r\n"...
#ifdef USE_DHCP
#define IP_ADDR0 0
#define IP_ADDR1 0
#define IP_ADDR2 0
#define IP_ADDR3 0
#define GW_ADDR0 0
#define GW_ADDR1 0
#define GW_ADDR2 0
#define GW_ADDR3 0
#define MASK_ADDR0 0
#define MASK_ADDR1 0
#define MASK_ADDR2 0
#define MASK_ADDR3 0
12 defines
/* ... */#else
#define IP_ADDR0 192
#define IP_ADDR1 168
#define IP_ADDR2 1
#define IP_ADDR3 1
#define GW_ADDR0 192
#define GW_ADDR1 168
#define GW_ADDR2 1
#define GW_ADDR3 1
#define MASK_ADDR0 255
#define MASK_ADDR1 255
#define MASK_ADDR2 254
#define MASK_ADDR3 0
#define GW_ADDRESS "157.168.9.254"
#define NETMASK_ADDRESS "255.255.254.0"
14 defines
/* ... */#endif
#ifdef MBEDTLS_MEMORY_BUFFER_ALLOC_C
#define MAX_MEM_SIZE 35 * 1024
#endif
void SSL_Server(void const *argument);
void Error_Handler(void);
void Success_Handler(void);
Exported constants
/* ... */#endif