File: icmp.h

package info (click to toggle)
sendip 2.6-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid, trixie
  • size: 484 kB
  • sloc: ansic: 3,737; perl: 321; makefile: 55; sh: 13
file content (33 lines) | stat: -rw-r--r-- 671 bytes parent folder | download | duplicates (5)
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
30
31
32
33
/* icmp.h
 */
#ifndef _SENDIP_ICMP_H
#define _SENDIP_ICMP_H

#define ICMP6_ECHO_REQUEST 128
#define ICMP_ECHO          8

/* ICMP HEADER
 * Copied from glibc 2.2, reproduced here without code specific stuff
 */
typedef struct {
	u_int8_t type;
	u_int8_t code;
	u_int16_t check;
} icmp_header;


/* Defines for which parts have been modified
 */
#define ICMP_MOD_TYPE  1
#define ICMP_MOD_CODE  1<<1
#define ICMP_MOD_CHECK 1<<2

/* Options
 */
sendip_option icmp_opts[] = {
	{"t",1,"ICMP message type","ICMP_ECHO (8), or ICMP6_ECHO_REQUEST (128) if embedded in an IPv6 packet"},
	{"d",1,"ICMP code","0"},
	{"c",1,"ICMP checksum","Correct"}
};

#endif  /* _SENDIP_ICMP_H */