How to use the RTM_IFINFO message of a Routing Socket
Ruslan Ermilov
ru at freebsd.org
Tue May 11 01:21:05 PDT 2004
On Mon, May 10, 2004 at 09:02:51PM +0200, Juan Rodriguez Hervella wrote:
> Hello,
>
> I dont understand, looking at "man 4 route", how to use the RTM_IFINFO
> message of a Routing Socket.
>
> I mean, do I have to make a "write" on the socket with a
> "struct if_msghdr" of type = RTM_IFINFO and later on a "read" with
> the same data structure ?
>
> Or can I just open the PF_ROUTE socket and then make a "read" with
> a "struct if_msghdr" data structure, w/out doing a "write" ?
>
> I'm really lost, and I haven't found documentation about this topic, so
> please if somebody can give me an example or pointing me to
> somewhere to learn to use this, I'd be delighted. Looking at
> "usr/src/bin/route.c" is simple another big mess for me.
>
> I'm looking forward to your answers, net-people !
>
A kernel emits the RTM_IFINFO message on a routing socket by ether
reacting to the NET_RT_IFLIST sysctl(3), or when the interface's
status changes (see "route monitor" for one such example).
Cheers,
--
Ruslan Ermilov
ru at FreeBSD.org
FreeBSD committer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-net/attachments/20040511/46bbccb2/attachment.bin
More information about the freebsd-net
mailing list