Commit Graph

13 Commits

Author SHA1 Message Date
Tim Kourt eebd44cfc0 rtnlutil: Add IPv6 route deletion helper 2019-10-03 10:56:07 -05:00
Tim Kourt 57095eaa2c rtnlutil: Add IPv6 default route helper 2019-09-30 11:08:23 -05:00
Tim Kourt f0b3a6cf1d rtnlutil: Add IPv6 address change helpers
Implements the IPv6 helper functions to add/delete IP addresses.
2019-09-30 11:08:01 -05:00
Tim Kourt e3e569b75b rtnlutil: Add IPv6 address dump 2019-09-30 11:07:37 -05:00
Tim Kourt c8eb33c2c2 rtnlutil: Add parser for IPv6 RTNL packet
At this time, we are only looking for IFA_ADDRESS attribute that
represents the IPv6 IP address.
2019-09-30 11:07:37 -05:00
Tim Kourt cce59ad7f1 rtnlutil: Add connected and gateway route API
The API allows to add connected and gateway routes to the main
routing table.

rtnl_route_ipv4_add_gateway() is equivalent to the following
example 'ip route' command:
ip route add default via 10.0.0.1 dev wlan0 proto dhcp src 10.0.0.2 metric 339

rtnl_route_ipv4_add_connected()  is equivalent to the following
example 'ip route' command:
sudo ip route add 10.0.0.0/24 dev wlan0 proto dhcp src 10.0.0.2 scope link

The 'ip route' output from the above commands looks as follows:

rtnl_route_ipv4_add_connected():
10.0.0.0/24 dev wlan0 proto dhcp scope link src 10.0.0.2

rtnl_route_ipv4_add_gateway():
default via 10.0.0.1 dev wlan0 proto dhcp src 10.0.0.2 metric 339
2019-07-31 03:49:35 -05:00
Tim Kourt 1c7e803dbb rtnlutil: Add utility to DUMP ipv4 routes 2019-07-21 07:04:32 -05:00
Tim Kourt 83db65e929 rtnlutil: Add utility to extract route attributes 2019-07-20 06:51:46 -05:00
Denis Kenzior ec38545a68 rtnlutil: Add utility to set MAC address 2019-07-02 15:47:05 -05:00
Tim Kourt 6aabd80051 rtnlutil: Utils to Add/Remove IPv4 addresses 2019-06-26 10:36:59 -05:00
Tim Kourt 1368851611 netconfig: Obtain all currently assigned IPv4 addresses 2019-06-26 10:27:27 -05:00
Tim Kourt f3f343c04b rtnlutil: Add parser for ifaddrmsg struct
Its purpose is to extract interface label, ip, and
broadcast addresses out of ifaddrmsg rntl message.
2019-06-26 10:26:26 -05:00
Tim Kourt 5104e6752f rtnlutil: Introduce rtnl utility
The rtnl utility will encapsulate a collection of functions for rtnl ops.
2019-05-06 13:21:15 -05:00