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;
42 } icmp_echo_t;
43 
44 #ifdef __cplusplus
45 }
46 #endif
47 
Functions to work with different byte orders.
Echo request and response message format.
Definition: icmp.h:36
uint8_t type
message type
Definition: icmp.h:37
network_uint16_t csum
checksum
Definition: icmp.h:39
uint8_t code
message code
Definition: icmp.h:38
network_uint16_t sn
sequence number
Definition: icmp.h:41
network_uint16_t id
identifier
Definition: icmp.h:40
A 16 bit integer in big endian aka network byte order.
Definition: byteorder.h:70