nfs and cifs port display in yawn page.
sunil kumar
skjmca51 at gmail.com
Thu Oct 3 19:08:08 UTC 2013
hi!.
we need to know, how to debug and trace the program from where i start. We
have return to view the nfs port and cifs port in the yawn page..
here is the code for that.!..
CMPIStatus res = { CMPI_RC_OK, NULL };
Network *network = mi->hdl;
const char *ns = KNameSpace(cop);
char *name;
Port *port;
int pid;
network_lock(network);
const Ports *ports = network_get_ports(network);
for (size_t i = 0; i < ports_length(ports); ++i) {
if (!KOkay(res)) {
break;
}
port = ports_index(ports, i);
asprintf(&name, "%s_%ld", port_get_id(port), i);
LMI_ProtocolEndpoint w;
LMI_ProtocolEndpoint_Init(&w, _cb, ns);
LMI_ProtocolEndpoint_Set_SystemName(&w, get_system_name());
LMI_ProtocolEndpoint_Set_SystemCreationClassName(&w,
get_system_creation_class_name());
LMI_ProtocolEndpoint_Set_CreationClassName(&w,
LMI_ProtocolEndpoint_ClassName);
LMI_ProtocolEndpoint_Set_Name(&w, name);
free(name);
pid = (int) *port_get_id(port);
switch (pid) {
case 4200:
LMI_ProtocolEndpoint_Set_ProtocolIFType_NFS(&w);
LMI_ProtocolEndpoint_Set_ProtocolIFType(&w,
LMI_ProtocolEndpoint_ProtocolIFType_NFS);
break;
case 4201:
LMI_ProtocolEndpoint_Set_ProtocolIFType_CIFS(&w);
LMI_ProtocolEndpoint_Set_ProtocolIFType(&w,
LMI_ProtocolEndpoint_ProtocolIFType_CIFS);
break;
default:
break;
}
if (!ReturnInstance(cr, w)) {
error("Unable to return instance of class "
LMI_ProtocolEndpoint_ClassName);
CMSetStatus(&res, CMPI_RC_ERR_FAILED);
break;
}
}
network_unlock(network);
return res;
i need to know how to trace this.. how could i do this..
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.fedorahosted.org/pipermail/openlmi-devel/attachments/20131004/b29c5e22/attachment.html>
More information about the openlmi-devel
mailing list