Menu

Day 4: Adding VLAN support
📰

Day 4: Adding VLAN support

DEV Community: cpp·Grace Mihiral·9 days ago
#hAkEml0P
#devtocpp#devto#dev#vlan#keep
Reading 0:00
15s threshold

Hello, good morning once again (this work session ran a bit late). Today I thought about cleaning up my main.cpp file and splitting it up into two files and then I decided adding VLAN support to the switch would be a lot more fun.

It started off with modifying the MacTable class to take in a key rather than just a source address (uint8_t) that then needed a function to hash and check for equivalence. After that VLAN tagging checks had to be added to the interface managing class so it could cut out the VLAN tag on arrival and re-add it in when sending it back out. I also added more member variables to keep track of Access/Trunk ports.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.