private ControlMessage parseControlMessage(@NonNull final NetworkKey key,
                                               @Nullable final Integer provisionerAddress,
                                               @NonNull final byte[] data,
                                               @NonNull final byte[] networkHeader,
                                               @NonNull final byte[] decryptedNetworkPayload,
                                               final int src,
                                               @NonNull final byte[] sequenceNumber) throws ExtendedInvalidCipherTextException {
        try {
            final int ttl = networkHeader[0] & 0x7F;
            final int dst = MeshParserUtils.unsignedBytesToInt(decryptedNetworkPayload[1], decryptedNetworkPayload[0]);

            //Removing the mDst here
            final byte[] decryptedProxyPdu = ByteBuffer.allocate(2 + networkHeader.length + decryptedNetworkPayload.length)
                    .order(ByteOrder.BIG_ENDIAN)
                    .put(data, 0, 2)
                    .put(networkHeader)
                    .put(decryptedNetworkPayload)
                    .array();

            //We check the pdu type
            final int pduType = data[0];
            switch (pduType) {
                case MeshManagerApi.PDU_TYPE_NETWORK:

                    //This is not possible however let's return null
                    if (provisionerAddress == null) {
                        return null;
                    }

                    //Check if the message is directed to us, if its not ignore the message
                    if (provisionerAddress != dst) {
                        MeshLogger.verbose(TAG, "Received a control message that was not directed to us, so we drop it");
                        return null;
                    }

                    if (isSegmentedMessage(decryptedNetworkPayload[2])) {
                        return parseSegmentedControlMessage(key, data, decryptedProxyPdu, ttl, src, dst);
                    } else {
                        return parseUnsegmentedControlMessage(key, data, decryptedProxyPdu, ttl, src, dst, sequenceNumber);
                    }
                case MeshManagerApi.PDU_TYPE_PROXY_CONFIGURATION:
                    //Proxy configuration messages are segmented only at the gatt level
                    return parseUnsegmentedControlMessage(key, data, decryptedProxyPdu, ttl, src, dst, sequenceNumber);
                default:
                    return null;
            }
        } catch (InvalidCipherTextException ex) {
            throw new ExtendedInvalidCipherTextException(ex.getMessage(), ex.getCause(), TAG);
        }
    }
Parses control message

@param key                     Network Key used to decrypt
@param provisionerAddress      Provisioner address.
@param data                    Data received from the node.
@param networkHeader           De-obfuscated network header.
@param decryptedNetworkPayload Decrypted network payload.
@param src                     Source address where the pdu originated from.
@param sequenceNumber          Sequence number of the received message.
@return a complete {@link ControlMessage} or null if the message was unable to parsed
mesh/src/main/java/no/nordicsemi/android/mesh/transport/NetworkLayer.java