Choco OS
V.0.16.9.0
Join to the chocolate world
|
ChocoOS. More...
#include <oc_tcp.h>
Go to the source code of this file.
Data Structures | |
struct | Option_t |
Functions | |
static Option_t * | GetNextOption (Option_t *Option) |
returns pointer to the next TCP option | |
static Option_t * | GetFirstOption (oC_Tcp_Packet_t *Packet) |
returns pointer to the first TCP option inside TCP packet | |
static Option_t * | GetLastOption (oC_Tcp_Packet_t *Packet) |
returns pointer to the last TCP option in the packet | |
static Option_t * | GetOption (oC_Tcp_Packet_t *Packet, oC_Tcp_OptionKind_t OptionKind) |
searches for the given option in the TCP packet | |
static uint16_t | CalculateChecksum (oC_Tcp_Packet_t *Packet) |
calculates checksum for a TCP packet | |
oC_Tcp_Packet_t * | oC_Tcp_Packet_New (const oC_Net_Address_t *Source, const oC_Net_Address_t *Destination, uint16_t HeaderSize, const void *Data, uint16_t Size) |
Allocates memory for a TCP packet. More... | |
bool | oC_Tcp_Packet_Delete (oC_Tcp_Packet_t **Packet) |
releases memory allocated for a packet More... | |
oC_ErrorCode_t | oC_Tcp_Packet_SetData (oC_Tcp_Packet_t *Packet, const void *Data, uint16_t Size) |
sets data in the TCP packet | |
oC_ErrorCode_t | oC_Tcp_Packet_ReadData (oC_Tcp_Packet_t *Packet, void *outData, oC_MemorySize_t Size) |
reads data of the TCP packet | |
void | oC_Tcp_Packet_SetSize (oC_Tcp_Packet_t *Packet, uint16_t Size) |
sets size of the TCP packet | |
void * | oC_Tcp_Packet_GetDataReference (oC_Tcp_Packet_t *Packet) |
returns pointer to the data inside the packet More... | |
uint16_t | oC_Tcp_Packet_GetDataSize (oC_Tcp_Packet_t *Packet) |
returns size of data section inside TCP packet More... | |
bool | oC_Tcp_Packet_AddOption (oC_Tcp_Packet_t *Packet, oC_Tcp_OptionKind_t OptionKind, const void *Data, uint8_t Size) |
Adds TCP option to the packet. More... | |
oC_ErrorCode_t | oC_Tcp_Packet_ReadOption (oC_Tcp_Packet_t *Packet, oC_Tcp_OptionKind_t OptionKind, void *outData, uint8_t *Size) |
reads option from the TCP packet More... | |
bool | oC_Tcp_Packet_ClearOptions (oC_Tcp_Packet_t *Packet) |
clears options in the TCP packet More... | |
uint16_t | oC_Tcp_Packet_CalculateChecksum (oC_Tcp_Packet_t *Packet) |
calculates checksum for TCP packet | |
oC_Tcp_Header_t * | oC_Tcp_Packet_GetHeaderReference (oC_Tcp_Packet_t *Packet) |
returns TCP header reference | |
bool | oC_Tcp_Packet_ConvertFromNetworkEndianess (oC_Tcp_Packet_t *Packet) |
converts packet from network endianess | |
bool | oC_Tcp_Packet_ConvertToNetworkEndianess (oC_Tcp_Packet_t *Packet) |
converts packet to network endianess | |
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 St, Fifth Floor, Boston, MA 02110-1301 USA
Definition in file oc_tcp_packet.c.