can-eth-gw-utils Utilities
0.1
A bidirectional CAN to Ethernet Gateway (Utilities)
|
Functions | |
char * | enum2str (int value, const struct enums *enums, size_t size, int max) |
Returns the textual representation of an numeric identifier (enum) More... | |
char * | flags2str (uint32_t bits, const struct flags *flags, size_t size) |
Convert Flags in ist textual represenation. More... | |
char* enum2str | ( | int | value, |
const struct enums * | enums, | ||
size_t | size, | ||
int | max | ||
) |
Returns the textual representation of an numeric identifier (enum)
value | the numeric identifier (value) of an enum |
enums | A array with the textual representation of the int value. The Last entry in the array bust be {0}, because the function will stop here. The index af an array entry must be the same as param value. |
size | the size of the retuned char pointer. Must be big enough for the largest entry in the array. |
NULL | if not found |
Definition at line 173 of file netlink.c.
References enums::name.
Referenced by nl_cb_list_entry().
char * flags2str | ( | uint32_t | bits, |
const struct flags * | flags, | ||
size_t | size | ||
) |
Convert Flags in ist textual represenation.
bits | The bits variable which will be checked with the highest bit |
flags | An Array with its textual representation the index of the one array entry must be the same as the position in param bits from the left. The Last entry in the array bust be {0}, because the function will stop here. |
size | the size of the retuned char pointer. Must be big enough for all flags names plus 2 for < and > plus 1 for ',' after each flag plus 1 for \0 |
Definition at line 117 of file netlink.c.
Referenced by nl_cb_list_entry().