pduMIB_form.c 50 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068
  1. /*
  2. * Note: this file originally auto-generated by mib2c
  3. * using mib2c.create-dataset.conf
  4. */
  5. #include <net-snmp/net-snmp-config.h>
  6. #include <net-snmp/net-snmp-includes.h>
  7. #include <net-snmp/agent/net-snmp-agent-includes.h>
  8. #include "pduMIB_form.h"
  9. #include "common.h"
  10. /** Initialize the pduChannelTable table by defining its contents and how it's structured */
  11. void
  12. initialize_table_pduChannelTable(void)
  13. {
  14. const oid pduChannelTable_oid[] = {1,3,6,1,4,1,2024,1,3,9};
  15. netsnmp_table_data_set *table_set;
  16. /* create the table structure itself */
  17. table_set = netsnmp_create_table_data_set("pduChannelTable");
  18. /* comment this out or delete if you don't support creation of new rows */
  19. table_set->allow_creation = 1;
  20. /***************************************************
  21. * Adding indexes
  22. */
  23. DEBUGMSGTL(("initialize_table_pduChannelTable",
  24. "adding indexes to table pduChannelTable\n"));
  25. netsnmp_table_set_add_indexes(table_set,
  26. ASN_INTEGER, /* index: pduChannelID */
  27. 0);
  28. DEBUGMSGTL(("initialize_table_pduChannelTable",
  29. "adding column types to table pduChannelTable\n"));
  30. netsnmp_table_set_multi_add_default_row(table_set,
  31. COLUMN_PDUCHANNELID, ASN_INTEGER, 0,
  32. NULL, 0,
  33. COLUMN_PDUCHANNELNAME, ASN_OCTET_STR, 0,
  34. NULL, 0,
  35. COLUMN_PDUCHANNELSTATUS, ASN_INTEGER, 1,
  36. NULL, 0,
  37. COLUMN_PDUCHANNELVOLTAGE, ASN_OCTET_STR, 0,
  38. NULL, 0,
  39. COLUMN_PDUCHANNELCURRENT, ASN_OCTET_STR, 0,
  40. NULL, 0,
  41. COLUMN_PDUCHANNELFREQUENCY, ASN_INTEGER, 0,
  42. NULL, 0,
  43. COLUMN_PDUCHANNELCONSUMPTION, ASN_OCTET_STR, 0,
  44. NULL, 0,
  45. COLUMN_PDUCHANNELPOWERFACTOR, ASN_OCTET_STR, 0,
  46. NULL, 0,
  47. COLUMN_PDUCHANNELPACTIVEPOWER, ASN_OCTET_STR, 0,
  48. NULL, 0,
  49. COLUMN_PDUCHANNELREACTIVEPOWER, ASN_OCTET_STR, 0,
  50. NULL, 0,
  51. COLUMN_PDUCHANNELAPPARENTPOWER, ASN_OCTET_STR, 0,
  52. NULL, 0,
  53. 0);
  54. /* registering the table with the master agent */
  55. /* note: if you don't need a subhandler to deal with any aspects
  56. of the request, change pduChannelTable_handler to "NULL" */
  57. netsnmp_register_table_data_set(netsnmp_create_handler_registration("pduChannelTable", pduChannelTable_handler,
  58. pduChannelTable_oid,
  59. OID_LENGTH(pduChannelTable_oid),
  60. HANDLER_CAN_RWRITE),
  61. table_set, NULL);
  62. }
  63. /** Initialize the pduGroupTable table by defining its contents and how it's structured */
  64. void
  65. initialize_table_pduGroupTable(void)
  66. {
  67. const oid pduGroupTable_oid[] = {1,3,6,1,4,1,2024,1,3,10};
  68. netsnmp_table_data_set *table_set;
  69. /* create the table structure itself */
  70. table_set = netsnmp_create_table_data_set("pduGroupTable");
  71. /* comment this out or delete if you don't support creation of new rows */
  72. table_set->allow_creation = 1;
  73. /***************************************************
  74. * Adding indexes
  75. */
  76. DEBUGMSGTL(("initialize_table_pduGroupTable",
  77. "adding indexes to table pduGroupTable\n"));
  78. netsnmp_table_set_add_indexes(table_set,
  79. ASN_INTEGER, /* index: pduGroupID */
  80. 0);
  81. DEBUGMSGTL(("initialize_table_pduGroupTable",
  82. "adding column types to table pduGroupTable\n"));
  83. netsnmp_table_set_multi_add_default_row(table_set,
  84. COLUMN_PDUGROUPID, ASN_INTEGER, 0,
  85. NULL, 0,
  86. COLUMN_PDUGROUPNAME, ASN_OCTET_STR, 1,
  87. NULL, 0,
  88. COLUMN_PDUGROUPLIST, ASN_OCTET_STR, 1,
  89. NULL, 0,
  90. COLUMN_PDUGROUPSTATUS, ASN_INTEGER, 1,
  91. NULL, 0,
  92. 0);
  93. /* registering the table with the master agent */
  94. /* note: if you don't need a subhandler to deal with any aspects
  95. of the request, change pduGroupTable_handler to "NULL" */
  96. netsnmp_register_table_data_set(netsnmp_create_handler_registration("pduGroupTable", pduGroupTable_handler,
  97. pduGroupTable_oid,
  98. OID_LENGTH(pduGroupTable_oid),
  99. HANDLER_CAN_RWRITE),
  100. table_set, NULL);
  101. }
  102. /** Initialize the pduSensorTable table by defining its contents and how it's structured */
  103. void
  104. initialize_table_pduSensorTable(void)
  105. {
  106. const oid pduSensorTable_oid[] = {1,3,6,1,4,1,2024,1,4,1};
  107. netsnmp_table_data_set *table_set;
  108. /* create the table structure itself */
  109. table_set = netsnmp_create_table_data_set("pduSensorTable");
  110. /* comment this out or delete if you don't support creation of new rows */
  111. table_set->allow_creation = 1;
  112. /***************************************************
  113. * Adding indexes
  114. */
  115. DEBUGMSGTL(("initialize_table_pduSensorTable",
  116. "adding indexes to table pduSensorTable\n"));
  117. netsnmp_table_set_add_indexes(table_set,
  118. ASN_INTEGER, /* index: pduSensorID */
  119. 0);
  120. DEBUGMSGTL(("initialize_table_pduSensorTable",
  121. "adding column types to table pduSensorTable\n"));
  122. netsnmp_table_set_multi_add_default_row(table_set,
  123. COLUMN_PDUSENSORID, ASN_INTEGER, 0,
  124. NULL, 0,
  125. COLUMN_PDUSENSORNAME, ASN_OCTET_STR, 0,
  126. NULL, 0,
  127. COLUMN_PDUSENSORTYPE, ASN_INTEGER, 0,
  128. NULL, 0,
  129. COLUMN_PDUSENSORDATACHENNEL, ASN_OCTET_STR, 0,
  130. NULL, 0,
  131. COLUMN_PDUSENSORMODBUSADDRESS, ASN_INTEGER, 0,
  132. NULL, 0,
  133. COLUMN_PDUSENSORSTATUS, ASN_INTEGER, 1,
  134. NULL, 0,
  135. COLUMN_PDUSENSORVALUENUM, ASN_INTEGER, 0,
  136. NULL, 0,
  137. COLUMN_PDUSENSORVALUE1, ASN_INTEGER, 0,
  138. NULL, 0,
  139. COLUMN_PDUSENSORVALUE2, ASN_INTEGER, 0,
  140. NULL, 0,
  141. 0);
  142. /* registering the table with the master agent */
  143. /* note: if you don't need a subhandler to deal with any aspects
  144. of the request, change pduSensorTable_handler to "NULL" */
  145. netsnmp_register_table_data_set(netsnmp_create_handler_registration("pduSensorTable", pduSensorTable_handler,
  146. pduSensorTable_oid,
  147. OID_LENGTH(pduSensorTable_oid),
  148. HANDLER_CAN_RWRITE),
  149. table_set, NULL);
  150. }
  151. /** Initialize the pduSMTPRecMailTable table by defining its contents and how it's structured */
  152. void
  153. initialize_table_pduSMTPRecMailTable(void)
  154. {
  155. const oid pduSMTPRecMailTable_oid[] = {1,3,6,1,4,1,2024,1,5,3,4};
  156. netsnmp_table_data_set *table_set;
  157. /* create the table structure itself */
  158. table_set = netsnmp_create_table_data_set("pduSMTPRecMailTable");
  159. /* comment this out or delete if you don't support creation of new rows */
  160. table_set->allow_creation = 1;
  161. /***************************************************
  162. * Adding indexes
  163. */
  164. DEBUGMSGTL(("initialize_table_pduSMTPRecMailTable",
  165. "adding indexes to table pduSMTPRecMailTable\n"));
  166. netsnmp_table_set_add_indexes(table_set,
  167. ASN_OCTET_STR, /* index: pduSMTPRecMail */
  168. 0);
  169. DEBUGMSGTL(("initialize_table_pduSMTPRecMailTable",
  170. "adding column types to table pduSMTPRecMailTable\n"));
  171. netsnmp_table_set_multi_add_default_row(table_set,
  172. COLUMN_PDUSMTPRECMAIL, ASN_OCTET_STR, 1,
  173. NULL, 0,
  174. 0);
  175. /* registering the table with the master agent */
  176. /* note: if you don't need a subhandler to deal with any aspects
  177. of the request, change pduSMTPRecMailTable_handler to "NULL" */
  178. netsnmp_register_table_data_set(netsnmp_create_handler_registration("pduSMTPRecMailTable", pduSMTPRecMailTable_handler,
  179. pduSMTPRecMailTable_oid,
  180. OID_LENGTH(pduSMTPRecMailTable_oid),
  181. HANDLER_CAN_RWRITE),
  182. table_set, NULL);
  183. }
  184. /** Initialize the pduMessageNumTable table by defining its contents and how it's structured */
  185. void
  186. initialize_table_pduMessageNumTable(void)
  187. {
  188. const oid pduMessageNumTable_oid[] = {1,3,6,1,4,1,2024,1,5,5,2};
  189. netsnmp_table_data_set *table_set;
  190. /* create the table structure itself */
  191. table_set = netsnmp_create_table_data_set("pduMessageNumTable");
  192. /* comment this out or delete if you don't support creation of new rows */
  193. table_set->allow_creation = 1;
  194. /***************************************************
  195. * Adding indexes
  196. */
  197. DEBUGMSGTL(("initialize_table_pduMessageNumTable",
  198. "adding indexes to table pduMessageNumTable\n"));
  199. netsnmp_table_set_add_indexes(table_set,
  200. ASN_OCTET_STR, /* index: pduMessageRecNum */
  201. 0);
  202. DEBUGMSGTL(("initialize_table_pduMessageNumTable",
  203. "adding column types to table pduMessageNumTable\n"));
  204. netsnmp_table_set_multi_add_default_row(table_set,
  205. COLUMN_PDUMESSAGERECNUM, ASN_OCTET_STR, 1,
  206. NULL, 0,
  207. 0);
  208. /* registering the table with the master agent */
  209. /* note: if you don't need a subhandler to deal with any aspects
  210. of the request, change pduMessageNumTable_handler to "NULL" */
  211. netsnmp_register_table_data_set(netsnmp_create_handler_registration("pduMessageNumTable", pduMessageNumTable_handler,
  212. pduMessageNumTable_oid,
  213. OID_LENGTH(pduMessageNumTable_oid),
  214. HANDLER_CAN_RWRITE),
  215. table_set, NULL);
  216. }
  217. /** Initialize the pduMQTTBrokerTable table by defining its contents and how it's structured */
  218. void
  219. initialize_table_pduMQTTBrokerTable(void)
  220. {
  221. const oid pduMQTTBrokerTable_oid[] = {1,3,6,1,4,1,2024,1,5,6,3};
  222. netsnmp_table_data_set *table_set;
  223. /* create the table structure itself */
  224. table_set = netsnmp_create_table_data_set("pduMQTTBrokerTable");
  225. /* comment this out or delete if you don't support creation of new rows */
  226. table_set->allow_creation = 1;
  227. /***************************************************
  228. * Adding indexes
  229. */
  230. DEBUGMSGTL(("initialize_table_pduMQTTBrokerTable",
  231. "adding indexes to table pduMQTTBrokerTable\n"));
  232. netsnmp_table_set_add_indexes(table_set,
  233. ASN_OCTET_STR, /* index: pduMQTTBrokerName */
  234. 0);
  235. DEBUGMSGTL(("initialize_table_pduMQTTBrokerTable",
  236. "adding column types to table pduMQTTBrokerTable\n"));
  237. netsnmp_table_set_multi_add_default_row(table_set,
  238. COLUMN_PDUMQTTBROKERNAME, ASN_OCTET_STR, 1,
  239. NULL, 0,
  240. COLUMN_PDUMQTTBROKERENABLE, ASN_INTEGER, 1,
  241. NULL, 0,
  242. COLUMN_PDUMQTTBROKERIPORDOMAIN, ASN_OCTET_STR, 1,
  243. NULL, 0,
  244. COLUMN_PDUMQTTBROKERPORT, ASN_INTEGER, 1,
  245. NULL, 0,
  246. COLUMN_PDUMQTTBROKERUSERNAME, ASN_OCTET_STR, 1,
  247. NULL, 0,
  248. COLUMN_PDUMQTTBROKERUSERPW, ASN_OCTET_STR, 1,
  249. NULL, 0,
  250. 0);
  251. /* registering the table with the master agent */
  252. /* note: if you don't need a subhandler to deal with any aspects
  253. of the request, change pduMQTTBrokerTable_handler to "NULL" */
  254. netsnmp_register_table_data_set(netsnmp_create_handler_registration("pduMQTTBrokerTable", pduMQTTBrokerTable_handler,
  255. pduMQTTBrokerTable_oid,
  256. OID_LENGTH(pduMQTTBrokerTable_oid),
  257. HANDLER_CAN_RWRITE),
  258. table_set, NULL);
  259. }
  260. /** Initialize the pduCloudServerTable table by defining its contents and how it's structured */
  261. void
  262. initialize_table_pduCloudServerTable(void)
  263. {
  264. const oid pduCloudServerTable_oid[] = {1,3,6,1,4,1,2024,1,5,7,3};
  265. netsnmp_table_data_set *table_set;
  266. /* create the table structure itself */
  267. table_set = netsnmp_create_table_data_set("pduCloudServerTable");
  268. /* comment this out or delete if you don't support creation of new rows */
  269. table_set->allow_creation = 1;
  270. /***************************************************
  271. * Adding indexes
  272. */
  273. DEBUGMSGTL(("initialize_table_pduCloudServerTable",
  274. "adding indexes to table pduCloudServerTable\n"));
  275. netsnmp_table_set_add_indexes(table_set,
  276. ASN_OCTET_STR, /* index: pduCloudServerName */
  277. 0);
  278. DEBUGMSGTL(("initialize_table_pduCloudServerTable",
  279. "adding column types to table pduCloudServerTable\n"));
  280. netsnmp_table_set_multi_add_default_row(table_set,
  281. COLUMN_PDUCLOUDSERVERNAME, ASN_OCTET_STR, 1,
  282. NULL, 0,
  283. COLUMN_PDUCLOUDSERVERENABLE, ASN_INTEGER, 1,
  284. NULL, 0,
  285. COLUMN_PDUCLOUDSERVERIPORDOMAIN, ASN_OCTET_STR, 1,
  286. NULL, 0,
  287. COLUMN_PDUCLOUDSERVERPORT, ASN_INTEGER, 1,
  288. NULL, 0,
  289. COLUMN_PDUCLOUDSERVERUSERNAME, ASN_OCTET_STR, 1,
  290. NULL, 0,
  291. COLUMN_PDUCLOUDSERVERUSERPW, ASN_OCTET_STR, 1,
  292. NULL, 0,
  293. 0);
  294. /* registering the table with the master agent */
  295. /* note: if you don't need a subhandler to deal with any aspects
  296. of the request, change pduCloudServerTable_handler to "NULL" */
  297. netsnmp_register_table_data_set(netsnmp_create_handler_registration("pduCloudServerTable", pduCloudServerTable_handler,
  298. pduCloudServerTable_oid,
  299. OID_LENGTH(pduCloudServerTable_oid),
  300. HANDLER_CAN_RWRITE),
  301. table_set, NULL);
  302. }
  303. /** Initialize the pduAlarmHistoryTable table by defining its contents and how it's structured */
  304. void
  305. initialize_table_pduAlarmHistoryTable(void)
  306. {
  307. const oid pduAlarmHistoryTable_oid[] = {1,3,6,1,4,1,2024,1,6,1};
  308. netsnmp_table_data_set *table_set;
  309. /* create the table structure itself */
  310. table_set = netsnmp_create_table_data_set("pduAlarmHistoryTable");
  311. /* comment this out or delete if you don't support creation of new rows */
  312. table_set->allow_creation = 1;
  313. /***************************************************
  314. * Adding indexes
  315. */
  316. DEBUGMSGTL(("initialize_table_pduAlarmHistoryTable",
  317. "adding indexes to table pduAlarmHistoryTable\n"));
  318. netsnmp_table_set_add_indexes(table_set,
  319. ASN_INTEGER, /* index: pduAlarmID */
  320. 0);
  321. DEBUGMSGTL(("initialize_table_pduAlarmHistoryTable",
  322. "adding column types to table pduAlarmHistoryTable\n"));
  323. netsnmp_table_set_multi_add_default_row(table_set,
  324. COLUMN_PDUALARMID, ASN_INTEGER, 0,
  325. NULL, 0,
  326. COLUMN_PDUALARMTYPE, ASN_INTEGER, 0,
  327. NULL, 0,
  328. COLUMN_PDUALARMCONTEXT, ASN_OCTET_STR, 0,
  329. NULL, 0,
  330. COLUMN_PDUALARMACTION, ASN_INTEGER, 0,
  331. NULL, 0,
  332. COLUMN_PDUALARMACTIONPARA, ASN_INTEGER, 0,
  333. NULL, 0,
  334. COLUMN_PDUALARMDATE, ASN_OCTET_STR, 0,
  335. NULL, 0,
  336. COLUMN_PDUALARMTIME, ASN_OCTET_STR, 0,
  337. NULL, 0,
  338. 0);
  339. /* registering the table with the master agent */
  340. /* note: if you don't need a subhandler to deal with any aspects
  341. of the request, change pduAlarmHistoryTable_handler to "NULL" */
  342. netsnmp_register_table_data_set(netsnmp_create_handler_registration("pduAlarmHistoryTable", pduAlarmHistoryTable_handler,
  343. pduAlarmHistoryTable_oid,
  344. OID_LENGTH(pduAlarmHistoryTable_oid),
  345. HANDLER_CAN_RWRITE),
  346. table_set, NULL);
  347. }
  348. /** Initialize the pduChannelLimitTable table by defining its contents and how it's structured */
  349. void
  350. initialize_table_pduChannelLimitTable(void)
  351. {
  352. const oid pduChannelLimitTable_oid[] = {1,3,6,1,4,1,2024,1,7,2,6};
  353. netsnmp_table_data_set *table_set;
  354. /* create the table structure itself */
  355. table_set = netsnmp_create_table_data_set("pduChannelLimitTable");
  356. /* comment this out or delete if you don't support creation of new rows */
  357. table_set->allow_creation = 1;
  358. /***************************************************
  359. * Adding indexes
  360. */
  361. DEBUGMSGTL(("initialize_table_pduChannelLimitTable",
  362. "adding indexes to table pduChannelLimitTable\n"));
  363. netsnmp_table_set_add_indexes(table_set,
  364. ASN_INTEGER, /* index: pduChannelLimitID */
  365. 0);
  366. DEBUGMSGTL(("initialize_table_pduChannelLimitTable",
  367. "adding column types to table pduChannelLimitTable\n"));
  368. netsnmp_table_set_multi_add_default_row(table_set,
  369. COLUMN_PDUCHANNELLIMITID, ASN_INTEGER, 0,
  370. NULL, 0,
  371. COLUMN_PDUCHANNELLIMITNAME, ASN_OCTET_STR, 1,
  372. NULL, 0,
  373. COLUMN_PDUCHANNELCURRENTLIMITUP, ASN_OCTET_STR, 1,
  374. NULL, 0,
  375. COLUMN_PDUCHANNELVOLTAGELIMITUP, ASN_OCTET_STR, 1,
  376. NULL, 0,
  377. COLUMN_PDUCHANNELVOLTAGELIMITDOWN, ASN_OCTET_STR, 1,
  378. NULL, 0,
  379. COLUMN_PDUCHANNELPOWERLIMITUP, ASN_OCTET_STR, 1,
  380. NULL, 0,
  381. COLUMN_PDUCHANNELCONSUMPTIONLIMITUP, ASN_OCTET_STR, 1,
  382. NULL, 0,
  383. 0);
  384. /* registering the table with the master agent */
  385. /* note: if you don't need a subhandler to deal with any aspects
  386. of the request, change pduChannelLimitTable_handler to "NULL" */
  387. netsnmp_register_table_data_set(netsnmp_create_handler_registration("pduChannelLimitTable", pduChannelLimitTable_handler,
  388. pduChannelLimitTable_oid,
  389. OID_LENGTH(pduChannelLimitTable_oid),
  390. HANDLER_CAN_RWRITE),
  391. table_set, NULL);
  392. }
  393. /** Initialize the pduSensorLimitTable table by defining its contents and how it's structured */
  394. void
  395. initialize_table_pduSensorLimitTable(void)
  396. {
  397. const oid pduSensorLimitTable_oid[] = {1,3,6,1,4,1,2024,1,7,3,1};
  398. netsnmp_table_data_set *table_set;
  399. /* create the table structure itself */
  400. table_set = netsnmp_create_table_data_set("pduSensorLimitTable");
  401. /* comment this out or delete if you don't support creation of new rows */
  402. table_set->allow_creation = 1;
  403. /***************************************************
  404. * Adding indexes
  405. */
  406. DEBUGMSGTL(("initialize_table_pduSensorLimitTable",
  407. "adding indexes to table pduSensorLimitTable\n"));
  408. netsnmp_table_set_add_indexes(table_set,
  409. ASN_INTEGER, /* index: pduSensorLimitID */
  410. 0);
  411. DEBUGMSGTL(("initialize_table_pduSensorLimitTable",
  412. "adding column types to table pduSensorLimitTable\n"));
  413. netsnmp_table_set_multi_add_default_row(table_set,
  414. COLUMN_PDUSENSORLIMITID, ASN_INTEGER, 1,
  415. NULL, 0,
  416. COLUMN_PDUSENSORLIMITNAME, ASN_OCTET_STR, 1,
  417. NULL, 0,
  418. COLUMN_PDUSENSORLIMITVALUE1, ASN_INTEGER, 1,
  419. NULL, 0,
  420. COLUMN_PDUSENSORLIMITVALUE2, ASN_INTEGER, 1,
  421. NULL, 0,
  422. 0);
  423. /* registering the table with the master agent */
  424. /* note: if you don't need a subhandler to deal with any aspects
  425. of the request, change pduSensorLimitTable_handler to "NULL" */
  426. netsnmp_register_table_data_set(netsnmp_create_handler_registration("pduSensorLimitTable", pduSensorLimitTable_handler,
  427. pduSensorLimitTable_oid,
  428. OID_LENGTH(pduSensorLimitTable_oid),
  429. HANDLER_CAN_RWRITE),
  430. table_set, NULL);
  431. }
  432. /** Initializes the pduMIB module */
  433. void
  434. init_pduMIB_form(void)
  435. {
  436. /* here we initialize all the tables we're planning on supporting */
  437. initialize_table_pduChannelTable();
  438. initialize_table_pduGroupTable();
  439. initialize_table_pduSensorTable();
  440. initialize_table_pduSMTPRecMailTable();
  441. initialize_table_pduMessageNumTable();
  442. initialize_table_pduMQTTBrokerTable();
  443. initialize_table_pduCloudServerTable();
  444. initialize_table_pduAlarmHistoryTable();
  445. initialize_table_pduChannelLimitTable();
  446. initialize_table_pduSensorLimitTable();
  447. }
  448. /** handles requests for the pduChannelTable table, if anything else needs to be done */
  449. int
  450. pduChannelTable_handler(
  451. netsnmp_mib_handler *handler,
  452. netsnmp_handler_registration *reginfo,
  453. netsnmp_agent_request_info *reqinfo,
  454. netsnmp_request_info *requests) {
  455. /* perform anything here that you need to do. The requests have
  456. already been processed by the master table_dataset handler, but
  457. this gives you chance to act on the request in some other way
  458. if need be. */
  459. netsnmp_request_info *request;
  460. netsnmp_table_request_info *table_info;
  461. GlobalPowerManger* iterator;
  462. //GlobalPowerInfo powerInfo;
  463. char buffer[16];
  464. switch(reqinfo->mode)
  465. {
  466. case MODE_GET:
  467. for (request = requests; request; request = request->next)
  468. {
  469. table_info = netsnmp_extract_table_info(request);
  470. int nIndex=1;
  471. list_for_each_entry(iterator, &__globalDeviceManage._globalPowerManger.list, list)
  472. {
  473. //查询数据库总电源信息 传给所申请的参数结构体
  474. //if(dev_search_power_trend_info(__globalDeviceManage.db,iterator->product_id,0,iterator)!=0)
  475. //{
  476. // log_e("search total power consumption err at pduChannelTable_handler from db.");
  477. //}
  478. //传值给总管理结构体
  479. // for(int i=0;i< TOTAL_COUNT;i++)
  480. // {
  481. // strcpy(_over_all_pwr_back_info._Power_Trend_Info.xAxis[i],__PowerTrendInfo._power_trend_info.xAxis[i]);
  482. // _over_all_pwr_back_info._Power_Trend_Info.ydata[POWER_MERITORIOUS_TYPE][i] = __PowerTrendInfo._power_trend_info.ydata[POWER_MERITORIOUS_TYPE][i];
  483. // _over_all_pwr_back_info._Power_Trend_Info.ydata[POWER_REACTIVE_TYPE][i] = __PowerTrendInfo._power_trend_info.ydata[POWER_REACTIVE_TYPE][i];
  484. // _over_all_pwr_back_info._Power_Trend_Info.ydata[POWER_APPARENT_TYPE][i] = __PowerTrendInfo._power_trend_info.ydata[POWER_APPARENT_TYPE][i];
  485. // }
  486. //if(dev_search_latest_power_info(__globalDeviceManage.db,__globalDeviceManage._global_device_info->product_id,iterator->product_ch_id,&powerInfo)!=0)
  487. //{
  488. // log_e("search total pwr err at pduChannelTable_handler from db.");
  489. //}
  490. //else
  491. //{
  492. if (nIndex<table_info->index_oid[0])
  493. {
  494. nIndex++;
  495. continue;
  496. }
  497. memset(buffer,0,sizeof(buffer));
  498. switch (table_info->colnum)
  499. {
  500. case COLUMN_PDUCHANNELID:
  501. if (!iterator)
  502. {
  503. netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHINSTANCE);
  504. continue;
  505. }
  506. snmp_set_var_typed_integer(request->requestvb, ASN_INTEGER, iterator->product_ch_id);
  507. break;
  508. case COLUMN_PDUCHANNELNAME:
  509. if (!iterator)
  510. {
  511. netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHINSTANCE);
  512. continue;
  513. }
  514. snmp_set_var_typed_value(request->requestvb, ASN_OCTET_STR, iterator->product_ch_name, strlen(iterator->product_ch_name));
  515. break;
  516. case COLUMN_PDUCHANNELSTATUS:
  517. if (!iterator)
  518. {
  519. netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHINSTANCE);
  520. continue;
  521. }
  522. snmp_set_var_typed_integer(request->requestvb, ASN_INTEGER, iterator->_PowerInfo.status);
  523. break;
  524. case COLUMN_PDUCHANNELVOLTAGE:
  525. if (!iterator)
  526. {
  527. netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHINSTANCE);
  528. continue;
  529. }
  530. sprintf(buffer,"%0.3f",iterator->_PowerInfo.voltage);
  531. snmp_set_var_typed_value(request->requestvb, ASN_OCTET_STR, buffer, strlen(buffer));
  532. break;
  533. case COLUMN_PDUCHANNELCURRENT:
  534. if (!iterator)
  535. {
  536. netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHINSTANCE);
  537. continue;
  538. }
  539. sprintf(buffer,"%0.3f",iterator->_PowerInfo.current);
  540. snmp_set_var_typed_value(request->requestvb, ASN_OCTET_STR, buffer, strlen(buffer));
  541. break;
  542. case COLUMN_PDUCHANNELFREQUENCY:
  543. if (!iterator)
  544. {
  545. netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHINSTANCE);
  546. continue;
  547. }
  548. sprintf(buffer,"%0.3f",iterator->_PowerInfo.freq);
  549. snmp_set_var_typed_value(request->requestvb, ASN_OCTET_STR, buffer, strlen(buffer));
  550. break;
  551. case COLUMN_PDUCHANNELCONSUMPTION:
  552. if (!iterator)
  553. {
  554. netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHINSTANCE);
  555. continue;
  556. }
  557. sprintf(buffer,"%0.3f",iterator->_PowerInfo.consumption);
  558. snmp_set_var_typed_value(request->requestvb, ASN_OCTET_STR, buffer, strlen(buffer));
  559. break;
  560. case COLUMN_PDUCHANNELPOWERFACTOR:
  561. if (!iterator)
  562. {
  563. netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHINSTANCE);
  564. continue;
  565. }
  566. sprintf(buffer,"%0.3f",iterator->_PowerInfo.factor);
  567. snmp_set_var_typed_value(request->requestvb, ASN_OCTET_STR, buffer, strlen(buffer));
  568. break;
  569. case COLUMN_PDUCHANNELPACTIVEPOWER:
  570. if (!iterator)
  571. {
  572. netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHINSTANCE);
  573. continue;
  574. }
  575. sprintf(buffer,"%0.3f",iterator->_PowerInfo.power);
  576. snmp_set_var_typed_value(request->requestvb, ASN_OCTET_STR, buffer, strlen(buffer));
  577. break;
  578. case COLUMN_PDUCHANNELREACTIVEPOWER:
  579. if (!iterator)
  580. {
  581. netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHINSTANCE);
  582. continue;
  583. }
  584. if (iterator->_PowerInfo.factor>0&&iterator->_PowerInfo.factor<=1)
  585. {
  586. sprintf(buffer,"%0.3f",(iterator->_PowerInfo.power/iterator->_PowerInfo.factor)-iterator->_PowerInfo.power);
  587. }else{
  588. sprintf(buffer,"0");
  589. }
  590. snmp_set_var_typed_value(request->requestvb, ASN_OCTET_STR, buffer, strlen(buffer));
  591. break;
  592. case COLUMN_PDUCHANNELAPPARENTPOWER:
  593. if (!iterator)
  594. {
  595. netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHINSTANCE);
  596. continue;
  597. }
  598. if (iterator->_PowerInfo.factor>0)
  599. {
  600. sprintf(buffer,"%0.3f",iterator->_PowerInfo.power/iterator->_PowerInfo.factor);
  601. }else{
  602. sprintf(buffer,"0");
  603. }
  604. snmp_set_var_typed_value(request->requestvb, ASN_OCTET_STR, buffer, strlen(buffer));
  605. break;
  606. default:
  607. netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHOBJECT);
  608. break;
  609. }
  610. //}
  611. break;
  612. }
  613. }
  614. break;
  615. case MODE_SET_RESERVE1:
  616. break;
  617. case MODE_SET_RESERVE2:
  618. break;
  619. case MODE_SET_FREE:
  620. break;
  621. case MODE_SET_ACTION:
  622. break;
  623. case MODE_SET_UNDO:
  624. break;
  625. case MODE_SET_COMMIT:
  626. /* XXX: delete temporary storage */
  627. // if (/* XXX: error? */) {
  628. // /* try _really_really_ hard to never get to this point */
  629. // netsnmp_set_request_error(reqinfo, requests, SNMP_ERR_COMMITFAILED);
  630. // }
  631. for (request = requests; request; request = request->next)
  632. {
  633. table_info = netsnmp_extract_table_info(request);
  634. int nIndex = 1;
  635. list_for_each_entry(iterator, &__globalDeviceManage._globalPowerManger.list, list)
  636. {
  637. if (nIndex < table_info->index_oid[0])
  638. {
  639. nIndex++;
  640. continue;
  641. }
  642. memset(buffer, 0, sizeof(buffer));
  643. switch (table_info->colnum)
  644. {
  645. case COLUMN_PDUCHANNELSTATUS:
  646. if (!iterator)
  647. {
  648. netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHINSTANCE);
  649. continue;
  650. }
  651. int nCHOpertype = *request->requestvb->val.integer;
  652. if (nCHOpertype!= iterator->_PowerInfo.status)
  653. {
  654. log_d("SNMP Remote switch ctrl:%d", iterator->product_ch_id);
  655. g_switch_set_all_chn_ctrl(&__globalDeviceManage._globalRelaySampManger,
  656. iterator,
  657. iterator->product_saddr,
  658. iterator->product_ch_addr, // 多版端口余8
  659. nCHOpertype,false);
  660. }
  661. break;
  662. }
  663. break;
  664. }
  665. }
  666. break;
  667. default:
  668. /* we should never get here, so this is a really bad error */
  669. snmp_log(LOG_ERR, "unknown mode (%d) in handle_pduType\n", reqinfo->mode );
  670. return SNMP_ERR_GENERR;
  671. }
  672. return SNMP_ERR_NOERROR;
  673. }
  674. /** handles requests for the pduGroupTable table, if anything else needs to be done */
  675. int
  676. pduGroupTable_handler(
  677. netsnmp_mib_handler *handler,
  678. netsnmp_handler_registration *reginfo,
  679. netsnmp_agent_request_info *reqinfo,
  680. netsnmp_request_info *requests) {
  681. /* perform anything here that you need to do. The requests have
  682. already been processed by the master table_dataset handler, but
  683. this gives you chance to act on the request in some other way
  684. if need be. */
  685. netsnmp_request_info *request;
  686. netsnmp_table_request_info *table_info;
  687. GroupInfo *_GroupInfoTemp = NULL;
  688. GroupInfo group_list;
  689. INIT_LIST_HEAD(&group_list.list);
  690. if (0 != dev_get_group_info(__globalDeviceManage.db, &group_list))
  691. {
  692. netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHOBJECT);
  693. return SNMP_ERR_GENERR;
  694. }
  695. char buffer[16];
  696. switch (reqinfo->mode)
  697. {
  698. case MODE_GET:
  699. for (request = requests; request; request = request->next)
  700. {
  701. table_info = netsnmp_extract_table_info(request);
  702. int nIndex = 1;
  703. list_for_each_entry(_GroupInfoTemp, &group_list.list, list)
  704. {
  705. if (nIndex < table_info->index_oid[0])
  706. {
  707. nIndex++;
  708. continue;
  709. }
  710. memset(buffer, 0, sizeof(buffer));
  711. switch (table_info->colnum)
  712. {
  713. case COLUMN_PDUGROUPID:
  714. if (!_GroupInfoTemp)
  715. {
  716. netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHINSTANCE);
  717. continue;
  718. }
  719. snmp_set_var_typed_integer(request->requestvb, ASN_INTEGER, _GroupInfoTemp->GroupID);
  720. break;
  721. case COLUMN_PDUGROUPNAME:
  722. if (!_GroupInfoTemp)
  723. {
  724. netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHINSTANCE);
  725. continue;
  726. }
  727. snmp_set_var_typed_value(request->requestvb, ASN_OCTET_STR, _GroupInfoTemp->GroupName, strlen(_GroupInfoTemp->GroupName));
  728. break;
  729. case COLUMN_PDUGROUPLIST:
  730. if (!_GroupInfoTemp)
  731. {
  732. netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHINSTANCE);
  733. continue;
  734. }
  735. snmp_set_var_typed_value(request->requestvb, ASN_OCTET_STR, _GroupInfoTemp->GroupChList, strlen(_GroupInfoTemp->GroupChList));
  736. break;
  737. case COLUMN_PDUGROUPSTATUS:
  738. if (!_GroupInfoTemp)
  739. {
  740. netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHINSTANCE);
  741. continue;
  742. }
  743. //判断分组状态
  744. int nStatus = 0;
  745. char *pCHlist;
  746. char *pCHListSave;
  747. pCHlist = strtok_r(_GroupInfoTemp->GroupChList, ",", &pCHListSave);
  748. while(pCHlist!=NULL)
  749. {
  750. GlobalPowerManger *_globalPowerMangerTemp = NULL;
  751. list_for_each_entry(_globalPowerMangerTemp, &__globalDeviceManage._globalPowerManger.list, list)
  752. {
  753. if (_globalPowerMangerTemp == NULL)
  754. break;
  755. if (atoi(pCHlist) == _globalPowerMangerTemp->product_ch_id)
  756. {
  757. if (_globalPowerMangerTemp->_PowerInfo.status == 1)
  758. {
  759. nStatus = 1;
  760. break;
  761. }
  762. }
  763. }
  764. pCHlist = strtok_r(NULL, ",",&pCHListSave);
  765. }
  766. snmp_set_var_typed_integer(request->requestvb, ASN_INTEGER, nStatus);
  767. break;
  768. default:
  769. netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHOBJECT);
  770. break;
  771. }
  772. //}
  773. break;
  774. }
  775. }
  776. break;
  777. case MODE_SET_RESERVE1:
  778. break;
  779. case MODE_SET_RESERVE2:
  780. break;
  781. case MODE_SET_FREE:
  782. break;
  783. case MODE_SET_ACTION:
  784. break;
  785. case MODE_SET_UNDO:
  786. break;
  787. case MODE_SET_COMMIT:
  788. for (request = requests; request; request = request->next)
  789. {
  790. table_info = netsnmp_extract_table_info(request);
  791. int nIndex = 1;
  792. list_for_each_entry(_GroupInfoTemp, &group_list.list, list)
  793. {
  794. if (nIndex < table_info->index_oid[0])
  795. {
  796. nIndex++;
  797. continue;
  798. }
  799. memset(buffer, 0, sizeof(buffer));
  800. switch (table_info->colnum)
  801. {
  802. case COLUMN_PDUGROUPSTATUS:
  803. if (!_GroupInfoTemp)
  804. {
  805. netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHINSTANCE);
  806. continue;
  807. }
  808. bool nGroupOpertype = *request->requestvb->val.integer;
  809. char *pCHlist;
  810. char *pCHListSave;
  811. pCHlist = strtok_r(_GroupInfoTemp->GroupChList, ",", &pCHListSave);
  812. if (__globalDeviceManage._global_device_info->product_pwr_type == 1)
  813. {
  814. unsigned short pAddrCtrl[50];
  815. memset(pAddrCtrl, 0, sizeof(pAddrCtrl));
  816. int ret = 0;
  817. while(pCHlist!=NULL)
  818. {
  819. GlobalPowerManger *_globalPowerMangerTemp = NULL;
  820. list_for_each_entry(_globalPowerMangerTemp, &__globalDeviceManage._globalPowerManger.list, list)
  821. {
  822. if (_globalPowerMangerTemp == NULL)
  823. break;
  824. if (atoi(pCHlist) == _globalPowerMangerTemp->product_ch_id)
  825. {
  826. log_d("SNMP Group switch ctrl:%d", _globalPowerMangerTemp->product_ch_id);
  827. pAddrCtrl[_globalPowerMangerTemp->product_saddr] |= 1 << (_globalPowerMangerTemp->product_ch_addr - 1);
  828. break;
  829. }
  830. }
  831. pCHlist = strtok_r(NULL, ",",&pCHListSave);
  832. }
  833. for (size_t i = 0; i < 50; i++)
  834. {
  835. if (pAddrCtrl[i] != 0)
  836. {
  837. ret = g_switch_set_dcpdu_chns_ctrl(&__globalDeviceManage._globalRelaySampManger,
  838. i,
  839. pAddrCtrl[i],
  840. nGroupOpertype);
  841. if (ret < 0)
  842. {
  843. ret = g_switch_set_dcpdu_chns_ctrl(&__globalDeviceManage._globalRelaySampManger,
  844. i,
  845. pAddrCtrl[i],
  846. nGroupOpertype);
  847. /* code */
  848. }
  849. }
  850. }
  851. }
  852. else
  853. {
  854. while(pCHlist!=NULL)
  855. {
  856. GlobalPowerManger *_globalPowerMangerTemp = NULL;
  857. list_for_each_entry(_globalPowerMangerTemp, &__globalDeviceManage._globalPowerManger.list, list)
  858. {
  859. if (_globalPowerMangerTemp == NULL)
  860. break;
  861. if (atoi(pCHlist) == _globalPowerMangerTemp->product_ch_id)
  862. {
  863. log_d("SNMP Group switch ctrl:%d", _globalPowerMangerTemp->product_ch_id);
  864. g_switch_set_all_chn_ctrl(&__globalDeviceManage._globalRelaySampManger,
  865. _globalPowerMangerTemp,
  866. _globalPowerMangerTemp->product_saddr,
  867. _globalPowerMangerTemp->product_ch_addr, // 多版端口余8
  868. nGroupOpertype,true);
  869. break;
  870. }
  871. }
  872. pCHlist = strtok_r(NULL, ",",&pCHListSave);
  873. }
  874. }
  875. }
  876. break;
  877. }
  878. }
  879. break;
  880. default:
  881. /* we should never get here, so this is a really bad error */
  882. snmp_log(LOG_ERR, "unknown mode (%d) in handle_pduType\n", reqinfo->mode);
  883. return SNMP_ERR_GENERR;
  884. }
  885. return SNMP_ERR_NOERROR;
  886. }
  887. /** handles requests for the pduSensorTable table, if anything else needs to be done */
  888. int
  889. pduSensorTable_handler(
  890. netsnmp_mib_handler *handler,
  891. netsnmp_handler_registration *reginfo,
  892. netsnmp_agent_request_info *reqinfo,
  893. netsnmp_request_info *requests) {
  894. /* perform anything here that you need to do. The requests have
  895. already been processed by the master table_dataset handler, but
  896. this gives you chance to act on the request in some other way
  897. if need be. */
  898. return SNMP_ERR_NOERROR;
  899. }
  900. /** handles requests for the pduSMTPRecMailTable table, if anything else needs to be done */
  901. int
  902. pduSMTPRecMailTable_handler(
  903. netsnmp_mib_handler *handler,
  904. netsnmp_handler_registration *reginfo,
  905. netsnmp_agent_request_info *reqinfo,
  906. netsnmp_request_info *requests) {
  907. /* perform anything here that you need to do. The requests have
  908. already been processed by the master table_dataset handler, but
  909. this gives you chance to act on the request in some other way
  910. if need be. */
  911. return SNMP_ERR_NOERROR;
  912. }
  913. /** handles requests for the pduMessageNumTable table, if anything else needs to be done */
  914. int
  915. pduMessageNumTable_handler(
  916. netsnmp_mib_handler *handler,
  917. netsnmp_handler_registration *reginfo,
  918. netsnmp_agent_request_info *reqinfo,
  919. netsnmp_request_info *requests) {
  920. /* perform anything here that you need to do. The requests have
  921. already been processed by the master table_dataset handler, but
  922. this gives you chance to act on the request in some other way
  923. if need be. */
  924. return SNMP_ERR_NOERROR;
  925. }
  926. /** handles requests for the pduMQTTBrokerTable table, if anything else needs to be done */
  927. int
  928. pduMQTTBrokerTable_handler(
  929. netsnmp_mib_handler *handler,
  930. netsnmp_handler_registration *reginfo,
  931. netsnmp_agent_request_info *reqinfo,
  932. netsnmp_request_info *requests) {
  933. /* perform anything here that you need to do. The requests have
  934. already been processed by the master table_dataset handler, but
  935. this gives you chance to act on the request in some other way
  936. if need be. */
  937. return SNMP_ERR_NOERROR;
  938. }
  939. /** handles requests for the pduCloudServerTable table, if anything else needs to be done */
  940. int
  941. pduCloudServerTable_handler(
  942. netsnmp_mib_handler *handler,
  943. netsnmp_handler_registration *reginfo,
  944. netsnmp_agent_request_info *reqinfo,
  945. netsnmp_request_info *requests) {
  946. /* perform anything here that you need to do. The requests have
  947. already been processed by the master table_dataset handler, but
  948. this gives you chance to act on the request in some other way
  949. if need be. */
  950. return SNMP_ERR_NOERROR;
  951. }
  952. /** handles requests for the pduAlarmHistoryTable table, if anything else needs to be done */
  953. int
  954. pduAlarmHistoryTable_handler(
  955. netsnmp_mib_handler *handler,
  956. netsnmp_handler_registration *reginfo,
  957. netsnmp_agent_request_info *reqinfo,
  958. netsnmp_request_info *requests) {
  959. /* perform anything here that you need to do. The requests have
  960. already been processed by the master table_dataset handler, but
  961. this gives you chance to act on the request in some other way
  962. if need be. */
  963. return SNMP_ERR_NOERROR;
  964. }
  965. /** handles requests for the pduChannelLimitTable table, if anything else needs to be done */
  966. int
  967. pduChannelLimitTable_handler(
  968. netsnmp_mib_handler *handler,
  969. netsnmp_handler_registration *reginfo,
  970. netsnmp_agent_request_info *reqinfo,
  971. netsnmp_request_info *requests) {
  972. /* perform anything here that you need to do. The requests have
  973. already been processed by the master table_dataset handler, but
  974. this gives you chance to act on the request in some other way
  975. if need be. */
  976. return SNMP_ERR_NOERROR;
  977. }
  978. /** handles requests for the pduSensorLimitTable table, if anything else needs to be done */
  979. int
  980. pduSensorLimitTable_handler(
  981. netsnmp_mib_handler *handler,
  982. netsnmp_handler_registration *reginfo,
  983. netsnmp_agent_request_info *reqinfo,
  984. netsnmp_request_info *requests) {
  985. /* perform anything here that you need to do. The requests have
  986. already been processed by the master table_dataset handler, but
  987. this gives you chance to act on the request in some other way
  988. if need be. */
  989. return SNMP_ERR_NOERROR;
  990. }