Valve Corporation interview question

How would you implement a VLAN, in code.