View Source VintageNet.Route.IPRoute (vintage_net v0.13.3)
This module knows how to invoke the ip
command to modify the Linux routing tables
Link to this section Summary
Functions
Add a default route
Add a local route
Add a source IP address -> routing table rule
Clear one local route generically
Clear one local route
Clear one default route out of the main table for any interface
Clear one default route that goes to the specified interface
Clear out one rule
Clear all routes on all interfaces
Clear all rules that select the specified table or tables
Link to this section Functions
@spec add_default_route( VintageNet.ifname(), :inet.ip_address(), VintageNet.Route.metric(), VintageNet.Route.table_index() ) :: :ok | {:error, any()}
Add a default route
@spec add_local_route( VintageNet.ifname(), :inet.ip_address(), VintageNet.prefix_length(), VintageNet.Route.metric(), VintageNet.Route.table_index() ) :: :ok | {:error, any()}
Add a local route
@spec add_rule(:inet.ip_address(), VintageNet.Route.table_index()) :: :ok | {:error, any()}
Add a source IP address -> routing table rule
@spec clear_a_local_route(VintageNet.ifname()) :: :ok | {:error, any()}
Clear one local route generically
@spec clear_a_local_route( VintageNet.ifname(), :inet.ip_address(), VintageNet.prefix_length(), VintageNet.Route.metric(), VintageNet.Route.table_index() ) :: :ok | {:error, any()}
Clear one local route
@spec clear_a_route() :: :ok | {:error, any()}
Clear one default route out of the main table for any interface
@spec clear_a_route(VintageNet.ifname(), VintageNet.Route.table_index()) :: :ok | {:error, any()}
Clear one default route that goes to the specified interface
@spec clear_a_rule(VintageNet.Route.table_index()) :: :ok | {:error, any()}
Clear out one rule
@spec clear_all_routes() :: :ok
Clear all routes on all interfaces
@spec clear_all_rules(VintageNet.Route.table_index() | Enumerable.t()) :: :ok
Clear all rules that select the specified table or tables