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;
46 } icmp_echo_t;
47 
48 
49 #ifdef __cplusplus
50 }
51 #endif
52 
53 #endif /* NET_ICMP_H */
54 
network_uint16_t sn
sequence number
Definition: icmp.h:45
A 16 bit integer in big endian aka network byte order.
Definition: byteorder.h:76
network_uint16_t id
identifier
Definition: icmp.h:44
uint8_t type
message type
Definition: icmp.h:41
network_uint16_t csum
checksum
Definition: icmp.h:43
Functions to work with different byte orders.
uint8_t code
message code
Definition: icmp.h:42
Echo request and response message format.
Definition: icmp.h:40