At reference numeral 270 if the packet is an IP packet, control may be optionally transferred to reference numeral 272 so that the packet's DS/ToS field 26 may be rewritten to incorporate the calculated ToS. At reference numeral 274 if the packet has an 802.1 q tag and CoS field, control may be optionally transferred to reference numeral 276 so that the packet's 802.1 q CoS field 24 may be rewritt