Sm_AgentApi_ManagementContext_t
This structure defines Information about the management command.
casso127
This structure defines Information about the management command.
Syntax
This structure has the following format:
typedef struct Sm_AgentApi_ManagementContext_t{long nCommand;char lpszData[SM_AGENTAPI_SIZE_NAME];} Sm_AgentApi_ManagementContext_t;
Parameters
This structure has the following parameters:
- nCommandOne of these management commands:
- SM_AGENTAPI_MANAGEMENT_GET_AGENT_COMMANDSRequests the latest agent commands. With this command, lpszData should be left blank.
- SM_AGENTAPI_MANAGEMENT_SET_AGENT_INFOProvides information about the agent to the Policy Server. The information is contained in lpszData.
- lpszDataWhen SM_AGENTAPI_MANAGEMENT_SET_AGENT_INFO is set, contains the following null-terminated string of information about the agent:"Product=XXX,Platform=XXX,Version=XXX,Label=XXX"Unknown clauses can be omitted.This information is recorded by the Policy Server for logging and troubleshooting purposes.Example:"Product=WebAgent,Platform=NT/ISAPI, Version=5.0,Update=SP1,Label=C134"The Agent API adds the crypto strength and agent time (in GMT) and time zone to this string.
If you want to log information about a custom agent, add the following lines of code to your custom agent definition:
ManagementContext.nCommand = SM_AGENTAPI_MANAGEMENT_SET_AGENT_INFO;strncpy (ManagementContext.lpszData, version info goes here, 255);