1libmms(3LIB)                  Interface Libraries                 libmms(3LIB)
2
3
4

NAME

6       libmms - Media Management System library
7

SYNOPSIS

9       cc [ flag... ] file... -lmms [ library... ]
10
11

DESCRIPTION

13       Functions in this library provide access to the Media Management System
14       (MMS).
15
16
17       The Media Management System (MMS) is a distributed removable media man‐
18       agement  system.  It  is  based  on  IEEE 1244, Media Management System
19       (MMS). Client applications request MMS to mount and unmount  cartridges
20       and process them after they are mounted. Applications use Media Manage‐
21       ment Protocol (MMP) commands to make  requests.  The  Media  Management
22       System  (MMS) client API provides basic functions that give an applica‐
23       tion the ability to connect to MMS, send commands to MMS, and interpret
24       the responses to the commands.
25
26
27       For  a  client to establish a connection to MMS, it needs to first ini‐
28       tialize a session and then establish  the  connection.  There  are  two
29       types of sessions:
30
31       synchronous     A  synchronous  connection  means that the client waits
32                       for a response for each command that it sends to MMS.
33
34
35       asynchronous    A asynchronous connections means the  client  can  con‐
36                       tinue  to  send  commands  to MMS without waiting for a
37                       response to the commands.
38
39
40
41       The type of session is specified  with  the  choice  of  initialization
42       function, either mms_init() or mms_ainit().
43
44
45       The connection is established with the hello function, mms_hello().
46
47
48       Within  an  asynchronous  session, the client can also send synchronous
49       commands.
50
51
52       If a client's instance is configured to allow  multiple  sessions,  the
53       client can create more than one session, in any combination of synchro‐
54       nous and asynchronous types. The client must manage which commands  are
55       sent over which session.
56
57
58       If  the  client's instance is not configured to allow multiple sessions
59       and a second init function  is  called,  the  client's  hello  function
60       receives an "unwelcome" response from MMS.
61
62
63       Any command sent using the asynchronous send function, mms_send_acmd(),
64       specifies a callback routine that is invoked when the MMS API  receives
65       a  response to the command. This callback routine is a client-specified
66       function. A callback function can  not  issue  other  commands  to  MMS
67       because  the  callback  function  is  executed as part of the MMS API's
68       reader thread.
69
70
71       An asynchronous session allows the client to also issue commands  using
72       the  synchronous  send function, mms_send_cmd(), waiting for a response
73       before returning.
74
75
76       A client can receive notification of certain events that  occur  within
77       MMS through the event notification mechanism.
78
79
80       Routines are provided by the API to help in the processing of responses
81       to the client's commands.
82
83
84       For OpenSolaris platforms, libmms is released in  shared  object  (.so)
85       format, installed in /usr/lib/libmms.so.
86
87
88       The  following  table  lists  libmms library routines and indicates the
89       type of connection that supports them and whether they are optional.
90
91
92
93
94             Routine                 Availability                    Required
95       ─────────────────────────────────────────────────────────────────────────────────
96       mms_init()            synchronous                    required for synchronous
97       ─────────────────────────────────────────────────────────────────────────────────
98       mms_ainit()           asynchronous                   required for asynchronous
99       ─────────────────────────────────────────────────────────────────────────────────
100       mms_hello()           synchronous and asynchronous   required for both
101       ─────────────────────────────────────────────────────────────────────────────────
102       mms_send_cmd()        synchronous and asynchronous   required  for  synchronous,
103                                                            optional for asynchronous
104       ─────────────────────────────────────────────────────────────────────────────────
105       mms_send_acmd()       synchronous and asynchronous   required  for asynchronous,
106                                                            optional for synchronous
107       ─────────────────────────────────────────────────────────────────────────────────
108       mms_read_response()   synchronous and asynchronous   required  for  intermediate
109                                                            response to mms_send_cmd()
110       ─────────────────────────────────────────────────────────────────────────────────
111       mms_free_rsp()        synchronous and asynchronous   required for both
112       ─────────────────────────────────────────────────────────────────────────────────
113       mms_goodbye()         synchronous                    required for synchronous
114       ─────────────────────────────────────────────────────────────────────────────────
115       mms_agoodbye()        asynchronous                   required for asynchronous
116
117
118
119       The  following routines are used by a client to to process the response
120       to a MMS command.
121
122       mms_rsp_type()          Returns the type of response that was  received
123                               for the command.
124
125
126       mms_handle_err_rsp()    Returns  the  error code and error message from
127                               an error response.
128
129
130       mms_get_tree()          Returns the parse tree of the response.
131
132
133       mms_get_attribute()     Obtains the value associcated with a  attribute
134                               name from a response in namevalue mode.
135
136

USAGE

138       To  make  a  client  application able to use MMS, build the client with
139       access to the MMS API library routines and then configure the  applica‐
140       tion.
141
142           1.     Get a copy of the MMS source tree.
143
144           2.     Include  <mms_api.h>  and  <mms_sym.h>  in the makefile. The
145                  path is  the  san-andreas/include/$(OBJ_DIR).  For  example,
146                  OBJ_DIR is the obj/SunOS_5.10_sparc_DEBUG.
147
148           3.     Link  the  client  to  the mms library to get the MMS API. A
149                  client can link either statically or  dynamically.  To  link
150                  the     library     statically,    the    path    is    san-
151                  andreas/lib/$(OBJ_DIR). To link at runtime, MMS is installed
152                  in /opt/SUNWsmmms/lib/libmms.so.
153
154           4.     Link with either libcommon.so or libcommon.a depending on if
155                  the client is dynamically linked or statically linked.
156
157           5.     Create the client's application name in MMS database. Client
158                  application instances must be created within MMS database in
159                  order for clients to establish  a connection with MMS.
160
161           6.     Use the MMS database password to connect to MMS. The default
162                  database  password  is  a  construction of the administrator
163                  password with the characters " dbadmin" appended.
164

INTERFACES

166       The shared object libmms.so.1 provides the  public  interfaces  defined
167       below.  See Intro(3) for additional information on shared object inter‐
168       faces.
169
170
171
172
173       mms_agoodbye                  mms_ainit
174       mms_free_rsp                  mms_get_attribute
175       mms_get_str                   mms_get_tree
176       mms_goodbye                   mms_handle_err_rsp
177       mms_hello                     mms_init
178       mms_read_response             mms_rsp_type
179       mms_send_acmd                 mms_send_cmd
180
181

FILES

183       /usr/lib/libmms.so.1       shared object
184
185
186       /usr/lib/64/libmms.so.1    64-bit shared object
187
188

ATTRIBUTES

190       See attributes(5) for descriptions of the following attributes:
191
192
193
194
195       ┌─────────────────────────────┬─────────────────────────────┐
196       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
197       ├─────────────────────────────┼─────────────────────────────┤
198       │Availability                 │SUNWmmsu                     │
199       ├─────────────────────────────┼─────────────────────────────┤
200       │Interface Stability          │Uncommitted                  │
201       ├─────────────────────────────┼─────────────────────────────┤
202       │MT-Level                     │MT-Safe                      │
203       └─────────────────────────────┴─────────────────────────────┘
204

SEE ALSO

206       Intro(3),   mms_init(3MMS),   mms_rsp_type(3MMS),   mms_send_cmd(3MMS),
207       attributes(5)
208
209
210
211SunOS 5.11                        2 Dec 2008                      libmms(3LIB)
Impressum