Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Loading...
Searching...
No Matches
icmp.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2015 José Ignacio Alamos <jialamos@uc.cl>
3
*
4
* This file is subject to the terms and conditions of the GNU Lesser
5
* General Public License v2.1. See the file LICENSE in the top level
6
* directory for more details.
7
*/
8
23
#ifndef NET_ICMP_H
24
#define NET_ICMP_H
25
26
#include "
byteorder.h
"
27
28
#ifdef __cplusplus
29
extern
"C"
{
30
#endif
31
39
typedef
struct
__attribute__((packed)){
40
uint8_t
type
;
41
uint8_t
code
;
42
network_uint16_t
csum
;
43
network_uint16_t
id
;
44
network_uint16_t
sn
;
45
}
icmp_echo_t
;
46
47
#ifdef __cplusplus
48
}
49
#endif
50
51
#endif
/* NET_ICMP_H */
byteorder.h
Functions to work with different byte orders.
icmp_echo_t
Echo request and response message format.
Definition
icmp.h:39
icmp_echo_t::type
uint8_t type
message type
Definition
icmp.h:40
icmp_echo_t::csum
network_uint16_t csum
checksum
Definition
icmp.h:42
icmp_echo_t::code
uint8_t code
message code
Definition
icmp.h:41
icmp_echo_t::sn
network_uint16_t sn
sequence number
Definition
icmp.h:44
icmp_echo_t::id
network_uint16_t id
identifier
Definition
icmp.h:43
be_uint16_t
A 16 bit integer in big endian aka network byte order.
Definition
byteorder.h:74
Generated on Sat Nov 16 2024 04:50:52 by
1.9.8