Logo Search packages:      
Sourcecode: uaputl version File versions  Download package

int ishexstring ( void *  hex )

check hex string

Parameters:
hexA pointer to hex string
Returns:
UAP_SUCCESS or UAP_FAILURE

Definition at line 4950 of file uaputl.c.

References hex2num(), UAP_FAILURE, and UAP_SUCCESS.

Referenced by apcmd_sys_cfg_custom_ie(), apcmd_sys_cfg_wep_key(), apcmd_sys_cfg_wpa_passphrase(), and apcmd_sys_config_profile().

{
    int i, a;
    char *p = hex;
    int len = strlen(p);
    if (!strncasecmp("0x", p, 2)) {
        p += 2;
        len -= 2;
    }
    for (i = 0; i < len; i++) {
        a = hex2num(*p);
        if (a < 0)
            return UAP_FAILURE;
        p++;
    }
    return UAP_SUCCESS;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index