int IDA_OpenSession(idaServID_t *servID);
Parameters
servID
[in, out] Pointer to SERVER_IDENTIFIERstructure. Caller should initialize structure to zeros then set field in_nodename prior to call. Specify a dotted IP address string or hostname string in in_nodename. Also specify a description of your client in clientDescriptor.Remaining fields in the structure will be populated upon successful return. Resulting structure is used as a parameter to other functions.
Return Value
0 indicates a successful Open Session. The idaServID_t.sessID will contain the actual tcpip socket number.
Non-zero return code will contain the actual tcpip error status.
Remarks
This method is called by a user application to connect to a store controller InSight agent. This connection will be used by other IDA APIs to retrieve and set MIB objects.
Note: the port number defaults to 6089, but may be overridden by specifying a port in the portfield.
Note: the numSecsForResponsefield defaults to 12.
Example
gNodeName = MyPCName; // or IP address eg. 111.222.333.444
servID.in_nodename = gNodeName;
if (servID.store)
printf("Attempting to connect to Store %d, Node %s\r\n", gSpecifiedStore, gSpecifiedNode);
else
printf("Attempting to connect %s\r\n", servID.in_nodename);
rc = IDA_OpenSession(&servID); /* Establish a connect to that ctlr. */
See Also
IDA_CloseSession , IDA_InitRequest , IDA_VarBindBuild, IDA_RepeatVarBindBuild, IDA_SessionRequest, IDA_GetVars, IDA_SetVars
Converted from CHM to HTML with chm2web Pro 2.85 (unicode) |