AW: How to cast a struct nl_object
Joerg Pommnitz
pommnitz at yahoo.com
Thu Mar 17 09:38:58 EDT 2011
Well...
If I'm not allowed to access netlink-types.h, then struct nl_object is not part
of the public API either. How am I supposed to access obj->ce_msgtype?
And actually looking at ce_msgtype seems wrong to me. The question I'm asking
the
object is "What are you?", not "How were you made?". Sure, with background
knowledge
one can infer the answer to the first question from the answer to the second,
but this seems a convoluted way to go.
May I suggest that an accessor for nl_object::ce_ops::oo_name would be very
useful?
--
Regards
Joerg
----- Ursprüngliche Mail ----
> Von: Thomas Graf <tgraf at infradead.org>
> An: Joerg Pommnitz <pommnitz at yahoo.com>
> CC: libnl at lists.infradead.org
> Gesendet: Donnerstag, den 17. März 2011, 14:16:12 Uhr
> Betreff: Re: How to cast a struct nl_object
>
> On Thu, Mar 17, 2011 at 04:55:22AM -0700, Joerg Pommnitz wrote:
> > Sorry, I feel rather stupid now. struct nl_object is actually a public type
> > defined
> > in netlink-types.h. I was confused by the fact that "struct nl_object" is
>not
>
> > documented in the DocBook documentation on
> > http://www.infradead.org/~tgr/libnl/doc-2.0
> > Please disregard my previous question.
>
> The easiest way is to look at obj->ce_msgtype to see what kind of
> message the object was derived from.
>
> http://www.infradead.org/~tgr/libnl/doc-2.0/group__object__api.html
>
> netlink-types.h is not part of the public API.
>
More information about the libnl
mailing list