netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kurt Van Dijck <kurt.van.dijck-/BeEPy95v10@public.gmane.org>
To: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	socketcan-core-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org
Subject: getifaddrs
Date: Thu, 20 Jan 2011 13:57:13 +0100	[thread overview]
Message-ID: <20110120125713.GB743@e-circ.dyndns.org> (raw)

Hello,

I am in the process of adding j1939 support in the linux kernel.
J1939 is a protocol on CAN, with addressing support. Therefore,
I'm tweaking in iproute2 as well, to extend the
$ ip address
output.

I have in kernel space
	rtnl_register(PF_CAN, RTM_GETADDR, NULL, j1939_nl_dump_ifaddr);
This 'j1939_nl_dump_ifaddr' does not dump 'struct sockaddr *', but
an ad-hoc format.

After I get a basic setup working, I tried calling 'getifaddrs'.
If I do 'getifaddrs', this callback is called, but
I do not understand how glibc (or any other libc) is capable of transforming
the rtnetlink address info into proper 'struct sockaddr_can *'.

I looked at AF_INET & AF_DECnet, and it seems I'm not supposed to
dump a 'struct sockaddr_can' over rtnetlink. Is 'getifaddrs' then doomed
to only work for INET addresses only?

Any idea's?

Thanks,
Kurt

                 reply	other threads:[~2011-01-20 12:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110120125713.GB743@e-circ.dyndns.org \
    --to=kurt.van.dijck-/beepy95v10@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=socketcan-core-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).