vintage_net v0.6.2 VintageNet.Interface.RawConfig View Source

Raw configuration for an interface

This struct contains the low-level instructions for how to configure and unconfigure an interface.

Fields:

  • ifname - the name of the interface (e.g., "eth0")
  • type - the type of network interface (aka the module that created the config)
  • source_config - the configuration that generated this one
  • require_interface - require the interface to exist in the system before configuring
  • retry_millis - if bringing the interface up fails, wait this amount of time before retrying
  • files - a list of file path, content tuples
  • restart_strategy - the restart strategy for the list of child_specs. I.e., `:one_for_one | :one_for_all | :rest_for_one

    • child_specs - a set of child_specs for GenServers to start up and supervise
    • up_cmd_millis - the maximum amount of time to allow the up command list to take
    • up_cmds - a list of commands to run to configure the interface
    • down_cmd_millis - the maximum amount of time to allow the down command list to take
    • down_cmds - a list of commands to run to unconfigure the interface
    • cleanup_files - additional files to delete (the files listed in files are deleted too)

Link to this section Summary

Link to this section Types

Link to this type

command()

View Source
command() ::
  {:run | :run_ignore_errors, String.t(), [String.t()]} | {:fun, function()}
Link to this type

file_contents()

View Source
file_contents() :: {Path.t(), String.t()}
Link to this type

t()

View Source
t() :: %VintageNet.Interface.RawConfig{
  child_specs: [Supervisor.child_spec() | {module(), term()} | module()],
  cleanup_files: [Path.t()],
  down_cmd_millis: non_neg_integer(),
  down_cmds: [command()],
  files: [file_contents()],
  ifname: VintageNet.ifname(),
  require_interface: boolean(),
  restart_strategy: Supervisor.strategy(),
  retry_millis: non_neg_integer(),
  source_config: map(),
  type: atom(),
  up_cmd_millis: non_neg_integer(),
  up_cmds: [command()]
}

Link to this section Functions

Link to this function

unimplemented_ioctl(_, _)

View Source