The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
icmp.c File Reference

ICMP (see icmp.h). More...

#include "icmp.h"
#include "byteorder.h"
#include "checksum.h"
#include "common/memory.h"
#include "inet_socket.h"

Macros

#define HEADER_SIZE   8

Functions

void icmp_receive (netif_t *netif, const ipv4_header_t *ip, const uint8_t *message, uint32_t length)
 an ICMP message (net_lock held): answers an echo request.
void icmp_send_unreachable (const ipv4_header_t *ip, uint8_t code)
 tell the sender of a packet that it cannot be delivered (net_lock held).

Detailed Description

ICMP (see icmp.h).

Macro Definition Documentation

◆ HEADER_SIZE

#define HEADER_SIZE   8

Function Documentation

◆ icmp_receive()

void icmp_receive ( netif_t * netif,
const ipv4_header_t * ip,
const uint8_t * message,
uint32_t length )

an ICMP message (net_lock held): answers an echo request.

◆ icmp_send_unreachable()

void icmp_send_unreachable ( const ipv4_header_t * ip,
uint8_t code )

tell the sender of a packet that it cannot be delivered (net_lock held).

nothing is sent for a broadcast or an ICMP error.