/* Last edit: Fri May 12 14:08:25 2000 * By: Yigal Hochberg, DMH Software. * Fri May 12 2000: initUserCode() add explanation (trap) */ /* * File: usrinit.c * * This file includes custom initialization functions. The function * initUserCode() is a hook to the SNMP kernel and must provided * by the user. */ /* * Embedded TCP/UDP/IP, SNMP Software * Copyright (c) Yigal Hochberg, DMH Software 1990-2000. All rights reserved. */ #include /* for printf */ /* * function prototypes */ void initUserCode(void); /* hook to custom user initialization */ void SnMibInit_ownmib(void); /* init own mib */ /** * initUserCode() * * User Hook function supplied by the user and called from the SNMP kernel. * * This is the function to add system specific init code such as: * * 1. call here your mib-init functions, * * 2. call SnTrapAddDestination() to enter trap receiver to snmp-agent trap * destination table. see ../include/snsysapi.h :512 * * 3. call other system specific initialization. * **/ void initUserCode(void) /* hook to custom user initialization */ { // static char fname[] = "initUserCode"; /* * User specific initializations */ SnMibInit_ownmib(); /* * add additional initialization below for every custom mib file you * add: * * Your initialization function(s) will look like this: */ /* * add trap destination * see ../include/snsysapi.h :512 * Note: ip-address is unsigned long in NETWORK order. */ /*SnTrapAddDestination(ipaddr, port, "public");*/ }