static void qmp_query_auth(VncDisplay *vd, VncInfo2 *info)

{

    switch (vd->auth) {

    case VNC_AUTH_VNC:

        info->auth = VNC_PRIMARY_AUTH_VNC;

        break;

    case VNC_AUTH_RA2:

        info->auth = VNC_PRIMARY_AUTH_RA2;

        break;

    case VNC_AUTH_RA2NE:

        info->auth = VNC_PRIMARY_AUTH_RA2NE;

        break;

    case VNC_AUTH_TIGHT:

        info->auth = VNC_PRIMARY_AUTH_TIGHT;

        break;

    case VNC_AUTH_ULTRA:

        info->auth = VNC_PRIMARY_AUTH_ULTRA;

        break;

    case VNC_AUTH_TLS:

        info->auth = VNC_PRIMARY_AUTH_TLS;

        break;

    case VNC_AUTH_VENCRYPT:

        info->auth = VNC_PRIMARY_AUTH_VENCRYPT;

#ifdef CONFIG_VNC_TLS

        info->has_vencrypt = true;

        switch (vd->subauth) {

        case VNC_AUTH_VENCRYPT_PLAIN:

            info->vencrypt = VNC_VENCRYPT_SUB_AUTH_PLAIN;

            break;

        case VNC_AUTH_VENCRYPT_TLSNONE:

            info->vencrypt = VNC_VENCRYPT_SUB_AUTH_TLS_NONE;

            break;

        case VNC_AUTH_VENCRYPT_TLSVNC:

            info->vencrypt = VNC_VENCRYPT_SUB_AUTH_TLS_VNC;

            break;

        case VNC_AUTH_VENCRYPT_TLSPLAIN:

            info->vencrypt = VNC_VENCRYPT_SUB_AUTH_TLS_PLAIN;

            break;

        case VNC_AUTH_VENCRYPT_X509NONE:

            info->vencrypt = VNC_VENCRYPT_SUB_AUTH_X509_NONE;

            break;

        case VNC_AUTH_VENCRYPT_X509VNC:

            info->vencrypt = VNC_VENCRYPT_SUB_AUTH_X509_VNC;

            break;

        case VNC_AUTH_VENCRYPT_X509PLAIN:

            info->vencrypt = VNC_VENCRYPT_SUB_AUTH_X509_PLAIN;

            break;

        case VNC_AUTH_VENCRYPT_TLSSASL:

            info->vencrypt = VNC_VENCRYPT_SUB_AUTH_TLS_SASL;

            break;

        case VNC_AUTH_VENCRYPT_X509SASL:

            info->vencrypt = VNC_VENCRYPT_SUB_AUTH_X509_SASL;

            break;

        default:

            info->has_vencrypt = false;

            break;

        }

#endif

        break;

    case VNC_AUTH_SASL:

        info->auth = VNC_PRIMARY_AUTH_SASL;

        break;

    case VNC_AUTH_NONE:

    default:

        info->auth = VNC_PRIMARY_AUTH_NONE;

        break;

    }

}

static void qmp_query_auth(VncDisplay *vd, VncInfo2 *info)

{

    switch (vd->auth) {

    case VNC_AUTH_VNC:

        info->auth = VNC_PRIMARY_AUTH_VNC;

        break;

    case VNC_AUTH_RA2:

        info->auth = VNC_PRIMARY_AUTH_RA2;

        break;

    case VNC_AUTH_RA2NE:

        info->auth = VNC_PRIMARY_AUTH_RA2NE;

        break;

    case VNC_AUTH_TIGHT:

        info->auth = VNC_PRIMARY_AUTH_TIGHT;

        break;

    case VNC_AUTH_ULTRA:

        info->auth = VNC_PRIMARY_AUTH_ULTRA;

        break;

    case VNC_AUTH_TLS:

        info->auth = VNC_PRIMARY_AUTH_TLS;

        break;

    case VNC_AUTH_VENCRYPT:

        info->auth = VNC_PRIMARY_AUTH_VENCRYPT;

#ifdef CONFIG_VNC_TLS

        info->has_vencrypt = true;

        switch (vd->subauth) {

        case VNC_AUTH_VENCRYPT_PLAIN:

            info->vencrypt = VNC_VENCRYPT_SUB_AUTH_PLAIN;

            break;

        case VNC_AUTH_VENCRYPT_TLSNONE:

            info->vencrypt = VNC_VENCRYPT_SUB_AUTH_TLS_NONE;

            break;

        case VNC_AUTH_VENCRYPT_TLSVNC:

            info->vencrypt = VNC_VENCRYPT_SUB_AUTH_TLS_VNC;

            break;

        case VNC_AUTH_VENCRYPT_TLSPLAIN:

            info->vencrypt = VNC_VENCRYPT_SUB_AUTH_TLS_PLAIN;

            break;

        case VNC_AUTH_VENCRYPT_X509NONE:

            info->vencrypt = VNC_VENCRYPT_SUB_AUTH_X509_NONE;

            break;

        case VNC_AUTH_VENCRYPT_X509VNC:

            info->vencrypt = VNC_VENCRYPT_SUB_AUTH_X509_VNC;

            break;

        case VNC_AUTH_VENCRYPT_X509PLAIN:

            info->vencrypt = VNC_VENCRYPT_SUB_AUTH_X509_PLAIN;

            break;

        case VNC_AUTH_VENCRYPT_TLSSASL:

            info->vencrypt = VNC_VENCRYPT_SUB_AUTH_TLS_SASL;

            break;

        case VNC_AUTH_VENCRYPT_X509SASL:

            info->vencrypt = VNC_VENCRYPT_SUB_AUTH_X509_SASL;

            break;

        default:

            info->has_vencrypt = false;

            break;

        }

#endif

        break;

    case VNC_AUTH_SASL:

        info->auth = VNC_PRIMARY_AUTH_SASL;

        break;

    case VNC_AUTH_NONE:

    default:

        info->auth = VNC_PRIMARY_AUTH_NONE;

        break;

    }

}

#ifdef CONFIG_VNC_TLS #ifdef CONFIG_VNC_TLS #endif #endif #ifdef CONFIG_VNC_TLS #ifdef CONFIG_VNC_TLS #ifdef CONFIG_VNC_TLS #endif #ifdef CONFIG_VNC_TLS #endif #ifdef CONFIG_VNC_TLS #endif #ifdef CONFIG_VNC_TLS #endif #ifdef CONFIG_VNC_TLS #ifdef CONFIG_VNC_TLS #ifdef CONFIG_VNC_TLS #ifdef CONFIG_VNC_TLS #ifdef CONFIG_VNC_TLS #ifdef CONFIG_VNC_TLS #ifdef CONFIG_VNC_TLS #ifdef CONFIG_VNC_TLS #ifdef CONFIG_VNC_TLS #ifdef CONFIG_VNC_TLS #endif #ifdef CONFIG_VNC_TLS #endif #endif #ifdef CONFIG_VNC_TLS #endif #ifdef CONFIG_VNC_TLS #endif #ifdef CONFIG_VNC_TLS #endif #ifdef CONFIG_VNC_TLS #endif #ifdef CONFIG_VNC_TLS #endif
static void FUNC_0(VncDisplay *VAR_0, VncInfo2 *VAR_1)

{

    switch (VAR_0->auth) {

    case VNC_AUTH_VNC:

        VAR_1->auth = VNC_PRIMARY_AUTH_VNC;

        break;

    case VNC_AUTH_RA2:

        VAR_1->auth = VNC_PRIMARY_AUTH_RA2;

        break;

    case VNC_AUTH_RA2NE:

        VAR_1->auth = VNC_PRIMARY_AUTH_RA2NE;

        break;

    case VNC_AUTH_TIGHT:

        VAR_1->auth = VNC_PRIMARY_AUTH_TIGHT;

        break;

    case VNC_AUTH_ULTRA:

        VAR_1->auth = VNC_PRIMARY_AUTH_ULTRA;

        break;

    case VNC_AUTH_TLS:

        VAR_1->auth = VNC_PRIMARY_AUTH_TLS;

        break;

    case VNC_AUTH_VENCRYPT:

        VAR_1->auth = VNC_PRIMARY_AUTH_VENCRYPT;

#ifdef CONFIG_VNC_TLS

        VAR_1->has_vencrypt = true;

        switch (VAR_0->subauth) {

        case VNC_AUTH_VENCRYPT_PLAIN:

            VAR_1->vencrypt = VNC_VENCRYPT_SUB_AUTH_PLAIN;

            break;

        case VNC_AUTH_VENCRYPT_TLSNONE:

            VAR_1->vencrypt = VNC_VENCRYPT_SUB_AUTH_TLS_NONE;

            break;

        case VNC_AUTH_VENCRYPT_TLSVNC:

            VAR_1->vencrypt = VNC_VENCRYPT_SUB_AUTH_TLS_VNC;

            break;

        case VNC_AUTH_VENCRYPT_TLSPLAIN:

            VAR_1->vencrypt = VNC_VENCRYPT_SUB_AUTH_TLS_PLAIN;

            break;

        case VNC_AUTH_VENCRYPT_X509NONE:

            VAR_1->vencrypt = VNC_VENCRYPT_SUB_AUTH_X509_NONE;

            break;

        case VNC_AUTH_VENCRYPT_X509VNC:

            VAR_1->vencrypt = VNC_VENCRYPT_SUB_AUTH_X509_VNC;

            break;

        case VNC_AUTH_VENCRYPT_X509PLAIN:

            VAR_1->vencrypt = VNC_VENCRYPT_SUB_AUTH_X509_PLAIN;

            break;

        case VNC_AUTH_VENCRYPT_TLSSASL:

            VAR_1->vencrypt = VNC_VENCRYPT_SUB_AUTH_TLS_SASL;

            break;

        case VNC_AUTH_VENCRYPT_X509SASL:

            VAR_1->vencrypt = VNC_VENCRYPT_SUB_AUTH_X509_SASL;

            break;

        default:

            VAR_1->has_vencrypt = false;

            break;

        }

#endif

        break;

    case VNC_AUTH_SASL:

        VAR_1->auth = VNC_PRIMARY_AUTH_SASL;

        break;

    case VNC_AUTH_NONE:

    default:

        VAR_1->auth = VNC_PRIMARY_AUTH_NONE;

        break;

    }

}

static void FUNC_0(VncDisplay *VAR_0, VncInfo2 *VAR_1)
{ switch (VAR_0->auth) { case VNC_AUTH_VNC:
VAR_1->auth = VNC_PRIMARY_AUTH_VNC; break; case VNC_AUTH_RA2:
VAR_1->auth = VNC_PRIMARY_AUTH_RA2; break; case VNC_AUTH_RA2NE:
VAR_1->auth = VNC_PRIMARY_AUTH_RA2NE; break; case VNC_AUTH_TIGHT:
VAR_1->auth = VNC_PRIMARY_AUTH_TIGHT; break; case VNC_AUTH_ULTRA:
VAR_1->auth = VNC_PRIMARY_AUTH_ULTRA; break; case VNC_AUTH_TLS:
VAR_1->auth = VNC_PRIMARY_AUTH_TLS; break; case VNC_AUTH_VENCRYPT:
VAR_1->auth = VNC_PRIMARY_AUTH_VENCRYPT; #ifdef CONFIG_VNC_TLS
VAR_1->has_vencrypt = true; switch (VAR_0->subauth) { case VNC_AUTH_VENCRYPT_PLAIN:
VAR_1->vencrypt = VNC_VENCRYPT_SUB_AUTH_PLAIN; break; case VNC_AUTH_VENCRYPT_TLSNONE:
VAR_1->vencrypt = VNC_VENCRYPT_SUB_AUTH_TLS_NONE; break; case VNC_AUTH_VENCRYPT_TLSVNC:
VAR_1->vencrypt = VNC_VENCRYPT_SUB_AUTH_TLS_VNC; break; case VNC_AUTH_VENCRYPT_TLSPLAIN:
VAR_1->vencrypt = VNC_VENCRYPT_SUB_AUTH_TLS_PLAIN; break; case VNC_AUTH_VENCRYPT_X509NONE:
VAR_1->vencrypt = VNC_VENCRYPT_SUB_AUTH_X509_NONE; break; case VNC_AUTH_VENCRYPT_X509VNC:
VAR_1->vencrypt = VNC_VENCRYPT_SUB_AUTH_X509_VNC; break; case VNC_AUTH_VENCRYPT_X509PLAIN:
VAR_1->vencrypt = VNC_VENCRYPT_SUB_AUTH_X509_PLAIN; break; case VNC_AUTH_VENCRYPT_TLSSASL:
VAR_1->vencrypt = VNC_VENCRYPT_SUB_AUTH_TLS_SASL; break; case VNC_AUTH_VENCRYPT_X509SASL:
VAR_1->vencrypt = VNC_VENCRYPT_SUB_AUTH_X509_SASL; break; default:
VAR_1->has_vencrypt = false; break; } #endif
break; case VNC_AUTH_SASL:
VAR_1->auth = VNC_PRIMARY_AUTH_SASL; break; case VNC_AUTH_NONE:
default:
VAR_1->auth = VNC_PRIMARY_AUTH_NONE; break; } }