1SSAAgentIsAlive(3SNMP)      SNMP Library Functions      SSAAgentIsAlive(3SNMP)
2
3
4

NAME

6       SSAAgentIsAlive,    SSAGetTrapPort,   SSARegSubtable,   SSARegSubagent,
7       SSARegSubtree, SSASendTrap, SSASubagentOpen - Sun  Solstice  Enterprise
8       Agent registration and communication helper functions
9

SYNOPSIS

11       cc [ flag ... ] file ... -lssagent  -lssasnmp  [ library .. ]
12       #include <impl.h>
13
14
15
16       extern int SSAAgentIsAlive(IPAddress *agent_addr, int *port,
17            char *community, struct timeval *timeout);
18
19
20       extern int SSAGetTrapPort();
21
22
23       extern int *SSARegSubagent(Agent* agent);
24
25
26       int SSARegSubtable(SSA_Table *table);
27
28
29       int SSARegSubtree(SSA_Subtree *subtree);
30
31
32       extern void SSASendTrap(char *name);
33
34
35       extern int SSASubagentOpen(int *num_of_retry, char *agent_name);
36
37

DESCRIPTION

39       The  SSAAgentIsAlive()  function  returns  TRUE  if the master agent is
40       alive, otherwise returns FALSE. The agent_addr parameter is the address
41       of  the  agent.  Specify the security token in the community parameter.
42       You can specify the maximum amount of time to wait for a response  with
43       the timeout parameter.
44
45
46       The  SSAGetTrapPort() function returns the port number used by the Mas‐
47       ter Agent to communicate with the subagent.
48
49
50       The  SSARegSubagent() function  enables  a  subagent  to  register  and
51       unregister  with a Master Agent. The agent parameter is a pointer to an
52       Agent structure containing the following members:
53
54         int      timeout;         /* optional */
55         int      agent_id;        /* required */
56         int      agent_status;    /* required */
57         char     *personal_file;  /* optional */
58         char     *config_file;    /* optional */
59         char     *executable;     /* optional */
60         char     *version_string; /* optional */
61         char     *protocol;       /* optional */
62         int      process_id;      /* optional */
63         char     *name;           /* optional */
64         int      system_up_time;  /* optional */
65         int      watch_dog_time;  /* optional */
66         Address  address;         /* required */
67         struct   _Agent;          /* reserved */
68         struct   _Subtree;        /* reserved */
69
70
71
72       The agent_id member is an integer value returned  by  the   SSASubagen‐
73       tOpen()   function.  After  calling  SSASubagentOpen(),  you  pass  the
74       agent_id in the SSARegSubagent() call to  register  the  subagent  with
75       the Master Agent.
76
77
78       The following values are supported for agent_status:
79
80         SSA_OPER_STATUS_ACTIVE
81         SSA_OPER_STATUS_NOT_IN_SERVICE
82         SSA_OPER_STATUS_DESTROY
83
84
85
86       You  pass  SSA_OPER_STATUS_DESTROY  as  the value in a SSARegSubagent()
87       function call when you want to unregister the  agent  from  the  Master
88       Agent.
89
90
91       Address  has  the  same structure as sockaddr_in, that is a common UNIX
92       structure containing the following members:
93
94         short      sin_family;
95         ushort_t   sin_port;
96         struct     in_addr sin_addr;
97         char       sin_zero[8];
98
99
100
101       The SSARegSubtable() function registers a MIB  table  with  the  Master
102       Agent.  If  this  function  is successful, an index number is returned,
103       otherwise 0 is returned. The table parameter is a pointer to a  SSA_Ta‐
104       ble structure containing the following members:
105
106         int  regTblIndex;         /* index value */
107         int  regTblAgentID;       /* current agent ID */
108         Oid  regTblOID;           /* Object ID of the table */
109         int  regTblStartColumn;   /* start column index */
110         int  regTblEndColumn;     /* end column index */
111         int  regTblStartRow;      /* start row index */
112         int  regTblEndRow;        /* end row index */
113         int  regTblStatus;        /* status */
114
115
116
117       The regTblStatus can have one of the following values:
118
119         SSA_OPER_STATUS_ACTIVE
120         SSA_OPER_STATUS_NOT_IN_SERVICE
121
122
123
124       The  SSARegSubtree()  function  registers a MIB subtree with the master
125       agent. If successful this function returns an index number, otherwise 0
126       is returned. The subtree parameter is a pointer to a SSA_Subtree struc‐
127       ture containing the following members:
128
129         int  regTreeIndex;      /* index value */
130         int  regTreeAgentID;    /* current agent ID */
131         Oid  name;              /* Object ID to register */
132         int  regtreeStatus;     /* status */
133
134
135
136       The regtreeStatus can have one of the following values:
137
138         SSA_OPER_STATUS_ACTIVE
139         SSA_OPER_STATUS_NOT_IN_SERVICE
140
141
142
143       The SSASendTrap() function instructs the Master Agent to  send  a  trap
144       notification, based on the keyword passed with name. When your subagent
145       MIB is compiled by mibcodegen, it creates a lookup table  of  the  trap
146       notifications defined in the MIB. By passing the name of the trap noti‐
147       fication type as name, the subagent instructs the Master Agent to  con‐
148       struct the type of trap defined in the MIB.
149
150
151       The  SSASubagentOpen()  function  initializes communication between the
152       subagent and the Master Agent.  You  must  call  this  function  before
153       calling  SSARegSubagent()  to  register  the  subagent  with the Master
154       Agent. The SSASubagentOpen() function returns a unique agent ID that is
155       passed  in  the SSARegSubagent() call to register the subagent. If 0 is
156       returned as the agent ID, the attempt to initialize communication  with
157       the Master Agent was unsuccessful. Since UDP is used to initialize com‐
158       munication with the Master Agent, you may want  to  set  the  value  of
159       num_of_retry to make multiple attempts.
160
161
162       The value for agent_name must be unique within the domain for which the
163       Master Agent is responsible.
164

ATTRIBUTES

166       See attributes(5) for descriptions of the following attributes:
167
168
169
170
171       ┌─────────────────────────────┬─────────────────────────────┐
172       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
173       ├─────────────────────────────┼─────────────────────────────┤
174       │Interface Stability          │Obsolete                     │
175       ├─────────────────────────────┼─────────────────────────────┤
176       │MT-Level                     │Unsafe                       │
177       └─────────────────────────────┴─────────────────────────────┘
178

SEE ALSO

180       attributes(5)
181
182
183
184SunOS 5.11                        30 Apr 2006           SSAAgentIsAlive(3SNMP)
Impressum