Configuring Linux routing tables/rules from a C-program

Discussion in 'Linux Networking' started by dspfun, Jun 19, 2012.

  1. dspfun

    dspfun Guest


    Which is the preferred way to configure routing table(s), rules, etc.
    from a C-program?

    Would it be to

    1) Spawn a copy of the iproute2 "ip" program (in /sbin/ip ) with
    relevant parameters?


    2) Use the netlink protocol "directly", i.e. with RTM_NEWROUTE,
    RTM_NEWRULE, etc.?

    dspfun, Jun 19, 2012
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.