<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-&gt;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 &lt; ports_length(ports); ++i) {
        if (!KOkay(res)) {
            break;
        }
        port = ports_index(ports, i);
                
            asprintf(&amp;name, &quot;%s_%ld&quot;, port_get_id(port), i);
            LMI_ProtocolEndpoint w;
            LMI_ProtocolEndpoint_Init(&amp;w, _cb, ns);
            LMI_ProtocolEndpoint_Set_SystemName(&amp;w, get_system_name());
            LMI_ProtocolEndpoint_Set_SystemCreationClassName(&amp;w, get_system_creation_class_name());
            LMI_ProtocolEndpoint_Set_CreationClassName(&amp;w, LMI_ProtocolEndpoint_ClassName);
            LMI_ProtocolEndpoint_Set_Name(&amp;w, name);
            free(name);
            pid = (int) *port_get_id(port);
            
            switch (pid) {
                case 4200:
                    LMI_ProtocolEndpoint_Set_ProtocolIFType_NFS(&amp;w);
                    LMI_ProtocolEndpoint_Set_ProtocolIFType(&amp;w, LMI_ProtocolEndpoint_ProtocolIFType_NFS);
                    break;
                case 4201:
                    LMI_ProtocolEndpoint_Set_ProtocolIFType_CIFS(&amp;w);
                    LMI_ProtocolEndpoint_Set_ProtocolIFType(&amp;w, LMI_ProtocolEndpoint_ProtocolIFType_CIFS);
                    break;
                default:
                    break;
            }
            if (!ReturnInstance(cr, w)) {
                error(&quot;Unable to return instance of class &quot; LMI_ProtocolEndpoint_ClassName);
                CMSetStatus(&amp;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>