blob: 23e0a7e75fa9ec33ef9dfaa2153aadf17f18f973 (
plain)
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
|
# dup to 192.168.2.1 device eth0
ip test-ip4 input
[ immediate reg 1 0x0102a8c0 ]
[ immediate reg 2 0x00000002 0x00000000 0x00000000 0x00000000 ]
[ dup sreg_addr 1 sreg_dev 2 ]
# dup to ip saddr map { 192.168.2.120 : 192.168.2.1 } device eth0
map%d test-ip4 b
map%d test-ip4 0
element 7802a8c0 : 0102a8c0 0 [end]
ip test-ip4 input
[ payload load 4b @ network header + 12 => reg 1 ]
[ lookup reg 1 set map%d dreg 1 ]
[ immediate reg 2 0x00000002 0x00000000 0x00000000 0x00000000 ]
[ dup sreg_addr 1 sreg_dev 2 ]
# dup to ip saddr map { 192.168.2.120 : 192.168.2.1 } device eth0
map%d test-ip4 b
map%d test-ip4 0
element 7802a8c0 : 0102a8c0 0 [end]
ip test-ip4 input
[ payload load 4b @ network header + 12 => reg 1 ]
[ lookup reg 1 set map%d dreg 1 ]
[ immediate reg 2 0x00000002 0x00000000 0x00000000 0x00000000 ]
[ dup sreg_addr 1 sreg_dev 2 ]
|