ICMPv4 (icmpv4)
- Layer: L3 (network)
- Header: 8 octets (fixed)
Reached from
| Lower layer | Selector | Value |
|---|---|---|
ipv4 | protocol | 1 (0x01) |
Fields
| Field | Type | Default | Auto | Description |
|---|---|---|---|---|
type | enum(8) | 8 (echo_request) | Message type. | |
code | uint(8) | 0 | Message code, meaning depends on the type. | |
checksum | uint(16) | Internet checksum over the header and everything after it | Internet checksum over header and payload (Auto). | |
rest | bytes(4) | 00 00 00 00 | Type-specific 4-byte “rest of header” field. |
type
| Value | Name |
|---|---|
| 0 (0x00) | echo_reply |
| 3 (0x03) | destination_unreachable |
| 4 (0x04) | source_quench |
| 5 (0x05) | redirect |
| 8 (0x08) | echo_request |
| 9 (0x09) | router_advertisement |
| 10 (0x0a) | router_solicitation |
| 11 (0x0b) | time_exceeded |
| 12 (0x0c) | parameter_problem |
| 13 (0x0d) | timestamp_request |
| 14 (0x0e) | timestamp_reply |
| 15 (0x0f) | information_request |
| 16 (0x10) | information_reply |
| 17 (0x11) | address_mask_request |
| 18 (0x12) | address_mask_reply |
| 42 (0x2a) | extended_echo_request |
| 43 (0x2b) | extended_echo_reply |
Constraints
| Level | Rule |
|---|---|
| warning | type within 0..43 |
Sample templates
- ipip —
templates/protocols/encap/ipip.wpg.yaml - icmpv4-echo-request —
templates/protocols/l3/icmpv4-echo.wpg.yaml - scenario-ping-sweep-pattern —
templates/scenarios/ping-sweep-pattern.wpg.yaml - scenario-ttl-sweep —
templates/scenarios/ttl-sweep.wpg.yaml