The number should not be a problem; the strange case is going to be the
system that has more than one WiMAX interface.
So if the general case is going to be 1 interface, instead of making one
lookup for the family name and then another lookup for the attribute
indicating the interface, making it one single lookup reduces the overhead.
the libnls I've seen don't define type NLA_BINARY -- I don't really know
how they map onto each other, but using NLA_UNSPEC on both sides (kernel
and userspace) seems to work for transferring a buffer.
Note taken, thanks
So I am going to create a message, with no family specific payload
but just an attribute with a buffer sized 'size'. What should
I pass to it so it preallocates correctly?
That construct (at least now) seems to work.
Fixed
This is mostly used before sending a message to user space, so genl_info
doesn't apply. By default all notifications from the device are sent over
generic netlink to user space.
But some times we need to consume that information inside the kernel, so
instead of creating two separate formats, we just use the same. So we need
to extract, from an SKB that is packaged to be sent as generic netlink,
the header. And at his point there is no genl_info :(
I've missed a couple that can get it from genl_info (in rfkill and msg), plus
reset doesn't really needed. Updated them; the rest are contained in
wimax_msg_data() and wimax_msg_len().
Good point; actually in most cases it either needs the pointer data
or both, so probably a wimax_msg_get_data_len() helper makes more sense.
Why? Should I just use NLA_BINARY then? What do I use in user space to compose
it if libnl still doesn't know about NLA_BINARY?
I just need it to verify that there is an attribute with a buffer. That's it.
So the policy is already set up like that, it has a pointer to the policy.
Are you saying it should be possible for me to just access genl_info->attrs[]?
[I didn't know that existed, just found out after your comment made me look
at it].
/me tries...
sweet, it works -- well, this cuts more code out, thanks.
--
Inaky
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html