Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
icmp.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2015 José Ignacio Alamos <jialamos@uc.cl>
3
* SPDX-License-Identifier: LGPL-2.1-only
4
*/
5
6
#pragma once
7
23
#include "
byteorder.h
"
24
25
#ifdef __cplusplus
26
extern
"C"
{
27
#endif
28
36
typedef
struct
__attribute__((packed)){
37
uint8_t
type
;
38
uint8_t
code
;
39
network_uint16_t
csum
;
40
network_uint16_t
id
;
41
network_uint16_t
sn
;
42
}
icmp_echo_t
;
43
44
#ifdef __cplusplus
45
}
46
#endif
47
byteorder.h
Functions to work with different byte orders.
icmp_echo_t
Echo request and response message format.
Definition:
icmp.h:36
icmp_echo_t::type
uint8_t type
message type
Definition:
icmp.h:37
icmp_echo_t::csum
network_uint16_t csum
checksum
Definition:
icmp.h:39
icmp_echo_t::code
uint8_t code
message code
Definition:
icmp.h:38
icmp_echo_t::sn
network_uint16_t sn
sequence number
Definition:
icmp.h:41
icmp_echo_t::id
network_uint16_t id
identifier
Definition:
icmp.h:40
be_uint16_t
A 16 bit integer in big endian aka network byte order.
Definition:
byteorder.h:70
Generated on Mon Nov 24 2025 18:43:16 by
1.9.1