blob: 51cd616e353121a0efbd00160a2d3caa0a36d88b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
int put_opts(struct nl_msg *msg)
{
struct nlattr *opts;
if (!(opts = nla_nest_start(msg, ATTR_OPTS)))
goto nla_put_failure;
NLA_PUT_U32(msg, NESTED_FOO, 123);
NLA_PUT_STRING(msg, NESTED_BAR, "some text");
nla_nest_end(msg, opts);
return 0;
nla_put_failure:
return -EMSGSIZE;
}
|