3(2005-06-09)

πŸ“¦
version 2.2.9~rc1 Β· 2 versions
, in centos-stream 10, centos-stream 9, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0

πŸ’– NAME πŸ’–

cmciConnect() β€” bestie, it makes a CMCIClient object and the connection. Two for one, we love to see it. ✨


🌸 SYNOPSIS 🌸

#include <cmci.h>

CMCIClient*
cmciConnect(constchar*hostName,constchar*scheme,
constchar*hostPort,constchar*CimUsername,
constchar*CimPassword,CMPIStatus*rc);

CMCIClient*
cmciConnect2(constchar*hostName,constchar*scheme,
constchar*hostPort,constchar*CimUsername,
intverifyMode,constchar*trustStore,
constchar*certFile,constchar*keyFile,
constchar*CimPassword,CMPIStatus*rc);

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so. What this does is create a CMCIClient object and initialize it with the CIMOM connection hostname and port, the security credentials you need to log into the CIMOM, and the internals for sending requests and receiving responses from the CIMOM. Like, it's the whole little setup kit. πŸ’…

The arguments are: the hostName and hostPort you wanna connect to, the CimUsername and CimPassword credentials for authenticating with the CIMOM, and a pointer to an object that's gonna receive the CMPIStatus operation status. That's the whole vibe check. πŸŽ€

✨ cmciConnect2, the upgrade ✨

The function cmciConnect2 has the same purpose but offers extra parameters to control SSL operations. She's cmciConnect but with more going on, and honestly? Slay.

  • verifyMode β€” specifies whether the server certificate for an SSL connection is to be verified. If set to CMCI_VERIFY_NONE the server certificate will not be verified, if set to CMCI_VERIFY_PEER it will be verified against the certificates in trustStore.
  • trustStore β€” contains the name of a file containing CA or client certificates against which the server certificate will be verified if verifyMode is set to CMCI_VERIFY_PEER.
  • certFile β€” specifies the name of a file containing a client certificate which will be presented to the CIM server, if the CIM server implements certificate-based client authentication. Must be set to NULL, if no client certificates are available.
  • keyFile β€” specifies the name of a file containing the private key for the certificate specified via certFile. Must be set to NULL, if no client certificates are available.
🫢 Heads up bestie: certFile and keyFile both gotta be NULL if you don't have client certificates. Don't leave one hanging, that's not the move.

πŸ’€ RETURN VALUE πŸ’€

When successful, the cmciConnect function returns a pointer to a dynamically allocated and initialized CMCIClient object with a successful operation status code set. Iconic. Winning. Ate.

When unsuccessful it returns NULL and sets the rc object with the error code and corresponding error string. Not the vibe, but at least she tells you why. 😭


πŸ™ˆ ERRORS πŸ™ˆ

Nothing listed here, bestie. The section is just... vibing. Empty. Living its truth. ✨


πŸ”₯ EXAMPLES πŸ”₯

CMCIClient *cc;

/* Setup a local conncetion to the CIMOM */
cc = cmciConnect("localhost", NULL, NULL, NULL, NULL, NULL);

🌈 CONFORMING TO 🌈

Also empty. She said "no thoughts, head empty" and honestly, respect. πŸ’…


πŸ‘‘ SEE ALSO πŸ‘‘


And that's the whole page, bestie! πŸŽ€ This one came out of the SFCBroker Client Library (that's the sfcc situation) and it's dated 2005-06-09, sitting all cozy in section 3. Go forth and connect responsibly. πŸ¦‹πŸ’–βœ¨