| 1 |
Value DESTINATION_ADDRESS ([0-9a-fA-F]{4}\.[0-9a-fA-F]{4}\.[0-9a-fA-F]{4}) |
| 2 |
Value TYPE (\S+) |
| 3 |
Value VLAN (\S+) |
| 4 |
Value List DESTINATION_PORT ([^,\s]+) |
| 5 |
|
| 6 |
Start |
| 7 |
^Destination\s+Address\s+Address\s+Type\s+VLAN\s+Destination\s+Port -> TYPE1 |
| 8 |
^\s+vlan\s+mac address\s+type\s+learn\s+age\s+ports -> TYPE2 |
| 9 |
^\s+vlan\s+mac address\s+type\s+protocols\s+port -> TYPE3 |
| 10 |
^Vlan\s+Mac Address\s+Type\s+Ports -> TYPE4 |
| 11 |
# Capture time-stamp if vty line has command time-stamping turned on |
| 12 |
^Load\s+for\s+ |
| 13 |
^Time\s+source\s+is |
| 14 |
|
| 15 |
TYPE1 |
| 16 |
^${DESTINATION_ADDRESS}\s+${TYPE}\s+${VLAN}\s+${DESTINATION_PORT}$$ -> Record |
| 17 |
^-+\s+-+ |
| 18 |
^Displaying\s+entries |
| 19 |
^Destination\s+Address\s+Address\s+Type\s+VLAN\s+Destination\s+Port |
| 20 |
^\s*$$ |
| 21 |
^Multicast\s+Entries -> End |
| 22 |
^. -> Error |
| 23 |
|
| 24 |
TYPE2 |
| 25 |
# Order of the group in brackets here matters |
| 26 |
^\s*(\*\s+R|\*|R|\s)\s*(\d+|-+|[Nn]/[Aa]) -> Continue.Record |
| 27 |
# using 20 spaces should ensure that lines only match destination port flowing to next line |
| 28 |
^\s{20}\s+${DESTINATION_PORT}(\s+|,\s*)\S -> Continue |
| 29 |
^\s{20}\s+${DESTINATION_PORT},*\s*$$ |
| 30 |
^\s{20}\s+[^,\s]+(\s+|,\s*)${DESTINATION_PORT}(\s+|,\s*)\S -> Continue |
| 31 |
^\s{20}\s+[^,\s]+(\s+|,\s*)${DESTINATION_PORT},*\s*$$ |
| 32 |
^\s{20}\s+([^,\s]+(\s+|,\s*)){2}${DESTINATION_PORT}(\s+|,\s*)\S -> Continue |
| 33 |
^\s{20}\s+([^,\s]+(\s+|,\s*)){2}${DESTINATION_PORT},*\s*$$ |
| 34 |
^\s{20}\s+([^,\s]+(\s+|,\s*)){3}${DESTINATION_PORT}(\s+|,\s*)\S -> Continue |
| 35 |
^\s{20}\s+([^,\s]+(\s+|,\s*)){3}${DESTINATION_PORT},*\s*$$ |
| 36 |
^\s{20}\s+([^,\s]+(\s+|,\s*)){4}${DESTINATION_PORT}(\s+|,\s*)\S -> Continue |
| 37 |
^\s{20}\s+([^,\s]+(\s+|,\s*)){4}${DESTINATION_PORT},*\s*$$ |
| 38 |
^\s{20}\s+([^,\s]+(\s+|,\s*)){5}${DESTINATION_PORT}(\s+|,\s*)\S -> Continue |
| 39 |
^\s{20}\s+([^,\s]+(\s+|,\s*)){5}${DESTINATION_PORT},*\s*$$ |
| 40 |
^\s*(\*\s+R|\*|R|\s)\s*${VLAN}\s+${DESTINATION_ADDRESS}\s+${TYPE}\s+\S+\s+\S+\s*$$ |
| 41 |
^\s*(\*\s+R|\*|R|\s)\s*${VLAN}\s+${DESTINATION_ADDRESS}\s+${TYPE}\s+\S+\s+\S+\s+${DESTINATION_PORT}(\s+|,\s*)\S -> Continue |
| 42 |
^\s*(\*\s+R|\*|R|\s)\s*${VLAN}\s+${DESTINATION_ADDRESS}\s+${TYPE}\s+\S+\s+\S+\s+${DESTINATION_PORT},*\s*$$ |
| 43 |
^\s*(\*\s+R|\*|R|\s)\s*${VLAN}\s+${DESTINATION_ADDRESS}\s+${TYPE}\s+\S+\s+\S+\s+[^,\s]+(\s+|,\s*)${DESTINATION_PORT}(\s+|,\s*)\S -> Continue |
| 44 |
^\s*(\*\s+R|\*|R|\s)\s*${VLAN}\s+${DESTINATION_ADDRESS}\s+${TYPE}\s+\S+\s+\S+\s+[^,\s]+?(\s+|,\s*)${DESTINATION_PORT},*\s*$$ |
| 45 |
^\s*(\*\s+R|\*|R|\s)\s*${VLAN}\s+${DESTINATION_ADDRESS}\s+${TYPE}\s+\S+\s+\S+\s+([^,\s]+(\s+|,\s*)){2}${DESTINATION_PORT}(\s+|,\s*)\S -> Continue |
| 46 |
^\s*(\*\s+R|\*|R|\s)\s*${VLAN}\s+${DESTINATION_ADDRESS}\s+${TYPE}\s+\S+\s+\S+\s+([^,\s]+(\s+|,\s*)){2}${DESTINATION_PORT},*\s*$$ |
| 47 |
^\s*(\*\s+R|\*|R|\s)\s*${VLAN}\s+${DESTINATION_ADDRESS}\s+${TYPE}\s+\S+\s+\S+\s+([^,\s]+(\s+|,\s*)){3}${DESTINATION_PORT}(\s+|,\s*)\S -> Continue |
| 48 |
^\s*(\*\s+R|\*|R|\s)\s*${VLAN}\s+${DESTINATION_ADDRESS}\s+${TYPE}\s+\S+\s+\S+\s+([^,\s]+(\s+|,\s*)){3}${DESTINATION_PORT},*\s*$$ |
| 49 |
^\s*(\*\s+R|\*|R|\s)\s*${VLAN}\s+${DESTINATION_ADDRESS}\s+${TYPE}\s+\S+\s+\S+\s+([^,\s]+(\s+|,\s*)){4}${DESTINATION_PORT}(\s+|,\s*)\S -> Continue |
| 50 |
^\s*(\*\s+R|\*|R|\s)\s*${VLAN}\s+${DESTINATION_ADDRESS}\s+${TYPE}\s+\S+\s+\S+\s+([^,\s]+(\s+|,\s*)){4}${DESTINATION_PORT},*\s*$$ |
| 51 |
^\s*(\*\s+R|\*|R|\s)\s*${VLAN}\s+${DESTINATION_ADDRESS}\s+${TYPE}\s+\S+\s+\S+\s+([^,\s]+(\s+|,\s*)){5}${DESTINATION_PORT}(\s+|,\s*)\S -> Continue |
| 52 |
^\s*(\*\s+R|\*|R|\s)\s*${VLAN}\s+${DESTINATION_ADDRESS}\s+${TYPE}\s+\S+\s+\S+\s+([^,\s]+(\s+|,\s*)){5}${DESTINATION_PORT},*\s*$$ |
| 53 |
^-+\+-+ |
| 54 |
^Displaying\s+entries |
| 55 |
^\s+vlan\s+mac address\s+type\s+learn\s+age\s+ports |
| 56 |
^\s*$$ |
| 57 |
^Multicast\s+Entries -> End |
| 58 |
^. -> Error |
| 59 |
|
| 60 |
TYPE3 |
| 61 |
^\s*${VLAN}\s+${DESTINATION_ADDRESS}\s+${TYPE}\s+\S+\s+${DESTINATION_PORT}(?:\s|$$) -> Record |
| 62 |
^-+\+-+ |
| 63 |
^Displaying\s+entries |
| 64 |
^\s+vlan\s+mac address\s+type\s+protocols\s+port |
| 65 |
^\s*$$ |
| 66 |
^Multicast\s+Entries -> End |
| 67 |
^. -> Error |
| 68 |
|
| 69 |
TYPE4 |
| 70 |
^\s*${VLAN}\s+${DESTINATION_ADDRESS}\s+${TYPE}\s+${DESTINATION_PORT}(?:\s|$$) -> Record |
| 71 |
^-+\s+-+ |
| 72 |
^Displaying\s+entries |
| 73 |
^Vlan\s+Mac Address\s+Type\s+Ports |
| 74 |
^\s*$$ |
| 75 |
^Total\s+Mac\s+Addresses |
| 76 |
^MultiCast\s+Entries -> End |
| 77 |
^. -> Error |