DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Developing SMUX peers for SNMP agents

Reading compiled MIB modules

The reference peer program calls the readobjects routine to read the compiled module, look-up the module which it will register with the SNMP agent, and call the getsmuxEntrybyname routine to find its entry in the snmpd.peers database.

OT              ot;
char            objectsfile[BUFSIZ];

if ((se = getsmuxEntrybyname(myname)) == NULL) { LIB_PERROR("no SMUX entry for - NEWD"); exit(-1); } (void) sprintf(objectsfile, "%s.defs", myname); if (readobjects(objectsfile) == NOTOK) { LIB_PERROR("readobjects: "); exit(-1); } for (tc = triples; tc->t_tree; tc++) if (ot = text2obj(tc->t_tree)) { tc->t_name = ot->ot_name; (void) (*tc->t_init) (); } else LIB_ERROR1("text2obj (\"%s\") fails", tc->t_tree);

If either of these routines fails, do not register the MIB module.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004