Choco OS
V.0.16.9.0
Join to the chocolate world
|
Stores source of the ICMP module functions. More...
#include <oc_icmp.h>
#include <oc_module.h>
#include <oc_intman.h>
#include <oc_mutex.h>
#include <oc_netifman.h>
Go to the source code of this file.
Data Structures | |
struct | ReservationData_t |
struct | SavedPacket_t |
Functions | |
static ReservationData_t * | FindReservation (oC_Icmp_Type_t Type, oC_Process_t Process) |
finds reservation of port or process | |
static uint16_t | CalculateChecksum (oC_Icmp_Packet_t *Packet) |
calculates checksum for a packet | |
static bool | PacketFilterFunction (oC_Icmp_Packet_t *ReceivedPacket, oC_Icmp_Type_t *ExpectedType, oC_Netif_t Netif) |
checks if the packet that we received is that we expect | |
oC_ErrorCode_t | oC_Icmp_TurnOn (void) |
turns on ICMP module More... | |
oC_ErrorCode_t | oC_Icmp_TurnOff (void) |
turns off ICMP module More... | |
bool | oC_Icmp_IsTypeReserved (oC_Icmp_Type_t Type, oC_Process_t Process) |
checks if the given ICMP type is reserved More... | |
oC_ErrorCode_t | oC_Icmp_ReserveType (oC_Icmp_Type_t Type, oC_Time_t Timeout) |
reserves a ICMP type More... | |
oC_ErrorCode_t | oC_Icmp_ReleaseType (oC_Icmp_Type_t Type, oC_Time_t Timeout) |
releases a type More... | |
oC_ErrorCode_t | oC_Icmp_ReleaseAllTypesReservedBy (oC_Process_t Process, oC_Time_t Timeout) |
releases all types reserved by the process More... | |
oC_ErrorCode_t | oC_Icmp_CalculateChecksum (oC_Icmp_Packet_t *Packet, uint16_t *outChecksum) |
Calculates checksum for ICMP packet. More... | |
oC_Icmp_Packet_t * | oC_Icmp_Packet_New (Allocator_t PacketAllocator, oC_Net_PacketType_t Type, oC_Icmp_Type_t IcmpType, uint8_t Code, const void *Data, uint16_t Size) |
allocates memory for a ICMP packet More... | |
bool | oC_Icmp_Packet_SetSize (oC_Icmp_Packet_t *Packet, uint16_t Size) |
sets size of the packet | |
bool | oC_Icmp_Packet_Delete (oC_Icmp_Packet_t **Packet) |
release memory allocated for a ICMP packet | |
void * | oC_Icmp_Packet_GetMessageReference (oC_Icmp_Packet_t *Packet) |
returns reference to the message inside ICMP packet | |
oC_ErrorCode_t | oC_Icmp_Send (oC_Netif_t Netif, const oC_Net_Address_t *Destination, oC_Icmp_Packet_t *Packet, oC_Time_t Timeout) |
sends ICMP packet More... | |
oC_ErrorCode_t | oC_Icmp_Receive (oC_Netif_t Netif, oC_Icmp_Packet_t *outPacket, oC_Icmp_Type_t Type, oC_Time_t Timeout) |
receives ICMP packet More... | |
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_icmp.c.