forked from pandax381/microps
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathicmp.h
More file actions
29 lines (22 loc) · 707 Bytes
/
icmp.h
File metadata and controls
29 lines (22 loc) · 707 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef ICMP_H
#define ICMP_H
#include <stddef.h>
#include <stdint.h>
#include "ip.h"
#define ICMP_HDR_SIZE 8
#define ICMP_TYPE_ECHOREPLY 0
#define ICMP_TYPE_DEST_UNREACH 3
#define ICMP_TYPE_SOURCE_QUENCH 4
#define ICMP_TYPE_REDIRECT 5
#define ICMP_TYPE_ECHO 8
#define ICMP_TYPE_TIME_EXCEEDED 11
#define ICMP_TYPE_PARAM_PROBLEM 12
#define ICMP_TYPE_TIMESTAMP 13
#define ICMP_TYPE_TIMESTAMPREPLY 14
#define ICMP_TYPE_INFO_REQUEST 15
#define ICMP_TYPE_INFO_REPLY 16
extern int
icmp_output(uint8_t type, uint8_t code, uint32_t values, const uint8_t *data, size_t len, ip_addr_t src, ip_addr_t dst);
extern int
icmp_init(void);
#endif