# Functions
DecodeSessionID extracts and returns session ID if available, or original diam SessionId (diamSid) string otherwise Input: OriginHost;rand1#;rand2#;IMSIxyz Returns: IMSIxyz-rand# rand# = rand1# + rand2#, where + means concatenation.
EncodePLMNID encodes a PLMN into its byte encoding See https://www.arib.or.jp/english/html/overview/doc/STD-T63v10_70/5_Appendix/Rel11/29/29272-bb0.pdf#page=73.
EncodeSessionID encodes SessionID in rfc6733 compliant form: <DiameterIdentity>;<high 32 bits>;<low 32 bits>[;<optional value>] OriginHost/Realm;rand#;rand#;IMSIxyz.
EncodeUserLocation encodes a PLMN ID, TAI, and ECI into the correct encoding for 3GPP-User-Location-Info.
ExtractImsiFromSessionID extracts and returns IMSI (without 'IMSI' prefix) from diameter session ID if available, or original diam SessionId (diamSid) string otherwise Input: OriginHost;[rand1#;rand2#;]IMSIxyz Returns: xyz.
GenSessionID generates rfc6733 compliant session ID: <DiameterIdentity>;<high 32 bits>;<low 32 bits>[;<optional value>] Where <optional value> is base 16 uint32 random number.
GenSessionIDOpt generates rfc6733 compliant session ID: <DiameterIdentity>;<high 32 bits>;<low 32 bits>;IMSI<imsi value>.
GenSessionIDOpt generates rfc6733 compliant session ID: <DiameterIdentity>;<high 32 bits>;<low 32 bits>[;<optional value>].
GetBoolValueOrEnv returns value of the flagValue if it exists, then the environment variable if it exists, or defaultValue if not.
GetValue returns value of the flagValue if it exists, or defaultValue if not.
GetValueOrEnv returns value of the flagValue if it exists, then the environment variable if it exists, or defaultValue if not.
GetValueUint64 returns value of the flagValue if it exists, or defaultValue if not.
NewClient creates a new client based on the config passed.
No description provided by the author
NewProxiableRequest creates a request with the proxy bit set, meaning that a diameter server can relay the request to another server.
No description provided by the author
ParseDiamSessionID parses given session ID in the form of: // OriginHost;req#;rand#;IMSIxyz_BearerId and returns OriginHost, Request Number, Rand, IMSI (without prefix) and bearrerId if present.
TranslateDiamResultCode maps Diameter Result Codes (both Base and Experimental) to GRPC Status Error.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Packet-Switch service context.
No description provided by the author
SuccessCode is the result code returned from a successful diameter call.
diameter code for a 3GPP application.
# Structs
Abort-Session Answer (ASA)
< Session-Id >
{ Origin-Host }
{ Origin-Realm }
[ Result-Code ]
[ Experimental-Result ]
[ Origin-State-Id ]
[ Error-Message ]
[ Error-Reporting-Host ]
*[ Failed-AVP ]
*[ Redirected-Host ]
[ Redirected-Host-Usage ]
[ Redirected-Max-Cache-Time ]
*[ Proxy-Info ]
*[ AVP ]
*/.
https://tools.ietf.org/html/rfc4005#page-16 Abort-Session Request (ASR)
< Session-Id >
{ Origin-Host }
{ Origin-Realm }
{ Destination-Realm }
{ Destination-Host }
{ Auth-Application-Id }
[ User-Name ]
[ Origin-State-Id ]
* [ Proxy-Info ]
* [ Route-Record ]
* [ AVP ]
*/.
Client is a wrapper around a sm.Client that handles connection management, request tracking, and configuration.
Connection is representing a diameter connection that you can send messages to and get metadata from (for building AVPs).
ConnectionManager holds a map of connections keyed by the server ip/protocol pair.
DiameterClientConfig holds information for connecting with a diameter server.
No description provided by the author
No description provided by the author
KeyAndAnswer wraps the information to be returned to an AnswerHandler.
RequestTracker stores a mapping of keys to channels and is intended to be used to store unique identifiers of requests and channels to send answers to after they are received.
# Type aliases
AnswerHandler is called when an answer is received.