• program l3_switch () {
    parse_begin (ethernet); /* start parsing */
    port_table.lookup(0); /* lookup the port table */
    assign_vlan();
    vlan_table.lookup(0);
    ingress_l3_intf_table.lookup (0);
    rmac_table.lookup (0); /* Set cmd_bus.l3_enable */
    if (l3_bus.l3_enable) { /* conditional */
    do_l3_forwarding(); /* switch logic function */
    egress_intf_table.lookup(0);
    do_packet_edits(); /* editor function. */
    do_checksum_update();