none
Como hacer para ver en consola los resulados de una operacion RRS feed

  • Pregunta

  • Me he bajado un ejemplo de inernet el cual utiliza wcn para realizar una conexion al router. El ejemplo funciona bien, todo perfecto, pero me gusaria saber como puedo hacer para que se muestre en consola el proceso de conexion. 

    En el include "wcntypes.h" veo que viene la siguiente enumeracion. La que he marcado en negrita es la que necesito mostrar en consola:

    WCN_TYPE_MESSAGE_TYPE

    typedef /* [v1_enum] */ 
    enum tagWCN_ATTRIBUTE_TYPE
        {	WCN_TYPE_AP_CHANNEL	= 0,
    	WCN_TYPE_ASSOCIATION_STATE	= ( WCN_TYPE_AP_CHANNEL + 1 ) ,
    	WCN_TYPE_AUTHENTICATION_TYPE	= ( WCN_TYPE_ASSOCIATION_STATE + 1 ) ,
    	WCN_TYPE_AUTHENTICATION_TYPE_FLAGS	= ( WCN_TYPE_AUTHENTICATION_TYPE + 1 ) ,
    	WCN_TYPE_AUTHENTICATOR	= ( WCN_TYPE_AUTHENTICATION_TYPE_FLAGS + 1 ) ,
    	WCN_TYPE_CONFIG_METHODS	= ( WCN_TYPE_AUTHENTICATOR + 1 ) ,
    	WCN_TYPE_CONFIGURATION_ERROR	= ( WCN_TYPE_CONFIG_METHODS + 1 ) ,
    	WCN_TYPE_CONFIRMATION_URL4	= ( WCN_TYPE_CONFIGURATION_ERROR + 1 ) ,
    	WCN_TYPE_CONFIRMATION_URL6	= ( WCN_TYPE_CONFIRMATION_URL4 + 1 ) ,
    	WCN_TYPE_CONNECTION_TYPE	= ( WCN_TYPE_CONFIRMATION_URL6 + 1 ) ,
    	WCN_TYPE_CONNECTION_TYPE_FLAGS	= ( WCN_TYPE_CONNECTION_TYPE + 1 ) ,
    	WCN_TYPE_CREDENTIAL	= ( WCN_TYPE_CONNECTION_TYPE_FLAGS + 1 ) ,
    	WCN_TYPE_DEVICE_NAME	= ( WCN_TYPE_CREDENTIAL + 1 ) ,
    	WCN_TYPE_DEVICE_PASSWORD_ID	= ( WCN_TYPE_DEVICE_NAME + 1 ) ,
    	WCN_TYPE_E_HASH1	= ( WCN_TYPE_DEVICE_PASSWORD_ID + 1 ) ,
    	WCN_TYPE_E_HASH2	= ( WCN_TYPE_E_HASH1 + 1 ) ,
    	WCN_TYPE_E_SNONCE1	= ( WCN_TYPE_E_HASH2 + 1 ) ,
    	WCN_TYPE_E_SNONCE2	= ( WCN_TYPE_E_SNONCE1 + 1 ) ,
    	WCN_TYPE_ENCRYPTED_SETTINGS	= ( WCN_TYPE_E_SNONCE2 + 1 ) ,
    	WCN_TYPE_ENCRYPTION_TYPE	= ( WCN_TYPE_ENCRYPTED_SETTINGS + 1 ) ,
    	WCN_TYPE_ENCRYPTION_TYPE_FLAGS	= ( WCN_TYPE_ENCRYPTION_TYPE + 1 ) ,
    	WCN_TYPE_ENROLLEE_NONCE	= ( WCN_TYPE_ENCRYPTION_TYPE_FLAGS + 1 ) ,
    	WCN_TYPE_FEATURE_ID	= ( WCN_TYPE_ENROLLEE_NONCE + 1 ) ,
    	WCN_TYPE_IDENTITY	= ( WCN_TYPE_FEATURE_ID + 1 ) ,
    	WCN_TYPE_IDENTITY_PROOF	= ( WCN_TYPE_IDENTITY + 1 ) ,
    	WCN_TYPE_KEY_WRAP_AUTHENTICATOR	= ( WCN_TYPE_IDENTITY_PROOF + 1 ) ,
    	WCN_TYPE_KEY_IDENTIFIER	= ( WCN_TYPE_KEY_WRAP_AUTHENTICATOR + 1 ) ,
    	WCN_TYPE_MAC_ADDRESS	= ( WCN_TYPE_KEY_IDENTIFIER + 1 ) ,
    	WCN_TYPE_MANUFACTURER	= ( WCN_TYPE_MAC_ADDRESS + 1 ) ,
    	WCN_TYPE_MESSAGE_TYPE	= ( WCN_TYPE_MANUFACTURER + 1 ) ,
    	WCN_TYPE_MODEL_NAME	= ( WCN_TYPE_MESSAGE_TYPE + 1 ) ,
    	WCN_TYPE_MODEL_NUMBER	= ( WCN_TYPE_MODEL_NAME + 1 ) ,
    	WCN_TYPE_NETWORK_INDEX	= ( WCN_TYPE_MODEL_NUMBER + 1 ) ,
    	WCN_TYPE_NETWORK_KEY	= ( WCN_TYPE_NETWORK_INDEX + 1 ) ,
    	WCN_TYPE_NETWORK_KEY_INDEX	= ( WCN_TYPE_NETWORK_KEY + 1 ) ,
    	WCN_TYPE_NEW_DEVICE_NAME	= ( WCN_TYPE_NETWORK_KEY_INDEX + 1 ) ,
    	WCN_TYPE_NEW_PASSWORD	= ( WCN_TYPE_NEW_DEVICE_NAME + 1 ) ,
    	WCN_TYPE_OOB_DEVICE_PASSWORD	= ( WCN_TYPE_NEW_PASSWORD + 1 ) ,
    	WCN_TYPE_OS_VERSION	= ( WCN_TYPE_OOB_DEVICE_PASSWORD + 1 ) ,
    	WCN_TYPE_POWER_LEVEL	= ( WCN_TYPE_OS_VERSION + 1 ) ,
    	WCN_TYPE_PSK_CURRENT	= ( WCN_TYPE_POWER_LEVEL + 1 ) ,
    	WCN_TYPE_PSK_MAX	= ( WCN_TYPE_PSK_CURRENT + 1 ) ,
    	WCN_TYPE_PUBLIC_KEY	= ( WCN_TYPE_PSK_MAX + 1 ) ,
    	WCN_TYPE_RADIO_ENABLED	= ( WCN_TYPE_PUBLIC_KEY + 1 ) ,
    	WCN_TYPE_REBOOT	= ( WCN_TYPE_RADIO_ENABLED + 1 ) ,
    	WCN_TYPE_REGISTRAR_CURRENT	= ( WCN_TYPE_REBOOT + 1 ) ,
    	WCN_TYPE_REGISTRAR_ESTABLISHED	= ( WCN_TYPE_REGISTRAR_CURRENT + 1 ) ,
    	WCN_TYPE_REGISTRAR_LIST	= ( WCN_TYPE_REGISTRAR_ESTABLISHED + 1 ) ,
    	WCN_TYPE_REGISTRAR_MAX	= ( WCN_TYPE_REGISTRAR_LIST + 1 ) ,
    	WCN_TYPE_REGISTRAR_NONCE	= ( WCN_TYPE_REGISTRAR_MAX + 1 ) ,
    	WCN_TYPE_REQUEST_TYPE	= ( WCN_TYPE_REGISTRAR_NONCE + 1 ) ,
    	WCN_TYPE_RESPONSE_TYPE	= ( WCN_TYPE_REQUEST_TYPE + 1 ) ,
    	WCN_TYPE_RF_BANDS	= ( WCN_TYPE_RESPONSE_TYPE + 1 ) ,
    	WCN_TYPE_R_HASH1	= ( WCN_TYPE_RF_BANDS + 1 ) ,
    	WCN_TYPE_R_HASH2	= ( WCN_TYPE_R_HASH1 + 1 ) ,
    	WCN_TYPE_R_SNONCE1	= ( WCN_TYPE_R_HASH2 + 1 ) ,
    	WCN_TYPE_R_SNONCE2	= ( WCN_TYPE_R_SNONCE1 + 1 ) ,
    	WCN_TYPE_SELECTED_REGISTRAR	= ( WCN_TYPE_R_SNONCE2 + 1 ) ,
    	WCN_TYPE_SERIAL_NUMBER	= ( WCN_TYPE_SELECTED_REGISTRAR + 1 ) ,
    	WCN_TYPE_WI_FI_PROTECTED_SETUP_STATE	= ( WCN_TYPE_SERIAL_NUMBER + 1 ) ,
    	WCN_TYPE_SSID	= ( WCN_TYPE_WI_FI_PROTECTED_SETUP_STATE + 1 ) ,
    	WCN_TYPE_TOTAL_NETWORKS	= ( WCN_TYPE_SSID + 1 ) ,
    	WCN_TYPE_UUID_E	= ( WCN_TYPE_TOTAL_NETWORKS + 1 ) ,
    	WCN_TYPE_UUID_R	= ( WCN_TYPE_UUID_E + 1 ) ,
    	WCN_TYPE_VENDOR_EXTENSION	= ( WCN_TYPE_UUID_R + 1 ) ,
    	WCN_TYPE_VERSION	= ( WCN_TYPE_VENDOR_EXTENSION + 1 ) ,
    	WCN_TYPE_X_509_CERTIFICATE_REQUEST	= ( WCN_TYPE_VERSION + 1 ) ,
    	WCN_TYPE_X_509_CERTIFICATE	= ( WCN_TYPE_X_509_CERTIFICATE_REQUEST + 1 ) ,
    	WCN_TYPE_EAP_IDENTITY	= ( WCN_TYPE_X_509_CERTIFICATE + 1 ) ,
    	WCN_TYPE_MESSAGE_COUNTER	= ( WCN_TYPE_EAP_IDENTITY + 1 ) ,
    	WCN_TYPE_PUBLIC_KEY_HASH	= ( WCN_TYPE_MESSAGE_COUNTER + 1 ) ,
    	WCN_TYPE_REKEY_KEY	= ( WCN_TYPE_PUBLIC_KEY_HASH + 1 ) ,
    	WCN_TYPE_KEY_LIFETIME	= ( WCN_TYPE_REKEY_KEY + 1 ) ,
    	WCN_TYPE_PERMITTED_CONFIG_METHODS	= ( WCN_TYPE_KEY_LIFETIME + 1 ) ,
    	WCN_TYPE_SELECTED_REGISTRAR_CONFIG_METHODS	= ( WCN_TYPE_PERMITTED_CONFIG_METHODS + 1 ) ,
    	WCN_TYPE_PRIMARY_DEVICE_TYPE	= ( WCN_TYPE_SELECTED_REGISTRAR_CONFIG_METHODS + 1 ) ,
    	WCN_TYPE_SECONDARY_DEVICE_TYPE_LIST	= ( WCN_TYPE_PRIMARY_DEVICE_TYPE + 1 ) ,
    	WCN_TYPE_PORTABLE_DEVICE	= ( WCN_TYPE_SECONDARY_DEVICE_TYPE_LIST + 1 ) ,
    	WCN_TYPE_AP_SETUP_LOCKED	= ( WCN_TYPE_PORTABLE_DEVICE + 1 ) ,
    	WCN_TYPE_APPLICATION_EXTENSION	= ( WCN_TYPE_AP_SETUP_LOCKED + 1 ) ,
    	WCN_TYPE_EAP_TYPE	= ( WCN_TYPE_APPLICATION_EXTENSION + 1 ) ,
    	WCN_TYPE_INITIALIZATION_VECTOR	= ( WCN_TYPE_EAP_TYPE + 1 ) ,
    	WCN_TYPE_KEY_PROVIDED_AUTOMATICALLY	= ( WCN_TYPE_INITIALIZATION_VECTOR + 1 ) ,
    	WCN_TYPE_802_1X_ENABLED	= ( WCN_TYPE_KEY_PROVIDED_AUTOMATICALLY + 1 ) ,
    	WCN_TYPE_APPSESSIONKEY	= ( WCN_TYPE_802_1X_ENABLED + 1 ) ,
    	WCN_TYPE_WEPTRANSMITKEY	= ( WCN_TYPE_APPSESSIONKEY + 1 ) ,
    	WCN_TYPE_UUID	= ( WCN_TYPE_WEPTRANSMITKEY + 1 ) ,
    	WCN_TYPE_PRIMARY_DEVICE_TYPE_CATEGORY	= ( WCN_TYPE_UUID + 1 ) ,
    	WCN_TYPE_PRIMARY_DEVICE_TYPE_SUBCATEGORY_OUI	= ( WCN_TYPE_PRIMARY_DEVICE_TYPE_CATEGORY + 1 ) ,
    	WCN_TYPE_PRIMARY_DEVICE_TYPE_SUBCATEGORY	= ( WCN_TYPE_PRIMARY_DEVICE_TYPE_SUBCATEGORY_OUI + 1 ) ,
    	WCN_TYPE_CURRENT_SSID	= ( WCN_TYPE_PRIMARY_DEVICE_TYPE_SUBCATEGORY + 1 ) ,
    	WCN_TYPE_BSSID	= ( WCN_TYPE_CURRENT_SSID + 1 ) ,
    	WCN_TYPE_DOT11_MAC_ADDRESS	= ( WCN_TYPE_BSSID + 1 ) ,
    	WCN_NUM_ATTRIBUTE_TYPES	= ( WCN_TYPE_DOT11_MAC_ADDRESS + 1 ) 
        } 	WCN_ATTRIBUTE_TYPE;

    Y tambien en "wcntypes.h" estan lo que creo que son las definiciones (no estoy mu puesto en ese lenguaje de programacion):

    //
    // Values for WCN_TYPE_MESSAGE_TYPE
    //
    typedef  /* [v1_enum] */ 
    enum tagWCN_VALUE_TYPE_MESSAGE_TYPE
        {	WCN_VALUE_MT_BEACON	= 0x1,
    	WCN_VALUE_MT_PROBE_REQUEST	= 0x2,
    	WCN_VALUE_MT_PROBE_RESPONSE	= 0x3,
    	WCN_VALUE_MT_M1	= 0x4,
    	WCN_VALUE_MT_M2	= 0x5,
    	WCN_VALUE_MT_M2D	= 0x6,
    	WCN_VALUE_MT_M3	= 0x7,
    	WCN_VALUE_MT_M4	= 0x8,
    	WCN_VALUE_MT_M5	= 0x9,
    	WCN_VALUE_MT_M6	= 0xa,
    	WCN_VALUE_MT_M7	= 0xb,
    	WCN_VALUE_MT_M8	= 0xc,
    	WCN_VALUE_MT_ACK	= 0xd,
    	WCN_VALUE_MT_NACK	= 0xe,
    	WCN_VALUE_MT_DONE	= 0xf
        } 	WCN_VALUE_TYPE_MESSAGE_TYPE;

    Lo que necesio es que se muestre en consola un log mostrando el tipo de mensaje que esa enviando o recibiendo en cada momento.

    Gracias.


    • Editado JaviPatch miércoles, 22 de abril de 2015 13:33
    miércoles, 22 de abril de 2015 13:13