Loading...
Searching...
No Matches
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
22
23#include "byteorder.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
36typedef struct __attribute__((packed)){
37 uint8_t type;
38 uint8_t code;
43
44#ifdef __cplusplus
45}
46#endif
47
Functions to work with different byte orders.
be_uint16_t network_uint16_t
A 16 bit integer in network byte order.
Definition byteorder.h:104
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