1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215
|
.TH megaco_udp 3 "megaco 3.8" "Ericsson AB" "ERLANG MODULE DEFINITION"
.SH MODULE
megaco_udp \- Interface module to UDP transport protocol for Megaco/H\&.248\&.
.SH DESCRIPTION
.LP
This module contains the public interface to the UDP/IP version transport protocol for Megaco/H\&.248\&.
.SH EXPORTS
.LP
.B
start_transport() -> {ok, TransportRef}
.br
.RS
.TP
Types
TransportRef = pid()
.br
.RE
.RS
.LP
This function is used for starting the UDP/IP transport service\&. Use exit(TransportRef, Reason) to stop the transport service\&.
.RE
.LP
.B
open(TransportRef, OptionList) -> {ok, Handle, ControlPid} | {error, Reason}
.br
.RS
.TP
Types
TransportRef = pid() | regname()
.br
OptionList = [option()]
.br
option() = {port, integer()} |{options, list()} |{receive_handle, receive_handle()} |{module, atom()}
.br
Handle = socket_handle()
.br
receive_handle() = term()
.br
ControlPid = pid()
.br
Reason = term()
.br
.RE
.RS
.LP
This function is used to open an UDP/IP socket\&.
.LP
The \fImodule\fR option makes it possible for the user to provide their own callback module\&. The functions \fIreceive_message/4\fR or \fIprocess_received_message/4\fR of this module is called when a new message is received (which one depends on the size of the message; small - receive_message, large - process_received_message)\&. Default value is \fImegaco\fR\&.
.RE
.LP
.B
close(Handle, Msg) -> ok
.br
.RS
.TP
Types
Handle = socket_handle()
.br
Msg
.br
.RE
.RS
.LP
This function is used for closing an active UDP socket\&.
.RE
.LP
.B
socket(Handle) -> Socket
.br
.RS
.TP
Types
Handle = socket_handle()
.br
Socket = inet_socket()
.br
.RE
.RS
.LP
This function is used to convert a socket_handle() to a inet_socket()\&. inet_socket() is a plain socket, see the inet module for more info\&.
.RE
.LP
.B
create_send_handle(Handle, Host, Port) -> send_handle()
.br
.RS
.TP
Types
Handle = socket_handle()
.br
Host = {A, B, C, D} | string()
.br
Port = integer()
.br
.RE
.RS
.LP
Creates a send handle from a transport handle\&. The send handle is intended to be used by megaco_udp:send_message/2\&.
.RE
.LP
.B
send_message(SendHandle, Msg) -> ok
.br
.RS
.TP
Types
SendHandle = send_handle()
.br
Message = binary() | iolist()
.br
.RE
.RS
.LP
Sends a message on a socket\&. The send handle is obtained by megaco_udp:create_send_handle/3\&. Increments the NumOutMessages and NumOutOctets counters if message successfully sent\&. In case of a failure to send, the NumErrors counter is \fInot\fR inremented\&. This is done elsewhere in the megaco app\&.
.RE
.LP
.B
block(Handle) -> ok
.br
.RS
.TP
Types
Handle = socket_handle()
.br
.RE
.RS
.LP
Stop receiving incoming messages on the socket\&.
.RE
.LP
.B
unblock(Handle) -> ok
.br
.RS
.TP
Types
Handle = socket_handle()
.br
.RE
.RS
.LP
Starting to receive incoming messages from the socket again\&.
.RE
.LP
.B
upgrade_receive_handle(ControlPid, NewHandle) -> ok
.br
.RS
.TP
Types
ControlPid = pid()
.br
NewHandle = receive_handle()
.br
receive_handle() = term()
.br
.RE
.RS
.LP
Update the receive handle of the control process (e\&.g\&. after having changed protocol version)\&.
.RE
.LP
.B
get_stats() -> {ok, TotalStats} | {error, Reason}
.br
.B
get_stats(SendHandle) -> {ok, SendHandleStats} | {error, Reason}
.br
.B
get_stats(SendHandle, Counter) -> {ok, CounterStats} | {error, Reason}
.br
.RS
.TP
Types
TotalStats = [total_stats()]
.br
total_stats() = {send_handle(), [stats()]}
.br
SendHandle = send_handle()
.br
SendHandleStats = [stats()]
.br
Counter = udp_stats_counter()
.br
CounterStats = integer()
.br
stats() = {udp_stats_counter(), integer()}
.br
tcp_stats_counter() = medGwyGatewayNumInMessages | medGwyGatewayNumInOctets | medGwyGatewayNumOutMessages | medGwyGatewayNumOutOctets | medGwyGatewayNumErrors
.br
Reason = term()
.br
.RE
.RS
.LP
Retreive the UDP related (SNMP) statistics counters\&.
.RE
.LP
.B
reset_stats() -> void()
.br
.B
reset_stats(SendHandle) -> void()
.br
.RS
.TP
Types
SendHandle = send_handle()
.br
.RE
.RS
.LP
Reset all TCP related (SNMP) statistics counters\&.
.RE
|