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

void hexdump_data ( char *  prompt,
void *  p,
int  len,
char  delim 
)

Dump hex data.

Parameters:
promptA pointer prompt buffer
pA pointer to data buffer
lenthe len of data buffer
delimdelim char
Returns:
None

Definition at line 305 of file uaputl.c.

Referenced by apcmd_cfg_data(), apcmd_read_eeprom(), hexdump(), and print_tlv().

{
    int i;
    unsigned char *s = p;

    if (prompt) {
        printf("%s: len=%d\n", prompt, (int) len);
    }
    for (i = 0; i < len; i++) {
        if (i != len - 1)
            printf("%02x%c", *s++, delim);
        else
            printf("%02x\n", *s);
        if ((i + 1) % 16 == 0)
            printf("\n");
    }
    printf("\n");
}

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index