ROUTE - accessing the routing table

Hi,

How do I access and modify the routing tables? The doco for ROUTE says how
to open the special socket, but is pretty vague about sending messages to
it.

To open the socket:
fd = socket (PF_ROUTE, SOCK_RAW, AF_UNSPEC);

How then do I compile, send and receive messages via the SOCK_RAW interface?
Is there any example code available?

Regards
Stuart Harding

A source for examples could be:
“UNIX Network Programming. Networking APIs: Sockets and XTI”
by W. Richard Stevens (ISBN 0-13-490012-X) or any BSD based
code that uses routing sockets.

-seanb

Stuart Harding <stuart@intellidesign.com.au> wrote:
: Hi,

: How do I access and modify the routing tables? The doco for ROUTE says how
: to open the special socket, but is pretty vague about sending messages to
: it.

: To open the socket:
: fd = socket (PF_ROUTE, SOCK_RAW, AF_UNSPEC);

: How then do I compile, send and receive messages via the SOCK_RAW interface?
: Is there any example code available?

: Regards
: Stuart Harding