1megaco_udp(3)              Erlang Module Definition              megaco_udp(3)
2
3
4

NAME

6       megaco_udp   -   Interface   module   to  UDP  transport  protocol  for
7       Megaco/H.248.
8

DESCRIPTION

10       This module contains the public interface to the UDP/IP version  trans‐
11       port protocol for Megaco/H.248.
12

EXPORTS

14       start_transport() -> {ok, TransportRef}
15
16              Types:
17
18                 TransportRef = pid()
19
20              This function is used for starting the UDP/IP transport service.
21              Use exit(TransportRef, Reason) to stop the transport service.
22
23       open(TransportRef, OptionList) -> {ok, Handle,  ControlPid}  |  {error,
24       Reason}
25
26              Types:
27
28                 TransportRef = pid() | regname()
29                 OptionList = [option()]
30                 option()  =  {port,  integer()}  |  {options,  list()} | {re‐
31                 ceive_handle,  receive_handle()}   |   {module,   atom()}   |
32                 {inet_backend, default | inet | socket}
33                 Handle = socket_handle()
34                 receive_handle() = term()
35                 ControlPid = pid()
36                 Reason = term()
37
38              This function is used to open an UDP/IP socket.
39
40                module:
41                  The  option  makes it possible for the user to provide their
42                  own callback  module.  The  functions  receive_message/4  or
43                  process_received_message/4  of  this module is called when a
44                  new message is received. Which one depends on  the  size  of
45                  the message:
46
47                  small:
48                    receive_message
49
50                  large:
51                    process_received_message
52
53                  Default value is megaco.
54
55       close(Handle, Msg) -> ok
56
57              Types:
58
59                 Handle = socket_handle()
60                 Msg
61
62              This function is used for closing an active UDP socket.
63
64       socket(Handle) -> Socket
65
66              Types:
67
68                 Handle = socket_handle()
69                 Socket = inet_socket()
70
71              This  function  is  used  to  convert  a  socket_handle()  to  a
72              inet_socket(). inet_socket() is a plain  socket,  see  the  inet
73              module for more info.
74
75       create_send_handle(Handle, Host, Port) -> send_handle()
76
77              Types:
78
79                 Handle = socket_handle()
80                 Host = {A,B,C,D} | string()
81                 Port = integer()
82
83              Creates  a  send handle from a transport handle. The send handle
84              is intended to be used by megaco_udp:send_message/2.
85
86       send_message(SendHandle, Msg) -> ok
87
88              Types:
89
90                 SendHandle = send_handle()
91                 Message = binary() | iolist()
92
93              Sends a message on a socket. The  send  handle  is  obtained  by
94              megaco_udp:create_send_handle/3.  Increments  the NumOutMessages
95              and NumOutOctets counters if message successfully sent. In  case
96              of  a failure to send, the NumErrors counter is not incremented.
97              This is done elsewhere in the megaco app.
98
99       block(Handle) -> ok
100
101              Types:
102
103                 Handle = socket_handle()
104
105              Stop receiving incoming messages on the socket.
106
107       unblock(Handle) -> ok
108
109              Types:
110
111                 Handle = socket_handle()
112
113              Starting to receive incoming messages from the socket again.
114
115       upgrade_receive_handle(ControlPid, NewHandle) -> ok
116
117              Types:
118
119                 ControlPid = pid()
120                 NewHandle = receive_handle()
121                 receive_handle() = term()
122
123              Update the receive handle of the  control  process  (e.g.  after
124              having changed protocol version).
125
126       get_stats() -> {ok, TotalStats} | {error, Reason}
127       get_stats(SendHandle) -> {ok, SendHandleStats} | {error, Reason}
128       get_stats(SendHandle, Counter) -> {ok, CounterStats} | {error, Reason}
129
130              Types:
131
132                 TotalStats = [total_stats()]
133                 total_stats() = {send_handle(), [stats()]}
134                 SendHandle = send_handle()
135                 SendHandleStats = [stats()]
136                 Counter = udp_stats_counter()
137                 CounterStats = integer()
138                 stats() = {udp_stats_counter(), integer()}
139                 tcp_stats_counter()   =  medGwyGatewayNumInMessages  |  medG‐
140                 wyGatewayNumInOctets |  medGwyGatewayNumOutMessages  |  medG‐
141                 wyGatewayNumOutOctets | medGwyGatewayNumErrors
142                 Reason = term()
143
144              Retreive the UDP related (SNMP) statistics counters.
145
146       reset_stats() -> void()
147       reset_stats(SendHandle) -> void()
148
149              Types:
150
151                 SendHandle = send_handle()
152
153              Reset all TCP related (SNMP) statistics counters.
154
155
156
157Ericsson AB                       megaco 4.3                     megaco_udp(3)
Impressum