Webserver+3d print
ipv4_frag.h File Reference
IPv4 fragmentation and reassembly. More...
Go to the source code of this file.
Data Structures | |
struct | Ipv4ReassemblyBuffer |
Reassembly buffer. More... | |
struct | Ipv4FragDesc |
Fragmented packet descriptor. More... | |
Functions | |
error_t | ipv4FragmentDatagram (NetInterface *interface, Ipv4PseudoHeader *pseudoHeader, uint16_t id, const NetBuffer *payload, size_t payloadOffset, uint8_t timeToLive) |
Fragment an IPv4 datagram into smaller packets. | |
void | ipv4ReassembleDatagram (NetInterface *interface, const Ipv4Header *packet, size_t length) |
IPv4 datagram reassembly algorithm. | |
void | ipv4FragTick (NetInterface *interface) |
Fragment reassembly timeout handler. | |
Ipv4FragDesc * | ipv4SearchFragQueue (NetInterface *interface, const Ipv4Header *packet) |
Search for a matching datagram in the reassembly queue. | |
void | ipv4FlushFragQueue (NetInterface *interface) |
Flush IPv4 reassembly queue. | |
Ipv4HoleDesc * | ipv4FindHole (Ipv4FragDesc *frag, uint16_t offset) |
Retrieve hole descriptor. | |
void | ipv4DumpHoleList (Ipv4FragDesc *frag) |
Dump hole descriptor list. |
Detailed Description
IPv4 fragmentation and reassembly.
License
Copyright (C) 2010-2017 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneTCP Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- Version:
- 1.7.6
Definition in file ipv4_frag.h.
Function Documentation
void ipv4DumpHoleList | ( | Ipv4FragDesc * | frag ) |
Dump hole descriptor list.
- Parameters:
-
[in] frag IPv4 fragment descriptor
Definition at line 613 of file ipv4_frag.c.
Ipv4HoleDesc* ipv4FindHole | ( | Ipv4FragDesc * | frag, |
uint16_t | offset | ||
) |
Retrieve hole descriptor.
- Parameters:
-
[in] frag IPv4 fragment descriptor [in] offset Offset of the hole
- Returns:
- A pointer to the hole descriptor is returned if the specified offset is valid. Otherwise NULL is returned
Definition at line 601 of file ipv4_frag.c.
void ipv4FlushFragQueue | ( | NetInterface * | interface ) |
Flush IPv4 reassembly queue.
- Parameters:
-
[in] interface Underlying network interface
Definition at line 580 of file ipv4_frag.c.
error_t ipv4FragmentDatagram | ( | NetInterface * | interface, |
Ipv4PseudoHeader * | pseudoHeader, | ||
uint16_t | id, | ||
const NetBuffer * | payload, | ||
size_t | payloadOffset, | ||
uint8_t | timeToLive | ||
) |
Fragment an IPv4 datagram into smaller packets.
- Parameters:
-
[in] interface Underlying network interface [in] pseudoHeader IPv4 pseudo header [in] id Fragment identification [in] payload Multi-part buffer containing the payload [in] payloadOffset Offset to the first payload byte [in] timeToLive TTL value
- Returns:
- Error code
Definition at line 68 of file ipv4_frag.c.
void ipv4FragTick | ( | NetInterface * | interface ) |
Fragment reassembly timeout handler.
This routine must be periodically called by the TCP/IP stack to handle IPv4 fragment reassembly timeout
- Parameters:
-
[in] interface Underlying network interface
Definition at line 412 of file ipv4_frag.c.
void ipv4ReassembleDatagram | ( | NetInterface * | interface, |
const Ipv4Header * | packet, | ||
size_t | length | ||
) |
IPv4 datagram reassembly algorithm.
- Parameters:
-
[in] interface Underlying network interface [in] packet Pointer to the IPv4 fragmented packet [in] length Packet length including header and payload
Definition at line 166 of file ipv4_frag.c.
Ipv4FragDesc* ipv4SearchFragQueue | ( | NetInterface * | interface, |
const Ipv4Header * | packet | ||
) |
Search for a matching datagram in the reassembly queue.
- Parameters:
-
[in] interface Underlying network interface [in] packet Incoming IPv4 packet
- Returns:
- Matching fragment descriptor
Definition at line 478 of file ipv4_frag.c.
Generated on Tue Jul 12 2022 17:10:20 by
