Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RDE Implementation #50

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/bgp/message/update/attribute/as_path.ex
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ defmodule BGP.Message.UPDATE.Attribute.ASPath do

@type type :: :as_sequence | :as_set | :as_confed_sequence | :as_confed_set
@type length :: non_neg_integer()
@type t :: %__MODULE__{value: [{type(), length(), OPEN.asn()}]}
@type t :: %__MODULE__{value: {type(), length(), [OPEN.asn()]}}

defstruct value: []

Expand Down
6 changes: 5 additions & 1 deletion lib/bgp/server.ex
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ defmodule BGP.Server do
Supervisor.init(
[
{Registry, keys: :unique, name: session_registry(args[:server])},
{BGP.Server.Session.Group, args[:server]},
{BGP.Server.RDE, server: args[:server]},
{BGP.Server.Session.Supervisor, args[:server]},
{
Expand Down Expand Up @@ -244,5 +245,8 @@ defmodule BGP.Server do
def session_registry(server), do: Module.concat(server, "Session.Registry")

@spec session_via(t(), IP.Address.t()) :: {:via, module(), term()}
def session_via(server, host), do: {:via, Registry, {session_registry(server), host}}
def session_via(server, hostname), do: {:via, Registry, {session_registry(server), hostname}}

@spec session_group_for(t()) :: module()
def session_group_for(server), do: Module.concat(server, "Session.Group")
end
Loading
Loading