/** * Determine the payload type for the given IP protocol number. * * @param proto The IP protocol number. * @return A class for the payload type. * {@code null} if no payload type is defined for the given * IP protocol number. */ static Class<? extends Packet> getPayloadClass(byte proto) { InetProtocols ipproto = InetProtocols.forValue(proto); return (ipproto == null) ? null : PAYLOAD_TYPES.get(ipproto); }