<div dir="ltr"><div><div><div>hi!.<br><br></div>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.. <br><br><br></div>here is the code for that.!..<br>
<br><pre>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; </pre><br><br></div>i need to know how to trace this.. how could i do this..<br></div>