| 1 |
Value MATCHED_ADDRESS (\S+) |
| 2 |
Value Key MAP (\S+) |
| 3 |
Value Key SEQ (\d+) |
| 4 |
Value PFS (group\d|\s*) |
| 5 |
Value PEER (\S+) |
| 6 |
Value IKE (\S+) |
| 7 |
Value TRANSFORM (\S+(\s\S+)*?) |
| 8 |
Value SA (\d+) |
| 9 |
#Future# Value Fillup INTERFACE (\S+) |
| 10 |
|
| 11 |
Start |
| 12 |
# Value's address , start of block |
| 13 |
^crypto\smap\s${MAP}\s${SEQ}\smatch\saddress\s${MATCHED_ADDRESS}\s*$$ -> ReadBlockLines |
| 14 |
^. -> Error |
| 15 |
|
| 16 |
ReadBlockLines |
| 17 |
# Fake start, block "match address" to trigger recording of current block |
| 18 |
^crypto\s+map\s\S+\s\d+\s+match\s+address\s\S+\s*$$ -> Continue.Record |
| 19 |
# Real capture of "match address" start of new record |
| 20 |
^crypto\s+map\s+${MAP}\s+${SEQ}\s+match\s+address\s+${MATCHED_ADDRESS}\s*$$ |
| 21 |
# |
| 22 |
# Read other lines |
| 23 |
^crypto\s+map\s+${MAP}\s+${SEQ}\s+set\s+pfs\s+${PFS}\s*$$ |
| 24 |
^crypto\s+map\s+${MAP}\s+${SEQ}\s+set\s+peer\s+${PEER}\s*$$ |
| 25 |
^crypto\s+map\s+${MAP}\s+${SEQ}\s+set\s+${IKE}\s+transform-set\s+${TRANSFORM}\s*$$ |
| 26 |
^crypto\s+map\s+${MAP}\s+${SEQ}\s+set\s+security-association\s+lifetime\s+seconds\s+${SA}\s*$$ |
| 27 |
#Future# ^crypto\s+map\s+${MAP}\s+interface\s${INTERFACE}\s* |
| 28 |
# |
| 29 |
# Ignore rest |
| 30 |
^crypto\s+map\s+\S+\s+interface\s+\S+\s*$$ |
| 31 |
^crypto\s+map\s+\S+\s+\d+\sipsec-isakmp\s+dynamic\s+SYSTEM_DEFAULT_CRYPTO_MAP\s*$$ |
| 32 |
^. -> Error |