/** * Determine the payload type for the given Ethernet type. * * @param type The Ethernet type value. * @return A class for the payload type. * {@code null} if no payload type is defined for the given * Ethernet type. */ static final Class<? extends Packet> getPayloadClass(short type) { EtherTypes etype = EtherTypes.forValue(type); return (etype == null) ? null : PAYLOAD_TYPES.get(etype); }