Import from CVS master
authorJoshua Tolley <[email protected]>
Fri, 26 Nov 2010 17:22:01 +0000 (10:22 -0700)
committerJoshua Tolley <[email protected]>
Fri, 26 Nov 2010 17:22:01 +0000 (10:22 -0700)
247 files changed:
APPLICATION-MIB [new file with mode: 0644]
COPYRIGHT [new file with mode: 0644]
KNOWNBUG.txt [new file with mode: 0644]
Makefile [new file with mode: 0644]
PGSQL-MIB_src/pgsnmpdTables/pgsnmpdConnectionsTable.c [new file with mode: 0644]
PGSQL-MIB_src/pgsnmpdTables/pgsnmpdConnectionsTable.h [new file with mode: 0644]
PGSQL-MIB_src/pgsnmpdTables/pgsnmpdConnectionsTable_data_access.h [new file with mode: 0644]
PGSQL-MIB_src/pgsnmpdTables/pgsnmpdConnectionsTable_data_get.c [new file with mode: 0644]
PGSQL-MIB_src/pgsnmpdTables/pgsnmpdConnectionsTable_data_get.h [new file with mode: 0644]
PGSQL-MIB_src/pgsnmpdTables/pgsnmpdConnectionsTable_data_set.c [new file with mode: 0644]
PGSQL-MIB_src/pgsnmpdTables/pgsnmpdConnectionsTable_data_set.h [new file with mode: 0644]
PGSQL-MIB_src/pgsnmpdTables/pgsnmpdConnectionsTable_enums.h [new file with mode: 0644]
PGSQL-MIB_src/pgsnmpdTables/pgsnmpdConnectionsTable_interface.c [new file with mode: 0644]
PGSQL-MIB_src/pgsnmpdTables/pgsnmpdConnectionsTable_interface.h [new file with mode: 0644]
PGSQL-MIB_src/pgsnmpdTables/pgsnmpdConnectionsTable_oids.h [new file with mode: 0644]
PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAggregateTable/pgsqlPgAggregateTable.c [new file with mode: 0644]
PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAggregateTable/pgsqlPgAggregateTable.h [new file with mode: 0644]
PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAggregateTable/pgsqlPgAggregateTable_data_access.c [new file with mode: 0644]
PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAggregateTable/pgsqlPgAggregateTable_data_access.h [new file with mode: 0644]
PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAggregateTable/pgsqlPgAggregateTable_data_get.c [new file with mode: 0644]
PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAggregateTable/pgsqlPgAggregateTable_data_get.h [new file with mode: 0644]
PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAggregateTable/pgsqlPgAggregateTable_data_set.c [new file with mode: 0644]
PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAggregateTable/pgsqlPgAggregateTable_data_set.h [new file with mode: 0644]
PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAggregateTable/pgsqlPgAggregateTable_enums.h [new file with mode: 0644]
PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAggregateTable/pgsqlPgAggregateTable_interface.c [new file with mode: 0644]
PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAggregateTable/pgsqlPgAggregateTable_interface.h [new file with mode: 0644]
PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAggregateTable/pgsqlPgAggregateTable_oids.h [new file with mode: 0644]
PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAmTable/pgsqlPgAmTable.c [new file with mode: 0644]
PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAmTable/pgsqlPgAmTable.h [new file with mode: 0644]
PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAmTable/pgsqlPgAmTable_data_access.c [new file with mode: 0644]
PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAmTable/pgsqlPgAmTable_data_access.h [new file with mode: 0644]
PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAmTable/pgsqlPgAmTable_data_get.c [new file with mode: 0644]
PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAmTable/pgsqlPgAmTable_data_get.h [new file with mode: 0644]
PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAmTable/pgsqlPgAmTable_data_set.c [new file with mode: 0644]
PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAmTable/pgsqlPgAmTable_data_set.h [new file with mode: 0644]
PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAmTable/pgsqlPgAmTable_enums.h [new file with mode: 0644]
PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAmTable/pgsqlPgAmTable_interface.c [new file with mode: 0644]
PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAmTable/pgsqlPgAmTable_interface.h [new file with mode: 0644]
PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAmTable/pgsqlPgAmTable_oids.h [new file with mode: 0644]
PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAmopTable/old/pgsqlPgAmopTable.c [new file with mode: 0644]
PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAmopTable/old/pgsqlPgAmopTable.h [new file with mode: 0644]
PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAmopTable/pgsqlPgAmopTable.c [new file with mode: 0644]
PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAmopTable/pgsqlPgAmopTable.h [new file with mode: 0644]
PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAmopTable/tmp/pgsqlPgAggregateTable.c [new file with mode: 0644]
PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAmopTable/tmp/pgsqlPgAggregateTable.h [new file with mode: 0644]
RDBMS-MIB [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbInfoTable/README [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbInfoTable/rdbmsDbInfoTable.c [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbInfoTable/rdbmsDbInfoTable.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbInfoTable/rdbmsDbInfoTable_data_access.c [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbInfoTable/rdbmsDbInfoTable_data_access.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbInfoTable/rdbmsDbInfoTable_data_get.c [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbInfoTable/rdbmsDbInfoTable_data_get.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbInfoTable/rdbmsDbInfoTable_enums.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbInfoTable/rdbmsDbInfoTable_interface.c [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbInfoTable/rdbmsDbInfoTable_interface.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbInfoTable/rdbmsDbInfoTable_oids.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbLimitedResourceTable/rdbmsDbLimitedResourceTable.c [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbLimitedResourceTable/rdbmsDbLimitedResourceTable.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbLimitedResourceTable/rdbmsDbLimitedResourceTable_data_access.c [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbLimitedResourceTable/rdbmsDbLimitedResourceTable_data_access.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbLimitedResourceTable/rdbmsDbLimitedResourceTable_data_get.c [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbLimitedResourceTable/rdbmsDbLimitedResourceTable_data_get.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbLimitedResourceTable/rdbmsDbLimitedResourceTable_data_set.c [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbLimitedResourceTable/rdbmsDbLimitedResourceTable_data_set.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbLimitedResourceTable/rdbmsDbLimitedResourceTable_enums.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbLimitedResourceTable/rdbmsDbLimitedResourceTable_interface.c [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbLimitedResourceTable/rdbmsDbLimitedResourceTable_interface.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbLimitedResourceTable/rdbmsDbLimitedResourceTable_oids.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbParamTable/rdbmsDbParamTable.c [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbParamTable/rdbmsDbParamTable.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbParamTable/rdbmsDbParamTable_data_access.c [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbParamTable/rdbmsDbParamTable_data_access.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbParamTable/rdbmsDbParamTable_data_get.c [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbParamTable/rdbmsDbParamTable_data_get.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbParamTable/rdbmsDbParamTable_data_set.c [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbParamTable/rdbmsDbParamTable_data_set.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbParamTable/rdbmsDbParamTable_enums.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbParamTable/rdbmsDbParamTable_interface.c [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbParamTable/rdbmsDbParamTable_interface.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbParamTable/rdbmsDbParamTable_oids.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbTable/rdbmsDbTable.c [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbTable/rdbmsDbTable.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbTable/rdbmsDbTable_data_access.c [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbTable/rdbmsDbTable_data_access.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbTable/rdbmsDbTable_data_get.c [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbTable/rdbmsDbTable_data_get.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbTable/rdbmsDbTable_data_set.c [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbTable/rdbmsDbTable_data_set.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbTable/rdbmsDbTable_enums.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbTable/rdbmsDbTable_interface.c [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbTable/rdbmsDbTable_interface.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsDbTable/rdbmsDbTable_oids.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsRelTable/rdbmsRelTable.c [new file with mode: 0644]
RDBMS-MIB_src/rdbmsRelTable/rdbmsRelTable.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsRelTable/rdbmsRelTable_data_access.c [new file with mode: 0644]
RDBMS-MIB_src/rdbmsRelTable/rdbmsRelTable_data_access.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsRelTable/rdbmsRelTable_data_get.c [new file with mode: 0644]
RDBMS-MIB_src/rdbmsRelTable/rdbmsRelTable_data_get.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsRelTable/rdbmsRelTable_data_set.c [new file with mode: 0644]
RDBMS-MIB_src/rdbmsRelTable/rdbmsRelTable_data_set.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsRelTable/rdbmsRelTable_enums.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsRelTable/rdbmsRelTable_interface.c [new file with mode: 0644]
RDBMS-MIB_src/rdbmsRelTable/rdbmsRelTable_interface.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsRelTable/rdbmsRelTable_oids.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsSrvInfoTable/README [new file with mode: 0644]
RDBMS-MIB_src/rdbmsSrvInfoTable/rdbmsSrvInfoTable.c [new file with mode: 0644]
RDBMS-MIB_src/rdbmsSrvInfoTable/rdbmsSrvInfoTable.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsSrvInfoTable/rdbmsSrvInfoTable_data_access.c [new file with mode: 0644]
RDBMS-MIB_src/rdbmsSrvInfoTable/rdbmsSrvInfoTable_data_access.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsSrvInfoTable/rdbmsSrvInfoTable_data_get.c [new file with mode: 0644]
RDBMS-MIB_src/rdbmsSrvInfoTable/rdbmsSrvInfoTable_data_get.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsSrvInfoTable/rdbmsSrvInfoTable_data_set.c [new file with mode: 0644]
RDBMS-MIB_src/rdbmsSrvInfoTable/rdbmsSrvInfoTable_data_set.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsSrvInfoTable/rdbmsSrvInfoTable_enums.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsSrvInfoTable/rdbmsSrvInfoTable_interface.c [new file with mode: 0644]
RDBMS-MIB_src/rdbmsSrvInfoTable/rdbmsSrvInfoTable_interface.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsSrvInfoTable/rdbmsSrvInfoTable_oids.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsSrvLimitedResource/README [new file with mode: 0644]
RDBMS-MIB_src/rdbmsSrvLimitedResource/rdbmsSrvLimitedResource.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsSrvParamTable/rdbmsSrvParamTable.c [new file with mode: 0644]
RDBMS-MIB_src/rdbmsSrvParamTable/rdbmsSrvParamTable.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsSrvParamTable/rdbmsSrvParamTable_data_access.c [new file with mode: 0644]
RDBMS-MIB_src/rdbmsSrvParamTable/rdbmsSrvParamTable_data_access.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsSrvParamTable/rdbmsSrvParamTable_data_get.c [new file with mode: 0644]
RDBMS-MIB_src/rdbmsSrvParamTable/rdbmsSrvParamTable_data_get.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsSrvParamTable/rdbmsSrvParamTable_data_set.c [new file with mode: 0644]
RDBMS-MIB_src/rdbmsSrvParamTable/rdbmsSrvParamTable_data_set.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsSrvParamTable/rdbmsSrvParamTable_enums.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsSrvParamTable/rdbmsSrvParamTable_interface.c [new file with mode: 0644]
RDBMS-MIB_src/rdbmsSrvParamTable/rdbmsSrvParamTable_interface.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsSrvParamTable/rdbmsSrvParamTable_oids.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsSrvTable/rdbmsSrvTable.c [new file with mode: 0644]
RDBMS-MIB_src/rdbmsSrvTable/rdbmsSrvTable.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsSrvTable/rdbmsSrvTable_data_access.c [new file with mode: 0644]
RDBMS-MIB_src/rdbmsSrvTable/rdbmsSrvTable_data_access.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsSrvTable/rdbmsSrvTable_data_get.c [new file with mode: 0644]
RDBMS-MIB_src/rdbmsSrvTable/rdbmsSrvTable_data_get.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsSrvTable/rdbmsSrvTable_data_set.c [new file with mode: 0644]
RDBMS-MIB_src/rdbmsSrvTable/rdbmsSrvTable_data_set.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsSrvTable/rdbmsSrvTable_enums.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsSrvTable/rdbmsSrvTable_interface.c [new file with mode: 0644]
RDBMS-MIB_src/rdbmsSrvTable/rdbmsSrvTable_interface.h [new file with mode: 0644]
RDBMS-MIB_src/rdbmsSrvTable/rdbmsSrvTable_oids.h [new file with mode: 0644]
README.pgsnmpd [new file with mode: 0644]
TODO.txt [new file with mode: 0644]
customquery.c [new file with mode: 0644]
customquery.h [new file with mode: 0644]
doc/pgsnmpd.htm [new file with mode: 0644]
doc/pgsnmpd_faq.html [new file with mode: 0644]
pg_array.c [new file with mode: 0644]
pg_array.h [new file with mode: 0644]
pgsnmpd.c [new file with mode: 0644]
pgsnmpd.conf [new file with mode: 0644]
pgsnmpd.h [new file with mode: 0644]
pgsnmpd.sql [new file with mode: 0644]
pgsnmpd.yaml [new file with mode: 0644]
pgsnmpd_regress.pl [new file with mode: 0644]
pgsqlMibWriter.pl [new file with mode: 0644]
pgsql_mib_pieces/PGSQL-MIB [new file with mode: 0644]
pgsql_mib_pieces/a_PGSQL_MIB_header.mib [new file with mode: 0644]
pgsql_mib_pieces/pg_aggregate.mib [new file with mode: 0644]
pgsql_mib_pieces/pg_aggregate.tbldef [new file with mode: 0644]
pgsql_mib_pieces/pg_am.mib [new file with mode: 0644]
pgsql_mib_pieces/pg_am.tbldef [new file with mode: 0644]
pgsql_mib_pieces/pg_amop.mib [new file with mode: 0644]
pgsql_mib_pieces/pg_amop.tbldef [new file with mode: 0644]
pgsql_mib_pieces/pg_amproc.mib [new file with mode: 0644]
pgsql_mib_pieces/pg_amproc.tbldef [new file with mode: 0644]
pgsql_mib_pieces/pg_attrdef.mib [new file with mode: 0644]
pgsql_mib_pieces/pg_attrdef.tbldef [new file with mode: 0644]
pgsql_mib_pieces/pg_attribute.mib [new file with mode: 0644]
pgsql_mib_pieces/pg_attribute.tbldef [new file with mode: 0644]
pgsql_mib_pieces/pg_auth_members.mib [new file with mode: 0644]
pgsql_mib_pieces/pg_auth_members.tbldef [new file with mode: 0644]
pgsql_mib_pieces/pg_authid.mib [new file with mode: 0644]
pgsql_mib_pieces/pg_authid.tbldef [new file with mode: 0644]
pgsql_mib_pieces/pg_autovacuum.mib [new file with mode: 0644]
pgsql_mib_pieces/pg_autovacuum.tbldef [new file with mode: 0644]
pgsql_mib_pieces/pg_cast.mib [new file with mode: 0644]
pgsql_mib_pieces/pg_cast.tbldef [new file with mode: 0644]
pgsql_mib_pieces/pg_class.mib [new file with mode: 0644]
pgsql_mib_pieces/pg_class.tbldef [new file with mode: 0644]
pgsql_mib_pieces/pg_constraint.mib [new file with mode: 0644]
pgsql_mib_pieces/pg_constraint.tbldef [new file with mode: 0644]
pgsql_mib_pieces/pg_conversion.mib [new file with mode: 0644]
pgsql_mib_pieces/pg_conversion.tbldef [new file with mode: 0644]
pgsql_mib_pieces/pg_database.mib [new file with mode: 0644]
pgsql_mib_pieces/pg_database.tbldef [new file with mode: 0644]
pgsql_mib_pieces/pg_depend.mib [new file with mode: 0644]
pgsql_mib_pieces/pg_depend.tbldef [new file with mode: 0644]
pgsql_mib_pieces/pg_description.mib [new file with mode: 0644]
pgsql_mib_pieces/pg_description.tbldef [new file with mode: 0644]
pgsql_mib_pieces/pg_enum.mib [new file with mode: 0644]
pgsql_mib_pieces/pg_enum.tbldef [new file with mode: 0644]
pgsql_mib_pieces/pg_index.mib [new file with mode: 0644]
pgsql_mib_pieces/pg_index.tbldef [new file with mode: 0644]
pgsql_mib_pieces/pg_inherits.mib [new file with mode: 0644]
pgsql_mib_pieces/pg_inherits.tbldef [new file with mode: 0644]
pgsql_mib_pieces/pg_language.mib [new file with mode: 0644]
pgsql_mib_pieces/pg_language.tbldef [new file with mode: 0644]
pgsql_mib_pieces/pg_largeobject.mib [new file with mode: 0644]
pgsql_mib_pieces/pg_largeobject.tbldef [new file with mode: 0644]
pgsql_mib_pieces/pg_listener.mib [new file with mode: 0644]
pgsql_mib_pieces/pg_listener.tbldef [new file with mode: 0644]
pgsql_mib_pieces/pg_namespace.mib [new file with mode: 0644]
pgsql_mib_pieces/pg_namespace.tbldef [new file with mode: 0644]
pgsql_mib_pieces/pg_opclass.mib [new file with mode: 0644]
pgsql_mib_pieces/pg_opclass.tbldef [new file with mode: 0644]
pgsql_mib_pieces/pg_operator.mib [new file with mode: 0644]
pgsql_mib_pieces/pg_operator.tbldef [new file with mode: 0644]
pgsql_mib_pieces/pg_opfamily.mib [new file with mode: 0644]
pgsql_mib_pieces/pg_opfamily.tbldef [new file with mode: 0644]
pgsql_mib_pieces/pg_pltemplate.mib [new file with mode: 0644]
pgsql_mib_pieces/pg_pltemplate.tbldef [new file with mode: 0644]
pgsql_mib_pieces/pg_proc.mib [new file with mode: 0644]
pgsql_mib_pieces/pg_proc.tbldef [new file with mode: 0644]
pgsql_mib_pieces/pg_rewrite.mib [new file with mode: 0644]
pgsql_mib_pieces/pg_rewrite.tbldef [new file with mode: 0644]
pgsql_mib_pieces/pg_shdepend.mib [new file with mode: 0644]
pgsql_mib_pieces/pg_shdepend.tbldef [new file with mode: 0644]
pgsql_mib_pieces/pg_shdescription.mib [new file with mode: 0644]
pgsql_mib_pieces/pg_shdescription.tbldef [new file with mode: 0644]
pgsql_mib_pieces/pg_statistic.mib [new file with mode: 0644]
pgsql_mib_pieces/pg_statistic.tbldef [new file with mode: 0644]
pgsql_mib_pieces/pg_tablespace.mib [new file with mode: 0644]
pgsql_mib_pieces/pg_tablespace.tbldef [new file with mode: 0644]
pgsql_mib_pieces/pg_trigger.mib [new file with mode: 0644]
pgsql_mib_pieces/pg_trigger.tbldef [new file with mode: 0644]
pgsql_mib_pieces/pg_ts_config.mib [new file with mode: 0644]
pgsql_mib_pieces/pg_ts_config.tbldef [new file with mode: 0644]
pgsql_mib_pieces/pg_ts_config_map.mib [new file with mode: 0644]
pgsql_mib_pieces/pg_ts_config_map.tbldef [new file with mode: 0644]
pgsql_mib_pieces/pg_ts_dict.mib [new file with mode: 0644]
pgsql_mib_pieces/pg_ts_dict.tbldef [new file with mode: 0644]
pgsql_mib_pieces/pg_ts_parser.mib [new file with mode: 0644]
pgsql_mib_pieces/pg_ts_parser.tbldef [new file with mode: 0644]
pgsql_mib_pieces/pg_ts_template.mib [new file with mode: 0644]
pgsql_mib_pieces/pg_ts_template.tbldef [new file with mode: 0644]
pgsql_mib_pieces/pg_type.mib [new file with mode: 0644]
pgsql_mib_pieces/pg_type.tbldef [new file with mode: 0644]
pgsql_mib_pieces/reprocess.sh [new file with mode: 0644]
pgsql_mib_pieces/z_FOOTER.mib [new file with mode: 0644]
query_reader.c [new file with mode: 0644]
query_reader.h [new file with mode: 0644]
test_pgsnmpd.sh [new file with mode: 0755]
yaml_interp.c [new file with mode: 0644]

diff --git a/APPLICATION-MIB b/APPLICATION-MIB
new file mode 100644 (file)
index 0000000..021cf41
--- /dev/null
@@ -0,0 +1,441 @@
+   APPLICATION-MIB DEFINITIONS ::= BEGIN
+
+   IMPORTS
+       OBJECT-TYPE, Counter32, Gauge32
+         FROM SNMPv2-SMI
+       mib-2
+         FROM RFC1213-MIB
+       DisplayString, TimeStamp
+         FROM SNMPv2-TC;
+
+
+   -- Textual conventions
+
+   -- DistinguishedName [5] is used to refer to objects in the
+   -- directory.
+
+   DistinguishedName ::= TEXTUAL-CONVENTION
+       STATUS current
+       DESCRIPTION
+           "A Distinguished Name represented in accordance with
+            RFC1485."
+       SYNTAX DisplayString
+
+   application MODULE-IDENTITY
+       LAST-UPDATED "9311280000Z"
+       ORGANIZATION "IETF Mail and Directory Management Working Group"
+       CONTACT-INFO
+         "        Ned Freed
+
+          Postal: Innosoft International, Inc.
+                   250 West First Street, Suite 240
+                  Claremont, CA  91711
+                  US
+
+             Tel: +1 909 624 7907
+             Fax: +1 909 621 5319
+
+          E-Mail: [email protected]"
+       DESCRIPTION
+         "The MIB module describing network service applications"
+       ::= { mib-2 27 }
+
+   -- The basic applTable contains a list of the application
+   -- entities.
+   applTable OBJECT-TYPE
+       SYNTAX SEQUENCE OF ApplEntry
+       MAX-ACCESS not-accessible
+       STATUS current
+       DESCRIPTION
+           "The table holding objects which apply to all different
+            kinds of applications providing network services."
+       ::= {application 1}
+
+   applEntry OBJECT-TYPE
+       SYNTAX ApplEntry
+       MAX-ACCESS not-accessible
+       STATUS current
+       DESCRIPTION
+         "An entry associated with a network service application."
+       INDEX {applIndex}
+       ::= {applTable 1}
+
+   ApplEntry ::= SEQUENCE {
+       applIndex
+           INTEGER,
+       applName
+           DisplayString,
+       applDirectoryName
+           DistinguishedName,
+       applVersion
+           DisplayString,
+       applUptime
+           TimeStamp,
+       applOperStatus
+           INTEGER,
+       applLastChange
+           TimeStamp,
+       applInboundAssociations
+           Gauge32,
+       applOutboundAssociations
+           Gauge32,
+       applAccumulatedInboundAssociations
+           Counter32,
+       applAccumulatedOutboundAssociations
+           Counter32,
+       applLastInboundActivity
+           TimeStamp,
+       applLastOutboundActivity
+           TimeStamp,
+       applRejectedInboundAssociations
+           Counter32,
+       applFailedOutboundAssociations
+           Counter32
+   }
+
+   applIndex OBJECT-TYPE
+       SYNTAX INTEGER (1..2147483647)
+       MAX-ACCESS not-accessible
+       STATUS current
+       DESCRIPTION
+         "An index to uniquely identify the network service
+          application."
+       ::= {applEntry 1}
+
+   applName OBJECT-TYPE
+       SYNTAX DisplayString
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+         "The name the network service application chooses to be
+          known by."
+       ::= {applEntry 2}
+
+   applDirectoryName OBJECT-TYPE
+       SYNTAX DistinguishedName
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+         "The Distinguished Name of the directory entry where
+          static information about this application is stored.
+          An empty string indicates that no information about
+          the application is available in the directory."
+       ::= {applEntry 3}
+
+   applVersion OBJECT-TYPE
+       SYNTAX DisplayString
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+         "The version of network service application software."
+       ::= {applEntry 4}
+
+   applUptime OBJECT-TYPE
+       SYNTAX TimeStamp
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+         "The value of sysUpTime at the time the network service
+          application was last initialized.  If the application was
+          last initialized prior to the last initialization of the
+          network management subsystem, then this object contains
+          a zero value."
+       ::= {applEntry 5}
+
+   applOperStatus OBJECT-TYPE
+       SYNTAX INTEGER {
+         up(1),
+         down(2),
+         halted(3),
+         congested(4),
+         restarting(5)
+       }
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+         "Indicates the operational status of the network service
+          application. 'down' indicates that the network service is
+          not available. 'running' indicates that the network service
+          is operational and available.  'halted' indicates that the
+          service is operational but not available.  'congested'
+          indicates that the service is operational but no additional
+          inbound associations can be accomodated.  'restarting'
+          indicates that the service is currently unavailable but is
+          in the process of restarting and will be available soon."
+       ::= {applEntry 6}
+
+   applLastChange OBJECT-TYPE
+       SYNTAX TimeStamp
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+         "The value of sysUpTime at the time the network service
+          application entered its current operational state.  If
+          the current state was entered prior to the last
+          initialization of the local network management subsystem,
+          then this object contains a zero value."
+       ::= {applEntry 7}
+
+   applInboundAssociations OBJECT-TYPE
+       SYNTAX Gauge32
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+         "The number of current associations to the network service
+          application, where it is the responder.  For dynamic single
+          threaded processes, this will be the number of application
+          instances."
+       ::= {applEntry 8}
+
+   applOutboundAssociations OBJECT-TYPE
+       SYNTAX Gauge32
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+         "The number of current associations to the network service
+          application, where it is the initiator.  For dynamic single
+          threaded processes, this will be the number of application
+          instances."
+       ::= {applEntry 9}
+
+   applAccumulatedInboundAssociations OBJECT-TYPE
+       SYNTAX Counter32
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+         "The total number of associations to the application entity
+          since application initialization, where it was the responder.
+          For  dynamic single threaded processes, this will be the
+          number of application instances."
+       ::= {applEntry 10}
+
+   applAccumulatedOutboundAssociations OBJECT-TYPE
+       SYNTAX Counter32
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+         "The total number of associations to the application entity
+          since application initialization, where it was the initiator.
+          For dynamic single threaded processes, this will be the
+          number of application instances."
+       ::= {applEntry 11}
+
+   applLastInboundActivity OBJECT-TYPE
+       SYNTAX TimeStamp
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+         "The value of sysUpTime at the time this application last
+          had an inbound association.  If the last association
+          occurred prior to the last initialization of the network
+          subsystem, then this object contains a zero value."
+       ::= {applEntry 12}
+
+   applLastOutboundActivity OBJECT-TYPE
+       SYNTAX TimeStamp
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+         "The value of sysUpTime at the time this application last
+          had an outbound association.  If the last association
+          occurred prior to the last initialization of the network
+          subsystem, then this object contains a zero value."
+       ::= {applEntry 13}
+
+   applRejectedInboundAssociations OBJECT-TYPE
+       SYNTAX Counter32
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+         "The total number of inbound associations the application
+          entity has rejected, since application initialization."
+       ::= {applEntry 14}
+
+   applFailedOutboundAssociations OBJECT-TYPE
+       SYNTAX Counter32
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+         "The total number associations where the application entity
+          is initiator and association establishment has failed,
+          since application initialization."
+       ::= {applEntry 15}
+
+
+   -- The assocTable augments the information in the applTable
+   -- with information about associations.  Note that two levels
+   -- of compliance are specified below, depending on whether
+   -- association monitoring is mandated.
+
+   assocTable OBJECT-TYPE
+       SYNTAX SEQUENCE OF AssocEntry
+       MAX-ACCESS not-accessible
+       STATUS current
+       DESCRIPTION
+           "The table holding a set of all active application
+            associations."
+       ::= {application 2}
+
+   assocEntry OBJECT-TYPE
+       SYNTAX AssocEntry
+       MAX-ACCESS not-accessible
+       STATUS current
+       DESCRIPTION
+         "An entry associated with an association for a network
+          service application."
+       INDEX {applIndex, assocIndex}
+       ::= {assocTable 1}
+
+   AssocEntry ::= SEQUENCE {
+       assocIndex
+           INTEGER,
+       assocRemoteApplication
+           DisplayString,
+       assocApplicationProtocol
+           OBJECT IDENTIFIER,
+       assocApplicationType
+           INTEGER,
+       assocDuration
+           TimeStamp
+   }
+
+   assocIndex OBJECT-TYPE
+       SYNTAX INTEGER (1..2147483647)
+       MAX-ACCESS not-accessible
+       STATUS current
+       DESCRIPTION
+         "An index to uniquely identify each association for a network
+          service application."
+       ::= {assocEntry 1}
+
+   assocRemoteApplication OBJECT-TYPE
+       SYNTAX DisplayString
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+         "The name of the system running remote network service
+          application.  For an IP-based application this should be
+          either a domain name or IP address.  For an OSI application
+          it should be the string encoded distinguished name of the
+          managed object.  For X.400(84) MTAs which do not have a
+          Distinguished Name, the RFC1327 [6] syntax
+          'mta in globalid' should be used."
+       ::= {assocEntry 2}
+
+   assocApplicationProtocol OBJECT-TYPE
+       SYNTAX OBJECT IDENTIFIER
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+         "An identification of the protocol being used for the
+          application.  For an OSI Application, this will be the
+          Application Context.  For Internet applications, the IANA
+          maintains a registry of the OIDs which correspond to
+          well-known applications.  If the application protocol is
+          not listed in the registry, an OID value of the form
+          {applTCPProtoID port} or {applUDProtoID port} are used for
+          TCP-based and UDP-based protocols, respectively. In either
+          case 'port' corresponds to the primary port number being
+          used by the protocol."
+       ::= {assocEntry 3}
+
+   assocApplicationType OBJECT-TYPE
+       SYNTAX INTEGER {
+           ua-initiator(1),
+           ua-responder(2),
+           peer-initiator(3),
+           peer-responder(4)}
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+         "This indicates whether the remote application is some type of
+          client making use of this network service (e.g. a User Agent)
+          or a server acting as a peer. Also indicated is whether the
+          remote end initiated an incoming connection to the network
+          service or responded to an outgoing connection made by the
+          local application."
+       ::= {assocEntry 4}
+
+   assocDuration OBJECT-TYPE
+       SYNTAX TimeStamp
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+         "The value of sysUpTime at the time this association was
+          started.  If this association started prior to the last
+          initialization of the network subsystem, then this
+          object contains a zero value."
+       ::= {assocEntry 5}
+
+
+   -- Conformance information
+
+   applConformance OBJECT IDENTIFIER ::= {application 3}
+
+   applGroups      OBJECT IDENTIFIER ::= {applConformance 1}
+   applCompliances OBJECT IDENTIFIER ::= {applConformance 2}
+
+
+   -- Compliance statements
+
+   applCompliance MODULE-COMPLIANCE
+       STATUS current
+       DESCRIPTION
+         "The compliance statement for SNMPv2 entities
+          which implement the Network Services Monitoring MIB
+          for basic monitoring of network service applications."
+       MODULE  -- this module
+         MANDATORY-GROUPS {applGroup}
+       ::= {applCompliances 1}
+
+   assocCompliance MODULE-COMPLIANCE
+       STATUS current
+       DESCRIPTION
+         "The compliance statement for SNMPv2 entities which
+          implement the Network Services Monitoring MIB for basic
+          monitoring of network service applications and their
+          associations."
+       MODULE  -- this module
+         MANDATORY-GROUPS {applGroup, assocGroup}
+       ::= {applCompliances 2}
+
+   -- Units of conformance
+
+   applGroup OBJECT-GROUP
+       OBJECTS {
+         applName, applVersion, applUptime, applOperStatus,
+         applLastChange, applInboundAssociations,
+         applOutboundAssociations, applAccumulatedInboundAssociations,
+         applAccumulatedOutboundAssociations, applLastInboundActivity,
+         applLastOutboundActivity, applRejectedInboundAssociations,
+         applFailedOutboundAssociations}
+       STATUS current
+       DESCRIPTION
+         "A collection of objects providing basic monitoring of
+          network service applications."
+       ::= {applGroups 1}
+
+   assocGroup OBJECT-GROUP
+       OBJECTS {
+         assocRemoteApplication, assocApplicationProtocol,
+         assocApplicationType, assocDuration}
+       STATUS current
+       DESCRIPTION
+         "A collection of objects providing basic monitoring of
+          network service applications' associations."
+       ::= {applGroups 2}
+
+
+   -- OIDs of the form {applTCPProtoID port} are intended to be used
+   -- for TCP-based protocols that don't have OIDs assigned by other
+   -- means. {applUDPProtoID port} serves the same purpose for
+   -- UDP-based protocols. In either case 'port' corresponds to
+   -- the primary port number being used by the protocol. For example,
+   -- assuming no other OID is assigned for SMTP, an OID of
+   -- {applTCPProtoID 25} could be used, since SMTP is a TCP-based
+   -- protocol that uses port 25 as its primary port.
+
+   applTCPProtoID OBJECT IDENTIFIER ::= {application 4}
+   applUDPProtoID OBJECT IDENTIFIER ::= {application 5}
+
+   END
diff --git a/COPYRIGHT b/COPYRIGHT
new file mode 100644 (file)
index 0000000..e4782a3
--- /dev/null
+++ b/COPYRIGHT
@@ -0,0 +1,22 @@
+pgsnmpd - snmpd for the PostgreSQL Database Management System
+
+This is under the following license.
+
+Copyright (c) 2003-2007, PostgreSQL Global Development Group
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose, without fee, and without a written agreement
+is hereby granted, provided that the above copyright notice and this
+paragraph and the following two paragraphs appear in all copies.
+
+IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
+DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
+LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
+DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
+ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO
+PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
diff --git a/KNOWNBUG.txt b/KNOWNBUG.txt
new file mode 100644 (file)
index 0000000..3152c75
--- /dev/null
@@ -0,0 +1 @@
+== Ver 1.0 Release.
diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..7864b4a
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,50 @@
+# $PostgreSQL: pgsql/contrib/pgsnmp/Makefile,v 1.05 2005/11/10 11:03:07 saito Exp $
+
+PROGRAM = pgsnmpd
+
+OBJS   = pgsnmpd.o \
+          RDBMS-MIB_src/rdbmsDbTable/rdbmsDbTable.o RDBMS-MIB_src/rdbmsDbTable/rdbmsDbTable_data_access.o  RDBMS-MIB_src/rdbmsDbTable/rdbmsDbTable_data_get.o \
+          RDBMS-MIB_src/rdbmsDbTable/rdbmsDbTable_data_set.o  RDBMS-MIB_src/rdbmsDbTable/rdbmsDbTable_interface.o \
+          RDBMS-MIB_src/rdbmsDbInfoTable/rdbmsDbInfoTable.o RDBMS-MIB_src/rdbmsDbInfoTable/rdbmsDbInfoTable_data_access.o  \
+         RDBMS-MIB_src/rdbmsDbInfoTable/rdbmsDbInfoTable_data_get.o  RDBMS-MIB_src/rdbmsDbInfoTable/rdbmsDbInfoTable_interface.o \
+          RDBMS-MIB_src/rdbmsDbParamTable/rdbmsDbParamTable.o RDBMS-MIB_src/rdbmsDbParamTable/rdbmsDbParamTable_data_access.o \
+         RDBMS-MIB_src/rdbmsDbParamTable/rdbmsDbParamTable_data_get.o  RDBMS-MIB_src/rdbmsDbParamTable/rdbmsDbParamTable_data_set.o \
+         RDBMS-MIB_src/rdbmsDbParamTable/rdbmsDbParamTable_interface.o \
+          RDBMS-MIB_src/rdbmsSrvTable/rdbmsSrvTable_interface.o \
+         RDBMS-MIB_src/rdbmsSrvTable/rdbmsSrvTable.o RDBMS-MIB_src/rdbmsSrvTable/rdbmsSrvTable_data_access.o \
+         RDBMS-MIB_src/rdbmsSrvTable/rdbmsSrvTable_data_get.o RDBMS-MIB_src/rdbmsSrvTable/rdbmsSrvTable_data_set.o \
+         RDBMS-MIB_src/rdbmsSrvParamTable/rdbmsSrvParamTable.o RDBMS-MIB_src/rdbmsSrvParamTable/rdbmsSrvParamTable_data_access.o \
+         RDBMS-MIB_src/rdbmsSrvParamTable/rdbmsSrvParamTable_data_get.o RDBMS-MIB_src/rdbmsSrvParamTable/rdbmsSrvParamTable_data_set.o \
+         RDBMS-MIB_src/rdbmsSrvParamTable/rdbmsSrvParamTable_interface.o \
+         RDBMS-MIB_src/rdbmsSrvInfoTable/rdbmsSrvInfoTable.o RDBMS-MIB_src/rdbmsSrvInfoTable/rdbmsSrvInfoTable_data_access.o \
+         RDBMS-MIB_src/rdbmsSrvInfoTable/rdbmsSrvInfoTable_data_get.o RDBMS-MIB_src/rdbmsSrvInfoTable/rdbmsSrvInfoTable_data_set.o \
+         RDBMS-MIB_src/rdbmsSrvInfoTable/rdbmsSrvInfoTable_interface.o \
+         RDBMS-MIB_src/rdbmsRelTable/rdbmsRelTable.o RDBMS-MIB_src/rdbmsRelTable/rdbmsRelTable_data_access.o \
+         RDBMS-MIB_src/rdbmsRelTable/rdbmsRelTable_data_get.o RDBMS-MIB_src/rdbmsRelTable/rdbmsRelTable_data_set.o \
+         RDBMS-MIB_src/rdbmsRelTable/rdbmsRelTable_interface.o \
+         RDBMS-MIB_src/rdbmsDbLimitedResourceTable/rdbmsDbLimitedResourceTable.o RDBMS-MIB_src/rdbmsDbLimitedResourceTable/rdbmsDbLimitedResourceTable_data_set.o \
+         RDBMS-MIB_src/rdbmsDbLimitedResourceTable/rdbmsDbLimitedResourceTable_data_access.o RDBMS-MIB_src/rdbmsDbLimitedResourceTable/rdbmsDbLimitedResourceTable_interface.o \
+         RDBMS-MIB_src/rdbmsDbLimitedResourceTable/rdbmsDbLimitedResourceTable_data_get.o  \
+          customquery.o \
+          query_reader.o \
+         pg_array.o
+
+SNMPFLAGS=-I. -I./RDBMS-MIB_src $(shell net-snmp-config --cflags)
+AGENTLIBS=$(shell net-snmp-config --agent-libs)
+
+PG_CPPFLAGS = -O0 -g -I$(libpq_srcdir) $(SNMPFLAGS)
+PG_LIBS = $(libpq_pgport) $(AGENTLIBS) -lyaml
+
+DOCS = README.pgsnmpd
+
+DATA = pgsnmpd.conf pgsnmpd.sql 
+
+ifndef DONT_USE_PGXS
+PGXS := $(shell pg_config --pgxs)
+include $(PGXS)
+else
+subdir = contrib/pgsnmpd
+top_builddir = ../..
+include $(top_builddir)/src/Makefile.global
+include $(top_srcdir)/contrib/contrib-global.mk
+endif
diff --git a/PGSQL-MIB_src/pgsnmpdTables/pgsnmpdConnectionsTable.c b/PGSQL-MIB_src/pgsnmpdTables/pgsnmpdConnectionsTable.c
new file mode 100644 (file)
index 0000000..5ab5792
--- /dev/null
@@ -0,0 +1,129 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ *       version : 1.32.2.3 $ of : mfd-top.m2c,v $ 
+ *
+ * $Id: pgsnmpdConnectionsTable.c,v 1.1 2007/10/30 11:44:41 eggyknap Exp $
+ */
+/** \mainpage MFD helper for pgsnmpdConnectionsTable
+ *
+ * \section intro Introduction
+ * Introductory text.
+ *
+ */
+/* standard Net-SNMP includes */
+#include <net-snmp/net-snmp-config.h>
+#include <net-snmp/net-snmp-includes.h>
+#include <net-snmp/agent/net-snmp-agent-includes.h>
+
+/* include our parent header */
+#include "pgsnmpdConnectionsTable.h"
+
+#include <net-snmp/agent/mib_modules.h>
+
+#include "pgsnmpdConnectionsTable_interface.h"
+
+oid pgsnmpdConnectionsTable_oid[] = { PGSNMPDCONNECTIONSTABLE_OID };
+int pgsnmpdConnectionsTable_oid_size = OID_LENGTH(pgsnmpdConnectionsTable_oid);
+
+void initialize_table_pgsnmpdConnectionsTable(void);
+
+
+/**
+ * Initializes the pgsnmpdConnectionsTable module
+ */
+void
+init_pgsnmpdConnectionsTable(void)
+{
+    DEBUGMSGTL(("verbose:pgsnmpdConnectionsTable:init_pgsnmpdConnectionsTable","called\n"));
+
+    /*
+     * TODO:300:o: Perform pgsnmpdConnectionsTable one-time module initialization.
+     */
+     
+    /*
+     * here we initialize all the tables we're planning on supporting
+     */
+    if (should_init("pgsnmpdConnectionsTable"))
+        initialize_table_pgsnmpdConnectionsTable();
+
+} /* init_pgsnmpdConnectionsTable */
+
+/**
+ * Initialize the table pgsnmpdConnectionsTable 
+ *    (Define its contents and how it's structured)
+ */
+void
+initialize_table_pgsnmpdConnectionsTable(void)
+{
+    pgsnmpdConnectionsTable_registration_ptr user_context;
+    u_long flags;
+
+    DEBUGMSGTL(("verbose:pgsnmpdConnectionsTable:initialize_table_pgsnmpdConnectionsTable","called\n"));
+
+    /*
+     * TODO:301:o: Perform pgsnmpdConnectionsTable one-time table initialization.
+     */
+
+    /*
+     * TODO:302:o: |->Initialize pgsnmpdConnectionsTable user context
+     * if you'd like to pass in a pointer to some data for this
+     * table, allocate or set it up here.
+     */
+    /*
+     * a netsnmp_data_list is a simple way to store void pointers. A simple
+     * string token is used to add, find or remove pointers.
+     */
+    user_context = netsnmp_create_data_list("pgsnmpdConnectionsTable", NULL, NULL);
+    
+    /*
+     * No support for any flags yet, but in the future you would
+     * set any flags here.
+     */
+    flags = 0;
+    
+    /*
+     * call interface initialization code
+     */
+    _pgsnmpdConnectionsTable_initialize_interface(user_context, flags);
+} /* initialize_table_pgsnmpdConnectionsTable */
+
+/**
+ * pre-request callback
+ *
+ *
+ * @retval MFD_SUCCESS              : success.
+ * @retval MFD_ERROR                : other error
+ */
+int
+pgsnmpdConnectionsTable_pre_request(pgsnmpdConnectionsTable_registration_ptr user_context)
+{
+    DEBUGMSGTL(("verbose:pgsnmpdConnectionsTable:pgsnmpdConnectionsTable_pre_request","called\n"));
+
+    /*
+     * TODO:510:o: Perform pgsnmpdConnectionsTable pre-request actions.
+     */
+
+    return MFD_SUCCESS;
+} /* pgsnmpdConnectionsTable_pre_request */
+
+/**
+ * post-request callback
+ *
+ *
+ * @retval MFD_SUCCESS : success.
+ * @retval MFD_ERROR   : other error (ignored)
+ */
+int
+pgsnmpdConnectionsTable_post_request(pgsnmpdConnectionsTable_registration_ptr user_context)
+{
+    DEBUGMSGTL(("verbose:pgsnmpdConnectionsTable:pgsnmpdConnectionsTable_post_request","called\n"));
+
+    /*
+     * TODO:511:o: Perform pgsnmpdConnectionsTable pos-request actions.
+     */
+
+    return MFD_SUCCESS;
+} /* pgsnmpdConnectionsTable_post_request */
+
+
+/** @{ */
diff --git a/PGSQL-MIB_src/pgsnmpdTables/pgsnmpdConnectionsTable.h b/PGSQL-MIB_src/pgsnmpdTables/pgsnmpdConnectionsTable.h
new file mode 100644 (file)
index 0000000..7191830
--- /dev/null
@@ -0,0 +1,198 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ *       version : 1.32.2.3 $ of : mfd-top.m2c,v $
+ *
+ * $Id: pgsnmpdConnectionsTable.h,v 1.1 2007/10/30 11:44:41 eggyknap Exp $
+ */
+#ifndef PGSNMPDCONNECTIONSTABLE_H
+#define PGSNMPDCONNECTIONSTABLE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/** @defgroup misc misc: Miscelaneous routines
+ *
+ * @{
+ */
+#include <net-snmp/library/asn1.h>
+
+/* other required module components */
+    /* *INDENT-OFF*  */
+config_require(PGSQL-MIB/pgsnmpdConnectionsTable/pgsnmpdConnectionsTable_interface);
+config_require(PGSQL-MIB/pgsnmpdConnectionsTable/pgsnmpdConnectionsTable_data_access);
+config_require(PGSQL-MIB/pgsnmpdConnectionsTable/pgsnmpdConnectionsTable_data_get);
+config_require(PGSQL-MIB/pgsnmpdConnectionsTable/pgsnmpdConnectionsTable_data_set);
+    /* *INDENT-ON*  */
+
+/* OID and column number definitions for  */
+#include "pgsnmpdConnectionsTable_oids.h"
+
+/* enum definions */
+#include "pgsnmpdConnectionsTable_enums.h"
+
+/* *********************************************************************
+ * function declarations
+ */
+void init_pgsnmpdConnectionsTable(void);
+
+/* *********************************************************************
+ * Table declarations
+ */
+/**********************************************************************
+ **********************************************************************
+ ***
+ *** Table pgsnmpdConnectionsTable
+ ***
+ **********************************************************************
+ **********************************************************************/
+/*
+ * pgsnmpdConnectionsTable is subid 1 of pgsnmpdTables.
+ * Its status is Current.
+ * OID: .1.3.6.1.4.1.27645.1.1.1, length: 10
+*/
+/* *********************************************************************
+ * When you register your mib, you get to provide a generic
+ * pointer that will be passed back to you for most of the
+ * functions calls.
+ *
+ * TODO:100:r: Review all context structures
+ */
+    /*
+     * TODO:101:o: |-> Review pgsnmpdConnectionsTable registration context.
+     */
+typedef netsnmp_data_list * pgsnmpdConnectionsTable_registration_ptr;
+
+/**********************************************************************/
+/*
+ * TODO:110:r: |-> Review pgsnmpdConnectionsTable data context structure.
+ * This structure is used to represent the data for pgsnmpdConnectionsTable.
+ */
+/*
+ * This structure contains storage for all the columns defined in the
+ * pgsnmpdConnectionsTable.
+ */
+typedef struct pgsnmpdConnectionsTable_data_s {
+    
+        /*
+         * pgsnmpdConnHost(2)/DisplayString/ASN_OCTET_STR/char(char)//L/a/w/e/R/d/H
+         */
+   char   pgsnmpdConnHost[255];
+size_t      pgsnmpdConnHost_len; /* # of char elements, not bytes */
+    
+        /*
+         * pgsnmpdConnPort(3)/DisplayString/ASN_OCTET_STR/char(char)//L/a/w/e/R/d/H
+         */
+   char   pgsnmpdConnPort[255];
+size_t      pgsnmpdConnPort_len; /* # of char elements, not bytes */
+    
+        /*
+         * pgsnmpdConnDbName(4)/DisplayString/ASN_OCTET_STR/char(char)//L/a/w/e/R/d/H
+         */
+   char   pgsnmpdConnDbName[255];
+size_t      pgsnmpdConnDbName_len; /* # of char elements, not bytes */
+    
+} pgsnmpdConnectionsTable_data;
+
+
+/*
+ * TODO:120:r: |-> Review pgsnmpdConnectionsTable mib index.
+ * This structure is used to represent the index for pgsnmpdConnectionsTable.
+ */
+typedef struct pgsnmpdConnectionsTable_mib_index_s {
+
+        /*
+         * pgsnmpdConnID(1)/DisplayString/ASN_OCTET_STR/char(char)//L/a/w/e/R/d/H
+         */
+        /** 128 - 0(other indexes) - oid length(12) = 115 */
+   char   pgsnmpdConnID[115];
+   size_t      pgsnmpdConnID_len;
+
+
+} pgsnmpdConnectionsTable_mib_index;
+
+    /*
+     * TODO:121:r: |   |-> Review pgsnmpdConnectionsTable max index length.
+     * If you KNOW that your indexes will never exceed a certain
+     * length, update this macro to that length.
+     *
+     * BE VERY CAREFUL TO TAKE INTO ACCOUNT THE MAXIMUM
+     * POSSIBLE LENGHT FOR EVERY VARIABLE LENGTH INDEX!
+     * Guessing 128 - col/entry(2)  - oid len(10)
+*/
+#define MAX_pgsnmpdConnectionsTable_IDX_LEN     116
+
+
+/* *********************************************************************
+ * TODO:130:o: |-> Review pgsnmpdConnectionsTable Row request (rowreq) context.
+ * When your functions are called, you will be passed a
+ * pgsnmpdConnectionsTable_rowreq_ctx pointer.
+ */
+typedef struct pgsnmpdConnectionsTable_rowreq_ctx_s {
+
+    /** this must be first for container compare to work */
+    netsnmp_index        oid_idx;
+    oid                  oid_tmp[MAX_pgsnmpdConnectionsTable_IDX_LEN];
+    
+    pgsnmpdConnectionsTable_mib_index        tbl_idx;
+    
+    pgsnmpdConnectionsTable_data              data;
+
+    /*
+     * flags per row. Currently, the first (lower) 8 bits are reserved
+     * for the user. See mfd.h for other flags.
+     */
+    u_int                       rowreq_flags;
+
+    /*
+     * implementor's context pointer (provided during registration)
+     */
+    pgsnmpdConnectionsTable_registration_ptr pgsnmpdConnectionsTable_reg;
+
+    /*
+     * TODO:131:o: |   |-> Add useful data to pgsnmpdConnectionsTable rowreq context.
+     */
+    
+    /*
+     * storage for future expansion
+     */
+    netsnmp_data_list             *pgsnmpdConnectionsTable_data_list;
+
+} pgsnmpdConnectionsTable_rowreq_ctx;
+
+typedef struct pgsnmpdConnectionsTable_ref_rowreq_ctx_s {
+    pgsnmpdConnectionsTable_rowreq_ctx *rowreq_ctx;
+} pgsnmpdConnectionsTable_ref_rowreq_ctx;
+
+/* *********************************************************************
+ * function prototypes
+ */
+    int pgsnmpdConnectionsTable_pre_request(pgsnmpdConnectionsTable_registration_ptr user_context);
+    int pgsnmpdConnectionsTable_post_request(pgsnmpdConnectionsTable_registration_ptr user_context);
+
+
+extern oid pgsnmpdConnectionsTable_oid[];
+extern int pgsnmpdConnectionsTable_oid_size;
+
+
+#include "pgsnmpdConnectionsTable_interface.h"
+#include "pgsnmpdConnectionsTable_data_access.h"
+#include "pgsnmpdConnectionsTable_data_get.h"
+#include "pgsnmpdConnectionsTable_data_set.h"
+
+/*
+ * DUMMY markers, ignore
+ *
+ * TODO:099:x: *************************************************************
+ * TODO:199:x: *************************************************************
+ * TODO:299:x: *************************************************************
+ * TODO:399:x: *************************************************************
+ * TODO:499:x: *************************************************************
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PGSNMPDCONNECTIONSTABLE_H */
diff --git a/PGSQL-MIB_src/pgsnmpdTables/pgsnmpdConnectionsTable_data_access.h b/PGSQL-MIB_src/pgsnmpdTables/pgsnmpdConnectionsTable_data_access.h
new file mode 100644 (file)
index 0000000..d378541
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ *       version : 1.12 $ of : mfd-data-access.m2c,v $
+ *
+ * $Id: pgsnmpdConnectionsTable_data_access.h,v 1.1 2007/10/30 11:44:41 eggyknap Exp $
+ */
+#ifndef PGSNMPDCONNECTIONSTABLE_DATA_ACCESS_H
+#define PGSNMPDCONNECTIONSTABLE_DATA_ACCESS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* *********************************************************************
+ * function declarations
+ */
+
+/* *********************************************************************
+ * Table declarations
+ */
+/**********************************************************************
+ **********************************************************************
+ ***
+ *** Table pgsnmpdConnectionsTable
+ ***
+ **********************************************************************
+ **********************************************************************/
+/*
+ * pgsnmpdConnectionsTable is subid 1 of pgsnmpdTables.
+ * Its status is Current.
+ * OID: .1.3.6.1.4.1.27645.1.1.1, length: 10
+*/
+
+
+    int pgsnmpdConnectionsTable_init_data(pgsnmpdConnectionsTable_registration_ptr pgsnmpdConnectionsTable_reg);
+
+
+/*
+ * TODO:180:o: Review pgsnmpdConnectionsTable cache timeout.
+ * The number of seconds before the cache times out
+ */
+#define PGSNMPDCONNECTIONSTABLE_CACHE_TIMEOUT   60
+
+void pgsnmpdConnectionsTable_container_init(netsnmp_container **container_ptr_ptr,
+                             netsnmp_cache *cache);
+int pgsnmpdConnectionsTable_cache_load(netsnmp_container *container);
+void pgsnmpdConnectionsTable_cache_free(netsnmp_container *container);
+
+    /*
+    ***************************************************
+    ***             START EXAMPLE CODE              ***
+    ***---------------------------------------------***/
+/* *********************************************************************
+ * Since we have no idea how you really access your data, we'll go with
+ * a worst case example: a flat text file.
diff --git a/PGSQL-MIB_src/pgsnmpdTables/pgsnmpdConnectionsTable_data_get.c b/PGSQL-MIB_src/pgsnmpdTables/pgsnmpdConnectionsTable_data_get.c
new file mode 100644 (file)
index 0000000..c2e7677
--- /dev/null
@@ -0,0 +1,279 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ *       version : 1.18.2.1 $ of : mfd-data-get.m2c,v $ 
+ *
+ * $Id: pgsnmpdConnectionsTable_data_get.c,v 1.1 2007/10/30 11:44:41 eggyknap Exp $
+ */
+/* standard Net-SNMP includes */
+#include <net-snmp/net-snmp-config.h>
+#include <net-snmp/net-snmp-includes.h>
+#include <net-snmp/agent/net-snmp-agent-includes.h>
+
+/* include our parent header */
+#include "pgsnmpdConnectionsTable.h"
+
+
+/** @defgroup data_get data_get: Routines to get data
+ *
+ * TODO:230:M: Implement pgsnmpdConnectionsTable get routines.
+ * TODO:240:M: Implement pgsnmpdConnectionsTable mapping routines (if any).
+ *
+ * These routine are used to get the value for individual objects. The
+ * row context is passed, along with a pointer to the memory where the
+ * value should be copied.
+ *
+ * @{
+ */
+/**********************************************************************
+ **********************************************************************
+ ***
+ *** Table pgsnmpdConnectionsTable
+ ***
+ **********************************************************************
+ **********************************************************************/
+/*
+ * pgsnmpdConnectionsTable is subid 1 of pgsnmpdTables.
+ * Its status is Current.
+ * OID: .1.3.6.1.4.1.27645.1.1.1, length: 10
+*/
+
+/* ---------------------------------------------------------------------
+ * TODO:200:r: Implement pgsnmpdConnectionsTable data context functions.
+ */
+
+/*---------------------------------------------------------------------
+ * PGSQL-MIB::pgsnmpdConnectionEntry.pgsnmpdConnID
+ * pgsnmpdConnID is subid 1 of pgsnmpdConnectionEntry.
+ * Its status is Current, and its access level is NoAccess.
+ * OID: .1.3.6.1.4.1.27645.1.1.1.1.1
+ * Description:
+Identifying string for this connection. Default is host:port:database.
+ *
+ * Attributes:
+ *   accessible 0     isscalar 0     enums  0      hasdefval 0
+ *   readable   0     iscolumn 1     ranges 1      hashint   1
+ *   settable   0
+ *   hint: 255a
+ *
+ * Ranges:  0 - 255;
+ *
+ * Its syntax is DisplayString (based on perltype OCTETSTR)
+ * The net-snmp type is ASN_OCTET_STR. The C type decl is char (char)
+ * This data type requires a length.  (Max 255)
+ *
+ *
+ *
+ * NOTE: NODE pgsnmpdConnID IS NOT ACCESSIBLE
+ *
+ *
+ */
+/**
+ * map a value from its original native format to the MIB format.
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_ERROR           : Any other error
+ *
+ * @note parameters follow the memset convention (dest, src).
+ *
+ * @note generation and use of this function can be turned off by re-running
+ * mib2c after adding the following line to the file
+ * default-node-pgsnmpdConnID.m2d :
+ *   @eval $m2c_node_skip_mapping = 1@
+ *
+ * @remark
+ *  If the values for your data type don't exactly match the
+ *  possible values defined by the mib, you should map them here.
+ *  Otherwise, just do a direct copy.
+ */
+int
+pgsnmpdConnID_map(char **mib_pgsnmpdConnID_val_ptr_ptr, size_t *mib_pgsnmpdConnID_val_ptr_len_ptr, char *raw_pgsnmpdConnID_val_ptr, size_t raw_pgsnmpdConnID_val_ptr_len, int allow_realloc)
+{
+    int converted_len;
+
+    netsnmp_assert(NULL != raw_pgsnmpdConnID_val_ptr);
+    netsnmp_assert((NULL != mib_pgsnmpdConnID_val_ptr_ptr) && (NULL != mib_pgsnmpdConnID_val_ptr_len_ptr));
+    
+    DEBUGMSGTL(("verbose:pgsnmpdConnectionsTable:pgsnmpdConnID_map","called\n"));
+    
+    /*
+     * TODO:241:r: |-> Implement pgsnmpdConnID non-integer mapping
+     * it is hard to autogenerate code for mapping types that are not simple
+     * integers, so here is an idea of what you might need to do. It will
+     * probably need some tweaking to get right.
+     */
+    /*
+     * if the length of the raw data doesn't directly correspond with
+     * the length of the mib data, set converted_len to the
+     * space required.
+     */
+    converted_len = raw_pgsnmpdConnID_val_ptr_len; /* assume equal */
+    if((NULL == *mib_pgsnmpdConnID_val_ptr_ptr) || (*mib_pgsnmpdConnID_val_ptr_len_ptr < converted_len)) {
+        if(! allow_realloc) {
+            snmp_log(LOG_ERR,"not enough space for value mapping\n");
+            return SNMP_ERR_GENERR;
+        }
+        *mib_pgsnmpdConnID_val_ptr_ptr = realloc( *mib_pgsnmpdConnID_val_ptr_ptr, converted_len * sizeof(**mib_pgsnmpdConnID_val_ptr_ptr));
+        if(NULL == *mib_pgsnmpdConnID_val_ptr_ptr) {
+            snmp_log(LOG_ERR,"could not allocate memory\n");
+            return SNMP_ERR_GENERR;
+        }
+    }
+    *mib_pgsnmpdConnID_val_ptr_len_ptr = converted_len;
+    memcpy( *mib_pgsnmpdConnID_val_ptr_ptr, raw_pgsnmpdConnID_val_ptr, converted_len );
+
+    return MFD_SUCCESS;
+} /* pgsnmpdConnID_map */
+
+
+/**
+ * set mib index(es)
+ *
+ * @param tbl_idx mib index structure
+ *
+ * @retval MFD_SUCCESS     : success.
+ * @retval MFD_ERROR       : other error.
+ *
+ * @remark
+ *  This convenience function is useful for setting all the MIB index
+ *  components with a single function call. It is assume that the C values
+ *  have already been mapped from their native/rawformat to the MIB format.
+ */
+int
+pgsnmpdConnectionsTable_indexes_set_tbl_idx(pgsnmpdConnectionsTable_mib_index *tbl_idx, char *pgsnmpdConnID_val_ptr,  size_t pgsnmpdConnID_val_ptr_len)
+{
+    DEBUGMSGTL(("verbose:pgsnmpdConnectionsTable:pgsnmpdConnectionsTable_indexes_set_tbl_idx","called\n"));
+
+    /* pgsnmpdConnID(1)/DisplayString/ASN_OCTET_STR/char(char)//L/a/w/e/R/d/H */
+     tbl_idx->pgsnmpdConnID_len = sizeof(tbl_idx->pgsnmpdConnID);
+    /*
+     * make sure there is enough space for pgsnmpdConnID data
+     */
+    if ((NULL == tbl_idx->pgsnmpdConnID) ||
+        (tbl_idx->pgsnmpdConnID_len < (pgsnmpdConnID_val_ptr_len * sizeof(tbl_idx->pgsnmpdConnID[0])))) {
+        snmp_log(LOG_ERR,"not enough space for value\n");
+        return MFD_ERROR;
+    }
+    tbl_idx->pgsnmpdConnID_len = pgsnmpdConnID_val_ptr_len * sizeof(tbl_idx->pgsnmpdConnID[0]);
+    memcpy( tbl_idx->pgsnmpdConnID, pgsnmpdConnID_val_ptr, tbl_idx->pgsnmpdConnID_len );
+    
+
+    return MFD_SUCCESS;
+} /* pgsnmpdConnectionsTable_indexes_set_tbl_idx */
+
+/**
+ * @internal
+ * set row context indexes
+ *
+ * @param reqreq_ctx the row context that needs updated indexes
+ *
+ * @retval MFD_SUCCESS     : success.
+ * @retval MFD_ERROR       : other error.
+ *
+ * @remark
+ *  This function sets the mib indexs, then updates the oid indexs
+ *  from the mib index.
+ */
+int
+pgsnmpdConnectionsTable_indexes_set(pgsnmpdConnectionsTable_rowreq_ctx *rowreq_ctx, char *pgsnmpdConnID_val_ptr,  size_t pgsnmpdConnID_val_ptr_len)
+{
+    DEBUGMSGTL(("verbose:pgsnmpdConnectionsTable:pgsnmpdConnectionsTable_indexes_set","called\n"));
+
+    if(MFD_SUCCESS != pgsnmpdConnectionsTable_indexes_set_tbl_idx(&rowreq_ctx->tbl_idx
+                                   , pgsnmpdConnID_val_ptr, pgsnmpdConnID_val_ptr_len
+           ))
+        return MFD_ERROR;
+
+    /*
+     * convert mib index to oid index
+     */
+    rowreq_ctx->oid_idx.len = sizeof(rowreq_ctx->oid_tmp) / sizeof(oid);
+    if(0 != pgsnmpdConnectionsTable_index_to_oid(&rowreq_ctx->oid_idx,
+                                    &rowreq_ctx->tbl_idx)) {
+        return MFD_ERROR;
+    }
+
+    return MFD_SUCCESS;
+} /* pgsnmpdConnectionsTable_indexes_set */
+
+
+/*---------------------------------------------------------------------
+ * PGSQL-MIB::pgsnmpdConnectionEntry.pgsnmpdConnHost
+ * pgsnmpdConnHost is subid 2 of pgsnmpdConnectionEntry.
+ * Its status is Current, and its access level is NoAccess.
+ * OID: .1.3.6.1.4.1.27645.1.1.1.1.2
+ * Description:
+Host name, IP address, or other identifier of the host PostgreSQL server for this connection
+ *
+ * Attributes:
+ *   accessible 0     isscalar 0     enums  0      hasdefval 0
+ *   readable   0     iscolumn 1     ranges 1      hashint   1
+ *   settable   0
+ *   hint: 255a
+ *
+ * Ranges:  0 - 255;
+ *
+ * Its syntax is DisplayString (based on perltype OCTETSTR)
+ * The net-snmp type is ASN_OCTET_STR. The C type decl is char (char)
+ * This data type requires a length.  (Max 255)
+ *
+ *
+ *
+ * NOTE: NODE pgsnmpdConnHost IS NOT ACCESSIBLE
+ *
+ *
+ */
+/*---------------------------------------------------------------------
+ * PGSQL-MIB::pgsnmpdConnectionEntry.pgsnmpdConnPort
+ * pgsnmpdConnPort is subid 3 of pgsnmpdConnectionEntry.
+ * Its status is Current, and its access level is NoAccess.
+ * OID: .1.3.6.1.4.1.27645.1.1.1.1.3
+ * Description:
+PostgreSQL server port number for this connection
+ *
+ * Attributes:
+ *   accessible 0     isscalar 0     enums  0      hasdefval 0
+ *   readable   0     iscolumn 1     ranges 1      hashint   1
+ *   settable   0
+ *   hint: 255a
+ *
+ * Ranges:  0 - 255;
+ *
+ * Its syntax is DisplayString (based on perltype OCTETSTR)
+ * The net-snmp type is ASN_OCTET_STR. The C type decl is char (char)
+ * This data type requires a length.  (Max 255)
+ *
+ *
+ *
+ * NOTE: NODE pgsnmpdConnPort IS NOT ACCESSIBLE
+ *
+ *
+ */
+/*---------------------------------------------------------------------
+ * PGSQL-MIB::pgsnmpdConnectionEntry.pgsnmpdConnDbName
+ * pgsnmpdConnDbName is subid 4 of pgsnmpdConnectionEntry.
+ * Its status is Current, and its access level is NoAccess.
+ * OID: .1.3.6.1.4.1.27645.1.1.1.1.4
+ * Description:
+Name of the database this connection is connected to
+ *
+ * Attributes:
+ *   accessible 0     isscalar 0     enums  0      hasdefval 0
+ *   readable   0     iscolumn 1     ranges 1      hashint   1
+ *   settable   0
+ *   hint: 255a
+ *
+ * Ranges:  0 - 255;
+ *
+ * Its syntax is DisplayString (based on perltype OCTETSTR)
+ * The net-snmp type is ASN_OCTET_STR. The C type decl is char (char)
+ * This data type requires a length.  (Max 255)
+ *
+ *
+ *
+ * NOTE: NODE pgsnmpdConnDbName IS NOT ACCESSIBLE
+ *
+ *
+ */
+
+
+/** @} */
diff --git a/PGSQL-MIB_src/pgsnmpdTables/pgsnmpdConnectionsTable_data_get.h b/PGSQL-MIB_src/pgsnmpdTables/pgsnmpdConnectionsTable_data_get.h
new file mode 100644 (file)
index 0000000..2e12dae
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ *       version : 1.18.2.1 $ of : mfd-data-get.m2c,v $
+ *
+ * $Id: pgsnmpdConnectionsTable_data_get.h,v 1.1 2007/10/30 11:44:41 eggyknap Exp $
+ *
+ * @file pgsnmpdConnectionsTable_data_get.h
+ *
+ * @addtogroup get
+ *
+ * Prototypes for get functions
+ *
+ * @{
+ */
+#ifndef PGSNMPDCONNECTIONSTABLE_DATA_GET_H
+#define PGSNMPDCONNECTIONSTABLE_DATA_GET_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* *********************************************************************
+ * GET function declarations
+ */
+
+/* *********************************************************************
+ * GET Table declarations
+ */
+/**********************************************************************
+ **********************************************************************
+ ***
+ *** Table pgsnmpdConnectionsTable
+ ***
+ **********************************************************************
+ **********************************************************************/
+/*
+ * pgsnmpdConnectionsTable is subid 1 of pgsnmpdTables.
+ * Its status is Current.
+ * OID: .1.3.6.1.4.1.27645.1.1.1, length: 10
+*/
+    /*
+     * indexes
+     */
+    int pgsnmpdConnID_map(char **mib_pgsnmpdConnID_val_ptr_ptr, size_t *mib_pgsnmpdConnID_val_ptr_len_ptr, char *raw_pgsnmpdConnID_val_ptr, size_t raw_pgsnmpdConnID_val_ptr_len, int allow_realloc);
+
+    int pgsnmpdConnHost_map(char **mib_pgsnmpdConnHost_val_ptr_ptr, size_t *mib_pgsnmpdConnHost_val_ptr_len_ptr, char *raw_pgsnmpdConnHost_val_ptr, size_t raw_pgsnmpdConnHost_val_ptr_len, int allow_realloc);
+    int pgsnmpdConnHost_get( pgsnmpdConnectionsTable_rowreq_ctx *rowreq_ctx, char **pgsnmpdConnHost_val_ptr_ptr, size_t *pgsnmpdConnHost_val_ptr_len_ptr );
+    int pgsnmpdConnPort_map(char **mib_pgsnmpdConnPort_val_ptr_ptr, size_t *mib_pgsnmpdConnPort_val_ptr_len_ptr, char *raw_pgsnmpdConnPort_val_ptr, size_t raw_pgsnmpdConnPort_val_ptr_len, int allow_realloc);
+    int pgsnmpdConnPort_get( pgsnmpdConnectionsTable_rowreq_ctx *rowreq_ctx, char **pgsnmpdConnPort_val_ptr_ptr, size_t *pgsnmpdConnPort_val_ptr_len_ptr );
+    int pgsnmpdConnDbName_map(char **mib_pgsnmpdConnDbName_val_ptr_ptr, size_t *mib_pgsnmpdConnDbName_val_ptr_len_ptr, char *raw_pgsnmpdConnDbName_val_ptr, size_t raw_pgsnmpdConnDbName_val_ptr_len, int allow_realloc);
+    int pgsnmpdConnDbName_get( pgsnmpdConnectionsTable_rowreq_ctx *rowreq_ctx, char **pgsnmpdConnDbName_val_ptr_ptr, size_t *pgsnmpdConnDbName_val_ptr_len_ptr );
+
+
+int pgsnmpdConnectionsTable_indexes_set_tbl_idx(pgsnmpdConnectionsTable_mib_index *tbl_idx, char *pgsnmpdConnID_val_ptr,  size_t pgsnmpdConnID_val_ptr_len);
+int pgsnmpdConnectionsTable_indexes_set(pgsnmpdConnectionsTable_rowreq_ctx *rowreq_ctx, char *pgsnmpdConnID_val_ptr,  size_t pgsnmpdConnID_val_ptr_len);
+
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PGSNMPDCONNECTIONSTABLE_DATA_GET_H */
+/** @} */
diff --git a/PGSQL-MIB_src/pgsnmpdTables/pgsnmpdConnectionsTable_data_set.c b/PGSQL-MIB_src/pgsnmpdTables/pgsnmpdConnectionsTable_data_set.c
new file mode 100644 (file)
index 0000000..44af8ae
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ *       version : 1.18 $ of : mfd-data-set.m2c,v $
+ *
+ * $Id: pgsnmpdConnectionsTable_data_set.c,v 1.1 2007/10/30 11:44:41 eggyknap Exp $
+ *
+ */
+/* standard Net-SNMP includes */
+#include <net-snmp/net-snmp-config.h>
+#include <net-snmp/net-snmp-includes.h>
+#include <net-snmp/agent/net-snmp-agent-includes.h>
+
+/* include our parent header */
+#include "pgsnmpdConnectionsTable.h"
+
+
+/** @defgroup data_set data_set: Routines to set data
+ *
+ * These routines are used to set the value for individual objects. The
+ * row context is passed, along with the new value.
+ * 
+ * @{
+ */
+/** @} */
diff --git a/PGSQL-MIB_src/pgsnmpdTables/pgsnmpdConnectionsTable_data_set.h b/PGSQL-MIB_src/pgsnmpdTables/pgsnmpdConnectionsTable_data_set.h
new file mode 100644 (file)
index 0000000..d077ee0
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ *       version : 1.18 $ of : mfd-data-set.m2c,v $ 
+ *
+ * $Id: pgsnmpdConnectionsTable_data_set.h,v 1.1 2007/10/30 11:44:41 eggyknap Exp $
+ */
+#ifndef PGSNMPDCONNECTIONSTABLE_DATA_SET_H
+#define PGSNMPDCONNECTIONSTABLE_DATA_SET_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* *********************************************************************
+ * SET function declarations
+ */
+
+/* *********************************************************************
+ * SET Table declarations
+ */
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PGSNMPDCONNECTIONSTABLE_DATA_SET_H */
diff --git a/PGSQL-MIB_src/pgsnmpdTables/pgsnmpdConnectionsTable_enums.h b/PGSQL-MIB_src/pgsnmpdTables/pgsnmpdConnectionsTable_enums.h
new file mode 100644 (file)
index 0000000..5fcc4cd
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ *  : generic-table-enums.m2c,v 1.3 2004/05/18 17:44:32 rstory Exp $
+ *
+ * $Id: pgsnmpdConnectionsTable_enums.h,v 1.1 2007/10/30 11:44:41 eggyknap Exp $
+ */
+#ifndef PGSNMPDCONNECTIONSTABLE_ENUMS_H
+#define PGSNMPDCONNECTIONSTABLE_ENUMS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ /*
+ * NOTES on enums
+ * ==============
+ *
+ * Value Mapping
+ * -------------
+ * If the values for your data type don't exactly match the
+ * possible values defined by the mib, you should map them
+ * below. For example, a boolean flag (1/0) is usually represented
+ * as a TruthValue in a MIB, which maps to the values (1/2).
+ *
+ */
+/*************************************************************************
+ *************************************************************************
+ *
+ * enum definitions for table pgsnmpdConnectionsTable
+ *
+ *************************************************************************
+ *************************************************************************/
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PGSNMPDCONNECTIONSTABLE_ENUMS_H */
diff --git a/PGSQL-MIB_src/pgsnmpdTables/pgsnmpdConnectionsTable_interface.c b/PGSQL-MIB_src/pgsnmpdTables/pgsnmpdConnectionsTable_interface.c
new file mode 100644 (file)
index 0000000..2b42a61
--- /dev/null
@@ -0,0 +1,707 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ *       version : 1.43.2.3 $ of : mfd-interface.m2c,v $ 
+ *
+ * $Id: pgsnmpdConnectionsTable_interface.c,v 1.1 2007/10/30 11:44:41 eggyknap Exp $
+ */
+/*
+ * *********************************************************************
+ * *********************************************************************
+ * *********************************************************************
+ * ***                                                               ***
+ * ***  NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE  ***
+ * ***                                                               ***
+ * ***                                                               ***
+ * ***       THIS FILE DOES NOT CONTAIN ANY USER EDITABLE CODE.      ***
+ * ***                                                               ***
+ * ***                                                               ***
+ * ***       THE GENERATED CODE IS INTERNAL IMPLEMENTATION, AND      ***
+ * ***                                                               ***
+ * ***                                                               ***
+ * ***    IS SUBJECT TO CHANGE WITHOUT WARNING IN FUTURE RELEASES.   ***
+ * ***                                                               ***
+ * ***                                                               ***
+ * *********************************************************************
+ * *********************************************************************
+ * *********************************************************************
+ */
+
+/* standard Net-SNMP includes */
+#include <net-snmp/net-snmp-config.h>
+#include <net-snmp/net-snmp-includes.h>
+#include <net-snmp/agent/net-snmp-agent-includes.h>
+
+/* include our parent header */
+#include "pgsnmpdConnectionsTable.h"
+
+
+#include <net-snmp/library/container.h>
+
+#include "pgsnmpdConnectionsTable_interface.h"
+
+/**********************************************************************
+ **********************************************************************
+ ***
+ *** Table pgsnmpdConnectionsTable
+ ***
+ **********************************************************************
+ **********************************************************************/
+/*
+ * pgsnmpdConnectionsTable is subid 1 of pgsnmpdTables.
+ * Its status is Current.
+ * OID: .1.3.6.1.4.1.27645.1.1.1, length: 10
+*/
+typedef struct pgsnmpdConnectionsTable_interface_ctx_s {
+
+   netsnmp_container              *container;
+   netsnmp_cache                  *cache; /* optional cache */
+
+   pgsnmpdConnectionsTable_registration_ptr      user_ctx;
+   
+   netsnmp_table_registration_info  tbl_info;
+
+   netsnmp_baby_steps_access_methods access_multiplexer;
+
+} pgsnmpdConnectionsTable_interface_ctx;
+
+static pgsnmpdConnectionsTable_interface_ctx pgsnmpdConnectionsTable_if_ctx;
+
+static void _pgsnmpdConnectionsTable_container_init(
+    pgsnmpdConnectionsTable_interface_ctx *if_ctx);
+
+
+static Netsnmp_Node_Handler _mfd_pgsnmpdConnectionsTable_pre_request;
+static Netsnmp_Node_Handler _mfd_pgsnmpdConnectionsTable_post_request;
+static Netsnmp_Node_Handler _mfd_pgsnmpdConnectionsTable_object_lookup;
+static Netsnmp_Node_Handler _mfd_pgsnmpdConnectionsTable_get_values;
+/**
+ * @internal
+ * Initialize the table pgsnmpdConnectionsTable 
+ *    (Define its contents and how it's structured)
+ */
+void
+_pgsnmpdConnectionsTable_initialize_interface(pgsnmpdConnectionsTable_registration_ptr reg_ptr,  u_long flags)
+{
+    netsnmp_baby_steps_access_methods *access_multiplexer =
+        &pgsnmpdConnectionsTable_if_ctx.access_multiplexer;
+    netsnmp_table_registration_info *tbl_info = &pgsnmpdConnectionsTable_if_ctx.tbl_info;
+    netsnmp_handler_registration *reginfo;
+    netsnmp_mib_handler *handler;
+    int    mfd_modes = 0;
+
+    DEBUGMSGTL(("internal:pgsnmpdConnectionsTable:_pgsnmpdConnectionsTable_initialize_interface","called\n"));
+
+
+    /*************************************************
+     *
+     * save interface context for pgsnmpdConnectionsTable
+     */
+    /*
+     * Setting up the table's definition
+     */
+    netsnmp_table_helper_add_indexes(tbl_info,
+                                  ASN_OCTET_STR, /** index: pgsnmpdConnID */
+                             0);
+
+    /*  Define the minimum and maximum accessible columns.  This
+        optimizes retrival. */
+    tbl_info->min_column = PGSNMPDCONNECTIONSTABLE_MIN_COL;
+    tbl_info->max_column = PGSNMPDCONNECTIONSTABLE_MAX_COL;
+
+    /*
+     * save users context
+     */
+    pgsnmpdConnectionsTable_if_ctx.user_ctx = reg_ptr;
+
+    /*
+     * call data access initialization code
+     */
+    pgsnmpdConnectionsTable_init_data(reg_ptr);
+
+    /*
+     * set up the container
+     */
+    _pgsnmpdConnectionsTable_container_init(&pgsnmpdConnectionsTable_if_ctx);
+    if (NULL == pgsnmpdConnectionsTable_if_ctx.container) {
+        snmp_log(LOG_ERR,"could not initialize container for pgsnmpdConnectionsTable\n");
+        return;
+    }
+    
+    /*
+     * access_multiplexer: REQUIRED wrapper for get request handling
+     */
+    access_multiplexer->object_lookup = _mfd_pgsnmpdConnectionsTable_object_lookup;
+    access_multiplexer->get_values = _mfd_pgsnmpdConnectionsTable_get_values;
+
+    /*
+     * no wrappers yet
+     */
+    access_multiplexer->pre_request = _mfd_pgsnmpdConnectionsTable_pre_request;
+    access_multiplexer->post_request = _mfd_pgsnmpdConnectionsTable_post_request;
+
+
+    /*************************************************
+     *
+     * Create a registration, save our reg data, register table.
+     */
+    DEBUGMSGTL(("pgsnmpdConnectionsTable:init_pgsnmpdConnectionsTable",
+                "Registering pgsnmpdConnectionsTable as a mibs-for-dummies table.\n"));                 
+    handler = netsnmp_baby_steps_access_multiplexer_get(access_multiplexer);
+    reginfo = netsnmp_handler_registration_create("pgsnmpdConnectionsTable", handler,
+                                                  pgsnmpdConnectionsTable_oid,
+                                                  pgsnmpdConnectionsTable_oid_size,
+                                                  HANDLER_CAN_BABY_STEP |
+                                                  HANDLER_CAN_RONLY
+                                                  );
+    if(NULL == reginfo) {
+        snmp_log(LOG_ERR,"error registering table pgsnmpdConnectionsTable\n");
+        return;
+    }
+    reginfo->my_reg_void = &pgsnmpdConnectionsTable_if_ctx;
+
+    /*************************************************
+     *
+     * set up baby steps handler, create it and inject it
+     */
+    if( access_multiplexer->object_lookup )
+        mfd_modes |= BABY_STEP_OBJECT_LOOKUP;
+    if( access_multiplexer->set_values )
+        mfd_modes |= BABY_STEP_SET_VALUES;
+    if( access_multiplexer->irreversible_commit )
+        mfd_modes |= BABY_STEP_IRREVERSIBLE_COMMIT;
+    if( access_multiplexer->object_syntax_checks )
+        mfd_modes |= BABY_STEP_CHECK_OBJECT;
+
+    if( access_multiplexer->pre_request )
+        mfd_modes |= BABY_STEP_PRE_REQUEST;
+    if( access_multiplexer->post_request )
+        mfd_modes |= BABY_STEP_POST_REQUEST;
+    
+    if( access_multiplexer->undo_setup )
+        mfd_modes |= BABY_STEP_UNDO_SETUP;
+    if( access_multiplexer->undo_cleanup )
+        mfd_modes |= BABY_STEP_UNDO_CLEANUP;
+    if( access_multiplexer->undo_sets )
+        mfd_modes |= BABY_STEP_UNDO_SETS;
+    
+    if( access_multiplexer->row_creation )
+        mfd_modes |= BABY_STEP_ROW_CREATE;
+    if( access_multiplexer->consistency_checks )
+        mfd_modes |= BABY_STEP_CHECK_CONSISTENCY;
+    if( access_multiplexer->commit )
+        mfd_modes |= BABY_STEP_COMMIT;
+    if( access_multiplexer->undo_commit )
+        mfd_modes |= BABY_STEP_UNDO_COMMIT;
+    
+    handler = netsnmp_baby_steps_handler_get(mfd_modes);
+    netsnmp_inject_handler(reginfo, handler);
+
+    /*************************************************
+     *
+     * inject row_merge helper with prefix rootoid_len + 2 (entry.col)
+     */
+    handler = netsnmp_get_row_merge_handler(reginfo->rootoid_len + 2);
+    netsnmp_inject_handler(reginfo, handler);
+
+    /*************************************************
+     *
+     * inject container_table helper
+     */
+    handler =
+        netsnmp_container_table_handler_get(tbl_info,
+                                            pgsnmpdConnectionsTable_if_ctx.container,
+                                            TABLE_CONTAINER_KEY_NETSNMP_INDEX);
+    netsnmp_inject_handler( reginfo, handler );
+
+    /*************************************************
+     *
+     * inject cache helper
+     */
+    if(NULL != pgsnmpdConnectionsTable_if_ctx.cache) {
+        handler = netsnmp_cache_handler_get(pgsnmpdConnectionsTable_if_ctx.cache);
+        netsnmp_inject_handler( reginfo, handler );
+    }
+
+    /*
+     * register table
+     */
+    netsnmp_register_table(reginfo, tbl_info);
+} /* _pgsnmpdConnectionsTable_initialize_interface */
+
+void
+pgsnmpdConnectionsTable_valid_columns_set(netsnmp_column_info *vc)
+{
+    pgsnmpdConnectionsTable_if_ctx.tbl_info.valid_columns = vc;
+} /* pgsnmpdConnectionsTable_valid_columns_set */
+
+/**
+ * @internal
+ * convert the index component stored in the context to an oid
+ */
+int
+pgsnmpdConnectionsTable_index_to_oid(netsnmp_index *oid_idx,
+                         pgsnmpdConnectionsTable_mib_index *mib_idx)
+{
+    int err = SNMP_ERR_NOERROR;
+    
+    /*
+     * temp storage for parsing indexes
+     */
+    /*
+     * pgsnmpdConnID(1)/DisplayString/ASN_OCTET_STR/char(char)//L/a/w/e/R/d/H
+     */
+    netsnmp_variable_list var_pgsnmpdConnID;
+
+    /*
+     * set up varbinds
+     */
+    memset( &var_pgsnmpdConnID, 0x00, sizeof(var_pgsnmpdConnID) );
+    var_pgsnmpdConnID.type = ASN_OCTET_STR;
+
+    /*
+     * chain temp index varbinds together
+     */
+    var_pgsnmpdConnID.next_variable =  NULL;
+
+
+    DEBUGMSGTL(("verbose:pgsnmpdConnectionsTable:pgsnmpdConnectionsTable_index_to_oid","called\n"));
+
+        /* pgsnmpdConnID(1)/DisplayString/ASN_OCTET_STR/char(char)//L/a/w/e/R/d/H */
+    snmp_set_var_value(&var_pgsnmpdConnID, (u_char*)&mib_idx->pgsnmpdConnID,
+                       mib_idx->pgsnmpdConnID_len * sizeof(mib_idx->pgsnmpdConnID[0]));
+
+
+    err = build_oid_noalloc(oid_idx->oids, oid_idx->len, &oid_idx->len,
+                           NULL, 0, &var_pgsnmpdConnID);
+    if(err)
+        snmp_log(LOG_ERR,"error %d converting index to oid\n", err);
+
+    /*
+     * parsing may have allocated memory. free it.
+     */
+    snmp_reset_var_buffers( &var_pgsnmpdConnID );
+
+    return err;
+} /* pgsnmpdConnectionsTable_index_to_oid */
+
+/**
+ * extract pgsnmpdConnectionsTable indexes from a netsnmp_index
+ *
+ * @retval SNMP_ERR_NOERROR  : no error
+ * @retval SNMP_ERR_GENERR   : error
+ */
+int
+pgsnmpdConnectionsTable_index_from_oid(netsnmp_index *oid_idx,
+                         pgsnmpdConnectionsTable_mib_index *mib_idx)
+{
+    int err = SNMP_ERR_NOERROR;
+    
+    /*
+     * temp storage for parsing indexes
+     */
+    /*
+     * pgsnmpdConnID(1)/DisplayString/ASN_OCTET_STR/char(char)//L/a/w/e/R/d/H
+     */
+    netsnmp_variable_list var_pgsnmpdConnID;
+
+    /*
+     * set up varbinds
+     */
+    memset( &var_pgsnmpdConnID, 0x00, sizeof(var_pgsnmpdConnID) );
+    var_pgsnmpdConnID.type = ASN_OCTET_STR;
+
+    /*
+     * chain temp index varbinds together
+     */
+    var_pgsnmpdConnID.next_variable =  NULL;
+
+
+    DEBUGMSGTL(("verbose:pgsnmpdConnectionsTable:pgsnmpdConnectionsTable_index_from_oid","called\n"));
+
+    /*
+     * parse the oid into the individual index components
+     */
+    err = parse_oid_indexes( oid_idx->oids, oid_idx->len,
+                             &var_pgsnmpdConnID );
+    if (err == SNMP_ERR_NOERROR) {
+        /*
+         * copy out values
+         */
+    /*
+     * NOTE: val_len is in bytes, pgsnmpdConnID_len might not be
+     */
+         if(var_pgsnmpdConnID.val_len > sizeof(mib_idx->pgsnmpdConnID))
+             err = SNMP_ERR_GENERR;
+         else {
+             memcpy(mib_idx->pgsnmpdConnID, var_pgsnmpdConnID.val.string, var_pgsnmpdConnID.val_len);
+             mib_idx->pgsnmpdConnID_len = var_pgsnmpdConnID.val_len / sizeof(mib_idx->pgsnmpdConnID[0]);
+         }
+
+
+    }
+
+    /*
+     * parsing may have allocated memory. free it.
+     */
+    snmp_reset_var_buffers( &var_pgsnmpdConnID );
+
+    return err;
+} /* pgsnmpdConnectionsTable_index_from_oid */
+
+
+/* *********************************************************************
+ * @internal
+ * allocate resources for a pgsnmpdConnectionsTable_rowreq_ctx
+ */
+pgsnmpdConnectionsTable_rowreq_ctx *
+pgsnmpdConnectionsTable_allocate_rowreq_ctx(void)
+{
+    pgsnmpdConnectionsTable_rowreq_ctx *rowreq_ctx =
+                  SNMP_MALLOC_TYPEDEF(pgsnmpdConnectionsTable_rowreq_ctx);
+
+    DEBUGMSGTL(("internal:pgsnmpdConnectionsTable:pgsnmpdConnectionsTable_allocate_rowreq_ctx","called\n"));
+
+    if(NULL == rowreq_ctx) {
+        snmp_log(LOG_ERR,"Couldn't allocate memory for a "
+                 "pgsnmpdConnectionsTable_rowreq_ctx.\n");
+    }
+
+    rowreq_ctx->oid_idx.oids = rowreq_ctx->oid_tmp;
+
+    rowreq_ctx->pgsnmpdConnectionsTable_data_list = NULL;
+    rowreq_ctx->pgsnmpdConnectionsTable_reg = pgsnmpdConnectionsTable_if_ctx.user_ctx;
+
+
+    return rowreq_ctx;
+} /* pgsnmpdConnectionsTable_allocate_rowreq_ctx */
+
+/*
+ * @internal
+ * release resources for a pgsnmpdConnectionsTable_rowreq_ctx
+ */
+void
+pgsnmpdConnectionsTable_release_rowreq_ctx(pgsnmpdConnectionsTable_rowreq_ctx *rowreq_ctx)
+{
+    DEBUGMSGTL(("internal:pgsnmpdConnectionsTable:pgsnmpdConnectionsTable_release_rowreq_ctx","called\n"));
+
+    netsnmp_assert(NULL != rowreq_ctx);
+    
+
+    /*
+     * free index oid pointer
+     */
+    if(rowreq_ctx->oid_idx.oids != rowreq_ctx->oid_tmp)
+        free(rowreq_ctx->oid_idx.oids);
+
+    SNMP_FREE(rowreq_ctx);
+} /* pgsnmpdConnectionsTable_release_rowreq_ctx */
+
+/**
+ * @internal
+ * wrapper
+ */
+static int
+_mfd_pgsnmpdConnectionsTable_pre_request(netsnmp_mib_handler *handler,
+                            netsnmp_handler_registration *reginfo,
+                            netsnmp_agent_request_info *agtreq_info,
+                            netsnmp_request_info *requests)
+{
+    int rc = pgsnmpdConnectionsTable_pre_request(pgsnmpdConnectionsTable_if_ctx.user_ctx);
+    if (MFD_SUCCESS != rc) {
+        /*
+         * nothing we can do about it but log it
+         */
+        DEBUGMSGTL(("internal:pgsnmpdConnectionsTable","error %d from "
+                    "pgsnmpdConnectionsTable_pre_request\n", rc));
+        netsnmp_request_set_error_all(requests, SNMP_VALIDATE_ERR(rc));
+    }
+    
+    return SNMP_ERR_NOERROR;
+} /* _mfd_pgsnmpdConnectionsTable_pre_request */
+
+/**
+ * @internal
+ * wrapper
+ */
+static int
+_mfd_pgsnmpdConnectionsTable_post_request(netsnmp_mib_handler *handler,
+                             netsnmp_handler_registration *reginfo,
+                             netsnmp_agent_request_info *agtreq_info,
+                             netsnmp_request_info *requests)
+{
+    pgsnmpdConnectionsTable_rowreq_ctx *rowreq_ctx;
+    int rc = pgsnmpdConnectionsTable_post_request(pgsnmpdConnectionsTable_if_ctx.user_ctx);
+    if (MFD_SUCCESS != rc) {
+        /*
+         * nothing we can do about it but log it
+         */
+        DEBUGMSGTL(("internal:pgsnmpdConnectionsTable","error %d from "
+                    "pgsnmpdConnectionsTable_post_request\n", rc));
+    }
+    
+    /*
+     * if there are no errors, check for and handle row creation/deletion
+     */
+    rc = netsnmp_check_requests_error(requests);
+    if ((SNMP_ERR_NOERROR == rc) &&
+        (NULL !=
+         (rowreq_ctx = netsnmp_container_table_row_extract(requests)))) {
+        if (rowreq_ctx->rowreq_flags & MFD_ROW_CREATED) {
+            rowreq_ctx->rowreq_flags &= ~MFD_ROW_CREATED;
+            CONTAINER_INSERT(pgsnmpdConnectionsTable_if_ctx.container, rowreq_ctx);
+        }
+        else if (rowreq_ctx->rowreq_flags & MFD_ROW_DELETED) {
+            CONTAINER_REMOVE(pgsnmpdConnectionsTable_if_ctx.container, rowreq_ctx);
+            pgsnmpdConnectionsTable_release_rowreq_ctx(rowreq_ctx);
+        }
+    }
+
+    return SNMP_ERR_NOERROR;
+} /* _mfd_pgsnmpdConnectionsTable_post_request */
+
+/**
+ * @internal
+ * wrapper
+ */
+static int
+_mfd_pgsnmpdConnectionsTable_object_lookup(netsnmp_mib_handler *handler,
+                         netsnmp_handler_registration *reginfo,
+                         netsnmp_agent_request_info *agtreq_info,
+                         netsnmp_request_info *requests)
+{
+    pgsnmpdConnectionsTable_rowreq_ctx *rowreq_ctx =
+                  netsnmp_container_table_row_extract(requests);
+    
+    DEBUGMSGTL(("internal:pgsnmpdConnectionsTable:_mfd_pgsnmpdConnectionsTable_object_lookup","called\n"));
+
+    /*
+     * get our context from mfd
+     * pgsnmpdConnectionsTable_interface_ctx *if_ctx =
+     *             (pgsnmpdConnectionsTable_interface_ctx *)reginfo->my_reg_void;
+     */
+
+    if(NULL == rowreq_ctx) {
+        netsnmp_request_set_error_all(requests, SNMP_ERR_NOCREATION);
+    }
+    else {
+        pgsnmpdConnectionsTable_row_prep(rowreq_ctx);
+    }
+
+    return SNMP_ERR_NOERROR;
+} /* _mfd_pgsnmpdConnectionsTable_object_lookup */
+
+/***********************************************************************
+ *
+ * GET processing
+ *
+ ***********************************************************************/
+/*
+ * @internal
+ * Retrieve the value for a particular column
+ */
+NETSNMP_STATIC_INLINE int
+_pgsnmpdConnectionsTable_get_column( pgsnmpdConnectionsTable_rowreq_ctx *rowreq_ctx,
+                       netsnmp_variable_list *var, int column )
+{
+    int rc = SNMPERR_SUCCESS;
+    
+    DEBUGMSGTL(("internal:pgsnmpdConnectionsTable:_mfd_pgsnmpdConnectionsTable_get_column","called\n"));
+
+
+    netsnmp_assert(NULL != rowreq_ctx);
+
+    switch(column) {
+
+     default:
+         snmp_log(LOG_ERR,"unknown column %d in _pgsnmpdConnectionsTable_get_column\n", column);
+         break;
+    }
+
+    return rc;
+} /* _pgsnmpdConnectionsTable_get_column */
+
+int
+_mfd_pgsnmpdConnectionsTable_get_values(netsnmp_mib_handler *handler,
+                         netsnmp_handler_registration *reginfo,
+                         netsnmp_agent_request_info *agtreq_info,
+                         netsnmp_request_info *requests)
+{
+    pgsnmpdConnectionsTable_rowreq_ctx *rowreq_ctx =
+                  netsnmp_container_table_row_extract(requests);
+    netsnmp_table_request_info * tri;
+    u_char                     * old_string;
+    void                      (*dataFreeHook)(void *);
+    int                        rc;
+
+    DEBUGMSGTL(("internal:pgsnmpdConnectionsTable:_mfd_pgsnmpdConnectionsTable_get_values","called\n"));
+
+    netsnmp_assert(NULL != rowreq_ctx);
+    
+    for(;requests; requests = requests->next) {
+        /*
+         * save old pointer, so we can free it if replaced
+         */
+        old_string = requests->requestvb->val.string;
+        dataFreeHook = requests->requestvb->dataFreeHook;
+        if(NULL == requests->requestvb->val.string) {
+            requests->requestvb->val.string = requests->requestvb->buf;
+            requests->requestvb->val_len = sizeof(requests->requestvb->buf);
+        }
+        else if(requests->requestvb->buf == requests->requestvb->val.string) {
+            if(requests->requestvb->val_len != sizeof(requests->requestvb->buf))
+                requests->requestvb->val_len = sizeof(requests->requestvb->buf);
+        }
+
+        /*
+         * get column data
+         */
+        tri = netsnmp_extract_table_info(requests);
+        if(NULL == tri)
+            continue;
+        
+        rc = _pgsnmpdConnectionsTable_get_column(rowreq_ctx, requests->requestvb, tri->colnum);
+        if(rc) {
+            if(MFD_SKIP == rc) {
+                requests->requestvb->type = ASN_PRIV_RETRY;
+                rc = SNMP_ERR_NOERROR;
+            }
+        }
+        else if (NULL == requests->requestvb->val.string) {
+            snmp_log(LOG_ERR,"NULL varbind data pointer!\n");
+            rc = SNMP_ERR_GENERR;
+        }
+        if(rc)
+            netsnmp_request_set_error(requests, SNMP_VALIDATE_ERR(rc));
+
+        /*
+         * if the buffer wasn't used previously for the old data (i.e. it
+         * was allcoated memory)  and the get routine replaced the pointer,
+         * we need to free the previous pointer.
+         */
+        if(old_string && (old_string != requests->requestvb->buf) &&
+           (requests->requestvb->val.string != old_string)) {
+            if(dataFreeHook)
+                (*dataFreeHook)(old_string);
+            else
+                free(old_string);
+        }
+    } /* for results */
+
+    return SNMP_ERR_NOERROR;
+} /* _mfd_pgsnmpdConnectionsTable_get_values */
+
+/***********************************************************************
+ *
+ * SET processing
+ *
+ ***********************************************************************/
+
+/*
+ * NOT APPLICABLE (per MIB or user setting)
+ */
+/***********************************************************************
+ *
+ * DATA ACCESS
+ *
+ ***********************************************************************/
+/**
+ * @internal
+ */
+static int
+_cache_load(netsnmp_cache *cache, void *vmagic)
+{
+    DEBUGMSGTL(("internal:pgsnmpdConnectionsTable:_cache_load","called\n"));
+
+    if((NULL == cache) || (NULL == cache->magic)) {
+        snmp_log(LOG_ERR, "invalid cache for pgsnmpdConnectionsTable_cache_load\n");
+        return -1;
+    }
+
+    /** should only be called for an invalid or expired cache */
+    netsnmp_assert((0 == cache->valid) || (1 == cache->expired));
+    
+    /*
+     * call user code
+     */
+    return pgsnmpdConnectionsTable_cache_load((netsnmp_container*)cache->magic);
+} /* _cache_load */
+
+/**
+ * @internal
+ */
+static void
+_cache_item_free(pgsnmpdConnectionsTable_rowreq_ctx *rowreq_ctx, void *context)
+{
+    DEBUGMSGTL(("internal:pgsnmpdConnectionsTable:_cache_item_free","called\n"));
+
+    if(NULL == rowreq_ctx)
+        return;
+
+    pgsnmpdConnectionsTable_release_rowreq_ctx(rowreq_ctx);
+} /* _cache_item_free */
+
+/**
+ * @internal
+ */
+static void
+_cache_free(netsnmp_cache *cache, void *magic)
+{
+    netsnmp_container *container;
+
+    DEBUGMSGTL(("internal:pgsnmpdConnectionsTable:_cache_free","called\n"));
+
+    if((NULL == cache) || (NULL == cache->magic)) {
+        snmp_log(LOG_ERR, "invalid cache in pgsnmpdConnectionsTable_cache_free\n");
+        return;
+    }
+
+    container = (netsnmp_container*)cache->magic;
+
+    /*
+     * call user code
+     */
+    pgsnmpdConnectionsTable_cache_free(container);
+    
+    /*
+     * free all items. inefficient, but easy.
+     */
+    CONTAINER_CLEAR(container,
+                    (netsnmp_container_obj_func *)_cache_item_free,
+                    NULL);
+} /* _cache_free */
+
+/**
+ * @internal
+ * initialize the iterator container with functions or wrappers
+ */
+void
+_pgsnmpdConnectionsTable_container_init(pgsnmpdConnectionsTable_interface_ctx *if_ctx)
+{
+    DEBUGMSGTL(("internal:pgsnmpdConnectionsTable:_pgsnmpdConnectionsTable_container_init","called\n"));
+    
+    /*
+     * set up the cache
+     */
+    if_ctx->cache = netsnmp_cache_create(30, /* timeout in seconds */
+                                         _cache_load, _cache_free,
+                                         pgsnmpdConnectionsTable_oid,
+                                         pgsnmpdConnectionsTable_oid_size);
+
+    if(NULL == if_ctx->cache) {
+        snmp_log(LOG_ERR, "error creating cache for pgsnmpdConnectionsTable\n");
+        return;
+    }
+
+    if_ctx->cache->flags = NETSNMP_CACHE_DONT_INVALIDATE_ON_SET;
+
+    pgsnmpdConnectionsTable_container_init(&if_ctx->container, if_ctx->cache);
+    if(NULL == if_ctx->container)
+        if_ctx->container = netsnmp_container_find("pgsnmpdConnectionsTable:table_container");
+    if(NULL == if_ctx->container) {
+        snmp_log(LOG_ERR,"error creating container in "
+                 "pgsnmpdConnectionsTable_container_init\n");
+        return;
+    }
+    if_ctx->cache->magic = (void*)if_ctx->container;
+} /* _pgsnmpdConnectionsTable_container_init */
+
diff --git a/PGSQL-MIB_src/pgsnmpdTables/pgsnmpdConnectionsTable_interface.h b/PGSQL-MIB_src/pgsnmpdTables/pgsnmpdConnectionsTable_interface.h
new file mode 100644 (file)
index 0000000..872beea
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ *       version : 1.43.2.3 $ of : mfd-interface.m2c,v $
+ *
+ * $Id: pgsnmpdConnectionsTable_interface.h,v 1.1 2007/10/30 11:44:41 eggyknap Exp $
+ */
+/** @defgroup interface: Routines to interface to Net-SNMP
+ *
+ * \warning This code should not be modified, called directly,
+ *          or used to interpret functionality. It is subject to
+ *          change at any time.
+ * 
+ * @{
+ */
+/*
+ * *********************************************************************
+ * *********************************************************************
+ * *********************************************************************
+ * ***                                                               ***
+ * ***  NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE  ***
+ * ***                                                               ***
+ * ***                                                               ***
+ * ***       THIS FILE DOES NOT CONTAIN ANY USER EDITABLE CODE.      ***
+ * ***                                                               ***
+ * ***                                                               ***
+ * ***       THE GENERATED CODE IS INTERNAL IMPLEMENTATION, AND      ***
+ * ***                                                               ***
+ * ***                                                               ***
+ * ***    IS SUBJECT TO CHANGE WITHOUT WARNING IN FUTURE RELEASES.   ***
+ * ***                                                               ***
+ * ***                                                               ***
+ * *********************************************************************
+ * *********************************************************************
+ * *********************************************************************
+ */
+#ifndef PGSNMPDCONNECTIONSTABLE_INTERFACE_H
+#define PGSNMPDCONNECTIONSTABLE_INTERFACE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#include "pgsnmpdConnectionsTable.h"
+
+/* ********************************************************************
+ * Table declarations
+ */
+
+/* PUBLIC interface initialization routine */
+void _pgsnmpdConnectionsTable_initialize_interface(pgsnmpdConnectionsTable_registration_ptr user_ctx,
+                                    u_long flags);
+
+    pgsnmpdConnectionsTable_rowreq_ctx * pgsnmpdConnectionsTable_allocate_rowreq_ctx(void);
+void pgsnmpdConnectionsTable_release_rowreq_ctx(pgsnmpdConnectionsTable_rowreq_ctx *rowreq_ctx);
+
+int pgsnmpdConnectionsTable_index_to_oid(netsnmp_index *oid_idx,
+                            pgsnmpdConnectionsTable_mib_index *mib_idx);
+int pgsnmpdConnectionsTable_index_from_oid(netsnmp_index *oid_idx,
+                              pgsnmpdConnectionsTable_mib_index *mib_idx);
+
+/*
+ * access to certain internals. use with caution!
+ */
+void pgsnmpdConnectionsTable_valid_columns_set(netsnmp_column_info *vc);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PGSNMPDCONNECTIONSTABLE_INTERFACE_H */
diff --git a/PGSQL-MIB_src/pgsnmpdTables/pgsnmpdConnectionsTable_oids.h b/PGSQL-MIB_src/pgsnmpdTables/pgsnmpdConnectionsTable_oids.h
new file mode 100644 (file)
index 0000000..9f8d9c6
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ *  : generic-table-oids.m2c,v 1.10 2004/10/08 23:39:17 rstory Exp $
+ *
+ * $Id: pgsnmpdConnectionsTable_oids.h,v 1.1 2007/10/30 11:44:41 eggyknap Exp $
+ */
+#ifndef PGSNMPDCONNECTIONSTABLE_OIDS_H
+#define PGSNMPDCONNECTIONSTABLE_OIDS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* column number definitions for table pgsnmpdConnectionsTable */
+#define PGSNMPDCONNECTIONSTABLE_OID              1,3,6,1,4,1,27645,1,1,1
+#define COLUMN_PGSNMPDCONNID           1
+#define COLUMN_PGSNMPDCONNHOST         2
+#define COLUMN_PGSNMPDCONNPORT         3
+#define COLUMN_PGSNMPDCONNDBNAME               4
+
+#define PGSNMPDCONNECTIONSTABLE_MIN_COL                
+#define PGSNMPDCONNECTIONSTABLE_MAX_COL                
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PGSNMPDCONNECTIONSTABLE_OIDS_H */
diff --git a/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAggregateTable/pgsqlPgAggregateTable.c b/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAggregateTable/pgsqlPgAggregateTable.c
new file mode 100644 (file)
index 0000000..5d427c0
--- /dev/null
@@ -0,0 +1,129 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ *       version : 1.32.2.3 $ of : mfd-top.m2c,v $ 
+ *
+ * $Id: pgsqlPgAggregateTable.c,v 1.1 2008/01/17 11:49:24 eggyknap Exp $
+ */
+/** \mainpage MFD helper for pgsqlPgAggregateTable
+ *
+ * \section intro Introduction
+ * Introductory text.
+ *
+ */
+/* standard Net-SNMP includes */
+#include <net-snmp/net-snmp-config.h>
+#include <net-snmp/net-snmp-includes.h>
+#include <net-snmp/agent/net-snmp-agent-includes.h>
+
+/* include our parent header */
+#include "pgsqlPgAggregateTable.h"
+
+#include <net-snmp/agent/mib_modules.h>
+
+#include "pgsqlPgAggregateTable_interface.h"
+
+oid pgsqlPgAggregateTable_oid[] = { PGSQLPGAGGREGATETABLE_OID };
+int pgsqlPgAggregateTable_oid_size = OID_LENGTH(pgsqlPgAggregateTable_oid);
+
+void initialize_table_pgsqlPgAggregateTable(void);
+
+
+/**
+ * Initializes the pgsqlPgAggregateTable module
+ */
+void
+init_pgsqlPgAggregateTable(void)
+{
+    DEBUGMSGTL(("verbose:pgsqlPgAggregateTable:init_pgsqlPgAggregateTable","called\n"));
+
+    /*
+     * TODO:300:o: Perform pgsqlPgAggregateTable one-time module initialization.
+     */
+     
+    /*
+     * here we initialize all the tables we're planning on supporting
+     */
+    if (should_init("pgsqlPgAggregateTable"))
+        initialize_table_pgsqlPgAggregateTable();
+
+} /* init_pgsqlPgAggregateTable */
+
+/**
+ * Initialize the table pgsqlPgAggregateTable 
+ *    (Define its contents and how it's structured)
+ */
+void
+initialize_table_pgsqlPgAggregateTable(void)
+{
+    pgsqlPgAggregateTable_registration_ptr user_context;
+    u_long flags;
+
+    DEBUGMSGTL(("verbose:pgsqlPgAggregateTable:initialize_table_pgsqlPgAggregateTable","called\n"));
+
+    /*
+     * TODO:301:o: Perform pgsqlPgAggregateTable one-time table initialization.
+     */
+
+    /*
+     * TODO:302:o: |->Initialize pgsqlPgAggregateTable user context
+     * if you'd like to pass in a pointer to some data for this
+     * table, allocate or set it up here.
+     */
+    /*
+     * a netsnmp_data_list is a simple way to store void pointers. A simple
+     * string token is used to add, find or remove pointers.
+     */
+    user_context = netsnmp_create_data_list("pgsqlPgAggregateTable", NULL, NULL);
+    
+    /*
+     * No support for any flags yet, but in the future you would
+     * set any flags here.
+     */
+    flags = 0;
+    
+    /*
+     * call interface initialization code
+     */
+    _pgsqlPgAggregateTable_initialize_interface(user_context, flags);
+} /* initialize_table_pgsqlPgAggregateTable */
+
+/**
+ * pre-request callback
+ *
+ *
+ * @retval MFD_SUCCESS              : success.
+ * @retval MFD_ERROR                : other error
+ */
+int
+pgsqlPgAggregateTable_pre_request(pgsqlPgAggregateTable_registration_ptr user_context)
+{
+    DEBUGMSGTL(("verbose:pgsqlPgAggregateTable:pgsqlPgAggregateTable_pre_request","called\n"));
+
+    /*
+     * TODO:510:o: Perform pgsqlPgAggregateTable pre-request actions.
+     */
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAggregateTable_pre_request */
+
+/**
+ * post-request callback
+ *
+ *
+ * @retval MFD_SUCCESS : success.
+ * @retval MFD_ERROR   : other error (ignored)
+ */
+int
+pgsqlPgAggregateTable_post_request(pgsqlPgAggregateTable_registration_ptr user_context)
+{
+    DEBUGMSGTL(("verbose:pgsqlPgAggregateTable:pgsqlPgAggregateTable_post_request","called\n"));
+
+    /*
+     * TODO:511:o: Perform pgsqlPgAggregateTable pos-request actions.
+     */
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAggregateTable_post_request */
+
+
+/** @{ */
diff --git a/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAggregateTable/pgsqlPgAggregateTable.h b/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAggregateTable/pgsqlPgAggregateTable.h
new file mode 100644 (file)
index 0000000..18c7e4d
--- /dev/null
@@ -0,0 +1,221 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ *       version : 1.32.2.3 $ of : mfd-top.m2c,v $
+ *
+ * $Id: pgsqlPgAggregateTable.h,v 1.1 2008/01/17 11:49:24 eggyknap Exp $
+ */
+#ifndef PGSQLPGAGGREGATETABLE_H
+#define PGSQLPGAGGREGATETABLE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/** @defgroup misc misc: Miscelaneous routines
+ *
+ * @{
+ */
+#include <net-snmp/library/asn1.h>
+
+/* other required module components */
+    /* *INDENT-OFF*  */
+config_require(PGSQL-MIB/pgsqlPgAggregateTable/pgsqlPgAggregateTable_interface);
+config_require(PGSQL-MIB/pgsqlPgAggregateTable/pgsqlPgAggregateTable_data_access);
+config_require(PGSQL-MIB/pgsqlPgAggregateTable/pgsqlPgAggregateTable_data_get);
+config_require(PGSQL-MIB/pgsqlPgAggregateTable/pgsqlPgAggregateTable_data_set);
+    /* *INDENT-ON*  */
+
+/* OID and column number definitions for  */
+#include "pgsqlPgAggregateTable_oids.h"
+
+/* enum definions */
+#include "pgsqlPgAggregateTable_enums.h"
+
+/* *********************************************************************
+ * function declarations
+ */
+void init_pgsqlPgAggregateTable(void);
+
+/* *********************************************************************
+ * Table declarations
+ */
+/**********************************************************************
+ **********************************************************************
+ ***
+ *** Table pgsqlPgAggregateTable
+ ***
+ **********************************************************************
+ **********************************************************************/
+/*
+ * pgsqlPgAggregateTable is subid 1 of pgsqlCatalogTables.
+ * Its status is Current.
+ * OID: .1.3.6.1.4.1.27645.1.2.1, length: 10
+*/
+/* *********************************************************************
+ * When you register your mib, you get to provide a generic
+ * pointer that will be passed back to you for most of the
+ * functions calls.
+ *
+ * TODO:100:r: Review all context structures
+ */
+    /*
+     * TODO:101:o: |-> Review pgsqlPgAggregateTable registration context.
+     */
+typedef netsnmp_data_list * pgsqlPgAggregateTable_registration_ptr;
+
+/**********************************************************************/
+/*
+ * TODO:110:r: |-> Review pgsqlPgAggregateTable data context structure.
+ * This structure is used to represent the data for pgsqlPgAggregateTable.
+ */
+/*
+ * This structure contains storage for all the columns defined in the
+ * pgsqlPgAggregateTable.
+ */
+typedef struct pgsqlPgAggregateTable_data_s {
+    
+        /*
+         * pgsqlPgAggregateAggfnoid(2)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h
+         */
+   long   pgsqlPgAggregateAggfnoid;
+    
+        /*
+         * pgsqlPgAggregateAggtransfn(3)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h
+         */
+   long   pgsqlPgAggregateAggtransfn;
+    
+        /*
+         * pgsqlPgAggregateAggfinalfn(4)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h
+         */
+   long   pgsqlPgAggregateAggfinalfn;
+    
+        /*
+         * pgsqlPgAggregateAggsortop(5)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h
+         */
+   long   pgsqlPgAggregateAggsortop;
+    
+        /*
+         * pgsqlPgAggregateAggtranstype(6)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h
+         */
+   long   pgsqlPgAggregateAggtranstype;
+    
+        /*
+         * pgsqlPgAggregateAgginitval(7)/DisplayString/ASN_OCTET_STR/char(char)//L/A/w/e/R/d/H
+         */
+   char   pgsqlPgAggregateAgginitval[255];
+size_t      pgsqlPgAggregateAgginitval_len; /* # of char elements, not bytes */
+    
+} pgsqlPgAggregateTable_data;
+
+
+/*
+ * TODO:120:r: |-> Review pgsqlPgAggregateTable mib index.
+ * This structure is used to represent the index for pgsqlPgAggregateTable.
+ */
+typedef struct pgsqlPgAggregateTable_mib_index_s {
+
+        /*
+         * pgsnmpdConnID(1)/DisplayString/ASN_OCTET_STR/char(char)//L/a/w/e/R/d/H
+         */
+        /** 128 - 2(other indexes) - oid length(12) = 113 */
+   char   pgsnmpdConnID[113];
+   size_t      pgsnmpdConnID_len;
+
+        /*
+         * rdbmsDbIndex(1)/INTEGER/ASN_INTEGER/long(long)//l/a/w/e/R/d/h
+         */
+   long   rdbmsDbIndex;
+
+        /*
+         * pgsqlPgAggregateEntryOID(1)/INTEGER/ASN_INTEGER/long(long)//l/a/w/e/r/d/h
+         */
+   long   pgsqlPgAggregateEntryOID;
+
+
+} pgsqlPgAggregateTable_mib_index;
+
+    /*
+     * TODO:121:r: |   |-> Review pgsqlPgAggregateTable max index length.
+     * If you KNOW that your indexes will never exceed a certain
+     * length, update this macro to that length.
+     *
+     * BE VERY CAREFUL TO TAKE INTO ACCOUNT THE MAXIMUM
+     * POSSIBLE LENGHT FOR EVERY VARIABLE LENGTH INDEX!
+     * Guessing 128 - col/entry(2)  - oid len(10)
+*/
+#define MAX_pgsqlPgAggregateTable_IDX_LEN     116
+
+
+/* *********************************************************************
+ * TODO:130:o: |-> Review pgsqlPgAggregateTable Row request (rowreq) context.
+ * When your functions are called, you will be passed a
+ * pgsqlPgAggregateTable_rowreq_ctx pointer.
+ */
+typedef struct pgsqlPgAggregateTable_rowreq_ctx_s {
+
+    /** this must be first for container compare to work */
+    netsnmp_index        oid_idx;
+    oid                  oid_tmp[MAX_pgsqlPgAggregateTable_IDX_LEN];
+    
+    pgsqlPgAggregateTable_mib_index        tbl_idx;
+    
+    pgsqlPgAggregateTable_data              data;
+
+    /*
+     * flags per row. Currently, the first (lower) 8 bits are reserved
+     * for the user. See mfd.h for other flags.
+     */
+    u_int                       rowreq_flags;
+
+    /*
+     * implementor's context pointer (provided during registration)
+     */
+    pgsqlPgAggregateTable_registration_ptr pgsqlPgAggregateTable_reg;
+
+    /*
+     * TODO:131:o: |   |-> Add useful data to pgsqlPgAggregateTable rowreq context.
+     */
+    
+    /*
+     * storage for future expansion
+     */
+    netsnmp_data_list             *pgsqlPgAggregateTable_data_list;
+
+} pgsqlPgAggregateTable_rowreq_ctx;
+
+typedef struct pgsqlPgAggregateTable_ref_rowreq_ctx_s {
+    pgsqlPgAggregateTable_rowreq_ctx *rowreq_ctx;
+} pgsqlPgAggregateTable_ref_rowreq_ctx;
+
+/* *********************************************************************
+ * function prototypes
+ */
+    int pgsqlPgAggregateTable_pre_request(pgsqlPgAggregateTable_registration_ptr user_context);
+    int pgsqlPgAggregateTable_post_request(pgsqlPgAggregateTable_registration_ptr user_context);
+
+
+extern oid pgsqlPgAggregateTable_oid[];
+extern int pgsqlPgAggregateTable_oid_size;
+
+
+#include "pgsqlPgAggregateTable_interface.h"
+#include "pgsqlPgAggregateTable_data_access.h"
+#include "pgsqlPgAggregateTable_data_get.h"
+#include "pgsqlPgAggregateTable_data_set.h"
+
+/*
+ * DUMMY markers, ignore
+ *
+ * TODO:099:x: *************************************************************
+ * TODO:199:x: *************************************************************
+ * TODO:299:x: *************************************************************
+ * TODO:399:x: *************************************************************
+ * TODO:499:x: *************************************************************
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PGSQLPGAGGREGATETABLE_H */
diff --git a/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAggregateTable/pgsqlPgAggregateTable_data_access.c b/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAggregateTable/pgsqlPgAggregateTable_data_access.c
new file mode 100644 (file)
index 0000000..2f55780
--- /dev/null
@@ -0,0 +1,297 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ *       version : 1.12 $ of : mfd-data-access.m2c,v $ 
+ *
+ * $Id: pgsqlPgAggregateTable_data_access.c,v 1.2 2008/01/17 12:29:36 eggyknap Exp $
+ */
+#include "pgsnmpd.h"
+
+/* include our parent header */
+#include "pgsqlPgAggregateTable.h"
+#include "pgsqlPgAggregateTable_data_access.h"
+
+/** @defgroup data_access data_access: Routines to access data
+ *
+ * These routines are used to locate the data used to satisfy
+ * requests.
+ * 
+ * @{
+ */
+/**********************************************************************
+ **********************************************************************
+ ***
+ *** Table pgsqlPgAggregateTable
+ ***
+ **********************************************************************
+ **********************************************************************/
+/*
+ * pgsqlPgAggregateTable is subid 1 of pgsqlCatalogTables.
+ * Its status is Current.
+ * OID: .1.3.6.1.4.1.27645.1.2.1, length: 10
+*/
+
+/**
+ * initialization for pgsqlPgAggregateTable data access
+ *
+ * This function is called during startup to allow you to
+ * allocate any resources you need for the data table.
+ *
+ * @param pgsqlPgAggregateTable_reg
+ *        Pointer to pgsqlPgAggregateTable_registration
+ *
+ * @retval MFD_SUCCESS : success.
+ * @retval MFD_ERROR   : unrecoverable error.
+ */
+int
+pgsqlPgAggregateTable_init_data(pgsqlPgAggregateTable_registration_ptr pgsqlPgAggregateTable_reg)
+{
+    DEBUGMSGTL(("verbose:pgsqlPgAggregateTable:pgsqlPgAggregateTable_init_data","called\n"));
+
+    /*
+     * TODO:303:o: Initialize pgsqlPgAggregateTable data.
+     */
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAggregateTable_init_data */
+
+/**
+ * container-cached overview
+ *
+ */
+
+/***********************************************************************
+ *
+ * cache
+ *
+ ***********************************************************************/
+/**
+ * container initialization
+ *
+ * @param container_ptr_ptr A pointer to a container pointer. If you
+ *        create a custom container, use this parameter to return it
+ *        to the MFD helper. If set to NULL, the MFD helper will
+ *        allocate a container for you.
+ * @param  cache A pointer to a cache structure. You can set the timeout
+ *         and other cache flags using this pointer.
+ *
+ *  This function is called at startup to allow you to customize certain
+ *  aspects of the access method. For the most part, it is for advanced
+ *  users. The default code should suffice for most cases. If no custom
+ *  container is allocated, the MFD code will create one for your.
+ *
+ *  This is also the place to set up cache behavior. The default, to
+ *  simply set the cache timeout, will work well with the default
+ *  container. If you are using a custom container, you may want to
+ *  look at the cache helper documentation to see if there are any
+ *  flags you want to set.
+ *
+ * @remark
+ *  This would also be a good place to do any initialization needed
+ *  for you data source. For example, opening a connection to another
+ *  process that will supply the data, opening a database, etc.
+ */
+void
+pgsqlPgAggregateTable_container_init(netsnmp_container **container_ptr_ptr,
+                        netsnmp_cache *cache)
+{
+    DEBUGMSGTL(("verbose:pgsqlPgAggregateTable:pgsqlPgAggregateTable_container_init","called\n"));
+    
+    if((NULL == cache) || (NULL == container_ptr_ptr)) {
+        snmp_log(LOG_ERR,"bad params to pgsqlPgAggregateTable_container_init\n");
+        return;
+    }
+
+    /*
+     * For advanced users, you can use a custom container. If you
+     * do not create one, one will be created for you.
+     */
+    *container_ptr_ptr = NULL;
+
+    /*
+     * TODO:345:A: Set up pgsqlPgAggregateTable cache properties.
+     *
+     * Also for advanced users, you can set parameters for the
+     * cache. Do not change the magic pointer, as it is used
+     * by the MFD helper. To completely disable caching, set
+     * cache->enabled to 0.
+     */
+    cache->timeout = PGSQLPGAGGREGATETABLE_CACHE_TIMEOUT; /* seconds */
+} /* pgsqlPgAggregateTable_container_init */
+
+/**
+ * load cache data
+ *
+ * TODO:350:M: Implement pgsqlPgAggregateTable cache load
+ *
+ * @param container container to which items should be inserted
+ *
+ * @retval MFD_SUCCESS              : success.
+ * @retval MFD_RESOURCE_UNAVAILABLE : Can't access data source
+ * @retval MFD_ERROR                : other error.
+ *
+ *  This function is called to cache the index(es) (and data, optionally)
+ *  for the every row in the data set.
+ *
+ * @remark
+ *  While loading the cache, the only important thing is the indexes.
+ *  If access to your data is cheap/fast (e.g. you have a pointer to a
+ *  structure in memory), it would make sense to update the data here.
+ *  If, however, the accessing the data invovles more work (e.g. parsing
+ *  some other existing data, or peforming calculations to derive the data),
+ *  then you can limit yourself to setting the indexes and saving any
+ *  information you will need later. Then use the saved information in
+ *  pgsqlPgAggregateTable_row_prep() for populating data.
+ *
+ * @note
+ *  If you need consistency between rows (like you want statistics
+ *  for each row to be from the same time frame), you should set all
+ *  data here.
+ *
+ */
+int
+pgsqlPgAggregateTable_cache_load(netsnmp_container *container)
+{
+    pgsqlPgAggregateTable_rowreq_ctx *rowreq_ctx;
+    size_t                 count = 0;
+    
+   char   pgsnmpdConnID[112] = "Default conn ID";
+   size_t      pgsnmpdConnID_len = strlen(pgsnmpdConnID);
+   long   rdbmsDbIndex = 1;
+   int i, resultCount, tmpInt;
+   char *tmpString;
+   PGresult *pg_db_qry;
+
+snmp_log(LOG_INFO, "Running pgsqlPgAggregateTable\n");
+   if (PQstatus(dbconn) == CONNECTION_OK) 
+          pg_db_qry = PQexec(dbconn, "SELECT aggfnoid::INTEGER, aggfnoid, aggtransfn, aggfinalfn, aggsortop, aggtranstype, agginitval FROM pg_aggregate ORDER BY 1 ASC");
+       else {
+               snmp_log(LOG_ERR, "Can't get connected to database\n");
+               return MFD_RESOURCE_UNAVAILABLE;
+       }
+
+    DEBUGMSGTL(("verbose:pgsqlPgAggregateTable:pgsqlPgAggregateTable_cache_load","called\n"));
+
+       if (PQresultStatus(pg_db_qry) != PGRES_TUPLES_OK) {
+               snmp_log(LOG_ERR, "Didn't get any results from the database\n");
+               PQclear(pg_db_qry);
+               return MFD_RESOURCE_UNAVAILABLE;
+       }
+    resultCount = PQntuples(pg_db_qry);
+
+    /*
+     * TODO:351:M: |-> Load/update data in the pgsqlPgAggregateTable container.
+     * loop over your pgsqlPgAggregateTable data, allocate a rowreq context,
+     * set the index(es) [and data, optionally] and insert into
+     * the container.
+     */
+    for (i = 0; i < resultCount; i++) {
+
+        /*
+         * TODO:352:M: |   |-> set indexes in new pgsqlPgAggregateTable rowreq context.
+         */
+        rowreq_ctx = pgsqlPgAggregateTable_allocate_rowreq_ctx();
+        if (NULL == rowreq_ctx) {
+            snmp_log(LOG_ERR, "memory allocation failed\n");
+            return MFD_RESOURCE_UNAVAILABLE;
+        }
+        if(MFD_SUCCESS != pgsqlPgAggregateTable_indexes_set(rowreq_ctx
+                               , pgsnmpdConnID, pgsnmpdConnID_len
+                               , rdbmsDbIndex
+                               , atol(PQgetvalue(pg_db_qry, i, 0))
+               )) {
+            snmp_log(LOG_ERR,"error setting index while loading "
+                     "pgsqlPgAggregateTable cache.\n");
+            pgsqlPgAggregateTable_release_rowreq_ctx(rowreq_ctx);
+            continue;
+        }
+       rowreq_ctx->data.pgsqlPgAggregateAgginitval_len = 255;
+
+    rowreq_ctx->data.pgsqlPgAggregateAggfnoid = strtoul(PQgetvalue(pg_db_qry, i, 1), NULL, 10);
+    
+    rowreq_ctx->data.pgsqlPgAggregateAggtransfn = strtoul(PQgetvalue(pg_db_qry, i, 2), NULL, 10);
+    
+    rowreq_ctx->data.pgsqlPgAggregateAggfinalfn = strtoul(PQgetvalue(pg_db_qry, i, 3), NULL, 10);
+    
+    rowreq_ctx->data.pgsqlPgAggregateAggsortop = strtoul(PQgetvalue(pg_db_qry, i, 4), NULL, 10);
+    
+    rowreq_ctx->data.pgsqlPgAggregateAggtranstype = strtoul(PQgetvalue(pg_db_qry, i, 5), NULL, 10);
+
+    tmpString = PQgetvalue(pg_db_qry, i, 6);
+    tmpInt = strlen(tmpString);
+    if ((NULL == rowreq_ctx->data.pgsqlPgAggregateAgginitval) ||
+        (rowreq_ctx->data.pgsqlPgAggregateAgginitval_len < (tmpInt * sizeof(rowreq_ctx->data.pgsqlPgAggregateAgginitval[0])))) {
+        snmp_log(LOG_ERR,"not enough space for value\n");
+        return MFD_ERROR;
+    }
+    rowreq_ctx->data.pgsqlPgAggregateAgginitval_len = tmpInt * sizeof(rowreq_ctx->data.pgsqlPgAggregateAgginitval[0]);
+    memcpy( rowreq_ctx->data.pgsqlPgAggregateAgginitval, tmpString, rowreq_ctx->data.pgsqlPgAggregateAgginitval_len );
+    
+        
+        /*
+         * insert into table container
+         */
+        CONTAINER_INSERT(container, rowreq_ctx);
+        ++count;
+    }
+
+
+    DEBUGMSGT(("verbose:pgsqlPgAggregateTable:pgsqlPgAggregateTable_cache_load",
+               "inserted %d records\n", count));
+    PQclear(pg_db_qry);
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAggregateTable_cache_load */
+
+/**
+ * cache clean up
+ *
+ * @param container container with all current items
+ *
+ *  This optional callback is called prior to all
+ *  item's being removed from the container. If you
+ *  need to do any processing before that, do it here.
+ *
+ * @note
+ *  The MFD helper will take care of releasing all the row contexts.
+ *
+ */
+void
+pgsqlPgAggregateTable_cache_free(netsnmp_container *container)
+{
+    DEBUGMSGTL(("verbose:pgsqlPgAggregateTable:pgsqlPgAggregateTable_cache_free","called\n"));
+
+    /*
+     * TODO:380:M: Free pgsqlPgAggregateTable cache.
+     */
+} /* pgsqlPgAggregateTable_cache_free */
+
+/**
+ * prepare row for processing.
+ *
+ *  When the agent has located the row for a request, this function is
+ *  called to prepare the row for processing. If you fully populated
+ *  the data context during the index setup phase, you may not need to
+ *  do anything.
+ *
+ * @param rowreq_ctx pointer to a context.
+ *
+ * @retval MFD_SUCCESS     : success.
+ * @retval MFD_ERROR       : other error.
+ */
+int
+pgsqlPgAggregateTable_row_prep( pgsqlPgAggregateTable_rowreq_ctx *rowreq_ctx)
+{
+    DEBUGMSGTL(("verbose:pgsqlPgAggregateTable:pgsqlPgAggregateTable_row_prep","called\n"));
+
+    netsnmp_assert(NULL != rowreq_ctx);
+
+    /*
+     * TODO:390:o: Prepare row for request.
+     * If populating row data was delayed, this is the place to
+     * fill in the row for this request.
+     */
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAggregateTable_row_prep */
+
+/** @} */
diff --git a/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAggregateTable/pgsqlPgAggregateTable_data_access.h b/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAggregateTable/pgsqlPgAggregateTable_data_access.h
new file mode 100644 (file)
index 0000000..6831083
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ *       version : 1.12 $ of : mfd-data-access.m2c,v $
+ *
+ * $Id: pgsqlPgAggregateTable_data_access.h,v 1.1 2008/01/17 11:49:24 eggyknap Exp $
+ */
+#ifndef PGSQLPGAGGREGATETABLE_DATA_ACCESS_H
+#define PGSQLPGAGGREGATETABLE_DATA_ACCESS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* *********************************************************************
+ * function declarations
+ */
+
+/* *********************************************************************
+ * Table declarations
+ */
+/**********************************************************************
+ **********************************************************************
+ ***
+ *** Table pgsqlPgAggregateTable
+ ***
+ **********************************************************************
+ **********************************************************************/
+/*
+ * pgsqlPgAggregateTable is subid 1 of pgsqlCatalogTables.
+ * Its status is Current.
+ * OID: .1.3.6.1.4.1.27645.1.2.1, length: 10
+*/
+
+
+    int pgsqlPgAggregateTable_init_data(pgsqlPgAggregateTable_registration_ptr pgsqlPgAggregateTable_reg);
+
+
+/*
+ * TODO:180:o: Review pgsqlPgAggregateTable cache timeout.
+ * The number of seconds before the cache times out
+ */
+#define PGSQLPGAGGREGATETABLE_CACHE_TIMEOUT   60
+
+void pgsqlPgAggregateTable_container_init(netsnmp_container **container_ptr_ptr,
+                             netsnmp_cache *cache);
+int pgsqlPgAggregateTable_cache_load(netsnmp_container *container);
+void pgsqlPgAggregateTable_cache_free(netsnmp_container *container);
+
+    /*
+    ***************************************************
+    ***             START EXAMPLE CODE              ***
+    ***---------------------------------------------***/
+/* *********************************************************************
+ * Since we have no idea how you really access your data, we'll go with
+ * a worst case example: a flat text file.
+ */
+#define MAX_LINE_SIZE 256
+    /*
+    ***---------------------------------------------***
+    ***              END  EXAMPLE CODE              ***
+    ***************************************************/
+    int pgsqlPgAggregateTable_row_prep( pgsqlPgAggregateTable_rowreq_ctx *rowreq_ctx);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PGSQLPGAGGREGATETABLE_DATA_ACCESS_H */
diff --git a/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAggregateTable/pgsqlPgAggregateTable_data_get.c b/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAggregateTable/pgsqlPgAggregateTable_data_get.c
new file mode 100644 (file)
index 0000000..c156328
--- /dev/null
@@ -0,0 +1,839 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ *       version : 1.18.2.1 $ of : mfd-data-get.m2c,v $ 
+ *
+ * $Id: pgsqlPgAggregateTable_data_get.c,v 1.1 2008/01/17 11:49:24 eggyknap Exp $
+ */
+/* standard Net-SNMP includes */
+#include <net-snmp/net-snmp-config.h>
+#include <net-snmp/net-snmp-includes.h>
+#include <net-snmp/agent/net-snmp-agent-includes.h>
+
+/* include our parent header */
+#include "pgsqlPgAggregateTable.h"
+
+
+/** @defgroup data_get data_get: Routines to get data
+ *
+ * TODO:230:M: Implement pgsqlPgAggregateTable get routines.
+ * TODO:240:M: Implement pgsqlPgAggregateTable mapping routines (if any).
+ *
+ * These routine are used to get the value for individual objects. The
+ * row context is passed, along with a pointer to the memory where the
+ * value should be copied.
+ *
+ * @{
+ */
+/**********************************************************************
+ **********************************************************************
+ ***
+ *** Table pgsqlPgAggregateTable
+ ***
+ **********************************************************************
+ **********************************************************************/
+/*
+ * pgsqlPgAggregateTable is subid 1 of pgsqlCatalogTables.
+ * Its status is Current.
+ * OID: .1.3.6.1.4.1.27645.1.2.1, length: 10
+*/
+
+/* ---------------------------------------------------------------------
+ * TODO:200:r: Implement pgsqlPgAggregateTable data context functions.
+ */
+
+/*---------------------------------------------------------------------
+ * PGSQL-MIB::pgsnmpdConnectionEntry.pgsnmpdConnID
+ * pgsnmpdConnID is subid 1 of pgsnmpdConnectionEntry.
+ * Its status is Current, and its access level is NoAccess.
+ * OID: .1.3.6.1.4.1.27645.1.1.1.1.1
+ * Description:
+Identifying string for this connection. Default is host:port:database.
+ *
+ * Attributes:
+ *   accessible 0     isscalar 0     enums  0      hasdefval 0
+ *   readable   0     iscolumn 1     ranges 1      hashint   1
+ *   settable   0
+ *   hint: 255a
+ *
+ * Ranges:  0 - 255;
+ *
+ * Its syntax is DisplayString (based on perltype OCTETSTR)
+ * The net-snmp type is ASN_OCTET_STR. The C type decl is char (char)
+ * This data type requires a length.  (Max 255)
+ *
+ *
+ *
+ * NOTE: NODE pgsnmpdConnID IS NOT ACCESSIBLE
+ *
+ *
+ */
+/**
+ * map a value from its original native format to the MIB format.
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_ERROR           : Any other error
+ *
+ * @note parameters follow the memset convention (dest, src).
+ *
+ * @note generation and use of this function can be turned off by re-running
+ * mib2c after adding the following line to the file
+ * default-node-pgsnmpdConnID.m2d :
+ *   @eval $m2c_node_skip_mapping = 1@
+ *
+ * @remark
+ *  If the values for your data type don't exactly match the
+ *  possible values defined by the mib, you should map them here.
+ *  Otherwise, just do a direct copy.
+ */
+int
+pgsnmpdConnID_map(char **mib_pgsnmpdConnID_val_ptr_ptr, size_t *mib_pgsnmpdConnID_val_ptr_len_ptr, char *raw_pgsnmpdConnID_val_ptr, size_t raw_pgsnmpdConnID_val_ptr_len, int allow_realloc)
+{
+    int converted_len;
+
+    netsnmp_assert(NULL != raw_pgsnmpdConnID_val_ptr);
+    netsnmp_assert((NULL != mib_pgsnmpdConnID_val_ptr_ptr) && (NULL != mib_pgsnmpdConnID_val_ptr_len_ptr));
+    
+    DEBUGMSGTL(("verbose:pgsqlPgAggregateTable:pgsnmpdConnID_map","called\n"));
+    
+    /*
+     * TODO:241:r: |-> Implement pgsnmpdConnID non-integer mapping
+     * it is hard to autogenerate code for mapping types that are not simple
+     * integers, so here is an idea of what you might need to do. It will
+     * probably need some tweaking to get right.
+     */
+    /*
+     * if the length of the raw data doesn't directly correspond with
+     * the length of the mib data, set converted_len to the
+     * space required.
+     */
+    converted_len = raw_pgsnmpdConnID_val_ptr_len; /* assume equal */
+    if((NULL == *mib_pgsnmpdConnID_val_ptr_ptr) || (*mib_pgsnmpdConnID_val_ptr_len_ptr < converted_len)) {
+        if(! allow_realloc) {
+            snmp_log(LOG_ERR,"not enough space for value mapping\n");
+            return SNMP_ERR_GENERR;
+        }
+        *mib_pgsnmpdConnID_val_ptr_ptr = realloc( *mib_pgsnmpdConnID_val_ptr_ptr, converted_len * sizeof(**mib_pgsnmpdConnID_val_ptr_ptr));
+        if(NULL == *mib_pgsnmpdConnID_val_ptr_ptr) {
+            snmp_log(LOG_ERR,"could not allocate memory\n");
+            return SNMP_ERR_GENERR;
+        }
+    }
+    *mib_pgsnmpdConnID_val_ptr_len_ptr = converted_len;
+    memcpy( *mib_pgsnmpdConnID_val_ptr_ptr, raw_pgsnmpdConnID_val_ptr, converted_len );
+
+    return MFD_SUCCESS;
+} /* pgsnmpdConnID_map */
+
+
+/*---------------------------------------------------------------------
+ * PGSQL-MIB::pgsqlPgAggregateEntry.pgsqlPgAggregateEntryOID
+ * pgsqlPgAggregateEntryOID is subid 1 of pgsqlPgAggregateEntry.
+ * Its status is Current, and its access level is NoAccess.
+ * OID: .1.3.6.1.4.1.27645.1.2.1.1.1
+ * Description:
+OID of this entry
+ *
+ * Attributes:
+ *   accessible 0     isscalar 0     enums  0      hasdefval 0
+ *   readable   0     iscolumn 1     ranges 0      hashint   0
+ *   settable   0
+ *
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ *
+ *
+ *
+ * NOTE: NODE pgsqlPgAggregateEntryOID IS NOT ACCESSIBLE
+ *
+ *
+ */
+/**
+ * map a value from its original native format to the MIB format.
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_ERROR           : Any other error
+ *
+ * @note parameters follow the memset convention (dest, src).
+ *
+ * @note generation and use of this function can be turned off by re-running
+ * mib2c after adding the following line to the file
+ * default-node-pgsqlPgAggregateEntryOID.m2d :
+ *   @eval $m2c_node_skip_mapping = 1@
+ *
+ * @remark
+ *  If the values for your data type don't exactly match the
+ *  possible values defined by the mib, you should map them here.
+ *  Otherwise, just do a direct copy.
+ */
+int
+pgsqlPgAggregateEntryOID_map(long *mib_pgsqlPgAggregateEntryOID_val_ptr, long raw_pgsqlPgAggregateEntryOID_val)
+{
+    netsnmp_assert(NULL != mib_pgsqlPgAggregateEntryOID_val_ptr);
+    
+    DEBUGMSGTL(("verbose:pgsqlPgAggregateTable:pgsqlPgAggregateEntryOID_map","called\n"));
+    
+    /*
+     * TODO:241:o: |-> Implement pgsqlPgAggregateEntryOID mapping.
+     * If the values for your data type don't exactly match the
+     * possible values defined by the mib, you should map them here.
+     */
+    (*mib_pgsqlPgAggregateEntryOID_val_ptr) = raw_pgsqlPgAggregateEntryOID_val;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAggregateEntryOID_map */
+
+
+/**
+ * set mib index(es)
+ *
+ * @param tbl_idx mib index structure
+ *
+ * @retval MFD_SUCCESS     : success.
+ * @retval MFD_ERROR       : other error.
+ *
+ * @remark
+ *  This convenience function is useful for setting all the MIB index
+ *  components with a single function call. It is assume that the C values
+ *  have already been mapped from their native/rawformat to the MIB format.
+ */
+int
+pgsqlPgAggregateTable_indexes_set_tbl_idx(pgsqlPgAggregateTable_mib_index *tbl_idx, char *pgsnmpdConnID_val_ptr,  size_t pgsnmpdConnID_val_ptr_len, long rdbmsDbIndex_val, long pgsqlPgAggregateEntryOID_val)
+{
+    DEBUGMSGTL(("verbose:pgsqlPgAggregateTable:pgsqlPgAggregateTable_indexes_set_tbl_idx","called\n"));
+
+    /* pgsnmpdConnID(1)/DisplayString/ASN_OCTET_STR/char(char)//L/a/w/e/R/d/H */
+     tbl_idx->pgsnmpdConnID_len = sizeof(tbl_idx->pgsnmpdConnID);
+    /*
+     * make sure there is enough space for pgsnmpdConnID data
+     */
+    if ((NULL == tbl_idx->pgsnmpdConnID) ||
+        (tbl_idx->pgsnmpdConnID_len < (pgsnmpdConnID_val_ptr_len * sizeof(tbl_idx->pgsnmpdConnID[0])))) {
+        snmp_log(LOG_ERR,"not enough space for value\n");
+        return MFD_ERROR;
+    }
+    tbl_idx->pgsnmpdConnID_len = pgsnmpdConnID_val_ptr_len * sizeof(tbl_idx->pgsnmpdConnID[0]);
+    memcpy( tbl_idx->pgsnmpdConnID, pgsnmpdConnID_val_ptr, tbl_idx->pgsnmpdConnID_len );
+    
+    /* rdbmsDbIndex(1)/INTEGER/ASN_INTEGER/long(long)//l/a/w/e/R/d/h */
+    tbl_idx->rdbmsDbIndex = rdbmsDbIndex_val;
+    
+    /* pgsqlPgAggregateEntryOID(1)/INTEGER/ASN_INTEGER/long(long)//l/a/w/e/r/d/h */
+    tbl_idx->pgsqlPgAggregateEntryOID = pgsqlPgAggregateEntryOID_val;
+    
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAggregateTable_indexes_set_tbl_idx */
+
+/**
+ * @internal
+ * set row context indexes
+ *
+ * @param reqreq_ctx the row context that needs updated indexes
+ *
+ * @retval MFD_SUCCESS     : success.
+ * @retval MFD_ERROR       : other error.
+ *
+ * @remark
+ *  This function sets the mib indexs, then updates the oid indexs
+ *  from the mib index.
+ */
+int
+pgsqlPgAggregateTable_indexes_set(pgsqlPgAggregateTable_rowreq_ctx *rowreq_ctx, char *pgsnmpdConnID_val_ptr,  size_t pgsnmpdConnID_val_ptr_len, long rdbmsDbIndex_val, long pgsqlPgAggregateEntryOID_val)
+{
+    DEBUGMSGTL(("verbose:pgsqlPgAggregateTable:pgsqlPgAggregateTable_indexes_set","called\n"));
+
+    if(MFD_SUCCESS != pgsqlPgAggregateTable_indexes_set_tbl_idx(&rowreq_ctx->tbl_idx
+                                   , pgsnmpdConnID_val_ptr, pgsnmpdConnID_val_ptr_len
+                                   , rdbmsDbIndex_val
+                                   , pgsqlPgAggregateEntryOID_val
+           ))
+        return MFD_ERROR;
+
+    /*
+     * convert mib index to oid index
+     */
+    rowreq_ctx->oid_idx.len = sizeof(rowreq_ctx->oid_tmp) / sizeof(oid);
+    if(0 != pgsqlPgAggregateTable_index_to_oid(&rowreq_ctx->oid_idx,
+                                    &rowreq_ctx->tbl_idx)) {
+        return MFD_ERROR;
+    }
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAggregateTable_indexes_set */
+
+
+/*---------------------------------------------------------------------
+ * PGSQL-MIB::pgsqlPgAggregateEntry.pgsqlPgAggregateAggfnoid
+ * pgsqlPgAggregateAggfnoid is subid 2 of pgsqlPgAggregateEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.4.1.27645.1.2.1.1.2
+ * Description:
+pg_proc OID of the aggregate function
+ *
+ * Attributes:
+ *   accessible 1     isscalar 0     enums  0      hasdefval 0
+ *   readable   1     iscolumn 1     ranges 0      hashint   0
+ *   settable   0
+ *
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ */
+/**
+ * map a value from its original native format to the MIB format.
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_ERROR           : Any other error
+ *
+ * @note parameters follow the memset convention (dest, src).
+ *
+ * @note generation and use of this function can be turned off by re-running
+ * mib2c after adding the following line to the file
+ * default-node-pgsqlPgAggregateAggfnoid.m2d :
+ *   @eval $m2c_node_skip_mapping = 1@
+ *
+ * @remark
+ *  If the values for your data type don't exactly match the
+ *  possible values defined by the mib, you should map them here.
+ *  Otherwise, just do a direct copy.
+ */
+int
+pgsqlPgAggregateAggfnoid_map(long *mib_pgsqlPgAggregateAggfnoid_val_ptr, long raw_pgsqlPgAggregateAggfnoid_val)
+{
+    netsnmp_assert(NULL != mib_pgsqlPgAggregateAggfnoid_val_ptr);
+    
+    DEBUGMSGTL(("verbose:pgsqlPgAggregateTable:pgsqlPgAggregateAggfnoid_map","called\n"));
+    
+    /*
+     * TODO:241:o: |-> Implement pgsqlPgAggregateAggfnoid mapping.
+     * If the values for your data type don't exactly match the
+     * possible values defined by the mib, you should map them here.
+     */
+    (*mib_pgsqlPgAggregateAggfnoid_val_ptr) = raw_pgsqlPgAggregateAggfnoid_val;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAggregateAggfnoid_map */
+
+/**
+ * Extract the current value of the pgsqlPgAggregateAggfnoid data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ *        Pointer to the row request context.
+ * @param pgsqlPgAggregateAggfnoid_val_ptr
+ *        Pointer to storage for a long variable
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_SKIP            : skip this node (no value for now)
+ * @retval MFD_ERROR           : Any other error
+ */
+int
+pgsqlPgAggregateAggfnoid_get( pgsqlPgAggregateTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAggregateAggfnoid_val_ptr )
+{
+   /** we should have a non-NULL pointer */
+   netsnmp_assert( NULL != pgsqlPgAggregateAggfnoid_val_ptr );
+
+
+    DEBUGMSGTL(("verbose:pgsqlPgAggregateTable:pgsqlPgAggregateAggfnoid_get","called\n"));
+
+    netsnmp_assert(NULL != rowreq_ctx);
+
+/*
+ * TODO:231:o: |-> Extract the current value of the pgsqlPgAggregateAggfnoid data.
+ * set (* pgsqlPgAggregateAggfnoid_val_ptr ) from rowreq_ctx->data
+ */
+    (* pgsqlPgAggregateAggfnoid_val_ptr ) = rowreq_ctx->data.pgsqlPgAggregateAggfnoid;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAggregateAggfnoid_get */
+
+/*---------------------------------------------------------------------
+ * PGSQL-MIB::pgsqlPgAggregateEntry.pgsqlPgAggregateAggtransfn
+ * pgsqlPgAggregateAggtransfn is subid 3 of pgsqlPgAggregateEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.4.1.27645.1.2.1.1.3
+ * Description:
+Transition function
+ *
+ * Attributes:
+ *   accessible 1     isscalar 0     enums  0      hasdefval 0
+ *   readable   1     iscolumn 1     ranges 0      hashint   0
+ *   settable   0
+ *
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ */
+/**
+ * map a value from its original native format to the MIB format.
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_ERROR           : Any other error
+ *
+ * @note parameters follow the memset convention (dest, src).
+ *
+ * @note generation and use of this function can be turned off by re-running
+ * mib2c after adding the following line to the file
+ * default-node-pgsqlPgAggregateAggtransfn.m2d :
+ *   @eval $m2c_node_skip_mapping = 1@
+ *
+ * @remark
+ *  If the values for your data type don't exactly match the
+ *  possible values defined by the mib, you should map them here.
+ *  Otherwise, just do a direct copy.
+ */
+int
+pgsqlPgAggregateAggtransfn_map(long *mib_pgsqlPgAggregateAggtransfn_val_ptr, long raw_pgsqlPgAggregateAggtransfn_val)
+{
+    netsnmp_assert(NULL != mib_pgsqlPgAggregateAggtransfn_val_ptr);
+    
+    DEBUGMSGTL(("verbose:pgsqlPgAggregateTable:pgsqlPgAggregateAggtransfn_map","called\n"));
+    
+    /*
+     * TODO:241:o: |-> Implement pgsqlPgAggregateAggtransfn mapping.
+     * If the values for your data type don't exactly match the
+     * possible values defined by the mib, you should map them here.
+     */
+    (*mib_pgsqlPgAggregateAggtransfn_val_ptr) = raw_pgsqlPgAggregateAggtransfn_val;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAggregateAggtransfn_map */
+
+/**
+ * Extract the current value of the pgsqlPgAggregateAggtransfn data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ *        Pointer to the row request context.
+ * @param pgsqlPgAggregateAggtransfn_val_ptr
+ *        Pointer to storage for a long variable
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_SKIP            : skip this node (no value for now)
+ * @retval MFD_ERROR           : Any other error
+ */
+int
+pgsqlPgAggregateAggtransfn_get( pgsqlPgAggregateTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAggregateAggtransfn_val_ptr )
+{
+   /** we should have a non-NULL pointer */
+   netsnmp_assert( NULL != pgsqlPgAggregateAggtransfn_val_ptr );
+
+
+    DEBUGMSGTL(("verbose:pgsqlPgAggregateTable:pgsqlPgAggregateAggtransfn_get","called\n"));
+
+    netsnmp_assert(NULL != rowreq_ctx);
+
+/*
+ * TODO:231:o: |-> Extract the current value of the pgsqlPgAggregateAggtransfn data.
+ * set (* pgsqlPgAggregateAggtransfn_val_ptr ) from rowreq_ctx->data
+ */
+    (* pgsqlPgAggregateAggtransfn_val_ptr ) = rowreq_ctx->data.pgsqlPgAggregateAggtransfn;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAggregateAggtransfn_get */
+
+/*---------------------------------------------------------------------
+ * PGSQL-MIB::pgsqlPgAggregateEntry.pgsqlPgAggregateAggfinalfn
+ * pgsqlPgAggregateAggfinalfn is subid 4 of pgsqlPgAggregateEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.4.1.27645.1.2.1.1.4
+ * Description:
+Final function (zero if none)
+ *
+ * Attributes:
+ *   accessible 1     isscalar 0     enums  0      hasdefval 0
+ *   readable   1     iscolumn 1     ranges 0      hashint   0
+ *   settable   0
+ *
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ */
+/**
+ * map a value from its original native format to the MIB format.
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_ERROR           : Any other error
+ *
+ * @note parameters follow the memset convention (dest, src).
+ *
+ * @note generation and use of this function can be turned off by re-running
+ * mib2c after adding the following line to the file
+ * default-node-pgsqlPgAggregateAggfinalfn.m2d :
+ *   @eval $m2c_node_skip_mapping = 1@
+ *
+ * @remark
+ *  If the values for your data type don't exactly match the
+ *  possible values defined by the mib, you should map them here.
+ *  Otherwise, just do a direct copy.
+ */
+int
+pgsqlPgAggregateAggfinalfn_map(long *mib_pgsqlPgAggregateAggfinalfn_val_ptr, long raw_pgsqlPgAggregateAggfinalfn_val)
+{
+    netsnmp_assert(NULL != mib_pgsqlPgAggregateAggfinalfn_val_ptr);
+    
+    DEBUGMSGTL(("verbose:pgsqlPgAggregateTable:pgsqlPgAggregateAggfinalfn_map","called\n"));
+    
+    /*
+     * TODO:241:o: |-> Implement pgsqlPgAggregateAggfinalfn mapping.
+     * If the values for your data type don't exactly match the
+     * possible values defined by the mib, you should map them here.
+     */
+    (*mib_pgsqlPgAggregateAggfinalfn_val_ptr) = raw_pgsqlPgAggregateAggfinalfn_val;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAggregateAggfinalfn_map */
+
+/**
+ * Extract the current value of the pgsqlPgAggregateAggfinalfn data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ *        Pointer to the row request context.
+ * @param pgsqlPgAggregateAggfinalfn_val_ptr
+ *        Pointer to storage for a long variable
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_SKIP            : skip this node (no value for now)
+ * @retval MFD_ERROR           : Any other error
+ */
+int
+pgsqlPgAggregateAggfinalfn_get( pgsqlPgAggregateTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAggregateAggfinalfn_val_ptr )
+{
+   /** we should have a non-NULL pointer */
+   netsnmp_assert( NULL != pgsqlPgAggregateAggfinalfn_val_ptr );
+
+
+    DEBUGMSGTL(("verbose:pgsqlPgAggregateTable:pgsqlPgAggregateAggfinalfn_get","called\n"));
+
+    netsnmp_assert(NULL != rowreq_ctx);
+
+/*
+ * TODO:231:o: |-> Extract the current value of the pgsqlPgAggregateAggfinalfn data.
+ * set (* pgsqlPgAggregateAggfinalfn_val_ptr ) from rowreq_ctx->data
+ */
+    (* pgsqlPgAggregateAggfinalfn_val_ptr ) = rowreq_ctx->data.pgsqlPgAggregateAggfinalfn;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAggregateAggfinalfn_get */
+
+/*---------------------------------------------------------------------
+ * PGSQL-MIB::pgsqlPgAggregateEntry.pgsqlPgAggregateAggsortop
+ * pgsqlPgAggregateAggsortop is subid 5 of pgsqlPgAggregateEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.4.1.27645.1.2.1.1.5
+ * Description:
+Associated sort operator (zero if none)
+ *
+ * Attributes:
+ *   accessible 1     isscalar 0     enums  0      hasdefval 0
+ *   readable   1     iscolumn 1     ranges 0      hashint   0
+ *   settable   0
+ *
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ */
+/**
+ * map a value from its original native format to the MIB format.
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_ERROR           : Any other error
+ *
+ * @note parameters follow the memset convention (dest, src).
+ *
+ * @note generation and use of this function can be turned off by re-running
+ * mib2c after adding the following line to the file
+ * default-node-pgsqlPgAggregateAggsortop.m2d :
+ *   @eval $m2c_node_skip_mapping = 1@
+ *
+ * @remark
+ *  If the values for your data type don't exactly match the
+ *  possible values defined by the mib, you should map them here.
+ *  Otherwise, just do a direct copy.
+ */
+int
+pgsqlPgAggregateAggsortop_map(long *mib_pgsqlPgAggregateAggsortop_val_ptr, long raw_pgsqlPgAggregateAggsortop_val)
+{
+    netsnmp_assert(NULL != mib_pgsqlPgAggregateAggsortop_val_ptr);
+    
+    DEBUGMSGTL(("verbose:pgsqlPgAggregateTable:pgsqlPgAggregateAggsortop_map","called\n"));
+    
+    /*
+     * TODO:241:o: |-> Implement pgsqlPgAggregateAggsortop mapping.
+     * If the values for your data type don't exactly match the
+     * possible values defined by the mib, you should map them here.
+     */
+    (*mib_pgsqlPgAggregateAggsortop_val_ptr) = raw_pgsqlPgAggregateAggsortop_val;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAggregateAggsortop_map */
+
+/**
+ * Extract the current value of the pgsqlPgAggregateAggsortop data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ *        Pointer to the row request context.
+ * @param pgsqlPgAggregateAggsortop_val_ptr
+ *        Pointer to storage for a long variable
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_SKIP            : skip this node (no value for now)
+ * @retval MFD_ERROR           : Any other error
+ */
+int
+pgsqlPgAggregateAggsortop_get( pgsqlPgAggregateTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAggregateAggsortop_val_ptr )
+{
+   /** we should have a non-NULL pointer */
+   netsnmp_assert( NULL != pgsqlPgAggregateAggsortop_val_ptr );
+
+
+    DEBUGMSGTL(("verbose:pgsqlPgAggregateTable:pgsqlPgAggregateAggsortop_get","called\n"));
+
+    netsnmp_assert(NULL != rowreq_ctx);
+
+/*
+ * TODO:231:o: |-> Extract the current value of the pgsqlPgAggregateAggsortop data.
+ * set (* pgsqlPgAggregateAggsortop_val_ptr ) from rowreq_ctx->data
+ */
+    (* pgsqlPgAggregateAggsortop_val_ptr ) = rowreq_ctx->data.pgsqlPgAggregateAggsortop;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAggregateAggsortop_get */
+
+/*---------------------------------------------------------------------
+ * PGSQL-MIB::pgsqlPgAggregateEntry.pgsqlPgAggregateAggtranstype
+ * pgsqlPgAggregateAggtranstype is subid 6 of pgsqlPgAggregateEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.4.1.27645.1.2.1.1.6
+ * Description:
+Data type of the aggregate function's internal transition (state) data
+ *
+ * Attributes:
+ *   accessible 1     isscalar 0     enums  0      hasdefval 0
+ *   readable   1     iscolumn 1     ranges 0      hashint   0
+ *   settable   0
+ *
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ */
+/**
+ * map a value from its original native format to the MIB format.
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_ERROR           : Any other error
+ *
+ * @note parameters follow the memset convention (dest, src).
+ *
+ * @note generation and use of this function can be turned off by re-running
+ * mib2c after adding the following line to the file
+ * default-node-pgsqlPgAggregateAggtranstype.m2d :
+ *   @eval $m2c_node_skip_mapping = 1@
+ *
+ * @remark
+ *  If the values for your data type don't exactly match the
+ *  possible values defined by the mib, you should map them here.
+ *  Otherwise, just do a direct copy.
+ */
+int
+pgsqlPgAggregateAggtranstype_map(long *mib_pgsqlPgAggregateAggtranstype_val_ptr, long raw_pgsqlPgAggregateAggtranstype_val)
+{
+    netsnmp_assert(NULL != mib_pgsqlPgAggregateAggtranstype_val_ptr);
+    
+    DEBUGMSGTL(("verbose:pgsqlPgAggregateTable:pgsqlPgAggregateAggtranstype_map","called\n"));
+    
+    /*
+     * TODO:241:o: |-> Implement pgsqlPgAggregateAggtranstype mapping.
+     * If the values for your data type don't exactly match the
+     * possible values defined by the mib, you should map them here.
+     */
+    (*mib_pgsqlPgAggregateAggtranstype_val_ptr) = raw_pgsqlPgAggregateAggtranstype_val;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAggregateAggtranstype_map */
+
+/**
+ * Extract the current value of the pgsqlPgAggregateAggtranstype data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ *        Pointer to the row request context.
+ * @param pgsqlPgAggregateAggtranstype_val_ptr
+ *        Pointer to storage for a long variable
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_SKIP            : skip this node (no value for now)
+ * @retval MFD_ERROR           : Any other error
+ */
+int
+pgsqlPgAggregateAggtranstype_get( pgsqlPgAggregateTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAggregateAggtranstype_val_ptr )
+{
+   /** we should have a non-NULL pointer */
+   netsnmp_assert( NULL != pgsqlPgAggregateAggtranstype_val_ptr );
+
+
+    DEBUGMSGTL(("verbose:pgsqlPgAggregateTable:pgsqlPgAggregateAggtranstype_get","called\n"));
+
+    netsnmp_assert(NULL != rowreq_ctx);
+
+/*
+ * TODO:231:o: |-> Extract the current value of the pgsqlPgAggregateAggtranstype data.
+ * set (* pgsqlPgAggregateAggtranstype_val_ptr ) from rowreq_ctx->data
+ */
+    (* pgsqlPgAggregateAggtranstype_val_ptr ) = rowreq_ctx->data.pgsqlPgAggregateAggtranstype;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAggregateAggtranstype_get */
+
+/*---------------------------------------------------------------------
+ * PGSQL-MIB::pgsqlPgAggregateEntry.pgsqlPgAggregateAgginitval
+ * pgsqlPgAggregateAgginitval is subid 7 of pgsqlPgAggregateEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.4.1.27645.1.2.1.1.7
+ * Description:
+The initial value of the transition state. This is a text field containing the initial value in its external string representation. If this field is NULL, the transition state value starts out NULL
+ *
+ * Attributes:
+ *   accessible 1     isscalar 0     enums  0      hasdefval 0
+ *   readable   1     iscolumn 1     ranges 1      hashint   1
+ *   settable   0
+ *   hint: 255a
+ *
+ * Ranges:  0 - 255;
+ *
+ * Its syntax is DisplayString (based on perltype OCTETSTR)
+ * The net-snmp type is ASN_OCTET_STR. The C type decl is char (char)
+ * This data type requires a length.  (Max 255)
+ */
+/**
+ * map a value from its original native format to the MIB format.
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_ERROR           : Any other error
+ *
+ * @note parameters follow the memset convention (dest, src).
+ *
+ * @note generation and use of this function can be turned off by re-running
+ * mib2c after adding the following line to the file
+ * default-node-pgsqlPgAggregateAgginitval.m2d :
+ *   @eval $m2c_node_skip_mapping = 1@
+ *
+ * @remark
+ *  If the values for your data type don't exactly match the
+ *  possible values defined by the mib, you should map them here.
+ *  Otherwise, just do a direct copy.
+ */
+int
+pgsqlPgAggregateAgginitval_map(char **mib_pgsqlPgAggregateAgginitval_val_ptr_ptr, size_t *mib_pgsqlPgAggregateAgginitval_val_ptr_len_ptr, char *raw_pgsqlPgAggregateAgginitval_val_ptr, size_t raw_pgsqlPgAggregateAgginitval_val_ptr_len, int allow_realloc)
+{
+    int converted_len;
+
+    netsnmp_assert(NULL != raw_pgsqlPgAggregateAgginitval_val_ptr);
+    netsnmp_assert((NULL != mib_pgsqlPgAggregateAgginitval_val_ptr_ptr) && (NULL != mib_pgsqlPgAggregateAgginitval_val_ptr_len_ptr));
+    
+    DEBUGMSGTL(("verbose:pgsqlPgAggregateTable:pgsqlPgAggregateAgginitval_map","called\n"));
+    
+    /*
+     * TODO:241:r: |-> Implement pgsqlPgAggregateAgginitval non-integer mapping
+     * it is hard to autogenerate code for mapping types that are not simple
+     * integers, so here is an idea of what you might need to do. It will
+     * probably need some tweaking to get right.
+     */
+    /*
+     * if the length of the raw data doesn't directly correspond with
+     * the length of the mib data, set converted_len to the
+     * space required.
+     */
+    converted_len = raw_pgsqlPgAggregateAgginitval_val_ptr_len; /* assume equal */
+    if((NULL == *mib_pgsqlPgAggregateAgginitval_val_ptr_ptr) || (*mib_pgsqlPgAggregateAgginitval_val_ptr_len_ptr < converted_len)) {
+        if(! allow_realloc) {
+            snmp_log(LOG_ERR,"not enough space for value mapping\n");
+            return SNMP_ERR_GENERR;
+        }
+        *mib_pgsqlPgAggregateAgginitval_val_ptr_ptr = realloc( *mib_pgsqlPgAggregateAgginitval_val_ptr_ptr, converted_len * sizeof(**mib_pgsqlPgAggregateAgginitval_val_ptr_ptr));
+        if(NULL == *mib_pgsqlPgAggregateAgginitval_val_ptr_ptr) {
+            snmp_log(LOG_ERR,"could not allocate memory\n");
+            return SNMP_ERR_GENERR;
+        }
+    }
+    *mib_pgsqlPgAggregateAgginitval_val_ptr_len_ptr = converted_len;
+    memcpy( *mib_pgsqlPgAggregateAgginitval_val_ptr_ptr, raw_pgsqlPgAggregateAgginitval_val_ptr, converted_len );
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAggregateAgginitval_map */
+
+/**
+ * Extract the current value of the pgsqlPgAggregateAgginitval data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ *        Pointer to the row request context.
+ * @param pgsqlPgAggregateAgginitval_val_ptr_ptr
+ *        Pointer to storage for a char variable
+ * @param pgsqlPgAggregateAgginitval_val_ptr_len_ptr
+ *        Pointer to a size_t. On entry, it will contain the size (in bytes)
+ *        pointed to by pgsqlPgAggregateAgginitval.
+ *        On exit, this value should contain the data size (in bytes).
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_SKIP            : skip this node (no value for now)
+ * @retval MFD_ERROR           : Any other error
+*
+ * @note If you need more than (*pgsqlPgAggregateAgginitval_val_ptr_len_ptr) bytes of memory,
+ *       allocate it using malloc() and update pgsqlPgAggregateAgginitval_val_ptr_ptr.
+ *       <b>DO NOT</b> free the previous pointer.
+ *       The MFD helper will release the memory you allocate.
+ *
+ * @remark If you call this function yourself, you are responsible
+ *         for checking if the pointer changed, and freeing any
+ *         previously allocated memory. (Not necessary if you pass
+ *         in a pointer to static memory, obviously.)
+ */
+int
+pgsqlPgAggregateAgginitval_get( pgsqlPgAggregateTable_rowreq_ctx *rowreq_ctx, char **pgsqlPgAggregateAgginitval_val_ptr_ptr, size_t *pgsqlPgAggregateAgginitval_val_ptr_len_ptr )
+{
+   /** we should have a non-NULL pointer and enough storage */
+   netsnmp_assert( (NULL != pgsqlPgAggregateAgginitval_val_ptr_ptr) && (NULL != *pgsqlPgAggregateAgginitval_val_ptr_ptr));
+   netsnmp_assert( NULL != pgsqlPgAggregateAgginitval_val_ptr_len_ptr );
+
+
+    DEBUGMSGTL(("verbose:pgsqlPgAggregateTable:pgsqlPgAggregateAgginitval_get","called\n"));
+
+    netsnmp_assert(NULL != rowreq_ctx);
+
+/*
+ * TODO:231:o: |-> Extract the current value of the pgsqlPgAggregateAgginitval data.
+ * set (* pgsqlPgAggregateAgginitval_val_ptr_ptr ) and (* pgsqlPgAggregateAgginitval_val_ptr_len_ptr ) from rowreq_ctx->data
+ */
+    /*
+     * make sure there is enough space for pgsqlPgAggregateAgginitval data
+     */
+    if ((NULL == (* pgsqlPgAggregateAgginitval_val_ptr_ptr )) ||
+        ((* pgsqlPgAggregateAgginitval_val_ptr_len_ptr ) < (rowreq_ctx->data.pgsqlPgAggregateAgginitval_len * sizeof((* pgsqlPgAggregateAgginitval_val_ptr_ptr )[0])))) {
+        /*
+         * allocate space for pgsqlPgAggregateAgginitval data
+         */
+        (* pgsqlPgAggregateAgginitval_val_ptr_ptr ) = malloc(rowreq_ctx->data.pgsqlPgAggregateAgginitval_len * sizeof((* pgsqlPgAggregateAgginitval_val_ptr_ptr )[0]));
+        if(NULL == (* pgsqlPgAggregateAgginitval_val_ptr_ptr )) {
+            snmp_log(LOG_ERR,"could not allocate memory\n");
+            return MFD_ERROR;
+        }
+    }
+    (* pgsqlPgAggregateAgginitval_val_ptr_len_ptr ) = rowreq_ctx->data.pgsqlPgAggregateAgginitval_len * sizeof((* pgsqlPgAggregateAgginitval_val_ptr_ptr )[0]);
+    memcpy( (* pgsqlPgAggregateAgginitval_val_ptr_ptr ), rowreq_ctx->data.pgsqlPgAggregateAgginitval, (* pgsqlPgAggregateAgginitval_val_ptr_len_ptr ) );
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAggregateAgginitval_get */
+
+
+
+/** @} */
diff --git a/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAggregateTable/pgsqlPgAggregateTable_data_get.h b/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAggregateTable/pgsqlPgAggregateTable_data_get.h
new file mode 100644 (file)
index 0000000..c5c1e73
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ *       version : 1.18.2.1 $ of : mfd-data-get.m2c,v $
+ *
+ * $Id: pgsqlPgAggregateTable_data_get.h,v 1.1 2008/01/17 11:49:24 eggyknap Exp $
+ *
+ * @file pgsqlPgAggregateTable_data_get.h
+ *
+ * @addtogroup get
+ *
+ * Prototypes for get functions
+ *
+ * @{
+ */
+#ifndef PGSQLPGAGGREGATETABLE_DATA_GET_H
+#define PGSQLPGAGGREGATETABLE_DATA_GET_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* *********************************************************************
+ * GET function declarations
+ */
+
+/* *********************************************************************
+ * GET Table declarations
+ */
+/**********************************************************************
+ **********************************************************************
+ ***
+ *** Table pgsqlPgAggregateTable
+ ***
+ **********************************************************************
+ **********************************************************************/
+/*
+ * pgsqlPgAggregateTable is subid 1 of pgsqlCatalogTables.
+ * Its status is Current.
+ * OID: .1.3.6.1.4.1.27645.1.2.1, length: 10
+*/
+    /*
+     * indexes
+     */
+    int pgsnmpdConnID_map(char **mib_pgsnmpdConnID_val_ptr_ptr, size_t *mib_pgsnmpdConnID_val_ptr_len_ptr, char *raw_pgsnmpdConnID_val_ptr, size_t raw_pgsnmpdConnID_val_ptr_len, int allow_realloc);
+    int pgsqlPgAggregateEntryOID_map(long *mib_pgsqlPgAggregateEntryOID_val_ptr, long raw_pgsqlPgAggregateEntryOID_val);
+
+    int pgsqlPgAggregateAggfnoid_map(long *mib_pgsqlPgAggregateAggfnoid_val_ptr, long raw_pgsqlPgAggregateAggfnoid_val);
+    int pgsqlPgAggregateAggfnoid_get( pgsqlPgAggregateTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAggregateAggfnoid_val_ptr );
+    int pgsqlPgAggregateAggtransfn_map(long *mib_pgsqlPgAggregateAggtransfn_val_ptr, long raw_pgsqlPgAggregateAggtransfn_val);
+    int pgsqlPgAggregateAggtransfn_get( pgsqlPgAggregateTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAggregateAggtransfn_val_ptr );
+    int pgsqlPgAggregateAggfinalfn_map(long *mib_pgsqlPgAggregateAggfinalfn_val_ptr, long raw_pgsqlPgAggregateAggfinalfn_val);
+    int pgsqlPgAggregateAggfinalfn_get( pgsqlPgAggregateTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAggregateAggfinalfn_val_ptr );
+    int pgsqlPgAggregateAggsortop_map(long *mib_pgsqlPgAggregateAggsortop_val_ptr, long raw_pgsqlPgAggregateAggsortop_val);
+    int pgsqlPgAggregateAggsortop_get( pgsqlPgAggregateTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAggregateAggsortop_val_ptr );
+    int pgsqlPgAggregateAggtranstype_map(long *mib_pgsqlPgAggregateAggtranstype_val_ptr, long raw_pgsqlPgAggregateAggtranstype_val);
+    int pgsqlPgAggregateAggtranstype_get( pgsqlPgAggregateTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAggregateAggtranstype_val_ptr );
+    int pgsqlPgAggregateAgginitval_map(char **mib_pgsqlPgAggregateAgginitval_val_ptr_ptr, size_t *mib_pgsqlPgAggregateAgginitval_val_ptr_len_ptr, char *raw_pgsqlPgAggregateAgginitval_val_ptr, size_t raw_pgsqlPgAggregateAgginitval_val_ptr_len, int allow_realloc);
+    int pgsqlPgAggregateAgginitval_get( pgsqlPgAggregateTable_rowreq_ctx *rowreq_ctx, char **pgsqlPgAggregateAgginitval_val_ptr_ptr, size_t *pgsqlPgAggregateAgginitval_val_ptr_len_ptr );
+
+
+int pgsqlPgAggregateTable_indexes_set_tbl_idx(pgsqlPgAggregateTable_mib_index *tbl_idx, char *pgsnmpdConnID_val_ptr,  size_t pgsnmpdConnID_val_ptr_len, long rdbmsDbIndex_val, long pgsqlPgAggregateEntryOID_val);
+int pgsqlPgAggregateTable_indexes_set(pgsqlPgAggregateTable_rowreq_ctx *rowreq_ctx, char *pgsnmpdConnID_val_ptr,  size_t pgsnmpdConnID_val_ptr_len, long rdbmsDbIndex_val, long pgsqlPgAggregateEntryOID_val);
+
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PGSQLPGAGGREGATETABLE_DATA_GET_H */
+/** @} */
diff --git a/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAggregateTable/pgsqlPgAggregateTable_data_set.c b/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAggregateTable/pgsqlPgAggregateTable_data_set.c
new file mode 100644 (file)
index 0000000..b266046
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ *       version : 1.18 $ of : mfd-data-set.m2c,v $
+ *
+ * $Id: pgsqlPgAggregateTable_data_set.c,v 1.1 2008/01/17 11:49:24 eggyknap Exp $
+ *
+ */
+/* standard Net-SNMP includes */
+#include <net-snmp/net-snmp-config.h>
+#include <net-snmp/net-snmp-includes.h>
+#include <net-snmp/agent/net-snmp-agent-includes.h>
+
+/* include our parent header */
+#include "pgsqlPgAggregateTable.h"
+
+
+/** @defgroup data_set data_set: Routines to set data
+ *
+ * These routines are used to set the value for individual objects. The
+ * row context is passed, along with the new value.
+ * 
+ * @{
+ */
+/** @} */
diff --git a/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAggregateTable/pgsqlPgAggregateTable_data_set.h b/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAggregateTable/pgsqlPgAggregateTable_data_set.h
new file mode 100644 (file)
index 0000000..52061bc
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ *       version : 1.18 $ of : mfd-data-set.m2c,v $ 
+ *
+ * $Id: pgsqlPgAggregateTable_data_set.h,v 1.1 2008/01/17 11:49:24 eggyknap Exp $
+ */
+#ifndef PGSQLPGAGGREGATETABLE_DATA_SET_H
+#define PGSQLPGAGGREGATETABLE_DATA_SET_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* *********************************************************************
+ * SET function declarations
+ */
+
+/* *********************************************************************
+ * SET Table declarations
+ */
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PGSQLPGAGGREGATETABLE_DATA_SET_H */
diff --git a/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAggregateTable/pgsqlPgAggregateTable_enums.h b/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAggregateTable/pgsqlPgAggregateTable_enums.h
new file mode 100644 (file)
index 0000000..161cc07
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ *  : generic-table-enums.m2c,v 1.3 2004/05/18 17:44:32 rstory Exp $
+ *
+ * $Id: pgsqlPgAggregateTable_enums.h,v 1.1 2008/01/17 11:49:24 eggyknap Exp $
+ */
+#ifndef PGSQLPGAGGREGATETABLE_ENUMS_H
+#define PGSQLPGAGGREGATETABLE_ENUMS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ /*
+ * NOTES on enums
+ * ==============
+ *
+ * Value Mapping
+ * -------------
+ * If the values for your data type don't exactly match the
+ * possible values defined by the mib, you should map them
+ * below. For example, a boolean flag (1/0) is usually represented
+ * as a TruthValue in a MIB, which maps to the values (1/2).
+ *
+ */
+/*************************************************************************
+ *************************************************************************
+ *
+ * enum definitions for table pgsqlPgAggregateTable
+ *
+ *************************************************************************
+ *************************************************************************/
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PGSQLPGAGGREGATETABLE_ENUMS_H */
diff --git a/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAggregateTable/pgsqlPgAggregateTable_interface.c b/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAggregateTable/pgsqlPgAggregateTable_interface.c
new file mode 100644 (file)
index 0000000..8215a2d
--- /dev/null
@@ -0,0 +1,784 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ *       version : 1.43.2.3 $ of : mfd-interface.m2c,v $ 
+ *
+ * $Id: pgsqlPgAggregateTable_interface.c,v 1.1 2008/01/17 11:49:24 eggyknap Exp $
+ */
+/*
+ * *********************************************************************
+ * *********************************************************************
+ * *********************************************************************
+ * ***                                                               ***
+ * ***  NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE  ***
+ * ***                                                               ***
+ * ***                                                               ***
+ * ***       THIS FILE DOES NOT CONTAIN ANY USER EDITABLE CODE.      ***
+ * ***                                                               ***
+ * ***                                                               ***
+ * ***       THE GENERATED CODE IS INTERNAL IMPLEMENTATION, AND      ***
+ * ***                                                               ***
+ * ***                                                               ***
+ * ***    IS SUBJECT TO CHANGE WITHOUT WARNING IN FUTURE RELEASES.   ***
+ * ***                                                               ***
+ * ***                                                               ***
+ * *********************************************************************
+ * *********************************************************************
+ * *********************************************************************
+ */
+
+/* standard Net-SNMP includes */
+#include <net-snmp/net-snmp-config.h>
+#include <net-snmp/net-snmp-includes.h>
+#include <net-snmp/agent/net-snmp-agent-includes.h>
+
+/* include our parent header */
+#include "pgsqlPgAggregateTable.h"
+
+
+#include <net-snmp/library/container.h>
+
+#include "pgsqlPgAggregateTable_interface.h"
+
+/**********************************************************************
+ **********************************************************************
+ ***
+ *** Table pgsqlPgAggregateTable
+ ***
+ **********************************************************************
+ **********************************************************************/
+/*
+ * pgsqlPgAggregateTable is subid 1 of pgsqlCatalogTables.
+ * Its status is Current.
+ * OID: .1.3.6.1.4.1.27645.1.2.1, length: 10
+*/
+typedef struct pgsqlPgAggregateTable_interface_ctx_s {
+
+   netsnmp_container              *container;
+   netsnmp_cache                  *cache; /* optional cache */
+
+   pgsqlPgAggregateTable_registration_ptr      user_ctx;
+   
+   netsnmp_table_registration_info  tbl_info;
+
+   netsnmp_baby_steps_access_methods access_multiplexer;
+
+} pgsqlPgAggregateTable_interface_ctx;
+
+static pgsqlPgAggregateTable_interface_ctx pgsqlPgAggregateTable_if_ctx;
+
+static void _pgsqlPgAggregateTable_container_init(
+    pgsqlPgAggregateTable_interface_ctx *if_ctx);
+
+
+static Netsnmp_Node_Handler _mfd_pgsqlPgAggregateTable_pre_request;
+static Netsnmp_Node_Handler _mfd_pgsqlPgAggregateTable_post_request;
+static Netsnmp_Node_Handler _mfd_pgsqlPgAggregateTable_object_lookup;
+static Netsnmp_Node_Handler _mfd_pgsqlPgAggregateTable_get_values;
+/**
+ * @internal
+ * Initialize the table pgsqlPgAggregateTable 
+ *    (Define its contents and how it's structured)
+ */
+void
+_pgsqlPgAggregateTable_initialize_interface(pgsqlPgAggregateTable_registration_ptr reg_ptr,  u_long flags)
+{
+    netsnmp_baby_steps_access_methods *access_multiplexer =
+        &pgsqlPgAggregateTable_if_ctx.access_multiplexer;
+    netsnmp_table_registration_info *tbl_info = &pgsqlPgAggregateTable_if_ctx.tbl_info;
+    netsnmp_handler_registration *reginfo;
+    netsnmp_mib_handler *handler;
+    int    mfd_modes = 0;
+
+    DEBUGMSGTL(("internal:pgsqlPgAggregateTable:_pgsqlPgAggregateTable_initialize_interface","called\n"));
+
+
+    /*************************************************
+     *
+     * save interface context for pgsqlPgAggregateTable
+     */
+    /*
+     * Setting up the table's definition
+     */
+    netsnmp_table_helper_add_indexes(tbl_info,
+                                  ASN_OCTET_STR, /** index: pgsnmpdConnID */
+                                  ASN_INTEGER, /** index: rdbmsDbIndex */
+                                  ASN_INTEGER, /** index: pgsqlPgAggregateEntryOID */
+                             0);
+
+    /*  Define the minimum and maximum accessible columns.  This
+        optimizes retrival. */
+    tbl_info->min_column = PGSQLPGAGGREGATETABLE_MIN_COL;
+    tbl_info->max_column = PGSQLPGAGGREGATETABLE_MAX_COL;
+
+    /*
+     * save users context
+     */
+    pgsqlPgAggregateTable_if_ctx.user_ctx = reg_ptr;
+
+    /*
+     * call data access initialization code
+     */
+    pgsqlPgAggregateTable_init_data(reg_ptr);
+
+    /*
+     * set up the container
+     */
+    _pgsqlPgAggregateTable_container_init(&pgsqlPgAggregateTable_if_ctx);
+    if (NULL == pgsqlPgAggregateTable_if_ctx.container) {
+        snmp_log(LOG_ERR,"could not initialize container for pgsqlPgAggregateTable\n");
+        return;
+    }
+    
+    /*
+     * access_multiplexer: REQUIRED wrapper for get request handling
+     */
+    access_multiplexer->object_lookup = _mfd_pgsqlPgAggregateTable_object_lookup;
+    access_multiplexer->get_values = _mfd_pgsqlPgAggregateTable_get_values;
+
+    /*
+     * no wrappers yet
+     */
+    access_multiplexer->pre_request = _mfd_pgsqlPgAggregateTable_pre_request;
+    access_multiplexer->post_request = _mfd_pgsqlPgAggregateTable_post_request;
+
+
+    /*************************************************
+     *
+     * Create a registration, save our reg data, register table.
+     */
+    DEBUGMSGTL(("pgsqlPgAggregateTable:init_pgsqlPgAggregateTable",
+                "Registering pgsqlPgAggregateTable as a mibs-for-dummies table.\n"));           
+    handler = netsnmp_baby_steps_access_multiplexer_get(access_multiplexer);
+    reginfo = netsnmp_handler_registration_create("pgsqlPgAggregateTable", handler,
+                                                  pgsqlPgAggregateTable_oid,
+                                                  pgsqlPgAggregateTable_oid_size,
+                                                  HANDLER_CAN_BABY_STEP |
+                                                  HANDLER_CAN_RONLY
+                                                  );
+    if(NULL == reginfo) {
+        snmp_log(LOG_ERR,"error registering table pgsqlPgAggregateTable\n");
+        return;
+    }
+    reginfo->my_reg_void = &pgsqlPgAggregateTable_if_ctx;
+
+    /*************************************************
+     *
+     * set up baby steps handler, create it and inject it
+     */
+    if( access_multiplexer->object_lookup )
+        mfd_modes |= BABY_STEP_OBJECT_LOOKUP;
+    if( access_multiplexer->set_values )
+        mfd_modes |= BABY_STEP_SET_VALUES;
+    if( access_multiplexer->irreversible_commit )
+        mfd_modes |= BABY_STEP_IRREVERSIBLE_COMMIT;
+    if( access_multiplexer->object_syntax_checks )
+        mfd_modes |= BABY_STEP_CHECK_OBJECT;
+
+    if( access_multiplexer->pre_request )
+        mfd_modes |= BABY_STEP_PRE_REQUEST;
+    if( access_multiplexer->post_request )
+        mfd_modes |= BABY_STEP_POST_REQUEST;
+    
+    if( access_multiplexer->undo_setup )
+        mfd_modes |= BABY_STEP_UNDO_SETUP;
+    if( access_multiplexer->undo_cleanup )
+        mfd_modes |= BABY_STEP_UNDO_CLEANUP;
+    if( access_multiplexer->undo_sets )
+        mfd_modes |= BABY_STEP_UNDO_SETS;
+    
+    if( access_multiplexer->row_creation )
+        mfd_modes |= BABY_STEP_ROW_CREATE;
+    if( access_multiplexer->consistency_checks )
+        mfd_modes |= BABY_STEP_CHECK_CONSISTENCY;
+    if( access_multiplexer->commit )
+        mfd_modes |= BABY_STEP_COMMIT;
+    if( access_multiplexer->undo_commit )
+        mfd_modes |= BABY_STEP_UNDO_COMMIT;
+    
+    handler = netsnmp_baby_steps_handler_get(mfd_modes);
+    netsnmp_inject_handler(reginfo, handler);
+
+    /*************************************************
+     *
+     * inject row_merge helper with prefix rootoid_len + 2 (entry.col)
+     */
+    handler = netsnmp_get_row_merge_handler(reginfo->rootoid_len + 2);
+    netsnmp_inject_handler(reginfo, handler);
+
+    /*************************************************
+     *
+     * inject container_table helper
+     */
+    handler =
+        netsnmp_container_table_handler_get(tbl_info,
+                                            pgsqlPgAggregateTable_if_ctx.container,
+                                            TABLE_CONTAINER_KEY_NETSNMP_INDEX);
+    netsnmp_inject_handler( reginfo, handler );
+
+    /*************************************************
+     *
+     * inject cache helper
+     */
+    if(NULL != pgsqlPgAggregateTable_if_ctx.cache) {
+        handler = netsnmp_cache_handler_get(pgsqlPgAggregateTable_if_ctx.cache);
+        netsnmp_inject_handler( reginfo, handler );
+    }
+
+    /*
+     * register table
+     */
+    netsnmp_register_table(reginfo, tbl_info);
+} /* _pgsqlPgAggregateTable_initialize_interface */
+
+void
+pgsqlPgAggregateTable_valid_columns_set(netsnmp_column_info *vc)
+{
+    pgsqlPgAggregateTable_if_ctx.tbl_info.valid_columns = vc;
+} /* pgsqlPgAggregateTable_valid_columns_set */
+
+/**
+ * @internal
+ * convert the index component stored in the context to an oid
+ */
+int
+pgsqlPgAggregateTable_index_to_oid(netsnmp_index *oid_idx,
+                         pgsqlPgAggregateTable_mib_index *mib_idx)
+{
+    int err = SNMP_ERR_NOERROR;
+    
+    /*
+     * temp storage for parsing indexes
+     */
+    /*
+     * pgsnmpdConnID(1)/DisplayString/ASN_OCTET_STR/char(char)//L/a/w/e/R/d/H
+     */
+    netsnmp_variable_list var_pgsnmpdConnID;
+    /*
+     * rdbmsDbIndex(1)/INTEGER/ASN_INTEGER/long(long)//l/a/w/e/R/d/h
+     */
+    netsnmp_variable_list var_rdbmsDbIndex;
+    /*
+     * pgsqlPgAggregateEntryOID(1)/INTEGER/ASN_INTEGER/long(long)//l/a/w/e/r/d/h
+     */
+    netsnmp_variable_list var_pgsqlPgAggregateEntryOID;
+
+    /*
+     * set up varbinds
+     */
+    memset( &var_pgsnmpdConnID, 0x00, sizeof(var_pgsnmpdConnID) );
+    var_pgsnmpdConnID.type = ASN_OCTET_STR;
+    memset( &var_rdbmsDbIndex, 0x00, sizeof(var_rdbmsDbIndex) );
+    var_rdbmsDbIndex.type = ASN_INTEGER;
+    memset( &var_pgsqlPgAggregateEntryOID, 0x00, sizeof(var_pgsqlPgAggregateEntryOID) );
+    var_pgsqlPgAggregateEntryOID.type = ASN_INTEGER;
+
+    /*
+     * chain temp index varbinds together
+     */
+    var_pgsnmpdConnID.next_variable =  &var_rdbmsDbIndex; var_rdbmsDbIndex.next_variable =  &var_pgsqlPgAggregateEntryOID; var_pgsqlPgAggregateEntryOID.next_variable =  NULL;
+
+
+    DEBUGMSGTL(("verbose:pgsqlPgAggregateTable:pgsqlPgAggregateTable_index_to_oid","called\n"));
+
+        /* pgsnmpdConnID(1)/DisplayString/ASN_OCTET_STR/char(char)//L/a/w/e/R/d/H */
+    snmp_set_var_value(&var_pgsnmpdConnID, (u_char*)&mib_idx->pgsnmpdConnID,
+                       mib_idx->pgsnmpdConnID_len * sizeof(mib_idx->pgsnmpdConnID[0]));
+
+        /* rdbmsDbIndex(1)/INTEGER/ASN_INTEGER/long(long)//l/a/w/e/R/d/h */
+    snmp_set_var_value(&var_rdbmsDbIndex, (u_char*)&mib_idx->rdbmsDbIndex,
+                       sizeof(mib_idx->rdbmsDbIndex));
+
+        /* pgsqlPgAggregateEntryOID(1)/INTEGER/ASN_INTEGER/long(long)//l/a/w/e/r/d/h */
+    snmp_set_var_value(&var_pgsqlPgAggregateEntryOID, (u_char*)&mib_idx->pgsqlPgAggregateEntryOID,
+                       sizeof(mib_idx->pgsqlPgAggregateEntryOID));
+
+
+    err = build_oid_noalloc(oid_idx->oids, oid_idx->len, (size_t *)&oid_idx->len,
+                           NULL, 0, &var_pgsnmpdConnID);
+    if(err)
+        snmp_log(LOG_ERR,"error %d converting index to oid\n", err);
+
+    /*
+     * parsing may have allocated memory. free it.
+     */
+    snmp_reset_var_buffers( &var_pgsnmpdConnID );
+
+    return err;
+} /* pgsqlPgAggregateTable_index_to_oid */
+
+/**
+ * extract pgsqlPgAggregateTable indexes from a netsnmp_index
+ *
+ * @retval SNMP_ERR_NOERROR  : no error
+ * @retval SNMP_ERR_GENERR   : error
+ */
+int
+pgsqlPgAggregateTable_index_from_oid(netsnmp_index *oid_idx,
+                         pgsqlPgAggregateTable_mib_index *mib_idx)
+{
+    int err = SNMP_ERR_NOERROR;
+    
+    /*
+     * temp storage for parsing indexes
+     */
+    /*
+     * pgsnmpdConnID(1)/DisplayString/ASN_OCTET_STR/char(char)//L/a/w/e/R/d/H
+     */
+    netsnmp_variable_list var_pgsnmpdConnID;
+    /*
+     * rdbmsDbIndex(1)/INTEGER/ASN_INTEGER/long(long)//l/a/w/e/R/d/h
+     */
+    netsnmp_variable_list var_rdbmsDbIndex;
+    /*
+     * pgsqlPgAggregateEntryOID(1)/INTEGER/ASN_INTEGER/long(long)//l/a/w/e/r/d/h
+     */
+    netsnmp_variable_list var_pgsqlPgAggregateEntryOID;
+
+    /*
+     * set up varbinds
+     */
+    memset( &var_pgsnmpdConnID, 0x00, sizeof(var_pgsnmpdConnID) );
+    var_pgsnmpdConnID.type = ASN_OCTET_STR;
+    memset( &var_rdbmsDbIndex, 0x00, sizeof(var_rdbmsDbIndex) );
+    var_rdbmsDbIndex.type = ASN_INTEGER;
+    memset( &var_pgsqlPgAggregateEntryOID, 0x00, sizeof(var_pgsqlPgAggregateEntryOID) );
+    var_pgsqlPgAggregateEntryOID.type = ASN_INTEGER;
+
+    /*
+     * chain temp index varbinds together
+     */
+    var_pgsnmpdConnID.next_variable =  &var_rdbmsDbIndex; var_rdbmsDbIndex.next_variable =  &var_pgsqlPgAggregateEntryOID; var_pgsqlPgAggregateEntryOID.next_variable =  NULL;
+
+
+    DEBUGMSGTL(("verbose:pgsqlPgAggregateTable:pgsqlPgAggregateTable_index_from_oid","called\n"));
+
+    /*
+     * parse the oid into the individual index components
+     */
+    err = parse_oid_indexes( oid_idx->oids, oid_idx->len,
+                             &var_pgsnmpdConnID );
+    if (err == SNMP_ERR_NOERROR) {
+        /*
+         * copy out values
+         */
+    /*
+     * NOTE: val_len is in bytes, pgsnmpdConnID_len might not be
+     */
+         if(var_pgsnmpdConnID.val_len > sizeof(mib_idx->pgsnmpdConnID))
+             err = SNMP_ERR_GENERR;
+         else {
+             memcpy(mib_idx->pgsnmpdConnID, var_pgsnmpdConnID.val.string, var_pgsnmpdConnID.val_len);
+             mib_idx->pgsnmpdConnID_len = var_pgsnmpdConnID.val_len / sizeof(mib_idx->pgsnmpdConnID[0]);
+         }
+    mib_idx->rdbmsDbIndex = *((long *)var_rdbmsDbIndex.val.string);
+    mib_idx->pgsqlPgAggregateEntryOID = *((long *)var_pgsqlPgAggregateEntryOID.val.string);
+
+
+    }
+
+    /*
+     * parsing may have allocated memory. free it.
+     */
+    snmp_reset_var_buffers( &var_pgsnmpdConnID );
+
+    return err;
+} /* pgsqlPgAggregateTable_index_from_oid */
+
+
+/* *********************************************************************
+ * @internal
+ * allocate resources for a pgsqlPgAggregateTable_rowreq_ctx
+ */
+pgsqlPgAggregateTable_rowreq_ctx *
+pgsqlPgAggregateTable_allocate_rowreq_ctx(void)
+{
+    pgsqlPgAggregateTable_rowreq_ctx *rowreq_ctx =
+                  SNMP_MALLOC_TYPEDEF(pgsqlPgAggregateTable_rowreq_ctx);
+
+    DEBUGMSGTL(("internal:pgsqlPgAggregateTable:pgsqlPgAggregateTable_allocate_rowreq_ctx","called\n"));
+
+    if(NULL == rowreq_ctx) {
+        snmp_log(LOG_ERR,"Couldn't allocate memory for a "
+                 "pgsqlPgAggregateTable_rowreq_ctx.\n");
+    }
+
+    rowreq_ctx->oid_idx.oids = rowreq_ctx->oid_tmp;
+
+    rowreq_ctx->pgsqlPgAggregateTable_data_list = NULL;
+    rowreq_ctx->pgsqlPgAggregateTable_reg = pgsqlPgAggregateTable_if_ctx.user_ctx;
+
+
+    return rowreq_ctx;
+} /* pgsqlPgAggregateTable_allocate_rowreq_ctx */
+
+/*
+ * @internal
+ * release resources for a pgsqlPgAggregateTable_rowreq_ctx
+ */
+void
+pgsqlPgAggregateTable_release_rowreq_ctx(pgsqlPgAggregateTable_rowreq_ctx *rowreq_ctx)
+{
+    DEBUGMSGTL(("internal:pgsqlPgAggregateTable:pgsqlPgAggregateTable_release_rowreq_ctx","called\n"));
+
+    netsnmp_assert(NULL != rowreq_ctx);
+    
+
+    /*
+     * free index oid pointer
+     */
+    if(rowreq_ctx->oid_idx.oids != rowreq_ctx->oid_tmp)
+        free(rowreq_ctx->oid_idx.oids);
+
+    SNMP_FREE(rowreq_ctx);
+} /* pgsqlPgAggregateTable_release_rowreq_ctx */
+
+/**
+ * @internal
+ * wrapper
+ */
+static int
+_mfd_pgsqlPgAggregateTable_pre_request(netsnmp_mib_handler *handler,
+                            netsnmp_handler_registration *reginfo,
+                            netsnmp_agent_request_info *agtreq_info,
+                            netsnmp_request_info *requests)
+{
+    int rc = pgsqlPgAggregateTable_pre_request(pgsqlPgAggregateTable_if_ctx.user_ctx);
+    if (MFD_SUCCESS != rc) {
+        /*
+         * nothing we can do about it but log it
+         */
+        DEBUGMSGTL(("internal:pgsqlPgAggregateTable","error %d from "
+                    "pgsqlPgAggregateTable_pre_request\n", rc));
+        netsnmp_request_set_error_all(requests, SNMP_VALIDATE_ERR(rc));
+    }
+    
+    return SNMP_ERR_NOERROR;
+} /* _mfd_pgsqlPgAggregateTable_pre_request */
+
+/**
+ * @internal
+ * wrapper
+ */
+static int
+_mfd_pgsqlPgAggregateTable_post_request(netsnmp_mib_handler *handler,
+                             netsnmp_handler_registration *reginfo,
+                             netsnmp_agent_request_info *agtreq_info,
+                             netsnmp_request_info *requests)
+{
+    pgsqlPgAggregateTable_rowreq_ctx *rowreq_ctx;
+    int rc = pgsqlPgAggregateTable_post_request(pgsqlPgAggregateTable_if_ctx.user_ctx);
+    if (MFD_SUCCESS != rc) {
+        /*
+         * nothing we can do about it but log it
+         */
+        DEBUGMSGTL(("internal:pgsqlPgAggregateTable","error %d from "
+                    "pgsqlPgAggregateTable_post_request\n", rc));
+    }
+    
+    /*
+     * if there are no errors, check for and handle row creation/deletion
+     */
+    rc = netsnmp_check_requests_error(requests);
+    if ((SNMP_ERR_NOERROR == rc) &&
+        (NULL !=
+         (rowreq_ctx = netsnmp_container_table_row_extract(requests)))) {
+        if (rowreq_ctx->rowreq_flags & MFD_ROW_CREATED) {
+            rowreq_ctx->rowreq_flags &= ~MFD_ROW_CREATED;
+            CONTAINER_INSERT(pgsqlPgAggregateTable_if_ctx.container, rowreq_ctx);
+        }
+        else if (rowreq_ctx->rowreq_flags & MFD_ROW_DELETED) {
+            CONTAINER_REMOVE(pgsqlPgAggregateTable_if_ctx.container, rowreq_ctx);
+            pgsqlPgAggregateTable_release_rowreq_ctx(rowreq_ctx);
+        }
+    }
+
+    return SNMP_ERR_NOERROR;
+} /* _mfd_pgsqlPgAggregateTable_post_request */
+
+/**
+ * @internal
+ * wrapper
+ */
+static int
+_mfd_pgsqlPgAggregateTable_object_lookup(netsnmp_mib_handler *handler,
+                         netsnmp_handler_registration *reginfo,
+                         netsnmp_agent_request_info *agtreq_info,
+                         netsnmp_request_info *requests)
+{
+    pgsqlPgAggregateTable_rowreq_ctx *rowreq_ctx =
+                  netsnmp_container_table_row_extract(requests);
+    
+    DEBUGMSGTL(("internal:pgsqlPgAggregateTable:_mfd_pgsqlPgAggregateTable_object_lookup","called\n"));
+
+    /*
+     * get our context from mfd
+     * pgsqlPgAggregateTable_interface_ctx *if_ctx =
+     *             (pgsqlPgAggregateTable_interface_ctx *)reginfo->my_reg_void;
+     */
+
+    if(NULL == rowreq_ctx) {
+        netsnmp_request_set_error_all(requests, SNMP_ERR_NOCREATION);
+    }
+    else {
+        pgsqlPgAggregateTable_row_prep(rowreq_ctx);
+    }
+
+    return SNMP_ERR_NOERROR;
+} /* _mfd_pgsqlPgAggregateTable_object_lookup */
+
+/***********************************************************************
+ *
+ * GET processing
+ *
+ ***********************************************************************/
+/*
+ * @internal
+ * Retrieve the value for a particular column
+ */
+NETSNMP_STATIC_INLINE int
+_pgsqlPgAggregateTable_get_column( pgsqlPgAggregateTable_rowreq_ctx *rowreq_ctx,
+                       netsnmp_variable_list *var, int column )
+{
+    int rc = SNMPERR_SUCCESS;
+    
+    DEBUGMSGTL(("internal:pgsqlPgAggregateTable:_mfd_pgsqlPgAggregateTable_get_column","called\n"));
+
+
+    netsnmp_assert(NULL != rowreq_ctx);
+
+    switch(column) {
+
+    /* pgsqlPgAggregateAggfnoid(2)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h */
+    case COLUMN_PGSQLPGAGGREGATEAGGFNOID:
+    var->val_len = sizeof(long);
+    var->type = ASN_INTEGER;
+rc = pgsqlPgAggregateAggfnoid_get(rowreq_ctx, (long *)var->val.string );
+        break;
+
+    /* pgsqlPgAggregateAggtransfn(3)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h */
+    case COLUMN_PGSQLPGAGGREGATEAGGTRANSFN:
+    var->val_len = sizeof(long);
+    var->type = ASN_INTEGER;
+rc = pgsqlPgAggregateAggtransfn_get(rowreq_ctx, (long *)var->val.string );
+        break;
+
+    /* pgsqlPgAggregateAggfinalfn(4)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h */
+    case COLUMN_PGSQLPGAGGREGATEAGGFINALFN:
+    var->val_len = sizeof(long);
+    var->type = ASN_INTEGER;
+rc = pgsqlPgAggregateAggfinalfn_get(rowreq_ctx, (long *)var->val.string );
+        break;
+
+    /* pgsqlPgAggregateAggsortop(5)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h */
+    case COLUMN_PGSQLPGAGGREGATEAGGSORTOP:
+    var->val_len = sizeof(long);
+    var->type = ASN_INTEGER;
+rc = pgsqlPgAggregateAggsortop_get(rowreq_ctx, (long *)var->val.string );
+        break;
+
+    /* pgsqlPgAggregateAggtranstype(6)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h */
+    case COLUMN_PGSQLPGAGGREGATEAGGTRANSTYPE:
+    var->val_len = sizeof(long);
+    var->type = ASN_INTEGER;
+rc = pgsqlPgAggregateAggtranstype_get(rowreq_ctx, (long *)var->val.string );
+        break;
+
+    /* pgsqlPgAggregateAgginitval(7)/DisplayString/ASN_OCTET_STR/char(char)//L/A/w/e/R/d/H */
+    case COLUMN_PGSQLPGAGGREGATEAGGINITVAL:
+    var->type = ASN_OCTET_STR;
+rc = pgsqlPgAggregateAgginitval_get(rowreq_ctx, (char **)&var->val.string, &var->val_len );
+        break;
+
+     default:
+         snmp_log(LOG_ERR,"unknown column %d in _pgsqlPgAggregateTable_get_column\n", column);
+         break;
+    }
+
+    return rc;
+} /* _pgsqlPgAggregateTable_get_column */
+
+int
+_mfd_pgsqlPgAggregateTable_get_values(netsnmp_mib_handler *handler,
+                         netsnmp_handler_registration *reginfo,
+                         netsnmp_agent_request_info *agtreq_info,
+                         netsnmp_request_info *requests)
+{
+    pgsqlPgAggregateTable_rowreq_ctx *rowreq_ctx =
+                  netsnmp_container_table_row_extract(requests);
+    netsnmp_table_request_info * tri;
+    u_char                     * old_string;
+    void                      (*dataFreeHook)(void *);
+    int                        rc;
+
+    DEBUGMSGTL(("internal:pgsqlPgAggregateTable:_mfd_pgsqlPgAggregateTable_get_values","called\n"));
+
+    netsnmp_assert(NULL != rowreq_ctx);
+    
+    for(;requests; requests = requests->next) {
+        /*
+         * save old pointer, so we can free it if replaced
+         */
+        old_string = requests->requestvb->val.string;
+        dataFreeHook = requests->requestvb->dataFreeHook;
+        if(NULL == requests->requestvb->val.string) {
+            requests->requestvb->val.string = requests->requestvb->buf;
+            requests->requestvb->val_len = sizeof(requests->requestvb->buf);
+        }
+        else if(requests->requestvb->buf == requests->requestvb->val.string) {
+            if(requests->requestvb->val_len != sizeof(requests->requestvb->buf))
+                requests->requestvb->val_len = sizeof(requests->requestvb->buf);
+        }
+
+        /*
+         * get column data
+         */
+        tri = netsnmp_extract_table_info(requests);
+        if(NULL == tri)
+            continue;
+        
+        rc = _pgsqlPgAggregateTable_get_column(rowreq_ctx, requests->requestvb, tri->colnum);
+        if(rc) {
+            if(MFD_SKIP == rc) {
+                requests->requestvb->type = ASN_PRIV_RETRY;
+                rc = SNMP_ERR_NOERROR;
+            }
+        }
+        else if (NULL == requests->requestvb->val.string) {
+            snmp_log(LOG_ERR,"NULL varbind data pointer!\n");
+            rc = SNMP_ERR_GENERR;
+        }
+        if(rc)
+            netsnmp_request_set_error(requests, SNMP_VALIDATE_ERR(rc));
+
+        /*
+         * if the buffer wasn't used previously for the old data (i.e. it
+         * was allcoated memory)  and the get routine replaced the pointer,
+         * we need to free the previous pointer.
+         */
+        if(old_string && (old_string != requests->requestvb->buf) &&
+           (requests->requestvb->val.string != old_string)) {
+            if(dataFreeHook)
+                (*dataFreeHook)(old_string);
+            else
+                free(old_string);
+        }
+    } /* for results */
+
+    return SNMP_ERR_NOERROR;
+} /* _mfd_pgsqlPgAggregateTable_get_values */
+
+/***********************************************************************
+ *
+ * SET processing
+ *
+ ***********************************************************************/
+
+/*
+ * NOT APPLICABLE (per MIB or user setting)
+ */
+/***********************************************************************
+ *
+ * DATA ACCESS
+ *
+ ***********************************************************************/
+/**
+ * @internal
+ */
+static int
+_cache_load(netsnmp_cache *cache, void *vmagic)
+{
+    DEBUGMSGTL(("internal:pgsqlPgAggregateTable:_cache_load","called\n"));
+
+    if((NULL == cache) || (NULL == cache->magic)) {
+        snmp_log(LOG_ERR, "invalid cache for pgsqlPgAggregateTable_cache_load\n");
+        return -1;
+    }
+
+    /** should only be called for an invalid or expired cache */
+    netsnmp_assert((0 == cache->valid) || (1 == cache->expired));
+    
+    /*
+     * call user code
+     */
+    return pgsqlPgAggregateTable_cache_load((netsnmp_container*)cache->magic);
+} /* _cache_load */
+
+/**
+ * @internal
+ */
+static void
+_cache_item_free(pgsqlPgAggregateTable_rowreq_ctx *rowreq_ctx, void *context)
+{
+    DEBUGMSGTL(("internal:pgsqlPgAggregateTable:_cache_item_free","called\n"));
+
+    if(NULL == rowreq_ctx)
+        return;
+
+    pgsqlPgAggregateTable_release_rowreq_ctx(rowreq_ctx);
+} /* _cache_item_free */
+
+/**
+ * @internal
+ */
+static void
+_cache_free(netsnmp_cache *cache, void *magic)
+{
+    netsnmp_container *container;
+
+    DEBUGMSGTL(("internal:pgsqlPgAggregateTable:_cache_free","called\n"));
+
+    if((NULL == cache) || (NULL == cache->magic)) {
+        snmp_log(LOG_ERR, "invalid cache in pgsqlPgAggregateTable_cache_free\n");
+        return;
+    }
+
+    container = (netsnmp_container*)cache->magic;
+
+    /*
+     * call user code
+     */
+    pgsqlPgAggregateTable_cache_free(container);
+    
+    /*
+     * free all items. inefficient, but easy.
+     */
+    CONTAINER_CLEAR(container,
+                    (netsnmp_container_obj_func *)_cache_item_free,
+                    NULL);
+} /* _cache_free */
+
+/**
+ * @internal
+ * initialize the iterator container with functions or wrappers
+ */
+void
+_pgsqlPgAggregateTable_container_init(pgsqlPgAggregateTable_interface_ctx *if_ctx)
+{
+    DEBUGMSGTL(("internal:pgsqlPgAggregateTable:_pgsqlPgAggregateTable_container_init","called\n"));
+    
+    /*
+     * set up the cache
+     */
+    if_ctx->cache = netsnmp_cache_create(30, /* timeout in seconds */
+                                         _cache_load, _cache_free,
+                                         pgsqlPgAggregateTable_oid,
+                                         pgsqlPgAggregateTable_oid_size);
+
+    if(NULL == if_ctx->cache) {
+        snmp_log(LOG_ERR, "error creating cache for pgsqlPgAggregateTable\n");
+        return;
+    }
+
+    if_ctx->cache->flags = NETSNMP_CACHE_DONT_INVALIDATE_ON_SET;
+
+    pgsqlPgAggregateTable_container_init(&if_ctx->container, if_ctx->cache);
+    if(NULL == if_ctx->container)
+        if_ctx->container = netsnmp_container_find("pgsqlPgAggregateTable:table_container");
+    if(NULL == if_ctx->container) {
+        snmp_log(LOG_ERR,"error creating container in "
+                 "pgsqlPgAggregateTable_container_init\n");
+        return;
+    }
+    if_ctx->cache->magic = (void*)if_ctx->container;
+} /* _pgsqlPgAggregateTable_container_init */
+
diff --git a/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAggregateTable/pgsqlPgAggregateTable_interface.h b/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAggregateTable/pgsqlPgAggregateTable_interface.h
new file mode 100644 (file)
index 0000000..94a4e9a
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ *       version : 1.43.2.3 $ of : mfd-interface.m2c,v $
+ *
+ * $Id: pgsqlPgAggregateTable_interface.h,v 1.1 2008/01/17 11:49:24 eggyknap Exp $
+ */
+/** @defgroup interface: Routines to interface to Net-SNMP
+ *
+ * \warning This code should not be modified, called directly,
+ *          or used to interpret functionality. It is subject to
+ *          change at any time.
+ * 
+ * @{
+ */
+/*
+ * *********************************************************************
+ * *********************************************************************
+ * *********************************************************************
+ * ***                                                               ***
+ * ***  NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE  ***
+ * ***                                                               ***
+ * ***                                                               ***
+ * ***       THIS FILE DOES NOT CONTAIN ANY USER EDITABLE CODE.      ***
+ * ***                                                               ***
+ * ***                                                               ***
+ * ***       THE GENERATED CODE IS INTERNAL IMPLEMENTATION, AND      ***
+ * ***                                                               ***
+ * ***                                                               ***
+ * ***    IS SUBJECT TO CHANGE WITHOUT WARNING IN FUTURE RELEASES.   ***
+ * ***                                                               ***
+ * ***                                                               ***
+ * *********************************************************************
+ * *********************************************************************
+ * *********************************************************************
+ */
+#ifndef PGSQLPGAGGREGATETABLE_INTERFACE_H
+#define PGSQLPGAGGREGATETABLE_INTERFACE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#include "pgsqlPgAggregateTable.h"
+
+/* ********************************************************************
+ * Table declarations
+ */
+
+/* PUBLIC interface initialization routine */
+void _pgsqlPgAggregateTable_initialize_interface(pgsqlPgAggregateTable_registration_ptr user_ctx,
+                                    u_long flags);
+
+    pgsqlPgAggregateTable_rowreq_ctx * pgsqlPgAggregateTable_allocate_rowreq_ctx(void);
+void pgsqlPgAggregateTable_release_rowreq_ctx(pgsqlPgAggregateTable_rowreq_ctx *rowreq_ctx);
+
+int pgsqlPgAggregateTable_index_to_oid(netsnmp_index *oid_idx,
+                            pgsqlPgAggregateTable_mib_index *mib_idx);
+int pgsqlPgAggregateTable_index_from_oid(netsnmp_index *oid_idx,
+                              pgsqlPgAggregateTable_mib_index *mib_idx);
+
+/*
+ * access to certain internals. use with caution!
+ */
+void pgsqlPgAggregateTable_valid_columns_set(netsnmp_column_info *vc);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PGSQLPGAGGREGATETABLE_INTERFACE_H */
diff --git a/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAggregateTable/pgsqlPgAggregateTable_oids.h b/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAggregateTable/pgsqlPgAggregateTable_oids.h
new file mode 100644 (file)
index 0000000..bb5a69d
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ *  : generic-table-oids.m2c,v 1.10 2004/10/08 23:39:17 rstory Exp $
+ *
+ * $Id: pgsqlPgAggregateTable_oids.h,v 1.1 2008/01/17 11:49:24 eggyknap Exp $
+ */
+#ifndef PGSQLPGAGGREGATETABLE_OIDS_H
+#define PGSQLPGAGGREGATETABLE_OIDS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* column number definitions for table pgsqlPgAggregateTable */
+#define PGSQLPGAGGREGATETABLE_OID              1,3,6,1,4,1,27645,1,2,1
+#define COLUMN_PGSQLPGAGGREGATEENTRYOID                1
+#define COLUMN_PGSQLPGAGGREGATEAGGFNOID                2
+#define COLUMN_PGSQLPGAGGREGATEAGGTRANSFN              3
+#define COLUMN_PGSQLPGAGGREGATEAGGFINALFN              4
+#define COLUMN_PGSQLPGAGGREGATEAGGSORTOP               5
+#define COLUMN_PGSQLPGAGGREGATEAGGTRANSTYPE            6
+#define COLUMN_PGSQLPGAGGREGATEAGGINITVAL              7
+
+#define PGSQLPGAGGREGATETABLE_MIN_COL          COLUMN_PGSQLPGAGGREGATEAGGFNOID
+#define PGSQLPGAGGREGATETABLE_MAX_COL          COLUMN_PGSQLPGAGGREGATEAGGINITVAL
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PGSQLPGAGGREGATETABLE_OIDS_H */
diff --git a/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAmTable/pgsqlPgAmTable.c b/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAmTable/pgsqlPgAmTable.c
new file mode 100644 (file)
index 0000000..d8d6304
--- /dev/null
@@ -0,0 +1,129 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ *       version : 1.32.2.3 $ of : mfd-top.m2c,v $ 
+ *
+ * $Id: pgsqlPgAmTable.c,v 1.1 2008/01/17 12:29:36 eggyknap Exp $
+ */
+/** \mainpage MFD helper for pgsqlPgAmTable
+ *
+ * \section intro Introduction
+ * Introductory text.
+ *
+ */
+/* standard Net-SNMP includes */
+#include <net-snmp/net-snmp-config.h>
+#include <net-snmp/net-snmp-includes.h>
+#include <net-snmp/agent/net-snmp-agent-includes.h>
+
+/* include our parent header */
+#include "pgsqlPgAmTable.h"
+
+#include <net-snmp/agent/mib_modules.h>
+
+#include "pgsqlPgAmTable_interface.h"
+
+oid pgsqlPgAmTable_oid[] = { PGSQLPGAMTABLE_OID };
+int pgsqlPgAmTable_oid_size = OID_LENGTH(pgsqlPgAmTable_oid);
+
+void initialize_table_pgsqlPgAmTable(void);
+
+
+/**
+ * Initializes the pgsqlPgAmTable module
+ */
+void
+init_pgsqlPgAmTable(void)
+{
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:init_pgsqlPgAmTable","called\n"));
+
+    /*
+     * TODO:300:o: Perform pgsqlPgAmTable one-time module initialization.
+     */
+     
+    /*
+     * here we initialize all the tables we're planning on supporting
+     */
+    if (should_init("pgsqlPgAmTable"))
+        initialize_table_pgsqlPgAmTable();
+
+} /* init_pgsqlPgAmTable */
+
+/**
+ * Initialize the table pgsqlPgAmTable 
+ *    (Define its contents and how it's structured)
+ */
+void
+initialize_table_pgsqlPgAmTable(void)
+{
+    pgsqlPgAmTable_registration_ptr user_context;
+    u_long flags;
+
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:initialize_table_pgsqlPgAmTable","called\n"));
+
+    /*
+     * TODO:301:o: Perform pgsqlPgAmTable one-time table initialization.
+     */
+
+    /*
+     * TODO:302:o: |->Initialize pgsqlPgAmTable user context
+     * if you'd like to pass in a pointer to some data for this
+     * table, allocate or set it up here.
+     */
+    /*
+     * a netsnmp_data_list is a simple way to store void pointers. A simple
+     * string token is used to add, find or remove pointers.
+     */
+    user_context = netsnmp_create_data_list("pgsqlPgAmTable", NULL, NULL);
+    
+    /*
+     * No support for any flags yet, but in the future you would
+     * set any flags here.
+     */
+    flags = 0;
+    
+    /*
+     * call interface initialization code
+     */
+    _pgsqlPgAmTable_initialize_interface(user_context, flags);
+} /* initialize_table_pgsqlPgAmTable */
+
+/**
+ * pre-request callback
+ *
+ *
+ * @retval MFD_SUCCESS              : success.
+ * @retval MFD_ERROR                : other error
+ */
+int
+pgsqlPgAmTable_pre_request(pgsqlPgAmTable_registration_ptr user_context)
+{
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmTable_pre_request","called\n"));
+
+    /*
+     * TODO:510:o: Perform pgsqlPgAmTable pre-request actions.
+     */
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmTable_pre_request */
+
+/**
+ * post-request callback
+ *
+ *
+ * @retval MFD_SUCCESS : success.
+ * @retval MFD_ERROR   : other error (ignored)
+ */
+int
+pgsqlPgAmTable_post_request(pgsqlPgAmTable_registration_ptr user_context)
+{
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmTable_post_request","called\n"));
+
+    /*
+     * TODO:511:o: Perform pgsqlPgAmTable pos-request actions.
+     */
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmTable_post_request */
+
+
+/** @{ */
diff --git a/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAmTable/pgsqlPgAmTable.h b/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAmTable/pgsqlPgAmTable.h
new file mode 100644 (file)
index 0000000..a6e5f01
--- /dev/null
@@ -0,0 +1,306 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ *       version : 1.32.2.3 $ of : mfd-top.m2c,v $
+ *
+ * $Id: pgsqlPgAmTable.h,v 1.1 2008/01/17 12:29:36 eggyknap Exp $
+ */
+#ifndef PGSQLPGAMTABLE_H
+#define PGSQLPGAMTABLE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/** @defgroup misc misc: Miscelaneous routines
+ *
+ * @{
+ */
+#include <net-snmp/library/asn1.h>
+
+/* other required module components */
+    /* *INDENT-OFF*  */
+config_require(PGSQL-MIB/pgsqlPgAmTable/pgsqlPgAmTable_interface);
+config_require(PGSQL-MIB/pgsqlPgAmTable/pgsqlPgAmTable_data_access);
+config_require(PGSQL-MIB/pgsqlPgAmTable/pgsqlPgAmTable_data_get);
+config_require(PGSQL-MIB/pgsqlPgAmTable/pgsqlPgAmTable_data_set);
+    /* *INDENT-ON*  */
+
+/* OID and column number definitions for  */
+#include "pgsqlPgAmTable_oids.h"
+
+/* enum definions */
+#include "pgsqlPgAmTable_enums.h"
+
+/* *********************************************************************
+ * function declarations
+ */
+void init_pgsqlPgAmTable(void);
+
+/* *********************************************************************
+ * Table declarations
+ */
+/**********************************************************************
+ **********************************************************************
+ ***
+ *** Table pgsqlPgAmTable
+ ***
+ **********************************************************************
+ **********************************************************************/
+/*
+ * pgsqlPgAmTable is subid 2 of pgsqlCatalogTables.
+ * Its status is Current.
+ * OID: .1.3.6.1.4.1.27645.1.2.2, length: 10
+*/
+/* *********************************************************************
+ * When you register your mib, you get to provide a generic
+ * pointer that will be passed back to you for most of the
+ * functions calls.
+ *
+ * TODO:100:r: Review all context structures
+ */
+    /*
+     * TODO:101:o: |-> Review pgsqlPgAmTable registration context.
+     */
+typedef netsnmp_data_list * pgsqlPgAmTable_registration_ptr;
+
+/**********************************************************************/
+/*
+ * TODO:110:r: |-> Review pgsqlPgAmTable data context structure.
+ * This structure is used to represent the data for pgsqlPgAmTable.
+ */
+/*
+ * This structure contains storage for all the columns defined in the
+ * pgsqlPgAmTable.
+ */
+typedef struct pgsqlPgAmTable_data_s {
+    
+        /*
+         * pgsqlPgAmAmname(2)/DisplayString/ASN_OCTET_STR/char(char)//L/A/w/e/R/d/H
+         */
+   char   pgsqlPgAmAmname[255];
+size_t      pgsqlPgAmAmname_len; /* # of char elements, not bytes */
+    
+        /*
+         * pgsqlPgAmAmstrategies(3)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h
+         */
+   long   pgsqlPgAmAmstrategies;
+    
+        /*
+         * pgsqlPgAmAmsupport(4)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h
+         */
+   long   pgsqlPgAmAmsupport;
+    
+        /*
+         * pgsqlPgAmAmorderstrategy(5)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h
+         */
+   long   pgsqlPgAmAmorderstrategy;
+    
+        /*
+         * pgsqlPgAmAmcanunique(6)/TruthValue/ASN_INTEGER/long(u_long)//l/A/w/E/r/d/h
+         */
+   u_long   pgsqlPgAmAmcanunique;
+    
+        /*
+         * pgsqlPgAmAmcanmulticol(7)/TruthValue/ASN_INTEGER/long(u_long)//l/A/w/E/r/d/h
+         */
+   u_long   pgsqlPgAmAmcanmulticol;
+    
+        /*
+         * pgsqlPgAmAmoptionalkey(8)/TruthValue/ASN_INTEGER/long(u_long)//l/A/w/E/r/d/h
+         */
+   u_long   pgsqlPgAmAmoptionalkey;
+    
+        /*
+         * pgsqlPgAmAmindexnulls(9)/TruthValue/ASN_INTEGER/long(u_long)//l/A/w/E/r/d/h
+         */
+   u_long   pgsqlPgAmAmindexnulls;
+    
+        /*
+         * pgsqlPgAmAmstorage(10)/TruthValue/ASN_INTEGER/long(u_long)//l/A/w/E/r/d/h
+         */
+   u_long   pgsqlPgAmAmstorage;
+    
+        /*
+         * pgsqlPgAmAmclusterable(11)/TruthValue/ASN_INTEGER/long(u_long)//l/A/w/E/r/d/h
+         */
+   u_long   pgsqlPgAmAmclusterable;
+    
+        /*
+         * pgsqlPgAmAminsert(12)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h
+         */
+   long   pgsqlPgAmAminsert;
+    
+        /*
+         * pgsqlPgAmAmbeginscan(13)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h
+         */
+   long   pgsqlPgAmAmbeginscan;
+    
+        /*
+         * pgsqlPgAmAmgettuple(14)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h
+         */
+   long   pgsqlPgAmAmgettuple;
+    
+        /*
+         * pgsqlPgAmAmgetmulti(15)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h
+         */
+   long   pgsqlPgAmAmgetmulti;
+    
+        /*
+         * pgsqlPgAmAmrescan(16)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h
+         */
+   long   pgsqlPgAmAmrescan;
+    
+        /*
+         * pgsqlPgAmAmendscan(17)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h
+         */
+   long   pgsqlPgAmAmendscan;
+    
+        /*
+         * pgsqlPgAmAmmarkpos(18)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h
+         */
+   long   pgsqlPgAmAmmarkpos;
+    
+        /*
+         * pgsqlPgAmAmrestrpos(19)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h
+         */
+   long   pgsqlPgAmAmrestrpos;
+    
+        /*
+         * pgsqlPgAmAmbuild(20)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h
+         */
+   long   pgsqlPgAmAmbuild;
+    
+        /*
+         * pgsqlPgAmAmbulkdelete(21)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h
+         */
+   long   pgsqlPgAmAmbulkdelete;
+    
+        /*
+         * pgsqlPgAmAmvacuumcleanup(22)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h
+         */
+   long   pgsqlPgAmAmvacuumcleanup;
+    
+        /*
+         * pgsqlPgAmAmcostestimate(23)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h
+         */
+   long   pgsqlPgAmAmcostestimate;
+    
+        /*
+         * pgsqlPgAmAmoptions(24)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h
+         */
+   long   pgsqlPgAmAmoptions;
+    
+} pgsqlPgAmTable_data;
+
+
+/*
+ * TODO:120:r: |-> Review pgsqlPgAmTable mib index.
+ * This structure is used to represent the index for pgsqlPgAmTable.
+ */
+typedef struct pgsqlPgAmTable_mib_index_s {
+
+        /*
+         * pgsnmpdConnID(1)/DisplayString/ASN_OCTET_STR/char(char)//L/a/w/e/R/d/H
+         */
+        /** 128 - 2(other indexes) - oid length(12) = 113 */
+   char   pgsnmpdConnID[113];
+   size_t      pgsnmpdConnID_len;
+
+        /*
+         * rdbmsDbIndex(1)/INTEGER/ASN_INTEGER/long(long)//l/a/w/e/R/d/h
+         */
+   long   rdbmsDbIndex;
+
+        /*
+         * pgsqlPgAmEntryOID(1)/INTEGER/ASN_INTEGER/long(long)//l/a/w/e/r/d/h
+         */
+   long   pgsqlPgAmEntryOID;
+
+
+} pgsqlPgAmTable_mib_index;
+
+    /*
+     * TODO:121:r: |   |-> Review pgsqlPgAmTable max index length.
+     * If you KNOW that your indexes will never exceed a certain
+     * length, update this macro to that length.
+     *
+     * BE VERY CAREFUL TO TAKE INTO ACCOUNT THE MAXIMUM
+     * POSSIBLE LENGHT FOR EVERY VARIABLE LENGTH INDEX!
+     * Guessing 128 - col/entry(2)  - oid len(10)
+*/
+#define MAX_pgsqlPgAmTable_IDX_LEN     116
+
+
+/* *********************************************************************
+ * TODO:130:o: |-> Review pgsqlPgAmTable Row request (rowreq) context.
+ * When your functions are called, you will be passed a
+ * pgsqlPgAmTable_rowreq_ctx pointer.
+ */
+typedef struct pgsqlPgAmTable_rowreq_ctx_s {
+
+    /** this must be first for container compare to work */
+    netsnmp_index        oid_idx;
+    oid                  oid_tmp[MAX_pgsqlPgAmTable_IDX_LEN];
+    
+    pgsqlPgAmTable_mib_index        tbl_idx;
+    
+    pgsqlPgAmTable_data              data;
+
+    /*
+     * flags per row. Currently, the first (lower) 8 bits are reserved
+     * for the user. See mfd.h for other flags.
+     */
+    u_int                       rowreq_flags;
+
+    /*
+     * implementor's context pointer (provided during registration)
+     */
+    pgsqlPgAmTable_registration_ptr pgsqlPgAmTable_reg;
+
+    /*
+     * TODO:131:o: |   |-> Add useful data to pgsqlPgAmTable rowreq context.
+     */
+    
+    /*
+     * storage for future expansion
+     */
+    netsnmp_data_list             *pgsqlPgAmTable_data_list;
+
+} pgsqlPgAmTable_rowreq_ctx;
+
+typedef struct pgsqlPgAmTable_ref_rowreq_ctx_s {
+    pgsqlPgAmTable_rowreq_ctx *rowreq_ctx;
+} pgsqlPgAmTable_ref_rowreq_ctx;
+
+/* *********************************************************************
+ * function prototypes
+ */
+    int pgsqlPgAmTable_pre_request(pgsqlPgAmTable_registration_ptr user_context);
+    int pgsqlPgAmTable_post_request(pgsqlPgAmTable_registration_ptr user_context);
+
+
+extern oid pgsqlPgAmTable_oid[];
+extern int pgsqlPgAmTable_oid_size;
+
+
+#include "pgsqlPgAmTable_interface.h"
+#include "pgsqlPgAmTable_data_access.h"
+#include "pgsqlPgAmTable_data_get.h"
+#include "pgsqlPgAmTable_data_set.h"
+
+/*
+ * DUMMY markers, ignore
+ *
+ * TODO:099:x: *************************************************************
+ * TODO:199:x: *************************************************************
+ * TODO:299:x: *************************************************************
+ * TODO:399:x: *************************************************************
+ * TODO:499:x: *************************************************************
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PGSQLPGAMTABLE_H */
diff --git a/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAmTable/pgsqlPgAmTable_data_access.c b/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAmTable/pgsqlPgAmTable_data_access.c
new file mode 100644 (file)
index 0000000..0d910c4
--- /dev/null
@@ -0,0 +1,312 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ *       version : 1.12 $ of : mfd-data-access.m2c,v $ 
+ *
+ * $Id: pgsqlPgAmTable_data_access.c,v 1.1 2008/01/17 12:29:36 eggyknap Exp $
+ */
+#include "pgsnmpd.h"
+
+/* include our parent header */
+#include "pgsqlPgAmTable.h"
+#include "pgsqlPgAmTable_data_access.h"
+
+/** @defgroup data_access data_access: Routines to access data
+ *
+ * These routines are used to locate the data used to satisfy
+ * requests.
+ * 
+ * @{
+ */
+/**********************************************************************
+ **********************************************************************
+ ***
+ *** Table pgsqlPgAmTable
+ ***
+ **********************************************************************
+ **********************************************************************/
+/*
+ * pgsqlPgAmTable is subid 2 of pgsqlCatalogTables.
+ * Its status is Current.
+ * OID: .1.3.6.1.4.1.27645.1.2.2, length: 10
+*/
+
+/**
+ * initialization for pgsqlPgAmTable data access
+ *
+ * This function is called during startup to allow you to
+ * allocate any resources you need for the data table.
+ *
+ * @param pgsqlPgAmTable_reg
+ *        Pointer to pgsqlPgAmTable_registration
+ *
+ * @retval MFD_SUCCESS : success.
+ * @retval MFD_ERROR   : unrecoverable error.
+ */
+int
+pgsqlPgAmTable_init_data(pgsqlPgAmTable_registration_ptr pgsqlPgAmTable_reg)
+{
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmTable_init_data","called\n"));
+
+    /*
+     * TODO:303:o: Initialize pgsqlPgAmTable data.
+     */
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmTable_init_data */
+
+/**
+ * container-cached overview
+ *
+ */
+
+/***********************************************************************
+ *
+ * cache
+ *
+ ***********************************************************************/
+/**
+ * container initialization
+ *
+ * @param container_ptr_ptr A pointer to a container pointer. If you
+ *        create a custom container, use this parameter to return it
+ *        to the MFD helper. If set to NULL, the MFD helper will
+ *        allocate a container for you.
+ * @param  cache A pointer to a cache structure. You can set the timeout
+ *         and other cache flags using this pointer.
+ *
+ *  This function is called at startup to allow you to customize certain
+ *  aspects of the access method. For the most part, it is for advanced
+ *  users. The default code should suffice for most cases. If no custom
+ *  container is allocated, the MFD code will create one for your.
+ *
+ *  This is also the place to set up cache behavior. The default, to
+ *  simply set the cache timeout, will work well with the default
+ *  container. If you are using a custom container, you may want to
+ *  look at the cache helper documentation to see if there are any
+ *  flags you want to set.
+ *
+ * @remark
+ *  This would also be a good place to do any initialization needed
+ *  for you data source. For example, opening a connection to another
+ *  process that will supply the data, opening a database, etc.
+ */
+void
+pgsqlPgAmTable_container_init(netsnmp_container **container_ptr_ptr,
+                        netsnmp_cache *cache)
+{
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmTable_container_init","called\n"));
+    
+    if((NULL == cache) || (NULL == container_ptr_ptr)) {
+        snmp_log(LOG_ERR,"bad params to pgsqlPgAmTable_container_init\n");
+        return;
+    }
+
+    /*
+     * For advanced users, you can use a custom container. If you
+     * do not create one, one will be created for you.
+     */
+    *container_ptr_ptr = NULL;
+
+    /*
+     * TODO:345:A: Set up pgsqlPgAmTable cache properties.
+     *
+     * Also for advanced users, you can set parameters for the
+     * cache. Do not change the magic pointer, as it is used
+     * by the MFD helper. To completely disable caching, set
+     * cache->enabled to 0.
+     */
+    cache->timeout = PGSQLPGAMTABLE_CACHE_TIMEOUT; /* seconds */
+} /* pgsqlPgAmTable_container_init */
+
+/**
+ * load cache data
+ *
+ * TODO:350:M: Implement pgsqlPgAmTable cache load
+ *
+ * @param container container to which items should be inserted
+ *
+ * @retval MFD_SUCCESS              : success.
+ * @retval MFD_RESOURCE_UNAVAILABLE : Can't access data source
+ * @retval MFD_ERROR                : other error.
+ *
+ *  This function is called to cache the index(es) (and data, optionally)
+ *  for the every row in the data set.
+ *
+ * @remark
+ *  While loading the cache, the only important thing is the indexes.
+ *  If access to your data is cheap/fast (e.g. you have a pointer to a
+ *  structure in memory), it would make sense to update the data here.
+ *  If, however, the accessing the data invovles more work (e.g. parsing
+ *  some other existing data, or peforming calculations to derive the data),
+ *  then you can limit yourself to setting the indexes and saving any
+ *  information you will need later. Then use the saved information in
+ *  pgsqlPgAmTable_row_prep() for populating data.
+ *
+ * @note
+ *  If you need consistency between rows (like you want statistics
+ *  for each row to be from the same time frame), you should set all
+ *  data here.
+ *
+ */
+int
+pgsqlPgAmTable_cache_load(netsnmp_container *container)
+{
+    pgsqlPgAmTable_rowreq_ctx *rowreq_ctx;
+    size_t                 count = 0;
+
+   int i, resultCount, tmpInt;
+   char *tmpString;
+   PGresult *pg_db_qry;
+
+   char   pgsnmpdConnID[112] = "Default conn ID";
+   size_t      pgsnmpdConnID_len = strlen(pgsnmpdConnID);
+   long   rdbmsDbIndex = 1;
+   long   pgsqlPgAmEntryOID;
+
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmTable_cache_load","called\n"));
+    snmp_log(LOG_INFO, "Running pgsqlPgAmTable\n");
+
+    if (PQstatus(dbconn) == CONNECTION_OK)
+       pg_db_qry = PQexec(dbconn, "SELECT oid, amname, amstrategies, amsupport, amorderstrategy, CASE WHEN amcanunique THEN 1 ELSE 2 END, CASE WHEN amcanmulticol THEN 1 ELSE 2 END, CASE WHEN amoptionalkey THEN 1 ELSE 2 END, CASE WHEN amindexnulls THEN 1 ELSE 2 END, CASE WHEN amstorage THEN 1 ELSE 2 END, CASE WHEN amclusterable THEN 1 ELSE 2 END, aminsert, ambeginscan, amgettuple, amgetmulti, amrescan, amendscan, ammarkpos, amrestrpos, ambuild, ambulkdelete, amvacuumcleanup, amcostestimate, amoptions  FROM pg_am");
+    else {
+           snmp_log(LOG_ERR, "Can't get connected to database\n");
+           return MFD_RESOURCE_UNAVAILABLE;
+    }
+    if (PQresultStatus(pg_db_qry) != PGRES_TUPLES_OK) {
+           snmp_log(LOG_ERR, "Didn't get any results from the database\n");
+           PQclear(pg_db_qry);
+           return MFD_RESOURCE_UNAVAILABLE;
+    }
+    resultCount = PQntuples(pg_db_qry);
+
+    /*
+     * TODO:351:M: |-> Load/update data in the pgsqlPgAmTable container.
+     * loop over your pgsqlPgAmTable data, allocate a rowreq context,
+     * set the index(es) [and data, optionally] and insert into
+     * the container.
+     */
+    for (i = 0; i < resultCount; i++) {
+        /*
+         * TODO:352:M: |   |-> set indexes in new pgsqlPgAmTable rowreq context.
+         */
+        rowreq_ctx = pgsqlPgAmTable_allocate_rowreq_ctx();
+        if (NULL == rowreq_ctx) {
+            snmp_log(LOG_ERR, "memory allocation failed\n");
+            return MFD_RESOURCE_UNAVAILABLE;
+        }
+        if(MFD_SUCCESS != pgsqlPgAmTable_indexes_set(rowreq_ctx
+                               , pgsnmpdConnID, pgsnmpdConnID_len
+                               , rdbmsDbIndex
+                               , atol(PQgetvalue(pg_db_qry, i, 0))
+               )) {
+            snmp_log(LOG_ERR,"error setting index while loading "
+                     "pgsqlPgAmTable cache.\n");
+            pgsqlPgAmTable_release_rowreq_ctx(rowreq_ctx);
+            continue;
+        }
+       rowreq_ctx->data.pgsqlPgAmAmname_len = 255;
+
+       tmpString = PQgetvalue(pg_db_qry, i, 1);
+       tmpInt = strlen(tmpString);
+       if ((NULL == rowreq_ctx->data.pgsqlPgAmAmname) ||
+               (rowreq_ctx->data.pgsqlPgAmAmname_len < (tmpInt * sizeof(rowreq_ctx->data.pgsqlPgAmAmname[0])))) {
+               snmp_log(LOG_ERR,"not enough space for value\n");
+               return MFD_ERROR;
+       }
+       rowreq_ctx->data.pgsqlPgAmAmname_len = tmpInt * sizeof(rowreq_ctx->data.pgsqlPgAmAmname[0]);
+       memcpy( rowreq_ctx->data.pgsqlPgAmAmname, tmpString, rowreq_ctx->data.pgsqlPgAmAmname_len );
+    
+    rowreq_ctx->data.pgsqlPgAmAmstrategies = strtoul(PQgetvalue(pg_db_qry, i, 2), NULL, 10);
+    rowreq_ctx->data.pgsqlPgAmAmsupport = strtoul(PQgetvalue(pg_db_qry, i, 3), NULL, 10);
+    rowreq_ctx->data.pgsqlPgAmAmorderstrategy = strtoul(PQgetvalue(pg_db_qry, i, 4), NULL, 10);
+
+    /* These are TruthValue columns. 1 = true, 2 = false */
+    rowreq_ctx->data.pgsqlPgAmAmcanunique, strtoul(PQgetvalue(pg_db_qry, i, 5), NULL, 10);
+    rowreq_ctx->data.pgsqlPgAmAmcanmulticol, strtoul(PQgetvalue(pg_db_qry, i, 6), NULL, 10);
+    rowreq_ctx->data.pgsqlPgAmAmoptionalkey, strtoul(PQgetvalue(pg_db_qry, i, 7), NULL, 10);
+    rowreq_ctx->data.pgsqlPgAmAmindexnulls, strtoul(PQgetvalue(pg_db_qry, i, 8), NULL, 10);
+    rowreq_ctx->data.pgsqlPgAmAmstorage, strtoul(PQgetvalue(pg_db_qry, i, 9), NULL, 10);
+    rowreq_ctx->data.pgsqlPgAmAmclusterable, strtoul(PQgetvalue(pg_db_qry, i, 10), NULL, 10);
+    
+    rowreq_ctx->data.pgsqlPgAmAminsert = strtoul(PQgetvalue(pg_db_qry, i, 11), NULL, 10);
+    rowreq_ctx->data.pgsqlPgAmAmbeginscan = strtoul(PQgetvalue(pg_db_qry, i, 12), NULL, 10);
+    rowreq_ctx->data.pgsqlPgAmAmgettuple = strtoul(PQgetvalue(pg_db_qry, i, 13), NULL, 10);
+    rowreq_ctx->data.pgsqlPgAmAmgetmulti = strtoul(PQgetvalue(pg_db_qry, i, 14), NULL, 10);
+    rowreq_ctx->data.pgsqlPgAmAmrescan = strtoul(PQgetvalue(pg_db_qry, i, 15), NULL, 10);
+    rowreq_ctx->data.pgsqlPgAmAmendscan = strtoul(PQgetvalue(pg_db_qry, i, 16), NULL, 10);
+    rowreq_ctx->data.pgsqlPgAmAmmarkpos = strtoul(PQgetvalue(pg_db_qry, i, 17), NULL, 10);
+    rowreq_ctx->data.pgsqlPgAmAmrestrpos = strtoul(PQgetvalue(pg_db_qry, i, 18), NULL, 10);
+    rowreq_ctx->data.pgsqlPgAmAmbuild = strtoul(PQgetvalue(pg_db_qry, i, 19), NULL, 10);
+    rowreq_ctx->data.pgsqlPgAmAmbulkdelete = strtoul(PQgetvalue(pg_db_qry, i, 20), NULL, 10);
+    rowreq_ctx->data.pgsqlPgAmAmvacuumcleanup = strtoul(PQgetvalue(pg_db_qry, i, 21), NULL, 10);
+    rowreq_ctx->data.pgsqlPgAmAmcostestimate = strtoul(PQgetvalue(pg_db_qry, i, 22), NULL, 10);
+    rowreq_ctx->data.pgsqlPgAmAmoptions = strtoul(PQgetvalue(pg_db_qry, i, 23), NULL, 10);
+    
+        /*
+         * insert into table container
+         */
+        CONTAINER_INSERT(container, rowreq_ctx);
+        ++count;
+    }
+
+
+    DEBUGMSGT(("verbose:pgsqlPgAmTable:pgsqlPgAmTable_cache_load",
+               "inserted %d records\n", count));
+    PQclear(pg_db_qry);
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmTable_cache_load */
+
+/**
+ * cache clean up
+ *
+ * @param container container with all current items
+ *
+ *  This optional callback is called prior to all
+ *  item's being removed from the container. If you
+ *  need to do any processing before that, do it here.
+ *
+ * @note
+ *  The MFD helper will take care of releasing all the row contexts.
+ *
+ */
+void
+pgsqlPgAmTable_cache_free(netsnmp_container *container)
+{
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmTable_cache_free","called\n"));
+
+    /*
+     * TODO:380:M: Free pgsqlPgAmTable cache.
+     */
+} /* pgsqlPgAmTable_cache_free */
+
+/**
+ * prepare row for processing.
+ *
+ *  When the agent has located the row for a request, this function is
+ *  called to prepare the row for processing. If you fully populated
+ *  the data context during the index setup phase, you may not need to
+ *  do anything.
+ *
+ * @param rowreq_ctx pointer to a context.
+ *
+ * @retval MFD_SUCCESS     : success.
+ * @retval MFD_ERROR       : other error.
+ */
+int
+pgsqlPgAmTable_row_prep( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx)
+{
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmTable_row_prep","called\n"));
+
+    netsnmp_assert(NULL != rowreq_ctx);
+
+    /*
+     * TODO:390:o: Prepare row for request.
+     * If populating row data was delayed, this is the place to
+     * fill in the row for this request.
+     */
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmTable_row_prep */
+
+/** @} */
diff --git a/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAmTable/pgsqlPgAmTable_data_access.h b/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAmTable/pgsqlPgAmTable_data_access.h
new file mode 100644 (file)
index 0000000..29987d0
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ *       version : 1.12 $ of : mfd-data-access.m2c,v $
+ *
+ * $Id: pgsqlPgAmTable_data_access.h,v 1.1 2008/01/17 12:29:36 eggyknap Exp $
+ */
+#ifndef PGSQLPGAMTABLE_DATA_ACCESS_H
+#define PGSQLPGAMTABLE_DATA_ACCESS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* *********************************************************************
+ * function declarations
+ */
+
+/* *********************************************************************
+ * Table declarations
+ */
+/**********************************************************************
+ **********************************************************************
+ ***
+ *** Table pgsqlPgAmTable
+ ***
+ **********************************************************************
+ **********************************************************************/
+/*
+ * pgsqlPgAmTable is subid 2 of pgsqlCatalogTables.
+ * Its status is Current.
+ * OID: .1.3.6.1.4.1.27645.1.2.2, length: 10
+*/
+
+
+    int pgsqlPgAmTable_init_data(pgsqlPgAmTable_registration_ptr pgsqlPgAmTable_reg);
+
+
+/*
+ * TODO:180:o: Review pgsqlPgAmTable cache timeout.
+ * The number of seconds before the cache times out
+ */
+#define PGSQLPGAMTABLE_CACHE_TIMEOUT   60
+
+void pgsqlPgAmTable_container_init(netsnmp_container **container_ptr_ptr,
+                             netsnmp_cache *cache);
+int pgsqlPgAmTable_cache_load(netsnmp_container *container);
+void pgsqlPgAmTable_cache_free(netsnmp_container *container);
+
+    /*
+    ***************************************************
+    ***             START EXAMPLE CODE              ***
+    ***---------------------------------------------***/
+/* *********************************************************************
+ * Since we have no idea how you really access your data, we'll go with
+ * a worst case example: a flat text file.
+ */
+#define MAX_LINE_SIZE 256
+    /*
+    ***---------------------------------------------***
+    ***              END  EXAMPLE CODE              ***
+    ***************************************************/
+    int pgsqlPgAmTable_row_prep( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PGSQLPGAMTABLE_DATA_ACCESS_H */
diff --git a/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAmTable/pgsqlPgAmTable_data_get.c b/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAmTable/pgsqlPgAmTable_data_get.c
new file mode 100644 (file)
index 0000000..84d66fb
--- /dev/null
@@ -0,0 +1,2289 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ *       version : 1.18.2.1 $ of : mfd-data-get.m2c,v $ 
+ *
+ * $Id: pgsqlPgAmTable_data_get.c,v 1.1 2008/01/17 12:29:36 eggyknap Exp $
+ */
+/* standard Net-SNMP includes */
+#include <net-snmp/net-snmp-config.h>
+#include <net-snmp/net-snmp-includes.h>
+#include <net-snmp/agent/net-snmp-agent-includes.h>
+
+/* include our parent header */
+#include "pgsqlPgAmTable.h"
+
+
+/** @defgroup data_get data_get: Routines to get data
+ *
+ * TODO:230:M: Implement pgsqlPgAmTable get routines.
+ * TODO:240:M: Implement pgsqlPgAmTable mapping routines (if any).
+ *
+ * These routine are used to get the value for individual objects. The
+ * row context is passed, along with a pointer to the memory where the
+ * value should be copied.
+ *
+ * @{
+ */
+/**********************************************************************
+ **********************************************************************
+ ***
+ *** Table pgsqlPgAmTable
+ ***
+ **********************************************************************
+ **********************************************************************/
+/*
+ * pgsqlPgAmTable is subid 2 of pgsqlCatalogTables.
+ * Its status is Current.
+ * OID: .1.3.6.1.4.1.27645.1.2.2, length: 10
+*/
+
+/* ---------------------------------------------------------------------
+ * TODO:200:r: Implement pgsqlPgAmTable data context functions.
+ */
+
+/*---------------------------------------------------------------------
+ * PGSQL-MIB::pgsqlPgAmEntry.pgsqlPgAmEntryOID
+ * pgsqlPgAmEntryOID is subid 1 of pgsqlPgAmEntry.
+ * Its status is Current, and its access level is NoAccess.
+ * OID: .1.3.6.1.4.1.27645.1.2.2.1.1
+ * Description:
+OID of this entry
+ *
+ * Attributes:
+ *   accessible 0     isscalar 0     enums  0      hasdefval 0
+ *   readable   0     iscolumn 1     ranges 0      hashint   0
+ *   settable   0
+ *
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ *
+ *
+ *
+ * NOTE: NODE pgsqlPgAmEntryOID IS NOT ACCESSIBLE
+ *
+ *
+ */
+/**
+ * map a value from its original native format to the MIB format.
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_ERROR           : Any other error
+ *
+ * @note parameters follow the memset convention (dest, src).
+ *
+ * @note generation and use of this function can be turned off by re-running
+ * mib2c after adding the following line to the file
+ * default-node-pgsqlPgAmEntryOID.m2d :
+ *   @eval $m2c_node_skip_mapping = 1@
+ *
+ * @remark
+ *  If the values for your data type don't exactly match the
+ *  possible values defined by the mib, you should map them here.
+ *  Otherwise, just do a direct copy.
+ */
+int
+pgsqlPgAmEntryOID_map(long *mib_pgsqlPgAmEntryOID_val_ptr, long raw_pgsqlPgAmEntryOID_val)
+{
+    netsnmp_assert(NULL != mib_pgsqlPgAmEntryOID_val_ptr);
+    
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmEntryOID_map","called\n"));
+    
+    /*
+     * TODO:241:o: |-> Implement pgsqlPgAmEntryOID mapping.
+     * If the values for your data type don't exactly match the
+     * possible values defined by the mib, you should map them here.
+     */
+    (*mib_pgsqlPgAmEntryOID_val_ptr) = raw_pgsqlPgAmEntryOID_val;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmEntryOID_map */
+
+
+/**
+ * set mib index(es)
+ *
+ * @param tbl_idx mib index structure
+ *
+ * @retval MFD_SUCCESS     : success.
+ * @retval MFD_ERROR       : other error.
+ *
+ * @remark
+ *  This convenience function is useful for setting all the MIB index
+ *  components with a single function call. It is assume that the C values
+ *  have already been mapped from their native/rawformat to the MIB format.
+ */
+int
+pgsqlPgAmTable_indexes_set_tbl_idx(pgsqlPgAmTable_mib_index *tbl_idx, char *pgsnmpdConnID_val_ptr,  size_t pgsnmpdConnID_val_ptr_len, long rdbmsDbIndex_val, long pgsqlPgAmEntryOID_val)
+{
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmTable_indexes_set_tbl_idx","called\n"));
+
+    /* pgsnmpdConnID(1)/DisplayString/ASN_OCTET_STR/char(char)//L/a/w/e/R/d/H */
+     tbl_idx->pgsnmpdConnID_len = sizeof(tbl_idx->pgsnmpdConnID);
+    /*
+     * make sure there is enough space for pgsnmpdConnID data
+     */
+    if ((NULL == tbl_idx->pgsnmpdConnID) ||
+        (tbl_idx->pgsnmpdConnID_len < (pgsnmpdConnID_val_ptr_len * sizeof(tbl_idx->pgsnmpdConnID[0])))) {
+        snmp_log(LOG_ERR,"not enough space for value\n");
+        return MFD_ERROR;
+    }
+    tbl_idx->pgsnmpdConnID_len = pgsnmpdConnID_val_ptr_len * sizeof(tbl_idx->pgsnmpdConnID[0]);
+    memcpy( tbl_idx->pgsnmpdConnID, pgsnmpdConnID_val_ptr, tbl_idx->pgsnmpdConnID_len );
+    
+    /* rdbmsDbIndex(1)/INTEGER/ASN_INTEGER/long(long)//l/a/w/e/R/d/h */
+    tbl_idx->rdbmsDbIndex = rdbmsDbIndex_val;
+    
+    /* pgsqlPgAmEntryOID(1)/INTEGER/ASN_INTEGER/long(long)//l/a/w/e/r/d/h */
+    tbl_idx->pgsqlPgAmEntryOID = pgsqlPgAmEntryOID_val;
+    
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmTable_indexes_set_tbl_idx */
+
+/**
+ * @internal
+ * set row context indexes
+ *
+ * @param reqreq_ctx the row context that needs updated indexes
+ *
+ * @retval MFD_SUCCESS     : success.
+ * @retval MFD_ERROR       : other error.
+ *
+ * @remark
+ *  This function sets the mib indexs, then updates the oid indexs
+ *  from the mib index.
+ */
+int
+pgsqlPgAmTable_indexes_set(pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, char *pgsnmpdConnID_val_ptr,  size_t pgsnmpdConnID_val_ptr_len, long rdbmsDbIndex_val, long pgsqlPgAmEntryOID_val)
+{
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmTable_indexes_set","called\n"));
+
+    if(MFD_SUCCESS != pgsqlPgAmTable_indexes_set_tbl_idx(&rowreq_ctx->tbl_idx
+                                   , pgsnmpdConnID_val_ptr, pgsnmpdConnID_val_ptr_len
+                                   , rdbmsDbIndex_val
+                                   , pgsqlPgAmEntryOID_val
+           ))
+        return MFD_ERROR;
+
+    /*
+     * convert mib index to oid index
+     */
+    rowreq_ctx->oid_idx.len = sizeof(rowreq_ctx->oid_tmp) / sizeof(oid);
+    if(0 != pgsqlPgAmTable_index_to_oid(&rowreq_ctx->oid_idx,
+                                    &rowreq_ctx->tbl_idx)) {
+        return MFD_ERROR;
+    }
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmTable_indexes_set */
+
+
+/*---------------------------------------------------------------------
+ * PGSQL-MIB::pgsqlPgAmEntry.pgsqlPgAmAmname
+ * pgsqlPgAmAmname is subid 2 of pgsqlPgAmEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.4.1.27645.1.2.2.1.2
+ * Description:
+Name of the access method
+ *
+ * Attributes:
+ *   accessible 1     isscalar 0     enums  0      hasdefval 0
+ *   readable   1     iscolumn 1     ranges 1      hashint   1
+ *   settable   0
+ *   hint: 255a
+ *
+ * Ranges:  0 - 255;
+ *
+ * Its syntax is DisplayString (based on perltype OCTETSTR)
+ * The net-snmp type is ASN_OCTET_STR. The C type decl is char (char)
+ * This data type requires a length.  (Max 255)
+ */
+/**
+ * map a value from its original native format to the MIB format.
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_ERROR           : Any other error
+ *
+ * @note parameters follow the memset convention (dest, src).
+ *
+ * @note generation and use of this function can be turned off by re-running
+ * mib2c after adding the following line to the file
+ * default-node-pgsqlPgAmAmname.m2d :
+ *   @eval $m2c_node_skip_mapping = 1@
+ *
+ * @remark
+ *  If the values for your data type don't exactly match the
+ *  possible values defined by the mib, you should map them here.
+ *  Otherwise, just do a direct copy.
+ */
+int
+pgsqlPgAmAmname_map(char **mib_pgsqlPgAmAmname_val_ptr_ptr, size_t *mib_pgsqlPgAmAmname_val_ptr_len_ptr, char *raw_pgsqlPgAmAmname_val_ptr, size_t raw_pgsqlPgAmAmname_val_ptr_len, int allow_realloc)
+{
+    int converted_len;
+
+    netsnmp_assert(NULL != raw_pgsqlPgAmAmname_val_ptr);
+    netsnmp_assert((NULL != mib_pgsqlPgAmAmname_val_ptr_ptr) && (NULL != mib_pgsqlPgAmAmname_val_ptr_len_ptr));
+    
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmname_map","called\n"));
+    
+    /*
+     * TODO:241:r: |-> Implement pgsqlPgAmAmname non-integer mapping
+     * it is hard to autogenerate code for mapping types that are not simple
+     * integers, so here is an idea of what you might need to do. It will
+     * probably need some tweaking to get right.
+     */
+    /*
+     * if the length of the raw data doesn't directly correspond with
+     * the length of the mib data, set converted_len to the
+     * space required.
+     */
+    converted_len = raw_pgsqlPgAmAmname_val_ptr_len; /* assume equal */
+    if((NULL == *mib_pgsqlPgAmAmname_val_ptr_ptr) || (*mib_pgsqlPgAmAmname_val_ptr_len_ptr < converted_len)) {
+        if(! allow_realloc) {
+            snmp_log(LOG_ERR,"not enough space for value mapping\n");
+            return SNMP_ERR_GENERR;
+        }
+        *mib_pgsqlPgAmAmname_val_ptr_ptr = realloc( *mib_pgsqlPgAmAmname_val_ptr_ptr, converted_len * sizeof(**mib_pgsqlPgAmAmname_val_ptr_ptr));
+        if(NULL == *mib_pgsqlPgAmAmname_val_ptr_ptr) {
+            snmp_log(LOG_ERR,"could not allocate memory\n");
+            return SNMP_ERR_GENERR;
+        }
+    }
+    *mib_pgsqlPgAmAmname_val_ptr_len_ptr = converted_len;
+    memcpy( *mib_pgsqlPgAmAmname_val_ptr_ptr, raw_pgsqlPgAmAmname_val_ptr, converted_len );
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmname_map */
+
+/**
+ * Extract the current value of the pgsqlPgAmAmname data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ *        Pointer to the row request context.
+ * @param pgsqlPgAmAmname_val_ptr_ptr
+ *        Pointer to storage for a char variable
+ * @param pgsqlPgAmAmname_val_ptr_len_ptr
+ *        Pointer to a size_t. On entry, it will contain the size (in bytes)
+ *        pointed to by pgsqlPgAmAmname.
+ *        On exit, this value should contain the data size (in bytes).
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_SKIP            : skip this node (no value for now)
+ * @retval MFD_ERROR           : Any other error
+*
+ * @note If you need more than (*pgsqlPgAmAmname_val_ptr_len_ptr) bytes of memory,
+ *       allocate it using malloc() and update pgsqlPgAmAmname_val_ptr_ptr.
+ *       <b>DO NOT</b> free the previous pointer.
+ *       The MFD helper will release the memory you allocate.
+ *
+ * @remark If you call this function yourself, you are responsible
+ *         for checking if the pointer changed, and freeing any
+ *         previously allocated memory. (Not necessary if you pass
+ *         in a pointer to static memory, obviously.)
+ */
+int
+pgsqlPgAmAmname_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, char **pgsqlPgAmAmname_val_ptr_ptr, size_t *pgsqlPgAmAmname_val_ptr_len_ptr )
+{
+   /** we should have a non-NULL pointer and enough storage */
+   netsnmp_assert( (NULL != pgsqlPgAmAmname_val_ptr_ptr) && (NULL != *pgsqlPgAmAmname_val_ptr_ptr));
+   netsnmp_assert( NULL != pgsqlPgAmAmname_val_ptr_len_ptr );
+
+
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmname_get","called\n"));
+
+    netsnmp_assert(NULL != rowreq_ctx);
+
+/*
+ * TODO:231:o: |-> Extract the current value of the pgsqlPgAmAmname data.
+ * set (* pgsqlPgAmAmname_val_ptr_ptr ) and (* pgsqlPgAmAmname_val_ptr_len_ptr ) from rowreq_ctx->data
+ */
+    /*
+     * make sure there is enough space for pgsqlPgAmAmname data
+     */
+    if ((NULL == (* pgsqlPgAmAmname_val_ptr_ptr )) ||
+        ((* pgsqlPgAmAmname_val_ptr_len_ptr ) < (rowreq_ctx->data.pgsqlPgAmAmname_len * sizeof((* pgsqlPgAmAmname_val_ptr_ptr )[0])))) {
+        /*
+         * allocate space for pgsqlPgAmAmname data
+         */
+        (* pgsqlPgAmAmname_val_ptr_ptr ) = malloc(rowreq_ctx->data.pgsqlPgAmAmname_len * sizeof((* pgsqlPgAmAmname_val_ptr_ptr )[0]));
+        if(NULL == (* pgsqlPgAmAmname_val_ptr_ptr )) {
+            snmp_log(LOG_ERR,"could not allocate memory\n");
+            return MFD_ERROR;
+        }
+    }
+    (* pgsqlPgAmAmname_val_ptr_len_ptr ) = rowreq_ctx->data.pgsqlPgAmAmname_len * sizeof((* pgsqlPgAmAmname_val_ptr_ptr )[0]);
+    memcpy( (* pgsqlPgAmAmname_val_ptr_ptr ), rowreq_ctx->data.pgsqlPgAmAmname, (* pgsqlPgAmAmname_val_ptr_len_ptr ) );
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmname_get */
+
+/*---------------------------------------------------------------------
+ * PGSQL-MIB::pgsqlPgAmEntry.pgsqlPgAmAmstrategies
+ * pgsqlPgAmAmstrategies is subid 3 of pgsqlPgAmEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.4.1.27645.1.2.2.1.3
+ * Description:
+Number of operator strategies for this access method
+ *
+ * Attributes:
+ *   accessible 1     isscalar 0     enums  0      hasdefval 0
+ *   readable   1     iscolumn 1     ranges 0      hashint   0
+ *   settable   0
+ *
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ */
+/**
+ * map a value from its original native format to the MIB format.
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_ERROR           : Any other error
+ *
+ * @note parameters follow the memset convention (dest, src).
+ *
+ * @note generation and use of this function can be turned off by re-running
+ * mib2c after adding the following line to the file
+ * default-node-pgsqlPgAmAmstrategies.m2d :
+ *   @eval $m2c_node_skip_mapping = 1@
+ *
+ * @remark
+ *  If the values for your data type don't exactly match the
+ *  possible values defined by the mib, you should map them here.
+ *  Otherwise, just do a direct copy.
+ */
+int
+pgsqlPgAmAmstrategies_map(long *mib_pgsqlPgAmAmstrategies_val_ptr, long raw_pgsqlPgAmAmstrategies_val)
+{
+    netsnmp_assert(NULL != mib_pgsqlPgAmAmstrategies_val_ptr);
+    
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmstrategies_map","called\n"));
+    
+    /*
+     * TODO:241:o: |-> Implement pgsqlPgAmAmstrategies mapping.
+     * If the values for your data type don't exactly match the
+     * possible values defined by the mib, you should map them here.
+     */
+    (*mib_pgsqlPgAmAmstrategies_val_ptr) = raw_pgsqlPgAmAmstrategies_val;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmstrategies_map */
+
+/**
+ * Extract the current value of the pgsqlPgAmAmstrategies data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ *        Pointer to the row request context.
+ * @param pgsqlPgAmAmstrategies_val_ptr
+ *        Pointer to storage for a long variable
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_SKIP            : skip this node (no value for now)
+ * @retval MFD_ERROR           : Any other error
+ */
+int
+pgsqlPgAmAmstrategies_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAmAmstrategies_val_ptr )
+{
+   /** we should have a non-NULL pointer */
+   netsnmp_assert( NULL != pgsqlPgAmAmstrategies_val_ptr );
+
+
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmstrategies_get","called\n"));
+
+    netsnmp_assert(NULL != rowreq_ctx);
+
+/*
+ * TODO:231:o: |-> Extract the current value of the pgsqlPgAmAmstrategies data.
+ * set (* pgsqlPgAmAmstrategies_val_ptr ) from rowreq_ctx->data
+ */
+    (* pgsqlPgAmAmstrategies_val_ptr ) = rowreq_ctx->data.pgsqlPgAmAmstrategies;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmstrategies_get */
+
+/*---------------------------------------------------------------------
+ * PGSQL-MIB::pgsqlPgAmEntry.pgsqlPgAmAmsupport
+ * pgsqlPgAmAmsupport is subid 4 of pgsqlPgAmEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.4.1.27645.1.2.2.1.4
+ * Description:
+Number of support routines for this access method
+ *
+ * Attributes:
+ *   accessible 1     isscalar 0     enums  0      hasdefval 0
+ *   readable   1     iscolumn 1     ranges 0      hashint   0
+ *   settable   0
+ *
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ */
+/**
+ * map a value from its original native format to the MIB format.
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_ERROR           : Any other error
+ *
+ * @note parameters follow the memset convention (dest, src).
+ *
+ * @note generation and use of this function can be turned off by re-running
+ * mib2c after adding the following line to the file
+ * default-node-pgsqlPgAmAmsupport.m2d :
+ *   @eval $m2c_node_skip_mapping = 1@
+ *
+ * @remark
+ *  If the values for your data type don't exactly match the
+ *  possible values defined by the mib, you should map them here.
+ *  Otherwise, just do a direct copy.
+ */
+int
+pgsqlPgAmAmsupport_map(long *mib_pgsqlPgAmAmsupport_val_ptr, long raw_pgsqlPgAmAmsupport_val)
+{
+    netsnmp_assert(NULL != mib_pgsqlPgAmAmsupport_val_ptr);
+    
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmsupport_map","called\n"));
+    
+    /*
+     * TODO:241:o: |-> Implement pgsqlPgAmAmsupport mapping.
+     * If the values for your data type don't exactly match the
+     * possible values defined by the mib, you should map them here.
+     */
+    (*mib_pgsqlPgAmAmsupport_val_ptr) = raw_pgsqlPgAmAmsupport_val;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmsupport_map */
+
+/**
+ * Extract the current value of the pgsqlPgAmAmsupport data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ *        Pointer to the row request context.
+ * @param pgsqlPgAmAmsupport_val_ptr
+ *        Pointer to storage for a long variable
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_SKIP            : skip this node (no value for now)
+ * @retval MFD_ERROR           : Any other error
+ */
+int
+pgsqlPgAmAmsupport_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAmAmsupport_val_ptr )
+{
+   /** we should have a non-NULL pointer */
+   netsnmp_assert( NULL != pgsqlPgAmAmsupport_val_ptr );
+
+
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmsupport_get","called\n"));
+
+    netsnmp_assert(NULL != rowreq_ctx);
+
+/*
+ * TODO:231:o: |-> Extract the current value of the pgsqlPgAmAmsupport data.
+ * set (* pgsqlPgAmAmsupport_val_ptr ) from rowreq_ctx->data
+ */
+    (* pgsqlPgAmAmsupport_val_ptr ) = rowreq_ctx->data.pgsqlPgAmAmsupport;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmsupport_get */
+
+/*---------------------------------------------------------------------
+ * PGSQL-MIB::pgsqlPgAmEntry.pgsqlPgAmAmorderstrategy
+ * pgsqlPgAmAmorderstrategy is subid 5 of pgsqlPgAmEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.4.1.27645.1.2.2.1.5
+ * Description:
+Zero if the index offers no sort order, otherwise the strategy number of the strategy operator that describes the sort order
+ *
+ * Attributes:
+ *   accessible 1     isscalar 0     enums  0      hasdefval 0
+ *   readable   1     iscolumn 1     ranges 0      hashint   0
+ *   settable   0
+ *
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ */
+/**
+ * map a value from its original native format to the MIB format.
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_ERROR           : Any other error
+ *
+ * @note parameters follow the memset convention (dest, src).
+ *
+ * @note generation and use of this function can be turned off by re-running
+ * mib2c after adding the following line to the file
+ * default-node-pgsqlPgAmAmorderstrategy.m2d :
+ *   @eval $m2c_node_skip_mapping = 1@
+ *
+ * @remark
+ *  If the values for your data type don't exactly match the
+ *  possible values defined by the mib, you should map them here.
+ *  Otherwise, just do a direct copy.
+ */
+int
+pgsqlPgAmAmorderstrategy_map(long *mib_pgsqlPgAmAmorderstrategy_val_ptr, long raw_pgsqlPgAmAmorderstrategy_val)
+{
+    netsnmp_assert(NULL != mib_pgsqlPgAmAmorderstrategy_val_ptr);
+    
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmorderstrategy_map","called\n"));
+    
+    /*
+     * TODO:241:o: |-> Implement pgsqlPgAmAmorderstrategy mapping.
+     * If the values for your data type don't exactly match the
+     * possible values defined by the mib, you should map them here.
+     */
+    (*mib_pgsqlPgAmAmorderstrategy_val_ptr) = raw_pgsqlPgAmAmorderstrategy_val;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmorderstrategy_map */
+
+/**
+ * Extract the current value of the pgsqlPgAmAmorderstrategy data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ *        Pointer to the row request context.
+ * @param pgsqlPgAmAmorderstrategy_val_ptr
+ *        Pointer to storage for a long variable
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_SKIP            : skip this node (no value for now)
+ * @retval MFD_ERROR           : Any other error
+ */
+int
+pgsqlPgAmAmorderstrategy_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAmAmorderstrategy_val_ptr )
+{
+   /** we should have a non-NULL pointer */
+   netsnmp_assert( NULL != pgsqlPgAmAmorderstrategy_val_ptr );
+
+
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmorderstrategy_get","called\n"));
+
+    netsnmp_assert(NULL != rowreq_ctx);
+
+/*
+ * TODO:231:o: |-> Extract the current value of the pgsqlPgAmAmorderstrategy data.
+ * set (* pgsqlPgAmAmorderstrategy_val_ptr ) from rowreq_ctx->data
+ */
+    (* pgsqlPgAmAmorderstrategy_val_ptr ) = rowreq_ctx->data.pgsqlPgAmAmorderstrategy;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmorderstrategy_get */
+
+/*---------------------------------------------------------------------
+ * PGSQL-MIB::pgsqlPgAmEntry.pgsqlPgAmAmcanunique
+ * pgsqlPgAmAmcanunique is subid 6 of pgsqlPgAmEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.4.1.27645.1.2.2.1.6
+ * Description:
+Does the access method support unique indexes?
+ *
+ * Attributes:
+ *   accessible 1     isscalar 0     enums  1      hasdefval 0
+ *   readable   1     iscolumn 1     ranges 0      hashint   0
+ *   settable   0
+ *
+ * Enum range: 2/8. Values:  true(1), false(2)
+ *
+ * Its syntax is TruthValue (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (u_long)
+ */
+/**
+ * map a value from its original native format to the MIB format.
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_ERROR           : Any other error
+ *
+ * @note parameters follow the memset convention (dest, src).
+ *
+ * @note generation and use of this function can be turned off by re-running
+ * mib2c after adding the following line to the file
+ * default-node-pgsqlPgAmAmcanunique.m2d :
+ *   @eval $m2c_node_skip_mapping = 1@
+ *
+ * @remark
+ *  If the values for your data type don't exactly match the
+ *  possible values defined by the mib, you should map them here.
+ *  Otherwise, just do a direct copy.
+ */
+int
+pgsqlPgAmAmcanunique_map(u_long *mib_pgsqlPgAmAmcanunique_val_ptr, u_long raw_pgsqlPgAmAmcanunique_val)
+{
+    netsnmp_assert(NULL != mib_pgsqlPgAmAmcanunique_val_ptr);
+    
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmcanunique_map","called\n"));
+    
+    /*
+     * TODO:241:o: |-> Implement pgsqlPgAmAmcanunique enum mapping.
+     * uses INTERNAL_* macros defined in the header files
+     */
+    switch(raw_pgsqlPgAmAmcanunique_val) {
+        case INTERNAL_PGSQLPGAMAMCANUNIQUE_TRUE:
+             *mib_pgsqlPgAmAmcanunique_val_ptr = TRUTHVALUE_TRUE;
+             break;
+
+        case INTERNAL_PGSQLPGAMAMCANUNIQUE_FALSE:
+             *mib_pgsqlPgAmAmcanunique_val_ptr = TRUTHVALUE_FALSE;
+             break;
+
+             default:
+                 snmp_log(LOG_ERR, "couldn't map value %ld for pgsqlPgAmAmcanunique\n", raw_pgsqlPgAmAmcanunique_val );
+                 return MFD_ERROR;
+    }
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmcanunique_map */
+
+/**
+ * Extract the current value of the pgsqlPgAmAmcanunique data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ *        Pointer to the row request context.
+ * @param pgsqlPgAmAmcanunique_val_ptr
+ *        Pointer to storage for a long variable
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_SKIP            : skip this node (no value for now)
+ * @retval MFD_ERROR           : Any other error
+ */
+int
+pgsqlPgAmAmcanunique_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, u_long * pgsqlPgAmAmcanunique_val_ptr )
+{
+   /** we should have a non-NULL pointer */
+   netsnmp_assert( NULL != pgsqlPgAmAmcanunique_val_ptr );
+
+
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmcanunique_get","called\n"));
+
+    netsnmp_assert(NULL != rowreq_ctx);
+
+/*
+ * TODO:231:o: |-> Extract the current value of the pgsqlPgAmAmcanunique data.
+ * set (* pgsqlPgAmAmcanunique_val_ptr ) from rowreq_ctx->data
+ */
+    (* pgsqlPgAmAmcanunique_val_ptr ) = rowreq_ctx->data.pgsqlPgAmAmcanunique;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmcanunique_get */
+
+/*---------------------------------------------------------------------
+ * PGSQL-MIB::pgsqlPgAmEntry.pgsqlPgAmAmcanmulticol
+ * pgsqlPgAmAmcanmulticol is subid 7 of pgsqlPgAmEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.4.1.27645.1.2.2.1.7
+ * Description:
+Does the access method support multicolumn indexes?
+ *
+ * Attributes:
+ *   accessible 1     isscalar 0     enums  1      hasdefval 0
+ *   readable   1     iscolumn 1     ranges 0      hashint   0
+ *   settable   0
+ *
+ * Enum range: 2/8. Values:  true(1), false(2)
+ *
+ * Its syntax is TruthValue (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (u_long)
+ */
+/**
+ * map a value from its original native format to the MIB format.
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_ERROR           : Any other error
+ *
+ * @note parameters follow the memset convention (dest, src).
+ *
+ * @note generation and use of this function can be turned off by re-running
+ * mib2c after adding the following line to the file
+ * default-node-pgsqlPgAmAmcanmulticol.m2d :
+ *   @eval $m2c_node_skip_mapping = 1@
+ *
+ * @remark
+ *  If the values for your data type don't exactly match the
+ *  possible values defined by the mib, you should map them here.
+ *  Otherwise, just do a direct copy.
+ */
+int
+pgsqlPgAmAmcanmulticol_map(u_long *mib_pgsqlPgAmAmcanmulticol_val_ptr, u_long raw_pgsqlPgAmAmcanmulticol_val)
+{
+    netsnmp_assert(NULL != mib_pgsqlPgAmAmcanmulticol_val_ptr);
+    
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmcanmulticol_map","called\n"));
+    
+    /*
+     * TODO:241:o: |-> Implement pgsqlPgAmAmcanmulticol enum mapping.
+     * uses INTERNAL_* macros defined in the header files
+     */
+    switch(raw_pgsqlPgAmAmcanmulticol_val) {
+        case INTERNAL_PGSQLPGAMAMCANMULTICOL_TRUE:
+             *mib_pgsqlPgAmAmcanmulticol_val_ptr = TRUTHVALUE_TRUE;
+             break;
+
+        case INTERNAL_PGSQLPGAMAMCANMULTICOL_FALSE:
+             *mib_pgsqlPgAmAmcanmulticol_val_ptr = TRUTHVALUE_FALSE;
+             break;
+
+             default:
+                 snmp_log(LOG_ERR, "couldn't map value %ld for pgsqlPgAmAmcanmulticol\n", raw_pgsqlPgAmAmcanmulticol_val );
+                 return MFD_ERROR;
+    }
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmcanmulticol_map */
+
+/**
+ * Extract the current value of the pgsqlPgAmAmcanmulticol data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ *        Pointer to the row request context.
+ * @param pgsqlPgAmAmcanmulticol_val_ptr
+ *        Pointer to storage for a long variable
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_SKIP            : skip this node (no value for now)
+ * @retval MFD_ERROR           : Any other error
+ */
+int
+pgsqlPgAmAmcanmulticol_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, u_long * pgsqlPgAmAmcanmulticol_val_ptr )
+{
+   /** we should have a non-NULL pointer */
+   netsnmp_assert( NULL != pgsqlPgAmAmcanmulticol_val_ptr );
+
+
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmcanmulticol_get","called\n"));
+
+    netsnmp_assert(NULL != rowreq_ctx);
+
+/*
+ * TODO:231:o: |-> Extract the current value of the pgsqlPgAmAmcanmulticol data.
+ * set (* pgsqlPgAmAmcanmulticol_val_ptr ) from rowreq_ctx->data
+ */
+    (* pgsqlPgAmAmcanmulticol_val_ptr ) = rowreq_ctx->data.pgsqlPgAmAmcanmulticol;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmcanmulticol_get */
+
+/*---------------------------------------------------------------------
+ * PGSQL-MIB::pgsqlPgAmEntry.pgsqlPgAmAmoptionalkey
+ * pgsqlPgAmAmoptionalkey is subid 8 of pgsqlPgAmEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.4.1.27645.1.2.2.1.8
+ * Description:
+Does the access method support a scan without any constraint for the first index column?
+ *
+ * Attributes:
+ *   accessible 1     isscalar 0     enums  1      hasdefval 0
+ *   readable   1     iscolumn 1     ranges 0      hashint   0
+ *   settable   0
+ *
+ * Enum range: 2/8. Values:  true(1), false(2)
+ *
+ * Its syntax is TruthValue (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (u_long)
+ */
+/**
+ * map a value from its original native format to the MIB format.
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_ERROR           : Any other error
+ *
+ * @note parameters follow the memset convention (dest, src).
+ *
+ * @note generation and use of this function can be turned off by re-running
+ * mib2c after adding the following line to the file
+ * default-node-pgsqlPgAmAmoptionalkey.m2d :
+ *   @eval $m2c_node_skip_mapping = 1@
+ *
+ * @remark
+ *  If the values for your data type don't exactly match the
+ *  possible values defined by the mib, you should map them here.
+ *  Otherwise, just do a direct copy.
+ */
+int
+pgsqlPgAmAmoptionalkey_map(u_long *mib_pgsqlPgAmAmoptionalkey_val_ptr, u_long raw_pgsqlPgAmAmoptionalkey_val)
+{
+    netsnmp_assert(NULL != mib_pgsqlPgAmAmoptionalkey_val_ptr);
+    
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmoptionalkey_map","called\n"));
+    
+    /*
+     * TODO:241:o: |-> Implement pgsqlPgAmAmoptionalkey enum mapping.
+     * uses INTERNAL_* macros defined in the header files
+     */
+    switch(raw_pgsqlPgAmAmoptionalkey_val) {
+        case INTERNAL_PGSQLPGAMAMOPTIONALKEY_TRUE:
+             *mib_pgsqlPgAmAmoptionalkey_val_ptr = TRUTHVALUE_TRUE;
+             break;
+
+        case INTERNAL_PGSQLPGAMAMOPTIONALKEY_FALSE:
+             *mib_pgsqlPgAmAmoptionalkey_val_ptr = TRUTHVALUE_FALSE;
+             break;
+
+             default:
+                 snmp_log(LOG_ERR, "couldn't map value %ld for pgsqlPgAmAmoptionalkey\n", raw_pgsqlPgAmAmoptionalkey_val );
+                 return MFD_ERROR;
+    }
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmoptionalkey_map */
+
+/**
+ * Extract the current value of the pgsqlPgAmAmoptionalkey data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ *        Pointer to the row request context.
+ * @param pgsqlPgAmAmoptionalkey_val_ptr
+ *        Pointer to storage for a long variable
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_SKIP            : skip this node (no value for now)
+ * @retval MFD_ERROR           : Any other error
+ */
+int
+pgsqlPgAmAmoptionalkey_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, u_long * pgsqlPgAmAmoptionalkey_val_ptr )
+{
+   /** we should have a non-NULL pointer */
+   netsnmp_assert( NULL != pgsqlPgAmAmoptionalkey_val_ptr );
+
+
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmoptionalkey_get","called\n"));
+
+    netsnmp_assert(NULL != rowreq_ctx);
+
+/*
+ * TODO:231:o: |-> Extract the current value of the pgsqlPgAmAmoptionalkey data.
+ * set (* pgsqlPgAmAmoptionalkey_val_ptr ) from rowreq_ctx->data
+ */
+    (* pgsqlPgAmAmoptionalkey_val_ptr ) = rowreq_ctx->data.pgsqlPgAmAmoptionalkey;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmoptionalkey_get */
+
+/*---------------------------------------------------------------------
+ * PGSQL-MIB::pgsqlPgAmEntry.pgsqlPgAmAmindexnulls
+ * pgsqlPgAmAmindexnulls is subid 9 of pgsqlPgAmEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.4.1.27645.1.2.2.1.9
+ * Description:
+Does the access method support null index entries?
+ *
+ * Attributes:
+ *   accessible 1     isscalar 0     enums  1      hasdefval 0
+ *   readable   1     iscolumn 1     ranges 0      hashint   0
+ *   settable   0
+ *
+ * Enum range: 2/8. Values:  true(1), false(2)
+ *
+ * Its syntax is TruthValue (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (u_long)
+ */
+/**
+ * map a value from its original native format to the MIB format.
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_ERROR           : Any other error
+ *
+ * @note parameters follow the memset convention (dest, src).
+ *
+ * @note generation and use of this function can be turned off by re-running
+ * mib2c after adding the following line to the file
+ * default-node-pgsqlPgAmAmindexnulls.m2d :
+ *   @eval $m2c_node_skip_mapping = 1@
+ *
+ * @remark
+ *  If the values for your data type don't exactly match the
+ *  possible values defined by the mib, you should map them here.
+ *  Otherwise, just do a direct copy.
+ */
+int
+pgsqlPgAmAmindexnulls_map(u_long *mib_pgsqlPgAmAmindexnulls_val_ptr, u_long raw_pgsqlPgAmAmindexnulls_val)
+{
+    netsnmp_assert(NULL != mib_pgsqlPgAmAmindexnulls_val_ptr);
+    
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmindexnulls_map","called\n"));
+    
+    /*
+     * TODO:241:o: |-> Implement pgsqlPgAmAmindexnulls enum mapping.
+     * uses INTERNAL_* macros defined in the header files
+     */
+    switch(raw_pgsqlPgAmAmindexnulls_val) {
+        case INTERNAL_PGSQLPGAMAMINDEXNULLS_TRUE:
+             *mib_pgsqlPgAmAmindexnulls_val_ptr = TRUTHVALUE_TRUE;
+             break;
+
+        case INTERNAL_PGSQLPGAMAMINDEXNULLS_FALSE:
+             *mib_pgsqlPgAmAmindexnulls_val_ptr = TRUTHVALUE_FALSE;
+             break;
+
+             default:
+                 snmp_log(LOG_ERR, "couldn't map value %ld for pgsqlPgAmAmindexnulls\n", raw_pgsqlPgAmAmindexnulls_val );
+                 return MFD_ERROR;
+    }
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmindexnulls_map */
+
+/**
+ * Extract the current value of the pgsqlPgAmAmindexnulls data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ *        Pointer to the row request context.
+ * @param pgsqlPgAmAmindexnulls_val_ptr
+ *        Pointer to storage for a long variable
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_SKIP            : skip this node (no value for now)
+ * @retval MFD_ERROR           : Any other error
+ */
+int
+pgsqlPgAmAmindexnulls_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, u_long * pgsqlPgAmAmindexnulls_val_ptr )
+{
+   /** we should have a non-NULL pointer */
+   netsnmp_assert( NULL != pgsqlPgAmAmindexnulls_val_ptr );
+
+
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmindexnulls_get","called\n"));
+
+    netsnmp_assert(NULL != rowreq_ctx);
+
+/*
+ * TODO:231:o: |-> Extract the current value of the pgsqlPgAmAmindexnulls data.
+ * set (* pgsqlPgAmAmindexnulls_val_ptr ) from rowreq_ctx->data
+ */
+    (* pgsqlPgAmAmindexnulls_val_ptr ) = rowreq_ctx->data.pgsqlPgAmAmindexnulls;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmindexnulls_get */
+
+/*---------------------------------------------------------------------
+ * PGSQL-MIB::pgsqlPgAmEntry.pgsqlPgAmAmstorage
+ * pgsqlPgAmAmstorage is subid 10 of pgsqlPgAmEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.4.1.27645.1.2.2.1.10
+ * Description:
+Can index storage data type differ from column data type?
+ *
+ * Attributes:
+ *   accessible 1     isscalar 0     enums  1      hasdefval 0
+ *   readable   1     iscolumn 1     ranges 0      hashint   0
+ *   settable   0
+ *
+ * Enum range: 2/8. Values:  true(1), false(2)
+ *
+ * Its syntax is TruthValue (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (u_long)
+ */
+/**
+ * map a value from its original native format to the MIB format.
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_ERROR           : Any other error
+ *
+ * @note parameters follow the memset convention (dest, src).
+ *
+ * @note generation and use of this function can be turned off by re-running
+ * mib2c after adding the following line to the file
+ * default-node-pgsqlPgAmAmstorage.m2d :
+ *   @eval $m2c_node_skip_mapping = 1@
+ *
+ * @remark
+ *  If the values for your data type don't exactly match the
+ *  possible values defined by the mib, you should map them here.
+ *  Otherwise, just do a direct copy.
+ */
+int
+pgsqlPgAmAmstorage_map(u_long *mib_pgsqlPgAmAmstorage_val_ptr, u_long raw_pgsqlPgAmAmstorage_val)
+{
+    netsnmp_assert(NULL != mib_pgsqlPgAmAmstorage_val_ptr);
+    
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmstorage_map","called\n"));
+    
+    /*
+     * TODO:241:o: |-> Implement pgsqlPgAmAmstorage enum mapping.
+     * uses INTERNAL_* macros defined in the header files
+     */
+    switch(raw_pgsqlPgAmAmstorage_val) {
+        case INTERNAL_PGSQLPGAMAMSTORAGE_TRUE:
+             *mib_pgsqlPgAmAmstorage_val_ptr = TRUTHVALUE_TRUE;
+             break;
+
+        case INTERNAL_PGSQLPGAMAMSTORAGE_FALSE:
+             *mib_pgsqlPgAmAmstorage_val_ptr = TRUTHVALUE_FALSE;
+             break;
+
+             default:
+                 snmp_log(LOG_ERR, "couldn't map value %ld for pgsqlPgAmAmstorage\n", raw_pgsqlPgAmAmstorage_val );
+                 return MFD_ERROR;
+    }
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmstorage_map */
+
+/**
+ * Extract the current value of the pgsqlPgAmAmstorage data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ *        Pointer to the row request context.
+ * @param pgsqlPgAmAmstorage_val_ptr
+ *        Pointer to storage for a long variable
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_SKIP            : skip this node (no value for now)
+ * @retval MFD_ERROR           : Any other error
+ */
+int
+pgsqlPgAmAmstorage_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, u_long * pgsqlPgAmAmstorage_val_ptr )
+{
+   /** we should have a non-NULL pointer */
+   netsnmp_assert( NULL != pgsqlPgAmAmstorage_val_ptr );
+
+
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmstorage_get","called\n"));
+
+    netsnmp_assert(NULL != rowreq_ctx);
+
+/*
+ * TODO:231:o: |-> Extract the current value of the pgsqlPgAmAmstorage data.
+ * set (* pgsqlPgAmAmstorage_val_ptr ) from rowreq_ctx->data
+ */
+    (* pgsqlPgAmAmstorage_val_ptr ) = rowreq_ctx->data.pgsqlPgAmAmstorage;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmstorage_get */
+
+/*---------------------------------------------------------------------
+ * PGSQL-MIB::pgsqlPgAmEntry.pgsqlPgAmAmclusterable
+ * pgsqlPgAmAmclusterable is subid 11 of pgsqlPgAmEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.4.1.27645.1.2.2.1.11
+ * Description:
+Can an index of this type be clustered on?
+ *
+ * Attributes:
+ *   accessible 1     isscalar 0     enums  1      hasdefval 0
+ *   readable   1     iscolumn 1     ranges 0      hashint   0
+ *   settable   0
+ *
+ * Enum range: 2/8. Values:  true(1), false(2)
+ *
+ * Its syntax is TruthValue (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (u_long)
+ */
+/**
+ * map a value from its original native format to the MIB format.
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_ERROR           : Any other error
+ *
+ * @note parameters follow the memset convention (dest, src).
+ *
+ * @note generation and use of this function can be turned off by re-running
+ * mib2c after adding the following line to the file
+ * default-node-pgsqlPgAmAmclusterable.m2d :
+ *   @eval $m2c_node_skip_mapping = 1@
+ *
+ * @remark
+ *  If the values for your data type don't exactly match the
+ *  possible values defined by the mib, you should map them here.
+ *  Otherwise, just do a direct copy.
+ */
+int
+pgsqlPgAmAmclusterable_map(u_long *mib_pgsqlPgAmAmclusterable_val_ptr, u_long raw_pgsqlPgAmAmclusterable_val)
+{
+    netsnmp_assert(NULL != mib_pgsqlPgAmAmclusterable_val_ptr);
+    
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmclusterable_map","called\n"));
+    
+    /*
+     * TODO:241:o: |-> Implement pgsqlPgAmAmclusterable enum mapping.
+     * uses INTERNAL_* macros defined in the header files
+     */
+    switch(raw_pgsqlPgAmAmclusterable_val) {
+        case INTERNAL_PGSQLPGAMAMCLUSTERABLE_TRUE:
+             *mib_pgsqlPgAmAmclusterable_val_ptr = TRUTHVALUE_TRUE;
+             break;
+
+        case INTERNAL_PGSQLPGAMAMCLUSTERABLE_FALSE:
+             *mib_pgsqlPgAmAmclusterable_val_ptr = TRUTHVALUE_FALSE;
+             break;
+
+             default:
+                 snmp_log(LOG_ERR, "couldn't map value %ld for pgsqlPgAmAmclusterable\n", raw_pgsqlPgAmAmclusterable_val );
+                 return MFD_ERROR;
+    }
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmclusterable_map */
+
+/**
+ * Extract the current value of the pgsqlPgAmAmclusterable data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ *        Pointer to the row request context.
+ * @param pgsqlPgAmAmclusterable_val_ptr
+ *        Pointer to storage for a long variable
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_SKIP            : skip this node (no value for now)
+ * @retval MFD_ERROR           : Any other error
+ */
+int
+pgsqlPgAmAmclusterable_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, u_long * pgsqlPgAmAmclusterable_val_ptr )
+{
+   /** we should have a non-NULL pointer */
+   netsnmp_assert( NULL != pgsqlPgAmAmclusterable_val_ptr );
+
+
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmclusterable_get","called\n"));
+
+    netsnmp_assert(NULL != rowreq_ctx);
+
+/*
+ * TODO:231:o: |-> Extract the current value of the pgsqlPgAmAmclusterable data.
+ * set (* pgsqlPgAmAmclusterable_val_ptr ) from rowreq_ctx->data
+ */
+    (* pgsqlPgAmAmclusterable_val_ptr ) = rowreq_ctx->data.pgsqlPgAmAmclusterable;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmclusterable_get */
+
+/*---------------------------------------------------------------------
+ * PGSQL-MIB::pgsqlPgAmEntry.pgsqlPgAmAminsert
+ * pgsqlPgAmAminsert is subid 12 of pgsqlPgAmEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.4.1.27645.1.2.2.1.12
+ * Description:
+Insert this tuple
+ *
+ * Attributes:
+ *   accessible 1     isscalar 0     enums  0      hasdefval 0
+ *   readable   1     iscolumn 1     ranges 0      hashint   0
+ *   settable   0
+ *
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ */
+/**
+ * map a value from its original native format to the MIB format.
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_ERROR           : Any other error
+ *
+ * @note parameters follow the memset convention (dest, src).
+ *
+ * @note generation and use of this function can be turned off by re-running
+ * mib2c after adding the following line to the file
+ * default-node-pgsqlPgAmAminsert.m2d :
+ *   @eval $m2c_node_skip_mapping = 1@
+ *
+ * @remark
+ *  If the values for your data type don't exactly match the
+ *  possible values defined by the mib, you should map them here.
+ *  Otherwise, just do a direct copy.
+ */
+int
+pgsqlPgAmAminsert_map(long *mib_pgsqlPgAmAminsert_val_ptr, long raw_pgsqlPgAmAminsert_val)
+{
+    netsnmp_assert(NULL != mib_pgsqlPgAmAminsert_val_ptr);
+    
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAminsert_map","called\n"));
+    
+    /*
+     * TODO:241:o: |-> Implement pgsqlPgAmAminsert mapping.
+     * If the values for your data type don't exactly match the
+     * possible values defined by the mib, you should map them here.
+     */
+    (*mib_pgsqlPgAmAminsert_val_ptr) = raw_pgsqlPgAmAminsert_val;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAminsert_map */
+
+/**
+ * Extract the current value of the pgsqlPgAmAminsert data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ *        Pointer to the row request context.
+ * @param pgsqlPgAmAminsert_val_ptr
+ *        Pointer to storage for a long variable
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_SKIP            : skip this node (no value for now)
+ * @retval MFD_ERROR           : Any other error
+ */
+int
+pgsqlPgAmAminsert_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAmAminsert_val_ptr )
+{
+   /** we should have a non-NULL pointer */
+   netsnmp_assert( NULL != pgsqlPgAmAminsert_val_ptr );
+
+
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAminsert_get","called\n"));
+
+    netsnmp_assert(NULL != rowreq_ctx);
+
+/*
+ * TODO:231:o: |-> Extract the current value of the pgsqlPgAmAminsert data.
+ * set (* pgsqlPgAmAminsert_val_ptr ) from rowreq_ctx->data
+ */
+    (* pgsqlPgAmAminsert_val_ptr ) = rowreq_ctx->data.pgsqlPgAmAminsert;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAminsert_get */
+
+/*---------------------------------------------------------------------
+ * PGSQL-MIB::pgsqlPgAmEntry.pgsqlPgAmAmbeginscan
+ * pgsqlPgAmAmbeginscan is subid 13 of pgsqlPgAmEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.4.1.27645.1.2.2.1.13
+ * Description:
+Start new scan
+ *
+ * Attributes:
+ *   accessible 1     isscalar 0     enums  0      hasdefval 0
+ *   readable   1     iscolumn 1     ranges 0      hashint   0
+ *   settable   0
+ *
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ */
+/**
+ * map a value from its original native format to the MIB format.
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_ERROR           : Any other error
+ *
+ * @note parameters follow the memset convention (dest, src).
+ *
+ * @note generation and use of this function can be turned off by re-running
+ * mib2c after adding the following line to the file
+ * default-node-pgsqlPgAmAmbeginscan.m2d :
+ *   @eval $m2c_node_skip_mapping = 1@
+ *
+ * @remark
+ *  If the values for your data type don't exactly match the
+ *  possible values defined by the mib, you should map them here.
+ *  Otherwise, just do a direct copy.
+ */
+int
+pgsqlPgAmAmbeginscan_map(long *mib_pgsqlPgAmAmbeginscan_val_ptr, long raw_pgsqlPgAmAmbeginscan_val)
+{
+    netsnmp_assert(NULL != mib_pgsqlPgAmAmbeginscan_val_ptr);
+    
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmbeginscan_map","called\n"));
+    
+    /*
+     * TODO:241:o: |-> Implement pgsqlPgAmAmbeginscan mapping.
+     * If the values for your data type don't exactly match the
+     * possible values defined by the mib, you should map them here.
+     */
+    (*mib_pgsqlPgAmAmbeginscan_val_ptr) = raw_pgsqlPgAmAmbeginscan_val;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmbeginscan_map */
+
+/**
+ * Extract the current value of the pgsqlPgAmAmbeginscan data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ *        Pointer to the row request context.
+ * @param pgsqlPgAmAmbeginscan_val_ptr
+ *        Pointer to storage for a long variable
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_SKIP            : skip this node (no value for now)
+ * @retval MFD_ERROR           : Any other error
+ */
+int
+pgsqlPgAmAmbeginscan_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAmAmbeginscan_val_ptr )
+{
+   /** we should have a non-NULL pointer */
+   netsnmp_assert( NULL != pgsqlPgAmAmbeginscan_val_ptr );
+
+
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmbeginscan_get","called\n"));
+
+    netsnmp_assert(NULL != rowreq_ctx);
+
+/*
+ * TODO:231:o: |-> Extract the current value of the pgsqlPgAmAmbeginscan data.
+ * set (* pgsqlPgAmAmbeginscan_val_ptr ) from rowreq_ctx->data
+ */
+    (* pgsqlPgAmAmbeginscan_val_ptr ) = rowreq_ctx->data.pgsqlPgAmAmbeginscan;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmbeginscan_get */
+
+/*---------------------------------------------------------------------
+ * PGSQL-MIB::pgsqlPgAmEntry.pgsqlPgAmAmgettuple
+ * pgsqlPgAmAmgettuple is subid 14 of pgsqlPgAmEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.4.1.27645.1.2.2.1.14
+ * Description:
+Next valid tuple
+ *
+ * Attributes:
+ *   accessible 1     isscalar 0     enums  0      hasdefval 0
+ *   readable   1     iscolumn 1     ranges 0      hashint   0
+ *   settable   0
+ *
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ */
+/**
+ * map a value from its original native format to the MIB format.
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_ERROR           : Any other error
+ *
+ * @note parameters follow the memset convention (dest, src).
+ *
+ * @note generation and use of this function can be turned off by re-running
+ * mib2c after adding the following line to the file
+ * default-node-pgsqlPgAmAmgettuple.m2d :
+ *   @eval $m2c_node_skip_mapping = 1@
+ *
+ * @remark
+ *  If the values for your data type don't exactly match the
+ *  possible values defined by the mib, you should map them here.
+ *  Otherwise, just do a direct copy.
+ */
+int
+pgsqlPgAmAmgettuple_map(long *mib_pgsqlPgAmAmgettuple_val_ptr, long raw_pgsqlPgAmAmgettuple_val)
+{
+    netsnmp_assert(NULL != mib_pgsqlPgAmAmgettuple_val_ptr);
+    
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmgettuple_map","called\n"));
+    
+    /*
+     * TODO:241:o: |-> Implement pgsqlPgAmAmgettuple mapping.
+     * If the values for your data type don't exactly match the
+     * possible values defined by the mib, you should map them here.
+     */
+    (*mib_pgsqlPgAmAmgettuple_val_ptr) = raw_pgsqlPgAmAmgettuple_val;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmgettuple_map */
+
+/**
+ * Extract the current value of the pgsqlPgAmAmgettuple data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ *        Pointer to the row request context.
+ * @param pgsqlPgAmAmgettuple_val_ptr
+ *        Pointer to storage for a long variable
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_SKIP            : skip this node (no value for now)
+ * @retval MFD_ERROR           : Any other error
+ */
+int
+pgsqlPgAmAmgettuple_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAmAmgettuple_val_ptr )
+{
+   /** we should have a non-NULL pointer */
+   netsnmp_assert( NULL != pgsqlPgAmAmgettuple_val_ptr );
+
+
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmgettuple_get","called\n"));
+
+    netsnmp_assert(NULL != rowreq_ctx);
+
+/*
+ * TODO:231:o: |-> Extract the current value of the pgsqlPgAmAmgettuple data.
+ * set (* pgsqlPgAmAmgettuple_val_ptr ) from rowreq_ctx->data
+ */
+    (* pgsqlPgAmAmgettuple_val_ptr ) = rowreq_ctx->data.pgsqlPgAmAmgettuple;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmgettuple_get */
+
+/*---------------------------------------------------------------------
+ * PGSQL-MIB::pgsqlPgAmEntry.pgsqlPgAmAmgetmulti
+ * pgsqlPgAmAmgetmulti is subid 15 of pgsqlPgAmEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.4.1.27645.1.2.2.1.15
+ * Description:
+Fetch multiple tuples
+ *
+ * Attributes:
+ *   accessible 1     isscalar 0     enums  0      hasdefval 0
+ *   readable   1     iscolumn 1     ranges 0      hashint   0
+ *   settable   0
+ *
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ */
+/**
+ * map a value from its original native format to the MIB format.
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_ERROR           : Any other error
+ *
+ * @note parameters follow the memset convention (dest, src).
+ *
+ * @note generation and use of this function can be turned off by re-running
+ * mib2c after adding the following line to the file
+ * default-node-pgsqlPgAmAmgetmulti.m2d :
+ *   @eval $m2c_node_skip_mapping = 1@
+ *
+ * @remark
+ *  If the values for your data type don't exactly match the
+ *  possible values defined by the mib, you should map them here.
+ *  Otherwise, just do a direct copy.
+ */
+int
+pgsqlPgAmAmgetmulti_map(long *mib_pgsqlPgAmAmgetmulti_val_ptr, long raw_pgsqlPgAmAmgetmulti_val)
+{
+    netsnmp_assert(NULL != mib_pgsqlPgAmAmgetmulti_val_ptr);
+    
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmgetmulti_map","called\n"));
+    
+    /*
+     * TODO:241:o: |-> Implement pgsqlPgAmAmgetmulti mapping.
+     * If the values for your data type don't exactly match the
+     * possible values defined by the mib, you should map them here.
+     */
+    (*mib_pgsqlPgAmAmgetmulti_val_ptr) = raw_pgsqlPgAmAmgetmulti_val;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmgetmulti_map */
+
+/**
+ * Extract the current value of the pgsqlPgAmAmgetmulti data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ *        Pointer to the row request context.
+ * @param pgsqlPgAmAmgetmulti_val_ptr
+ *        Pointer to storage for a long variable
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_SKIP            : skip this node (no value for now)
+ * @retval MFD_ERROR           : Any other error
+ */
+int
+pgsqlPgAmAmgetmulti_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAmAmgetmulti_val_ptr )
+{
+   /** we should have a non-NULL pointer */
+   netsnmp_assert( NULL != pgsqlPgAmAmgetmulti_val_ptr );
+
+
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmgetmulti_get","called\n"));
+
+    netsnmp_assert(NULL != rowreq_ctx);
+
+/*
+ * TODO:231:o: |-> Extract the current value of the pgsqlPgAmAmgetmulti data.
+ * set (* pgsqlPgAmAmgetmulti_val_ptr ) from rowreq_ctx->data
+ */
+    (* pgsqlPgAmAmgetmulti_val_ptr ) = rowreq_ctx->data.pgsqlPgAmAmgetmulti;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmgetmulti_get */
+
+/*---------------------------------------------------------------------
+ * PGSQL-MIB::pgsqlPgAmEntry.pgsqlPgAmAmrescan
+ * pgsqlPgAmAmrescan is subid 16 of pgsqlPgAmEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.4.1.27645.1.2.2.1.16
+ * Description:
+Restart this scan
+ *
+ * Attributes:
+ *   accessible 1     isscalar 0     enums  0      hasdefval 0
+ *   readable   1     iscolumn 1     ranges 0      hashint   0
+ *   settable   0
+ *
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ */
+/**
+ * map a value from its original native format to the MIB format.
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_ERROR           : Any other error
+ *
+ * @note parameters follow the memset convention (dest, src).
+ *
+ * @note generation and use of this function can be turned off by re-running
+ * mib2c after adding the following line to the file
+ * default-node-pgsqlPgAmAmrescan.m2d :
+ *   @eval $m2c_node_skip_mapping = 1@
+ *
+ * @remark
+ *  If the values for your data type don't exactly match the
+ *  possible values defined by the mib, you should map them here.
+ *  Otherwise, just do a direct copy.
+ */
+int
+pgsqlPgAmAmrescan_map(long *mib_pgsqlPgAmAmrescan_val_ptr, long raw_pgsqlPgAmAmrescan_val)
+{
+    netsnmp_assert(NULL != mib_pgsqlPgAmAmrescan_val_ptr);
+    
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmrescan_map","called\n"));
+    
+    /*
+     * TODO:241:o: |-> Implement pgsqlPgAmAmrescan mapping.
+     * If the values for your data type don't exactly match the
+     * possible values defined by the mib, you should map them here.
+     */
+    (*mib_pgsqlPgAmAmrescan_val_ptr) = raw_pgsqlPgAmAmrescan_val;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmrescan_map */
+
+/**
+ * Extract the current value of the pgsqlPgAmAmrescan data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ *        Pointer to the row request context.
+ * @param pgsqlPgAmAmrescan_val_ptr
+ *        Pointer to storage for a long variable
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_SKIP            : skip this node (no value for now)
+ * @retval MFD_ERROR           : Any other error
+ */
+int
+pgsqlPgAmAmrescan_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAmAmrescan_val_ptr )
+{
+   /** we should have a non-NULL pointer */
+   netsnmp_assert( NULL != pgsqlPgAmAmrescan_val_ptr );
+
+
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmrescan_get","called\n"));
+
+    netsnmp_assert(NULL != rowreq_ctx);
+
+/*
+ * TODO:231:o: |-> Extract the current value of the pgsqlPgAmAmrescan data.
+ * set (* pgsqlPgAmAmrescan_val_ptr ) from rowreq_ctx->data
+ */
+    (* pgsqlPgAmAmrescan_val_ptr ) = rowreq_ctx->data.pgsqlPgAmAmrescan;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmrescan_get */
+
+/*---------------------------------------------------------------------
+ * PGSQL-MIB::pgsqlPgAmEntry.pgsqlPgAmAmendscan
+ * pgsqlPgAmAmendscan is subid 17 of pgsqlPgAmEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.4.1.27645.1.2.2.1.17
+ * Description:
+End this scan
+ *
+ * Attributes:
+ *   accessible 1     isscalar 0     enums  0      hasdefval 0
+ *   readable   1     iscolumn 1     ranges 0      hashint   0
+ *   settable   0
+ *
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ */
+/**
+ * map a value from its original native format to the MIB format.
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_ERROR           : Any other error
+ *
+ * @note parameters follow the memset convention (dest, src).
+ *
+ * @note generation and use of this function can be turned off by re-running
+ * mib2c after adding the following line to the file
+ * default-node-pgsqlPgAmAmendscan.m2d :
+ *   @eval $m2c_node_skip_mapping = 1@
+ *
+ * @remark
+ *  If the values for your data type don't exactly match the
+ *  possible values defined by the mib, you should map them here.
+ *  Otherwise, just do a direct copy.
+ */
+int
+pgsqlPgAmAmendscan_map(long *mib_pgsqlPgAmAmendscan_val_ptr, long raw_pgsqlPgAmAmendscan_val)
+{
+    netsnmp_assert(NULL != mib_pgsqlPgAmAmendscan_val_ptr);
+    
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmendscan_map","called\n"));
+    
+    /*
+     * TODO:241:o: |-> Implement pgsqlPgAmAmendscan mapping.
+     * If the values for your data type don't exactly match the
+     * possible values defined by the mib, you should map them here.
+     */
+    (*mib_pgsqlPgAmAmendscan_val_ptr) = raw_pgsqlPgAmAmendscan_val;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmendscan_map */
+
+/**
+ * Extract the current value of the pgsqlPgAmAmendscan data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ *        Pointer to the row request context.
+ * @param pgsqlPgAmAmendscan_val_ptr
+ *        Pointer to storage for a long variable
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_SKIP            : skip this node (no value for now)
+ * @retval MFD_ERROR           : Any other error
+ */
+int
+pgsqlPgAmAmendscan_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAmAmendscan_val_ptr )
+{
+   /** we should have a non-NULL pointer */
+   netsnmp_assert( NULL != pgsqlPgAmAmendscan_val_ptr );
+
+
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmendscan_get","called\n"));
+
+    netsnmp_assert(NULL != rowreq_ctx);
+
+/*
+ * TODO:231:o: |-> Extract the current value of the pgsqlPgAmAmendscan data.
+ * set (* pgsqlPgAmAmendscan_val_ptr ) from rowreq_ctx->data
+ */
+    (* pgsqlPgAmAmendscan_val_ptr ) = rowreq_ctx->data.pgsqlPgAmAmendscan;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmendscan_get */
+
+/*---------------------------------------------------------------------
+ * PGSQL-MIB::pgsqlPgAmEntry.pgsqlPgAmAmmarkpos
+ * pgsqlPgAmAmmarkpos is subid 18 of pgsqlPgAmEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.4.1.27645.1.2.2.1.18
+ * Description:
+Mark current scan position
+ *
+ * Attributes:
+ *   accessible 1     isscalar 0     enums  0      hasdefval 0
+ *   readable   1     iscolumn 1     ranges 0      hashint   0
+ *   settable   0
+ *
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ */
+/**
+ * map a value from its original native format to the MIB format.
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_ERROR           : Any other error
+ *
+ * @note parameters follow the memset convention (dest, src).
+ *
+ * @note generation and use of this function can be turned off by re-running
+ * mib2c after adding the following line to the file
+ * default-node-pgsqlPgAmAmmarkpos.m2d :
+ *   @eval $m2c_node_skip_mapping = 1@
+ *
+ * @remark
+ *  If the values for your data type don't exactly match the
+ *  possible values defined by the mib, you should map them here.
+ *  Otherwise, just do a direct copy.
+ */
+int
+pgsqlPgAmAmmarkpos_map(long *mib_pgsqlPgAmAmmarkpos_val_ptr, long raw_pgsqlPgAmAmmarkpos_val)
+{
+    netsnmp_assert(NULL != mib_pgsqlPgAmAmmarkpos_val_ptr);
+    
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmmarkpos_map","called\n"));
+    
+    /*
+     * TODO:241:o: |-> Implement pgsqlPgAmAmmarkpos mapping.
+     * If the values for your data type don't exactly match the
+     * possible values defined by the mib, you should map them here.
+     */
+    (*mib_pgsqlPgAmAmmarkpos_val_ptr) = raw_pgsqlPgAmAmmarkpos_val;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmmarkpos_map */
+
+/**
+ * Extract the current value of the pgsqlPgAmAmmarkpos data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ *        Pointer to the row request context.
+ * @param pgsqlPgAmAmmarkpos_val_ptr
+ *        Pointer to storage for a long variable
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_SKIP            : skip this node (no value for now)
+ * @retval MFD_ERROR           : Any other error
+ */
+int
+pgsqlPgAmAmmarkpos_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAmAmmarkpos_val_ptr )
+{
+   /** we should have a non-NULL pointer */
+   netsnmp_assert( NULL != pgsqlPgAmAmmarkpos_val_ptr );
+
+
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmmarkpos_get","called\n"));
+
+    netsnmp_assert(NULL != rowreq_ctx);
+
+/*
+ * TODO:231:o: |-> Extract the current value of the pgsqlPgAmAmmarkpos data.
+ * set (* pgsqlPgAmAmmarkpos_val_ptr ) from rowreq_ctx->data
+ */
+    (* pgsqlPgAmAmmarkpos_val_ptr ) = rowreq_ctx->data.pgsqlPgAmAmmarkpos;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmmarkpos_get */
+
+/*---------------------------------------------------------------------
+ * PGSQL-MIB::pgsqlPgAmEntry.pgsqlPgAmAmrestrpos
+ * pgsqlPgAmAmrestrpos is subid 19 of pgsqlPgAmEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.4.1.27645.1.2.2.1.19
+ * Description:
+Restore marked scan position
+ *
+ * Attributes:
+ *   accessible 1     isscalar 0     enums  0      hasdefval 0
+ *   readable   1     iscolumn 1     ranges 0      hashint   0
+ *   settable   0
+ *
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ */
+/**
+ * map a value from its original native format to the MIB format.
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_ERROR           : Any other error
+ *
+ * @note parameters follow the memset convention (dest, src).
+ *
+ * @note generation and use of this function can be turned off by re-running
+ * mib2c after adding the following line to the file
+ * default-node-pgsqlPgAmAmrestrpos.m2d :
+ *   @eval $m2c_node_skip_mapping = 1@
+ *
+ * @remark
+ *  If the values for your data type don't exactly match the
+ *  possible values defined by the mib, you should map them here.
+ *  Otherwise, just do a direct copy.
+ */
+int
+pgsqlPgAmAmrestrpos_map(long *mib_pgsqlPgAmAmrestrpos_val_ptr, long raw_pgsqlPgAmAmrestrpos_val)
+{
+    netsnmp_assert(NULL != mib_pgsqlPgAmAmrestrpos_val_ptr);
+    
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmrestrpos_map","called\n"));
+    
+    /*
+     * TODO:241:o: |-> Implement pgsqlPgAmAmrestrpos mapping.
+     * If the values for your data type don't exactly match the
+     * possible values defined by the mib, you should map them here.
+     */
+    (*mib_pgsqlPgAmAmrestrpos_val_ptr) = raw_pgsqlPgAmAmrestrpos_val;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmrestrpos_map */
+
+/**
+ * Extract the current value of the pgsqlPgAmAmrestrpos data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ *        Pointer to the row request context.
+ * @param pgsqlPgAmAmrestrpos_val_ptr
+ *        Pointer to storage for a long variable
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_SKIP            : skip this node (no value for now)
+ * @retval MFD_ERROR           : Any other error
+ */
+int
+pgsqlPgAmAmrestrpos_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAmAmrestrpos_val_ptr )
+{
+   /** we should have a non-NULL pointer */
+   netsnmp_assert( NULL != pgsqlPgAmAmrestrpos_val_ptr );
+
+
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmrestrpos_get","called\n"));
+
+    netsnmp_assert(NULL != rowreq_ctx);
+
+/*
+ * TODO:231:o: |-> Extract the current value of the pgsqlPgAmAmrestrpos data.
+ * set (* pgsqlPgAmAmrestrpos_val_ptr ) from rowreq_ctx->data
+ */
+    (* pgsqlPgAmAmrestrpos_val_ptr ) = rowreq_ctx->data.pgsqlPgAmAmrestrpos;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmrestrpos_get */
+
+/*---------------------------------------------------------------------
+ * PGSQL-MIB::pgsqlPgAmEntry.pgsqlPgAmAmbuild
+ * pgsqlPgAmAmbuild is subid 20 of pgsqlPgAmEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.4.1.27645.1.2.2.1.20
+ * Description:
+Build new index
+ *
+ * Attributes:
+ *   accessible 1     isscalar 0     enums  0      hasdefval 0
+ *   readable   1     iscolumn 1     ranges 0      hashint   0
+ *   settable   0
+ *
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ */
+/**
+ * map a value from its original native format to the MIB format.
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_ERROR           : Any other error
+ *
+ * @note parameters follow the memset convention (dest, src).
+ *
+ * @note generation and use of this function can be turned off by re-running
+ * mib2c after adding the following line to the file
+ * default-node-pgsqlPgAmAmbuild.m2d :
+ *   @eval $m2c_node_skip_mapping = 1@
+ *
+ * @remark
+ *  If the values for your data type don't exactly match the
+ *  possible values defined by the mib, you should map them here.
+ *  Otherwise, just do a direct copy.
+ */
+int
+pgsqlPgAmAmbuild_map(long *mib_pgsqlPgAmAmbuild_val_ptr, long raw_pgsqlPgAmAmbuild_val)
+{
+    netsnmp_assert(NULL != mib_pgsqlPgAmAmbuild_val_ptr);
+    
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmbuild_map","called\n"));
+    
+    /*
+     * TODO:241:o: |-> Implement pgsqlPgAmAmbuild mapping.
+     * If the values for your data type don't exactly match the
+     * possible values defined by the mib, you should map them here.
+     */
+    (*mib_pgsqlPgAmAmbuild_val_ptr) = raw_pgsqlPgAmAmbuild_val;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmbuild_map */
+
+/**
+ * Extract the current value of the pgsqlPgAmAmbuild data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ *        Pointer to the row request context.
+ * @param pgsqlPgAmAmbuild_val_ptr
+ *        Pointer to storage for a long variable
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_SKIP            : skip this node (no value for now)
+ * @retval MFD_ERROR           : Any other error
+ */
+int
+pgsqlPgAmAmbuild_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAmAmbuild_val_ptr )
+{
+   /** we should have a non-NULL pointer */
+   netsnmp_assert( NULL != pgsqlPgAmAmbuild_val_ptr );
+
+
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmbuild_get","called\n"));
+
+    netsnmp_assert(NULL != rowreq_ctx);
+
+/*
+ * TODO:231:o: |-> Extract the current value of the pgsqlPgAmAmbuild data.
+ * set (* pgsqlPgAmAmbuild_val_ptr ) from rowreq_ctx->data
+ */
+    (* pgsqlPgAmAmbuild_val_ptr ) = rowreq_ctx->data.pgsqlPgAmAmbuild;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmbuild_get */
+
+/*---------------------------------------------------------------------
+ * PGSQL-MIB::pgsqlPgAmEntry.pgsqlPgAmAmbulkdelete
+ * pgsqlPgAmAmbulkdelete is subid 21 of pgsqlPgAmEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.4.1.27645.1.2.2.1.21
+ * Description:
+Bulk-delete function
+ *
+ * Attributes:
+ *   accessible 1     isscalar 0     enums  0      hasdefval 0
+ *   readable   1     iscolumn 1     ranges 0      hashint   0
+ *   settable   0
+ *
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ */
+/**
+ * map a value from its original native format to the MIB format.
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_ERROR           : Any other error
+ *
+ * @note parameters follow the memset convention (dest, src).
+ *
+ * @note generation and use of this function can be turned off by re-running
+ * mib2c after adding the following line to the file
+ * default-node-pgsqlPgAmAmbulkdelete.m2d :
+ *   @eval $m2c_node_skip_mapping = 1@
+ *
+ * @remark
+ *  If the values for your data type don't exactly match the
+ *  possible values defined by the mib, you should map them here.
+ *  Otherwise, just do a direct copy.
+ */
+int
+pgsqlPgAmAmbulkdelete_map(long *mib_pgsqlPgAmAmbulkdelete_val_ptr, long raw_pgsqlPgAmAmbulkdelete_val)
+{
+    netsnmp_assert(NULL != mib_pgsqlPgAmAmbulkdelete_val_ptr);
+    
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmbulkdelete_map","called\n"));
+    
+    /*
+     * TODO:241:o: |-> Implement pgsqlPgAmAmbulkdelete mapping.
+     * If the values for your data type don't exactly match the
+     * possible values defined by the mib, you should map them here.
+     */
+    (*mib_pgsqlPgAmAmbulkdelete_val_ptr) = raw_pgsqlPgAmAmbulkdelete_val;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmbulkdelete_map */
+
+/**
+ * Extract the current value of the pgsqlPgAmAmbulkdelete data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ *        Pointer to the row request context.
+ * @param pgsqlPgAmAmbulkdelete_val_ptr
+ *        Pointer to storage for a long variable
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_SKIP            : skip this node (no value for now)
+ * @retval MFD_ERROR           : Any other error
+ */
+int
+pgsqlPgAmAmbulkdelete_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAmAmbulkdelete_val_ptr )
+{
+   /** we should have a non-NULL pointer */
+   netsnmp_assert( NULL != pgsqlPgAmAmbulkdelete_val_ptr );
+
+
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmbulkdelete_get","called\n"));
+
+    netsnmp_assert(NULL != rowreq_ctx);
+
+/*
+ * TODO:231:o: |-> Extract the current value of the pgsqlPgAmAmbulkdelete data.
+ * set (* pgsqlPgAmAmbulkdelete_val_ptr ) from rowreq_ctx->data
+ */
+    (* pgsqlPgAmAmbulkdelete_val_ptr ) = rowreq_ctx->data.pgsqlPgAmAmbulkdelete;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmbulkdelete_get */
+
+/*---------------------------------------------------------------------
+ * PGSQL-MIB::pgsqlPgAmEntry.pgsqlPgAmAmvacuumcleanup
+ * pgsqlPgAmAmvacuumcleanup is subid 22 of pgsqlPgAmEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.4.1.27645.1.2.2.1.22
+ * Description:
+Post- VACUUM cleanup function
+ *
+ * Attributes:
+ *   accessible 1     isscalar 0     enums  0      hasdefval 0
+ *   readable   1     iscolumn 1     ranges 0      hashint   0
+ *   settable   0
+ *
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ */
+/**
+ * map a value from its original native format to the MIB format.
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_ERROR           : Any other error
+ *
+ * @note parameters follow the memset convention (dest, src).
+ *
+ * @note generation and use of this function can be turned off by re-running
+ * mib2c after adding the following line to the file
+ * default-node-pgsqlPgAmAmvacuumcleanup.m2d :
+ *   @eval $m2c_node_skip_mapping = 1@
+ *
+ * @remark
+ *  If the values for your data type don't exactly match the
+ *  possible values defined by the mib, you should map them here.
+ *  Otherwise, just do a direct copy.
+ */
+int
+pgsqlPgAmAmvacuumcleanup_map(long *mib_pgsqlPgAmAmvacuumcleanup_val_ptr, long raw_pgsqlPgAmAmvacuumcleanup_val)
+{
+    netsnmp_assert(NULL != mib_pgsqlPgAmAmvacuumcleanup_val_ptr);
+    
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmvacuumcleanup_map","called\n"));
+    
+    /*
+     * TODO:241:o: |-> Implement pgsqlPgAmAmvacuumcleanup mapping.
+     * If the values for your data type don't exactly match the
+     * possible values defined by the mib, you should map them here.
+     */
+    (*mib_pgsqlPgAmAmvacuumcleanup_val_ptr) = raw_pgsqlPgAmAmvacuumcleanup_val;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmvacuumcleanup_map */
+
+/**
+ * Extract the current value of the pgsqlPgAmAmvacuumcleanup data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ *        Pointer to the row request context.
+ * @param pgsqlPgAmAmvacuumcleanup_val_ptr
+ *        Pointer to storage for a long variable
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_SKIP            : skip this node (no value for now)
+ * @retval MFD_ERROR           : Any other error
+ */
+int
+pgsqlPgAmAmvacuumcleanup_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAmAmvacuumcleanup_val_ptr )
+{
+   /** we should have a non-NULL pointer */
+   netsnmp_assert( NULL != pgsqlPgAmAmvacuumcleanup_val_ptr );
+
+
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmvacuumcleanup_get","called\n"));
+
+    netsnmp_assert(NULL != rowreq_ctx);
+
+/*
+ * TODO:231:o: |-> Extract the current value of the pgsqlPgAmAmvacuumcleanup data.
+ * set (* pgsqlPgAmAmvacuumcleanup_val_ptr ) from rowreq_ctx->data
+ */
+    (* pgsqlPgAmAmvacuumcleanup_val_ptr ) = rowreq_ctx->data.pgsqlPgAmAmvacuumcleanup;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmvacuumcleanup_get */
+
+/*---------------------------------------------------------------------
+ * PGSQL-MIB::pgsqlPgAmEntry.pgsqlPgAmAmcostestimate
+ * pgsqlPgAmAmcostestimate is subid 23 of pgsqlPgAmEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.4.1.27645.1.2.2.1.23
+ * Description:
+Function to estimate cost of an index scan
+ *
+ * Attributes:
+ *   accessible 1     isscalar 0     enums  0      hasdefval 0
+ *   readable   1     iscolumn 1     ranges 0      hashint   0
+ *   settable   0
+ *
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ */
+/**
+ * map a value from its original native format to the MIB format.
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_ERROR           : Any other error
+ *
+ * @note parameters follow the memset convention (dest, src).
+ *
+ * @note generation and use of this function can be turned off by re-running
+ * mib2c after adding the following line to the file
+ * default-node-pgsqlPgAmAmcostestimate.m2d :
+ *   @eval $m2c_node_skip_mapping = 1@
+ *
+ * @remark
+ *  If the values for your data type don't exactly match the
+ *  possible values defined by the mib, you should map them here.
+ *  Otherwise, just do a direct copy.
+ */
+int
+pgsqlPgAmAmcostestimate_map(long *mib_pgsqlPgAmAmcostestimate_val_ptr, long raw_pgsqlPgAmAmcostestimate_val)
+{
+    netsnmp_assert(NULL != mib_pgsqlPgAmAmcostestimate_val_ptr);
+    
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmcostestimate_map","called\n"));
+    
+    /*
+     * TODO:241:o: |-> Implement pgsqlPgAmAmcostestimate mapping.
+     * If the values for your data type don't exactly match the
+     * possible values defined by the mib, you should map them here.
+     */
+    (*mib_pgsqlPgAmAmcostestimate_val_ptr) = raw_pgsqlPgAmAmcostestimate_val;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmcostestimate_map */
+
+/**
+ * Extract the current value of the pgsqlPgAmAmcostestimate data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ *        Pointer to the row request context.
+ * @param pgsqlPgAmAmcostestimate_val_ptr
+ *        Pointer to storage for a long variable
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_SKIP            : skip this node (no value for now)
+ * @retval MFD_ERROR           : Any other error
+ */
+int
+pgsqlPgAmAmcostestimate_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAmAmcostestimate_val_ptr )
+{
+   /** we should have a non-NULL pointer */
+   netsnmp_assert( NULL != pgsqlPgAmAmcostestimate_val_ptr );
+
+
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmcostestimate_get","called\n"));
+
+    netsnmp_assert(NULL != rowreq_ctx);
+
+/*
+ * TODO:231:o: |-> Extract the current value of the pgsqlPgAmAmcostestimate data.
+ * set (* pgsqlPgAmAmcostestimate_val_ptr ) from rowreq_ctx->data
+ */
+    (* pgsqlPgAmAmcostestimate_val_ptr ) = rowreq_ctx->data.pgsqlPgAmAmcostestimate;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmcostestimate_get */
+
+/*---------------------------------------------------------------------
+ * PGSQL-MIB::pgsqlPgAmEntry.pgsqlPgAmAmoptions
+ * pgsqlPgAmAmoptions is subid 24 of pgsqlPgAmEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.4.1.27645.1.2.2.1.24
+ * Description:
+Function to parse and validate reloptions for an index
+ *
+ * Attributes:
+ *   accessible 1     isscalar 0     enums  0      hasdefval 0
+ *   readable   1     iscolumn 1     ranges 0      hashint   0
+ *   settable   0
+ *
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ */
+/**
+ * map a value from its original native format to the MIB format.
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_ERROR           : Any other error
+ *
+ * @note parameters follow the memset convention (dest, src).
+ *
+ * @note generation and use of this function can be turned off by re-running
+ * mib2c after adding the following line to the file
+ * default-node-pgsqlPgAmAmoptions.m2d :
+ *   @eval $m2c_node_skip_mapping = 1@
+ *
+ * @remark
+ *  If the values for your data type don't exactly match the
+ *  possible values defined by the mib, you should map them here.
+ *  Otherwise, just do a direct copy.
+ */
+int
+pgsqlPgAmAmoptions_map(long *mib_pgsqlPgAmAmoptions_val_ptr, long raw_pgsqlPgAmAmoptions_val)
+{
+    netsnmp_assert(NULL != mib_pgsqlPgAmAmoptions_val_ptr);
+    
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmoptions_map","called\n"));
+    
+    /*
+     * TODO:241:o: |-> Implement pgsqlPgAmAmoptions mapping.
+     * If the values for your data type don't exactly match the
+     * possible values defined by the mib, you should map them here.
+     */
+    (*mib_pgsqlPgAmAmoptions_val_ptr) = raw_pgsqlPgAmAmoptions_val;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmoptions_map */
+
+/**
+ * Extract the current value of the pgsqlPgAmAmoptions data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ *        Pointer to the row request context.
+ * @param pgsqlPgAmAmoptions_val_ptr
+ *        Pointer to storage for a long variable
+ *
+ * @retval MFD_SUCCESS         : success
+ * @retval MFD_SKIP            : skip this node (no value for now)
+ * @retval MFD_ERROR           : Any other error
+ */
+int
+pgsqlPgAmAmoptions_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAmAmoptions_val_ptr )
+{
+   /** we should have a non-NULL pointer */
+   netsnmp_assert( NULL != pgsqlPgAmAmoptions_val_ptr );
+
+
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmAmoptions_get","called\n"));
+
+    netsnmp_assert(NULL != rowreq_ctx);
+
+/*
+ * TODO:231:o: |-> Extract the current value of the pgsqlPgAmAmoptions data.
+ * set (* pgsqlPgAmAmoptions_val_ptr ) from rowreq_ctx->data
+ */
+    (* pgsqlPgAmAmoptions_val_ptr ) = rowreq_ctx->data.pgsqlPgAmAmoptions;
+
+    return MFD_SUCCESS;
+} /* pgsqlPgAmAmoptions_get */
+
+
+
+/** @} */
diff --git a/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAmTable/pgsqlPgAmTable_data_get.h b/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAmTable/pgsqlPgAmTable_data_get.h
new file mode 100644 (file)
index 0000000..19852b7
--- /dev/null
@@ -0,0 +1,107 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ *       version : 1.18.2.1 $ of : mfd-data-get.m2c,v $
+ *
+ * $Id: pgsqlPgAmTable_data_get.h,v 1.1 2008/01/17 12:29:36 eggyknap Exp $
+ *
+ * @file pgsqlPgAmTable_data_get.h
+ *
+ * @addtogroup get
+ *
+ * Prototypes for get functions
+ *
+ * @{
+ */
+#ifndef PGSQLPGAMTABLE_DATA_GET_H
+#define PGSQLPGAMTABLE_DATA_GET_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* *********************************************************************
+ * GET function declarations
+ */
+
+/* *********************************************************************
+ * GET Table declarations
+ */
+/**********************************************************************
+ **********************************************************************
+ ***
+ *** Table pgsqlPgAmTable
+ ***
+ **********************************************************************
+ **********************************************************************/
+/*
+ * pgsqlPgAmTable is subid 2 of pgsqlCatalogTables.
+ * Its status is Current.
+ * OID: .1.3.6.1.4.1.27645.1.2.2, length: 10
+*/
+    /*
+     * indexes
+     */
+    int pgsnmpdConnID_map(char **mib_pgsnmpdConnID_val_ptr_ptr, size_t *mib_pgsnmpdConnID_val_ptr_len_ptr, char *raw_pgsnmpdConnID_val_ptr, size_t raw_pgsnmpdConnID_val_ptr_len, int allow_realloc);
+    int rdbmsDbIndex_map(long *mib_rdbmsDbIndex_val_ptr, long raw_rdbmsDbIndex_val);
+    int pgsqlPgAmEntryOID_map(long *mib_pgsqlPgAmEntryOID_val_ptr, long raw_pgsqlPgAmEntryOID_val);
+
+    int pgsqlPgAmAmname_map(char **mib_pgsqlPgAmAmname_val_ptr_ptr, size_t *mib_pgsqlPgAmAmname_val_ptr_len_ptr, char *raw_pgsqlPgAmAmname_val_ptr, size_t raw_pgsqlPgAmAmname_val_ptr_len, int allow_realloc);
+    int pgsqlPgAmAmname_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, char **pgsqlPgAmAmname_val_ptr_ptr, size_t *pgsqlPgAmAmname_val_ptr_len_ptr );
+    int pgsqlPgAmAmstrategies_map(long *mib_pgsqlPgAmAmstrategies_val_ptr, long raw_pgsqlPgAmAmstrategies_val);
+    int pgsqlPgAmAmstrategies_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAmAmstrategies_val_ptr );
+    int pgsqlPgAmAmsupport_map(long *mib_pgsqlPgAmAmsupport_val_ptr, long raw_pgsqlPgAmAmsupport_val);
+    int pgsqlPgAmAmsupport_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAmAmsupport_val_ptr );
+    int pgsqlPgAmAmorderstrategy_map(long *mib_pgsqlPgAmAmorderstrategy_val_ptr, long raw_pgsqlPgAmAmorderstrategy_val);
+    int pgsqlPgAmAmorderstrategy_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAmAmorderstrategy_val_ptr );
+    int pgsqlPgAmAmcanunique_map(u_long *mib_pgsqlPgAmAmcanunique_val_ptr, u_long raw_pgsqlPgAmAmcanunique_val);
+    int pgsqlPgAmAmcanunique_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, u_long * pgsqlPgAmAmcanunique_val_ptr );
+    int pgsqlPgAmAmcanmulticol_map(u_long *mib_pgsqlPgAmAmcanmulticol_val_ptr, u_long raw_pgsqlPgAmAmcanmulticol_val);
+    int pgsqlPgAmAmcanmulticol_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, u_long * pgsqlPgAmAmcanmulticol_val_ptr );
+    int pgsqlPgAmAmoptionalkey_map(u_long *mib_pgsqlPgAmAmoptionalkey_val_ptr, u_long raw_pgsqlPgAmAmoptionalkey_val);
+    int pgsqlPgAmAmoptionalkey_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, u_long * pgsqlPgAmAmoptionalkey_val_ptr );
+    int pgsqlPgAmAmindexnulls_map(u_long *mib_pgsqlPgAmAmindexnulls_val_ptr, u_long raw_pgsqlPgAmAmindexnulls_val);
+    int pgsqlPgAmAmindexnulls_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, u_long * pgsqlPgAmAmindexnulls_val_ptr );
+    int pgsqlPgAmAmstorage_map(u_long *mib_pgsqlPgAmAmstorage_val_ptr, u_long raw_pgsqlPgAmAmstorage_val);
+    int pgsqlPgAmAmstorage_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, u_long * pgsqlPgAmAmstorage_val_ptr );
+    int pgsqlPgAmAmclusterable_map(u_long *mib_pgsqlPgAmAmclusterable_val_ptr, u_long raw_pgsqlPgAmAmclusterable_val);
+    int pgsqlPgAmAmclusterable_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, u_long * pgsqlPgAmAmclusterable_val_ptr );
+    int pgsqlPgAmAminsert_map(long *mib_pgsqlPgAmAminsert_val_ptr, long raw_pgsqlPgAmAminsert_val);
+    int pgsqlPgAmAminsert_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAmAminsert_val_ptr );
+    int pgsqlPgAmAmbeginscan_map(long *mib_pgsqlPgAmAmbeginscan_val_ptr, long raw_pgsqlPgAmAmbeginscan_val);
+    int pgsqlPgAmAmbeginscan_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAmAmbeginscan_val_ptr );
+    int pgsqlPgAmAmgettuple_map(long *mib_pgsqlPgAmAmgettuple_val_ptr, long raw_pgsqlPgAmAmgettuple_val);
+    int pgsqlPgAmAmgettuple_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAmAmgettuple_val_ptr );
+    int pgsqlPgAmAmgetmulti_map(long *mib_pgsqlPgAmAmgetmulti_val_ptr, long raw_pgsqlPgAmAmgetmulti_val);
+    int pgsqlPgAmAmgetmulti_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAmAmgetmulti_val_ptr );
+    int pgsqlPgAmAmrescan_map(long *mib_pgsqlPgAmAmrescan_val_ptr, long raw_pgsqlPgAmAmrescan_val);
+    int pgsqlPgAmAmrescan_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAmAmrescan_val_ptr );
+    int pgsqlPgAmAmendscan_map(long *mib_pgsqlPgAmAmendscan_val_ptr, long raw_pgsqlPgAmAmendscan_val);
+    int pgsqlPgAmAmendscan_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAmAmendscan_val_ptr );
+    int pgsqlPgAmAmmarkpos_map(long *mib_pgsqlPgAmAmmarkpos_val_ptr, long raw_pgsqlPgAmAmmarkpos_val);
+    int pgsqlPgAmAmmarkpos_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAmAmmarkpos_val_ptr );
+    int pgsqlPgAmAmrestrpos_map(long *mib_pgsqlPgAmAmrestrpos_val_ptr, long raw_pgsqlPgAmAmrestrpos_val);
+    int pgsqlPgAmAmrestrpos_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAmAmrestrpos_val_ptr );
+    int pgsqlPgAmAmbuild_map(long *mib_pgsqlPgAmAmbuild_val_ptr, long raw_pgsqlPgAmAmbuild_val);
+    int pgsqlPgAmAmbuild_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAmAmbuild_val_ptr );
+    int pgsqlPgAmAmbulkdelete_map(long *mib_pgsqlPgAmAmbulkdelete_val_ptr, long raw_pgsqlPgAmAmbulkdelete_val);
+    int pgsqlPgAmAmbulkdelete_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAmAmbulkdelete_val_ptr );
+    int pgsqlPgAmAmvacuumcleanup_map(long *mib_pgsqlPgAmAmvacuumcleanup_val_ptr, long raw_pgsqlPgAmAmvacuumcleanup_val);
+    int pgsqlPgAmAmvacuumcleanup_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAmAmvacuumcleanup_val_ptr );
+    int pgsqlPgAmAmcostestimate_map(long *mib_pgsqlPgAmAmcostestimate_val_ptr, long raw_pgsqlPgAmAmcostestimate_val);
+    int pgsqlPgAmAmcostestimate_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAmAmcostestimate_val_ptr );
+    int pgsqlPgAmAmoptions_map(long *mib_pgsqlPgAmAmoptions_val_ptr, long raw_pgsqlPgAmAmoptions_val);
+    int pgsqlPgAmAmoptions_get( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, long * pgsqlPgAmAmoptions_val_ptr );
+
+
+int pgsqlPgAmTable_indexes_set_tbl_idx(pgsqlPgAmTable_mib_index *tbl_idx, char *pgsnmpdConnID_val_ptr,  size_t pgsnmpdConnID_val_ptr_len, long rdbmsDbIndex_val, long pgsqlPgAmEntryOID_val);
+int pgsqlPgAmTable_indexes_set(pgsqlPgAmTable_rowreq_ctx *rowreq_ctx, char *pgsnmpdConnID_val_ptr,  size_t pgsnmpdConnID_val_ptr_len, long rdbmsDbIndex_val, long pgsqlPgAmEntryOID_val);
+
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PGSQLPGAMTABLE_DATA_GET_H */
+/** @} */
diff --git a/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAmTable/pgsqlPgAmTable_data_set.c b/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAmTable/pgsqlPgAmTable_data_set.c
new file mode 100644 (file)
index 0000000..59971e9
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ *       version : 1.18 $ of : mfd-data-set.m2c,v $
+ *
+ * $Id: pgsqlPgAmTable_data_set.c,v 1.1 2008/01/17 12:29:36 eggyknap Exp $
+ *
+ */
+/* standard Net-SNMP includes */
+#include <net-snmp/net-snmp-config.h>
+#include <net-snmp/net-snmp-includes.h>
+#include <net-snmp/agent/net-snmp-agent-includes.h>
+
+/* include our parent header */
+#include "pgsqlPgAmTable.h"
+
+
+/** @defgroup data_set data_set: Routines to set data
+ *
+ * These routines are used to set the value for individual objects. The
+ * row context is passed, along with the new value.
+ * 
+ * @{
+ */
+/** @} */
diff --git a/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAmTable/pgsqlPgAmTable_data_set.h b/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAmTable/pgsqlPgAmTable_data_set.h
new file mode 100644 (file)
index 0000000..b5ff1d8
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ *       version : 1.18 $ of : mfd-data-set.m2c,v $ 
+ *
+ * $Id: pgsqlPgAmTable_data_set.h,v 1.1 2008/01/17 12:29:36 eggyknap Exp $
+ */
+#ifndef PGSQLPGAMTABLE_DATA_SET_H
+#define PGSQLPGAMTABLE_DATA_SET_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* *********************************************************************
+ * SET function declarations
+ */
+
+/* *********************************************************************
+ * SET Table declarations
+ */
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PGSQLPGAMTABLE_DATA_SET_H */
diff --git a/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAmTable/pgsqlPgAmTable_enums.h b/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAmTable/pgsqlPgAmTable_enums.h
new file mode 100644 (file)
index 0000000..051af4e
--- /dev/null
@@ -0,0 +1,178 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ *  : generic-table-enums.m2c,v 1.3 2004/05/18 17:44:32 rstory Exp $
+ *
+ * $Id: pgsqlPgAmTable_enums.h,v 1.1 2008/01/17 12:29:36 eggyknap Exp $
+ */
+#ifndef PGSQLPGAMTABLE_ENUMS_H
+#define PGSQLPGAMTABLE_ENUMS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ /*
+ * NOTES on enums
+ * ==============
+ *
+ * Value Mapping
+ * -------------
+ * If the values for your data type don't exactly match the
+ * possible values defined by the mib, you should map them
+ * below. For example, a boolean flag (1/0) is usually represented
+ * as a TruthValue in a MIB, which maps to the values (1/2).
+ *
+ */
+/*************************************************************************
+ *************************************************************************
+ *
+ * enum definitions for table pgsqlPgAmTable
+ *
+ *************************************************************************
+ *************************************************************************/
+
+/*************************************************************
+ * constants for enums for the MIB node
+ * pgsqlPgAmAmcanunique (TruthValue / ASN_INTEGER)
+ *
+ * since a Textual Convention may be referenced more than once in a
+ * MIB, protect againt redefinitions of the enum values.
+ */
+#ifndef TRUTHVALUE_ENUMS
+#define TRUTHVALUE_ENUMS
+
+#define TRUTHVALUE_TRUE  1 
+#define TRUTHVALUE_FALSE  2 
+
+
+#endif /* TRUTHVALUE_ENUMS */
+
+    /*
+     * TODO:140:o: Define interal representation of pgsqlPgAmAmcanunique enums.
+     * (used for value mapping; see notes at top of file)
+     */
+#define INTERNAL_PGSQLPGAMAMCANUNIQUE_TRUE  1 
+#define INTERNAL_PGSQLPGAMAMCANUNIQUE_FALSE  2 
+
+/*************************************************************
+ * constants for enums for the MIB node
+ * pgsqlPgAmAmcanmulticol (TruthValue / ASN_INTEGER)
+ *
+ * since a Textual Convention may be referenced more than once in a
+ * MIB, protect againt redefinitions of the enum values.
+ */
+#ifndef TRUTHVALUE_ENUMS
+#define TRUTHVALUE_ENUMS
+
+#define TRUTHVALUE_TRUE  1 
+#define TRUTHVALUE_FALSE  2 
+
+
+#endif /* TRUTHVALUE_ENUMS */
+
+    /*
+     * TODO:140:o: Define interal representation of pgsqlPgAmAmcanmulticol enums.
+     * (used for value mapping; see notes at top of file)
+     */
+#define INTERNAL_PGSQLPGAMAMCANMULTICOL_TRUE  1 
+#define INTERNAL_PGSQLPGAMAMCANMULTICOL_FALSE  2 
+
+/*************************************************************
+ * constants for enums for the MIB node
+ * pgsqlPgAmAmoptionalkey (TruthValue / ASN_INTEGER)
+ *
+ * since a Textual Convention may be referenced more than once in a
+ * MIB, protect againt redefinitions of the enum values.
+ */
+#ifndef TRUTHVALUE_ENUMS
+#define TRUTHVALUE_ENUMS
+
+#define TRUTHVALUE_TRUE  1 
+#define TRUTHVALUE_FALSE  2 
+
+
+#endif /* TRUTHVALUE_ENUMS */
+
+    /*
+     * TODO:140:o: Define interal representation of pgsqlPgAmAmoptionalkey enums.
+     * (used for value mapping; see notes at top of file)
+     */
+#define INTERNAL_PGSQLPGAMAMOPTIONALKEY_TRUE  1 
+#define INTERNAL_PGSQLPGAMAMOPTIONALKEY_FALSE  2 
+
+/*************************************************************
+ * constants for enums for the MIB node
+ * pgsqlPgAmAmindexnulls (TruthValue / ASN_INTEGER)
+ *
+ * since a Textual Convention may be referenced more than once in a
+ * MIB, protect againt redefinitions of the enum values.
+ */
+#ifndef TRUTHVALUE_ENUMS
+#define TRUTHVALUE_ENUMS
+
+#define TRUTHVALUE_TRUE  1 
+#define TRUTHVALUE_FALSE  2 
+
+
+#endif /* TRUTHVALUE_ENUMS */
+
+    /*
+     * TODO:140:o: Define interal representation of pgsqlPgAmAmindexnulls enums.
+     * (used for value mapping; see notes at top of file)
+     */
+#define INTERNAL_PGSQLPGAMAMINDEXNULLS_TRUE  1 
+#define INTERNAL_PGSQLPGAMAMINDEXNULLS_FALSE  2 
+
+/*************************************************************
+ * constants for enums for the MIB node
+ * pgsqlPgAmAmstorage (TruthValue / ASN_INTEGER)
+ *
+ * since a Textual Convention may be referenced more than once in a
+ * MIB, protect againt redefinitions of the enum values.
+ */
+#ifndef TRUTHVALUE_ENUMS
+#define TRUTHVALUE_ENUMS
+
+#define TRUTHVALUE_TRUE  1 
+#define TRUTHVALUE_FALSE  2 
+
+
+#endif /* TRUTHVALUE_ENUMS */
+
+    /*
+     * TODO:140:o: Define interal representation of pgsqlPgAmAmstorage enums.
+     * (used for value mapping; see notes at top of file)
+     */
+#define INTERNAL_PGSQLPGAMAMSTORAGE_TRUE  1 
+#define INTERNAL_PGSQLPGAMAMSTORAGE_FALSE  2 
+
+/*************************************************************
+ * constants for enums for the MIB node
+ * pgsqlPgAmAmclusterable (TruthValue / ASN_INTEGER)
+ *
+ * since a Textual Convention may be referenced more than once in a
+ * MIB, protect againt redefinitions of the enum values.
+ */
+#ifndef TRUTHVALUE_ENUMS
+#define TRUTHVALUE_ENUMS
+
+#define TRUTHVALUE_TRUE  1 
+#define TRUTHVALUE_FALSE  2 
+
+
+#endif /* TRUTHVALUE_ENUMS */
+
+    /*
+     * TODO:140:o: Define interal representation of pgsqlPgAmAmclusterable enums.
+     * (used for value mapping; see notes at top of file)
+     */
+#define INTERNAL_PGSQLPGAMAMCLUSTERABLE_TRUE  1 
+#define INTERNAL_PGSQLPGAMAMCLUSTERABLE_FALSE  2 
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PGSQLPGAMTABLE_ENUMS_H */
diff --git a/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAmTable/pgsqlPgAmTable_interface.c b/PGSQL-MIB_src/pgsqlCatalogTables/pgsqlPgAmTable/pgsqlPgAmTable_interface.c
new file mode 100644 (file)
index 0000000..3259307
--- /dev/null
@@ -0,0 +1,903 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ *       version : 1.43.2.3 $ of : mfd-interface.m2c,v $ 
+ *
+ * $Id: pgsqlPgAmTable_interface.c,v 1.1 2008/01/17 12:29:36 eggyknap Exp $
+ */
+/*
+ * *********************************************************************
+ * *********************************************************************
+ * *********************************************************************
+ * ***                                                               ***
+ * ***  NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE  ***
+ * ***                                                               ***
+ * ***                                                               ***
+ * ***       THIS FILE DOES NOT CONTAIN ANY USER EDITABLE CODE.      ***
+ * ***                                                               ***
+ * ***                                                               ***
+ * ***       THE GENERATED CODE IS INTERNAL IMPLEMENTATION, AND      ***
+ * ***                                                               ***
+ * ***                                                               ***
+ * ***    IS SUBJECT TO CHANGE WITHOUT WARNING IN FUTURE RELEASES.   ***
+ * ***                                                               ***
+ * ***                                                               ***
+ * *********************************************************************
+ * *********************************************************************
+ * *********************************************************************
+ */
+
+/* standard Net-SNMP includes */
+#include <net-snmp/net-snmp-config.h>
+#include <net-snmp/net-snmp-includes.h>
+#include <net-snmp/agent/net-snmp-agent-includes.h>
+
+/* include our parent header */
+#include "pgsqlPgAmTable.h"
+
+
+#include <net-snmp/library/container.h>
+
+#include "pgsqlPgAmTable_interface.h"
+
+/**********************************************************************
+ **********************************************************************
+ ***
+ *** Table pgsqlPgAmTable
+ ***
+ **********************************************************************
+ **********************************************************************/
+/*
+ * pgsqlPgAmTable is subid 2 of pgsqlCatalogTables.
+ * Its status is Current.
+ * OID: .1.3.6.1.4.1.27645.1.2.2, length: 10
+*/
+typedef struct pgsqlPgAmTable_interface_ctx_s {
+
+   netsnmp_container              *container;
+   netsnmp_cache                  *cache; /* optional cache */
+
+   pgsqlPgAmTable_registration_ptr      user_ctx;
+   
+   netsnmp_table_registration_info  tbl_info;
+
+   netsnmp_baby_steps_access_methods access_multiplexer;
+
+} pgsqlPgAmTable_interface_ctx;
+
+static pgsqlPgAmTable_interface_ctx pgsqlPgAmTable_if_ctx;
+
+static void _pgsqlPgAmTable_container_init(
+    pgsqlPgAmTable_interface_ctx *if_ctx);
+
+
+static Netsnmp_Node_Handler _mfd_pgsqlPgAmTable_pre_request;
+static Netsnmp_Node_Handler _mfd_pgsqlPgAmTable_post_request;
+static Netsnmp_Node_Handler _mfd_pgsqlPgAmTable_object_lookup;
+static Netsnmp_Node_Handler _mfd_pgsqlPgAmTable_get_values;
+/**
+ * @internal
+ * Initialize the table pgsqlPgAmTable 
+ *    (Define its contents and how it's structured)
+ */
+void
+_pgsqlPgAmTable_initialize_interface(pgsqlPgAmTable_registration_ptr reg_ptr,  u_long flags)
+{
+    netsnmp_baby_steps_access_methods *access_multiplexer =
+        &pgsqlPgAmTable_if_ctx.access_multiplexer;
+    netsnmp_table_registration_info *tbl_info = &pgsqlPgAmTable_if_ctx.tbl_info;
+    netsnmp_handler_registration *reginfo;
+    netsnmp_mib_handler *handler;
+    int    mfd_modes = 0;
+
+    DEBUGMSGTL(("internal:pgsqlPgAmTable:_pgsqlPgAmTable_initialize_interface","called\n"));
+
+
+    /*************************************************
+     *
+     * save interface context for pgsqlPgAmTable
+     */
+    /*
+     * Setting up the table's definition
+     */
+    netsnmp_table_helper_add_indexes(tbl_info,
+                                  ASN_OCTET_STR, /** index: pgsnmpdConnID */
+                                  ASN_INTEGER, /** index: rdbmsDbIndex */
+                                  ASN_INTEGER, /** index: pgsqlPgAmEntryOID */
+                             0);
+
+    /*  Define the minimum and maximum accessible columns.  This
+        optimizes retrival. */
+    tbl_info->min_column = PGSQLPGAMTABLE_MIN_COL;
+    tbl_info->max_column = PGSQLPGAMTABLE_MAX_COL;
+
+    /*
+     * save users context
+     */
+    pgsqlPgAmTable_if_ctx.user_ctx = reg_ptr;
+
+    /*
+     * call data access initialization code
+     */
+    pgsqlPgAmTable_init_data(reg_ptr);
+
+    /*
+     * set up the container
+     */
+    _pgsqlPgAmTable_container_init(&pgsqlPgAmTable_if_ctx);
+    if (NULL == pgsqlPgAmTable_if_ctx.container) {
+        snmp_log(LOG_ERR,"could not initialize container for pgsqlPgAmTable\n");
+        return;
+    }
+    
+    /*
+     * access_multiplexer: REQUIRED wrapper for get request handling
+     */
+    access_multiplexer->object_lookup = _mfd_pgsqlPgAmTable_object_lookup;
+    access_multiplexer->get_values = _mfd_pgsqlPgAmTable_get_values;
+
+    /*
+     * no wrappers yet
+     */
+    access_multiplexer->pre_request = _mfd_pgsqlPgAmTable_pre_request;
+    access_multiplexer->post_request = _mfd_pgsqlPgAmTable_post_request;
+
+
+    /*************************************************
+     *
+     * Create a registration, save our reg data, register table.
+     */
+    DEBUGMSGTL(("pgsqlPgAmTable:init_pgsqlPgAmTable",
+                "Registering pgsqlPgAmTable as a mibs-for-dummies table.\n"));          
+    handler = netsnmp_baby_steps_access_multiplexer_get(access_multiplexer);
+    reginfo = netsnmp_handler_registration_create("pgsqlPgAmTable", handler,
+                                                  pgsqlPgAmTable_oid,
+                                                  pgsqlPgAmTable_oid_size,
+                                                  HANDLER_CAN_BABY_STEP |
+                                                  HANDLER_CAN_RONLY
+                                                  );
+    if(NULL == reginfo) {
+        snmp_log(LOG_ERR,"error registering table pgsqlPgAmTable\n");
+        return;
+    }
+    reginfo->my_reg_void = &pgsqlPgAmTable_if_ctx;
+
+    /*************************************************
+     *
+     * set up baby steps handler, create it and inject it
+     */
+    if( access_multiplexer->object_lookup )
+        mfd_modes |= BABY_STEP_OBJECT_LOOKUP;
+    if( access_multiplexer->set_values )
+        mfd_modes |= BABY_STEP_SET_VALUES;
+    if( access_multiplexer->irreversible_commit )
+        mfd_modes |= BABY_STEP_IRREVERSIBLE_COMMIT;
+    if( access_multiplexer->object_syntax_checks )
+        mfd_modes |= BABY_STEP_CHECK_OBJECT;
+
+    if( access_multiplexer->pre_request )
+        mfd_modes |= BABY_STEP_PRE_REQUEST;
+    if( access_multiplexer->post_request )
+        mfd_modes |= BABY_STEP_POST_REQUEST;
+    
+    if( access_multiplexer->undo_setup )
+        mfd_modes |= BABY_STEP_UNDO_SETUP;
+    if( access_multiplexer->undo_cleanup )
+        mfd_modes |= BABY_STEP_UNDO_CLEANUP;
+    if( access_multiplexer->undo_sets )
+        mfd_modes |= BABY_STEP_UNDO_SETS;
+    
+    if( access_multiplexer->row_creation )
+        mfd_modes |= BABY_STEP_ROW_CREATE;
+    if( access_multiplexer->consistency_checks )
+        mfd_modes |= BABY_STEP_CHECK_CONSISTENCY;
+    if( access_multiplexer->commit )
+        mfd_modes |= BABY_STEP_COMMIT;
+    if( access_multiplexer->undo_commit )
+        mfd_modes |= BABY_STEP_UNDO_COMMIT;
+    
+    handler = netsnmp_baby_steps_handler_get(mfd_modes);
+    netsnmp_inject_handler(reginfo, handler);
+
+    /*************************************************
+     *
+     * inject row_merge helper with prefix rootoid_len + 2 (entry.col)
+     */
+    handler = netsnmp_get_row_merge_handler(reginfo->rootoid_len + 2);
+    netsnmp_inject_handler(reginfo, handler);
+
+    /*************************************************
+     *
+     * inject container_table helper
+     */
+    handler =
+        netsnmp_container_table_handler_get(tbl_info,
+                                            pgsqlPgAmTable_if_ctx.container,
+                                            TABLE_CONTAINER_KEY_NETSNMP_INDEX);
+    netsnmp_inject_handler( reginfo, handler );
+
+    /*************************************************
+     *
+     * inject cache helper
+     */
+    if(NULL != pgsqlPgAmTable_if_ctx.cache) {
+        handler = netsnmp_cache_handler_get(pgsqlPgAmTable_if_ctx.cache);
+        netsnmp_inject_handler( reginfo, handler );
+    }
+
+    /*
+     * register table
+     */
+    netsnmp_register_table(reginfo, tbl_info);
+} /* _pgsqlPgAmTable_initialize_interface */
+
+void
+pgsqlPgAmTable_valid_columns_set(netsnmp_column_info *vc)
+{
+    pgsqlPgAmTable_if_ctx.tbl_info.valid_columns = vc;
+} /* pgsqlPgAmTable_valid_columns_set */
+
+/**
+ * @internal
+ * convert the index component stored in the context to an oid
+ */
+int
+pgsqlPgAmTable_index_to_oid(netsnmp_index *oid_idx,
+                         pgsqlPgAmTable_mib_index *mib_idx)
+{
+    int err = SNMP_ERR_NOERROR;
+    
+    /*
+     * temp storage for parsing indexes
+     */
+    /*
+     * pgsnmpdConnID(1)/DisplayString/ASN_OCTET_STR/char(char)//L/a/w/e/R/d/H
+     */
+    netsnmp_variable_list var_pgsnmpdConnID;
+    /*
+     * rdbmsDbIndex(1)/INTEGER/ASN_INTEGER/long(long)//l/a/w/e/R/d/h
+     */
+    netsnmp_variable_list var_rdbmsDbIndex;
+    /*
+     * pgsqlPgAmEntryOID(1)/INTEGER/ASN_INTEGER/long(long)//l/a/w/e/r/d/h
+     */
+    netsnmp_variable_list var_pgsqlPgAmEntryOID;
+
+    /*
+     * set up varbinds
+     */
+    memset( &var_pgsnmpdConnID, 0x00, sizeof(var_pgsnmpdConnID) );
+    var_pgsnmpdConnID.type = ASN_OCTET_STR;
+    memset( &var_rdbmsDbIndex, 0x00, sizeof(var_rdbmsDbIndex) );
+    var_rdbmsDbIndex.type = ASN_INTEGER;
+    memset( &var_pgsqlPgAmEntryOID, 0x00, sizeof(var_pgsqlPgAmEntryOID) );
+    var_pgsqlPgAmEntryOID.type = ASN_INTEGER;
+
+    /*
+     * chain temp index varbinds together
+     */
+    var_pgsnmpdConnID.next_variable =  &var_rdbmsDbIndex; var_rdbmsDbIndex.next_variable =  &var_pgsqlPgAmEntryOID; var_pgsqlPgAmEntryOID.next_variable =  NULL;
+
+
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmTable_index_to_oid","called\n"));
+
+        /* pgsnmpdConnID(1)/DisplayString/ASN_OCTET_STR/char(char)//L/a/w/e/R/d/H */
+    snmp_set_var_value(&var_pgsnmpdConnID, (u_char*)&mib_idx->pgsnmpdConnID,
+                       mib_idx->pgsnmpdConnID_len * sizeof(mib_idx->pgsnmpdConnID[0]));
+
+        /* rdbmsDbIndex(1)/INTEGER/ASN_INTEGER/long(long)//l/a/w/e/R/d/h */
+    snmp_set_var_value(&var_rdbmsDbIndex, (u_char*)&mib_idx->rdbmsDbIndex,
+                       sizeof(mib_idx->rdbmsDbIndex));
+
+        /* pgsqlPgAmEntryOID(1)/INTEGER/ASN_INTEGER/long(long)//l/a/w/e/r/d/h */
+    snmp_set_var_value(&var_pgsqlPgAmEntryOID, (u_char*)&mib_idx->pgsqlPgAmEntryOID,
+                       sizeof(mib_idx->pgsqlPgAmEntryOID));
+
+
+    err = build_oid_noalloc(oid_idx->oids, oid_idx->len, &oid_idx->len,
+                           NULL, 0, &var_pgsnmpdConnID);
+    if(err)
+        snmp_log(LOG_ERR,"error %d converting index to oid\n", err);
+
+    /*
+     * parsing may have allocated memory. free it.
+     */
+    snmp_reset_var_buffers( &var_pgsnmpdConnID );
+
+    return err;
+} /* pgsqlPgAmTable_index_to_oid */
+
+/**
+ * extract pgsqlPgAmTable indexes from a netsnmp_index
+ *
+ * @retval SNMP_ERR_NOERROR  : no error
+ * @retval SNMP_ERR_GENERR   : error
+ */
+int
+pgsqlPgAmTable_index_from_oid(netsnmp_index *oid_idx,
+                         pgsqlPgAmTable_mib_index *mib_idx)
+{
+    int err = SNMP_ERR_NOERROR;
+    
+    /*
+     * temp storage for parsing indexes
+     */
+    /*
+     * pgsnmpdConnID(1)/DisplayString/ASN_OCTET_STR/char(char)//L/a/w/e/R/d/H
+     */
+    netsnmp_variable_list var_pgsnmpdConnID;
+    /*
+     * rdbmsDbIndex(1)/INTEGER/ASN_INTEGER/long(long)//l/a/w/e/R/d/h
+     */
+    netsnmp_variable_list var_rdbmsDbIndex;
+    /*
+     * pgsqlPgAmEntryOID(1)/INTEGER/ASN_INTEGER/long(long)//l/a/w/e/r/d/h
+     */
+    netsnmp_variable_list var_pgsqlPgAmEntryOID;
+
+    /*
+     * set up varbinds
+     */
+    memset( &var_pgsnmpdConnID, 0x00, sizeof(var_pgsnmpdConnID) );
+    var_pgsnmpdConnID.type = ASN_OCTET_STR;
+    memset( &var_rdbmsDbIndex, 0x00, sizeof(var_rdbmsDbIndex) );
+    var_rdbmsDbIndex.type = ASN_INTEGER;
+    memset( &var_pgsqlPgAmEntryOID, 0x00, sizeof(var_pgsqlPgAmEntryOID) );
+    var_pgsqlPgAmEntryOID.type = ASN_INTEGER;
+
+    /*
+     * chain temp index varbinds together
+     */
+    var_pgsnmpdConnID.next_variable =  &var_rdbmsDbIndex; var_rdbmsDbIndex.next_variable =  &var_pgsqlPgAmEntryOID; var_pgsqlPgAmEntryOID.next_variable =  NULL;
+
+
+    DEBUGMSGTL(("verbose:pgsqlPgAmTable:pgsqlPgAmTable_index_from_oid","called\n"));
+
+    /*
+     * parse the oid into the individual index components
+     */
+    err = parse_oid_indexes( oid_idx->oids, oid_idx->len,
+                             &var_pgsnmpdConnID );
+    if (err == SNMP_ERR_NOERROR) {
+        /*
+         * copy out values
+         */
+    /*
+     * NOTE: val_len is in bytes, pgsnmpdConnID_len might not be
+     */
+         if(var_pgsnmpdConnID.val_len > sizeof(mib_idx->pgsnmpdConnID))
+             err = SNMP_ERR_GENERR;
+         else {
+             memcpy(mib_idx->pgsnmpdConnID, var_pgsnmpdConnID.val.string, var_pgsnmpdConnID.val_len);
+             mib_idx->pgsnmpdConnID_len = var_pgsnmpdConnID.val_len / sizeof(mib_idx->pgsnmpdConnID[0]);
+         }
+    mib_idx->rdbmsDbIndex = *((long *)var_rdbmsDbIndex.val.string);
+    mib_idx->pgsqlPgAmEntryOID = *((long *)var_pgsqlPgAmEntryOID.val.string);
+
+
+    }
+
+    /*
+     * parsing may have allocated memory. free it.
+     */
+    snmp_reset_var_buffers( &var_pgsnmpdConnID );
+
+    return err;
+} /* pgsqlPgAmTable_index_from_oid */
+
+
+/* *********************************************************************
+ * @internal
+ * allocate resources for a pgsqlPgAmTable_rowreq_ctx
+ */
+pgsqlPgAmTable_rowreq_ctx *
+pgsqlPgAmTable_allocate_rowreq_ctx(void)
+{
+    pgsqlPgAmTable_rowreq_ctx *rowreq_ctx =
+                  SNMP_MALLOC_TYPEDEF(pgsqlPgAmTable_rowreq_ctx);
+
+    DEBUGMSGTL(("internal:pgsqlPgAmTable:pgsqlPgAmTable_allocate_rowreq_ctx","called\n"));
+
+    if(NULL == rowreq_ctx) {
+        snmp_log(LOG_ERR,"Couldn't allocate memory for a "
+                 "pgsqlPgAmTable_rowreq_ctx.\n");
+    }
+
+    rowreq_ctx->oid_idx.oids = rowreq_ctx->oid_tmp;
+
+    rowreq_ctx->pgsqlPgAmTable_data_list = NULL;
+    rowreq_ctx->pgsqlPgAmTable_reg = pgsqlPgAmTable_if_ctx.user_ctx;
+
+
+    return rowreq_ctx;
+} /* pgsqlPgAmTable_allocate_rowreq_ctx */
+
+/*
+ * @internal
+ * release resources for a pgsqlPgAmTable_rowreq_ctx
+ */
+void
+pgsqlPgAmTable_release_rowreq_ctx(pgsqlPgAmTable_rowreq_ctx *rowreq_ctx)
+{
+    DEBUGMSGTL(("internal:pgsqlPgAmTable:pgsqlPgAmTable_release_rowreq_ctx","called\n"));
+
+    netsnmp_assert(NULL != rowreq_ctx);
+    
+
+    /*
+     * free index oid pointer
+     */
+    if(rowreq_ctx->oid_idx.oids != rowreq_ctx->oid_tmp)
+        free(rowreq_ctx->oid_idx.oids);
+
+    SNMP_FREE(rowreq_ctx);
+} /* pgsqlPgAmTable_release_rowreq_ctx */
+
+/**
+ * @internal
+ * wrapper
+ */
+static int
+_mfd_pgsqlPgAmTable_pre_request(netsnmp_mib_handler *handler,
+                            netsnmp_handler_registration *reginfo,
+                            netsnmp_agent_request_info *agtreq_info,
+                            netsnmp_request_info *requests)
+{
+    int rc = pgsqlPgAmTable_pre_request(pgsqlPgAmTable_if_ctx.user_ctx);
+    if (MFD_SUCCESS != rc) {
+        /*
+         * nothing we can do about it but log it
+         */
+        DEBUGMSGTL(("internal:pgsqlPgAmTable","error %d from "
+                    "pgsqlPgAmTable_pre_request\n", rc));
+        netsnmp_request_set_error_all(requests, SNMP_VALIDATE_ERR(rc));
+    }
+    
+    return SNMP_ERR_NOERROR;
+} /* _mfd_pgsqlPgAmTable_pre_request */
+
+/**
+ * @internal
+ * wrapper
+ */
+static int
+_mfd_pgsqlPgAmTable_post_request(netsnmp_mib_handler *handler,
+                             netsnmp_handler_registration *reginfo,
+                             netsnmp_agent_request_info *agtreq_info,
+                             netsnmp_request_info *requests)
+{
+    pgsqlPgAmTable_rowreq_ctx *rowreq_ctx;
+    int rc = pgsqlPgAmTable_post_request(pgsqlPgAmTable_if_ctx.user_ctx);
+    if (MFD_SUCCESS != rc) {
+        /*
+         * nothing we can do about it but log it
+         */
+        DEBUGMSGTL(("internal:pgsqlPgAmTable","error %d from "
+                    "pgsqlPgAmTable_post_request\n", rc));
+    }
+    
+    /*
+     * if there are no errors, check for and handle row creation/deletion
+     */
+    rc = netsnmp_check_requests_error(requests);
+    if ((SNMP_ERR_NOERROR == rc) &&
+        (NULL !=
+         (rowreq_ctx = netsnmp_container_table_row_extract(requests)))) {
+        if (rowreq_ctx->rowreq_flags & MFD_ROW_CREATED) {
+            rowreq_ctx->rowreq_flags &= ~MFD_ROW_CREATED;
+            CONTAINER_INSERT(pgsqlPgAmTable_if_ctx.container, rowreq_ctx);
+        }
+        else if (rowreq_ctx->rowreq_flags & MFD_ROW_DELETED) {
+            CONTAINER_REMOVE(pgsqlPgAmTable_if_ctx.container, rowreq_ctx);
+            pgsqlPgAmTable_release_rowreq_ctx(rowreq_ctx);
+        }
+    }
+
+    return SNMP_ERR_NOERROR;
+} /* _mfd_pgsqlPgAmTable_post_request */
+
+/**
+ * @internal
+ * wrapper
+ */
+static int
+_mfd_pgsqlPgAmTable_object_lookup(netsnmp_mib_handler *handler,
+                         netsnmp_handler_registration *reginfo,
+                         netsnmp_agent_request_info *agtreq_info,
+                         netsnmp_request_info *requests)
+{
+    pgsqlPgAmTable_rowreq_ctx *rowreq_ctx =
+                  netsnmp_container_table_row_extract(requests);
+    
+    DEBUGMSGTL(("internal:pgsqlPgAmTable:_mfd_pgsqlPgAmTable_object_lookup","called\n"));
+
+    /*
+     * get our context from mfd
+     * pgsqlPgAmTable_interface_ctx *if_ctx =
+     *             (pgsqlPgAmTable_interface_ctx *)reginfo->my_reg_void;
+     */
+
+    if(NULL == rowreq_ctx) {
+        netsnmp_request_set_error_all(requests, SNMP_ERR_NOCREATION);
+    }
+    else {
+        pgsqlPgAmTable_row_prep(rowreq_ctx);
+    }
+
+    return SNMP_ERR_NOERROR;
+} /* _mfd_pgsqlPgAmTable_object_lookup */
+
+/***********************************************************************
+ *
+ * GET processing
+ *
+ ***********************************************************************/
+/*
+ * @internal
+ * Retrieve the value for a particular column
+ */
+NETSNMP_STATIC_INLINE int
+_pgsqlPgAmTable_get_column( pgsqlPgAmTable_rowreq_ctx *rowreq_ctx,
+                       netsnmp_variable_list *var, int column )
+{
+    int rc = SNMPERR_SUCCESS;
+    
+    DEBUGMSGTL(("internal:pgsqlPgAmTable:_mfd_pgsqlPgAmTable_get_column","called\n"));
+
+
+    netsnmp_assert(NULL != rowreq_ctx);
+
+    switch(column) {
+
+    /* pgsqlPgAmAmname(2)/DisplayString/ASN_OCTET_STR/char(char)//L/A/w/e/R/d/H */
+    case COLUMN_PGSQLPGAMAMNAME:
+    var->type = ASN_OCTET_STR;
+rc = pgsqlPgAmAmname_get(rowreq_ctx, (char **)&var->val.string, &var->val_len );
+        break;
+
+    /* pgsqlPgAmAmstrategies(3)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h */
+    case COLUMN_PGSQLPGAMAMSTRATEGIES:
+    var->val_len = sizeof(long);
+    var->type = ASN_INTEGER;
+rc = pgsqlPgAmAmstrategies_get(rowreq_ctx, (long *)var->val.string );
+        break;
+
+    /* pgsqlPgAmAmsupport(4)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h */
+    case COLUMN_PGSQLPGAMAMSUPPORT:
+    var->val_len = sizeof(long);
+    var->type = ASN_INTEGER;
+rc = pgsqlPgAmAmsupport_get(rowreq_ctx, (long *)var->val.string );
+        break;
+
+    /* pgsqlPgAmAmorderstrategy(5)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h */
+    case COLUMN_PGSQLPGAMAMORDERSTRATEGY:
+    var->val_len = sizeof(long);
+    var->type = ASN_INTEGER;
+rc = pgsqlPgAmAmorderstrategy_get(rowreq_ctx, (long *)var->val.string );
+        break;
+
+    /* pgsqlPgAmAmcanunique(6)/TruthValue/ASN_INTEGER/long(u_long)//l/A/w/E/r/d/h */
+    case COLUMN_PGSQLPGAMAMCANUNIQUE:
+    var->val_len = sizeof(u_long);
+    var->type = ASN_INTEGER;
+rc = pgsqlPgAmAmcanunique_get(rowreq_ctx, (u_long *)var->val.string );
+        break;
+
+    /* pgsqlPgAmAmcanmulticol(7)/TruthValue/ASN_INTEGER/long(u_long)//l/A/w/E/r/d/h */
+    case COLUMN_PGSQLPGAMAMCANMULTICOL:
+    var->val_len = sizeof(u_long);
+    var->type = ASN_INTEGER;
+rc = pgsqlPgAmAmcanmulticol_get(rowreq_ctx, (u_long *)var->val.string );
+        break;
+
+    /* pgsqlPgAmAmoptionalkey(8)/TruthValue/ASN_INTEGER/long(u_long)//l/A/w/E/r/d/h */
+    case COLUMN_PGSQLPGAMAMOPTIONALKEY:
+    var->val_len = sizeof(u_long);
+    var->type = ASN_INTEGER;
+rc = pgsqlPgAmAmoptionalkey_get(rowreq_ctx, (u_long *)var->val.string );
+        break;
+
+    /* pgsqlPgAmAmindexnulls(9)/TruthValue/ASN_INTEGER/long(u_long)//l/A/w/E/r/d/h */
+    case COLUMN_PGSQLPGAMAMINDEXNULLS:
+    var->val_len = sizeof(u_long);
+    var->type = ASN_INTEGER;
+rc = pgsqlPgAmAmindexnulls_get(rowreq_ctx, (u_long *)var->val.string );
+        break;
+
+    /* pgsqlPgAmAmstorage(10)/TruthValue/ASN_INTEGER/long(u_long)//l/A/w/E/r/d/h */
+    case COLUMN_PGSQLPGAMAMSTORAGE:
+    var->val_len = sizeof(u_long);
+    var->type = ASN_INTEGER;
+rc = pgsqlPgAmAmstorage_get(rowreq_ctx, (u_long *)var->val.string );
+        break;
+
+    /* pgsqlPgAmAmclusterable(11)/TruthValue/ASN_INTEGER/long(u_long)//l/A/w/E/r/d/h */
+    case COLUMN_PGSQLPGAMAMCLUSTERABLE:
+    var->val_len = sizeof(u_long);
+    var->type = ASN_INTEGER;
+rc = pgsqlPgAmAmclusterable_get(rowreq_ctx, (u_long *)var->val.string );
+        break;
+
+    /* pgsqlPgAmAminsert(12)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h */
+    case COLUMN_PGSQLPGAMAMINSERT:
+    var->val_len = sizeof(long);
+    var->type = ASN_INTEGER;
+rc = pgsqlPgAmAminsert_get(rowreq_ctx, (long *)var->val.string );
+        break;
+
+    /* pgsqlPgAmAmbeginscan(13)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h */
+    case COLUMN_PGSQLPGAMAMBEGINSCAN:
+    var->val_len = sizeof(long);
+    var->type = ASN_INTEGER;
+rc = pgsqlPgAmAmbeginscan_get(rowreq_ctx, (long *)var->val.string );
+        break;
+
+    /* pgsqlPgAmAmgettuple(14)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h */
+    case COLUMN_PGSQLPGAMAMGETTUPLE:
+    var->val_len = sizeof(long);
+    var->type = ASN_INTEGER;
+rc = pgsqlPgAmAmgettuple_get(rowreq_ctx, (long *)var->val.string );
+        break;
+
+    /* pgsqlPgAmAmgetmulti(15)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h */
+    case COLUMN_PGSQLPGAMAMGETMULTI:
+    var->val_len = sizeof(long);
+    var->type = ASN_INTEGER;
+rc = pgsqlPgAmAmgetmulti_get(rowreq_ctx, (long *)var->val.string );
+        break;
+
+    /* pgsqlPgAmAmrescan(16)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h */
+    case COLUMN_PGSQLPGAMAMRESCAN:
+    var->val_len = sizeof(long);
+    var->type = ASN_INTEGER;
+rc = pgsqlPgAmAmrescan_get(rowreq_ctx, (long *)var->val.string );
+        break;
+
+    /* pgsqlPgAmAmendscan(17)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h */
+    case COLUMN_PGSQLPGAMAMENDSCAN:
+    var->val_len = sizeof(long);
+    var->type = ASN_INTEGER;
+rc = pgsqlPgAmAmendscan_get(rowreq_ctx, (long *)var->val.string );
+        break;
+
+    /* pgsqlPgAmAmmarkpos(18)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h */
+    case COLUMN_PGSQLPGAMAMMARKPOS:
+    var->val_len = sizeof(long);
+    var->type = ASN_INTEGER;
+rc = pgsqlPgAmAmmarkpos_get(rowreq_ctx, (long *)var->val.string );
+        break;
+
+    /* pgsqlPgAmAmrestrpos(19)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h */
+    case COLUMN_PGSQLPGAMAMRESTRPOS:
+    var->val_len = sizeof(long);
+    var->type = ASN_INTEGER;
+rc = pgsqlPgAmAmrestrpos_get(rowreq_ctx, (long *)var->val.string );
+        break;
+
+    /* pgsqlPgAmAmbuild(20)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h */
+    case COLUMN_PGSQLPGAMAMBUILD:
+    var->val_len = sizeof(long);
+    var->type = ASN_INTEGER;
+rc = pgsqlPgAmAmbuild_get(rowreq_ctx, (long *)var->val.string );
+        break;
+
+    /* pgsqlPgAmAmbulkdelete(21)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h */
+    case COLUMN_PGSQLPGAMAMBULKDELETE:
+    var->val_len = sizeof(long);
+    var->type = ASN_INTEGER;
+rc = pgsqlPgAmAmbulkdelete_get(rowreq_ctx, (long *)var->val.string );
+        break;
+
+    /* pgsqlPgAmAmvacuumcleanup(22)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h */
+    case COLUMN_PGSQLPGAMAMVACUUMCLEANUP:
+    var->val_len = sizeof(long);
+    var->type = ASN_INTEGER;
+rc = pgsqlPgAmAmvacuumcleanup_get(rowreq_ctx, (long *)var->val.string );
+        break;
+
+    /* pgsqlPgAmAmcostestimate(23)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h */
+    case COLUMN_PGSQLPGAMAMCOSTESTIMATE:
+    var->val_len = sizeof(long);
+    var->type = ASN_INTEGER;
+rc = pgsqlPgAmAmcostestimate_get(rowreq_ctx, (long *)var->val.string );
+        break;
+
+    /* pgsqlPgAmAmoptions(24)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h */
+    case COLUMN_PGSQLPGAMAMOPTIONS:
+    var->val_len = sizeof(long);
+    var->type = ASN_INTEGER;
+rc = pgsqlPgAmAmoptions_get(rowreq_ctx, (long *)var->val.string );
+        break;
+
+     default:
+         snmp_log(LOG_ERR,"unknown column %d in _pgsqlPgAmTable_get_column\n", column);
+         break;
+    }
+
+    return rc;
+} /* _pgsqlPgAmTable_get_column */
+
+int
+_mfd_pgsqlPgAmTable_get_values(netsnmp_mib_handler *handler,
+                         netsnmp_handler_registration *reginfo,
+                         netsnmp_agent_request_info *agtreq_info,
+                         netsnmp_request_info *requests)
+{
+    pgsqlPgAmTable_rowreq_ctx *rowreq_ctx =
+                  netsnmp_container_table_row_extract(requests);
+    netsnmp_table_request_info * tri;
+   &nbs