252N/A * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. 252N/A * U.S. Government Rights - Commercial software. Government users are subject 252N/A * to the Sun Microsystems, Inc. standard license agreement and applicable 252N/A * provisions of the FAR and its supplements. 252N/A * This distribution may include materials developed by third parties. Sun, 252N/A * Sun Microsystems, the Sun logo and Solaris are trademarks or registered 252N/A * trademarks of Sun Microsystems, Inc. in the U.S. and other countries. 252N/A * Note: this file originally auto-generated by mib2c using 252N/A * Initialize the entLPMappingTable table by defining its contents and how 252N/A * create the table structure itself 252N/A * if your table is read only, it's easiest to change the 252N/A * HANDLER_CAN_RWRITE definition below to HANDLER_CAN_RONLY 252N/A return;
/* mallocs failed */ 252N/A * Setting up the table's definition 252N/A * iterator access routines 252N/A * registering the table with the master agent 252N/A "Registering table entLPMappingTable as a table iterator\n"));
252N/A/* Initializes the entLPMappingTable module */ 252N/A * here we initialize all the tables we're planning on supporting 252N/A * returns the first data point within the entLPMappingTable table data. 252N/A * Set the my_loop_context variable to the first data point structure 252N/A * of your choice (from which you can find the next one). This could 252N/A * be anything from the first node in a linked list, to an integer 252N/A * pointer containing the beginning of an array variable. 252N/A * Set the my_data_context variable to something to be returned to 252N/A * you later that will provide you with the data to return in a given 252N/A * row. This could be the same pointer as what my_loop_context is 252N/A * set to, or something different. 252N/A * The put_index_data variable contains a list of snmp variable 252N/A * bindings, one for each index in your table. Set the values of 252N/A * each appropriately according to the data matching the first row 252N/A * and return the put_index_data variable at the end of the function. 252N/A * functionally the same as entLPMappingTable_get_first_data_point, but 252N/A * my_loop_context has already been set to a previous value and should 252N/A * be updated to the next in the list. For example, if it was a 252N/A * linked list, you might want to cast it and the return 252N/A * my_loop_context->next. The my_data_context pointer should be set 252N/A * to something you need later and the indexes in put_index_data 252N/A * handles requests for the entLPMappingTable table, if anything else 252N/A * perform anything here that you need to do. The request have 252N/A * already been processed by the master table_dataset handler, 252N/A * but this gives you chance to act on the request in some 252N/A * other way if need be. 252N/A * the following extracts the my_data_context pointer set in 252N/A * the loop functions above. You can then use the results to 252N/A * help return data for the columns of the entLPMappingTable 252N/A * XXX: no row existed, if you support creation and 252N/A * this is a set, start dealing with it here, else 252N/A * extracts the information about the table from the request 252N/A * table_info->colnum contains the column number requested 252N/A * table_info->indexes contains a linked list of snmp variable 252N/A * bindings for the indexes of the table. Values in the list 252N/A * have been set corresponding to the indexes of the 252N/A * the table_iterator helper should change all GETNEXTs 252N/A * into GETs for you automatically, so you don't have to 252N/A * worry about the GETNEXT case. Only GETs and SETs need 252N/A * to be dealt with here 252N/A * We shouldn't get here 252N/A 1 for entry already exists 252N/A /* Fix for 4888088: return -1 for out of bound index, return -2 for */ 252N/A /* End of Fix for 4888088 */ 252N/A Handle error here. Send it to log files 252N/A }
else {
/* Add phy index to last entry in the array */ 252N/A /* Fix for 4888088: entry already exists, return 1 */ 252N/A /* End of Fix for 4888088 */ 252N/A /* Fix for 4928821 - does not generate notification event */ 252N/A /* End of Fix for 4928821 */ 252N/A This function deletes the table entries for a given logical index 252N/A /* Fix for 4888088: return -1 for invalid index, -2 for stale entry */ 252N/A /* End of Fix for 4888088 */ 252N/A /* End of Fix for 4888088 */ 252N/A /* Fix for 4888088: We need to count the number of entries deleted, and */ 252N/A /* return that accordingly. Hence the loop */ 252N/A /* Only count valid entries (i.e. non-negative ones) */ 252N/A /* End of Fix for 4888088 */ 252N/A /* End of Fix for 4888088 */ 252N/A/* Returns num of successful deletion 252N/A -2 for stale physical entry 252N/A /* Fix for 4888088: -2 for stale entry, -1 for invalid index */ 252N/A /* End of Fix for 4888088 */ 252N/A/* Returns num of successful deletion 252N/A -2 for stale logical entry 252N/A /* Fix for 4888088: -1 for invalid index, -2 for stale entry */ 252N/A /* End of Fix for 4888088 */ 252N/A /* Fix for 4888088: we are going to return the number of */ 252N/A /* End of Fix for 4888088 */ 252N/A /* End of Fix for 4888088 */ 252N/A return (-
1);
/* Entry not found */