main() {
	Set Exception Handler;
	Initialize Terminal;
	Print Welcome Message;

	Enter Setup Loop:
		Handle all Router Setup Commands;
		Wait for Start Command;
	Finish Setup Loop;
	
	Create FIFOs;
	Enable Interrupts;
	Configure Hardware UP;

	Enter Monitor Loop:
		If New Packet in FIFOs
			If Packet is ARP Packet
				Handle ARP Packet;
			Else if Packet is IPV4 Packet
				Handle IPV4 Packet;
		Check Timeouts on ARP Cache;
		Check For new Input on Keyboard;
		If Newline Entered
			Handle New Command;
	Finish Monitor Loop;

	Configure Hardware DOWN;
	Disable Interrupts;
	Destroy FIFOs;

	Print Exit Message;
}
