/* * © Copyright 1976, 2003 Hewlett-Packard Development Company, L.P. * * Confidential computer software. Valid license from HP and/or its * subsidiaries required for possession, use, or copying. * * Consistent with FAR 12.211 and 12.212, Commercial Computer Software, * Computer Software Documentation, and Technical Data for Commercial * Items are licensed to the U.S. Government under vendor's standard * commercial license. * * Neither HP nor any of its subsidiaries shall be liable for technical * or editorial errors or omissions contained herein. The information * in this document is provided "as is" without warranty of any kind * and is subject to change without notice. The warranties for HP * products are set forth in the express limited warranty statements * accompanying such products. Nothing herein should be construed as * constituting an additional warranty. */ /* chess_tbl.c - object table for subtree 'chess'. * * NOTE: This file is created by the ucxaxp$dka0:[sys0.syscommon.][sysexe]ucx$snmpi.exe;1 program from definitions in 'alldefs_624981101.defs'. * Editing this file is not recommended. */ #include #include #include "chess_tbl.h" static unsigned int elems[] = { 1, 3, 6, 1, 4, 1, 36, 2, 15, 2, 99, /* chess */ 1, 3, 6, 1, 4, 1, 36, 2, 15, 2, 99, 1, 0, /* chessProductID */ 1, 3, 6, 1, 4, 1, 36, 2, 15, 2, 99, 2, 0, /* chessMaxGames */ 1, 3, 6, 1, 4, 1, 36, 2, 15, 2, 99, 3, 0, /* chessNumGames */ 1, 3, 6, 1, 4, 1, 36, 2, 15, 2, 99, 4, 1, 1, 0, /* gameIndex */ 1, 3, 6, 1, 4, 1, 36, 2, 15, 2, 99, 4, 1, 2, 0, /* gameDescr */ 1, 3, 6, 1, 4, 1, 36, 2, 15, 2, 99, 4, 1, 3, 0, /* gameNumMoves */ 1, 3, 6, 1, 4, 1, 36, 2, 15, 2, 99, 4, 1, 4, 0, /* gameStatus */ 1, 3, 6, 1, 4, 1, 36, 2, 15, 2, 99, 5, 1, 1, 0, /* moveIndex */ 1, 3, 6, 1, 4, 1, 36, 2, 15, 2, 99, 5, 1, 2, 0, /* moveByWhite */ 1, 3, 6, 1, 4, 1, 36, 2, 15, 2, 99, 5, 1, 3, 0, /* moveByBlack */ 1, 3, 6, 1, 4, 1, 36, 2, 15, 2, 99, 5, 1, 4, 0, /* moveStatus */ }; static OBJECT objects[] = { {I_chessProductID ,{12, &elems[ 11]}, ESNMP_TYPE_ObjectId ,chess_get, NULL}, {I_chessMaxGames ,{12, &elems[ 24]}, ESNMP_TYPE_Integer32 ,chess_get, NULL}, {I_chessNumGames ,{12, &elems[ 37]}, ESNMP_TYPE_Integer32 ,chess_get, NULL}, {I_gameIndex ,{14, &elems[ 50]}, ESNMP_TYPE_Integer32 ,gameEntry_get, gameEntry_set}, {I_gameDescr ,{14, &elems[ 65]}, ESNMP_TYPE_DisplayString,gameEntry_get, gameEntry_set}, {I_gameNumMoves ,{14, &elems[ 80]}, ESNMP_TYPE_Integer32 ,gameEntry_get, gameEntry_set}, {I_gameStatus ,{14, &elems[ 95]}, ESNMP_TYPE_Integer32 ,gameEntry_get, gameEntry_set}, {I_moveIndex ,{14, &elems[110]}, ESNMP_TYPE_Integer32 ,moveEntry_get, moveEntry_set}, {I_moveByWhite ,{14, &elems[125]}, ESNMP_TYPE_DisplayString,moveEntry_get, moveEntry_set}, {I_moveByBlack ,{14, &elems[140]}, ESNMP_TYPE_DisplayString,moveEntry_get, moveEntry_set}, {I_moveStatus ,{14, &elems[155]}, ESNMP_TYPE_Integer32 ,moveEntry_get, moveEntry_set}, }; SUBTREE chess_subtree = { "chess", "1.3.6.1.4.1.36.2.15.2.99", { 11, &elems[0] }, objects, I_moveStatus}; /******************************************************** * FUNCTION: gameEntry_new * * Allocate gameEntry_type data object for SET. ********************************************************/ gameEntry_type *gameEntry_new( void ) { gameEntry_type *data; data = (gameEntry_type *)calloc(1,sizeof(gameEntry_type)); return (data); } /******************************************************** * FUNCTION: gameEntry_free * * Free gameEntry_type data object for SET. ********************************************************/ void gameEntry_free( gameEntry_type *data) { if (data != NULL) { if (data->gameDescr.ptr) free(data->gameDescr.ptr); free(data); } } /******************************************************** * FUNCTION: moveEntry_new * * Allocate moveEntry_type data object for SET. ********************************************************/ moveEntry_type *moveEntry_new( void ) { moveEntry_type *data; data = (moveEntry_type *)calloc(1,sizeof(moveEntry_type)); return (data); } /******************************************************** * FUNCTION: moveEntry_free * * Free moveEntry_type data object for SET. ********************************************************/ void moveEntry_free( moveEntry_type *data) { if (data != NULL) { if (data->moveByWhite.ptr) free(data->moveByWhite.ptr); if (data->moveByBlack.ptr) free(data->moveByBlack.ptr); free(data); } }