Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
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
32
40
typedef
struct
__attribute__((packed)){
41
uint8_t
type
;
42
uint8_t
code
;
43
network_uint16_t
csum
;
44
network_uint16_t
id
;
45
network_uint16_t
sn
;
46
}
icmp_echo_t
;
47
48
49
#ifdef __cplusplus
50
}
51
#endif
52
53
#endif
/* NET_ICMP_H */
54
byteorder.h
Functions to work with different byte orders.
be_uint16_t
A 16 bit integer in big endian aka network byte order.
Definition:
byteorder.h:77
icmp_echo_t::sn
network_uint16_t sn
sequence number
Definition:
icmp.h:45
icmp_echo_t::csum
network_uint16_t csum
checksum
Definition:
icmp.h:43
icmp_echo_t::id
network_uint16_t id
identifier
Definition:
icmp.h:44
icmp_echo_t::code
uint8_t code
message code
Definition:
icmp.h:42
icmp_echo_t::type
uint8_t type
message type
Definition:
icmp.h:41
icmp_echo_t
Echo request and response message format.
Definition:
icmp.h:40
Generated on Tue Nov 24 2020 19:46:52 by
1.8.17