| 1 |
Value MAC_ADDRESS (\w+\.\w+\.\w+|\w+\:\w+\:\w+\:\w+\:\w+\:\w+) |
| 2 |
Value TYPE (\w+) |
| 3 |
Value VLAN (\d+) |
| 4 |
Value List DESTINATION_PORT ((\w+\/\w+)|\w+) |
| 5 |
Value MOVES (\d+) |
| 6 |
Value LAST_MOVE (.+) |
| 7 |
|
| 8 |
Start |
| 9 |
^\s*Vlan\s+(M|m)ac\sAddress\s+Type\s+Ports\s+Moves\s+Last\sMove\s*$$ -> MAT |
| 10 |
^\s*Vlan\s+(M|m)ac\sAddress\s+Type\s+Ports\s*$$ -> MMAT |
| 11 |
^\s*$$ |
| 12 |
^\s*(M|m)ac\sAddress\sTable\s*$$ |
| 13 |
^\s*Multicast\s(M|m)ac\sAddress\sTable\s*$$ |
| 14 |
^-*$$ |
| 15 |
# ^(-*\s*)*$$ |
| 16 |
^. -> Error |
| 17 |
|
| 18 |
MAT |
| 19 |
# capture the mac address table |
| 20 |
^\s*${VLAN}\s+${MAC_ADDRESS}\s+${TYPE}\s+${DESTINATION_PORT}\s*$$ -> Record |
| 21 |
^\s*${VLAN}\s+${MAC_ADDRESS}\s+${TYPE}\s+${DESTINATION_PORT}\s+${MOVES}\s+${LAST_MOVE}\sago$$ -> Record |
| 22 |
^\s*Total\s+[M|m]ac -> Start |
| 23 |
^\s*-+\s+.*-*$$ |
| 24 |
^\s*$$ |
| 25 |
^. -> Error |
| 26 |
|
| 27 |
MMAT |
| 28 |
# capture the multicast mac address table |
| 29 |
# key on the record |
| 30 |
^\s*\d+\s+(\w+\.\w+\.\w+|\w+\:\w+\:\w+\:\w+\:\w+\:\w+)\s+\w+\s*.*$$ -> Continue.Record |
| 31 |
# match the record with one to five destination ports more. |
| 32 |
^\s*${VLAN}\s+${MAC_ADDRESS}\s+${TYPE}\s+${DESTINATION_PORT}$$ -> Record |
| 33 |
^\s*${VLAN}\s+${MAC_ADDRESS}\s+${TYPE}\s+${DESTINATION_PORT}\s -> Continue |
| 34 |
^\s*\d+\s+(\w+\.\w+\.\w+|\w+\:\w+\:\w+\:\w+\:\w+\:\w+)\s+\w+\s+((\w+\/\w+|\w+)\s){1}${DESTINATION_PORT}\s* -> Continue |
| 35 |
^\s*\d+\s+(\w+\.\w+\.\w+|\w+\:\w+\:\w+\:\w+\:\w+\:\w+)\s+\w+\s+((\w+\/\w+|\w+)\s){2}${DESTINATION_PORT}\s* -> Continue |
| 36 |
^\s*\d+\s+(\w+\.\w+\.\w+|\w+\:\w+\:\w+\:\w+\:\w+\:\w+)\s+\w+\s+((\w+\/\w+|\w+)\s){3}${DESTINATION_PORT}\s* -> Continue |
| 37 |
^\s*\d+\s+(\w+\.\w+\.\w+|\w+\:\w+\:\w+\:\w+\:\w+\:\w+)\s+\w+\s+((\w+\/\w+|\w+)\s){4}${DESTINATION_PORT}$$ -> Continue |
| 38 |
^\s*Total\s+[M|m]ac -> Start |
| 39 |
^\s*-+\s+.*-*$$ |
| 40 |
^\s*$$ |