vintage_net v0.2.1 VintageNet.Route.IPRoute

This module knows how to invoke ip to change the routing table

Link to this section Summary

Link to this section Functions

Link to this function

add_default_route(ifname, route, metric, table_index)

Add a default route

Link to this function

add_local_route(ifname, ip, subnet_bits, metric)

Add a local route

Link to this function

add_rule(ip_address, table_index)
add_rule(:inet.ip_address(), VintageNet.Route.Calculator.table_index()) ::
  :ok | {:error, any()}

Add a source IP address -> routing table rule

Link to this function

clear_a_local_route(ifname)
clear_a_local_route(VintageNet.ifname()) :: :ok | {:error, any()}

Link to this function

clear_a_local_route(ifname, ip, subnet_bits, metric)

Link to this function

clear_a_route()
clear_a_route() :: :ok | {:error, any()}

Link to this function

clear_a_route(ifname, table_index \\ :main)
clear_a_route(VintageNet.ifname(), VintageNet.Route.Calculator.table_index()) ::
  :ok | {:error, any()}

Link to this function

clear_a_rule(table_index)
clear_a_rule(VintageNet.Route.Calculator.table_index()) ::
  :ok | {:error, any()}

Link to this function

clear_all_routes()
clear_all_routes() :: :ok

Clear all routes on all interfaces

Link to this function

clear_all_rules(table_index)

Clear all rules that select the specified table or tables