1
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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
79
80
83
86
87
90
91
92
93
94
95
100
101
103
104
105
106
107
108
109
111
112
113
114
115
116
117
118
119
120
121
137
138
139
140
141
142
143
144
/* ... */
/* ... */
#ifndef LWIP_HDR_IP6_FRAG_H
#define LWIP_HDR_IP6_FRAG_H
#include "lwip/opt.h"
#include "lwip/pbuf.h"
#include "lwip/ip6_addr.h"
#include "lwip/ip6.h"
#include "lwip/netif.h"
5 includes
#ifdef __cplusplus
extern "C" {
#endif
#if LWIP_IPV6 && LWIP_IPV6_REASS
#define IP6_REASS_TMR_INTERVAL 1000
/* ... */
#ifndef IPV6_FRAG_COPYHEADER
#define IPV6_FRAG_COPYHEADER 0
#endif
/* ... */
#if IPV6_FRAG_COPYHEADER
#define IPV6_FRAG_SRC(ipr) ((ipr)->src)
#define IPV6_FRAG_DEST(ipr) ((ipr)->dest)
/* ... */#else
#define IPV6_FRAG_SRC(ipr) ((ipr)->iphdr->src)
#define IPV6_FRAG_DEST(ipr) ((ipr)->iphdr->dest)
/* ... */#endif
/* ... */
struct ip6_reassdata {
struct ip6_reassdata *next;
struct pbuf *p;
struct ip6_hdr *iphdr;
#if IPV6_FRAG_COPYHEADER
ip6_addr_p_t src;
ip6_addr_p_t dest;
/* ... */
u8_t orig_hdr[sizeof(struct ip6_frag_hdr) + sizeof(void*)];/* ... */
#else
u8_t orig_hdr[sizeof(struct ip6_frag_hdr)];/* ... */
#endif
u32_t identification;
u16_t datagram_len;
u8_t nexth;
u8_t timer;
#if LWIP_IPV6_SCOPES
u8_t src_zone;
u8_t dest_zone; /* ... */
#endif
...};
#define ip6_reass_init()
void ip6_reass_tmr(void);
struct pbuf *ip6_reass(struct pbuf *p);
/* ... */
#endif
#if LWIP_IPV6 && LWIP_IPV6_FRAG
#ifndef LWIP_PBUF_CUSTOM_REF_DEFINED
#define LWIP_PBUF_CUSTOM_REF_DEFINED
/* ... */
struct pbuf_custom_ref {
struct pbuf_custom pc;
struct pbuf *original;
...};/* ... */
#endif
err_t ip6_frag(struct pbuf *p, struct netif *netif, const ip6_addr_t *dest);
/* ... */
#endif
#ifdef __cplusplus
}extern "C" { ... }
#endif
/* ... */
#endif