/usr/share/snmp/mib2c-data/generic-table-indexes.m2i is in libsnmp-base 5.4.3~dfsg-2.4ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | ############################################################# -*- c -*-
## generic include for XXX. Do not use directly.
##
## $Id: generic-table-indexes.m2i 11360 2004-10-15 00:49:24Z rstory $
########################################################################
@if $m2c_mark_boundary == 1@
/** START code generated by $RCSfile$ $Revision: 11360 $ */
@end@
########################################################################
##
/*
* TODO:120:r: |-> Review $context mib index.
* This structure is used to represent the index for $context.
*/
@eval $m2c_gi_others = (count_indexes($context) - 1)@
@eval $m2c_gi_len = 0@
@eval $m2c_gi_warn = 0@
typedef struct ${context}_mib_index_s {
@foreach $node index@
@ include m2c_setup_node.m2i@
##@ include details-node.m2i@
/*
* $m2c_node_summary
*/
@ if $m2c_node_needlength == 1@
@ eval $m2c_gi_warn = 1@
@ eval $m2c_gi_maxlen = (128 - $node.oidlength - $m2c_gi_others - 1)@
@ if $m2c_node_maxlen > $m2c_gi_maxlen@
@ eval $m2c_node_maxlen = $m2c_gi_maxlen@
/** 128 - $m2c_gi_others(other indexes) - oid length($node.oidlength) = $m2c_node_maxlen */
@ end@
@ eval $m2c_gi_len = $m2c_gi_len + $m2c_node_maxlen + 1@
@ elsif "$node.type" eq "ASN_IPADDRESS"@
@ eval $m2c_gi_len = $m2c_gi_len + 4@
@ else@
@ eval $m2c_gi_len = $m2c_gi_len + 1@
@ end@ # needlength
@ include node-storage.m2i@
@end@ # foreach
} ${context}_mib_index;
/*
* TODO:121:r: | |-> Review $context max index length.
* If you KNOW that your indexes will never exceed a certain
* length, update this macro to that length.
@ if $m2c_gi_warn == 1@
*
* BE VERY CAREFUL TO TAKE INTO ACCOUNT THE MAXIMUM
* POSSIBLE LENGHT FOR EVERY VARIABLE LENGTH INDEX!
* Guessing 128 - col/entry(2) - oid len($context.oidlength)
@ if $m2c_gi_len > 126@
@ eval $m2c_gi_len = 126 - $context.oidlength@
@ end@
##@ else@
##@ eval $m2c_gi_len = count_indexes($context)@
@ end@
*/
#define MAX_${context}_IDX_LEN $m2c_gi_len
##
########################################################################
@if $m2c_mark_boundary == 1@
/** END code generated by $RCSfile$ $Revision: 11360 $ */
@end@
|