Displaying 1 result from an estimated 1 matches for "rta_protoinfo".
2003 Sep 18
0
hexadecimal fwmark and fwmark mask
...} else if (strcmp(*argv, "fwmark") == 0) {
__u32 fwmark;
NEXT_ARG();
if (get_u32(&fwmark, *argv, 16))
invarg("fwmark value is invalid\n", *argv);
addattr32(&req.n, sizeof(req), RTA_PROTOINFO, fwmark);
get_u32() function just call strtoul(3) among a few sanity checks,
and the third parameter (value 16 here) is the base used to convert
the string. Here is a part of the manual page of strtoul(3) :
<< If base is zero or 16, the string may then include a `0x'' prefix,n
an...