diameter

Types


Address() = ip_address() (see module inet) | string()

DiameterIdentity() = OctetString()

DiameterURI() = OctetString()

Enumerated() = Integer32()

Float32() = '-infinity' | float() | infinity

Float64() = '-infinity' | float() | infinity

Grouped() = list() | tuple()

IPFilterRule() = OctetString()

Integer32() = -2147483647..2147483647

Integer64() = -9223372036854775807..9223372036854775807

OctetString() = iolist()

QoSFilterRule() = OctetString()

Time() = {{integer(), 1..12, 1..31}, {0..23, 0..59, 0..59}}

UTF8String() = iolist()

Unsigned32() = 0..4294967295

Unsigned64() = 0..18446744073709551615

app_alias() = any()

app_module() = module() | maybe_improper_list(module(), list()) | #diameter_callback{}

application_opt() = {alias, app_alias()} | {dictionary, module()} | {module, app_module()} | {state, any()} | {call_mutates_state, boolean()} | {answer_errors, callback | report | discard} | {request_errors, answer_3xxx | answer | callback}

call_opt() = {extra, list()} | {filter, peer_filter()} | {timeout, Unsigned32()} | detach

capability() = {'Origin-Host', DiameterIdentity()} | {'Origin-Realm', DiameterIdentity()} | {'Host-IP-Address', [Address()]} | {'Vendor-Id', Unsigned32()} | {'Product-Name', UTF8String()} | {'Supported-Vendor-Id', [Unsigned32()]} | {'Auth-Application-Id', [Unsigned32()]} | {'Vendor-Specific-Application-Id', [Grouped()]} | {'Firmware-Revision', Unsigned32()}

evaluable() = {module(), atom(), list()} | function() | maybe_improper_list(evaluable(), list())

peer_filter() = none | host | realm | {host, any | DiameterIdentity()} | {realm, any | DiameterIdentity()} | {eval, evaluable()} | {neg, peer_filter()} | {all, [peer_filter()]} | {any, [peer_filter()]}

remotes() = boolean() | [node()] | evaluable()

restriction() = false | node | nodes | [node()] | evaluable()

sequence() = {Unsigned32(), 0..32}

service_name() = any()

service_opt() = capability() | {application, [application_opt()]} | {restrict_connections, restriction()} | {sequence, sequence() | evaluable()} | {share_peers, remotes()} | {use_shared_peers, remotes()} | {spawn_opt, list()}

transport_opt() = {transport_module, atom()} | {transport_config, any()} | {transport_config, any(), Unsigned32() | infinity} | {applications, [app_alias()]} | {capabilities, [capability()]} | {capabilities_cb, evaluable()} | {capx_timeout, Unsigned32()} | {disconnect_cb, evaluable()} | {length_errors, exit | handle | discard} | {connect_timer, Unsigned32()} | {watchdog_timer, Unsigned32() | {module(), atom(), list()}} | {watchdog_config, [{okay | suspect, non_neg_integer()}]} | {spawn_opt, list()} | {private, any()}

transport_pred/0

transport_ref() = reference()

Functions


start() -> ok | {error, term()}

stop() -> ok | {error, term()}

start_service(SvcName::service_name(), Opts::[service_opt()]) -> ok | {error, term()}

stop_service(SvcName::service_name()) -> ok | {error, term()}

services() -> [service_name()]

service_info(SvcName::service_name(), Option::atom() | [atom()]) -> any()

add_transport(SvcName::service_name(), Cfg::{listen | connect, [transport_opt()]}) -> {ok, transport_ref()} | {error, term()}

remove_transport(SvcName::service_name(), Pred::transport_pred()) -> ok | {error, term()}

subscribe(SvcName::service_name()) -> true

unsubscribe(SvcName::service_name()) -> true

session_id(Ident::DiameterIdentity()) -> OctetString()

origin_state_id() -> Unsigned32()

call(SvcName::service_name(), App::app_alias(), Message::any(), Options::[call_opt()]) -> any()

call(SvcName, App, Message) -> term()