<title>SPARC Architectural Model: Device and Utility API
</title>
<body bgcolor=
"#FFFFFF" LANG=
"en-US">
<ul>mmi_get_interface - Get interface pointer by name
</ul>
<ul><font color=
"#0000FF">#include
"mmi.h"</font>
<p>void * mmi_get_interface (module_t *
<i>module
</i>, const char *
<i>interface_name
</i>)
</ul>
<ul>Call the interface callback registered by
<i>module
</i>.
If the instance did not register a callback, then call the function registered by its parent module.
</ul>
<ul>The definition of an interface is an agreement between clients of the interface and the provider.
If storage is allocated, the interface must define when it is freed.
</ul>
<ul>Returns an interface pointer corresponding to
<i>interface_name
</i>.
</ul>
<ul>the
<i>module
</i> is invalid,
</ul>
<ul>the
<i>module
</i> does not support the interface,
</ul>
<ul>or, the
<i>module
</i> and its parent did not register a callback.
</ul>
// get interface to my PCI bus
ME::get_bus(const char *bus_name)
module_t *bus = mmi_get_module(bus_name);
PciBusIf *busif = (PciBusIf*) mmi_get_interface(bus, PCI_BUS_INTERFACE);
<a href=
"mmi_register_interface_cb.html">mmi_register_interface_cb
</a>