This repository was archived by the owner on Apr 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Example: ICMP Echo Reply
Akihiro TAKASE edited this page Jun 22, 2021
·
6 revisions
- Reply to ARP request
- Reply to ICMP echo request
[vagrant@ps app]$ ./bin/pstack server
[D] 2021/22/06 14:25:56 -------------------------------------------------------
I N I T I A L I Z E D E V I C E S
-------------------------------------------------------
[D] 2021/22/06 14:25:56 device was registered
type: Loopback
name: net0 ()
addr: 00:00:00:00:00:00
[D] 2021/22/06 14:25:56 interface was attached
ip: 127.0.0.1
device: net0 ()
[D] 2021/22/06 14:25:56 route was registered
network: 127.0.0.0
netmask: 255.0.0.0
unicast: 127.0.0.1
next hop: 0.0.0.0
device: net0 ()
[D] 2021/22/06 14:25:56 device was registered
type: Ethernet
name: net1 (tap0)
addr: 00:00:5e:00:53:01
[D] 2021/22/06 14:25:56 interface was attached
ip: 192.0.2.2
device: net1 (tap0)
[D] 2021/22/06 14:25:56 route was registered
network: 192.0.0.0
netmask: 255.255.255.0
unicast: 192.0.2.2
next hop: 0.0.0.0
device: net1 (tap0)
[D] 2021/22/06 14:25:56 default gateway was registered
network: 0.0.0.0
netmask: 0.0.0.0
unicast: 192.0.2.2
next hop: 192.0.2.1
device: net1 (tap0)
[D] 2021/22/06 14:25:56 -------------------------------------------------------
S T A R T S E R V I C E S
-------------------------------------------------------
[D] 2021/22/06 14:25:56 arp service started
[D] 2021/22/06 14:25:56 ethernet service started
[D] 2021/22/06 14:25:56 icmp service started
[D] 2021/22/06 14:25:56 ip service started
[D] 2021/22/06 14:25:56 monitor service started
[D] 2021/22/06 14:25:56 device was opened
type: Loopback
name: net0 ()
[D] 2021/22/06 14:25:56 device was opened
type: Ethernet
name: net1 (tap0)
[D] 2021/22/06 14:25:56 tcp service started
[D] 2021/22/06 14:25:56 event occurred
events: 1
device: net1 (tap0)
[D] 2021/22/06 14:25:56 all service workers started
[D] 2021/22/06 14:25:56 ///////////////////////////////////////////////////////
A P P L I C A T I O N S T A R T E D
///////////////////////////////////////////////////////
[D] 2021/22/06 14:25:56 address and port assigned: addr = 192.0.2.2, port = 12345
[D] 2021/22/06 14:25:57 event occurred
events: 1
device: net1 (tap0)
[D] 2021/22/06 14:26:03 event occurred
events: 1
device: net1 (tap0)
[D] 2021/22/06 14:26:03 incoming ethernet frame (42 bytes)
type: ARP (0x0806)
dst: ff:ff:ff:ff:ff:ff
src: e2:20:76:2d:5d:2d
payload: 00 01 08 00 06 04 00 01 e2 20 76 2d 5d 2d c0 00 02 01 00 00
00 00 00 00 c0 00 02 02
[D] 2021/22/06 14:26:03 incoming arp packet
hardware type: Ethernet (10Mb)
protocol Type: IPv4
hardware address length: 6
protocol address length: 4
opcode: REQUEST (1)
sender hardware address: e2:20:76:2d:5d:2d
sender protocol address: 192.0.2.1
target hardware address: 00:00:00:00:00:00
target protocol address: 192.0.2.2
[D] 2021/22/06 14:26:03 outgoing arp packet
hardware type: Ethernet (10Mb)
protocol Type: IPv4
hardware address length: 6
protocol address length: 4
opcode: REPLY (2)
sender hardware address: 00:00:5e:00:53:01
sender protocol address: 192.0.2.2
target hardware address: e2:20:76:2d:5d:2d
target protocol address: 192.0.2.1
[D] 2021/22/06 14:26:03 outgoing ethernet frame (42 bytes)
type: ARP (0x0806)
dst: e2:20:76:2d:5d:2d
src: 00:00:5e:00:53:01
payload: 00 01 08 00 06 04 00 02 00 00 5e 00 53 01 c0 00 02 02 e2 20
76 2d 5d 2d c0 00 02 01
[D] 2021/22/06 14:26:03 event occurred
events: 1
device: net1 (tap0)
[D] 2021/22/06 14:26:03 incoming ethernet frame (98 bytes)
type: IPv4 (0x0800)
dst: 00:00:5e:00:53:01
src: e2:20:76:2d:5d:2d
payload: 45 00 00 54 db 37 40 00 40 01 db 6d c0 00 02 01 c0 00 02 02
08 00 81 99 00 11 00 01 fb f2 d1 60 00 00 00 00 e0 2d 0a 00
00 00 00 00 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33
34 35 36 37
[D] 2021/22/06 14:26:03 incoming ip packet
version: 4
ihl: 5
type of service: 0b00000000
total length: 84 bytes (payload: 64 bytes)
id: 56119
flags: 0b010
fragment offset: 0
ttl: 64
protocol: ICMP (1)
checksum: 0xdb6d
source address: 192.0.2.1
destination address: 192.0.2.2
payload: 37 40 00 40 01 db 6d c0 00 02 01 c0 00 02 02 08 00 81 99 00
11 00 01 fb f2 d1 60 00 00 00 00 e0 2d 0a 00 00 00 00 00 10
11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24
25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 37
[D] 2021/22/06 14:26:03 incoming icmp packet
type: Echo (8)
code: 0
checksum: 0x8199
payload: fb f2 d1 60 00 00 00 00 e0 2d 0a 00 00 00 00 00 10 11 12 13
14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25 26 27
28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 37
[D] 2021/22/06 14:26:03 outgoing icmp packet
type: Echo Reply (0)
code: 0
checksum: 0x8999
id: 17
seq: 1
payload: fb f2 d1 60 00 00 00 00 e0 2d 0a 00 00 00 00 00 10 11 12 13
14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25 26 27
28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 37
[D] 2021/22/06 14:26:03 outgoing ip packet
version: 4
ihl: 5
type of service: 0b00000000
total length: 84 bytes (payload: 64 bytes)
id: 0
flags: 0b000
fragment offset: 0
ttl: 255
protocol: ICMP (1)
checksum: 0x37a5
source address: 192.0.2.2
destination address: 192.0.2.1
payload: 00 00 00 ff 01 37 a5 c0 00 02 02 c0 00 02 01 00 00 89 99 00
11 00 01 fb f2 d1 60 00 00 00 00 e0 2d 0a 00 00 00 00 00 10
11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24
25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 37
[D] 2021/22/06 14:26:03 outgoing ethernet frame (98 bytes)
type: IPv4 (0x0800)
dst: e2:20:76:2d:5d:2d
src: 00:00:5e:00:53:01
payload: 45 00 00 54 00 00 00 00 ff 01 37 a5 c0 00 02 02 c0 00 02 01
00 00 89 99 00 11 00 01 fb f2 d1 60 00 00 00 00 e0 2d 0a 00
00 00 00 00 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33
34 35 36 37
[D] 2021/22/06 14:26:04 event occurred
events: 1
device: net1 (tap0)
[D] 2021/22/06 14:26:04 incoming ethernet frame (98 bytes)
type: IPv4 (0x0800)
dst: 00:00:5e:00:53:01
src: e2:20:76:2d:5d:2d
payload: 45 00 00 54 dc 55 40 00 40 01 da 4f c0 00 02 01 c0 00 02 02
08 00 c9 90 00 11 00 02 fc f2 d1 60 00 00 00 00 97 35 0a 00
00 00 00 00 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33
34 35 36 37
[D] 2021/22/06 14:26:04 incoming ip packet
version: 4
ihl: 5
type of service: 0b00000000
total length: 84 bytes (payload: 64 bytes)
id: 56405
flags: 0b010
fragment offset: 0
ttl: 64
protocol: ICMP (1)
checksum: 0xda4f
source address: 192.0.2.1
destination address: 192.0.2.2
payload: 55 40 00 40 01 da 4f c0 00 02 01 c0 00 02 02 08 00 c9 90 00
11 00 02 fc f2 d1 60 00 00 00 00 97 35 0a 00 00 00 00 00 10
11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24
25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 37
[D] 2021/22/06 14:26:04 incoming icmp packet
type: Echo (8)
code: 0
checksum: 0xc990
payload: fc f2 d1 60 00 00 00 00 97 35 0a 00 00 00 00 00 10 11 12 13
14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25 26 27
28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 37
[D] 2021/22/06 14:26:04 outgoing icmp packet
type: Echo Reply (0)
code: 0
checksum: 0xd190
id: 17
seq: 2
payload: fc f2 d1 60 00 00 00 00 97 35 0a 00 00 00 00 00 10 11 12 13
14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25 26 27
28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 37
[D] 2021/22/06 14:26:04 outgoing ip packet
version: 4
ihl: 5
type of service: 0b00000000
total length: 84 bytes (payload: 64 bytes)
id: 1
flags: 0b000
fragment offset: 0
ttl: 255
protocol: ICMP (1)
checksum: 0x37a4
source address: 192.0.2.2
destination address: 192.0.2.1
payload: 01 00 00 ff 01 37 a4 c0 00 02 02 c0 00 02 01 00 00 d1 90 00
11 00 02 fc f2 d1 60 00 00 00 00 97 35 0a 00 00 00 00 00 10
11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24
25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 37
[D] 2021/22/06 14:26:04 outgoing ethernet frame (98 bytes)
type: IPv4 (0x0800)
dst: e2:20:76:2d:5d:2d
src: 00:00:5e:00:53:01
payload: 45 00 00 54 00 01 00 00 ff 01 37 a4 c0 00 02 02 c0 00 02 01
00 00 d1 90 00 11 00 02 fc f2 d1 60 00 00 00 00 97 35 0a 00
00 00 00 00 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33
34 35 36 37
[D] 2021/22/06 14:26:05 event occurred
events: 1
device: net1 (tap0)
[D] 2021/22/06 14:26:05 incoming ethernet frame (98 bytes)
type: IPv4 (0x0800)
dst: 00:00:5e:00:53:01
src: e2:20:76:2d:5d:2d
payload: 45 00 00 54 dd 63 40 00 40 01 d9 41 c0 00 02 01 c0 00 02 02
08 00 2d 74 00 11 00 03 fd f2 d1 60 00 00 00 00 32 51 0a 00
00 00 00 00 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33
34 35 36 37
[D] 2021/22/06 14:26:05 incoming ip packet
version: 4
ihl: 5
type of service: 0b00000000
total length: 84 bytes (payload: 64 bytes)
id: 56675
flags: 0b010
fragment offset: 0
ttl: 64
protocol: ICMP (1)
checksum: 0xd941
source address: 192.0.2.1
destination address: 192.0.2.2
payload: 63 40 00 40 01 d9 41 c0 00 02 01 c0 00 02 02 08 00 2d 74 00
11 00 03 fd f2 d1 60 00 00 00 00 32 51 0a 00 00 00 00 00 10
11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24
25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 37
[D] 2021/22/06 14:26:05 incoming icmp packet
type: Echo (8)
code: 0
checksum: 0x2d74
payload: fd f2 d1 60 00 00 00 00 32 51 0a 00 00 00 00 00 10 11 12 13
14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25 26 27
28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 37
[D] 2021/22/06 14:26:05 outgoing icmp packet
type: Echo Reply (0)
code: 0
checksum: 0x3574
id: 17
seq: 3
payload: fd f2 d1 60 00 00 00 00 32 51 0a 00 00 00 00 00 10 11 12 13
14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25 26 27
28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 37
[D] 2021/22/06 14:26:05 outgoing ip packet
version: 4
ihl: 5
type of service: 0b00000000
total length: 84 bytes (payload: 64 bytes)
id: 2
flags: 0b000
fragment offset: 0
ttl: 255
protocol: ICMP (1)
checksum: 0x37a3
source address: 192.0.2.2
destination address: 192.0.2.1
payload: 02 00 00 ff 01 37 a3 c0 00 02 02 c0 00 02 01 00 00 35 74 00
11 00 03 fd f2 d1 60 00 00 00 00 32 51 0a 00 00 00 00 00 10
11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24
25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 37
[D] 2021/22/06 14:26:05 outgoing ethernet frame (98 bytes)
type: IPv4 (0x0800)
dst: e2:20:76:2d:5d:2d
src: 00:00:5e:00:53:01
payload: 45 00 00 54 00 02 00 00 ff 01 37 a3 c0 00 02 02 c0 00 02 01
00 00 35 74 00 11 00 03 fd f2 d1 60 00 00 00 00 32 51 0a 00
00 00 00 00 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33
34 35 36 37
[D] 2021/22/06 14:26:06 event occurred
events: 1
device: net1 (tap0)
[D] 2021/22/06 14:26:06 incoming ethernet frame (98 bytes)
type: IPv4 (0x0800)
dst: 00:00:5e:00:53:01
src: e2:20:76:2d:5d:2d
payload: 45 00 00 54 de a9 40 00 40 01 d7 fb c0 00 02 01 c0 00 02 02
08 00 af 6c 00 11 00 04 fe f2 d1 60 00 00 00 00 af 57 0a 00
00 00 00 00 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33
34 35 36 37
[D] 2021/22/06 14:26:06 incoming ip packet
version: 4
ihl: 5
type of service: 0b00000000
total length: 84 bytes (payload: 64 bytes)
id: 57001
flags: 0b010
fragment offset: 0
ttl: 64
protocol: ICMP (1)
checksum: 0xd7fb
source address: 192.0.2.1
destination address: 192.0.2.2
payload: a9 40 00 40 01 d7 fb c0 00 02 01 c0 00 02 02 08 00 af 6c 00
11 00 04 fe f2 d1 60 00 00 00 00 af 57 0a 00 00 00 00 00 10
11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24
25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 37
[D] 2021/22/06 14:26:06 incoming icmp packet
type: Echo (8)
code: 0
checksum: 0xaf6c
payload: fe f2 d1 60 00 00 00 00 af 57 0a 00 00 00 00 00 10 11 12 13
14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25 26 27
28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 37
[D] 2021/22/06 14:26:06 outgoing icmp packet
type: Echo Reply (0)
code: 0
checksum: 0xb76c
id: 17
seq: 4
payload: fe f2 d1 60 00 00 00 00 af 57 0a 00 00 00 00 00 10 11 12 13
14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25 26 27
28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 37
[D] 2021/22/06 14:26:06 outgoing ip packet
version: 4
ihl: 5
type of service: 0b00000000
total length: 84 bytes (payload: 64 bytes)
id: 3
flags: 0b000
fragment offset: 0
ttl: 255
protocol: ICMP (1)
checksum: 0x37a2
source address: 192.0.2.2
destination address: 192.0.2.1
payload: 03 00 00 ff 01 37 a2 c0 00 02 02 c0 00 02 01 00 00 b7 6c 00
11 00 04 fe f2 d1 60 00 00 00 00 af 57 0a 00 00 00 00 00 10
11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24
25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 37
[D] 2021/22/06 14:26:06 outgoing ethernet frame (98 bytes)
type: IPv4 (0x0800)
dst: e2:20:76:2d:5d:2d
src: 00:00:5e:00:53:01
payload: 45 00 00 54 00 03 00 00 ff 01 37 a2 c0 00 02 02 c0 00 02 01
00 00 b7 6c 00 11 00 04 fe f2 d1 60 00 00 00 00 af 57 0a 00
00 00 00 00 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33
34 35 36 37