39#ifndef IPV6_FRAG_SUPPORT
40 #define IPV6_FRAG_SUPPORT ENABLED
41#elif (IPV6_FRAG_SUPPORT != ENABLED && IPV6_FRAG_SUPPORT != DISABLED)
42 #error IPV6_FRAG_SUPPORT parameter is not valid
46#ifndef IPV6_OVERLAPPING_FRAG_SUPPORT
47 #define IPV6_OVERLAPPING_FRAG_SUPPORT DISABLED
48#elif (IPV6_OVERLAPPING_FRAG_SUPPORT != ENABLED && IPV6_OVERLAPPING_FRAG_SUPPORT != DISABLED)
49 #error IPV6_OVERLAPPING_FRAG_SUPPORT parameter is not valid
53#ifndef IPV6_FRAG_TICK_INTERVAL
54 #define IPV6_FRAG_TICK_INTERVAL 1000
55#elif (IPV6_FRAG_TICK_INTERVAL < 10)
56 #error IPV6_FRAG_TICK_INTERVAL parameter is not valid
61#ifndef IPV6_MAX_FRAG_DATAGRAMS
62 #define IPV6_MAX_FRAG_DATAGRAMS 4
63#elif (IPV6_MAX_FRAG_DATAGRAMS < 1)
64 #error IPV6_MAX_FRAG_DATAGRAMS parameter is not valid
68#ifndef IPV6_MAX_FRAG_DATAGRAM_SIZE
69 #define IPV6_MAX_FRAG_DATAGRAM_SIZE 8192
70#elif (IPV6_MAX_FRAG_DATAGRAM_SIZE < 1280)
71 #error IPV6_MAX_FRAG_DATAGRAM_SIZE parameter is not valid
75#ifndef IPV6_FRAG_TIME_TO_LIVE
76 #define IPV6_FRAG_TIME_TO_LIVE 15000
77#elif (IPV6_FRAG_TIME_TO_LIVE < 1000)
78 #error IPV6_FRAG_TIME_TO_LIVE parameter is not valid
82#define IPV6_INFINITY 0xFFFF
91#if defined(__CWCC__) || defined(_WIN32)
109#if defined(__CWCC__) || defined(_WIN32)
121 uint_t maxChunkCount;
122 ChunkDesc chunk[N(IPV6_MAX_FRAG_DATAGRAM_SIZE) + 1];
145error_t ipv6FragmentDatagram(NetInterface *interface,
146 const Ipv6PseudoHeader *pseudoHeader,
const NetBuffer *payload,
147 size_t payloadOffset,
size_t pathMtu, NetTxAncillary *ancillary);
149void ipv6ParseFragmentHeader(NetInterface *interface,
const NetBuffer *ipPacket,
150 size_t ipPacketOffset,
size_t fragHeaderOffset,
size_t nextHeaderOffset,
151 NetRxAncillary *ancillary);
153void ipv6FragTick(NetInterface *interface);
155Ipv6FragDesc *ipv6SearchFragQueue(NetInterface *interface,
156 const Ipv6Header *packet,
const Ipv6FragmentHeader *header);
158void ipv6FlushFragQueue(NetInterface *interface);
160Ipv6HoleDesc *ipv6FindHole(
Ipv6FragDesc *frag, uint16_t offset);
error_t
Error codes.
Definition error.h:43
IPv6 (Internet Protocol Version 6)
typedef __packed_struct
Hole descriptor.
Definition ipv6_frag.h:101
uint32_t systime_t
System time.
Definition os_port_none.h:90
Structure describing a chunk of data.
Definition net_mem.h:77
Fragmented packet descriptor.
Definition ipv6_frag.h:131
size_t fragPartLength
Length of the fragmentable part.
Definition ipv6_frag.h:135
uint32_t identification
Fragment identification field.
Definition ipv6_frag.h:133
size_t unfragPartLength
Length of the unfragmentable part.
Definition ipv6_frag.h:134
uint16_t firstHole
Index of the first hole.
Definition ipv6_frag.h:136
systime_t timestamp
Time at which the first fragment was received.
Definition ipv6_frag.h:132
Ipv6ReassemblyBuffer buffer
Buffer containing the reassembled datagram.
Definition ipv6_frag.h:137
Reassembly buffer.
Definition ipv6_frag.h:119
Structure describing a buffer that spans multiple chunks.
Definition net_mem.h:89