summaryrefslogtreecommitdiff
path: root/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-eoc-mib/eocVLANGroup/eocVLANPortTable/eocVLANPortTable.c
diff options
context:
space:
mode:
Diffstat (limited to 'cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-eoc-mib/eocVLANGroup/eocVLANPortTable/eocVLANPortTable.c')
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-eoc-mib/eocVLANGroup/eocVLANPortTable/eocVLANPortTable.c224
1 files changed, 224 insertions, 0 deletions
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-eoc-mib/eocVLANGroup/eocVLANPortTable/eocVLANPortTable.c b/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-eoc-mib/eocVLANGroup/eocVLANPortTable/eocVLANPortTable.c
new file mode 100644
index 0000000000..2a88fe9280
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-eoc-mib/eocVLANGroup/eocVLANPortTable/eocVLANPortTable.c
@@ -0,0 +1,224 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ * version : 14170 $ of $
+ *
+ * $Id:$
+ */
+/** \page MFD helper for eocVLANPortTable
+ *
+ * \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 "eocVLANPortTable.h"
+
+#include <net-snmp/agent/mib_modules.h>
+
+#include "eocVLANPortTable_interface.h"
+
+oid eocVLANPortTable_oid[] = { EOCVLANPORTTABLE_OID };
+int eocVLANPortTable_oid_size = OID_LENGTH(eocVLANPortTable_oid);
+
+ eocVLANPortTable_registration eocVLANPortTable_user_context;
+
+void initialize_table_eocVLANPortTable(void);
+void shutdown_table_eocVLANPortTable(void);
+
+
+/**
+ * Initializes the eocVLANPortTable module
+ */
+void
+init_eocVLANPortTable(void)
+{
+ DEBUGMSGTL(("verbose:eocVLANPortTable:init_eocVLANPortTable","called\n"));
+
+ /*
+ * TODO:300:o: Perform eocVLANPortTable one-time module initialization.
+ */
+
+ /*
+ * here we initialize all the tables we're planning on supporting
+ */
+ if (should_init("eocVLANPortTable"))
+ initialize_table_eocVLANPortTable();
+
+} /* init_eocVLANPortTable */
+
+/**
+ * Shut-down the eocVLANPortTable module (agent is exiting)
+ */
+void
+shutdown_eocVLANPortTable(void)
+{
+ if (should_init("eocVLANPortTable"))
+ shutdown_table_eocVLANPortTable();
+
+}
+
+/**
+ * Initialize the table eocVLANPortTable
+ * (Define its contents and how it's structured)
+ */
+void
+initialize_table_eocVLANPortTable(void)
+{
+ eocVLANPortTable_registration * user_context;
+ u_long flags;
+
+ DEBUGMSGTL(("verbose:eocVLANPortTable:initialize_table_eocVLANPortTable","called\n"));
+
+ /*
+ * TODO:301:o: Perform eocVLANPortTable one-time table initialization.
+ */
+
+ /*
+ * TODO:302:o: |->Initialize eocVLANPortTable 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("eocVLANPortTable", NULL, NULL);
+
+ /*
+ * No support for any flags yet, but in the future you would
+ * set any flags here.
+ */
+ flags = 0;
+
+ /*
+ * call interface initialization code
+ */
+ _eocVLANPortTable_initialize_interface(user_context, flags);
+} /* initialize_table_eocVLANPortTable */
+
+/**
+ * Shutdown the table eocVLANPortTable
+ */
+void
+shutdown_table_eocVLANPortTable(void)
+{
+ /*
+ * call interface shutdown code
+ */
+ _eocVLANPortTable_shutdown_interface(&eocVLANPortTable_user_context);
+}
+
+/**
+ * extra context initialization (eg default values)
+ *
+ * @param rowreq_ctx : row request context
+ * @param user_init_ctx : void pointer for user (parameter to rowreq_ctx_allocate)
+ *
+ * @retval MFD_SUCCESS : no errors
+ * @retval MFD_ERROR : error (context allocate will fail)
+ */
+int
+eocVLANPortTable_rowreq_ctx_init(eocVLANPortTable_rowreq_ctx *rowreq_ctx,
+ void *user_init_ctx)
+{
+ DEBUGMSGTL(("verbose:eocVLANPortTable:eocVLANPortTable_rowreq_ctx_init","called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:210:o: |-> Perform extra eocVLANPortTable rowreq initialization. (eg DEFVALS)
+ */
+ rowreq_ctx->data.eocVLANPortTPID = 33024;
+
+ rowreq_ctx->data.eocVLANPortPrio = 0;
+
+ rowreq_ctx->data.eocVLANPortMode = EOCVLANPORTMODE_TRANSPARENT;
+
+
+ return MFD_SUCCESS;
+} /* eocVLANPortTable_rowreq_ctx_init */
+
+/**
+ * extra context cleanup
+ *
+ */
+void eocVLANPortTable_rowreq_ctx_cleanup(eocVLANPortTable_rowreq_ctx *rowreq_ctx)
+{
+ DEBUGMSGTL(("verbose:eocVLANPortTable:eocVLANPortTable_rowreq_ctx_cleanup","called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:211:o: |-> Perform extra eocVLANPortTable rowreq cleanup.
+ */
+} /* eocVLANPortTable_rowreq_ctx_cleanup */
+
+/**
+ * pre-request callback
+ *
+ *
+ * @retval MFD_SUCCESS : success.
+ * @retval MFD_ERROR : other error
+ */
+int
+eocVLANPortTable_pre_request(eocVLANPortTable_registration * user_context)
+{
+ DEBUGMSGTL(("verbose:eocVLANPortTable:eocVLANPortTable_pre_request","called\n"));
+
+ /*
+ * TODO:510:o: Perform eocVLANPortTable pre-request actions.
+ */
+
+ return MFD_SUCCESS;
+} /* eocVLANPortTable_pre_request */
+
+/**
+ * post-request callback
+ *
+ * Note:
+ * New rows have been inserted into the container, and
+ * deleted rows have been removed from the container and
+ * released.
+ *
+ * @param user_context
+ * @param rc : MFD_SUCCESS if all requests succeeded
+ *
+ * @retval MFD_SUCCESS : success.
+ * @retval MFD_ERROR : other error (ignored)
+ */
+int
+eocVLANPortTable_post_request(eocVLANPortTable_registration * user_context, int rc)
+{
+ DEBUGMSGTL(("verbose:eocVLANPortTable:eocVLANPortTable_post_request","called\n"));
+
+ /*
+ * TODO:511:o: Perform eocVLANPortTable post-request actions.
+ */
+
+ /*
+ * check to set if any rows were changed.
+ */
+ if (eocVLANPortTable_dirty_get()) {
+ /*
+ * check if request was successful. If so, this would be
+ * a good place to save data to its persistent store.
+ */
+ if (MFD_SUCCESS == rc) {
+ /*
+ * save changed rows, if you haven't already
+ */
+ }
+
+ eocVLANPortTable_dirty_set(0); /* clear table dirty flag */
+ }
+
+ return MFD_SUCCESS;
+} /* eocVLANPortTable_post_request */
+
+
+/** @{ */