Webserver+3d print
raw_socket.h File Reference
TCP/IP raw sockets. More...
Go to the source code of this file.
Functions | |
error_t | rawSocketProcessIpPacket (NetInterface *interface, IpPseudoHeader *pseudoHeader, const NetBuffer *buffer, size_t offset) |
Process incoming IP packet. | |
void | rawSocketProcessEthPacket (NetInterface *interface, EthHeader *ethFrame, size_t length) |
Process incoming Ethernet packet. | |
error_t | rawSocketSendIpPacket (Socket *socket, const IpAddr *destIpAddr, const void *data, size_t length, size_t *written) |
Send an raw IP packet. | |
error_t | rawSocketSendEthPacket (Socket *socket, const void *data, size_t length, size_t *written) |
Send an raw Ethernet packet. | |
error_t | rawSocketReceiveIpPacket (Socket *socket, IpAddr *srcIpAddr, IpAddr *destIpAddr, void *data, size_t size, size_t *received, uint_t flags) |
Receive an IP packet from a raw socket. | |
error_t | rawSocketReceiveEthPacket (Socket *socket, void *data, size_t size, size_t *received, uint_t flags) |
Receive an Ethernet packet from a raw socket. | |
void | rawSocketUpdateEvents (Socket *socket) |
Update event state for raw sockets. |
Detailed Description
TCP/IP raw sockets.
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 raw_socket.h.
Function Documentation
void rawSocketProcessEthPacket | ( | NetInterface * | interface, |
EthHeader * | ethFrame, | ||
size_t | length | ||
) |
Process incoming Ethernet packet.
- Parameters:
-
[in] interface Underlying network interface [in] ethFrame Incoming Ethernet frame to process [in] length Total frame length
Definition at line 268 of file raw_socket.c.
error_t rawSocketProcessIpPacket | ( | NetInterface * | interface, |
IpPseudoHeader * | pseudoHeader, | ||
const NetBuffer * | buffer, | ||
size_t | offset | ||
) |
Process incoming IP packet.
- Parameters:
-
[in] interface Underlying network interface [in] pseudoHeader IPv4 or IPv6 pseudo header [in] buffer Multi-part buffer containing the IP packet [in] offset Offset to the first byte of the IP packet
- Returns:
- Error code
Definition at line 61 of file raw_socket.c.
error_t rawSocketReceiveEthPacket | ( | Socket * | socket, |
void * | data, | ||
size_t | size, | ||
size_t * | received, | ||
uint_t | flags | ||
) |
Receive an Ethernet packet from a raw socket.
- Parameters:
-
[in] socket Handle referencing the socket [out] data Buffer where to store the incoming data [in] size Maximum number of bytes that can be received [out] received Number of bytes that have been received [in] flags Set of flags that influences the behavior of this function
- Returns:
- Error code
Definition at line 681 of file raw_socket.c.
error_t rawSocketReceiveIpPacket | ( | Socket * | socket, |
IpAddr * | srcIpAddr, | ||
IpAddr * | destIpAddr, | ||
void * | data, | ||
size_t | size, | ||
size_t * | received, | ||
uint_t | flags | ||
) |
Receive an IP packet from a raw socket.
- Parameters:
-
[in] socket Handle referencing the socket [out] srcIpAddr Source IP address (optional) [out] destIpAddr Destination IP address (optional) [out] data Buffer where to store the incoming data [in] size Maximum number of bytes that can be received [out] received Number of bytes that have been received [in] flags Set of flags that influences the behavior of this function
- Returns:
- Error code
Definition at line 607 of file raw_socket.c.
error_t rawSocketSendEthPacket | ( | Socket * | socket, |
const void * | data, | ||
size_t | length, | ||
size_t * | written | ||
) |
Send an raw Ethernet packet.
- Parameters:
-
[in] socket Handle referencing the socket [in] data Pointer to raw data [in] length Length of the raw data [out] written Actual number of bytes written (optional parameter)
- Returns:
- Error code
Definition at line 491 of file raw_socket.c.
error_t rawSocketSendIpPacket | ( | Socket * | socket, |
const IpAddr * | destIpAddr, | ||
const void * | data, | ||
size_t | length, | ||
size_t * | written | ||
) |
Send an raw IP packet.
- Parameters:
-
[in] socket Handle referencing the socket [in] destIpAddr IP address of the target host [in] data Pointer to raw data [in] length Length of the raw data [out] written Actual number of bytes written (optional parameter)
- Returns:
- Error code
Definition at line 383 of file raw_socket.c.
void rawSocketUpdateEvents | ( | Socket * | socket ) |
Update event state for raw sockets.
- Parameters:
-
[in] socket Handle referencing the socket
Definition at line 743 of file raw_socket.c.
Generated on Tue Jul 12 2022 17:10:22 by
