summaryrefslogtreecommitdiff
path: root/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable
diff options
context:
space:
mode:
Diffstat (limited to 'cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable')
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/defaults/node-modEoCCNUWhiteListAuthorization.m2d35
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/defaults/node-modEoCCNUWhiteListAutoUpgradeEN.m2d35
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/defaults/node-modEoCCNUWhiteListEndTime.m2d35
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/defaults/node-modEoCCNUWhiteListIndex.m2d35
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/defaults/node-modEoCCNUWhiteListMACAddress.m2d43
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/defaults/node-modEoCCNUWhiteListRFOutputLevel.m2d35
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/defaults/node-modEoCCNUWhiteListRegisterOnlineState.m2d35
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/defaults/node-modEoCCNUWhiteListRowStatus.m2d35
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/defaults/node-modEoCCNUWhiteListStartTime.m2d35
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/defaults/table-modEoCCNUWhiteListTable.m2d103
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable-README-FIRST.txt167
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable-README-modEoCCNUWhiteListTable.txt950
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable.c430
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable.h278
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable_data_access.c792
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable_data_access.h93
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable_data_get.c641
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable_data_get.h106
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable_data_set.c2624
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable_data_set.h190
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable_enums.h107
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable_interface.c2443
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable_interface.h104
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable_oids.h71
24 files changed, 9422 insertions, 0 deletions
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/defaults/node-modEoCCNUWhiteListAuthorization.m2d b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/defaults/node-modEoCCNUWhiteListAuthorization.m2d
new file mode 100644
index 0000000000..78802c7278
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/defaults/node-modEoCCNUWhiteListAuthorization.m2d
@@ -0,0 +1,35 @@
+########################################################################
+##
+## mib2c node setting for modEoCCNUWhiteListAuthorization
+##
+## Remove the '##' comment delimeter to change settings
+##
+########################################################################
+## Node declaration type? This is the C type to be used when
+## declaring a variable to hold a value for this column. It
+## is strongly recommended that you do not change this value.
+## If you do, it is likely to break lots of generated code that
+## you will have to fix.
+##
+## @eval $m2c_decl = u_long@
+##
+########################################################################
+## Generate/use mapping functions? Useful if the MIB defines
+## a different format or enumerations than you data store uses.
+##
+## @eval $m2c_node_skip_mapping = 1@
+##
+########################################################################
+## Need a length for the value? Most OCTET-STRING based values will
+## need a length, most other types will not. Do not change this one
+## unless you know what you are doing! You will almost certainly need
+## to fix lots of generated code if you do.
+##
+## @eval $m2c_node_needlength = 0@
+##
+########################################################################
+## Skip get? Set this to 1 if you do not want to implement a value
+## for this column.
+##
+## @eval $m2c_node_skip_get = 0@
+##
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/defaults/node-modEoCCNUWhiteListAutoUpgradeEN.m2d b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/defaults/node-modEoCCNUWhiteListAutoUpgradeEN.m2d
new file mode 100644
index 0000000000..472f6c4a52
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/defaults/node-modEoCCNUWhiteListAutoUpgradeEN.m2d
@@ -0,0 +1,35 @@
+########################################################################
+##
+## mib2c node setting for modEoCCNUWhiteListAutoUpgradeEN
+##
+## Remove the '##' comment delimeter to change settings
+##
+########################################################################
+## Node declaration type? This is the C type to be used when
+## declaring a variable to hold a value for this column. It
+## is strongly recommended that you do not change this value.
+## If you do, it is likely to break lots of generated code that
+## you will have to fix.
+##
+## @eval $m2c_decl = u_long@
+##
+########################################################################
+## Generate/use mapping functions? Useful if the MIB defines
+## a different format or enumerations than you data store uses.
+##
+## @eval $m2c_node_skip_mapping = 1@
+##
+########################################################################
+## Need a length for the value? Most OCTET-STRING based values will
+## need a length, most other types will not. Do not change this one
+## unless you know what you are doing! You will almost certainly need
+## to fix lots of generated code if you do.
+##
+## @eval $m2c_node_needlength = 0@
+##
+########################################################################
+## Skip get? Set this to 1 if you do not want to implement a value
+## for this column.
+##
+## @eval $m2c_node_skip_get = 0@
+##
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/defaults/node-modEoCCNUWhiteListEndTime.m2d b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/defaults/node-modEoCCNUWhiteListEndTime.m2d
new file mode 100644
index 0000000000..f362b841ed
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/defaults/node-modEoCCNUWhiteListEndTime.m2d
@@ -0,0 +1,35 @@
+########################################################################
+##
+## mib2c node setting for modEoCCNUWhiteListEndTime
+##
+## Remove the '##' comment delimeter to change settings
+##
+########################################################################
+## Node declaration type? This is the C type to be used when
+## declaring a variable to hold a value for this column. It
+## is strongly recommended that you do not change this value.
+## If you do, it is likely to break lots of generated code that
+## you will have to fix.
+##
+## @eval $m2c_decl = u_long@
+##
+########################################################################
+## Generate/use mapping functions? Useful if the MIB defines
+## a different format or enumerations than you data store uses.
+##
+## @eval $m2c_node_skip_mapping = 1@
+##
+########################################################################
+## Need a length for the value? Most OCTET-STRING based values will
+## need a length, most other types will not. Do not change this one
+## unless you know what you are doing! You will almost certainly need
+## to fix lots of generated code if you do.
+##
+## @eval $m2c_node_needlength = 0@
+##
+########################################################################
+## Skip get? Set this to 1 if you do not want to implement a value
+## for this column.
+##
+## @eval $m2c_node_skip_get = 0@
+##
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/defaults/node-modEoCCNUWhiteListIndex.m2d b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/defaults/node-modEoCCNUWhiteListIndex.m2d
new file mode 100644
index 0000000000..f086da7868
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/defaults/node-modEoCCNUWhiteListIndex.m2d
@@ -0,0 +1,35 @@
+########################################################################
+##
+## mib2c node setting for modEoCCNUWhiteListIndex
+##
+## Remove the '##' comment delimeter to change settings
+##
+########################################################################
+## Node declaration type? This is the C type to be used when
+## declaring a variable to hold a value for this column. It
+## is strongly recommended that you do not change this value.
+## If you do, it is likely to break lots of generated code that
+## you will have to fix.
+##
+## @eval $m2c_decl = long@
+##
+########################################################################
+## Generate/use mapping functions? Useful if the MIB defines
+## a different format or enumerations than you data store uses.
+##
+## @eval $m2c_node_skip_mapping = 1@
+##
+########################################################################
+## Need a length for the value? Most OCTET-STRING based values will
+## need a length, most other types will not. Do not change this one
+## unless you know what you are doing! You will almost certainly need
+## to fix lots of generated code if you do.
+##
+## @eval $m2c_node_needlength = 0@
+##
+########################################################################
+## Skip get? Set this to 1 if you do not want to implement a value
+## for this column.
+##
+## @eval $m2c_node_skip_get = 0@
+##
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/defaults/node-modEoCCNUWhiteListMACAddress.m2d b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/defaults/node-modEoCCNUWhiteListMACAddress.m2d
new file mode 100644
index 0000000000..2e1f83c7e7
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/defaults/node-modEoCCNUWhiteListMACAddress.m2d
@@ -0,0 +1,43 @@
+########################################################################
+##
+## mib2c node setting for modEoCCNUWhiteListMACAddress
+##
+## Remove the '##' comment delimeter to change settings
+##
+########################################################################
+## Node declaration type? This is the C type to be used when
+## declaring a variable to hold a value for this column. It
+## is strongly recommended that you do not change this value.
+## If you do, it is likely to break lots of generated code that
+## you will have to fix.
+##
+## @eval $m2c_decl = char@
+##
+########################################################################
+## Generate/use mapping functions? Useful if the MIB defines
+## a different format or enumerations than you data store uses.
+##
+## @eval $m2c_node_skip_mapping = 1@
+##
+########################################################################
+## Need a length for the value? Most OCTET-STRING based values will
+## need a length, most other types will not. Do not change this one
+## unless you know what you are doing! You will almost certainly need
+## to fix lots of generated code if you do.
+##
+## @eval $m2c_node_needlength = 1@
+##
+########################################################################
+## Skip get? Set this to 1 if you do not want to implement a value
+## for this column.
+##
+## @eval $m2c_node_skip_get = 0@
+##
+########################################################################
+## Allow realloc when data size exceeds length? If your data
+## store for this node is a pointer allocated with one of the
+## alloc family functions, you can set this to 1 to use realloc
+## when a new value length exceeds the old lenght. If you are
+## using a fixed size buffer, this value should be 0.
+##
+## @eval $m2c_node_realloc = 0@
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/defaults/node-modEoCCNUWhiteListRFOutputLevel.m2d b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/defaults/node-modEoCCNUWhiteListRFOutputLevel.m2d
new file mode 100644
index 0000000000..300979e2dd
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/defaults/node-modEoCCNUWhiteListRFOutputLevel.m2d
@@ -0,0 +1,35 @@
+########################################################################
+##
+## mib2c node setting for modEoCCNUWhiteListRFOutputLevel
+##
+## Remove the '##' comment delimeter to change settings
+##
+########################################################################
+## Node declaration type? This is the C type to be used when
+## declaring a variable to hold a value for this column. It
+## is strongly recommended that you do not change this value.
+## If you do, it is likely to break lots of generated code that
+## you will have to fix.
+##
+## @eval $m2c_decl = long@
+##
+########################################################################
+## Generate/use mapping functions? Useful if the MIB defines
+## a different format or enumerations than you data store uses.
+##
+## @eval $m2c_node_skip_mapping = 1@
+##
+########################################################################
+## Need a length for the value? Most OCTET-STRING based values will
+## need a length, most other types will not. Do not change this one
+## unless you know what you are doing! You will almost certainly need
+## to fix lots of generated code if you do.
+##
+## @eval $m2c_node_needlength = 0@
+##
+########################################################################
+## Skip get? Set this to 1 if you do not want to implement a value
+## for this column.
+##
+## @eval $m2c_node_skip_get = 0@
+##
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/defaults/node-modEoCCNUWhiteListRegisterOnlineState.m2d b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/defaults/node-modEoCCNUWhiteListRegisterOnlineState.m2d
new file mode 100644
index 0000000000..fc37971e9f
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/defaults/node-modEoCCNUWhiteListRegisterOnlineState.m2d
@@ -0,0 +1,35 @@
+########################################################################
+##
+## mib2c node setting for modEoCCNUWhiteListRegisterOnlineState
+##
+## Remove the '##' comment delimeter to change settings
+##
+########################################################################
+## Node declaration type? This is the C type to be used when
+## declaring a variable to hold a value for this column. It
+## is strongly recommended that you do not change this value.
+## If you do, it is likely to break lots of generated code that
+## you will have to fix.
+##
+## @eval $m2c_decl = u_long@
+##
+########################################################################
+## Generate/use mapping functions? Useful if the MIB defines
+## a different format or enumerations than you data store uses.
+##
+## @eval $m2c_node_skip_mapping = 1@
+##
+########################################################################
+## Need a length for the value? Most OCTET-STRING based values will
+## need a length, most other types will not. Do not change this one
+## unless you know what you are doing! You will almost certainly need
+## to fix lots of generated code if you do.
+##
+## @eval $m2c_node_needlength = 0@
+##
+########################################################################
+## Skip get? Set this to 1 if you do not want to implement a value
+## for this column.
+##
+## @eval $m2c_node_skip_get = 0@
+##
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/defaults/node-modEoCCNUWhiteListRowStatus.m2d b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/defaults/node-modEoCCNUWhiteListRowStatus.m2d
new file mode 100644
index 0000000000..d67ed1cb59
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/defaults/node-modEoCCNUWhiteListRowStatus.m2d
@@ -0,0 +1,35 @@
+########################################################################
+##
+## mib2c node setting for modEoCCNUWhiteListRowStatus
+##
+## Remove the '##' comment delimeter to change settings
+##
+########################################################################
+## Node declaration type? This is the C type to be used when
+## declaring a variable to hold a value for this column. It
+## is strongly recommended that you do not change this value.
+## If you do, it is likely to break lots of generated code that
+## you will have to fix.
+##
+## @eval $m2c_decl = u_long@
+##
+########################################################################
+## Generate/use mapping functions? Useful if the MIB defines
+## a different format or enumerations than you data store uses.
+##
+## @eval $m2c_node_skip_mapping = 1@
+##
+########################################################################
+## Need a length for the value? Most OCTET-STRING based values will
+## need a length, most other types will not. Do not change this one
+## unless you know what you are doing! You will almost certainly need
+## to fix lots of generated code if you do.
+##
+## @eval $m2c_node_needlength = 0@
+##
+########################################################################
+## Skip get? Set this to 1 if you do not want to implement a value
+## for this column.
+##
+## @eval $m2c_node_skip_get = 0@
+##
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/defaults/node-modEoCCNUWhiteListStartTime.m2d b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/defaults/node-modEoCCNUWhiteListStartTime.m2d
new file mode 100644
index 0000000000..f8cf722644
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/defaults/node-modEoCCNUWhiteListStartTime.m2d
@@ -0,0 +1,35 @@
+########################################################################
+##
+## mib2c node setting for modEoCCNUWhiteListStartTime
+##
+## Remove the '##' comment delimeter to change settings
+##
+########################################################################
+## Node declaration type? This is the C type to be used when
+## declaring a variable to hold a value for this column. It
+## is strongly recommended that you do not change this value.
+## If you do, it is likely to break lots of generated code that
+## you will have to fix.
+##
+## @eval $m2c_decl = u_long@
+##
+########################################################################
+## Generate/use mapping functions? Useful if the MIB defines
+## a different format or enumerations than you data store uses.
+##
+## @eval $m2c_node_skip_mapping = 1@
+##
+########################################################################
+## Need a length for the value? Most OCTET-STRING based values will
+## need a length, most other types will not. Do not change this one
+## unless you know what you are doing! You will almost certainly need
+## to fix lots of generated code if you do.
+##
+## @eval $m2c_node_needlength = 0@
+##
+########################################################################
+## Skip get? Set this to 1 if you do not want to implement a value
+## for this column.
+##
+## @eval $m2c_node_skip_get = 0@
+##
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/defaults/table-modEoCCNUWhiteListTable.m2d b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/defaults/table-modEoCCNUWhiteListTable.m2d
new file mode 100644
index 0000000000..cc18f453eb
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/defaults/table-modEoCCNUWhiteListTable.m2d
@@ -0,0 +1,103 @@
+## ########################################################################
+##
+## mib2c Table setting for modEoCCNUWhiteListTable
+##
+## ########################################################################
+##
+## User context structure type
+##
+@eval $m2c_context_reg = "netsnmp_data_list"@
+##
+## ########################################################################
+##
+## Allocate data structure in row structure? (vs embedd)
+##
+@eval $m2c_data_allocate = 0@
+##
+## ########################################################################
+##
+## Generate code to cache data?
+##
+@eval $m2c_data_cache = 1@
+##
+## ########################################################################
+##
+## Data context structure type
+##
+@eval $m2c_data_context = "generated"@ [generated|NAME]
+##
+## ########################################################################
+##
+## Generate function to initialize row context when created?
+##
+@eval $m2c_data_init = 1@
+##
+## ########################################################################
+##
+## Persistence of data context
+## // 0:persistent, 1:semi-transient, 2:transient
+##
+@eval $m2c_data_transient = 1@
+##
+## ########################################################################
+##
+## Include some example code?
+##
+@eval $m2c_include_examples = 1@
+##
+## ########################################################################
+##
+## Generate code for irreversible_commit mode?
+##
+@eval $m2c_irreversible_commit = 0@
+##
+## ########################################################################
+##
+## Data access method
+##
+@eval $m2c_table_access = "container-cached"@
+##
+## ########################################################################
+##
+## Generate row dependency function?
+##
+@eval $m2c_table_dependencies = 0@
+##
+## ########################################################################
+##
+## Generate data store/restore functions for persistent storage?
+##
+@eval $m2c_table_persistent = 0@
+##
+## ########################################################################
+##
+## Generate code for dynamic row creation?
+##
+@eval $m2c_table_row_creation = 1@
+##
+## ########################################################################
+##
+## Generate code for settable objects?
+##
+@eval $m2c_table_settable = 1@
+##
+## ########################################################################
+##
+## Skip mapping between data context and MIB formats?
+## // 0:generate maps, 1:skip maps, -1:skip unless enum/oid
+##
+@eval $m2c_table_skip_mapping = 1@
+##
+## ########################################################################
+##
+## Generate code for sparse tables?
+##
+@eval $m2c_table_sparse = 1@
+##
+## ########################################################################
+##
+## Generate Makefile/AgentX code?
+##
+@eval $mfd_generate_makefile = 0@
+@eval $mfd_generate_subagent = 0@
+##
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable-README-FIRST.txt b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable-README-FIRST.txt
new file mode 100644
index 0000000000..f753ebb70f
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable-README-FIRST.txt
@@ -0,0 +1,167 @@
+************************************************************************
+modEoCCNUWhiteListTable README
+------------------------------------------------------------------------
+This document describes the results of the mib2c code generation
+system using the mfd code generation template. The resulting files
+are documented both in this README file as well as per-table specific
+README files. All of the files generated by this run of mib2c will
+begin with the modEoCCNUWhiteListTable prefix.
+
+Quick Start
+-----------
+For those interested in a quick start, to get a pseudo-todo list, try
+this command in directory with the generated code:
+
+ grep -n "TODO:" *.[ch] | sed 's/\([^ ]*\) \(.*\)TODO\(.*\)/\3 (\1)/' | sort -n
+
+Key:
+ :o: Optional
+ :r: Recommended
+ :M: Mandatory
+ :A: Advanced users
+
+This will give you and ordered list of places in the code that you
+may (or must) take a closer look at).
+
+You may also want to take a look at the on-line tutorial, found here:
+
+ http://www.net-snmp.org/tutorial/tutorial-5/toolkit/mfd/index.html
+
+
+MIBs For Dummies Overview
+-------------------------
+The MIBs For Dummies (MFD) configuration files have been written to help
+SNMP novices implement SNMP MIBs. This section will be a brief
+introduction to some of the general concepts you should be familar with.
+
+ Managed Information Base (MIB)
+ ------------------------------
+ A SNMP MIB (Managed information base) is a text file that describes the
+ syntax for some set of data objects. The MIB creates a correlation
+ between an ASCII name for an object and a number OID (Object Identifier).
+ The SNMP protocol communicates information using the OIDs, and the MIB
+ allows tools to display a name, which we humans find easier to deal with.
+
+ To use an analogy, a MIB is much like a menu at a restaurant. If you've
+ ever been to a reataurant and ordered a meal, and later received a bill
+ that simply had '#6' on it, you get the idea. The name is easier for
+ the customers to remember, and the waiters and chefs use the number for
+ efficency.
+
+
+ Scalars
+ -------
+ A scalar variable is a unique object in a MIB which can represent
+ a single value. For example, the SNMP standard MIB-II defines a
+ variable, sysContact.0, which is a string containing the contact
+ information for the person in charge of a particular agent. Note
+ that scalar variable always end with '.0'.
+
+
+ Rows and Tables
+ ---------------
+ When a group of related attributes occur more than once, they can be
+ grouped together in a table. A table has an index, which uniquely
+ identifies a particular row, and data columns, which contain the
+ attributes for that row.
+
+ For example, the SNMP standard MIB-II defines a table, ifTable, which
+ contains information on the ethernet interfaces on a system.
+
+
+ Data Structures
+ ---------------
+ The code generated by the MFD configuration files has a few important
+ structures.
+
+
+ The Data Context
+ ----------------
+ The data context structure should contain the necessary information
+ to provide the data for the columns in a given row. As long as you
+ can extract the data for a column for the data context, the data context
+ can be anything you want: a pointer to an existing structure, the
+ parameters needed for a function call or an actual copy of the data.
+
+ By default, a data context structure is generated with storage for
+ all the data in a row. Information on changing the default is presented
+ later on in this help.
+
+
+ The MIB Context
+ ---------------
+ The MIB context structure is generated with storage for all the
+ indexes of a table. This data will be used when searching for the
+ correct row to process for a request.
+
+
+ The Row Request Context
+ -----------------------
+ Each table will have a unique data structure for holding data during
+ the processing of a particular row. The row request context contains
+ the registration context (that you supply during initilization),
+ the data context, the MIB context, the undo context (for settable
+ tables) and other data. There is also a netsnmp_data_list, which can
+ be used to temporary storage during processing.
+
+
+ The Table Registration Pointer
+ ------------------------------
+ During initilization, you may provide a pointer to arbitrary data for
+ you own use. This pointer will be saved in the row request context,
+ and is passed as a parameter to several functions. It is not required,
+ and is provided as a way for you to access table specific data in
+ the generated code.
+
+
+
+These files are top-level files potentially useful for all the tables:
+------------------------------------------------------------------------
+
+ File : modEoCCNUWhiteListTable_Makefile
+ ----------------------------------------------------------------------
+ Purpose : Make file for compiling a (sub)agent. This file is only
+ useful if you don't want to compile your code directly
+ into the Net-SNMP master agent.
+ Editable: Optional
+ Usage : make -f modEoCCNUWhiteListTable_Makefile
+
+
+ File : modEoCCNUWhiteListTable_subagent.c
+ ----------------------------------------------------------------------
+ Purpose : This file contains a main() function for an agent or
+ sub-agent and is compiled using the Makefile above.
+
+
+
+
+Table specific README files
+------------------------------------------------------------------------
+Each table for which code was generated has its own README file
+describing the files specifically associated with each table. You
+should probably read these next:
+
+ modEoCCNUWhiteListTable-README-modEoCCNUWhiteListTable.txt
+
+
+
+These are miscellaneous auto-generated code files you generally
+shouldn't edit. They contain code that ties your code together with
+the Net-SNMP agent.
+------------------------------------------------------------------------
+ File : modEoCCNUWhiteListTable.h
+ Purpose : Header file for the module set. Includes config_require
+ macros to auto-load the other code pieces when compiled
+ into the agent.
+
+ File : modEoCCNUWhiteListTable_oids.h
+ Purpose : C #define definitions of the tables, columns, and OIDs
+
+ File : modEoCCNUWhiteListTable_enums.h
+ Purpose : C #define definitions of the enumerated type values for
+ each column of each table that requires them.
+
+ File : modEoCCNUWhiteListTable_interface.c
+ Purpose : MFD interface to Net-SNMP. This auto-generated code ties the
+ functions you will fill out to the code that the agent needs.
+
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable-README-modEoCCNUWhiteListTable.txt b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable-README-modEoCCNUWhiteListTable.txt
new file mode 100644
index 0000000000..c0ff6927b8
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable-README-modEoCCNUWhiteListTable.txt
@@ -0,0 +1,950 @@
+************************************************************************
+modEoCCNUWhiteListTable README
+------------------------------------------------------------------------
+ This readme file describes the code generated by mib2c (using the MIBs
+ for Dummies (MFD) configuration file). The code generated was
+ generated specifically for the following SNMP table:
+
+ modEoCCNUWhiteListTable
+
+ Your code will be called when the snmp agent receives requests for
+ the modEoCCNUWhiteListTable table. The agent will start by looking for the right
+ row in your existing data to operate on, if one exists.
+
+
+ Configuration Variables
+ ------------------------------------------------------------
+ Some variables used for code generation may be set to affect the code
+ generation. You may override these variables by setting them in the
+ file defaults/table-modEoCCNUWhiteListTable.m2d, and then re-running mib2c.
+
+ m2c_table_settable (currently '1')
+ --------------------------------------------------------
+ This variable determines whether or not code is generated to support
+ MIB object which have an access of read-write or read-create. The
+ default is set based on whether or not the table contains writable
+ objects, but can be over-ridden.
+
+ Syntax: @eval $m2c_table_settable = 0@
+
+
+ m2c_table_dependencies (currently '0')
+ --------------------------------------------------------
+ This variable determines whether or not code is generated to support
+ checking dependencies between columns, rows or tables. The default
+ is set based on whether or not the table contains writable objects,
+ but can be over-ridden.
+
+ Syntax: @eval $m2c_table_dependencies = 0@
+
+
+ m2c_table_row_creation (currently '1')
+ --------------------------------------------------------
+ This variable determines whether or not code is generated to support
+ checking creation of new rows via SNMP. The default is set based on
+ whether or not the table contains read-create objects, but can be
+ over-ridden.
+
+ Syntax: @eval $m2c_table_row_creation = 0@
+
+
+ m2c_context_reg (currently 'netsnmp_data_list')
+ --------------------------------------------------------
+ This variable contains the structure name to typedef for the
+ modEoCCNUWhiteListTable_registration.
+
+ During initilization, you will provide a pointer to a structure of
+ this type. This pointer is used as a parameter to many functions so
+ that you have access to your registration data. The default is a
+ netsnmp_data_list pointer, which will allow you to keep multiple
+ pointers tagged by a text name. If you have a new or existing structure
+ you would rather use, you can redefine this variable.
+
+
+ To avoid regenerating code, you may also change this typedef directly
+ in the modEoCCNUWhiteListTable.h header.
+
+ Syntax: @eval $m2c_context_reg = "struct my_registration_context@
+
+
+ m2c_data_context (currently 'generated')
+ --------------------------------------------------------
+ This variable contains the structure name to typedef for the
+ modEoCCNUWhiteListTable_data.
+
+ This typedef is used in the row request context structure for the table,
+ modEoCCNUWhiteListTable_rowreq_ctx.
+
+ The typedef in the primary table context will be used for the data and
+ undo structure types. This structure should contain all the data
+ needed for all the columns in the table. The default is 'generated',
+ which will cuase a new data strcuture to be generated with data members
+ for each column.
+
+ To avoid regenerating code, you may also change this typedef directly
+ in the modEoCCNUWhiteListTable.h header.
+
+ Syntax: @eval $m2c_data_context = "struct my_data_context"@
+
+
+ m2c_data_allocate (currently '0')
+ --------------------------------------------------------
+ This variable determines whether or not the data context (see above)
+ requires memory to be allocated. The default generated data structure
+ does not. If you are using a custom data context which needs to
+ allocate memory, override this value and two additional functions
+ will be generated:
+
+ modEoCCNUWhiteListTable_allocate_data
+ modEoCCNUWhiteListTable_release_data
+
+ Syntax: @eval $m2c_data_allocate = 1@
+
+
+ m2c_data_init (currently '1')
+ --------------------------------------------------------
+ This variable determines whether or not the data context (see above)
+ or any other items you have added to the table context requires
+ initialization. The default generated data structure does not. If you
+ are using a custom data context or have added items needing initialization
+ to the table context, override this value and two additional functions
+ will be generated:
+
+ modEoCCNUWhiteListTable_rowreq_ctx_init
+ modEoCCNUWhiteListTable_rowreq_ctx_cleanup
+
+ Syntax: @eval 1 = 1@
+
+
+ m2c_table_access (currently 'container-cached')
+ ------------------------------------------------------------------
+ This variable determines which data interface will be use to generate
+ code for looking up data for a given index. The default is the
+ 'container-cached' access code, which caches the data in a netsnmp-
+ container (usually a sorted array).
+
+ Available options can be determined by checking for mib2c configuration
+ files that begin with 'mfd-access-*'.
+
+ Syntax: @eval $m2c_table_access = 'container-cached'@
+
+
+ m2c_include_examples (currently '1')
+ ------------------------------------------------------------------
+ This variable determines whether or not to generate example code. The
+ default is to generate example code.
+
+ Syntax: @eval $m2c_include_examples = 0@
+
+
+ m2c_data_transient (currently '1')
+ ------------------------------------------------------------------
+ This variable determines how the generated example code deals with the
+ data during data lookup. See the table readme file for details on how
+ the current table access method interprets this value. In general,
+ a value of 0 indicates persistent data, 1 indicates semi-transient and
+ 2 indicates transient data.
+
+ Syntax: @eval $m2c_data_transient = 0@
+
+
+ Index(es) for the modEoCCNUWhiteListTable table
+ ------------------------------------------------------------
+ The index(es) for the modEoCCNUWhiteListTable table are:
+
+ modEoCCNUWhiteListIndex:
+ Syntax: INTEGER
+ DataType: INTEGER
+ ASN type: ASN_INTEGER
+ C-code type: long
+
+ You should know how to set all these values from your data context,
+ modEoCCNUWhiteListTable_data.
+
+
+************************************************************************
+modEoCCNUWhiteListTable File Overview
+------------------------------------------------------------------------
+ Several files have been generated to implement the modEoCCNUWhiteListTable
+ table. We'll go through these files, one by one, explaining each and
+ letting you know which you need to edit.
+
+
+File: modEoCCNUWhiteListTable_data_access.[c|h]
+------------------------------------------------------------------------
+ The modEoCCNUWhiteListTable_data_access file contains the interface to your data in
+ its raw format. These functions are used to build the row cache or
+ locate the row (depending on the table access method).
+
+ Set MIB context
+ -----------------
+ TODO : Set MIB index values
+ FUNC : modEoCCNUWhiteListTable_indexes_set
+ WHERE: modEoCCNUWhiteListTable_data_access.c
+
+ This is a convenience function for setting the index context from
+ the native C data. Where necessary, value mapping should be done.
+
+ This function should update the table index values (found in
+ tbl_idx) for the given raw data.
+
+
+ container summary
+ ------------------------
+ The container data access code is for cases when you want to
+ store your data in the agent/sub-agent.
+
+ ... to be continued...
+
+
+ cache summary
+ ------------------------
+ The container-cached data access code is for cases when you want to
+ cache your data in the agent/sub-agent.
+
+ ... to be continued...
+
+
+
+
+File: modEoCCNUWhiteListTable_enums.h
+------------------------------------------------------------------------
+ This file contains macros for mapping enumeration values when the
+ enumerated values defined by the MIB do not match the values used
+ internally.
+
+ Review this file to see if any values need to be updated.
+
+
+File: modEoCCNUWhiteListTable_data_get.c
+------------------------------------------------------------------------
+ Get data for column
+ -------------------
+ TODO : retrieve column data from raw data
+ FUNC : modEoCCNUWhiteListMACAddress_get
+
+ Get data for column
+ -------------------
+ TODO : retrieve column data from raw data
+ FUNC : modEoCCNUWhiteListAuthorization_get
+
+ Get data for column
+ -------------------
+ TODO : retrieve column data from raw data
+ FUNC : modEoCCNUWhiteListRFOutputLevel_get
+
+ Get data for column
+ -------------------
+ TODO : retrieve column data from raw data
+ FUNC : modEoCCNUWhiteListAutoUpgradeEN_get
+
+ Get data for column
+ -------------------
+ TODO : retrieve column data from raw data
+ FUNC : modEoCCNUWhiteListRegisterOnlineState_get
+
+ Get data for column
+ -------------------
+ TODO : retrieve column data from raw data
+ FUNC : modEoCCNUWhiteListStartTime_get
+
+ Get data for column
+ -------------------
+ TODO : retrieve column data from raw data
+ FUNC : modEoCCNUWhiteListEndTime_get
+
+ Get data for column
+ -------------------
+ TODO : retrieve column data from raw data
+ FUNC : modEoCCNUWhiteListRowStatus_get
+
+
+
+File: modEoCCNUWhiteListTable_data_set.c
+------------------------------------------------------------------------
+
+ This code was generated based on the following assumptions or settings:
+
+ 1) Some of the values for this table have DEPENDENCIES on other objects.
+
+ DEPENDENCIES on other objects complicates SET request processing. When
+ one or more columns in a table depend on another object (in the same
+ table, or in another table), a DEPENDENCY exists. For example, if you
+ have a table that determine a color with three columns (red, green and
+ blue) that define the percentage of each primary color, the total for
+ the three columns must equal 100 percent. So, in addition to checking
+ that each colums has a valid value between 0 and 100, the total of
+ all three columns must equal 100.
+
+ Set $m2c_table_dependencies = 0 in defaults/table-modEoCCNUWhiteListTable.m2d
+ and regenerate code if this assumption is incorrect.
+
+ 2) This table supports ROW CREATION.
+
+ Supporting ROW CREATION allows new rows to be created via SNMP requests.
+
+ To support row creation, the index component of an incoming set request must
+ be validated. A funciton is generated for each individual index component,
+ and another for validating all the index components together.
+
+
+ Validate index component
+ ------------------------
+ TODO : validate the specified index component
+ FUNC : modEoCCNUWhiteListIndex_check_index
+
+
+ Validate index
+ --------------
+ TODO : check that all index components are valid
+ FUNC : modEoCCNUWhiteListTable_validate_index
+
+
+
+ Undo setup
+ ----------
+ TODO : save data for undo
+ FUNC : modEoCCNUWhiteListTable_undo_setup
+
+ This function will be called before the individual undo_setup functions are
+ called. This is where you should save any undo information which is not
+ directly related to a particular column. This function will only be called
+ once per row. After this function is called, any column which is being
+ set will have its individual node undo_setup function called.
+
+
+
+ Check value for column
+ ----------------------
+ TODO : perform additional validations on values for a set request
+ FUNC : modEoCCNUWhiteListMACAddress_check_value
+
+ The generated code will automatically validate incoming requests against
+ all the requirements specified by the syntax of the MIB. However, it is
+ often the case that additional requirements are specified in the
+ description of a MIB object. Those type of validations should be checked
+ in this function.
+
+
+ Undo setup for column
+ ---------------------
+ TODO : save the value for column
+ FUNC : modEoCCNUWhiteListMACAddress_undo_setup
+
+ After the table level undo setup function has been called, the individual
+ node undo setup functions will be called for columns which are being set.
+
+
+ Set value for column
+ --------------------
+ TODO : set the value for column
+ FUNC : modEoCCNUWhiteListMACAddress_set
+
+ After all the validations have been passed, this function will be called to
+ set the new value.
+
+
+ Undo value for column
+ ---------------------
+ TODO : undo set for column
+ FUNC : modEoCCNUWhiteListMACAddress_undo
+
+ If an error occurs after a column has been set, this function will be called
+ to undo the set and restore the previous state.
+
+ Check value for column
+ ----------------------
+ TODO : perform additional validations on values for a set request
+ FUNC : modEoCCNUWhiteListAuthorization_check_value
+
+ The generated code will automatically validate incoming requests against
+ all the requirements specified by the syntax of the MIB. However, it is
+ often the case that additional requirements are specified in the
+ description of a MIB object. Those type of validations should be checked
+ in this function.
+
+
+ Undo setup for column
+ ---------------------
+ TODO : save the value for column
+ FUNC : modEoCCNUWhiteListAuthorization_undo_setup
+
+ After the table level undo setup function has been called, the individual
+ node undo setup functions will be called for columns which are being set.
+
+
+ Set value for column
+ --------------------
+ TODO : set the value for column
+ FUNC : modEoCCNUWhiteListAuthorization_set
+
+ After all the validations have been passed, this function will be called to
+ set the new value.
+
+
+ Undo value for column
+ ---------------------
+ TODO : undo set for column
+ FUNC : modEoCCNUWhiteListAuthorization_undo
+
+ If an error occurs after a column has been set, this function will be called
+ to undo the set and restore the previous state.
+
+ Check value for column
+ ----------------------
+ TODO : perform additional validations on values for a set request
+ FUNC : modEoCCNUWhiteListRFOutputLevel_check_value
+
+ The generated code will automatically validate incoming requests against
+ all the requirements specified by the syntax of the MIB. However, it is
+ often the case that additional requirements are specified in the
+ description of a MIB object. Those type of validations should be checked
+ in this function.
+
+
+ Undo setup for column
+ ---------------------
+ TODO : save the value for column
+ FUNC : modEoCCNUWhiteListRFOutputLevel_undo_setup
+
+ After the table level undo setup function has been called, the individual
+ node undo setup functions will be called for columns which are being set.
+
+
+ Set value for column
+ --------------------
+ TODO : set the value for column
+ FUNC : modEoCCNUWhiteListRFOutputLevel_set
+
+ After all the validations have been passed, this function will be called to
+ set the new value.
+
+
+ Undo value for column
+ ---------------------
+ TODO : undo set for column
+ FUNC : modEoCCNUWhiteListRFOutputLevel_undo
+
+ If an error occurs after a column has been set, this function will be called
+ to undo the set and restore the previous state.
+
+ Check value for column
+ ----------------------
+ TODO : perform additional validations on values for a set request
+ FUNC : modEoCCNUWhiteListAutoUpgradeEN_check_value
+
+ The generated code will automatically validate incoming requests against
+ all the requirements specified by the syntax of the MIB. However, it is
+ often the case that additional requirements are specified in the
+ description of a MIB object. Those type of validations should be checked
+ in this function.
+
+
+ Undo setup for column
+ ---------------------
+ TODO : save the value for column
+ FUNC : modEoCCNUWhiteListAutoUpgradeEN_undo_setup
+
+ After the table level undo setup function has been called, the individual
+ node undo setup functions will be called for columns which are being set.
+
+
+ Set value for column
+ --------------------
+ TODO : set the value for column
+ FUNC : modEoCCNUWhiteListAutoUpgradeEN_set
+
+ After all the validations have been passed, this function will be called to
+ set the new value.
+
+
+ Undo value for column
+ ---------------------
+ TODO : undo set for column
+ FUNC : modEoCCNUWhiteListAutoUpgradeEN_undo
+
+ If an error occurs after a column has been set, this function will be called
+ to undo the set and restore the previous state.
+
+ Check value for column
+ ----------------------
+ TODO : perform additional validations on values for a set request
+ FUNC : modEoCCNUWhiteListStartTime_check_value
+
+ The generated code will automatically validate incoming requests against
+ all the requirements specified by the syntax of the MIB. However, it is
+ often the case that additional requirements are specified in the
+ description of a MIB object. Those type of validations should be checked
+ in this function.
+
+
+ Undo setup for column
+ ---------------------
+ TODO : save the value for column
+ FUNC : modEoCCNUWhiteListStartTime_undo_setup
+
+ After the table level undo setup function has been called, the individual
+ node undo setup functions will be called for columns which are being set.
+
+
+ Set value for column
+ --------------------
+ TODO : set the value for column
+ FUNC : modEoCCNUWhiteListStartTime_set
+
+ After all the validations have been passed, this function will be called to
+ set the new value.
+
+
+ Undo value for column
+ ---------------------
+ TODO : undo set for column
+ FUNC : modEoCCNUWhiteListStartTime_undo
+
+ If an error occurs after a column has been set, this function will be called
+ to undo the set and restore the previous state.
+
+ Check value for column
+ ----------------------
+ TODO : perform additional validations on values for a set request
+ FUNC : modEoCCNUWhiteListEndTime_check_value
+
+ The generated code will automatically validate incoming requests against
+ all the requirements specified by the syntax of the MIB. However, it is
+ often the case that additional requirements are specified in the
+ description of a MIB object. Those type of validations should be checked
+ in this function.
+
+
+ Undo setup for column
+ ---------------------
+ TODO : save the value for column
+ FUNC : modEoCCNUWhiteListEndTime_undo_setup
+
+ After the table level undo setup function has been called, the individual
+ node undo setup functions will be called for columns which are being set.
+
+
+ Set value for column
+ --------------------
+ TODO : set the value for column
+ FUNC : modEoCCNUWhiteListEndTime_set
+
+ After all the validations have been passed, this function will be called to
+ set the new value.
+
+
+ Undo value for column
+ ---------------------
+ TODO : undo set for column
+ FUNC : modEoCCNUWhiteListEndTime_undo
+
+ If an error occurs after a column has been set, this function will be called
+ to undo the set and restore the previous state.
+
+ Check value for column
+ ----------------------
+ TODO : perform additional validations on values for a set request
+ FUNC : modEoCCNUWhiteListRowStatus_check_value
+
+ The generated code will automatically validate incoming requests against
+ all the requirements specified by the syntax of the MIB. However, it is
+ often the case that additional requirements are specified in the
+ description of a MIB object. Those type of validations should be checked
+ in this function.
+
+
+ Undo setup for column
+ ---------------------
+ TODO : save the value for column
+ FUNC : modEoCCNUWhiteListRowStatus_undo_setup
+
+ After the table level undo setup function has been called, the individual
+ node undo setup functions will be called for columns which are being set.
+
+
+ Set value for column
+ --------------------
+ TODO : set the value for column
+ FUNC : modEoCCNUWhiteListRowStatus_set
+
+ After all the validations have been passed, this function will be called to
+ set the new value.
+
+
+ Undo value for column
+ ---------------------
+ TODO : undo set for column
+ FUNC : modEoCCNUWhiteListRowStatus_undo
+
+ If an error occurs after a column has been set, this function will be called
+ to undo the set and restore the previous state.
+
+
+
+ Commit changes
+ --------------
+ TODO : commit changes
+ FUNC : modEoCCNUWhiteListTable_commit
+
+ After all values have been set, the commit function will be called.
+
+
+
+
+
+************************************************************************
+modEoCCNUWhiteListTable Reference
+------------------------------------------------------------------------
+
+Function flow
+----------------------------------------------------
+To give you the general idea of how the functions flow works, this
+example flow is from a complete table implementation.
+
+NOTE: Depending on your configuration, some of the functions used in the
+ examples below may not have been generated for the
+ modEoCCNUWhiteListTable table.
+
+ Conversely, the examples below may not include some functions that
+ were generated for the modEoCCNUWhiteListTable table.
+
+To watch the flow of the modEoCCNUWhiteListTable table, use the
+following debug tokens:
+
+ snmp_agent
+ helper:table:req
+ modEoCCNUWhiteListTable
+ verbose:modEoCCNUWhiteListTable
+ internal:modEoCCNUWhiteListTable
+
+e.g.
+ snmpd -f -Le -DmodEoCCNUWhiteListTable,verbose:modEoCCNUWhiteListTable,internal:modEoCCNUWhiteListTable
+
+
+Initialization
+--------------------------------
+init_xxxTable: called xxx.c
+ initialize_table_xxxTable xxx.c
+ _xxxTable_initialize_interface xxx_interface.c
+ xxxTable_init_data xxx_data_access.c
+ _xxxTable_container_init xxx_interface.c
+ xxxTable_container_init xxx_data_access.c
+
+
+GET Request
+--------------------------------
+_cache_load xxx_interface.c
+ xxxTable_cache_load xxx_data_access.c
+ xxxTable_allocate_rowreq_ctx xxx_interface.c
+ xxxTable_allocate_data xxx_data_get.c
+ xxxTable_rowreq_ctx_init xxx_data_get.c
+ xxxTable_indexes_set xxx_data_get.c
+ xxxTable_indexes_set_tbl_idx xxx_data_get.c
+
+xxxTable_pre_request
+
+_mfd_xxxTable_object_lookup xxx_interface.c
+ xxxTable_row_prep xxx_data_access.c
+
+_mfd_xxxTable_get_values xxx_interface.c
+ _mfd_xxxTable_get_column xxx_interface.c
+ yyy_get xxx_data_get.c
+
+xxxTable_post_request
+
+
+GETNEXT Request
+--------------------------------
+_cache_load ...
+xxxTable_pre_request ...
+_mfd_xxxTable_object_lookup ...
+_mfd_xxxTable_get_values ...
+xxxTable_post_request ...
+
+
+SET Request: success
+--------------------------------
+_cache_load ...
+xxxTable_pre_request
+_mfd_xxxTable_object_lookup ...
+
+_mfd_xxxTable_check_objects xxx_interface.c
+ _xxxTable_check_column xxx_interface.c
+ yyy_check_value xxx_data_set.c
+
+_mfd_xxxTable_undo_setup xxx_interface.c
+ xxxTable_allocate_data ...
+ xxxTable_undo_setup xxx_interface.c
+ _xxxTable_undo_setup_column xxx_interface.c
+ yyy_undo_setup xxx_data_set.c
+
+_mfd_xxxTable_set_values xxx_interface.c
+ _xxxTable_set_column xxx_interface.c
+ yyy_set xxx_data_set.c
+
+_mfd_xxxTable_check_dependencies xxx_interface.c
+ xxxTable_check_dependencies xxx_data_set.c
+
+_mfd_xxxTable_commit xxx_interface.c
+ xxxTable_commit xxx_data_set.c
+
+_mfd_xxxTable_undo_cleanup xxx_interface.c
+ xxxTable_undo_cleanup xxx_data_set.c
+ xxxTable_release_data ...
+
+xxxTable_post_request ...
+
+
+SET Request: row creation
+--------------------------------
+_cache_load ...
+xxxTable_pre_request
+
+_mfd_xxxTable_object_lookup ...
+ xxxTable_index_from_oid xxx_interface.c
+ xxxTable_allocate_rowreq_ctx ...
+ ...
+ _xxxTable_check_indexes xxx_interface.c
+ yyy_check_index xxx_data_set.c
+ xxxTable_validate_index xxx_data_set.c
+
+_mfd_xxxTable_check_objects ...
+ _xxxTable_check_column ...
+ yyy_check_value ...
+ _xxxTable_check_column ...
+ yyy_check_value ...
+
+_mfd_xxxTable_undo_setup ...
+_mfd_xxxTable_set_values ...
+_mfd_xxxTable_check_dependencies ...
+_mfd_xxxTable_commit ...
+_mfd_xxxTable_undo_cleanup ...
+xxxTable_post_request ...
+
+
+SET Resuest: value error
+--------------------------------
+_cache_load ...
+xxxTable_pre_request ...
+_mfd_xxxTable_object_lookup ...
+
+_mfd_xxxTable_check_objects ...
+ _xxxTable_check_column ...
+ yyy_check_value ...
+ ERROR:"yyy value not supported"
+
+xxxTable_post_request ...
+
+
+SET Request: commit failure
+--------------------------------
+_cache_load ...
+xxxTable_pre_request ...
+_mfd_xxxTable_object_lookup ...
+_mfd_xxxTable_check_objects ...
+_mfd_xxxTable_undo_setup ...
+_mfd_xxxTable_set_values ...
+_mfd_xxxTable_check_dependencies ...
+
+_mfd_xxxTable_commit ...
+ xxxTable_commit ...
+ ERROR: bad rc -1
+
+_mfd_xxxTable_undo_commit xxx_interface.c
+ xxxTable_undo_commit xxx_data_set.c
+
+_mfd_xxxTable_undo_values xxx_interface.c
+ _xxxTable_undo_column xxx_interface.c
+ yyy_undo xxx_data_set.c
+
+_mfd_xxxTable_undo_cleanup ...
+xxxTable_post_request ...
+
+
+Row release (user initiated)
+--------------------------------
+xxxTable_release_rowreq_ctx xxx_interface.c
+ xxxTable_rowreq_ctx_cleanup xxx_data_get.c
+ xxxTable_release_data xxx_data_get.c
+
+
+
+Table / column details
+----------------------------------------------------
+/**********************************************************************
+ **********************************************************************
+ ***
+ *** Table modEoCCNUWhiteListTable
+ ***
+ **********************************************************************
+ **********************************************************************/
+/*
+ * NSCRTV-EPONEOC-MOD-EOC-MIB::modEoCCNUWhiteListTable is subid 6 of modEoCCNUWhiteList.
+ * Its status is Current.
+ * OID: .1.3.6.1.4.1.22764.3.1.5.1.6, length: 12
+*/
+
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-MOD-EOC-MIB::modEoCCNUWhiteListEntry.modEoCCNUWhiteListIndex
+ * modEoCCNUWhiteListIndex is subid 1 of modEoCCNUWhiteListEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.4.1.22764.3.1.5.1.6.1.1
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 1 hashint 0
+ * settable 0
+ *
+ * Ranges: 0 - 10240;
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ */
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-MOD-EOC-MIB::modEoCCNUWhiteListEntry.modEoCCNUWhiteListMACAddress
+ * modEoCCNUWhiteListMACAddress is subid 2 of modEoCCNUWhiteListEntry.
+ * Its status is Current, and its access level is ReadWrite.
+ * OID: .1.3.6.1.4.1.22764.3.1.5.1.6.1.2
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 1 hashint 1
+ * settable 1
+ * hint: 1x:
+ *
+ * Ranges: 6;
+ *
+ * Its syntax is MacAddress (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 6)
+ */
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-MOD-EOC-MIB::modEoCCNUWhiteListEntry.modEoCCNUWhiteListAuthorization
+ * modEoCCNUWhiteListAuthorization is subid 3 of modEoCCNUWhiteListEntry.
+ * Its status is Current, and its access level is ReadWrite.
+ * OID: .1.3.6.1.4.1.22764.3.1.5.1.6.1.3
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 1 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 1
+ *
+ * Enum range: 2/8. Values: not_authorized(0), authorized(1)
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (u_long)
+ */
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-MOD-EOC-MIB::modEoCCNUWhiteListEntry.modEoCCNUWhiteListRFOutputLevel
+ * modEoCCNUWhiteListRFOutputLevel is subid 4 of modEoCCNUWhiteListEntry.
+ * Its status is Current, and its access level is ReadWrite.
+ * OID: .1.3.6.1.4.1.22764.3.1.5.1.6.1.4
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 1
+ *
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ */
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-MOD-EOC-MIB::modEoCCNUWhiteListEntry.modEoCCNUWhiteListAutoUpgradeEN
+ * modEoCCNUWhiteListAutoUpgradeEN is subid 5 of modEoCCNUWhiteListEntry.
+ * Its status is Current, and its access level is ReadWrite.
+ * OID: .1.3.6.1.4.1.22764.3.1.5.1.6.1.5
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 1 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 1
+ *
+ * Enum range: 2/8. Values: disable(0), enable(1)
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (u_long)
+ */
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-MOD-EOC-MIB::modEoCCNUWhiteListEntry.modEoCCNUWhiteListRegisterOnlineState
+ * modEoCCNUWhiteListRegisterOnlineState is subid 6 of modEoCCNUWhiteListEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.4.1.22764.3.1.5.1.6.1.6
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 1 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ * Enum range: 2/8. Values: offline(0), online(1)
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (u_long)
+ */
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-MOD-EOC-MIB::modEoCCNUWhiteListEntry.modEoCCNUWhiteListStartTime
+ * modEoCCNUWhiteListStartTime is subid 7 of modEoCCNUWhiteListEntry.
+ * Its status is Current, and its access level is ReadWrite.
+ * OID: .1.3.6.1.4.1.22764.3.1.5.1.6.1.7
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 1
+ *
+ *
+ * Its syntax is TICKS (based on perltype TICKS)
+ * The net-snmp type is ASN_TIMETICKS. The C type decl is u_long (u_long)
+ */
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-MOD-EOC-MIB::modEoCCNUWhiteListEntry.modEoCCNUWhiteListEndTime
+ * modEoCCNUWhiteListEndTime is subid 8 of modEoCCNUWhiteListEntry.
+ * Its status is Current, and its access level is ReadWrite.
+ * OID: .1.3.6.1.4.1.22764.3.1.5.1.6.1.8
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 1
+ *
+ *
+ * Its syntax is TICKS (based on perltype TICKS)
+ * The net-snmp type is ASN_TIMETICKS. The C type decl is u_long (u_long)
+ */
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-MOD-EOC-MIB::modEoCCNUWhiteListEntry.modEoCCNUWhiteListRowStatus
+ * modEoCCNUWhiteListRowStatus is subid 9 of modEoCCNUWhiteListEntry.
+ * Its status is Current, and its access level is Create.
+ * OID: .1.3.6.1.4.1.22764.3.1.5.1.6.1.9
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 1 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 1
+ *
+ * Enum range: 3/8. Values: active(1), notInService(2), notReady(3), createAndGo(4), createAndWait(5), destroy(6)
+ *
+ * Its syntax is RowStatus (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (u_long)
+ */
+
+
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable.c b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable.c
new file mode 100644
index 0000000000..3bdd608642
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable.c
@@ -0,0 +1,430 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ * version : 14170 $ of $
+ *
+ * $Id:$
+ */
+/** \page MFD helper for modEoCCNUWhiteListTable
+ *
+ * \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 "modEoCCNUWhiteListTable.h"
+
+#include <net-snmp/agent/mib_modules.h>
+
+#include "modEoCCNUWhiteListTable_interface.h"
+
+#ifdef USING_SPC300_EOC_MIB_MODULE
+/* header for SPC300 table extension */
+# include "spc300-eoc-mib/spc300EoCSlaveGroup/spc300EoCSlaveWhiteListTable/spc300EoCSlaveWhiteListTable.h"
+#endif
+
+
+oid modEoCCNUWhiteListTable_oid[] =
+ { MODEOCCNUWHITELISTTABLE_OID };
+int modEoCCNUWhiteListTable_oid_size =
+OID_LENGTH(modEoCCNUWhiteListTable_oid);
+
+modEoCCNUWhiteListTable_registration modEoCCNUWhiteListTable_user_context;
+
+void initialize_table_modEoCCNUWhiteListTable(void);
+void shutdown_table_modEoCCNUWhiteListTable(void);
+
+
+/* declarations of handles for scalars added to table */
+int
+handle_modEoCCNUWhiteListAmountLimitation(netsnmp_mib_handler *handler,
+ netsnmp_handler_registration
+ *reginfo,
+ netsnmp_agent_request_info
+ *reqinfo,
+ netsnmp_request_info *requests);
+
+int
+handle_modEoCCNUWhiteListRegisteredAmount(netsnmp_mib_handler *handler,
+ netsnmp_handler_registration
+ *reginfo,
+ netsnmp_agent_request_info
+ *reqinfo,
+ netsnmp_request_info *requests);
+
+
+
+/**
+ * Initializes the modEoCCNUWhiteListTable module
+ */
+void
+init_modEoCCNUWhiteListTable(void)
+{
+ static int modEoCCNUWhiteListTable_did_init = 0;
+
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:init_modEoCCNUWhiteListTable", "called\n"));
+
+ /*
+ * TODO:300:o: Perform modEoCCNUWhiteListTable one-time module initialization.
+ */
+ if (++modEoCCNUWhiteListTable_did_init != 1) {
+ DEBUGMSGTL(("modEoCCNUWhiteListTable:init_modEoCCNUWhiteListTable", "ignoring duplicate call\n"));
+ return;
+ }
+
+ /*
+ * here we initialize all the tables we're planning on supporting
+ */
+ if (should_init("modEoCCNUWhiteListTable")){
+ initialize_table_modEoCCNUWhiteListTable();
+
+#ifdef USING_SPC300_EOC_MIB_MODULE
+ if (should_init("spc300EoCSlaveWhiteListTable"))
+ initialize_table_spc300EoCSlaveWhiteListTable();
+#endif
+ }
+} /* init_modEoCCNUWhiteListTable */
+
+/**
+ * Shut-down the modEoCCNUWhiteListTable module (agent is exiting)
+ */
+void
+shutdown_modEoCCNUWhiteListTable(void)
+{
+ if (should_init("modEoCCNUWhiteListTable"))
+ shutdown_table_modEoCCNUWhiteListTable();
+
+}
+
+/**
+ * Initialize the table modEoCCNUWhiteListTable
+ * (Define its contents and how it's structured)
+ */
+void
+initialize_table_modEoCCNUWhiteListTable(void)
+{
+ modEoCCNUWhiteListTable_registration *user_context;
+ u_long flags;
+
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:initialize_table_modEoCCNUWhiteListTable", "called\n"));
+
+ /*
+ * TODO:301:o: Perform modEoCCNUWhiteListTable one-time table initialization.
+ */
+
+ /*
+ * TODO:302:o: |->Initialize modEoCCNUWhiteListTable 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("modEoCCNUWhiteListTable", NULL, NULL);
+
+ /*
+ * No support for any flags yet, but in the future you would
+ * set any flags here.
+ */
+ flags = 0;
+
+ /*
+ * call interface initialization code
+ */
+ _modEoCCNUWhiteListTable_initialize_interface(user_context, flags);
+
+ /*
+ * register scalar for modEoCCNUWhiteListAmountLimitation
+ */
+ {
+ static oid modEoCCNUWhiteListAmountLimitation_oid[] =
+ { MODEOCCNUWHITELISTAMOUNTLIMITATION_OID };
+
+ netsnmp_register_scalar(netsnmp_create_handler_registration
+ ("modEoCCNUWhiteListAmountLimitation",
+ handle_modEoCCNUWhiteListAmountLimitation,
+ modEoCCNUWhiteListAmountLimitation_oid,
+ OID_LENGTH
+ (modEoCCNUWhiteListAmountLimitation_oid),
+ HANDLER_CAN_RWRITE));
+ }
+
+ /*
+ * register scalar for modEoCCNUWhiteListRegisteredAmount
+ */
+ {
+ static oid modEoCCNUWhiteListRegisteredAmount_oid[] =
+ { MODEOCCNUWHITELISTREGISTEREDAMOUNT_OID };
+
+ netsnmp_register_scalar(netsnmp_create_handler_registration
+ ("modEoCCNUWhiteListRegisteredAmount",
+ handle_modEoCCNUWhiteListRegisteredAmount,
+ modEoCCNUWhiteListRegisteredAmount_oid,
+ OID_LENGTH
+ (modEoCCNUWhiteListRegisteredAmount_oid),
+ HANDLER_CAN_RONLY));
+
+ }
+
+
+} /* initialize_table_modEoCCNUWhiteListTable */
+
+/**
+ * Shutdown the table modEoCCNUWhiteListTable
+ */
+void
+shutdown_table_modEoCCNUWhiteListTable(void)
+{
+ /*
+ * call interface shutdown code
+ */
+ _modEoCCNUWhiteListTable_shutdown_interface
+ (&modEoCCNUWhiteListTable_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
+modEoCCNUWhiteListTable_rowreq_ctx_init(modEoCCNUWhiteListTable_rowreq_ctx
+ * rowreq_ctx, void *user_init_ctx)
+{
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_rowreq_ctx_init", "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:210:o: |-> Perform extra modEoCCNUWhiteListTable rowreq initialization. (eg DEFVALS)
+ */
+
+ return MFD_SUCCESS;
+} /* modEoCCNUWhiteListTable_rowreq_ctx_init */
+
+/**
+ * extra context cleanup
+ *
+ */
+void
+modEoCCNUWhiteListTable_rowreq_ctx_cleanup
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx)
+{
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_rowreq_ctx_cleanup", "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:211:o: |-> Perform extra modEoCCNUWhiteListTable rowreq cleanup.
+ */
+ if (NULL != rowreq_ctx->data) {
+ modEoCCNUWhiteListTable_release_data(rowreq_ctx->data);
+ rowreq_ctx->data = NULL;
+ }
+} /* modEoCCNUWhiteListTable_rowreq_ctx_cleanup */
+
+/**
+ * pre-request callback
+ *
+ *
+ * @retval MFD_SUCCESS : success.
+ * @retval MFD_ERROR : other error
+ */
+int
+modEoCCNUWhiteListTable_pre_request(modEoCCNUWhiteListTable_registration *
+ user_context)
+{
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_pre_request", "called\n"));
+
+ /*
+ * TODO:510:o: Perform modEoCCNUWhiteListTable pre-request actions.
+ */
+
+ return MFD_SUCCESS;
+} /* modEoCCNUWhiteListTable_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
+modEoCCNUWhiteListTable_post_request(modEoCCNUWhiteListTable_registration *
+ user_context, int rc)
+{
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_post_request", "called\n"));
+
+ /*
+ * TODO:511:o: Perform modEoCCNUWhiteListTable post-request actions.
+ */
+
+ /*
+ * check to set if any rows were changed.
+ */
+ if (modEoCCNUWhiteListTable_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
+ */
+ }
+
+ modEoCCNUWhiteListTable_dirty_set(0); /* clear table dirty flag */
+ }
+
+ return MFD_SUCCESS;
+} /* modEoCCNUWhiteListTable_post_request */
+
+
+
+/* implementations of handles for scalars added to table */
+int
+handle_modEoCCNUWhiteListAmountLimitation(netsnmp_mib_handler *handler,
+ netsnmp_handler_registration
+ *reginfo,
+ netsnmp_agent_request_info
+ *reqinfo,
+ netsnmp_request_info *requests)
+{
+ int ret;
+ /* authorized amount limit is given as hard-coded value */
+ int amount_limit = WHITE_LIST_SLAVE_MAX_AUTH_NB;
+
+ /*
+ * We are never called for a GETNEXT if it's registered as a
+ * "instance", as it's "magically" handled for us.
+ */
+
+ /*
+ * a instance handler also only hands us one request at a time, so
+ * we don't need to loop over a list of requests; we'll only get one.
+ */
+
+ switch (reqinfo->mode) {
+
+ case MODE_GET:
+ snmp_set_var_typed_value(requests->requestvb, ASN_INTEGER,
+ (u_char *) &amount_limit /* a pointer to the scalar's data */
+ ,sizeof(amount_limit) /* the length of the data in bytes */ );
+ break;
+
+ /*
+ * SET REQUEST
+ *
+ * multiple states in the transaction. See:
+ * http://www.net-snmp.org/tutorial-5/toolkit/mib_module/set-actions.jpg
+ */
+ case MODE_SET_RESERVE1:
+ break;
+
+ case MODE_SET_RESERVE2:
+ break;
+
+
+
+
+ case MODE_SET_FREE:
+ break;
+
+ case MODE_SET_ACTION:
+ /* SET request is not supported */
+ netsnmp_set_request_error(reqinfo, requests, SNMP_ERR_NOTWRITABLE);
+ break;
+
+ case MODE_SET_COMMIT:
+ break;
+
+ case MODE_SET_UNDO:
+ break;
+
+
+ default:
+ /*
+ * we should never get here, so this is a really bad error
+ */
+ snmp_log(LOG_ERR,
+ "unknown mode (%d) in handle_modEoCCNUWhiteListAmountLimitation\n",
+ reqinfo->mode);
+ return SNMP_ERR_GENERR;
+ }
+
+ return SNMP_ERR_NOERROR;
+}
+
+int
+handle_modEoCCNUWhiteListRegisteredAmount(netsnmp_mib_handler *handler,
+ netsnmp_handler_registration
+ *reginfo,
+ netsnmp_agent_request_info
+ *reqinfo,
+ netsnmp_request_info *requests)
+{
+ int reg_amount;
+
+ /*
+ * We are never called for a GETNEXT if it's registered as a
+ * "instance", as it's "magically" handled for us.
+ */
+
+ /*
+ * a instance handler also only hands us one request at a time, so
+ * we don't need to loop over a list of requests; we'll only get one.
+ */
+
+ switch (reqinfo->mode) {
+
+ case MODE_GET:
+ reg_amount = modEoCCNUWhiteListTable_RegisteredAmount_get();
+ if (reg_amount < 0){
+ snmp_log(LOG_ERR, "error getting Registered Amount\n");
+ /* registered amount is set to -1 to permit walk requests */
+ reg_amount = -1;
+ }
+
+ snmp_set_var_typed_value(requests->requestvb, ASN_INTEGER,
+ (u_char *) &reg_amount /* a pointer to the scalar's data */
+ ,sizeof(reg_amount) /* the length of the data in bytes */ );
+ break;
+
+
+ default:
+ /*
+ * we should never get here, so this is a really bad error
+ */
+ snmp_log(LOG_ERR,
+ "unknown mode (%d) in handle_modEoCCNUWhiteListRegisteredAmount\n",
+ reqinfo->mode);
+ return SNMP_ERR_GENERR;
+ }
+
+ return SNMP_ERR_NOERROR;
+}
+
+
+/** @{ */
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable.h b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable.h
new file mode 100644
index 0000000000..826e0e6fb8
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable.h
@@ -0,0 +1,278 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ * version : 14170 $ of $
+ *
+ * $Id:$
+ */
+#ifndef MODEOCCNUWHITELISTTABLE_H
+#define MODEOCCNUWHITELISTTABLE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/** @addtogroup misc misc: Miscellaneous routines
+ *
+ * @{
+ */
+#include <net-snmp/library/asn1.h>
+
+ /* *INDENT-ON* */
+
+ /*
+ * OID and column number definitions for modEoCCNUWhiteListTable
+ */
+#include "modEoCCNUWhiteListTable_oids.h"
+
+ /*
+ * enum definions
+ */
+#include "modEoCCNUWhiteListTable_enums.h"
+
+#ifdef USING_SPC300_EOC_MIB_MODULE
+/* includes for columns in SPC300 table extension */
+#include "spc300-eoc-mib/spc300EoCSlaveGroup/spc300EoCSlaveWhiteListTable/spc300EoCSlaveWhiteListTable_oids.h"
+#endif /* USING_SPC300_EOC_MIB_MODULE */
+
+/* include common header */
+#include "EoCCommon.h"
+
+ /*
+ *********************************************************************
+ * function declarations
+ */
+ void init_modEoCCNUWhiteListTable(void);
+ void shutdown_modEoCCNUWhiteListTable(void);
+
+ /*
+ *********************************************************************
+ * Table declarations
+ */
+/**********************************************************************
+ **********************************************************************
+ ***
+ *** Table modEoCCNUWhiteListTable
+ ***
+ **********************************************************************
+ **********************************************************************/
+ /*
+ * NSCRTV-EPONEOC-MOD-EOC-MIB::modEoCCNUWhiteListTable is subid 6 of modEoCCNUWhiteList.
+ * Its status is Current.
+ * OID: .1.3.6.1.4.1.22764.3.1.5.1.6, length: 12
+ */
+ /*
+ *********************************************************************
+ * 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 modEoCCNUWhiteListTable registration context.
+ */
+ typedef netsnmp_data_list modEoCCNUWhiteListTable_registration;
+
+/**********************************************************************/
+ /*
+ * TODO:110:r: |-> Review modEoCCNUWhiteListTable data context structure.
+ * This structure is used to represent the data for modEoCCNUWhiteListTable.
+ */
+ /*
+ * This structure contains storage for all the columns defined in the
+ * modEoCCNUWhiteListTable.
+ */
+ typedef struct modEoCCNUWhiteListTable_data_s {
+
+ /* fields added to use for container iteration */
+ netsnmp_index oid_index; /* MUST BE FIRST!! for container use */
+ oid wl_index; /* arbitrary index */
+
+ /* field added for TEI written in white list file */
+ long modEoCCNUWhiteListTEI;
+
+
+ /*
+ * modEoCCNUWhiteListMACAddress(2)/MacAddress/ASN_OCTET_STR/char(char)//L/A/W/e/R/d/H
+ */
+ char modEoCCNUWhiteListMACAddress[6];
+ size_t modEoCCNUWhiteListMACAddress_len; /* # of char elements, not bytes */
+
+ /*
+ * modEoCCNUWhiteListAuthorization(3)/INTEGER/ASN_INTEGER/long(u_long)//l/A/W/E/r/d/h
+ */
+ u_long modEoCCNUWhiteListAuthorization;
+
+ /*
+ * modEoCCNUWhiteListRFOutputLevel(4)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/r/d/h
+ */
+ long modEoCCNUWhiteListRFOutputLevel;
+
+ /*
+ * modEoCCNUWhiteListAutoUpgradeEN(5)/INTEGER/ASN_INTEGER/long(u_long)//l/A/W/E/r/d/h
+ */
+ u_long modEoCCNUWhiteListAutoUpgradeEN;
+
+ /*
+ * modEoCCNUWhiteListRegisterOnlineState(6)/INTEGER/ASN_INTEGER/long(u_long)//l/A/w/E/r/d/h
+ */
+ u_long modEoCCNUWhiteListRegisterOnlineState;
+
+ /*
+ * modEoCCNUWhiteListStartTime(7)/TICKS/ASN_TIMETICKS/u_long(u_long)//l/A/W/e/r/d/h
+ */
+ u_long modEoCCNUWhiteListStartTime;
+
+ /*
+ * modEoCCNUWhiteListEndTime(8)/TICKS/ASN_TIMETICKS/u_long(u_long)//l/A/W/e/r/d/h
+ */
+ u_long modEoCCNUWhiteListEndTime;
+
+ /*
+ * modEoCCNUWhiteListRowStatus(9)/RowStatus/ASN_INTEGER/long(u_long)//l/A/W/E/r/d/h
+ */
+ u_long modEoCCNUWhiteListRowStatus;
+
+#ifdef USING_SPC300_EOC_MIB_MODULE
+ /* fields specific to SPC300EoC WL Table extension */
+ /*
+ * spc300EoCSlaveWhiteListDevicePassword(3)/DisplayString/ASN_OCTET_STR/char(char)//L/A/W/e/R/d/H
+ */
+ char spc300EoCSlaveWhiteListDevicePassword[64];
+ size_t spc300EoCSlaveWhiteListDevicePassword_len; /* # of char elements, not bytes */
+#endif /* USING_SPC300_EOC_MIB_MODULE */
+
+ } modEoCCNUWhiteListTable_data;
+
+
+ /*
+ *********************************************************************
+ * TODO:115:o: |-> Review modEoCCNUWhiteListTable undo context.
+ * We're just going to use the same data structure for our
+ * undo_context. If you want to do something more efficent,
+ * define your typedef here.
+ */
+ typedef modEoCCNUWhiteListTable_data modEoCCNUWhiteListTable_undo_data;
+
+ /*
+ * TODO:120:r: |-> Review modEoCCNUWhiteListTable mib index.
+ * This structure is used to represent the index for modEoCCNUWhiteListTable.
+ */
+ typedef struct modEoCCNUWhiteListTable_mib_index_s {
+
+ /*
+ * modEoCCNUWhiteListIndex(1)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/R/d/h
+ */
+ long modEoCCNUWhiteListIndex;
+
+
+ } modEoCCNUWhiteListTable_mib_index;
+
+ /*
+ * TODO:121:r: | |-> Review modEoCCNUWhiteListTable max index length.
+ * If you KNOW that your indexes will never exceed a certain
+ * length, update this macro to that length.
+ */
+#define MAX_modEoCCNUWhiteListTable_IDX_LEN 1
+
+
+ /*
+ *********************************************************************
+ * TODO:130:o: |-> Review modEoCCNUWhiteListTable Row request (rowreq) context.
+ * When your functions are called, you will be passed a
+ * modEoCCNUWhiteListTable_rowreq_ctx pointer.
+ */
+ typedef struct modEoCCNUWhiteListTable_rowreq_ctx_s {
+
+ /** this must be first for container compare to work */
+ netsnmp_index oid_idx;
+ oid oid_tmp[MAX_modEoCCNUWhiteListTable_IDX_LEN];
+
+ modEoCCNUWhiteListTable_mib_index tbl_idx;
+
+ /* NOTE: change of template - data changed from struct to pointer (as in ipAddressTable_rowreq_ctx) */
+ modEoCCNUWhiteListTable_data * data;
+ unsigned int column_exists_flags; /* flags for existence */
+ modEoCCNUWhiteListTable_undo_data *undo;
+ unsigned int column_set_flags; /* flags for set columns */
+
+
+ /*
+ * flags per row. Currently, the first (lower) 8 bits are reserved
+ * for the user. See mfd.h for other flags.
+ */
+ u_int rowreq_flags;
+
+ /*
+ * TODO:131:o: | |-> Add useful data to modEoCCNUWhiteListTable rowreq context.
+ */
+
+ u_char undo_ref_count;
+ /*
+ * storage for future expansion
+ */
+ netsnmp_data_list *modEoCCNUWhiteListTable_data_list;
+
+ } modEoCCNUWhiteListTable_rowreq_ctx;
+
+ typedef struct modEoCCNUWhiteListTable_ref_rowreq_ctx_s {
+ modEoCCNUWhiteListTable_rowreq_ctx *rowreq_ctx;
+ } modEoCCNUWhiteListTable_ref_rowreq_ctx;
+
+ /*
+ *********************************************************************
+ * function prototypes
+ */
+ int
+ modEoCCNUWhiteListTable_pre_request
+ (modEoCCNUWhiteListTable_registration * user_context);
+ int
+ modEoCCNUWhiteListTable_post_request
+ (modEoCCNUWhiteListTable_registration * user_context, int rc);
+
+ int
+ modEoCCNUWhiteListTable_rowreq_ctx_init
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx,
+ void *user_init_ctx);
+ void
+ modEoCCNUWhiteListTable_rowreq_ctx_cleanup
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx);
+
+ int
+ modEoCCNUWhiteListTable_check_dependencies
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx);
+
+ int
+ modEoCCNUWhiteListTable_commit(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx);
+
+ modEoCCNUWhiteListTable_rowreq_ctx
+ *modEoCCNUWhiteListTable_row_find_by_mib_index
+ (modEoCCNUWhiteListTable_mib_index * mib_idx);
+
+ extern oid modEoCCNUWhiteListTable_oid[];
+ extern int modEoCCNUWhiteListTable_oid_size;
+
+ extern int adding_row;
+
+#include "modEoCCNUWhiteListTable_interface.h"
+#include "modEoCCNUWhiteListTable_data_access.h"
+#include "modEoCCNUWhiteListTable_data_get.h"
+#include "modEoCCNUWhiteListTable_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 /* MODEOCCNUWHITELISTTABLE_H */
+/** @} */
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable_data_access.c b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable_data_access.c
new file mode 100644
index 0000000000..93663c0a69
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable_data_access.c
@@ -0,0 +1,792 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ * version : 14170 $ of $
+ *
+ * $Id:$
+ */
+/*
+ * 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 "modEoCCNUWhiteListTable.h"
+
+
+#include "modEoCCNUWhiteListTable_data_access.h"
+
+/* indication of row being added to the table */
+int adding_row;
+
+/** @ingroup interface
+ * @addtogroup data_access data_access: Routines to access data
+ *
+ * These routines are used to locate the data used to satisfy
+ * requests.
+ *
+ * @{
+ */
+/**********************************************************************
+ **********************************************************************
+ ***
+ *** Table modEoCCNUWhiteListTable
+ ***
+ **********************************************************************
+ **********************************************************************/
+/*
+ * NSCRTV-EPONEOC-MOD-EOC-MIB::modEoCCNUWhiteListTable is subid 6 of modEoCCNUWhiteList.
+ * Its status is Current.
+ * OID: .1.3.6.1.4.1.22764.3.1.5.1.6, length: 12
+ */
+
+/**
+ * initialization for modEoCCNUWhiteListTable data access
+ *
+ * This function is called during startup to allow you to
+ * allocate any resources you need for the data table.
+ *
+ * @param modEoCCNUWhiteListTable_reg
+ * Pointer to modEoCCNUWhiteListTable_registration
+ *
+ * @retval MFD_SUCCESS : success.
+ * @retval MFD_ERROR : unrecoverable error.
+ */
+
+
+int
+modEoCCNUWhiteListTable_init_data(modEoCCNUWhiteListTable_registration *
+ modEoCCNUWhiteListTable_reg)
+{
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_init_data", "called\n"));
+
+ /*
+ * TODO:303:o: Initialize modEoCCNUWhiteListTable data.
+ */
+
+ return MFD_SUCCESS;
+} /* modEoCCNUWhiteListTable_init_data */
+
+/**
+ * container overview
+ *
+ */
+
+/**
+ * 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
+modEoCCNUWhiteListTable_container_init(netsnmp_container **
+ container_ptr_ptr,
+ netsnmp_cache * cache)
+{
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_container_init", "called\n"));
+
+ if (NULL == container_ptr_ptr) {
+ snmp_log(LOG_ERR,
+ "bad container param to modEoCCNUWhiteListTable_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.
+ */
+ /* NOTE: custom container is probably useful for preloading data (as in ipAddressTable) */
+ *container_ptr_ptr = NULL;
+
+ if (NULL == cache) {
+ snmp_log(LOG_ERR,
+ "bad cache param to modEoCCNUWhiteListTable_container_init\n");
+ return;
+ }
+
+ /*
+ * TODO:345:A: Set up modEoCCNUWhiteListTable 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 = MODEOCCNUWHITELISTTABLE_CACHE_TIMEOUT; /* seconds */
+
+ /* initialize row adding indication */
+ adding_row = 0;
+} /* modEoCCNUWhiteListTable_container_init */
+
+/**
+ * container shutdown
+ *
+ * @param container_ptr A pointer to the container.
+ *
+ * This function is called at shutdown 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.
+ *
+ * This function is called before modEoCCNUWhiteListTable_container_free().
+ *
+ * @remark
+ * This would also be a good place to do any cleanup needed
+ * for you data source. For example, closing a connection to another
+ * process that supplied the data, closing a database, etc.
+ */
+void
+modEoCCNUWhiteListTable_container_shutdown(netsnmp_container *
+ container_ptr)
+{
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_container_shutdown", "called\n"));
+
+ if (NULL == container_ptr) {
+ snmp_log(LOG_ERR,
+ "bad params to modEoCCNUWhiteListTable_container_shutdown\n");
+ return;
+ }
+
+} /* modEoCCNUWhiteListTable_container_shutdown */
+
+void _mod_eoc_update_entry(modEoCCNUWhiteListTable_data *lhs, modEoCCNUWhiteListTable_data *rhs)
+{
+ if (lhs->modEoCCNUWhiteListAuthorization != rhs->modEoCCNUWhiteListAuthorization){
+ lhs->modEoCCNUWhiteListAuthorization = rhs->modEoCCNUWhiteListAuthorization;
+ }
+
+ if (lhs->modEoCCNUWhiteListRFOutputLevel != rhs->modEoCCNUWhiteListRFOutputLevel){
+ lhs->modEoCCNUWhiteListRFOutputLevel = rhs->modEoCCNUWhiteListRFOutputLevel;
+ }
+
+ if (lhs->modEoCCNUWhiteListStartTime != rhs->modEoCCNUWhiteListStartTime){
+ lhs->modEoCCNUWhiteListStartTime = rhs->modEoCCNUWhiteListStartTime;
+ }
+
+ if (lhs->modEoCCNUWhiteListEndTime != rhs->modEoCCNUWhiteListEndTime){
+ lhs->modEoCCNUWhiteListEndTime = rhs->modEoCCNUWhiteListEndTime;
+ }
+
+ if (lhs->modEoCCNUWhiteListRegisterOnlineState != rhs->modEoCCNUWhiteListRegisterOnlineState){
+ lhs->modEoCCNUWhiteListRegisterOnlineState = rhs->modEoCCNUWhiteListRegisterOnlineState;
+ }
+#ifdef USING_SPC300_EOC_MIB_MODULE
+ if (lhs->spc300EoCSlaveWhiteListDevicePassword_len != rhs->spc300EoCSlaveWhiteListDevicePassword_len) {
+ lhs->spc300EoCSlaveWhiteListDevicePassword_len = rhs->spc300EoCSlaveWhiteListDevicePassword_len;
+ memcpy(lhs->spc300EoCSlaveWhiteListDevicePassword, rhs->spc300EoCSlaveWhiteListDevicePassword, rhs->spc300EoCSlaveWhiteListDevicePassword_len);
+ }
+ else if (memcmp(lhs->spc300EoCSlaveWhiteListDevicePassword, rhs->spc300EoCSlaveWhiteListDevicePassword, rhs->spc300EoCSlaveWhiteListDevicePassword_len) != 0) {
+ memcpy(lhs->spc300EoCSlaveWhiteListDevicePassword, rhs->spc300EoCSlaveWhiteListDevicePassword, rhs->spc300EoCSlaveWhiteListDevicePassword_len);
+ }
+#endif
+
+}
+
+int _mod_eoc_whitelist_container_load(netsnmp_container *container)
+{
+ modEoCCNUWhiteListTable_data *entry;
+ int rc = MFD_SUCCESS;
+
+
+
+
+ /* declarations for calls to libspid */
+ char key_buffer[LIBSPID_KEY_MAX_LEN] = {0};
+ const char online_delimiters[2] = LIBSPID_ONLINE_INFO_DELIMITER "\0";
+ char online_buffer[LIBSPID_LINE_MAX_LEN] = {0};
+ unsigned int online_elt_number = LIBSPID_ELT_MAX_NB;
+ char *online_elt_buffer[LIBSPID_ELT_MAX_NB] = {0};
+
+ char buffer[LIBSPID_LINE_MAX_LEN] = {0};
+
+ /* white list entries read from config file */
+ libspid_eoc_wl_entry_t wl_config_entries[LIBSPID_WHITE_LIST_MAX_STA_NUM];
+
+
+ int mac_address_count;
+ int i, j;
+
+ int tmp;
+ int start_time_hr, start_time_min, end_time_hr, end_time_min;
+
+ char mac_str[LIBSPID_MAC_STR_LEN];
+
+ /* initial row status is set to active by default */
+ int init_row_status = ROWSTATUS_ACTIVE;
+
+ DEBUGMSGTL(("modEoCCNUWhiteListTable:access", "_whitelist_container_load called \n"));
+
+ if (NULL == container) {
+ snmp_log(LOG_ERR, "no container specified/found for _whitelist_container_load\n");
+ return MFD_ERROR;
+ }
+
+ memset(wl_config_entries, 0x0, sizeof(wl_config_entries));
+
+ /* check errors in contents of white list prior to reading */
+ /* if errors are found, log message and set initial row status to notInService for all entries */
+ if (LIBSPID_SUCCESS != libspid_eoc_wl_check ()){
+ snmp_log(LOG_ERR, "errors detected in white list configuration file, refer to syslog\n");
+ init_row_status = ROWSTATUS_NOTINSERVICE;
+ }
+
+ /* get current contents of white list config file */
+ if (LIBSPID_SUCCESS != libspid_eoc_wl_get_list(wl_config_entries, &mac_address_count)){
+ snmp_log(LOG_ERR, "White list config file not read correctly\n");
+ return MFD_ERROR;
+ }
+
+ if (0 == mac_address_count){
+ rc = MFD_END_OF_DATA;
+ }
+
+ for (i=0; i < mac_address_count; i++){
+
+ /* call interface function for allocating white list data */
+ if (NULL == (entry = modEoCCNUWhiteListTable_allocate_data()))
+ {
+ snmp_log(LOG_ERR, "whitelist entry allocation error\n");
+ return MFD_ERROR;
+ }
+
+ /* set row status to initial value */
+ entry->modEoCCNUWhiteListRowStatus = init_row_status;
+
+ /* convert MAC address from string to char array */
+ if (LIBSPID_SUCCESS != libspid_mac_str_to_bin(wl_config_entries[i].mac_addr, entry->modEoCCNUWhiteListMACAddress)){
+ snmp_log(LOG_ERR, "libspid_mac_str_to_bin failed, setting MAC address field to null\n");
+ entry->modEoCCNUWhiteListMACAddress[0] = '\0';
+ }
+
+ entry->modEoCCNUWhiteListMACAddress_len = 6;
+
+ /* parse TEI from white list entry */
+ tmp = sscanf(wl_config_entries[i].tei, "%d", &entry->modEoCCNUWhiteListTEI);
+ if (1 != tmp){
+ snmp_log(LOG_ERR, "parsing failed, setting TEI field to invalid\n");
+ entry->modEoCCNUWhiteListTEI = INVALID_MODEOCCNUWHITELISTTEI;
+ }
+
+ /* parse authorization from white list entry */
+ tmp = sscanf(wl_config_entries[i].auth, "%d", &entry->modEoCCNUWhiteListAuthorization);
+ if (1 != tmp){
+ snmp_log(LOG_ERR, "parsing failed, setting Authorization field to invalid\n");
+ entry->modEoCCNUWhiteListAuthorization = INVALID_MODEOCCNUWHITELISTAUTHORIZATION;
+ }
+
+ /* parse output level from white list entry */
+ tmp = sscanf(wl_config_entries[i].output_level, "%d", &entry->modEoCCNUWhiteListRFOutputLevel);
+ if (1 != tmp){
+ snmp_log(LOG_ERR, "parsing failed, setting RF Output field to invalid\n");
+ entry->modEoCCNUWhiteListRFOutputLevel = INVALID_MODEOCCNUWHITELISTRFOUTPUTLEVEL;
+ }
+
+ /* convert start time from HH:MM to TimeTicks */
+ tmp = sscanf(wl_config_entries[i].start_time, "%d:%d", &start_time_hr, &start_time_min);
+ if ((2 != tmp) || !((0 <= start_time_hr <= 23) && (0 <= start_time_min <= 59))){
+ snmp_log(LOG_ERR, "value invalid, setting Start Time field to invalid\n");
+ entry->modEoCCNUWhiteListStartTime = INVALID_MODEOCCNUWHITELISTSTARTTIME;
+ } else {
+ entry->modEoCCNUWhiteListStartTime = start_time_hr * 60 * 60 * 100 + start_time_min * 60 * 100;
+ }
+
+ /* convert start time from HH:MM to TimeTicks */
+ tmp = sscanf(wl_config_entries[i].end_time, "%d:%d", &end_time_hr, &end_time_min);
+ if ((2 != tmp) || !((0 <= end_time_hr <= 23) && (0 <= end_time_min <= 59))
+ || (end_time_hr < start_time_hr) || ((end_time_hr == start_time_hr) && (end_time_min < start_time_min))){
+ snmp_log(LOG_ERR, "value invalid, setting End Time field to invalid\n");
+ entry->modEoCCNUWhiteListEndTime = INVALID_MODEOCCNUWHITELISTENDTIME;
+ } else {
+ entry->modEoCCNUWhiteListEndTime = end_time_hr * 60 * 60 * 100 + end_time_min * 60 * 100;
+ }
+
+
+
+#ifdef USING_SPC300_EOC_MIB_MODULE
+ /* read data from SPC300 table */
+ if ((NULL == wl_config_entries[i].dpw) || (!strcmp(wl_config_entries[i].dpw, ""))){
+ snmp_log(LOG_ERR, "empty DPW field\n");
+ entry->spc300EoCSlaveWhiteListDevicePassword[0] = '\0';
+ } else {
+ strncpy (entry->spc300EoCSlaveWhiteListDevicePassword, wl_config_entries[i].dpw, 64);
+ entry->spc300EoCSlaveWhiteListDevicePassword_len = strlen(entry->spc300EoCSlaveWhiteListDevicePassword);
+
+ }
+#endif
+
+
+ /* convert MAC address from bin to string to be aligned with MAC address format of online information file */
+ if (LIBSPID_SUCCESS != libspid_mac_bin_to_str(entry->modEoCCNUWhiteListMACAddress, mac_str)){
+ snmp_log(LOG_ERR, "libspid_mac_bin_to_str error\n");
+ return MFD_ERROR;
+ }
+
+ if (ROWSTATUS_ACTIVE == entry->modEoCCNUWhiteListRowStatus) {
+ /* for valid row, add MAC address string to internal storage list (if not already present in there) */
+ tmp = se_find_value_in_slist("mod_eoc_white_list", mac_str);
+ if (tmp == SE_DNE) {
+ se_add_pair_to_slist("mod_eoc_white_list", strdup(mac_str), i+1);
+ }
+ }
+
+ /* read line indexed by MAC address from online information file */
+ if (LIBSPID_SUCCESS == libspid_config_read_line(LIBSPID_ONLINE_INFO_PATH, online_delimiters, mac_str, &online_elt_number, online_elt_buffer, online_buffer, LIBSPID_LINE_MAX_LEN)){
+ entry->modEoCCNUWhiteListRegisterOnlineState = MODEOCCNUWHITELISTREGISTERONLINESTATE_ONLINE;
+ } else {
+ entry->modEoCCNUWhiteListRegisterOnlineState = MODEOCCNUWHITELISTREGISTERONLINESTATE_OFFLINE;
+ }
+
+ /* read autoupdate setting from system configuration file */
+ if (LIBSPID_SUCCESS != libspid_config_read_item(LIBSPID_SYSTEM_CONF_PATH, LIBSPID_SYSTEM_CONF_LABEL_AUTOUPDATE, buffer, LIBSPID_LINE_MAX_LEN)){
+ snmp_log(LOG_ERR, "libspid_config_read_item error in reading autoupdate setting\n");
+ entry->modEoCCNUWhiteListAutoUpgradeEN = MODEOCCNUWHITELISTAUTOUPGRADEEN_DISABLE;
+ } else if (!strcmp(buffer, LIBSPID_SYSTEM_CONF_VALUE_YES)){
+ entry->modEoCCNUWhiteListAutoUpgradeEN = MODEOCCNUWHITELISTAUTOUPGRADEEN_ENABLE;
+ } else {
+ entry->modEoCCNUWhiteListAutoUpgradeEN = MODEOCCNUWHITELISTAUTOUPGRADEEN_DISABLE;
+ }
+
+
+ /* set entry index for container comparison */
+ entry->wl_index = i + 1;
+
+
+ /*
+ * add entry to container
+ */
+ CONTAINER_INSERT(container, entry);
+ }
+
+ return rc;
+}
+
+/**
+ * check entry for update
+ */
+static void
+_mod_eoc_check_entry_for_updates(modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx,
+ void **magic)
+{
+ netsnmp_container *whitelist_container = magic[0];
+ netsnmp_container *to_delete = (netsnmp_container *) magic[1];
+
+ DEBUGMSGTL(("modEoCCNUWhiteListTable:access", "checking entry for updates\n"));
+
+ netsnmp_assert(NULL != whitelist_container);
+ netsnmp_assert(NULL != rowreq_ctx);
+ netsnmp_assert(NULL != rowreq_ctx->data);
+ /*
+ * check for matching entries to be deleted
+ */
+ modEoCCNUWhiteListTable_data *whitelist_entry =
+ CONTAINER_FIND(whitelist_container, rowreq_ctx->data);
+ if (NULL == whitelist_entry) {
+
+ if (NULL == to_delete) {
+ magic[1] = to_delete = netsnmp_container_find("lifo");
+ if (NULL == to_delete)
+ snmp_log(LOG_ERR, "couldn't create delete container\n");
+ }
+ if (NULL != to_delete)
+ CONTAINER_INSERT(to_delete, rowreq_ctx);
+ } else {
+
+ /* check for updates for editable columns from SARFT table */
+ _mod_eoc_update_entry(rowreq_ctx->data, whitelist_entry);
+
+ /*
+ * remove entry from temporary whitelist container
+ */
+ CONTAINER_REMOVE(whitelist_container, whitelist_entry);
+ free(whitelist_entry);
+ }
+}
+
+/**
+ * add new entry
+ */
+static void
+_mod_eoc_add_new_entry(modEoCCNUWhiteListTable_data *whitelist_entry,
+ netsnmp_container *container)
+{
+ modEoCCNUWhiteListTable_rowreq_ctx *rowreq_ctx;
+ size_t count = 0;
+
+
+ DEBUGMSGTL(("modEoCCNUWhiteListTable:access", "creating new entry\n"));
+
+ netsnmp_assert(NULL != whitelist_entry);
+ netsnmp_assert(NULL != container);
+
+ /*
+ * allocate an row context and set the index(es)
+ */
+ rowreq_ctx =
+ modEoCCNUWhiteListTable_allocate_rowreq_ctx(whitelist_entry, NULL);
+
+
+ if ((NULL != rowreq_ctx) &&
+ (MFD_SUCCESS ==
+ modEoCCNUWhiteListTable_indexes_set(rowreq_ctx,
+ whitelist_entry->modEoCCNUWhiteListTEI - 2)))
+ {
+ if (CONTAINER_INSERT(container, rowreq_ctx) < 0) {
+ snmp_log(LOG_ERR, "modEoCCNUWhiteListTable container insert failed for new entry\n");
+ modEoCCNUWhiteListTable_release_rowreq_ctx(rowreq_ctx);
+ return;
+ }
+ ++count;
+ } else {
+ if (NULL != rowreq_ctx) {
+ snmp_log(LOG_ERR, "error setting index while loading "
+ "modEoCCNUWhiteListTable cache.\n");
+ modEoCCNUWhiteListTable_release_rowreq_ctx(rowreq_ctx);
+ } else {
+ snmp_log(LOG_ERR, "memory allocation failed while loading "
+ "modEoCCNUWhiteListTable cache.\n");
+ free(whitelist_entry);
+ }
+
+ return;
+ }
+ rowreq_ctx->data->modEoCCNUWhiteListRowStatus =
+ whitelist_entry->modEoCCNUWhiteListRowStatus;
+
+
+}
+
+
+/**
+ * load initial data
+ *
+ * TODO:350:M: Implement modEoCCNUWhiteListTable data load
+ * This function will also be called by the cache helper to load
+ * the container again (after the container free function has been
+ * called to free the previous contents).
+ *
+ * @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 load the index(es) (and data, optionally)
+ * for the every row in the data set.
+ *
+ * @remark
+ * While loading the data, 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
+ * modEoCCNUWhiteListTable_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
+modEoCCNUWhiteListTable_container_load(netsnmp_container * container)
+{
+ int rc = MFD_SUCCESS;
+
+ netsnmp_container *whitelist_container;
+ void *tmp_ptr[2];
+
+
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_container_load", "called\n"));
+
+ /*
+ * TODO:351:M: |-> Load/update data in the modEoCCNUWhiteListTable container.
+ * loop over your modEoCCNUWhiteListTable data, allocate a rowreq context,
+ * set the index(es) [and data, optionally] and insert into
+ * the container.
+ */
+ /* create temporary container for fresh white list data */
+ whitelist_container = netsnmp_container_find("mod_eoc_whitelist_temp:table_container");
+ if (NULL == whitelist_container) {
+ snmp_log(LOG_ERR, "whitelist temp container not found\n");
+ return MFD_ERROR;
+ }
+
+ /* load fresh white list data into temp container */
+ rc = _mod_eoc_whitelist_container_load(whitelist_container);
+ if (MFD_ERROR == rc) {
+ snmp_log(LOG_ERR, "whitelist container load error\n");
+ return MFD_ERROR;
+ }
+
+ tmp_ptr[0] = whitelist_container;
+ tmp_ptr[1] = NULL;
+
+ /* check if modEoCCNUWhiteListTable container needs updates */
+ /* (this is not called if table container is empty) */
+ CONTAINER_FOR_EACH(container, (netsnmp_container_obj_func *)
+ _mod_eoc_check_entry_for_updates, tmp_ptr);
+ /*
+ * add new entries to modEoCCNUWhiteListTable container
+ */
+ CONTAINER_FOR_EACH(whitelist_container,
+ (netsnmp_container_obj_func *) _mod_eoc_add_new_entry,
+ container);
+
+ /*
+ * free temporary container. we've either claimed each entry, or released it,
+ * so we don't need to call CONTAINER_CLEAR to clear the container.
+ */
+ CONTAINER_FREE(whitelist_container);
+
+ /*
+ * remove deleted items from modEoCCNUWhiteListTable container
+ */
+ if (NULL != tmp_ptr[1]) {
+ netsnmp_container *tmp_container =
+ (netsnmp_container *) tmp_ptr[1];
+ modEoCCNUWhiteListTable_rowreq_ctx *tmp_ctx;
+
+ /*
+ * this works because the tmp_container is a linked list,
+ * which can be used like a stack...
+ */
+ while (CONTAINER_SIZE(tmp_container)) {
+ /*
+ * get from delete list
+ */
+ tmp_ctx = CONTAINER_FIRST(tmp_container);
+
+ /*
+ * release context, delete from table container
+ */
+ CONTAINER_REMOVE(container, tmp_ctx);
+ modEoCCNUWhiteListTable_release_rowreq_ctx(tmp_ctx);
+
+ /*
+ * pop off delete list
+ */
+ CONTAINER_REMOVE(tmp_container, NULL);
+ }
+ }
+
+
+
+ DEBUGMSGT(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_container_load", "inserted %d records\n", CONTAINER_SIZE(container)));
+
+ return MFD_SUCCESS;
+} /* modEoCCNUWhiteListTable_container_load */
+
+/**
+ * container 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
+modEoCCNUWhiteListTable_container_free(netsnmp_container * container)
+{
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_container_free", "called\n"));
+
+ /*
+ * TODO:380:M: Free modEoCCNUWhiteListTable container data.
+ */
+} /* modEoCCNUWhiteListTable_container_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
+modEoCCNUWhiteListTable_row_prep(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx)
+{
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_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;
+} /* modEoCCNUWhiteListTable_row_prep */
+
+/*
+ * TODO:420:r: Implement modEoCCNUWhiteListTable index validation.
+ */
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-MOD-EOC-MIB::modEoCCNUWhiteListEntry.modEoCCNUWhiteListIndex
+ * modEoCCNUWhiteListIndex is subid 1 of modEoCCNUWhiteListEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.4.1.22764.3.1.5.1.6.1.1
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 1 hashint 0
+ * settable 0
+ *
+ * Ranges: 0 - 10240;
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ */
+/**
+ * check validity of modEoCCNUWhiteListIndex index portion
+ *
+ * @retval MFD_SUCCESS : the incoming value is legal
+ * @retval MFD_ERROR : the incoming value is NOT legal
+ *
+ * @note this is not the place to do any checks for the sanity
+ * of multiple indexes. Those types of checks should be done in the
+ * modEoCCNUWhiteListTable_validate_index() function.
+ *
+ * @note Also keep in mind that if the index refers to a row in this or
+ * some other table, you can't check for that row here to make
+ * decisions, since that row might not be created yet, but may
+ * be created during the processing this request. If you have
+ * such checks, they should be done in the check_dependencies
+ * function, because any new/deleted/changed rows should be
+ * available then.
+ *
+ * The following checks have already been done for you:
+ * The value is in (one of) the range set(s): 0 - 10240
+ *
+ * If there a no other checks you need to do, simply return MFD_SUCCESS.
+ */
+int
+modEoCCNUWhiteListIndex_check_index(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx)
+{
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListIndex_check_index", "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:426:M: |-> Check modEoCCNUWhiteListTable index modEoCCNUWhiteListIndex.
+ * check that index value in the table context is legal.
+ * (rowreq_ctx->tbl_index.modEoCCNUWhiteListIndex)
+ */
+ /* checking additional index restrictions - depending on TEI limits defined in libspid */
+ if ((rowreq_ctx->tbl_idx.modEoCCNUWhiteListIndex < LIBSPID_EOC_WL_TEI_MIN-2)
+ || (rowreq_ctx->tbl_idx.modEoCCNUWhiteListIndex > LIBSPID_EOC_WL_TEI_MAX-2))
+ {
+ return SNMP_ERR_WRONGVALUE;
+ }
+ return MFD_SUCCESS; /* modEoCCNUWhiteListIndex index ok */
+} /* modEoCCNUWhiteListIndex_check_index */
+
+/**
+ * verify specified index is valid.
+ *
+ * This check is independent of whether or not the values specified for
+ * the columns of the new row are valid. Column values and row consistency
+ * will be checked later. At this point, only the index values should be
+ * checked.
+ *
+ * All of the individual index validation functions have been called, so this
+ * is the place to make sure they are valid as a whole when combined. If
+ * you only have one index, then you probably don't need to do anything else
+ * here.
+ *
+ * @note Keep in mind that if the indexes refer to a row in this or
+ * some other table, you can't check for that row here to make
+ * decisions, since that row might not be created yet, but may
+ * be created during the processing this request. If you have
+ * such checks, they should be done in the check_dependencies
+ * function, because any new/deleted/changed rows should be
+ * available then.
+ *
+ *
+ * @param modEoCCNUWhiteListTable_reg
+ * Pointer to the user registration data
+ * @param modEoCCNUWhiteListTable_rowreq_ctx
+ * Pointer to the users context.
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_CANNOT_CREATE_NOW : index not valid right now
+ * @retval MFD_CANNOT_CREATE_EVER : index never valid
+ */
+int
+modEoCCNUWhiteListTable_validate_index(modEoCCNUWhiteListTable_registration
+ * modEoCCNUWhiteListTable_reg,
+ modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx)
+{
+ int rc = MFD_SUCCESS;
+
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_validate_index", "called\n"));
+
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:430:M: |-> Validate potential modEoCCNUWhiteListTable index.
+ */
+ if (0) {
+ snmp_log(LOG_WARNING, "invalid index for a new row in the "
+ "modEoCCNUWhiteListTable table.\n");
+ /*
+ * determine failure type.
+ *
+ * If the index could not ever be created, return MFD_NOT_EVER
+ * If the index can not be created under the present circumstances
+ * (even though it could be created under other circumstances),
+ * return MFD_NOT_NOW.
+ */
+ if (0) {
+ return MFD_CANNOT_CREATE_EVER;
+ } else {
+ return MFD_CANNOT_CREATE_NOW;
+ }
+ } else {
+ rowreq_ctx->data->modEoCCNUWhiteListTEI = rowreq_ctx->tbl_idx.modEoCCNUWhiteListIndex + 2;
+ }
+
+
+ return rc;
+} /* modEoCCNUWhiteListTable_validate_index */
+
+/** @} */
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable_data_access.h b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable_data_access.h
new file mode 100644
index 0000000000..360cb2af6e
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable_data_access.h
@@ -0,0 +1,93 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ * version : 14170 $ of $
+ *
+ * $Id:$
+ */
+#ifndef MODEOCCNUWHITELISTTABLE_DATA_ACCESS_H
+#define MODEOCCNUWHITELISTTABLE_DATA_ACCESS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* definitions for invalid input value markers */
+#define INVALID_MODEOCCNUWHITELISTTEI 0
+#define INVALID_MODEOCCNUWHITELISTAUTHORIZATION 2
+#define INVALID_MODEOCCNUWHITELISTRFOUTPUTLEVEL (-1)
+#define INVALID_MODEOCCNUWHITELISTAUTOUPGRADEEN 2
+#define INVALID_MODEOCCNUWHITELISTSTARTTIME 1
+#define INVALID_MODEOCCNUWHITELISTENDTIME 1
+
+
+ /*
+ *********************************************************************
+ * function declarations
+ */
+
+ /*
+ *********************************************************************
+ * Table declarations
+ */
+/**********************************************************************
+ **********************************************************************
+ ***
+ *** Table modEoCCNUWhiteListTable
+ ***
+ **********************************************************************
+ **********************************************************************/
+ /*
+ * NSCRTV-EPONEOC-MOD-EOC-MIB::modEoCCNUWhiteListTable is subid 6 of modEoCCNUWhiteList.
+ * Its status is Current.
+ * OID: .1.3.6.1.4.1.22764.3.1.5.1.6, length: 12
+ */
+
+
+ int
+ modEoCCNUWhiteListTable_init_data
+ (modEoCCNUWhiteListTable_registration *
+ modEoCCNUWhiteListTable_reg);
+
+
+ /*
+ * TODO:180:o: Review modEoCCNUWhiteListTable cache timeout.
+ * The number of seconds before the cache times out
+ */
+#define MODEOCCNUWHITELISTTABLE_CACHE_TIMEOUT 60
+
+ void
+ modEoCCNUWhiteListTable_container_init(netsnmp_container **
+ container_ptr_ptr,
+ netsnmp_cache * cache);
+ void
+ modEoCCNUWhiteListTable_container_shutdown(netsnmp_container *
+ container_ptr);
+
+ int
+ modEoCCNUWhiteListTable_container_load(netsnmp_container *
+ container);
+ void
+ modEoCCNUWhiteListTable_container_free(netsnmp_container *
+ container);
+
+ int modEoCCNUWhiteListTable_cache_load(netsnmp_container *
+ container);
+ void modEoCCNUWhiteListTable_cache_free(netsnmp_container *
+ container);
+
+ int
+ modEoCCNUWhiteListTable_row_prep(modEoCCNUWhiteListTable_rowreq_ctx
+ * rowreq_ctx);
+
+ int
+ modEoCCNUWhiteListTable_validate_index
+ (modEoCCNUWhiteListTable_registration *
+ modEoCCNUWhiteListTable_reg,
+ modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx);
+ int modEoCCNUWhiteListIndex_check_index(modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx); /* internal */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* MODEOCCNUWHITELISTTABLE_DATA_ACCESS_H */
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable_data_get.c b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable_data_get.c
new file mode 100644
index 0000000000..eefc23fe35
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable_data_get.c
@@ -0,0 +1,641 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ * version : 12088 $ of $
+ *
+ * $Id:$
+ */
+/*
+ * 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 "modEoCCNUWhiteListTable.h"
+
+
+/** @defgroup data_get data_get: Routines to get data
+ *
+ * TODO:230:M: Implement modEoCCNUWhiteListTable get routines.
+ * TODO:240:M: Implement modEoCCNUWhiteListTable 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 modEoCCNUWhiteListTable
+ ***
+ **********************************************************************
+ **********************************************************************/
+/*
+ * NSCRTV-EPONEOC-MOD-EOC-MIB::modEoCCNUWhiteListTable is subid 6 of modEoCCNUWhiteList.
+ * Its status is Current.
+ * OID: .1.3.6.1.4.1.22764.3.1.5.1.6, length: 12
+ */
+
+/*
+ * ---------------------------------------------------------------------
+ * * TODO:200:r: Implement modEoCCNUWhiteListTable data context functions.
+ */
+
+
+/**
+ * set mib index(es)
+ *
+ * @param tbl_idx mib index structure
+ * @param modEoCCNUWhiteListIndex_val
+ *
+ * @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
+modEoCCNUWhiteListTable_indexes_set_tbl_idx
+ (modEoCCNUWhiteListTable_mib_index * tbl_idx,
+ long modEoCCNUWhiteListIndex_val)
+{
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_indexes_set_tbl_idx", "called\n"));
+
+ /*
+ * modEoCCNUWhiteListIndex(1)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/R/d/h
+ */
+ tbl_idx->modEoCCNUWhiteListIndex = modEoCCNUWhiteListIndex_val;
+
+
+ return MFD_SUCCESS;
+} /* modEoCCNUWhiteListTable_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
+modEoCCNUWhiteListTable_indexes_set(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx,
+ long modEoCCNUWhiteListIndex_val)
+{
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_indexes_set", "called\n"));
+
+ if (MFD_SUCCESS !=
+ modEoCCNUWhiteListTable_indexes_set_tbl_idx(&rowreq_ctx->tbl_idx,
+ modEoCCNUWhiteListIndex_val))
+ return MFD_ERROR;
+
+ /*
+ * convert mib index to oid index
+ */
+ rowreq_ctx->oid_idx.len = sizeof(rowreq_ctx->oid_tmp) / sizeof(oid);
+ if (0 != modEoCCNUWhiteListTable_index_to_oid(&rowreq_ctx->oid_idx,
+ &rowreq_ctx->tbl_idx)) {
+ return MFD_ERROR;
+ }
+
+ return MFD_SUCCESS;
+} /* modEoCCNUWhiteListTable_indexes_set */
+
+
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-MOD-EOC-MIB::modEoCCNUWhiteListEntry.modEoCCNUWhiteListMACAddress
+ * modEoCCNUWhiteListMACAddress is subid 2 of modEoCCNUWhiteListEntry.
+ * Its status is Current, and its access level is ReadWrite.
+ * OID: .1.3.6.1.4.1.22764.3.1.5.1.6.1.2
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 1 hashint 1
+ * settable 1
+ * hint: 1x:
+ *
+ * Ranges: 6;
+ *
+ * Its syntax is MacAddress (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 6)
+ */
+/**
+ * Extract the current value of the modEoCCNUWhiteListMACAddress data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param modEoCCNUWhiteListMACAddress_val_ptr_ptr
+ * Pointer to storage for a char variable
+ * @param modEoCCNUWhiteListMACAddress_val_ptr_len_ptr
+ * Pointer to a size_t. On entry, it will contain the size (in bytes)
+ * pointed to by modEoCCNUWhiteListMACAddress.
+ * 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 (*modEoCCNUWhiteListMACAddress_val_ptr_len_ptr) bytes of memory,
+ * allocate it using malloc() and update modEoCCNUWhiteListMACAddress_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
+modEoCCNUWhiteListMACAddress_get(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx,
+ char
+ **modEoCCNUWhiteListMACAddress_val_ptr_ptr,
+ size_t
+ *modEoCCNUWhiteListMACAddress_val_ptr_len_ptr)
+{
+ /** we should have a non-NULL pointer and enough storage */
+ netsnmp_assert((NULL != modEoCCNUWhiteListMACAddress_val_ptr_ptr)
+ && (NULL != *modEoCCNUWhiteListMACAddress_val_ptr_ptr));
+ netsnmp_assert(NULL != modEoCCNUWhiteListMACAddress_val_ptr_len_ptr);
+
+
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListMACAddress_get", "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the modEoCCNUWhiteListMACAddress data.
+ * copy (* modEoCCNUWhiteListMACAddress_val_ptr_ptr ) data and (* modEoCCNUWhiteListMACAddress_val_ptr_len_ptr ) from rowreq_ctx->data
+ */
+ /*
+ * make sure there is enough space for modEoCCNUWhiteListMACAddress data
+ */
+ if ((NULL == (*modEoCCNUWhiteListMACAddress_val_ptr_ptr)) ||
+ ((*modEoCCNUWhiteListMACAddress_val_ptr_len_ptr) <
+ (rowreq_ctx->data->modEoCCNUWhiteListMACAddress_len *
+ sizeof(rowreq_ctx->data->modEoCCNUWhiteListMACAddress[0])))) {
+ /*
+ * allocate space for modEoCCNUWhiteListMACAddress data
+ */
+ (*modEoCCNUWhiteListMACAddress_val_ptr_ptr) =
+ malloc(rowreq_ctx->data->modEoCCNUWhiteListMACAddress_len *
+ sizeof(rowreq_ctx->data->
+ modEoCCNUWhiteListMACAddress[0]));
+ if (NULL == (*modEoCCNUWhiteListMACAddress_val_ptr_ptr)) {
+ snmp_log(LOG_ERR, "could not allocate memory\n");
+ return MFD_ERROR;
+ }
+ }
+ (*modEoCCNUWhiteListMACAddress_val_ptr_len_ptr) =
+ rowreq_ctx->data->modEoCCNUWhiteListMACAddress_len *
+ sizeof(rowreq_ctx->data->modEoCCNUWhiteListMACAddress[0]);
+ memcpy((*modEoCCNUWhiteListMACAddress_val_ptr_ptr),
+ rowreq_ctx->data->modEoCCNUWhiteListMACAddress,
+ rowreq_ctx->data->modEoCCNUWhiteListMACAddress_len *
+ sizeof(rowreq_ctx->data->modEoCCNUWhiteListMACAddress[0]));
+
+ return MFD_SUCCESS;
+} /* modEoCCNUWhiteListMACAddress_get */
+
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-MOD-EOC-MIB::modEoCCNUWhiteListEntry.modEoCCNUWhiteListAuthorization
+ * modEoCCNUWhiteListAuthorization is subid 3 of modEoCCNUWhiteListEntry.
+ * Its status is Current, and its access level is ReadWrite.
+ * OID: .1.3.6.1.4.1.22764.3.1.5.1.6.1.3
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 1 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 1
+ *
+ * Enum range: 2/8. Values: not_authorized(0), authorized(1)
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (u_long)
+ */
+/**
+ * Extract the current value of the modEoCCNUWhiteListAuthorization data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param modEoCCNUWhiteListAuthorization_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
+modEoCCNUWhiteListAuthorization_get(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long *
+ modEoCCNUWhiteListAuthorization_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != modEoCCNUWhiteListAuthorization_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListAuthorization_get", "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the modEoCCNUWhiteListAuthorization data.
+ * copy (* modEoCCNUWhiteListAuthorization_val_ptr ) from rowreq_ctx->data
+ */
+ (*modEoCCNUWhiteListAuthorization_val_ptr) =
+ rowreq_ctx->data->modEoCCNUWhiteListAuthorization;
+
+ return MFD_SUCCESS;
+} /* modEoCCNUWhiteListAuthorization_get */
+
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-MOD-EOC-MIB::modEoCCNUWhiteListEntry.modEoCCNUWhiteListRFOutputLevel
+ * modEoCCNUWhiteListRFOutputLevel is subid 4 of modEoCCNUWhiteListEntry.
+ * Its status is Current, and its access level is ReadWrite.
+ * OID: .1.3.6.1.4.1.22764.3.1.5.1.6.1.4
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 1
+ *
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ */
+/**
+ * Extract the current value of the modEoCCNUWhiteListRFOutputLevel data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param modEoCCNUWhiteListRFOutputLevel_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
+modEoCCNUWhiteListRFOutputLevel_get(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx,
+ long
+ *modEoCCNUWhiteListRFOutputLevel_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != modEoCCNUWhiteListRFOutputLevel_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListRFOutputLevel_get", "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the modEoCCNUWhiteListRFOutputLevel data.
+ * copy (* modEoCCNUWhiteListRFOutputLevel_val_ptr ) from rowreq_ctx->data
+ */
+ (*modEoCCNUWhiteListRFOutputLevel_val_ptr) =
+ rowreq_ctx->data->modEoCCNUWhiteListRFOutputLevel;
+
+ return MFD_SUCCESS;
+} /* modEoCCNUWhiteListRFOutputLevel_get */
+
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-MOD-EOC-MIB::modEoCCNUWhiteListEntry.modEoCCNUWhiteListAutoUpgradeEN
+ * modEoCCNUWhiteListAutoUpgradeEN is subid 5 of modEoCCNUWhiteListEntry.
+ * Its status is Current, and its access level is ReadWrite.
+ * OID: .1.3.6.1.4.1.22764.3.1.5.1.6.1.5
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 1 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 1
+ *
+ * Enum range: 2/8. Values: disable(0), enable(1)
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (u_long)
+ */
+/**
+ * Extract the current value of the modEoCCNUWhiteListAutoUpgradeEN data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param modEoCCNUWhiteListAutoUpgradeEN_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
+modEoCCNUWhiteListAutoUpgradeEN_get(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long *
+ modEoCCNUWhiteListAutoUpgradeEN_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != modEoCCNUWhiteListAutoUpgradeEN_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListAutoUpgradeEN_get", "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the modEoCCNUWhiteListAutoUpgradeEN data.
+ * copy (* modEoCCNUWhiteListAutoUpgradeEN_val_ptr ) from rowreq_ctx->data
+ */
+ (*modEoCCNUWhiteListAutoUpgradeEN_val_ptr) =
+ rowreq_ctx->data->modEoCCNUWhiteListAutoUpgradeEN;
+
+ return MFD_SUCCESS;
+} /* modEoCCNUWhiteListAutoUpgradeEN_get */
+
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-MOD-EOC-MIB::modEoCCNUWhiteListEntry.modEoCCNUWhiteListRegisterOnlineState
+ * modEoCCNUWhiteListRegisterOnlineState is subid 6 of modEoCCNUWhiteListEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.4.1.22764.3.1.5.1.6.1.6
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 1 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ * Enum range: 2/8. Values: offline(0), online(1)
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (u_long)
+ */
+/**
+ * Extract the current value of the modEoCCNUWhiteListRegisterOnlineState data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param modEoCCNUWhiteListRegisterOnlineState_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
+modEoCCNUWhiteListRegisterOnlineState_get
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx,
+ u_long * modEoCCNUWhiteListRegisterOnlineState_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != modEoCCNUWhiteListRegisterOnlineState_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListRegisterOnlineState_get", "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the modEoCCNUWhiteListRegisterOnlineState data.
+ * copy (* modEoCCNUWhiteListRegisterOnlineState_val_ptr ) from rowreq_ctx->data
+ */
+ (*modEoCCNUWhiteListRegisterOnlineState_val_ptr) =
+ rowreq_ctx->data->modEoCCNUWhiteListRegisterOnlineState;
+
+ return MFD_SUCCESS;
+} /* modEoCCNUWhiteListRegisterOnlineState_get */
+
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-MOD-EOC-MIB::modEoCCNUWhiteListEntry.modEoCCNUWhiteListStartTime
+ * modEoCCNUWhiteListStartTime is subid 7 of modEoCCNUWhiteListEntry.
+ * Its status is Current, and its access level is ReadWrite.
+ * OID: .1.3.6.1.4.1.22764.3.1.5.1.6.1.7
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 1
+ *
+ *
+ * Its syntax is TICKS (based on perltype TICKS)
+ * The net-snmp type is ASN_TIMETICKS. The C type decl is u_long (u_long)
+ */
+/**
+ * Extract the current value of the modEoCCNUWhiteListStartTime data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param modEoCCNUWhiteListStartTime_val_ptr
+ * Pointer to storage for a u_long variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+modEoCCNUWhiteListStartTime_get(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long *
+ modEoCCNUWhiteListStartTime_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != modEoCCNUWhiteListStartTime_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListStartTime_get", "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the modEoCCNUWhiteListStartTime data.
+ * copy (* modEoCCNUWhiteListStartTime_val_ptr ) from rowreq_ctx->data
+ */
+ (*modEoCCNUWhiteListStartTime_val_ptr) =
+ rowreq_ctx->data->modEoCCNUWhiteListStartTime;
+
+ return MFD_SUCCESS;
+} /* modEoCCNUWhiteListStartTime_get */
+
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-MOD-EOC-MIB::modEoCCNUWhiteListEntry.modEoCCNUWhiteListEndTime
+ * modEoCCNUWhiteListEndTime is subid 8 of modEoCCNUWhiteListEntry.
+ * Its status is Current, and its access level is ReadWrite.
+ * OID: .1.3.6.1.4.1.22764.3.1.5.1.6.1.8
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 1
+ *
+ *
+ * Its syntax is TICKS (based on perltype TICKS)
+ * The net-snmp type is ASN_TIMETICKS. The C type decl is u_long (u_long)
+ */
+/**
+ * Extract the current value of the modEoCCNUWhiteListEndTime data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param modEoCCNUWhiteListEndTime_val_ptr
+ * Pointer to storage for a u_long variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+modEoCCNUWhiteListEndTime_get(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long * modEoCCNUWhiteListEndTime_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != modEoCCNUWhiteListEndTime_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListEndTime_get", "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the modEoCCNUWhiteListEndTime data.
+ * copy (* modEoCCNUWhiteListEndTime_val_ptr ) from rowreq_ctx->data
+ */
+ (*modEoCCNUWhiteListEndTime_val_ptr) =
+ rowreq_ctx->data->modEoCCNUWhiteListEndTime;
+
+ return MFD_SUCCESS;
+} /* modEoCCNUWhiteListEndTime_get */
+
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-MOD-EOC-MIB::modEoCCNUWhiteListEntry.modEoCCNUWhiteListRowStatus
+ * modEoCCNUWhiteListRowStatus is subid 9 of modEoCCNUWhiteListEntry.
+ * Its status is Current, and its access level is Create.
+ * OID: .1.3.6.1.4.1.22764.3.1.5.1.6.1.9
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 1 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 1
+ *
+ * Enum range: 3/8. Values: active(1), notInService(2), notReady(3), createAndGo(4), createAndWait(5), destroy(6)
+ *
+ * Its syntax is RowStatus (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (u_long)
+ */
+/**
+ * Extract the current value of the modEoCCNUWhiteListRowStatus data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param modEoCCNUWhiteListRowStatus_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
+modEoCCNUWhiteListRowStatus_get(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long *
+ modEoCCNUWhiteListRowStatus_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != modEoCCNUWhiteListRowStatus_val_ptr);
+
+ (*modEoCCNUWhiteListRowStatus_val_ptr) =
+ rowreq_ctx->data->modEoCCNUWhiteListRowStatus;
+
+ return MFD_SUCCESS;
+} /* modEoCCNUWhiteListRowStatus_get */
+
+
+/* callback function for counting number of authorized stations */
+static void
+_mod_eoc_count_registered (modEoCCNUWhiteListTable_rowreq_ctx *rowreq_ctx, int *count)
+{
+ netsnmp_assert(NULL != rowreq_ctx);
+ netsnmp_assert(NULL != count);
+
+
+ if ( 1 == rowreq_ctx->data->modEoCCNUWhiteListAuthorization){
+ (*count)++;
+ }
+}
+
+int
+modEoCCNUWhiteListTable_RegisteredAmount_get(void)
+{
+ netsnmp_container * whitelist_container;
+ int rc;
+ int reg_amount = 0;
+
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_RegisteredAmount_get", "called!\n"));
+
+ whitelist_container =
+ netsnmp_container_find("modEoCCNUWhiteListTable:table_container");
+ if (NULL == whitelist_container) {
+ snmp_log(LOG_ERR, "whitelist temp container not found\n");
+ return -1;
+ }
+
+ rc = modEoCCNUWhiteListTable_container_load(whitelist_container);
+ if (MFD_ERROR == rc) {
+ snmp_log(LOG_ERR, "whitelist container load error\n");
+ return -1;
+ }
+
+
+ CONTAINER_FOR_EACH(whitelist_container, (netsnmp_container_obj_func *)
+ _mod_eoc_count_registered, &reg_amount);
+
+
+ return reg_amount;
+}
+
+
+/** @} */
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable_data_get.h b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable_data_get.h
new file mode 100644
index 0000000000..0f2e2b4392
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable_data_get.h
@@ -0,0 +1,106 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ * version : 12088 $ of $
+ *
+ * $Id:$
+ *
+ * @file modEoCCNUWhiteListTable_data_get.h
+ *
+ * @addtogroup get
+ *
+ * Prototypes for get functions
+ *
+ * @{
+ */
+#ifndef MODEOCCNUWHITELISTTABLE_DATA_GET_H
+#define MODEOCCNUWHITELISTTABLE_DATA_GET_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ /*
+ *********************************************************************
+ * GET function declarations
+ */
+
+ /*
+ *********************************************************************
+ * GET Table declarations
+ */
+/**********************************************************************
+ **********************************************************************
+ ***
+ *** Table modEoCCNUWhiteListTable
+ ***
+ **********************************************************************
+ **********************************************************************/
+ /*
+ * NSCRTV-EPONEOC-MOD-EOC-MIB::modEoCCNUWhiteListTable is subid 6 of modEoCCNUWhiteList.
+ * Its status is Current.
+ * OID: .1.3.6.1.4.1.22764.3.1.5.1.6, length: 12
+ */
+ /*
+ * indexes
+ */
+
+ int
+ modEoCCNUWhiteListMACAddress_get(modEoCCNUWhiteListTable_rowreq_ctx
+ * rowreq_ctx,
+ char
+ **modEoCCNUWhiteListMACAddress_val_ptr_ptr,
+ size_t
+ *modEoCCNUWhiteListMACAddress_val_ptr_len_ptr);
+ int
+ modEoCCNUWhiteListAuthorization_get
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx,
+ u_long * modEoCCNUWhiteListAuthorization_val_ptr);
+ int
+ modEoCCNUWhiteListRFOutputLevel_get
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx,
+ long *modEoCCNUWhiteListRFOutputLevel_val_ptr);
+ int
+ modEoCCNUWhiteListAutoUpgradeEN_get
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx,
+ u_long * modEoCCNUWhiteListAutoUpgradeEN_val_ptr);
+ int
+ modEoCCNUWhiteListRegisterOnlineState_get
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx,
+ u_long * modEoCCNUWhiteListRegisterOnlineState_val_ptr);
+ int
+ modEoCCNUWhiteListStartTime_get(modEoCCNUWhiteListTable_rowreq_ctx
+ * rowreq_ctx,
+ u_long *
+ modEoCCNUWhiteListStartTime_val_ptr);
+ int
+ modEoCCNUWhiteListEndTime_get(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long *
+ modEoCCNUWhiteListEndTime_val_ptr);
+ int
+ modEoCCNUWhiteListRowStatus_get(modEoCCNUWhiteListTable_rowreq_ctx
+ * rowreq_ctx,
+ u_long *
+ modEoCCNUWhiteListRowStatus_val_ptr);
+
+
+ int
+ modEoCCNUWhiteListTable_indexes_set_tbl_idx
+ (modEoCCNUWhiteListTable_mib_index * tbl_idx,
+ long modEoCCNUWhiteListIndex_val);
+ int
+ modEoCCNUWhiteListTable_indexes_set
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx,
+ long modEoCCNUWhiteListIndex_val);
+
+ /* declaration for getting value of scalar added to table */
+ int
+ modEoCCNUWhiteListTable_RegisteredAmount_get(void);
+
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* MODEOCCNUWHITELISTTABLE_DATA_GET_H */
+/** @} */
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable_data_set.c b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable_data_set.c
new file mode 100644
index 0000000000..af6dd4c496
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable_data_set.c
@@ -0,0 +1,2624 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ * version : 12077 $ of $
+ *
+ * $Id:$
+ *
+ */
+/*
+ * 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 "modEoCCNUWhiteListTable.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.
+ *
+ * @{
+ */
+/**********************************************************************
+ **********************************************************************
+ ***
+ *** Table modEoCCNUWhiteListTable
+ ***
+ **********************************************************************
+ **********************************************************************/
+/*
+ * NSCRTV-EPONEOC-MOD-EOC-MIB::modEoCCNUWhiteListTable is subid 6 of modEoCCNUWhiteList.
+ * Its status is Current.
+ * OID: .1.3.6.1.4.1.22764.3.1.5.1.6, length: 12
+ */
+ /*
+ * NOTE: if you update this chart, please update the versions in
+ * local/mib2c-conf.d/parent-set.m2i
+ * agent/mibgroup/helpers/baby_steps.c
+ * while you're at it.
+ */
+ /*
+ ***********************************************************************
+ * Baby Steps Flow Chart (2004.06.05) *
+ * *
+ * +--------------+ +================+ U = unconditional path *
+ * |optional state| ||required state|| S = path for success *
+ * +--------------+ +================+ E = path for error *
+ ***********************************************************************
+ *
+ * +--------------+
+ * | pre |
+ * | request |
+ * +--------------+
+ * | U
+ * +-------------+ +==============+
+ * | row |f|<-------|| object ||
+ * | create |1| E || lookup ||
+ * +-------------+ +==============+
+ * E | | S | S
+ * | +------------------>|
+ * | +==============+
+ * | E || check ||
+ * |<---------------|| values ||
+ * | +==============+
+ * | | S
+ * | +==============+
+ * | +<-------|| undo ||
+ * | | E || setup ||
+ * | | +==============+
+ * | | | S
+ * | | +==============+
+ * | | || set ||-------------------------->+
+ * | | || value || E |
+ * | | +==============+ |
+ * | | | S |
+ * | | +--------------+ |
+ * | | | check |-------------------------->|
+ * | | | consistency | E |
+ * | | +--------------+ |
+ * | | | S |
+ * | | +==============+ +==============+ |
+ * | | || commit ||-------->|| undo || |
+ * | | || || E || commit || |
+ * | | +==============+ +==============+ |
+ * | | | S U |<--------+
+ * | | +--------------+ +==============+
+ * | | | irreversible | || undo ||
+ * | | | commit | || set ||
+ * | | +--------------+ +==============+
+ * | | | U U |
+ * | +-------------->|<------------------------+
+ * | +==============+
+ * | || undo ||
+ * | || cleanup ||
+ * | +==============+
+ * +---------------------->| U
+ * |
+ * (err && f1)------------------->+
+ * | |
+ * +--------------+ +--------------+
+ * | post |<--------| row |
+ * | request | U | release |
+ * +--------------+ +--------------+
+ *
+ */
+
+/**
+ * Setup up context with information needed to undo a set request.
+ *
+ * This function will be called before the individual node undo setup
+ * functions are called. If you need to do any undo setup that is not
+ * related to a specific column, you can do it here.
+ *
+ * Note that the undo context has been allocated with
+ * modEoCCNUWhiteListTable_allocate_data(), but may need extra
+ * initialization similar to what you may have done in
+ * modEoCCNUWhiteListTable_rowreq_ctx_init().
+ * Note that an individual node's undo_setup function will only be called
+ * if that node is being set to a new value.
+ *
+ * If there is any setup specific to a particular column (e.g. allocating
+ * memory for a string), you should do that setup in the node's undo_setup
+ * function, so it won't be done unless it is necessary.
+ *
+ * @param rowreq_ctx
+ * Pointer to the table context (modEoCCNUWhiteListTable_rowreq_ctx)
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_ERROR : error. set will fail.
+ */
+int
+modEoCCNUWhiteListTable_undo_setup(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx)
+{
+ int rc = MFD_SUCCESS;
+
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_undo_setup", "called\n"));
+
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:451:M: |-> Setup modEoCCNUWhiteListTable undo.
+ * set up modEoCCNUWhiteListTable undo information, in preparation for a set.
+ * Undo storage is in (* modEoCCNUWhiteListRowStatus_val_ptr )*
+ */
+ /* copy data context to undo context */
+ memcpy(rowreq_ctx->undo,
+ rowreq_ctx->data,
+ sizeof(modEoCCNUWhiteListTable_data));
+
+ return rc;
+} /* modEoCCNUWhiteListTable_undo_setup */
+
+/**
+ * Undo a set request.
+ *
+ * This function will be called before the individual node undo
+ * functions are called. If you need to do any undo that is not
+ * related to a specific column, you can do it here.
+ *
+ * Note that an individual node's undo function will only be called
+ * if that node is being set to a new value.
+ *
+ * If there is anything specific to a particular column (e.g. releasing
+ * memory for a string), you should do that setup in the node's undo
+ * function, so it won't be done unless it is necessary.
+ *
+ * @param rowreq_ctx
+ * Pointer to the table context (modEoCCNUWhiteListTable_rowreq_ctx)
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_ERROR : error. set will fail.
+ */
+int
+modEoCCNUWhiteListTable_undo(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx)
+{
+ int rc = MFD_SUCCESS;
+
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_undo", "called\n"));
+
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:451:M: |-> modEoCCNUWhiteListTable undo.
+ * modEoCCNUWhiteListTable undo information, in response to a failed set.
+ * Undo storage is in (* modEoCCNUWhiteListRowStatus_val_ptr )*
+ */
+
+ return rc;
+} /* modEoCCNUWhiteListTable_undo_setup */
+
+/**
+ * Cleanup up context undo information.
+ *
+ * This function will be called after set/commit processing. If you
+ * allocated any resources in undo_setup, this is the place to release
+ * those resources.
+ *
+ * This function is called regardless of the success or failure of the set
+ * request. If you need to perform different steps for cleanup depending
+ * on success or failure, you can add a flag to the rowreq_ctx.
+ *
+ * @param rowreq_ctx
+ * Pointer to the table context (modEoCCNUWhiteListTable_rowreq_ctx)
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_ERROR : error
+ */
+int
+modEoCCNUWhiteListTable_undo_cleanup(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx)
+{
+ int rc = MFD_SUCCESS;
+
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_undo_cleanup", "called\n"));
+
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:452:M: |-> Cleanup modEoCCNUWhiteListTable undo.
+ * Undo storage is in (* modEoCCNUWhiteListRowStatus_val_ptr )*
+ */
+
+ return rc;
+} /* modEoCCNUWhiteListTable_undo_cleanup */
+
+/**
+ * commit new values.
+ *
+ * At this point, you should have done everything you can to ensure that
+ * this commit will not fail.
+ *
+ * Should you need different behavior depending on which columns were
+ * set, rowreq_ctx->column_set_flags will indicate which writeable columns were
+ * set. The definitions for the COLUMN_*_FLAG bits can be found in
+ * modEoCCNUWhiteListTable_oids.h.
+ * A new row will have the MFD_ROW_CREATED bit set in rowreq_flags.
+ *
+ * @param modEoCCNUWhiteListTable_rowreq_ctx
+ * Pointer to the users context.
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_ERROR : error
+ */
+int
+modEoCCNUWhiteListTable_commit(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx)
+{
+ int rc = MFD_SUCCESS;
+ int save_flags;
+
+ /* declarations for calls to libspid */
+ char key_buffer[LIBSPID_KEY_MAX_LEN];
+ int ret;
+ int tmp;
+ char *placeholder = SPC300_NETWORK_DEFAULT_PASSWORD;
+ int start_time_hr, start_time_min, end_time_hr, end_time_min;
+
+ libspid_eoc_wl_entry_t wl_entry;
+
+ const char online_delimiters[2] = LIBSPID_ONLINE_INFO_DELIMITER "\0";
+ char online_buffer[LIBSPID_LINE_MAX_LEN] = {0};
+ unsigned int online_elt_number = LIBSPID_ELT_MAX_NB;
+ char *online_elt_buffer[LIBSPID_ELT_MAX_NB] = {0};
+
+ int i;
+
+ char mac_str_old[LIBSPID_MAC_STR_LEN];
+
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_commit", "called\n"));
+
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /* initialize white list entry */
+ memset(&wl_entry, 0, sizeof(wl_entry));
+
+
+ /*
+ * save flags, then clear until we actually do something
+ */
+ save_flags = rowreq_ctx->column_set_flags;
+ rowreq_ctx->column_set_flags = 0;
+
+ /*
+ * commit modEoCCNUWhiteListTable data
+ * 1) check the column's flag in save_flags to see if it was set.
+ * 2) clear the flag when you handle that column
+ * 3) set the column's flag in column_set_flags if it needs undo
+ * processing in case of a failure.
+ */
+
+ /*
+ * did anything change?
+ */
+ if (0 == save_flags) {
+ DEBUGMSGTL(("modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_commit",
+ "no change\n"));
+ return MFD_SUCCESS;
+ }
+
+ if (save_flags & COLUMN_MODEOCCNUWHITELISTMACADDRESS_FLAG) {
+ save_flags &= ~COLUMN_MODEOCCNUWHITELISTMACADDRESS_FLAG; /* clear modEoCCNUWhiteListMACAddress */
+ /*
+ * set flag, in case we need to undo modEoCCNUWhiteListMACAddress
+ */
+ rowreq_ctx->column_set_flags |=
+ COLUMN_MODEOCCNUWHITELISTMACADDRESS_FLAG;
+ } else {
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_commit", "MAC address not set!\n"));
+ }
+
+ if (save_flags & COLUMN_MODEOCCNUWHITELISTAUTHORIZATION_FLAG) {
+ save_flags &= ~COLUMN_MODEOCCNUWHITELISTAUTHORIZATION_FLAG; /* clear modEoCCNUWhiteListAuthorization */
+ /*
+ * set flag, in case we need to undo modEoCCNUWhiteListAuthorization
+ */
+ rowreq_ctx->column_set_flags |=
+ COLUMN_MODEOCCNUWHITELISTAUTHORIZATION_FLAG;
+ }
+
+ if (save_flags & COLUMN_MODEOCCNUWHITELISTRFOUTPUTLEVEL_FLAG) {
+ save_flags &= ~COLUMN_MODEOCCNUWHITELISTRFOUTPUTLEVEL_FLAG; /* clear modEoCCNUWhiteListRFOutputLevel */
+ /*
+ * set flag, in case we need to undo modEoCCNUWhiteListRFOutputLevel
+ */
+ rowreq_ctx->column_set_flags |=
+ COLUMN_MODEOCCNUWHITELISTRFOUTPUTLEVEL_FLAG;
+ }
+
+ if (save_flags & COLUMN_MODEOCCNUWHITELISTAUTOUPGRADEEN_FLAG) {
+ save_flags &= ~COLUMN_MODEOCCNUWHITELISTAUTOUPGRADEEN_FLAG; /* clear modEoCCNUWhiteListAutoUpgradeEN */
+ /*
+ * set flag, in case we need to undo modEoCCNUWhiteListAutoUpgradeEN
+ */
+ rowreq_ctx->column_set_flags |=
+ COLUMN_MODEOCCNUWHITELISTAUTOUPGRADEEN_FLAG;
+ }
+
+ if (save_flags & COLUMN_MODEOCCNUWHITELISTSTARTTIME_FLAG) {
+ save_flags &= ~COLUMN_MODEOCCNUWHITELISTSTARTTIME_FLAG; /* clear modEoCCNUWhiteListStartTime */
+ /*
+ * set flag, in case we need to undo modEoCCNUWhiteListStartTime
+ */
+ rowreq_ctx->column_set_flags |=
+ COLUMN_MODEOCCNUWHITELISTSTARTTIME_FLAG;
+ }
+
+ if (save_flags & COLUMN_MODEOCCNUWHITELISTENDTIME_FLAG) {
+ save_flags &= ~COLUMN_MODEOCCNUWHITELISTENDTIME_FLAG; /* clear modEoCCNUWhiteListEndTime */
+ /*
+ * set flag, in case we need to undo modEoCCNUWhiteListEndTime
+ */
+ rowreq_ctx->column_set_flags |=
+ COLUMN_MODEOCCNUWHITELISTENDTIME_FLAG;
+ }
+
+ if (save_flags & COLUMN_MODEOCCNUWHITELISTROWSTATUS_FLAG) {
+ save_flags &= ~COLUMN_MODEOCCNUWHITELISTROWSTATUS_FLAG; /* clear modEoCCNUWhiteListRowStatus */
+ /*
+ * set flag, in case we need to undo modEoCCNUWhiteListRowStatus
+ */
+ rowreq_ctx->column_set_flags |=
+ COLUMN_MODEOCCNUWHITELISTROWSTATUS_FLAG;
+ }
+
+
+ /* handle row addition or deletion (similarly as in ipAddressTable) */
+ /*
+ * pass everything to data access
+ * let data access know what columns are set
+ */
+
+ if (rowreq_ctx->column_set_flags & COLUMN_MODEOCCNUWHITELISTROWSTATUS_FLAG) {
+ if (rowreq_ctx->rowreq_flags & MFD_ROW_CREATED) {
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_commit", "new row created!\n"));
+ } else if (ROWSTATUS_DESTROY == rowreq_ctx->data->modEoCCNUWhiteListRowStatus) {
+ /* check if deleting unvalidated row */
+ /* a row can be unvalidated either before being added to configuration file, or to mark invalid line in configuration file */
+ if ((rowreq_ctx->undo->modEoCCNUWhiteListRowStatus & ROWSTATUS_NOTINSERVICE)){
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_commit", "deleting unvalidated row!\n"));
+ /* convert MAC address from bin to string to serve as key for possible removing of invalid line */
+ ret = libspid_mac_bin_to_str(rowreq_ctx->data->modEoCCNUWhiteListMACAddress, key_buffer);
+ if (LIBSPID_SUCCESS != ret){
+ snmp_log(LOG_ERR, "libspid_mac_bin_to_str error\n");
+ return MFD_ERROR;
+ }
+ /* remove line with given index from white list configuration file, if existing */
+ if (LIBSPID_SUCCESS != libspid_eoc_wl_remove(key_buffer))
+ {
+ snmp_log(LOG_ERR, "unvalidated row not in configuration file\n");
+ }
+
+ return MFD_SUCCESS;
+ }
+
+ if ((rowreq_ctx->undo->modEoCCNUWhiteListRowStatus & ROWSTATUS_NOTINSERVICE)){
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_commit", "deleting unvalidated row!\n"));
+ return MFD_SUCCESS;
+ }
+
+ DEBUGMSGTL(("modEoCCNUWhiteListTable_commit", "MAC address to be deleted: %x %x %x %x %x %x \n", rowreq_ctx->data->modEoCCNUWhiteListMACAddress[0], rowreq_ctx->data->modEoCCNUWhiteListMACAddress[1], rowreq_ctx->data->modEoCCNUWhiteListMACAddress[2], rowreq_ctx->data->modEoCCNUWhiteListMACAddress[3], rowreq_ctx->data->modEoCCNUWhiteListMACAddress[4], rowreq_ctx->data->modEoCCNUWhiteListMACAddress[5]));
+
+
+ /* convert MAC address from bin to string to serve as key for removing line */
+ ret = libspid_mac_bin_to_str(rowreq_ctx->data->modEoCCNUWhiteListMACAddress, key_buffer);
+ if (LIBSPID_SUCCESS != ret){
+ snmp_log(LOG_ERR, "libspid_mac_bin_to_str error\n");
+ return MFD_ERROR;
+ }
+
+ /* remove MAC address from internal storage list */
+ if (NULL != se_find_slist("mod_eoc_white_list")){
+ DEBUGMSGTL(("modEoCCNUWhiteListTable_commit:", "trying to remove MAC address from slist: %s\n", key_buffer));
+ ret = se_remove_label_from_slist("mod_eoc_white_list", key_buffer);
+ if (ret == SE_DNE){
+ snmp_log(LOG_ERR, "Error! MAC address not found in the table!\n");
+ return MFD_ERROR;
+ }
+ } else {
+ snmp_log(LOG_ERR, "Trying to delete from empty MAC address list!\n");
+ return MFD_ERROR;
+ }
+
+
+
+ /* check configuration files before attempting synchronization of white list and ports */
+ if (LIBSPID_SUCCESS != libspid_eoc_wl_check ()){
+ snmp_log(LOG_ERR, "errors detected in whitelist configuration file, cannot sync\n");
+ return MFD_ERROR;
+ }
+
+ if (LIBSPID_SUCCESS != libspid_eoc_port_check ()){
+ snmp_log(LOG_ERR, "errors detected in port configuration file, cannot sync\n");
+ return MFD_ERROR;
+ }
+
+
+ /* remove line indexed by MAC address from white list configuration file */
+ if (LIBSPID_SUCCESS != libspid_eoc_wl_remove(key_buffer))
+ {
+ snmp_log(LOG_ERR, "libspid_eoc_wl_remove error\n");
+ return MFD_ERROR;
+ }
+
+ /* propagate white list changes */
+ ret = libspid_eoc_wl_sync();
+
+ if (LIBSPID_SUCCESS != ret){
+ snmp_log(LOG_ERR, "libspid_eoc_wl_sync error\n");
+ return MFD_ERROR;
+ } else {
+ snmp_log(LOG_ERR, "libspid_eoc_wl_sync succeeded\n");
+ }
+
+ /* propagate associated port changes */
+ ret = libspid_eoc_port_sync();
+ if (LIBSPID_SUCCESS != ret){
+ snmp_log(LOG_ERR, "libspid_eoc_port_sync error\n");
+ return MFD_ERROR;
+ } else {
+ snmp_log(LOG_ERR, "libspid_eoc_port_sync succeeded\n");
+ }
+
+ } else if (ROWSTATUS_ACTIVE == rowreq_ctx->data->modEoCCNUWhiteListRowStatus){
+ /* this case covers modifying row status to active - i.e. validating the row */
+ /* row can be either newly added from the agent, or having row status notInService to mark invalid line in configuration file */
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_commit", "validating row\n"));
+
+ /* convert MAC address from bin to string to serve as key for row */
+ ret = libspid_mac_bin_to_str(rowreq_ctx->data->modEoCCNUWhiteListMACAddress, key_buffer);
+ if (LIBSPID_SUCCESS != ret){
+ snmp_log(LOG_ERR, "libspid_mac_bin_to_str error\n");
+ return MFD_ERROR;
+ }
+
+ /* copy MAC address to white list entry */
+ strcpy(wl_entry.mac_addr, key_buffer);
+
+ /* set ip address default 0.0.0.0 s to white list entry */
+ strcpy (wl_entry.ip_address, LIBSPID_EOC_WL_IP_DEFAULT);
+
+ /* copy TEI to white list entry */
+ sprintf(wl_entry.tei, "%ld", rowreq_ctx->data->modEoCCNUWhiteListTEI);
+
+ /* copy authorization to white list entry */
+ sprintf(wl_entry.auth, "%ld", rowreq_ctx->data->modEoCCNUWhiteListAuthorization);
+
+ /* copy output level to white list entry */
+ sprintf(wl_entry.output_level, "%ld", rowreq_ctx->data->modEoCCNUWhiteListRFOutputLevel);
+
+ /* convert start time to HH:MM format */
+ start_time_hr = (rowreq_ctx->data->modEoCCNUWhiteListStartTime / (60 * 100)) / 60;
+ start_time_min = (rowreq_ctx->data->modEoCCNUWhiteListStartTime / (60 * 100)) % 60;
+
+ /* copy start time to white list entry */
+ sprintf(wl_entry.start_time, "%02d:%02d", start_time_hr, start_time_min);
+
+ /* convert end time to HH:MM format */
+ end_time_hr = (rowreq_ctx->data->modEoCCNUWhiteListEndTime / (60 * 100)) / 60;
+ end_time_min = (rowreq_ctx->data->modEoCCNUWhiteListEndTime / (60 * 100)) % 60;
+
+ /* copy end time to white list entry */
+ sprintf(wl_entry.end_time, "%02d:%02d", end_time_hr, end_time_min);
+
+ /* if validating new row, copy placeholder string to white list fields not covered in SARFT MIB, otherwise copy table entry */
+ if (1 == adding_row)
+ strcpy(wl_entry.dpw, placeholder);
+ else {
+ /* copy DPW to white list entry */
+ strncpy(wl_entry.dpw, rowreq_ctx->data->spc300EoCSlaveWhiteListDevicePassword, rowreq_ctx->data->spc300EoCSlaveWhiteListDevicePassword_len);
+ /* add terminal 0 to DPW in white list entry */
+ wl_entry.dpw[rowreq_ctx->data->spc300EoCSlaveWhiteListDevicePassword_len]='\0';
+ }
+
+ /* add MAC address of validated row to internal storage list */
+ tmp = se_find_free_value_in_slist("mod_eoc_white_list");
+ if (tmp == SE_DNE)
+ tmp = 1; /* Completely new list! */
+ se_add_pair_to_slist("mod_eoc_white_list", strdup(key_buffer), tmp);
+
+
+ /* check configuration files before attempting synchronization of white list and ports */
+ if (LIBSPID_SUCCESS != libspid_eoc_wl_check ()){
+ snmp_log(LOG_ERR, "errors detected in whitelist configuration file, cannot sync\n");
+ return MFD_ERROR;
+ }
+
+ if (LIBSPID_SUCCESS != libspid_eoc_port_check ()){
+ snmp_log(LOG_ERR, "errors detected in port configuration file, cannot sync\n");
+ return MFD_ERROR;
+ }
+
+ /* write completed line to white list file */
+ ret = libspid_eoc_wl_set(key_buffer, &wl_entry);
+ if (LIBSPID_SUCCESS != ret){
+ snmp_log(LOG_ERR, "libspid_eoc_wl_set error\n");
+ return MFD_ERROR;
+ }
+
+ /* propagate white list changes */
+ ret = libspid_eoc_wl_sync();
+
+ if (LIBSPID_SUCCESS != ret){
+ snmp_log(LOG_ERR, "libspid_eoc_wl_sync error\n");
+ return MFD_ERROR;
+ } else {
+ snmp_log(LOG_ERR, "libspid_eoc_wl_sync succeeded\n");
+ }
+
+
+ /* propagate associated port changes */
+ ret = libspid_eoc_port_sync();
+ if (LIBSPID_SUCCESS != ret){
+ snmp_log(LOG_ERR, "libspid_eoc_port_sync error\n");
+ return MFD_ERROR;
+ } else {
+ snmp_log(LOG_ERR, "libspid_eoc_port_sync succeeded\n");
+ }
+
+ /* if commit has successfully passed, clear row adding indication */
+ adding_row = 0;
+
+ /* obtain online status of newly added station */
+ /* read line indexed by MAC address from online information file */
+ if (LIBSPID_SUCCESS == libspid_config_read_line(LIBSPID_ONLINE_INFO_PATH, online_delimiters, wl_entry.mac_addr, &online_elt_number, online_elt_buffer, online_buffer, LIBSPID_LINE_MAX_LEN)){
+ rowreq_ctx->data->modEoCCNUWhiteListRegisterOnlineState = MODEOCCNUWHITELISTREGISTERONLINESTATE_ONLINE;
+ } else {
+ rowreq_ctx->data->modEoCCNUWhiteListRegisterOnlineState = MODEOCCNUWHITELISTREGISTERONLINESTATE_OFFLINE;
+ }
+
+ }
+
+} else {
+ /* this case covers modifying columns without modifying row status */
+ if ( !(rowreq_ctx->rowreq_flags & MFD_ROW_CREATED) && (ROWSTATUS_ACTIVE == rowreq_ctx->data->modEoCCNUWhiteListRowStatus)){
+ DEBUGMSGTL(("modEoCCNUWhiteListTable_commit", "MAC address from row request context: %x %x %x %x %x %x \n",
+ rowreq_ctx->data->modEoCCNUWhiteListMACAddress[0], rowreq_ctx->data->modEoCCNUWhiteListMACAddress[1],
+ rowreq_ctx->data->modEoCCNUWhiteListMACAddress[2], rowreq_ctx->data->modEoCCNUWhiteListMACAddress[3],
+ rowreq_ctx->data->modEoCCNUWhiteListMACAddress[4], rowreq_ctx->data->modEoCCNUWhiteListMACAddress[5]));
+ /* convert MAC address from bin to string (to be changed later or used as a key in configuration file) */
+ ret = libspid_mac_bin_to_str(rowreq_ctx->data->modEoCCNUWhiteListMACAddress, key_buffer);
+ if (LIBSPID_SUCCESS != ret){
+ snmp_log(LOG_ERR, "libspid_mac_bin_to_str error\n");
+ return MFD_ERROR;
+ }
+ DEBUGMSGTL(("modEoCCNUWhiteListTable_commit", "MAC address converted to string: %s \n", key_buffer));
+
+
+ if (rowreq_ctx->column_set_flags & COLUMN_MODEOCCNUWHITELISTMACADDRESS_FLAG){
+ DEBUGMSGTL(("modEoCCNUWhiteListTable_commit", "old MAC address to be changed: %x %x %x %x %x %x \n",
+ rowreq_ctx->undo->modEoCCNUWhiteListMACAddress[0], rowreq_ctx->undo->modEoCCNUWhiteListMACAddress[1],
+ rowreq_ctx->undo->modEoCCNUWhiteListMACAddress[2], rowreq_ctx->undo->modEoCCNUWhiteListMACAddress[3],
+ rowreq_ctx->undo->modEoCCNUWhiteListMACAddress[4], rowreq_ctx->undo->modEoCCNUWhiteListMACAddress[5]));
+ /* convert old MAC address from bin to string */
+ ret = libspid_mac_bin_to_str(rowreq_ctx->undo->modEoCCNUWhiteListMACAddress, mac_str_old);
+ if (LIBSPID_SUCCESS != ret){
+ snmp_log(LOG_ERR, "libspid_mac_bin_to_str error\n");
+ return MFD_ERROR;
+ }
+ /* change MAC address in configuration file */
+ ret = libspid_eoc_wl_mac_change (mac_str_old, key_buffer);
+ if (LIBSPID_SUCCESS != ret){
+ snmp_log(LOG_ERR, "libspid_eoc_wl_mac_change error\n");
+ return MFD_ERROR;
+ }
+
+ /* remove old MAC address from internal storage list */
+ if (NULL != se_find_slist("mod_eoc_white_list")){
+ DEBUGMSGTL(("modEoCCNUWhiteListTable_commit:", "trying to remove MAC address from slist: %s\n", mac_str_old));
+ ret = se_remove_label_from_slist("mod_eoc_white_list", mac_str_old);
+ if (ret == SE_DNE){
+ snmp_log(LOG_ERR, "Error! MAC address not found in internal storage list!\n");
+ return MFD_ERROR;
+ }
+ } else {
+ snmp_log(LOG_ERR, "Trying to delete from empty MAC address internal storage list!\n");
+ return MFD_ERROR;
+ }
+
+ /* add new MAC address to internal storage list */
+ tmp = se_find_free_value_in_slist("mod_eoc_white_list");
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_commit", "se_find_value_in_slist found free value: %d\n", tmp));
+ if (tmp == SE_DNE)
+ tmp = 1; /* Completely new list! */
+ se_add_pair_to_slist("mod_eoc_white_list", strdup(key_buffer), tmp);
+ }
+
+ /* get existing line contents from white list file */
+ ret = libspid_eoc_wl_get(key_buffer, &wl_entry);
+ if (LIBSPID_SUCCESS != ret){
+ snmp_log(LOG_ERR, "libspid_eoc_wl_get error\n");
+ return MFD_ERROR;
+ }
+
+ /* set ip address default 0.0.0.0 s to white list entry */
+ strcpy (wl_entry.ip_address, LIBSPID_EOC_WL_IP_DEFAULT);
+
+ if (rowreq_ctx->column_set_flags & COLUMN_MODEOCCNUWHITELISTAUTHORIZATION_FLAG){
+ DEBUGMSGTL(("modEoCCNUWhiteListTable_commit", "authorization read from rowreq context: %ld\n", rowreq_ctx->data->modEoCCNUWhiteListAuthorization));
+ /* copy authorization to white list entry */
+ sprintf(wl_entry.auth, "%ld", rowreq_ctx->data->modEoCCNUWhiteListAuthorization);
+ }
+
+ if (rowreq_ctx->column_set_flags & COLUMN_MODEOCCNUWHITELISTRFOUTPUTLEVEL_FLAG){
+ DEBUGMSGTL(("modEoCCNUWhiteListTable_commit", "RF output level read from rowreq context: %ld\n", rowreq_ctx->data->modEoCCNUWhiteListRFOutputLevel));
+ /* copy output level to white list entry */
+ sprintf(wl_entry.output_level, "%ld", rowreq_ctx->data->modEoCCNUWhiteListRFOutputLevel);
+
+ }
+
+ if (rowreq_ctx->column_set_flags & COLUMN_MODEOCCNUWHITELISTSTARTTIME_FLAG){
+ DEBUGMSGTL(("modEoCCNUWhiteListTable_commit", "start time read from rowreq context: %ld\n", rowreq_ctx->data->modEoCCNUWhiteListStartTime));
+ /* convert start time to HH:MM format */
+ start_time_hr = (rowreq_ctx->data->modEoCCNUWhiteListStartTime / (60 * 100)) / 60;
+ start_time_min = (rowreq_ctx->data->modEoCCNUWhiteListStartTime / (60 * 100)) % 60;
+
+ /* copy start time to white list entry */
+ sprintf(wl_entry.start_time, "%02d:%02d", start_time_hr, start_time_min);
+
+ }
+
+ if (rowreq_ctx->column_set_flags & COLUMN_MODEOCCNUWHITELISTENDTIME_FLAG){
+ DEBUGMSGTL(("modEoCCNUWhiteListTable_commit", "end time read from rowreq context: %ld\n", rowreq_ctx->data->modEoCCNUWhiteListEndTime));
+ /* convert end time to HH:MM format */
+ end_time_hr = (rowreq_ctx->data->modEoCCNUWhiteListEndTime / (60 * 100)) / 60;
+ end_time_min = (rowreq_ctx->data->modEoCCNUWhiteListEndTime / (60 * 100)) % 60;
+
+ /* copy end time to white list entry */
+ sprintf(wl_entry.end_time, "%02d:%02d", end_time_hr, end_time_min);
+ }
+
+ /* check configuration file before attempting synchronization of white list */
+ if (LIBSPID_SUCCESS != libspid_eoc_wl_check ()){
+ snmp_log(LOG_ERR, "errors detected in white list configuration file, cannot sync\n");
+ return MFD_ERROR;
+ }
+
+ if (LIBSPID_SUCCESS != libspid_eoc_port_check ()){
+ snmp_log(LOG_ERR, "errors detected in port configuration file, cannot sync\n");
+ return MFD_ERROR;
+ }
+
+ /* write modified line to white list file */
+ ret = libspid_eoc_wl_set(key_buffer, &wl_entry);
+ if (LIBSPID_SUCCESS != ret){
+ snmp_log(LOG_ERR, "libspid_eoc_wl_set error\n");
+ return MFD_ERROR;
+ }
+
+ /* propagate white list changes */
+ ret = libspid_eoc_wl_sync();
+
+ if (LIBSPID_SUCCESS != ret){
+ snmp_log(LOG_ERR, "libspid_eoc_wl_sync error\n");
+ return MFD_ERROR;
+ } else {
+ snmp_log(LOG_ERR, "libspid_eoc_wl_sync succeeded\n");
+ }
+
+ }
+}
+
+
+ /*
+ * if we successfully commited this row, set the dirty flag.
+ */
+ if (MFD_SUCCESS == rc) {
+ rowreq_ctx->rowreq_flags |= MFD_ROW_DIRTY;
+ }
+
+ if (save_flags) {
+ snmp_log(LOG_ERR, "unhandled columns (0x%x) in commit\n",
+ save_flags);
+ return MFD_ERROR;
+ }
+
+ return rc;
+} /* modEoCCNUWhiteListTable_commit */
+
+/**
+ * undo commit new values.
+ *
+ * Should you need different behavior depending on which columns were
+ * set, rowreq_ctx->column_set_flags will indicate which writeable columns were
+ * set. The definitions for the COLUMN_*_FLAG bits can be found in
+ * modEoCCNUWhiteListTable_oids.h.
+ * A new row will have the MFD_ROW_CREATED bit set in rowreq_flags.
+ *
+ * @param modEoCCNUWhiteListTable_rowreq_ctx
+ * Pointer to the users context.
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_ERROR : error
+ */
+int
+modEoCCNUWhiteListTable_undo_commit(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx)
+{
+ int rc = MFD_SUCCESS;
+
+ /* declarations for calls to libspid */
+ char key_buffer[LIBSPID_KEY_MAX_LEN];
+ int ret;
+ int i;
+ int tmp;
+ int start_time_hr, start_time_min, end_time_hr, end_time_min;
+
+ libspid_eoc_wl_entry_t wl_entry;
+
+ const char online_delimiters[2] = LIBSPID_ONLINE_INFO_DELIMITER "\0";
+ char online_buffer[LIBSPID_LINE_MAX_LEN] = {0};
+ unsigned int online_elt_number = LIBSPID_ELT_MAX_NB;
+ char *online_elt_buffer[LIBSPID_ELT_MAX_NB] = {0};
+
+ char mac_str_revert[LIBSPID_MAC_STR_LEN];
+
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_undo_commit", "called\n"));
+
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /* initialize white list entry */
+ memset(&wl_entry, 0, sizeof(wl_entry));
+
+
+ /*
+ * TODO:485:M: |-> Undo modEoCCNUWhiteListTable commit.
+ * check the column's flag in rowreq_ctx->column_set_flags to see
+ * if it was set during commit, then undo it.
+ *
+ * eg: if (rowreq_ctx->column_set_flags & COLUMN__FLAG) {}
+ */
+ if (rowreq_ctx->column_set_flags & COLUMN_MODEOCCNUWHITELISTROWSTATUS_FLAG) {
+ if (rowreq_ctx->rowreq_flags & MFD_ROW_CREATED) {
+ /* when row is created and not validated, there is nothing to do */
+ if ((rowreq_ctx->undo->modEoCCNUWhiteListRowStatus & ROWSTATUS_NOTINSERVICE)){
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_undo_commit", "removing unvalidated row!\n"));
+ return MFD_SUCCESS;
+ }
+ } else if (ROWSTATUS_DESTROY == rowreq_ctx->data->modEoCCNUWhiteListRowStatus) {
+ /* if a row was deleted, restore it */
+ /* if restoring unvalidated row, there is nothing to do */
+ if ((rowreq_ctx->undo->modEoCCNUWhiteListRowStatus & ROWSTATUS_NOTINSERVICE)){
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_undo_commit", "restoring unvalidated row!\n"));
+ return MFD_SUCCESS;
+ }
+
+ DEBUGMSGTL(("modEoCCNUWhiteListTable_undo_commit", "MAC address to undo data for: %x %x %x %x %x %x \n",
+ rowreq_ctx->undo->modEoCCNUWhiteListMACAddress[0], rowreq_ctx->undo->modEoCCNUWhiteListMACAddress[1],
+ rowreq_ctx->undo->modEoCCNUWhiteListMACAddress[2], rowreq_ctx->undo->modEoCCNUWhiteListMACAddress[3],
+ rowreq_ctx->undo->modEoCCNUWhiteListMACAddress[4], rowreq_ctx->undo->modEoCCNUWhiteListMACAddress[5]));
+ /* convert MAC address from bin to string to serve as key for restoring line */
+ ret = libspid_mac_bin_to_str(rowreq_ctx->undo->modEoCCNUWhiteListMACAddress, key_buffer);
+ if (LIBSPID_SUCCESS != ret){
+ snmp_log(LOG_ERR, "libspid_mac_bin_to_str error\n");
+ return MFD_ERROR;
+ }
+
+ /* add MAC address of new row to internal storage list */
+ tmp = se_find_free_value_in_slist("mod_eoc_white_list");
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_undo_commit", "se_find_value_in_slist found free value: %d\n", tmp));
+ if (tmp == SE_DNE)
+ tmp = 1; /* Completely new list! */
+ se_add_pair_to_slist("mod_eoc_white_list", strdup(key_buffer), tmp);
+
+
+ /* set ip address default 0.0.0.0 s to white list entry */
+ strcpy (wl_entry.ip_address, LIBSPID_EOC_WL_IP_DEFAULT);
+
+ /* copy TEI to white list entry */
+ sprintf(wl_entry.tei, "%ld", rowreq_ctx->undo->modEoCCNUWhiteListTEI);
+
+ /* copy authorization to white list entry */
+ sprintf(wl_entry.auth, "%ld", rowreq_ctx->undo->modEoCCNUWhiteListAuthorization);
+
+ /* copy output level to white list entry */
+ sprintf(wl_entry.output_level, "%ld", rowreq_ctx->undo->modEoCCNUWhiteListRFOutputLevel);
+
+ /* convert start time to HH:MM format */
+ start_time_hr = (rowreq_ctx->undo->modEoCCNUWhiteListStartTime / (60 * 100)) / 60;
+ start_time_min = (rowreq_ctx->undo->modEoCCNUWhiteListStartTime / (60 * 100)) % 60;
+
+ /* copy start time to white list entry */
+ sprintf(wl_entry.start_time, "%02d:%02d", start_time_hr, start_time_min);
+
+ /* convert end time to HH:MM format */
+ end_time_hr = (rowreq_ctx->undo->modEoCCNUWhiteListEndTime / (60 * 100)) / 60;
+ end_time_min = (rowreq_ctx->undo->modEoCCNUWhiteListEndTime / (60 * 100)) % 60;
+
+ /* copy end time to white list entry */
+ sprintf(wl_entry.end_time, "%02d:%02d", end_time_hr, end_time_min);
+
+#ifdef USING_SPC300_EOC_MIB_MODULE
+ /* copy DPW to white list entry */
+ strncpy(wl_entry.dpw, rowreq_ctx->undo->spc300EoCSlaveWhiteListDevicePassword, rowreq_ctx->undo->spc300EoCSlaveWhiteListDevicePassword_len);
+#endif /* USING_SPC300_EOC_MIB_MODULE */
+
+ /* clear flag for deletion */
+ rowreq_ctx->rowreq_flags &= ~MFD_ROW_DELETED;
+
+ /* check configuration files before attempting synchronization of white list and ports */
+ if (LIBSPID_SUCCESS != libspid_eoc_wl_check ()){
+ snmp_log(LOG_ERR, "errors detected in whitelist configuration file, cannot sync\n");
+ return MFD_ERROR;
+ }
+
+ if (LIBSPID_SUCCESS != libspid_eoc_port_check ()){
+ snmp_log(LOG_ERR, "errors detected in port configuration file, cannot sync\n");
+ return MFD_ERROR;
+ }
+
+ /* write completed line to white list file */
+ ret = libspid_eoc_wl_set(key_buffer, &wl_entry);
+ if (LIBSPID_SUCCESS != ret){
+ snmp_log(LOG_ERR, "libspid_eoc_wl_set error\n");
+ return MFD_ERROR;
+ }
+
+ /* propagate white list changes */
+ ret = libspid_eoc_wl_sync();
+ if (LIBSPID_SUCCESS != ret){
+ snmp_log(LOG_ERR, "libspid_eoc_wl_sync error\n");
+ return MFD_ERROR;
+ }
+
+ /* propagate associated port changes */
+ ret = libspid_eoc_port_sync();
+ if (LIBSPID_SUCCESS != ret){
+ snmp_log(LOG_ERR, "libspid_eoc_port_sync error\n");
+ return MFD_ERROR;
+ } else {
+ snmp_log(LOG_ERR, "libspid_eoc_port_sync succeeded\n");
+ }
+
+ /* obtain online status of restored station */
+ /* read line indexed by MAC address from online information file */
+ if (LIBSPID_SUCCESS == libspid_config_read_line(LIBSPID_ONLINE_INFO_PATH, online_delimiters, wl_entry.mac_addr,
+ &online_elt_number, online_elt_buffer, online_buffer, LIBSPID_LINE_MAX_LEN)){
+ rowreq_ctx->data->modEoCCNUWhiteListRegisterOnlineState = MODEOCCNUWHITELISTREGISTERONLINESTATE_ONLINE;
+ } else {
+ rowreq_ctx->data->modEoCCNUWhiteListRegisterOnlineState = MODEOCCNUWHITELISTREGISTERONLINESTATE_OFFLINE;
+ }
+
+
+ } else if (ROWSTATUS_ACTIVE == rowreq_ctx->data->modEoCCNUWhiteListRowStatus){
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_undo_commit", "removing newly validated row!\n"));
+ /* if a row was validated (its status set to active) revert its status to notInService */
+ rowreq_ctx->data->modEoCCNUWhiteListRowStatus = rowreq_ctx->undo->modEoCCNUWhiteListRowStatus;
+ /* also remove row data from internal storage list and config file */
+ /* convert MAC address from bin to string to serve as key for removing line */
+ ret = libspid_mac_bin_to_str(rowreq_ctx->data->modEoCCNUWhiteListMACAddress, key_buffer);
+ if (LIBSPID_SUCCESS != ret){
+ snmp_log(LOG_ERR, "libspid_mac_bin_to_str error\n");
+ return MFD_ERROR;
+ }
+
+ /* remove MAC address from internal storage list */
+ if (NULL != se_find_slist("mod_eoc_white_list")){
+ DEBUGMSGTL(("modEoCCNUWhiteListTable_undo_commit:", "trying to remove MAC address from slist: %s\n", key_buffer));
+ ret = se_remove_label_from_slist("mod_eoc_white_list", key_buffer);
+ if (ret == SE_DNE){
+ snmp_log(LOG_ERR, "Error! MAC address not found in the table!\n");
+ return MFD_ERROR;
+ }
+ } else {
+ snmp_log(LOG_ERR, "Trying to delete from empty MAC address list!\n");
+ return MFD_ERROR;
+ }
+
+
+ /* check configuration files before attempting synchronization of white list and ports */
+ if (LIBSPID_SUCCESS != libspid_eoc_wl_check ()){
+ snmp_log(LOG_ERR, "errors detected in whitelist configuration file, cannot sync\n");
+ return MFD_ERROR;
+ }
+
+ if (LIBSPID_SUCCESS != libspid_eoc_port_check ()){
+ snmp_log(LOG_ERR, "errors detected in port configuration file, cannot sync\n");
+ return MFD_ERROR;
+ }
+
+ /* if a new row was added, remove line indexed by MAC address from white list configuration file */
+ if (1 == adding_row){
+ if (LIBSPID_SUCCESS != libspid_eoc_wl_remove(key_buffer))
+ {
+ snmp_log(LOG_ERR, "libspid_eoc_wl_remove error\n");
+ return MFD_ERROR;
+ }
+
+
+ /* propagate white list changes */
+ ret = libspid_eoc_wl_sync();
+ if (LIBSPID_SUCCESS != ret){
+ snmp_log(LOG_ERR, "libspid_eoc_wl_sync error\n");
+ return MFD_ERROR;
+ }
+
+ /* propagate associated port changes */
+ ret = libspid_eoc_port_sync();
+ if (LIBSPID_SUCCESS != ret){
+ snmp_log(LOG_ERR, "libspid_eoc_port_sync error\n");
+ return MFD_ERROR;
+ } else {
+ snmp_log(LOG_ERR, "libspid_eoc_port_sync succeeded\n");
+ }
+
+ /* if undo has successfully passed, clear row adding indication */
+ adding_row = 0;
+ }
+ }
+} else {
+ /* this case covers restoring modified columns (without row status modified) */
+ if ( !(rowreq_ctx->rowreq_flags & MFD_ROW_CREATED) && (ROWSTATUS_ACTIVE == rowreq_ctx->undo->modEoCCNUWhiteListRowStatus)){
+ DEBUGMSGTL(("modEoCCNUWhiteListTable_undo_commit", "undoing data for MAC address: %x %x %x %x %x %x \n",
+ rowreq_ctx->undo->modEoCCNUWhiteListMACAddress[0], rowreq_ctx->undo->modEoCCNUWhiteListMACAddress[1],
+ rowreq_ctx->undo->modEoCCNUWhiteListMACAddress[2], rowreq_ctx->undo->modEoCCNUWhiteListMACAddress[3],
+ rowreq_ctx->undo->modEoCCNUWhiteListMACAddress[4], rowreq_ctx->undo->modEoCCNUWhiteListMACAddress[5]));
+ /* convert MAC address to be undone from bin to string */
+ ret = libspid_mac_bin_to_str(rowreq_ctx->undo->modEoCCNUWhiteListMACAddress, key_buffer);
+ if (LIBSPID_SUCCESS != ret){
+ snmp_log(LOG_ERR, "libspid_mac_bin_to_str error\n");
+ return MFD_ERROR;
+ }
+
+ if (rowreq_ctx->column_set_flags & COLUMN_MODEOCCNUWHITELISTMACADDRESS_FLAG){
+ DEBUGMSGTL(("modEoCCNUWhiteListTable_commit", "MAC address to be reverted: %x %x %x %x %x %x \n",
+ rowreq_ctx->data->modEoCCNUWhiteListMACAddress[0], rowreq_ctx->data->modEoCCNUWhiteListMACAddress[1],
+ rowreq_ctx->data->modEoCCNUWhiteListMACAddress[2], rowreq_ctx->data->modEoCCNUWhiteListMACAddress[3],
+ rowreq_ctx->data->modEoCCNUWhiteListMACAddress[4], rowreq_ctx->data->modEoCCNUWhiteListMACAddress[5]));
+ /* convert MAC address to be reverted from bin to string */
+ ret = libspid_mac_bin_to_str(rowreq_ctx->undo->modEoCCNUWhiteListMACAddress, mac_str_revert);
+ if (LIBSPID_SUCCESS != ret){
+ snmp_log(LOG_ERR, "libspid_mac_bin_to_str error\n");
+ return MFD_ERROR;
+ }
+ /* change MAC address in configuration file */
+ ret = libspid_eoc_wl_mac_change (mac_str_revert, key_buffer);
+ if (LIBSPID_SUCCESS != ret){
+ snmp_log(LOG_ERR, "libspid_eoc_wl_mac_change error\n");
+ return MFD_ERROR;
+ }
+
+ /* remove reverted MAC address from internal storage list */
+ if (NULL != se_find_slist("mod_eoc_white_list")){
+ DEBUGMSGTL(("modEoCCNUWhiteListTable_commit:", "trying to remove MAC address from slist: %s\n", mac_str_revert));
+ ret = se_remove_label_from_slist("mod_eoc_white_list", mac_str_revert);
+ if (ret == SE_DNE){
+ snmp_log(LOG_ERR, "Error! MAC address not found in internal storage list!\n");
+ return MFD_ERROR;
+ }
+ } else {
+ snmp_log(LOG_ERR, "Trying to delete from empty MAC address internal storage list!\n");
+ return MFD_ERROR;
+ }
+
+ /* add undone MAC address to internal storage list */
+ tmp = se_find_free_value_in_slist("mod_eoc_white_list");
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_commit", "se_find_value_in_slist found free value: %d\n", tmp));
+ if (tmp == SE_DNE)
+ tmp = 1; /* Completely new list! */
+ se_add_pair_to_slist("mod_eoc_white_list", strdup(key_buffer), tmp);
+
+ }
+
+ /* get existing line contents from white list file */
+ ret = libspid_eoc_wl_get(key_buffer, &wl_entry);
+ if (LIBSPID_SUCCESS != ret){
+ snmp_log(LOG_ERR, "libspid_eoc_wl_get error\n");
+ return MFD_ERROR;
+ }
+
+ /* set ip address default 0.0.0.0 s to white list entry */
+ strcpy (wl_entry.ip_address, LIBSPID_EOC_WL_IP_DEFAULT);
+
+ if (rowreq_ctx->column_set_flags & COLUMN_MODEOCCNUWHITELISTAUTHORIZATION_FLAG){
+ DEBUGMSGTL(("modEoCCNUWhiteListTable_undo_commit", "authorization to be restored: %ld\n", rowreq_ctx->undo->modEoCCNUWhiteListAuthorization));
+ /* copy authorization to white list entry */
+ sprintf(wl_entry.auth, "%ld", rowreq_ctx->undo->modEoCCNUWhiteListAuthorization);
+ }
+
+ if (rowreq_ctx->column_set_flags & COLUMN_MODEOCCNUWHITELISTRFOUTPUTLEVEL_FLAG){
+ DEBUGMSGTL(("modEoCCNUWhiteListTable_undo_commit", "RF output level to be restored: %ld\n", rowreq_ctx->undo->modEoCCNUWhiteListRFOutputLevel));
+ /* copy output level to white list entry */
+ sprintf(wl_entry.output_level, "%ld", rowreq_ctx->undo->modEoCCNUWhiteListRFOutputLevel);
+ }
+
+ if (rowreq_ctx->column_set_flags & COLUMN_MODEOCCNUWHITELISTSTARTTIME_FLAG){
+ DEBUGMSGTL(("modEoCCNUWhiteListTable_undo_commit", "start time to be restored: %ld\n", rowreq_ctx->undo->modEoCCNUWhiteListStartTime));
+ /* convert start time to HH:MM format */
+ start_time_hr = (rowreq_ctx->undo->modEoCCNUWhiteListStartTime / (60 * 100)) / 60;
+ start_time_min = (rowreq_ctx->undo->modEoCCNUWhiteListStartTime / (60 * 100)) % 60;
+
+ /* copy start time to white list entry */
+ sprintf(wl_entry.start_time, "%02d:%02d", start_time_hr, start_time_min);
+ }
+
+ if (rowreq_ctx->column_set_flags & COLUMN_MODEOCCNUWHITELISTENDTIME_FLAG){
+ DEBUGMSGTL(("modEoCCNUWhiteListTable_undo_commit", "end time to be restored: %ld\n", rowreq_ctx->undo->modEoCCNUWhiteListEndTime));
+ /* convert end time to HH:MM format */
+ end_time_hr = (rowreq_ctx->undo->modEoCCNUWhiteListEndTime / (60 * 100)) / 60;
+ end_time_min = (rowreq_ctx->undo->modEoCCNUWhiteListEndTime / (60 * 100)) % 60;
+
+ /* copy end time to elt_buffer[4] */
+ sprintf(wl_entry.end_time, "%02d:%02d", end_time_hr, end_time_min);
+ }
+
+ /* check configuration file before attempting synchronization of white list */
+ if (LIBSPID_SUCCESS != libspid_eoc_wl_check ()){
+ snmp_log(LOG_ERR, "errors detected in white list configuration file, cannot sync\n");
+ return MFD_ERROR;
+ }
+
+ if (LIBSPID_SUCCESS != libspid_eoc_port_check ()){
+ snmp_log(LOG_ERR, "errors detected in port configuration file, cannot sync\n");
+ return MFD_ERROR;
+ }
+
+ /* write modified line to white list file */
+ ret = libspid_eoc_wl_set(key_buffer, &wl_entry);
+ if (LIBSPID_SUCCESS != ret){
+ snmp_log(LOG_ERR, "libspid_eoc_wl_set error\n");
+ return MFD_ERROR;
+ }
+
+ /* propagate white list changes */
+ ret = libspid_eoc_wl_sync();
+ if (LIBSPID_SUCCESS != ret){
+ snmp_log(LOG_ERR, "libspid_eoc_wl_sync error\n");
+ return MFD_ERROR;
+ }
+ }
+}
+
+
+ /*
+ * if we successfully un-commited this row, clear the dirty flag.
+ */
+ if (MFD_SUCCESS == rc) {
+ rowreq_ctx->rowreq_flags &= ~MFD_ROW_DIRTY;
+ }
+
+ return rc;
+} /* modEoCCNUWhiteListTable_undo_commit */
+
+/*
+ * TODO:440:M: Implement modEoCCNUWhiteListTable node value checks.
+ * TODO:450:M: Implement modEoCCNUWhiteListTable undo functions.
+ * TODO:460:M: Implement modEoCCNUWhiteListTable set functions.
+ * TODO:480:M: Implement modEoCCNUWhiteListTable commit functions.
+ */
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-MOD-EOC-MIB::modEoCCNUWhiteListEntry.modEoCCNUWhiteListMACAddress
+ * modEoCCNUWhiteListMACAddress is subid 2 of modEoCCNUWhiteListEntry.
+ * Its status is Current, and its access level is ReadWrite.
+ * OID: .1.3.6.1.4.1.22764.3.1.5.1.6.1.2
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 1 hashint 1
+ * settable 1
+ * hint: 1x:
+ *
+ * Ranges: 6;
+ *
+ * Its syntax is MacAddress (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 6)
+ */
+/**
+ * Check that the proposed new value is potentially valid.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param modEoCCNUWhiteListMACAddress_val_ptr
+ * A char containing the new value.
+ * @param modEoCCNUWhiteListMACAddress_val_ptr_len
+ * The size (in bytes) of the data pointed to by modEoCCNUWhiteListMACAddress_val_ptr
+ *
+ * @retval MFD_SUCCESS : incoming value is legal
+ * @retval MFD_NOT_VALID_NOW : incoming value is not valid now
+ * @retval MFD_NOT_VALID_EVER : incoming value is never valid
+ *
+ * This is the place to check for requirements that are not
+ * expressed in the mib syntax (for example, a requirement that
+ * is detailed in the description for an object).
+ *
+ * You should check that the requested change between the undo value and the
+ * new value is legal (ie, the transistion from one value to another
+ * is legal).
+ *
+ *@note
+ * This check is only to determine if the new value
+ * is \b potentially valid. This is the first check of many, and
+ * is one of the simplest ones.
+ *
+ *@note
+ * this is not the place to do any checks for values
+ * which depend on some other value in the mib. Those
+ * types of checks should be done in the
+ * modEoCCNUWhiteListTable_check_dependencies() function.
+ *
+ * The following checks have already been done for you:
+ * The syntax is ASN_OCTET_STR
+ * The length is < sizeof(rowreq_ctx->data->modEoCCNUWhiteListMACAddress).
+ * The length is in (one of) the range set(s): 6
+ *
+ * If there a no other checks you need to do, simply return MFD_SUCCESS.
+ *
+ */
+int
+modEoCCNUWhiteListMACAddress_check_value(modEoCCNUWhiteListTable_rowreq_ctx
+ * rowreq_ctx,
+ char
+ *modEoCCNUWhiteListMACAddress_val_ptr,
+ size_t
+ modEoCCNUWhiteListMACAddress_val_ptr_len)
+{
+
+ int tmp;
+ int ret;
+
+ char mac_str[LIBSPID_MAC_STR_LEN];
+
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListMACAddress_check_value", "called\n"));
+
+ /** should never get a NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+ netsnmp_assert(NULL != modEoCCNUWhiteListMACAddress_val_ptr);
+
+ DEBUGMSGTL(("modEoCCNUWhiteListTable:modEoCCNUWhiteListMACAddress_check_value", "MAC address proposed value : %x %x %x %x %x %x \n",
+ modEoCCNUWhiteListMACAddress_val_ptr[0], modEoCCNUWhiteListMACAddress_val_ptr[1], modEoCCNUWhiteListMACAddress_val_ptr[2],
+ modEoCCNUWhiteListMACAddress_val_ptr[3], modEoCCNUWhiteListMACAddress_val_ptr[4], modEoCCNUWhiteListMACAddress_val_ptr[5]));
+ /*
+ * TODO:441:o: |-> Check for valid modEoCCNUWhiteListMACAddress value.
+ */
+ ret = libspid_mac_bin_to_str(modEoCCNUWhiteListMACAddress_val_ptr, mac_str);
+ if (LIBSPID_SUCCESS != ret){
+ snmp_log(LOG_ERR, "modEoCCNUWhiteListTable:modEoCCNUWhiteListMACAddress_check_value", "error converting MAC address proposed value to string\n");
+ return MFD_ERROR;
+ }
+
+ /* check if proposed MAC address already exists in internal storage list */
+ /* MAC address will be added to storage list when the row is validated (and conf file is updated) */
+ tmp = se_find_value_in_slist("mod_eoc_white_list", mac_str);
+ if (tmp != SE_DNE) {
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListMACAddress_check_value", "MAC address already exists!\n"));
+ return MFD_NOT_VALID_EVER;
+ }
+
+
+
+ return MFD_SUCCESS; /* modEoCCNUWhiteListMACAddress value not illegal */
+} /* modEoCCNUWhiteListMACAddress_check_value */
+
+/**
+ * Save old value information
+ *
+ * @param rowreq_ctx
+ * Pointer to the table context (modEoCCNUWhiteListTable_rowreq_ctx)
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_ERROR : error. set will fail.
+ *
+ * This function will be called after the table level undo setup function
+ * modEoCCNUWhiteListTable_undo_setup has been called.
+ *
+ *@note
+ * this function will only be called if a new value is set for this column.
+ *
+ * If there is any setup specific to a particular column (e.g. allocating
+ * memory for a string), you should do that setup in this function, so it
+ * won't be done unless it is necessary.
+ */
+int
+modEoCCNUWhiteListMACAddress_undo_setup(modEoCCNUWhiteListTable_rowreq_ctx
+ * rowreq_ctx)
+{
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListMACAddress_undo_setup", "called\n"));
+
+ /** should never get a NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:455:o: |-> Setup modEoCCNUWhiteListMACAddress undo.
+ */
+ /*
+ * copy modEoCCNUWhiteListMACAddress and modEoCCNUWhiteListMACAddress_len data
+ * set rowreq_ctx->undo->modEoCCNUWhiteListMACAddress from rowreq_ctx->data->modEoCCNUWhiteListMACAddress
+ */
+
+ /* all fields are copied in main _undo_setup */
+
+ return MFD_SUCCESS;
+} /* modEoCCNUWhiteListMACAddress_undo_setup */
+
+/**
+ * Set the new value.
+ *
+ * @param rowreq_ctx
+ * Pointer to the users context. You should know how to
+ * manipulate the value from this object.
+ * @param modEoCCNUWhiteListMACAddress_val_ptr
+ * A char containing the new value.
+ * @param modEoCCNUWhiteListMACAddress_val_ptr_len
+ * The size (in bytes) of the data pointed to by modEoCCNUWhiteListMACAddress_val_ptr
+ */
+int
+modEoCCNUWhiteListMACAddress_set(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx,
+ char
+ *modEoCCNUWhiteListMACAddress_val_ptr,
+ size_t
+ modEoCCNUWhiteListMACAddress_val_ptr_len)
+{
+
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListMACAddress_set", "called\n"));
+
+ /** should never get a NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+ netsnmp_assert(NULL != modEoCCNUWhiteListMACAddress_val_ptr);
+
+ /*
+ * TODO:461:M: |-> Set modEoCCNUWhiteListMACAddress value.
+ * set modEoCCNUWhiteListMACAddress value in rowreq_ctx->data
+ */
+ memcpy(rowreq_ctx->data->modEoCCNUWhiteListMACAddress,
+ modEoCCNUWhiteListMACAddress_val_ptr,
+ modEoCCNUWhiteListMACAddress_val_ptr_len);
+ /** convert bytes to number of char */
+ rowreq_ctx->data->modEoCCNUWhiteListMACAddress_len =
+ modEoCCNUWhiteListMACAddress_val_ptr_len /
+ sizeof(modEoCCNUWhiteListMACAddress_val_ptr[0]);
+
+ rowreq_ctx->column_exists_flags |= COLUMN_MODEOCCNUWHITELISTMACADDRESS_FLAG;
+
+ return MFD_SUCCESS;
+} /* modEoCCNUWhiteListMACAddress_set */
+
+/**
+ * undo the previous set.
+ *
+ * @param rowreq_ctx
+ * Pointer to the users context.
+ */
+int
+modEoCCNUWhiteListMACAddress_undo(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx)
+{
+
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListMACAddress_undo", "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:456:o: |-> Clean up modEoCCNUWhiteListMACAddress undo.
+ */
+ /*
+ * copy modEoCCNUWhiteListMACAddress and modEoCCNUWhiteListMACAddress_len data
+ * set rowreq_ctx->data->modEoCCNUWhiteListMACAddress from rowreq_ctx->undo->modEoCCNUWhiteListMACAddress
+ */
+ memcpy(rowreq_ctx->data->modEoCCNUWhiteListMACAddress,
+ rowreq_ctx->undo->modEoCCNUWhiteListMACAddress,
+ (rowreq_ctx->undo->modEoCCNUWhiteListMACAddress_len *
+ sizeof(rowreq_ctx->data->modEoCCNUWhiteListMACAddress[0])));
+ rowreq_ctx->data->modEoCCNUWhiteListMACAddress_len =
+ rowreq_ctx->undo->modEoCCNUWhiteListMACAddress_len;
+
+
+ return MFD_SUCCESS;
+} /* modEoCCNUWhiteListMACAddress_undo */
+
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-MOD-EOC-MIB::modEoCCNUWhiteListEntry.modEoCCNUWhiteListAuthorization
+ * modEoCCNUWhiteListAuthorization is subid 3 of modEoCCNUWhiteListEntry.
+ * Its status is Current, and its access level is ReadWrite.
+ * OID: .1.3.6.1.4.1.22764.3.1.5.1.6.1.3
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 1 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 1
+ *
+ * Enum range: 2/8. Values: not_authorized(0), authorized(1)
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (u_long)
+ */
+/**
+ * Check that the proposed new value is potentially valid.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param modEoCCNUWhiteListAuthorization_val
+ * A long containing the new value.
+ *
+ * @retval MFD_SUCCESS : incoming value is legal
+ * @retval MFD_NOT_VALID_NOW : incoming value is not valid now
+ * @retval MFD_NOT_VALID_EVER : incoming value is never valid
+ *
+ * This is the place to check for requirements that are not
+ * expressed in the mib syntax (for example, a requirement that
+ * is detailed in the description for an object).
+ *
+ * You should check that the requested change between the undo value and the
+ * new value is legal (ie, the transistion from one value to another
+ * is legal).
+ *
+ *@note
+ * This check is only to determine if the new value
+ * is \b potentially valid. This is the first check of many, and
+ * is one of the simplest ones.
+ *
+ *@note
+ * this is not the place to do any checks for values
+ * which depend on some other value in the mib. Those
+ * types of checks should be done in the
+ * modEoCCNUWhiteListTable_check_dependencies() function.
+ *
+ * The following checks have already been done for you:
+ * The syntax is ASN_INTEGER
+ * The value is one of not_authorized(0), authorized(1)
+ *
+ * If there a no other checks you need to do, simply return MFD_SUCCESS.
+ *
+ */
+int
+modEoCCNUWhiteListAuthorization_check_value
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx,
+ u_long modEoCCNUWhiteListAuthorization_val)
+{
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListAuthorization_check_value", "called\n"));
+
+ /** should never get a NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:441:o: |-> Check for valid modEoCCNUWhiteListAuthorization value.
+ */
+
+ return MFD_SUCCESS; /* modEoCCNUWhiteListAuthorization value not illegal */
+} /* modEoCCNUWhiteListAuthorization_check_value */
+
+/**
+ * Save old value information
+ *
+ * @param rowreq_ctx
+ * Pointer to the table context (modEoCCNUWhiteListTable_rowreq_ctx)
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_ERROR : error. set will fail.
+ *
+ * This function will be called after the table level undo setup function
+ * modEoCCNUWhiteListTable_undo_setup has been called.
+ *
+ *@note
+ * this function will only be called if a new value is set for this column.
+ *
+ * If there is any setup specific to a particular column (e.g. allocating
+ * memory for a string), you should do that setup in this function, so it
+ * won't be done unless it is necessary.
+ */
+int
+modEoCCNUWhiteListAuthorization_undo_setup
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx)
+{
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListAuthorization_undo_setup", "called\n"));
+
+ /** should never get a NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:455:o: |-> Setup modEoCCNUWhiteListAuthorization undo.
+ */
+ /*
+ * copy modEoCCNUWhiteListAuthorization data
+ * set rowreq_ctx->undo->modEoCCNUWhiteListAuthorization from rowreq_ctx->data->modEoCCNUWhiteListAuthorization
+ */
+ /* TEMP: all fields copied in main _undo_setup */
+/* rowreq_ctx->undo->modEoCCNUWhiteListAuthorization = */
+/* rowreq_ctx->data->modEoCCNUWhiteListAuthorization; */
+
+
+ return MFD_SUCCESS;
+} /* modEoCCNUWhiteListAuthorization_undo_setup */
+
+/**
+ * Set the new value.
+ *
+ * @param rowreq_ctx
+ * Pointer to the users context. You should know how to
+ * manipulate the value from this object.
+ * @param modEoCCNUWhiteListAuthorization_val
+ * A long containing the new value.
+ */
+int
+modEoCCNUWhiteListAuthorization_set(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long
+ modEoCCNUWhiteListAuthorization_val)
+{
+
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListAuthorization_set", "called\n"));
+
+ /** should never get a NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:461:M: |-> Set modEoCCNUWhiteListAuthorization value.
+ * set modEoCCNUWhiteListAuthorization value in rowreq_ctx->data
+ */
+ rowreq_ctx->data->modEoCCNUWhiteListAuthorization =
+ modEoCCNUWhiteListAuthorization_val;
+
+ rowreq_ctx->column_exists_flags |= COLUMN_MODEOCCNUWHITELISTAUTHORIZATION_FLAG;
+
+ return MFD_SUCCESS;
+} /* modEoCCNUWhiteListAuthorization_set */
+
+/**
+ * undo the previous set.
+ *
+ * @param rowreq_ctx
+ * Pointer to the users context.
+ */
+int
+modEoCCNUWhiteListAuthorization_undo(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx)
+{
+
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListAuthorization_undo", "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:456:o: |-> Clean up modEoCCNUWhiteListAuthorization undo.
+ */
+ /*
+ * copy modEoCCNUWhiteListAuthorization data
+ * set rowreq_ctx->data->modEoCCNUWhiteListAuthorization from rowreq_ctx->undo->modEoCCNUWhiteListAuthorization
+ */
+ rowreq_ctx->data->modEoCCNUWhiteListAuthorization =
+ rowreq_ctx->undo->modEoCCNUWhiteListAuthorization;
+
+
+ return MFD_SUCCESS;
+} /* modEoCCNUWhiteListAuthorization_undo */
+
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-MOD-EOC-MIB::modEoCCNUWhiteListEntry.modEoCCNUWhiteListRFOutputLevel
+ * modEoCCNUWhiteListRFOutputLevel is subid 4 of modEoCCNUWhiteListEntry.
+ * Its status is Current, and its access level is ReadWrite.
+ * OID: .1.3.6.1.4.1.22764.3.1.5.1.6.1.4
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 1
+ *
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ */
+/**
+ * Check that the proposed new value is potentially valid.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param modEoCCNUWhiteListRFOutputLevel_val
+ * A long containing the new value.
+ *
+ * @retval MFD_SUCCESS : incoming value is legal
+ * @retval MFD_NOT_VALID_NOW : incoming value is not valid now
+ * @retval MFD_NOT_VALID_EVER : incoming value is never valid
+ *
+ * This is the place to check for requirements that are not
+ * expressed in the mib syntax (for example, a requirement that
+ * is detailed in the description for an object).
+ *
+ * You should check that the requested change between the undo value and the
+ * new value is legal (ie, the transistion from one value to another
+ * is legal).
+ *
+ *@note
+ * This check is only to determine if the new value
+ * is \b potentially valid. This is the first check of many, and
+ * is one of the simplest ones.
+ *
+ *@note
+ * this is not the place to do any checks for values
+ * which depend on some other value in the mib. Those
+ * types of checks should be done in the
+ * modEoCCNUWhiteListTable_check_dependencies() function.
+ *
+ * The following checks have already been done for you:
+ * The syntax is ASN_INTEGER
+ *
+ * If there a no other checks you need to do, simply return MFD_SUCCESS.
+ *
+ */
+int
+modEoCCNUWhiteListRFOutputLevel_check_value
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx,
+ long modEoCCNUWhiteListRFOutputLevel_val)
+{
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListRFOutputLevel_check_value", "called\n"));
+
+ /** should never get a NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:441:o: |-> Check for valid modEoCCNUWhiteListRFOutputLevel value.
+ */
+
+ /* allow setting output level to 0 as a special case */
+ if ( 0 == modEoCCNUWhiteListRFOutputLevel_val){
+ return MFD_SUCCESS;
+ }
+ /* for non-zero values, check that proposed output level value is between allowed min and max value */
+ if ((modEoCCNUWhiteListRFOutputLevel_val < LIBSPID_EOC_WL_RF_OUTPUT_LEVEL_MIN)
+ || (modEoCCNUWhiteListRFOutputLevel_val > LIBSPID_EOC_WL_RF_OUTPUT_LEVEL_MAX))
+ {
+ return SNMP_ERR_WRONGVALUE;
+ }
+
+ return MFD_SUCCESS; /* modEoCCNUWhiteListRFOutputLevel value not illegal */
+} /* modEoCCNUWhiteListRFOutputLevel_check_value */
+
+/**
+ * Save old value information
+ *
+ * @param rowreq_ctx
+ * Pointer to the table context (modEoCCNUWhiteListTable_rowreq_ctx)
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_ERROR : error. set will fail.
+ *
+ * This function will be called after the table level undo setup function
+ * modEoCCNUWhiteListTable_undo_setup has been called.
+ *
+ *@note
+ * this function will only be called if a new value is set for this column.
+ *
+ * If there is any setup specific to a particular column (e.g. allocating
+ * memory for a string), you should do that setup in this function, so it
+ * won't be done unless it is necessary.
+ */
+int
+modEoCCNUWhiteListRFOutputLevel_undo_setup
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx)
+{
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListRFOutputLevel_undo_setup", "called\n"));
+
+ /** should never get a NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:455:o: |-> Setup modEoCCNUWhiteListRFOutputLevel undo.
+ */
+ /*
+ * copy modEoCCNUWhiteListRFOutputLevel data
+ * set rowreq_ctx->undo->modEoCCNUWhiteListRFOutputLevel from rowreq_ctx->data->modEoCCNUWhiteListRFOutputLevel
+ */
+
+ /* all fields are copied in main _undo_setup */
+
+ return MFD_SUCCESS;
+} /* modEoCCNUWhiteListRFOutputLevel_undo_setup */
+
+/**
+ * Set the new value.
+ *
+ * @param rowreq_ctx
+ * Pointer to the users context. You should know how to
+ * manipulate the value from this object.
+ * @param modEoCCNUWhiteListRFOutputLevel_val
+ * A long containing the new value.
+ */
+int
+modEoCCNUWhiteListRFOutputLevel_set(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx,
+ long
+ modEoCCNUWhiteListRFOutputLevel_val)
+{
+
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListRFOutputLevel_set", "called\n"));
+
+ /** should never get a NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:461:M: |-> Set modEoCCNUWhiteListRFOutputLevel value.
+ * set modEoCCNUWhiteListRFOutputLevel value in rowreq_ctx->data
+ */
+ rowreq_ctx->data->modEoCCNUWhiteListRFOutputLevel =
+ modEoCCNUWhiteListRFOutputLevel_val;
+
+ rowreq_ctx->column_exists_flags |= COLUMN_MODEOCCNUWHITELISTRFOUTPUTLEVEL_FLAG;
+
+ return MFD_SUCCESS;
+} /* modEoCCNUWhiteListRFOutputLevel_set */
+
+/**
+ * undo the previous set.
+ *
+ * @param rowreq_ctx
+ * Pointer to the users context.
+ */
+int
+modEoCCNUWhiteListRFOutputLevel_undo(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx)
+{
+
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListRFOutputLevel_undo", "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:456:o: |-> Clean up modEoCCNUWhiteListRFOutputLevel undo.
+ */
+ /*
+ * copy modEoCCNUWhiteListRFOutputLevel data
+ * set rowreq_ctx->data->modEoCCNUWhiteListRFOutputLevel from rowreq_ctx->undo->modEoCCNUWhiteListRFOutputLevel
+ */
+ rowreq_ctx->data->modEoCCNUWhiteListRFOutputLevel =
+ rowreq_ctx->undo->modEoCCNUWhiteListRFOutputLevel;
+
+
+ return MFD_SUCCESS;
+} /* modEoCCNUWhiteListRFOutputLevel_undo */
+
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-MOD-EOC-MIB::modEoCCNUWhiteListEntry.modEoCCNUWhiteListAutoUpgradeEN
+ * modEoCCNUWhiteListAutoUpgradeEN is subid 5 of modEoCCNUWhiteListEntry.
+ * Its status is Current, and its access level is ReadWrite.
+ * OID: .1.3.6.1.4.1.22764.3.1.5.1.6.1.5
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 1 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 1
+ *
+ * Enum range: 2/8. Values: disable(0), enable(1)
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (u_long)
+ */
+/**
+ * Check that the proposed new value is potentially valid.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param modEoCCNUWhiteListAutoUpgradeEN_val
+ * A long containing the new value.
+ *
+ * @retval MFD_SUCCESS : incoming value is legal
+ * @retval MFD_NOT_VALID_NOW : incoming value is not valid now
+ * @retval MFD_NOT_VALID_EVER : incoming value is never valid
+ *
+ * This is the place to check for requirements that are not
+ * expressed in the mib syntax (for example, a requirement that
+ * is detailed in the description for an object).
+ *
+ * You should check that the requested change between the undo value and the
+ * new value is legal (ie, the transistion from one value to another
+ * is legal).
+ *
+ *@note
+ * This check is only to determine if the new value
+ * is \b potentially valid. This is the first check of many, and
+ * is one of the simplest ones.
+ *
+ *@note
+ * this is not the place to do any checks for values
+ * which depend on some other value in the mib. Those
+ * types of checks should be done in the
+ * modEoCCNUWhiteListTable_check_dependencies() function.
+ *
+ * The following checks have already been done for you:
+ * The syntax is ASN_INTEGER
+ * The value is one of disable(0), enable(1)
+ *
+ * If there a no other checks you need to do, simply return MFD_SUCCESS.
+ *
+ */
+int
+modEoCCNUWhiteListAutoUpgradeEN_check_value
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx,
+ u_long modEoCCNUWhiteListAutoUpgradeEN_val)
+{
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListAutoUpgradeEN_check_value", "called\n"));
+
+ /** should never get a NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:441:o: |-> Check for valid modEoCCNUWhiteListAutoUpgradeEN value.
+ */
+
+ return MFD_SUCCESS; /* modEoCCNUWhiteListAutoUpgradeEN value not illegal */
+} /* modEoCCNUWhiteListAutoUpgradeEN_check_value */
+
+/**
+ * Save old value information
+ *
+ * @param rowreq_ctx
+ * Pointer to the table context (modEoCCNUWhiteListTable_rowreq_ctx)
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_ERROR : error. set will fail.
+ *
+ * This function will be called after the table level undo setup function
+ * modEoCCNUWhiteListTable_undo_setup has been called.
+ *
+ *@note
+ * this function will only be called if a new value is set for this column.
+ *
+ * If there is any setup specific to a particular column (e.g. allocating
+ * memory for a string), you should do that setup in this function, so it
+ * won't be done unless it is necessary.
+ */
+int
+modEoCCNUWhiteListAutoUpgradeEN_undo_setup
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx)
+{
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListAutoUpgradeEN_undo_setup", "called\n"));
+
+ /** should never get a NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:455:o: |-> Setup modEoCCNUWhiteListAutoUpgradeEN undo.
+ */
+ /*
+ * copy modEoCCNUWhiteListAutoUpgradeEN data
+ * set rowreq_ctx->undo->modEoCCNUWhiteListAutoUpgradeEN from rowreq_ctx->data->modEoCCNUWhiteListAutoUpgradeEN
+ */
+
+ /* all fields are copied in main _undo_setup */
+
+ return MFD_SUCCESS;
+} /* modEoCCNUWhiteListAutoUpgradeEN_undo_setup */
+
+/**
+ * Set the new value.
+ *
+ * @param rowreq_ctx
+ * Pointer to the users context. You should know how to
+ * manipulate the value from this object.
+ * @param modEoCCNUWhiteListAutoUpgradeEN_val
+ * A long containing the new value.
+ */
+int
+modEoCCNUWhiteListAutoUpgradeEN_set(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long
+ modEoCCNUWhiteListAutoUpgradeEN_val)
+{
+
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListAutoUpgradeEN_set", "called\n"));
+
+ /** should never get a NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:461:M: |-> Set modEoCCNUWhiteListAutoUpgradeEN value.
+ * set modEoCCNUWhiteListAutoUpgradeEN value in rowreq_ctx->data
+ */
+ /* write autoupgrade enable value to system configuration file */
+ switch (modEoCCNUWhiteListAutoUpgradeEN_val) {
+ case MODEOCCNUWHITELISTAUTOUPGRADEEN_DISABLE:
+ if ( LIBSPID_SUCCESS != libspid_config_write_item(LIBSPID_SYSTEM_CONF_PATH, LIBSPID_SYSTEM_CONF_LABEL_AUTOUPDATE, LIBSPID_SYSTEM_CONF_VALUE_NO)){
+ snmp_log(LOG_ERR, "libspid_config_write_item error\n");
+ return MFD_ERROR;
+ }
+ break;
+
+ case MODEOCCNUWHITELISTAUTOUPGRADEEN_ENABLE:
+ if ( LIBSPID_SUCCESS != libspid_config_write_item(LIBSPID_SYSTEM_CONF_PATH, LIBSPID_SYSTEM_CONF_LABEL_AUTOUPDATE, LIBSPID_SYSTEM_CONF_VALUE_YES)){
+ snmp_log(LOG_ERR, "libspid_config_write_item error\n");
+ return MFD_ERROR;
+ }
+ break;
+
+ default:
+ snmp_log(LOG_ERR,
+ "couldn't reverse map value %ld for modEoCCNUWhiteListAutoUpgradeEN",
+ modEoCCNUWhiteListAutoUpgradeEN_val);
+ return MFD_ERROR;
+ }
+
+ rowreq_ctx->data->modEoCCNUWhiteListAutoUpgradeEN =
+ modEoCCNUWhiteListAutoUpgradeEN_val;
+
+ rowreq_ctx->column_exists_flags |= COLUMN_MODEOCCNUWHITELISTAUTOUPGRADEEN_FLAG;
+
+
+ return MFD_SUCCESS;
+} /* modEoCCNUWhiteListAutoUpgradeEN_set */
+
+/**
+ * undo the previous set.
+ *
+ * @param rowreq_ctx
+ * Pointer to the users context.
+ */
+int
+modEoCCNUWhiteListAutoUpgradeEN_undo(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx)
+{
+
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListAutoUpgradeEN_undo", "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:456:o: |-> Clean up modEoCCNUWhiteListAutoUpgradeEN undo.
+ */
+ /*
+ * copy modEoCCNUWhiteListAutoUpgradeEN data
+ * set rowreq_ctx->data->modEoCCNUWhiteListAutoUpgradeEN from rowreq_ctx->undo->modEoCCNUWhiteListAutoUpgradeEN
+ */
+ /* restore autoupgrade enable value in system configuration file */
+ switch (rowreq_ctx->undo->modEoCCNUWhiteListAutoUpgradeEN) {
+ case MODEOCCNUWHITELISTAUTOUPGRADEEN_DISABLE:
+ if ( LIBSPID_SUCCESS != libspid_config_write_item(LIBSPID_SYSTEM_CONF_PATH, LIBSPID_SYSTEM_CONF_LABEL_AUTOUPDATE, LIBSPID_SYSTEM_CONF_VALUE_NO)){
+ snmp_log(LOG_ERR, "libspid_config_write_item error\n");
+ return MFD_ERROR;
+ }
+ break;
+
+ case MODEOCCNUWHITELISTAUTOUPGRADEEN_ENABLE:
+ if ( LIBSPID_SUCCESS != libspid_config_write_item(LIBSPID_SYSTEM_CONF_PATH, LIBSPID_SYSTEM_CONF_LABEL_AUTOUPDATE, LIBSPID_SYSTEM_CONF_VALUE_YES)){
+ snmp_log(LOG_ERR, "libspid_config_write_item error\n");
+ return MFD_ERROR;
+ }
+ break;
+
+ default:
+ snmp_log(LOG_ERR,
+ "couldn't reverse map value %ld for modEoCCNUWhiteListAutoUpgradeEN",
+ rowreq_ctx->undo->modEoCCNUWhiteListAutoUpgradeEN);
+ return MFD_ERROR;
+ }
+
+ rowreq_ctx->data->modEoCCNUWhiteListAutoUpgradeEN =
+ rowreq_ctx->undo->modEoCCNUWhiteListAutoUpgradeEN;
+
+
+ return MFD_SUCCESS;
+} /* modEoCCNUWhiteListAutoUpgradeEN_undo */
+
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-MOD-EOC-MIB::modEoCCNUWhiteListEntry.modEoCCNUWhiteListStartTime
+ * modEoCCNUWhiteListStartTime is subid 7 of modEoCCNUWhiteListEntry.
+ * Its status is Current, and its access level is ReadWrite.
+ * OID: .1.3.6.1.4.1.22764.3.1.5.1.6.1.7
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 1
+ *
+ *
+ * Its syntax is TICKS (based on perltype TICKS)
+ * The net-snmp type is ASN_TIMETICKS. The C type decl is u_long (u_long)
+ */
+/**
+ * Check that the proposed new value is potentially valid.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param modEoCCNUWhiteListStartTime_val
+ * A u_long containing the new value.
+ *
+ * @retval MFD_SUCCESS : incoming value is legal
+ * @retval MFD_NOT_VALID_NOW : incoming value is not valid now
+ * @retval MFD_NOT_VALID_EVER : incoming value is never valid
+ *
+ * This is the place to check for requirements that are not
+ * expressed in the mib syntax (for example, a requirement that
+ * is detailed in the description for an object).
+ *
+ * You should check that the requested change between the undo value and the
+ * new value is legal (ie, the transistion from one value to another
+ * is legal).
+ *
+ *@note
+ * This check is only to determine if the new value
+ * is \b potentially valid. This is the first check of many, and
+ * is one of the simplest ones.
+ *
+ *@note
+ * this is not the place to do any checks for values
+ * which depend on some other value in the mib. Those
+ * types of checks should be done in the
+ * modEoCCNUWhiteListTable_check_dependencies() function.
+ *
+ * The following checks have already been done for you:
+ * The syntax is ASN_TIMETICKS
+ *
+ * If there a no other checks you need to do, simply return MFD_SUCCESS.
+ *
+ */
+int
+modEoCCNUWhiteListStartTime_check_value(modEoCCNUWhiteListTable_rowreq_ctx
+ * rowreq_ctx,
+ u_long
+ modEoCCNUWhiteListStartTime_val)
+{
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListStartTime_check_value", "called\n"));
+
+ /** should never get a NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:441:o: |-> Check for valid modEoCCNUWhiteListStartTime value.
+ */
+ /* check that proposed start time value is between min and max allowed value in timeticks */
+ if ((modEoCCNUWhiteListStartTime_val < WHITE_LIST_START_TIME_TICKS_MIN)
+ || (modEoCCNUWhiteListStartTime_val > WHITE_LIST_START_TIME_TICKS_MAX))
+ {
+ return SNMP_ERR_WRONGVALUE;
+ }
+
+
+ return MFD_SUCCESS; /* modEoCCNUWhiteListStartTime value not illegal */
+} /* modEoCCNUWhiteListStartTime_check_value */
+
+/**
+ * Save old value information
+ *
+ * @param rowreq_ctx
+ * Pointer to the table context (modEoCCNUWhiteListTable_rowreq_ctx)
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_ERROR : error. set will fail.
+ *
+ * This function will be called after the table level undo setup function
+ * modEoCCNUWhiteListTable_undo_setup has been called.
+ *
+ *@note
+ * this function will only be called if a new value is set for this column.
+ *
+ * If there is any setup specific to a particular column (e.g. allocating
+ * memory for a string), you should do that setup in this function, so it
+ * won't be done unless it is necessary.
+ */
+int
+modEoCCNUWhiteListStartTime_undo_setup(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx)
+{
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListStartTime_undo_setup", "called\n"));
+
+ /** should never get a NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:455:o: |-> Setup modEoCCNUWhiteListStartTime undo.
+ */
+ /*
+ * copy modEoCCNUWhiteListStartTime data
+ * set rowreq_ctx->undo->modEoCCNUWhiteListStartTime from rowreq_ctx->data->modEoCCNUWhiteListStartTime
+ */
+ /* all fields are copied in main _undo_setup */
+
+ return MFD_SUCCESS;
+} /* modEoCCNUWhiteListStartTime_undo_setup */
+
+/**
+ * Set the new value.
+ *
+ * @param rowreq_ctx
+ * Pointer to the users context. You should know how to
+ * manipulate the value from this object.
+ * @param modEoCCNUWhiteListStartTime_val
+ * A u_long containing the new value.
+ */
+int
+modEoCCNUWhiteListStartTime_set(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long modEoCCNUWhiteListStartTime_val)
+{
+
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListStartTime_set", "called\n"));
+
+ /** should never get a NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:461:M: |-> Set modEoCCNUWhiteListStartTime value.
+ * set modEoCCNUWhiteListStartTime value in rowreq_ctx->data
+ */
+ rowreq_ctx->data->modEoCCNUWhiteListStartTime =
+ modEoCCNUWhiteListStartTime_val;
+ rowreq_ctx->column_exists_flags |= COLUMN_MODEOCCNUWHITELISTSTARTTIME_FLAG;
+
+ return MFD_SUCCESS;
+} /* modEoCCNUWhiteListStartTime_set */
+
+/**
+ * undo the previous set.
+ *
+ * @param rowreq_ctx
+ * Pointer to the users context.
+ */
+int
+modEoCCNUWhiteListStartTime_undo(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx)
+{
+
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListStartTime_undo", "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:456:o: |-> Clean up modEoCCNUWhiteListStartTime undo.
+ */
+ /*
+ * copy modEoCCNUWhiteListStartTime data
+ * set rowreq_ctx->data->modEoCCNUWhiteListStartTime from rowreq_ctx->undo->modEoCCNUWhiteListStartTime
+ */
+ rowreq_ctx->data->modEoCCNUWhiteListStartTime =
+ rowreq_ctx->undo->modEoCCNUWhiteListStartTime;
+
+
+ return MFD_SUCCESS;
+} /* modEoCCNUWhiteListStartTime_undo */
+
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-MOD-EOC-MIB::modEoCCNUWhiteListEntry.modEoCCNUWhiteListEndTime
+ * modEoCCNUWhiteListEndTime is subid 8 of modEoCCNUWhiteListEntry.
+ * Its status is Current, and its access level is ReadWrite.
+ * OID: .1.3.6.1.4.1.22764.3.1.5.1.6.1.8
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 1
+ *
+ *
+ * Its syntax is TICKS (based on perltype TICKS)
+ * The net-snmp type is ASN_TIMETICKS. The C type decl is u_long (u_long)
+ */
+/**
+ * Check that the proposed new value is potentially valid.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param modEoCCNUWhiteListEndTime_val
+ * A u_long containing the new value.
+ *
+ * @retval MFD_SUCCESS : incoming value is legal
+ * @retval MFD_NOT_VALID_NOW : incoming value is not valid now
+ * @retval MFD_NOT_VALID_EVER : incoming value is never valid
+ *
+ * This is the place to check for requirements that are not
+ * expressed in the mib syntax (for example, a requirement that
+ * is detailed in the description for an object).
+ *
+ * You should check that the requested change between the undo value and the
+ * new value is legal (ie, the transistion from one value to another
+ * is legal).
+ *
+ *@note
+ * This check is only to determine if the new value
+ * is \b potentially valid. This is the first check of many, and
+ * is one of the simplest ones.
+ *
+ *@note
+ * this is not the place to do any checks for values
+ * which depend on some other value in the mib. Those
+ * types of checks should be done in the
+ * modEoCCNUWhiteListTable_check_dependencies() function.
+ *
+ * The following checks have already been done for you:
+ * The syntax is ASN_TIMETICKS
+ *
+ * If there a no other checks you need to do, simply return MFD_SUCCESS.
+ *
+ */
+int
+modEoCCNUWhiteListEndTime_check_value(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long modEoCCNUWhiteListEndTime_val)
+{
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListEndTime_check_value", "called\n"));
+
+ /** should never get a NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:441:o: |-> Check for valid modEoCCNUWhiteListEndTime value.
+ */
+ /* check that proposed end time value is between min and max allowed value in timeticks */
+ if ((modEoCCNUWhiteListEndTime_val < WHITE_LIST_END_TIME_TICKS_MIN)
+ || (modEoCCNUWhiteListEndTime_val > WHITE_LIST_END_TIME_TICKS_MAX))
+ {
+ return SNMP_ERR_WRONGVALUE;
+ }
+
+
+ return MFD_SUCCESS; /* modEoCCNUWhiteListEndTime value not illegal */
+} /* modEoCCNUWhiteListEndTime_check_value */
+
+/**
+ * Save old value information
+ *
+ * @param rowreq_ctx
+ * Pointer to the table context (modEoCCNUWhiteListTable_rowreq_ctx)
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_ERROR : error. set will fail.
+ *
+ * This function will be called after the table level undo setup function
+ * modEoCCNUWhiteListTable_undo_setup has been called.
+ *
+ *@note
+ * this function will only be called if a new value is set for this column.
+ *
+ * If there is any setup specific to a particular column (e.g. allocating
+ * memory for a string), you should do that setup in this function, so it
+ * won't be done unless it is necessary.
+ */
+int
+modEoCCNUWhiteListEndTime_undo_setup(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx)
+{
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListEndTime_undo_setup", "called\n"));
+
+ /** should never get a NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:455:o: |-> Setup modEoCCNUWhiteListEndTime undo.
+ */
+ /*
+ * copy modEoCCNUWhiteListEndTime data
+ * set rowreq_ctx->undo->modEoCCNUWhiteListEndTime from rowreq_ctx->data->modEoCCNUWhiteListEndTime
+ */
+
+ /* all fields are copied in main _undo_setup */
+
+ return MFD_SUCCESS;
+} /* modEoCCNUWhiteListEndTime_undo_setup */
+
+/**
+ * Set the new value.
+ *
+ * @param rowreq_ctx
+ * Pointer to the users context. You should know how to
+ * manipulate the value from this object.
+ * @param modEoCCNUWhiteListEndTime_val
+ * A u_long containing the new value.
+ */
+int
+modEoCCNUWhiteListEndTime_set(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long modEoCCNUWhiteListEndTime_val)
+{
+
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListEndTime_set", "called\n"));
+
+ /** should never get a NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:461:M: |-> Set modEoCCNUWhiteListEndTime value.
+ * set modEoCCNUWhiteListEndTime value in rowreq_ctx->data
+ */
+ rowreq_ctx->data->modEoCCNUWhiteListEndTime =
+ modEoCCNUWhiteListEndTime_val;
+ rowreq_ctx->column_exists_flags |= COLUMN_MODEOCCNUWHITELISTENDTIME_FLAG;
+
+ return MFD_SUCCESS;
+} /* modEoCCNUWhiteListEndTime_set */
+
+/**
+ * undo the previous set.
+ *
+ * @param rowreq_ctx
+ * Pointer to the users context.
+ */
+int
+modEoCCNUWhiteListEndTime_undo(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx)
+{
+
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListEndTime_undo", "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:456:o: |-> Clean up modEoCCNUWhiteListEndTime undo.
+ */
+ /*
+ * copy modEoCCNUWhiteListEndTime data
+ * set rowreq_ctx->data->modEoCCNUWhiteListEndTime from rowreq_ctx->undo->modEoCCNUWhiteListEndTime
+ */
+ rowreq_ctx->data->modEoCCNUWhiteListEndTime =
+ rowreq_ctx->undo->modEoCCNUWhiteListEndTime;
+
+
+ return MFD_SUCCESS;
+} /* modEoCCNUWhiteListEndTime_undo */
+
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-MOD-EOC-MIB::modEoCCNUWhiteListEntry.modEoCCNUWhiteListRowStatus
+ * modEoCCNUWhiteListRowStatus is subid 9 of modEoCCNUWhiteListEntry.
+ * Its status is Current, and its access level is Create.
+ * OID: .1.3.6.1.4.1.22764.3.1.5.1.6.1.9
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 1 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 1
+ *
+ * Enum range: 3/8. Values: active(1), notInService(2), notReady(3), createAndGo(4), createAndWait(5), destroy(6)
+ *
+ * Its syntax is RowStatus (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (u_long)
+ */
+/**
+ * Check that the proposed new value is potentially valid.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param modEoCCNUWhiteListRowStatus_val
+ * A long containing the new value.
+ *
+ * @retval MFD_SUCCESS : incoming value is legal
+ * @retval MFD_NOT_VALID_NOW : incoming value is not valid now
+ * @retval MFD_NOT_VALID_EVER : incoming value is never valid
+ *
+ * This is the place to check for requirements that are not
+ * expressed in the mib syntax (for example, a requirement that
+ * is detailed in the description for an object).
+ *
+ * You should check that the requested change between the undo value and the
+ * new value is legal (ie, the transistion from one value to another
+ * is legal).
+ *
+ *@note
+ * This check is only to determine if the new value
+ * is \b potentially valid. This is the first check of many, and
+ * is one of the simplest ones.
+ *
+ *@note
+ * this is not the place to do any checks for values
+ * which depend on some other value in the mib. Those
+ * types of checks should be done in the
+ * modEoCCNUWhiteListTable_check_dependencies() function.
+ *
+ * The following checks have already been done for you:
+ * The syntax is ASN_INTEGER
+ * The value is one of active(1), notInService(2), notReady(3), createAndGo(4), createAndWait(5), destroy(6)
+ *
+ * If there a no other checks you need to do, simply return MFD_SUCCESS.
+ *
+ */
+int
+modEoCCNUWhiteListRowStatus_check_value(modEoCCNUWhiteListTable_rowreq_ctx
+ * rowreq_ctx,
+ u_long
+ modEoCCNUWhiteListRowStatus_val)
+{
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListRowStatus_check_value", "called\n"));
+
+ /** should never get a NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:441:o: |-> Check for valid modEoCCNUWhiteListRowStatus value.
+ */
+ /* check for unsupported row status values */
+ if (ROWSTATUS_CREATEANDGO == modEoCCNUWhiteListRowStatus_val) {
+ DEBUGMSGTL(("modEoCCNUWhiteListTable", "createAndGo not supported\n"));
+ return MFD_NOT_VALID_EVER;
+ }
+
+ return MFD_SUCCESS; /* modEoCCNUWhiteListRowStatus value not illegal */
+} /* modEoCCNUWhiteListRowStatus_check_value */
+
+/**
+ * Save old value information
+ *
+ * @param rowreq_ctx
+ * Pointer to the table context (modEoCCNUWhiteListTable_rowreq_ctx)
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_ERROR : error. set will fail.
+ *
+ * This function will be called after the table level undo setup function
+ * modEoCCNUWhiteListTable_undo_setup has been called.
+ *
+ *@note
+ * this function will only be called if a new value is set for this column.
+ *
+ * If there is any setup specific to a particular column (e.g. allocating
+ * memory for a string), you should do that setup in this function, so it
+ * won't be done unless it is necessary.
+ */
+int
+modEoCCNUWhiteListRowStatus_undo_setup(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx)
+{
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListRowStatus_undo_setup", "called\n"));
+
+ /** should never get a NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:455:o: |-> Setup modEoCCNUWhiteListRowStatus undo.
+ */
+ /*
+ * copy modEoCCNUWhiteListRowStatus data
+ * set rowreq_ctx->undo->modEoCCNUWhiteListRowStatus from rowreq_ctx->data->modEoCCNUWhiteListRowStatus
+ */
+
+ /* all fields are copied in main _undo_setup */
+
+ return MFD_SUCCESS;
+} /* modEoCCNUWhiteListRowStatus_undo_setup */
+
+/**
+ * Set the new value.
+ *
+ * @param rowreq_ctx
+ * Pointer to the users context. You should know how to
+ * manipulate the value from this object.
+ * @param modEoCCNUWhiteListRowStatus_val
+ * A long containing the new value.
+ */
+int
+modEoCCNUWhiteListRowStatus_set(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long modEoCCNUWhiteListRowStatus_val)
+{
+
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListRowStatus_set", "called\n"));
+
+ /** should never get a NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:461:M: |-> Set modEoCCNUWhiteListRowStatus value.
+ * set modEoCCNUWhiteListRowStatus value in rowreq_ctx->data
+ */
+ rowreq_ctx->data->modEoCCNUWhiteListRowStatus =
+ modEoCCNUWhiteListRowStatus_val;
+
+ return MFD_SUCCESS;
+} /* modEoCCNUWhiteListRowStatus_set */
+
+/**
+ * undo the previous set.
+ *
+ * @param rowreq_ctx
+ * Pointer to the users context.
+ */
+int
+modEoCCNUWhiteListRowStatus_undo(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx)
+{
+
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListRowStatus_undo", "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:456:o: |-> Clean up modEoCCNUWhiteListRowStatus undo.
+ */
+ /*
+ * copy modEoCCNUWhiteListRowStatus data
+ * set rowreq_ctx->data->modEoCCNUWhiteListRowStatus from rowreq_ctx->undo->modEoCCNUWhiteListRowStatus
+ */
+ rowreq_ctx->data->modEoCCNUWhiteListRowStatus =
+ rowreq_ctx->undo->modEoCCNUWhiteListRowStatus;
+
+
+ return MFD_SUCCESS;
+} /* modEoCCNUWhiteListRowStatus_undo */
+
+/**
+ * check dependencies
+ *
+ * This is useful for for tables which have dependencies between columns
+ * (or rows, or tables). For example, two columns allocating a percentage
+ * of something add up 100%.
+ *
+ * Should you need different behavior depending on which columns were
+ * set, rowreq_ctx->column_set_flags will indicate which writeable columns were
+ * set. The definitions for the COLUMN_*_FLAG bits can be found in
+ * modEoCCNUWhiteListTable_oids.h.
+ * A new row will have the MFD_ROW_CREATED bit set in rowreq_flags.
+ *
+ * @retval MFD_SUCCESS all the changes to the row are legal
+ * @retval MFD_ERROR one or more changes are not legal
+ *
+ * (see README-table-modEoCCNUWhiteListTable if you don't have dependencies)
+ */
+int
+modEoCCNUWhiteListTable_check_dependencies
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx)
+{
+ int rc = MFD_SUCCESS;
+
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_check_dependencies", "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:470:o: Check modEoCCNUWhiteListTable row dependencies.
+ * check that all new value are legal and consistent with each other
+ */
+
+ /*
+ * check RowStatus dependencies
+ */
+ if (rowreq_ctx->
+ column_set_flags & COLUMN_MODEOCCNUWHITELISTROWSTATUS_FLAG) {
+ /*
+ * check for valid RowStatus transition (old, new)
+ * (Note: move transition check to
+ * to catch errors earlier)
+ */
+ rc = check_rowstatus_transition(rowreq_ctx->undo->
+ modEoCCNUWhiteListRowStatus,
+ rowreq_ctx->data->
+ modEoCCNUWhiteListRowStatus);
+ if (MFD_SUCCESS != rc){
+ DEBUGMSGTL(("modEoCCNUWhiteListTable",
+ "row status transition from %d to %d\n",
+ rowreq_ctx->undo->modEoCCNUWhiteListRowStatus,
+ rowreq_ctx->data->modEoCCNUWhiteListRowStatus));
+ return rc;
+ }
+ /*
+ * row creation requirements
+ */
+ if (rowreq_ctx->rowreq_flags & MFD_ROW_CREATED) {
+ /* this case permits creating row with rowstatus 'destroy' - row is created and immediately deleted */
+ if (ROWSTATUS_DESTROY ==
+ rowreq_ctx->data->modEoCCNUWhiteListRowStatus) {
+ rowreq_ctx->rowreq_flags |= MFD_ROW_DELETED;
+ } else if (ROWSTATUS_CREATEANDWAIT ==
+ rowreq_ctx->data->modEoCCNUWhiteListRowStatus) {
+ /* set row adding indication */
+ adding_row = 1;
+ rowreq_ctx->data->modEoCCNUWhiteListRowStatus =
+ ROWSTATUS_NOTINSERVICE;
+ } else /* check that Start Time is not greater than End Time (if both are given during row creation) */
+ if ((rowreq_ctx->column_set_flags & COLUMN_MODEOCCNUWHITELISTSTARTTIME_FLAG) && (rowreq_ctx->column_set_flags & COLUMN_MODEOCCNUWHITELISTENDTIME_FLAG)){
+ if (rowreq_ctx->data->modEoCCNUWhiteListStartTime > rowreq_ctx->data->modEoCCNUWhiteListEndTime){
+ DEBUGMSGTL(("modEoCCNUWhiteListTable", "Start Time must not be greater than End Time\n"));
+ return MFD_NOT_VALID_NOW;
+ }
+ }
+
+ }/* row creation */
+ else {
+ /*
+ * row change requirements
+ */
+ /*
+ * don't allow a destroy if any other value was changed, since
+ * that might call data access routines with bad info.
+ *
+ * you may or may not require the row be notInService before it
+ * can be destroyed.
+ */
+ if (ROWSTATUS_DESTROY ==
+ rowreq_ctx->data->modEoCCNUWhiteListRowStatus) {
+ if (rowreq_ctx->
+ column_set_flags &
+ ~COLUMN_MODEOCCNUWHITELISTROWSTATUS_FLAG) {
+ DEBUGMSGTL(("modEoCCNUWhiteListTable",
+ "destroy must be only varbind for row\n"));
+ return MFD_NOT_VALID_NOW;
+ }
+ rowreq_ctx->rowreq_flags |= MFD_ROW_DELETED;
+
+ } /* row destroy */
+
+ else if (ROWSTATUS_NOTINSERVICE ==
+ rowreq_ctx->data->modEoCCNUWhiteListRowStatus){
+ /* do not permit invalidating once validated row */
+ if (rowreq_ctx->undo->modEoCCNUWhiteListRowStatus & ROWSTATUS_ACTIVE){
+ DEBUGMSGTL(("modEoCCNUWhiteListTable",
+ "Row status can't be changed from Active to Not In Service!\n"));
+ return MFD_NOT_VALID_EVER;
+ }
+
+
+ }
+ else if (ROWSTATUS_ACTIVE ==
+ rowreq_ctx->data->modEoCCNUWhiteListRowStatus) {
+ /* before setting row to active, check that all columns are filled */
+ if ((rowreq_ctx->
+ column_exists_flags &
+ MODEOCCNUWHITELISTTABLE_REQUIRED_COLS)
+ != MODEOCCNUWHITELISTTABLE_REQUIRED_COLS) {
+ DEBUGMSGTL(("modEoCCNUWhiteListTable",
+ "required columns from modEoCCNU table missing (0x%0x != 0x%0x)\n",
+ rowreq_ctx->column_exists_flags,
+ MODEOCCNUWHITELISTTABLE_REQUIRED_COLS));
+ return MFD_NOT_VALID_NOW;
+ }
+
+ if (rowreq_ctx->data->modEoCCNUWhiteListStartTime > rowreq_ctx->data->modEoCCNUWhiteListEndTime){
+ DEBUGMSGTL(("modEoCCNUWhiteListTable", "Start Time must not be greater than End Time\n"));
+ return MFD_NOT_VALID_NOW;
+ }
+
+ if (rowreq_ctx->data->modEoCCNUWhiteListStartTime > rowreq_ctx->data->modEoCCNUWhiteListEndTime){
+ DEBUGMSGTL(("modEoCCNUWhiteListTable", "Start Time must not be greater than End Time\n"));
+ return MFD_NOT_VALID_NOW;
+ }
+
+ /* set Online State flag to existing in order to be read from rowreq_ctx */
+ rowreq_ctx->column_exists_flags |= COLUMN_MODEOCCNUWHITELISTREGISTERONLINESTATE_FLAG;
+
+ rowreq_ctx->data->modEoCCNUWhiteListRowStatus =
+ ROWSTATUS_ACTIVE;
+ }
+ } /* row change */
+ } else {
+ /*
+ * must have row status to create a row
+ */
+ if (rowreq_ctx->rowreq_flags & MFD_ROW_CREATED) {
+ DEBUGMSGTL(("modEoCCNUWhiteListTable",
+ "must use RowStatus to create rows\n"));
+ return MFD_CANNOT_CREATE_NOW;
+ }
+ else if (ROWSTATUS_ACTIVE == rowreq_ctx->data->modEoCCNUWhiteListRowStatus){
+ /* check that start time is not greater than end time */
+ if (rowreq_ctx->column_set_flags & COLUMN_MODEOCCNUWHITELISTSTARTTIME_FLAG){
+ if (rowreq_ctx->data->modEoCCNUWhiteListStartTime > rowreq_ctx->data->modEoCCNUWhiteListEndTime){
+ DEBUGMSGTL(("modEoCCNUWhiteListTable", "Start Time must not be greater than End Time\n"));
+ return MFD_NOT_VALID_NOW;
+ }
+ }
+
+ if (rowreq_ctx->column_set_flags & COLUMN_MODEOCCNUWHITELISTENDTIME_FLAG){
+ if (rowreq_ctx->data->modEoCCNUWhiteListStartTime > rowreq_ctx->data->modEoCCNUWhiteListEndTime){
+ DEBUGMSGTL(("modEoCCNUWhiteListTable", "Start Time must not be greater than End Time\n"));
+ return MFD_NOT_VALID_NOW;
+ }
+ }
+
+ }
+ } /* row status not set */
+
+ if (MFD_SUCCESS != rc)
+ return rc;
+
+ return rc;
+} /* spc300EoCSlaveWhiteListTable_check_dependencies */
+
+/** @} */
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable_data_set.h b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable_data_set.h
new file mode 100644
index 0000000000..1465e9a6f1
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable_data_set.h
@@ -0,0 +1,190 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ * version : 12077 $ of $
+ *
+ * $Id:$
+ */
+#ifndef MODEOCCNUWHITELISTTABLE_DATA_SET_H
+#define MODEOCCNUWHITELISTTABLE_DATA_SET_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ /*
+ *********************************************************************
+ * SET function declarations
+ */
+
+ /*
+ *********************************************************************
+ * SET Table declarations
+ */
+/**********************************************************************
+ **********************************************************************
+ ***
+ *** Table modEoCCNUWhiteListTable
+ ***
+ **********************************************************************
+ **********************************************************************/
+ /*
+ * NSCRTV-EPONEOC-MOD-EOC-MIB::modEoCCNUWhiteListTable is subid 6 of modEoCCNUWhiteList.
+ * Its status is Current.
+ * OID: .1.3.6.1.4.1.22764.3.1.5.1.6, length: 12
+ */
+
+
+ int
+ modEoCCNUWhiteListTable_undo_setup
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx);
+ int
+ modEoCCNUWhiteListTable_undo_cleanup
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx);
+ int
+ modEoCCNUWhiteListTable_undo(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx);
+ int
+ modEoCCNUWhiteListTable_commit(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx);
+ int
+ modEoCCNUWhiteListTable_undo_commit
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx);
+
+
+ int
+ modEoCCNUWhiteListMACAddress_check_value
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx,
+ char *modEoCCNUWhiteListMACAddress_val_ptr,
+ size_t modEoCCNUWhiteListMACAddress_val_ptr_len);
+ int
+ modEoCCNUWhiteListMACAddress_undo_setup
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx);
+ int
+ modEoCCNUWhiteListMACAddress_set(modEoCCNUWhiteListTable_rowreq_ctx
+ * rowreq_ctx,
+ char
+ *modEoCCNUWhiteListMACAddress_val_ptr,
+ size_t
+ modEoCCNUWhiteListMACAddress_val_ptr_len);
+ int
+ modEoCCNUWhiteListMACAddress_undo
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx);
+
+ int
+ modEoCCNUWhiteListAuthorization_check_value
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx,
+ u_long modEoCCNUWhiteListAuthorization_val);
+ int
+ modEoCCNUWhiteListAuthorization_undo_setup
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx);
+ int
+ modEoCCNUWhiteListAuthorization_set
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx,
+ u_long modEoCCNUWhiteListAuthorization_val);
+ int
+ modEoCCNUWhiteListAuthorization_undo
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx);
+
+ int
+ modEoCCNUWhiteListRFOutputLevel_check_value
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx,
+ long modEoCCNUWhiteListRFOutputLevel_val);
+ int
+ modEoCCNUWhiteListRFOutputLevel_undo_setup
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx);
+ int
+ modEoCCNUWhiteListRFOutputLevel_set
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx,
+ long modEoCCNUWhiteListRFOutputLevel_val);
+ int
+ modEoCCNUWhiteListRFOutputLevel_undo
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx);
+
+ int
+ modEoCCNUWhiteListAutoUpgradeEN_check_value
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx,
+ u_long modEoCCNUWhiteListAutoUpgradeEN_val);
+ int
+ modEoCCNUWhiteListAutoUpgradeEN_undo_setup
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx);
+ int
+ modEoCCNUWhiteListAutoUpgradeEN_set
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx,
+ u_long modEoCCNUWhiteListAutoUpgradeEN_val);
+ int
+ modEoCCNUWhiteListAutoUpgradeEN_undo
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx);
+
+ int
+ modEoCCNUWhiteListRegisterOnlineState_check_value
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx,
+ u_long modEoCCNUWhiteListRegisterOnlineState_val);
+ int
+ modEoCCNUWhiteListRegisterOnlineState_undo_setup
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx);
+ int
+ modEoCCNUWhiteListRegisterOnlineState_set
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx,
+ u_long modEoCCNUWhiteListRegisterOnlineState_val);
+ int
+ modEoCCNUWhiteListRegisterOnlineState_undo
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx);
+
+ int
+ modEoCCNUWhiteListStartTime_check_value
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx,
+ u_long modEoCCNUWhiteListStartTime_val);
+ int
+ modEoCCNUWhiteListStartTime_undo_setup
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx);
+ int
+ modEoCCNUWhiteListStartTime_set(modEoCCNUWhiteListTable_rowreq_ctx
+ * rowreq_ctx,
+ u_long
+ modEoCCNUWhiteListStartTime_val);
+ int
+ modEoCCNUWhiteListStartTime_undo(modEoCCNUWhiteListTable_rowreq_ctx
+ * rowreq_ctx);
+
+ int
+ modEoCCNUWhiteListEndTime_check_value
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx,
+ u_long modEoCCNUWhiteListEndTime_val);
+ int
+ modEoCCNUWhiteListEndTime_undo_setup
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx);
+ int
+ modEoCCNUWhiteListEndTime_set(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long
+ modEoCCNUWhiteListEndTime_val);
+ int
+ modEoCCNUWhiteListEndTime_undo(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx);
+
+ int
+ modEoCCNUWhiteListRowStatus_check_value
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx,
+ u_long modEoCCNUWhiteListRowStatus_val);
+ int
+ modEoCCNUWhiteListRowStatus_undo_setup
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx);
+ int
+ modEoCCNUWhiteListRowStatus_set(modEoCCNUWhiteListTable_rowreq_ctx
+ * rowreq_ctx,
+ u_long
+ modEoCCNUWhiteListRowStatus_val);
+ int
+ modEoCCNUWhiteListRowStatus_undo(modEoCCNUWhiteListTable_rowreq_ctx
+ * rowreq_ctx);
+
+
+ int
+ modEoCCNUWhiteListTable_check_dependencies
+ (modEoCCNUWhiteListTable_rowreq_ctx * ctx);
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* MODEOCCNUWHITELISTTABLE_DATA_SET_H */
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable_enums.h b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable_enums.h
new file mode 100644
index 0000000000..67dccb8699
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable_enums.h
@@ -0,0 +1,107 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ * : generic-table-enums.m2c 12526 2005-07-15 22:41:16Z rstory $
+ *
+ * $Id:$
+ */
+#ifndef MODEOCCNUWHITELISTTABLE_ENUMS_H
+#define MODEOCCNUWHITELISTTABLE_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 modEoCCNUWhiteListTable
+ *
+ *************************************************************************
+ *************************************************************************/
+
+/*************************************************************
+ * constants for enums for the MIB node
+ * modEoCCNUWhiteListAuthorization (INTEGER / ASN_INTEGER)
+ *
+ * since a Textual Convention may be referenced more than once in a
+ * MIB, protect againt redefinitions of the enum values.
+ */
+#ifndef MODEOCCNUWHITELISTAUTHORIZATION_ENUMS
+#define MODEOCCNUWHITELISTAUTHORIZATION_ENUMS
+
+#define MODEOCCNUWHITELISTAUTHORIZATION_NOT_AUTHORIZED 0
+#define MODEOCCNUWHITELISTAUTHORIZATION_AUTHORIZED 1
+
+#endif /* MODEOCCNUWHITELISTAUTHORIZATION_ENUMS */
+
+
+/*************************************************************
+ * constants for enums for the MIB node
+ * modEoCCNUWhiteListAutoUpgradeEN (INTEGER / ASN_INTEGER)
+ *
+ * since a Textual Convention may be referenced more than once in a
+ * MIB, protect againt redefinitions of the enum values.
+ */
+#ifndef MODEOCCNUWHITELISTAUTOUPGRADEEN_ENUMS
+#define MODEOCCNUWHITELISTAUTOUPGRADEEN_ENUMS
+
+#define MODEOCCNUWHITELISTAUTOUPGRADEEN_DISABLE 0
+#define MODEOCCNUWHITELISTAUTOUPGRADEEN_ENABLE 1
+
+#endif /* MODEOCCNUWHITELISTAUTOUPGRADEEN_ENUMS */
+
+
+/*************************************************************
+ * constants for enums for the MIB node
+ * modEoCCNUWhiteListRegisterOnlineState (INTEGER / ASN_INTEGER)
+ *
+ * since a Textual Convention may be referenced more than once in a
+ * MIB, protect againt redefinitions of the enum values.
+ */
+#ifndef MODEOCCNUWHITELISTREGISTERONLINESTATE_ENUMS
+#define MODEOCCNUWHITELISTREGISTERONLINESTATE_ENUMS
+
+#define MODEOCCNUWHITELISTREGISTERONLINESTATE_OFFLINE 0
+#define MODEOCCNUWHITELISTREGISTERONLINESTATE_ONLINE 1
+
+#endif /* MODEOCCNUWHITELISTREGISTERONLINESTATE_ENUMS */
+
+
+/*************************************************************
+ * constants for enums for the MIB node
+ * modEoCCNUWhiteListRowStatus (RowStatus / ASN_INTEGER)
+ *
+ * since a Textual Convention may be referenced more than once in a
+ * MIB, protect againt redefinitions of the enum values.
+ */
+#ifndef ROWSTATUS_ENUMS
+#define ROWSTATUS_ENUMS
+
+#define ROWSTATUS_ACTIVE 1
+#define ROWSTATUS_NOTINSERVICE 2
+#define ROWSTATUS_NOTREADY 3
+#define ROWSTATUS_CREATEANDGO 4
+#define ROWSTATUS_CREATEANDWAIT 5
+#define ROWSTATUS_DESTROY 6
+
+#endif /* ROWSTATUS_ENUMS */
+
+
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* MODEOCCNUWHITELISTTABLE_ENUMS_H */
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable_interface.c b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable_interface.c
new file mode 100644
index 0000000000..4498af0c1a
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable_interface.c
@@ -0,0 +1,2443 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ * version : 15899 $ of $
+ *
+ * $Id:$
+ */
+/*
+ * *********************************************************************
+ * *********************************************************************
+ * *********************************************************************
+ * *** ***
+ * *** 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 "modEoCCNUWhiteListTable.h"
+
+
+#include <net-snmp/agent/table_container.h>
+#include <net-snmp/library/container.h>
+
+#include "modEoCCNUWhiteListTable_interface.h"
+
+#include <ctype.h>
+
+
+/**********************************************************************
+ **********************************************************************
+ ***
+ *** Table modEoCCNUWhiteListTable
+ ***
+ **********************************************************************
+ **********************************************************************/
+/*
+ * NSCRTV-EPONEOC-MOD-EOC-MIB::modEoCCNUWhiteListTable is subid 6 of modEoCCNUWhiteList.
+ * Its status is Current.
+ * OID: .1.3.6.1.4.1.22764.3.1.5.1.6, length: 12
+ */
+typedef struct modEoCCNUWhiteListTable_interface_ctx_s {
+
+ netsnmp_container *container;
+ netsnmp_cache *cache;
+
+ modEoCCNUWhiteListTable_registration *user_ctx;
+
+ netsnmp_table_registration_info tbl_info;
+
+ netsnmp_baby_steps_access_methods access_multiplexer;
+
+ u_int table_dirty;
+
+} modEoCCNUWhiteListTable_interface_ctx;
+
+static modEoCCNUWhiteListTable_interface_ctx
+ modEoCCNUWhiteListTable_if_ctx;
+
+static void
+_modEoCCNUWhiteListTable_container_init
+(modEoCCNUWhiteListTable_interface_ctx * if_ctx);
+static void
+_modEoCCNUWhiteListTable_container_shutdown
+(modEoCCNUWhiteListTable_interface_ctx * if_ctx);
+
+
+netsnmp_container *
+modEoCCNUWhiteListTable_container_get(void)
+{
+ return modEoCCNUWhiteListTable_if_ctx.container;
+}
+
+modEoCCNUWhiteListTable_registration *
+modEoCCNUWhiteListTable_registration_get(void)
+{
+ return modEoCCNUWhiteListTable_if_ctx.user_ctx;
+}
+
+modEoCCNUWhiteListTable_registration *
+modEoCCNUWhiteListTable_registration_set
+ (modEoCCNUWhiteListTable_registration * newreg)
+{
+ modEoCCNUWhiteListTable_registration *old =
+ modEoCCNUWhiteListTable_if_ctx.user_ctx;
+ modEoCCNUWhiteListTable_if_ctx.user_ctx = newreg;
+ return old;
+}
+
+int
+modEoCCNUWhiteListTable_container_size(void)
+{
+ return CONTAINER_SIZE(modEoCCNUWhiteListTable_if_ctx.container);
+}
+
+u_int
+modEoCCNUWhiteListTable_dirty_get(void)
+{
+ return modEoCCNUWhiteListTable_if_ctx.table_dirty;
+}
+
+void
+modEoCCNUWhiteListTable_dirty_set(u_int status)
+{
+ DEBUGMSGTL(("modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_dirty_set", "called. was %d, now %d\n", modEoCCNUWhiteListTable_if_ctx.table_dirty, status));
+ modEoCCNUWhiteListTable_if_ctx.table_dirty = status;
+}
+
+/*
+ * mfd multiplexer modes
+ */
+static Netsnmp_Node_Handler _mfd_modEoCCNUWhiteListTable_pre_request;
+static Netsnmp_Node_Handler _mfd_modEoCCNUWhiteListTable_post_request;
+static Netsnmp_Node_Handler _mfd_modEoCCNUWhiteListTable_object_lookup;
+static Netsnmp_Node_Handler _mfd_modEoCCNUWhiteListTable_get_values;
+static Netsnmp_Node_Handler _mfd_modEoCCNUWhiteListTable_check_objects;
+static Netsnmp_Node_Handler _mfd_modEoCCNUWhiteListTable_undo_setup;
+static Netsnmp_Node_Handler _mfd_modEoCCNUWhiteListTable_set_values;
+static Netsnmp_Node_Handler _mfd_modEoCCNUWhiteListTable_undo_cleanup;
+static Netsnmp_Node_Handler _mfd_modEoCCNUWhiteListTable_undo_values;
+static Netsnmp_Node_Handler _mfd_modEoCCNUWhiteListTable_commit;
+static Netsnmp_Node_Handler _mfd_modEoCCNUWhiteListTable_undo_commit;
+static Netsnmp_Node_Handler
+ _mfd_modEoCCNUWhiteListTable_irreversible_commit;
+static Netsnmp_Node_Handler
+ _mfd_modEoCCNUWhiteListTable_check_dependencies;
+
+NETSNMP_STATIC_INLINE int
+_modEoCCNUWhiteListTable_undo_column(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx,
+ netsnmp_variable_list * var,
+ int column);
+
+NETSNMP_STATIC_INLINE int
+_modEoCCNUWhiteListTable_check_indexes(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx);
+
+
+/**
+ * common init of container for modEoCCNUWhiteListTable and spc300EoCSlaveWhiteListTable
+ */
+void
+white_list_container_init(void)
+{
+ static int done = 0;
+
+ if (done)
+ return;
+
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:white_list_container_init", "called\n"));
+
+ done = 1;
+
+ /*
+ * set up the container
+ */
+ _modEoCCNUWhiteListTable_container_init(&modEoCCNUWhiteListTable_if_ctx);
+}
+
+/**
+ * @internal
+ * Initialize the table modEoCCNUWhiteListTable
+ * (Define its contents and how it's structured)
+ */
+void
+_modEoCCNUWhiteListTable_initialize_interface
+ (modEoCCNUWhiteListTable_registration * reg_ptr, u_long flags)
+{
+ netsnmp_baby_steps_access_methods *access_multiplexer =
+ &modEoCCNUWhiteListTable_if_ctx.access_multiplexer;
+ netsnmp_table_registration_info *tbl_info =
+ &modEoCCNUWhiteListTable_if_ctx.tbl_info;
+ netsnmp_handler_registration *reginfo;
+ netsnmp_mib_handler *handler;
+ int mfd_modes = 0;
+
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:_modEoCCNUWhiteListTable_initialize_interface", "called\n"));
+
+ (void) white_list_container_init();
+ if (NULL == modEoCCNUWhiteListTable_if_ctx.container)
+ return; /* msg already logged */
+
+ /*************************************************
+ *
+ * save interface context for modEoCCNUWhiteListTable
+ */
+ /*
+ * Setting up the table's definition
+ */
+ netsnmp_table_helper_add_indexes(tbl_info, ASN_INTEGER,
+ /** index: modEoCCNUWhiteListIndex */
+ 0);
+
+ /*
+ * Define the minimum and maximum accessible columns. This
+ * optimizes retrival.
+ */
+ tbl_info->min_column = MODEOCCNUWHITELISTTABLE_MIN_COL;
+ tbl_info->max_column = MODEOCCNUWHITELISTTABLE_MAX_COL;
+
+ /*
+ * save users context
+ */
+ modEoCCNUWhiteListTable_if_ctx.user_ctx = reg_ptr;
+
+ /*
+ * call data access initialization code
+ */
+ modEoCCNUWhiteListTable_init_data(reg_ptr);
+
+ /*
+ * set up the container
+ */
+ _modEoCCNUWhiteListTable_container_init
+ (&modEoCCNUWhiteListTable_if_ctx);
+ if (NULL == modEoCCNUWhiteListTable_if_ctx.container) {
+ snmp_log(LOG_ERR,
+ "could not initialize container for modEoCCNUWhiteListTable\n");
+ return;
+ }
+
+ /*
+ * access_multiplexer: REQUIRED wrapper for get request handling
+ */
+ access_multiplexer->object_lookup =
+ _mfd_modEoCCNUWhiteListTable_object_lookup;
+ access_multiplexer->get_values =
+ _mfd_modEoCCNUWhiteListTable_get_values;
+
+ /*
+ * no wrappers yet
+ */
+ access_multiplexer->pre_request =
+ _mfd_modEoCCNUWhiteListTable_pre_request;
+ access_multiplexer->post_request =
+ _mfd_modEoCCNUWhiteListTable_post_request;
+
+
+ /*
+ * REQUIRED wrappers for set request handling
+ */
+ access_multiplexer->object_syntax_checks =
+ _mfd_modEoCCNUWhiteListTable_check_objects;
+ access_multiplexer->undo_setup =
+ _mfd_modEoCCNUWhiteListTable_undo_setup;
+ access_multiplexer->undo_cleanup =
+ _mfd_modEoCCNUWhiteListTable_undo_cleanup;
+ access_multiplexer->set_values =
+ _mfd_modEoCCNUWhiteListTable_set_values;
+ access_multiplexer->undo_sets =
+ _mfd_modEoCCNUWhiteListTable_undo_values;
+
+ /*
+ * no wrappers yet
+ */
+ access_multiplexer->commit = _mfd_modEoCCNUWhiteListTable_commit;
+ access_multiplexer->undo_commit =
+ _mfd_modEoCCNUWhiteListTable_undo_commit;
+ access_multiplexer->irreversible_commit =
+ _mfd_modEoCCNUWhiteListTable_irreversible_commit;
+
+ /*
+ * REQUIRED for tables with dependencies
+ */
+ access_multiplexer->consistency_checks =
+ _mfd_modEoCCNUWhiteListTable_check_dependencies;
+
+ /*************************************************
+ *
+ * Create a registration, save our reg data, register table.
+ */
+ DEBUGMSGTL(("modEoCCNUWhiteListTable:init_modEoCCNUWhiteListTable",
+ "Registering modEoCCNUWhiteListTable as a mibs-for-dummies table.\n"));
+ handler =
+ netsnmp_baby_steps_access_multiplexer_get(access_multiplexer);
+ reginfo =
+ netsnmp_handler_registration_create("modEoCCNUWhiteListTable",
+ handler,
+ modEoCCNUWhiteListTable_oid,
+ modEoCCNUWhiteListTable_oid_size,
+ HANDLER_CAN_BABY_STEP |
+ HANDLER_CAN_RWRITE);
+ if (NULL == reginfo) {
+ snmp_log(LOG_ERR,
+ "error registering table modEoCCNUWhiteListTable\n");
+ return;
+ }
+ reginfo->my_reg_void = &modEoCCNUWhiteListTable_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,
+ modEoCCNUWhiteListTable_if_ctx.
+ container,
+ TABLE_CONTAINER_KEY_NETSNMP_INDEX);
+ netsnmp_inject_handler(reginfo, handler);
+
+ /*************************************************
+ *
+ * inject cache helper
+ */
+ if (NULL != modEoCCNUWhiteListTable_if_ctx.cache) {
+ handler =
+ netsnmp_cache_handler_get(modEoCCNUWhiteListTable_if_ctx.
+ cache);
+ netsnmp_inject_handler(reginfo, handler);
+ }
+
+ /*
+ * register table
+ */
+ netsnmp_register_table(reginfo, tbl_info);
+
+} /* _modEoCCNUWhiteListTable_initialize_interface */
+
+/**
+ * @internal
+ * Shutdown the table modEoCCNUWhiteListTable
+ */
+void
+_modEoCCNUWhiteListTable_shutdown_interface
+ (modEoCCNUWhiteListTable_registration * reg_ptr)
+{
+ /*
+ * shutdown the container
+ */
+ _modEoCCNUWhiteListTable_container_shutdown
+ (&modEoCCNUWhiteListTable_if_ctx);
+}
+
+void
+modEoCCNUWhiteListTable_valid_columns_set(netsnmp_column_info *vc)
+{
+ modEoCCNUWhiteListTable_if_ctx.tbl_info.valid_columns = vc;
+} /* modEoCCNUWhiteListTable_valid_columns_set */
+
+/**
+ * @internal
+ * convert the index component stored in the context to an oid
+ */
+int
+modEoCCNUWhiteListTable_index_to_oid(netsnmp_index * oid_idx,
+ modEoCCNUWhiteListTable_mib_index *
+ mib_idx)
+{
+ int err = SNMP_ERR_NOERROR;
+
+ /*
+ * temp storage for parsing indexes
+ */
+ /*
+ * modEoCCNUWhiteListIndex(1)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/R/d/h
+ */
+ netsnmp_variable_list var_modEoCCNUWhiteListIndex;
+
+ /*
+ * set up varbinds
+ */
+ memset(&var_modEoCCNUWhiteListIndex, 0x00,
+ sizeof(var_modEoCCNUWhiteListIndex));
+ var_modEoCCNUWhiteListIndex.type = ASN_INTEGER;
+
+ /*
+ * chain temp index varbinds together
+ */
+ var_modEoCCNUWhiteListIndex.next_variable = NULL;
+
+
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_index_to_oid", "called\n"));
+
+ /*
+ * modEoCCNUWhiteListIndex(1)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/R/d/h
+ */
+ snmp_set_var_value(&var_modEoCCNUWhiteListIndex,
+ (u_char *) & mib_idx->modEoCCNUWhiteListIndex,
+ sizeof(mib_idx->modEoCCNUWhiteListIndex));
+
+
+ err = build_oid_noalloc(oid_idx->oids, oid_idx->len, &oid_idx->len,
+ NULL, 0, &var_modEoCCNUWhiteListIndex);
+ 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_modEoCCNUWhiteListIndex);
+
+ return err;
+} /* modEoCCNUWhiteListTable_index_to_oid */
+
+/**
+ * extract modEoCCNUWhiteListTable indexes from a netsnmp_index
+ *
+ * @retval SNMP_ERR_NOERROR : no error
+ * @retval SNMP_ERR_GENERR : error
+ */
+int
+modEoCCNUWhiteListTable_index_from_oid(netsnmp_index * oid_idx,
+ modEoCCNUWhiteListTable_mib_index *
+ mib_idx)
+{
+ int err = SNMP_ERR_NOERROR;
+
+ /*
+ * temp storage for parsing indexes
+ */
+ /*
+ * modEoCCNUWhiteListIndex(1)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/R/d/h
+ */
+ netsnmp_variable_list var_modEoCCNUWhiteListIndex;
+
+ /*
+ * set up varbinds
+ */
+ memset(&var_modEoCCNUWhiteListIndex, 0x00,
+ sizeof(var_modEoCCNUWhiteListIndex));
+ var_modEoCCNUWhiteListIndex.type = ASN_INTEGER;
+
+ /*
+ * chain temp index varbinds together
+ */
+ var_modEoCCNUWhiteListIndex.next_variable = NULL;
+
+
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_index_from_oid", "called\n"));
+
+ /*
+ * parse the oid into the individual index components
+ */
+ err = parse_oid_indexes(oid_idx->oids, oid_idx->len,
+ &var_modEoCCNUWhiteListIndex);
+ if (err == SNMP_ERR_NOERROR) {
+ /*
+ * copy out values
+ */
+ mib_idx->modEoCCNUWhiteListIndex =
+ *((long *) var_modEoCCNUWhiteListIndex.val.string);
+
+
+ }
+
+ /*
+ * parsing may have allocated memory. free it.
+ */
+ snmp_reset_var_buffers(&var_modEoCCNUWhiteListIndex);
+
+ return err;
+} /* modEoCCNUWhiteListTable_index_from_oid */
+
+
+/*
+ * modEoCCNUWhiteListTable_allocate_data
+ *
+ * Purpose: create new modEoCCNUWhiteListTable_data.
+ */
+/* change from template: initialization of new fields added to data structure */
+modEoCCNUWhiteListTable_data *
+modEoCCNUWhiteListTable_allocate_data(void)
+{
+ modEoCCNUWhiteListTable_data *rtn =
+ SNMP_MALLOC_TYPEDEF(modEoCCNUWhiteListTable_data);
+
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_allocate_data", "called\n"));
+
+ if (NULL == rtn) {
+ snmp_log(LOG_ERR, "unable to malloc memory for new "
+ "modEoCCNUWhiteListTable_data.\n");
+ } else {
+ /* initialization of fields added for container comparison */
+ rtn->oid_index.len = 1;
+ rtn->oid_index.oids = &rtn->wl_index;
+ }
+
+
+ return rtn;
+} /* modEoCCNUWhiteListTable_allocate_data */
+
+/*
+ * modEoCCNUWhiteListTable_release_data
+ *
+ * Purpose: release modEoCCNUWhiteListTable data.
+ */
+void
+modEoCCNUWhiteListTable_release_data(modEoCCNUWhiteListTable_data * data)
+{
+ DEBUGMSGTL(("verbose:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_release_data", "called\n"));
+
+ if (NULL == data)
+ return;
+ free(data);
+} /* modEoCCNUWhiteListTable_release_data */
+
+/*
+ *********************************************************************
+ * @internal
+ * allocate resources for a modEoCCNUWhiteListTable_rowreq_ctx
+ */
+/* added data as an argument (as in ipAddressTableInterface) */
+modEoCCNUWhiteListTable_rowreq_ctx *
+modEoCCNUWhiteListTable_allocate_rowreq_ctx(modEoCCNUWhiteListTable_data * data, void *user_init_ctx)
+{
+ modEoCCNUWhiteListTable_rowreq_ctx *rowreq_ctx =
+ SNMP_MALLOC_TYPEDEF(modEoCCNUWhiteListTable_rowreq_ctx);
+
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_allocate_rowreq_ctx", "called\n"));
+
+ if (NULL == rowreq_ctx) {
+ snmp_log(LOG_ERR, "Couldn't allocate memory for a "
+ "modEoCCNUWhiteListTable_rowreq_ctx.\n");
+ return NULL;
+ } else {
+ if (NULL != data) {
+ /*
+ * track if we got data from user
+ */
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_allocate_rowreq_ctx", "data got from user\n"));
+ rowreq_ctx->rowreq_flags |= MFD_ROW_DATA_FROM_USER;
+ rowreq_ctx->data = data;
+
+ if (NULL == rowreq_ctx->data->modEoCCNUWhiteListMACAddress){
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_allocate_rowreq_ctx", "MAC address null\n"));
+ /* row status set to notInService */
+ rowreq_ctx->data->modEoCCNUWhiteListRowStatus = ROWSTATUS_NOTINSERVICE;
+ } else {
+ rowreq_ctx->column_exists_flags |= COLUMN_MODEOCCNUWHITELISTMACADDRESS_FLAG;
+ }
+
+ if (INVALID_MODEOCCNUWHITELISTAUTHORIZATION == rowreq_ctx->data->modEoCCNUWhiteListAuthorization){
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_allocate_rowreq_ctx", "Authorization invalid\n"));
+ /* row status set to notInService */
+ rowreq_ctx->data->modEoCCNUWhiteListRowStatus = ROWSTATUS_NOTINSERVICE;
+ } else {
+ rowreq_ctx->column_exists_flags |= COLUMN_MODEOCCNUWHITELISTAUTHORIZATION_FLAG;
+ }
+
+
+ if (INVALID_MODEOCCNUWHITELISTRFOUTPUTLEVEL == rowreq_ctx->data->modEoCCNUWhiteListRFOutputLevel){
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_allocate_rowreq_ctx", "RF Output invalid\n"));
+ /* row status set to notInService */
+ rowreq_ctx->data->modEoCCNUWhiteListRowStatus = ROWSTATUS_NOTINSERVICE;
+ } else {
+ rowreq_ctx->column_exists_flags |= COLUMN_MODEOCCNUWHITELISTRFOUTPUTLEVEL_FLAG;
+ }
+
+ if (INVALID_MODEOCCNUWHITELISTAUTOUPGRADEEN == rowreq_ctx->data->modEoCCNUWhiteListAutoUpgradeEN){
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_allocate_rowreq_ctx", "Auto Upgrade Enable invalid\n"));
+ /* row status set to notInService */
+ rowreq_ctx->data->modEoCCNUWhiteListRowStatus = ROWSTATUS_NOTINSERVICE;
+ } else {
+ rowreq_ctx->column_exists_flags |= COLUMN_MODEOCCNUWHITELISTAUTOUPGRADEEN_FLAG;
+ }
+
+ /* set Online State as existing */
+ rowreq_ctx->column_exists_flags |= COLUMN_MODEOCCNUWHITELISTREGISTERONLINESTATE_FLAG;
+
+ if (INVALID_MODEOCCNUWHITELISTSTARTTIME == rowreq_ctx->data->modEoCCNUWhiteListStartTime){
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_allocate_rowreq_ctx", "Start Time invalid\n"));
+ /* row status set to notInService */
+ rowreq_ctx->data->modEoCCNUWhiteListRowStatus = ROWSTATUS_NOTINSERVICE;
+ } else {
+ rowreq_ctx->column_exists_flags |= COLUMN_MODEOCCNUWHITELISTSTARTTIME_FLAG;
+ }
+
+ if (INVALID_MODEOCCNUWHITELISTENDTIME == rowreq_ctx->data->modEoCCNUWhiteListEndTime){
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_allocate_rowreq_ctx", "End Time invalid\n"));
+ /* row status set to notInService */
+ rowreq_ctx->data->modEoCCNUWhiteListRowStatus = ROWSTATUS_NOTINSERVICE;
+ } else {
+ rowreq_ctx->column_exists_flags |= COLUMN_MODEOCCNUWHITELISTENDTIME_FLAG;
+ }
+
+
+#ifdef USING_SPC300_EOC_MIB_MODULE
+ /* fields specific to SPC300EoC WL Table extension */
+ if (!strcmp(rowreq_ctx->data->spc300EoCSlaveWhiteListDevicePassword, "")){
+ DEBUGMSGTL(("internal:spc300EoCSlaveWhiteListTable:spc300EoCSlaveWhiteListTable_allocate_rowreq_ctx", "DPW null\n"));
+ /* row status set to notInService */
+ rowreq_ctx->data->modEoCCNUWhiteListRowStatus = ROWSTATUS_NOTINSERVICE;
+ } else {
+ rowreq_ctx->column_exists_flags |= COLUMN_SPC300EOCSLAVEWHITELISTDEVICEPASSWORD_FLAG;
+ }
+#endif /* USING_SPC300_EOC_MIB_MODULE */
+
+ /* Row Status flag set to existing for allocation purposes */
+ rowreq_ctx->column_exists_flags |= COLUMN_MODEOCCNUWHITELISTROWSTATUS_FLAG;
+ } else if (NULL ==
+ (rowreq_ctx->data = modEoCCNUWhiteListTable_allocate_data())) {
+ SNMP_FREE(rowreq_ctx);
+ return NULL;
+ }
+ }
+
+ /*
+ * undo context will be allocated when needed (in *_undo_setup)
+ */
+
+ rowreq_ctx->oid_idx.oids = rowreq_ctx->oid_tmp;
+
+ rowreq_ctx->modEoCCNUWhiteListTable_data_list = NULL;
+
+ /*
+ * if we allocated data, call init routine
+ */
+ if (!(rowreq_ctx->rowreq_flags & MFD_ROW_DATA_FROM_USER)) {
+ if (SNMPERR_SUCCESS !=
+ modEoCCNUWhiteListTable_rowreq_ctx_init(rowreq_ctx,
+ user_init_ctx)) {
+ modEoCCNUWhiteListTable_release_rowreq_ctx(rowreq_ctx);
+ rowreq_ctx = NULL;
+ }
+ }
+
+ return rowreq_ctx;
+} /* modEoCCNUWhiteListTable_allocate_rowreq_ctx */
+
+/*
+ * @internal
+ * release resources for a modEoCCNUWhiteListTable_rowreq_ctx
+ */
+/* change from template: added check for non-transient data (as in ipAddressTableInterface) */
+/* change from template: added setting undo to NULL (as in ifTable_interface) */
+void
+modEoCCNUWhiteListTable_release_rowreq_ctx
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx)
+{
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:modEoCCNUWhiteListTable_release_rowreq_ctx", "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ modEoCCNUWhiteListTable_rowreq_ctx_cleanup(rowreq_ctx);
+
+ /*
+ * for non-transient data, don't free data we got from the user
+ */
+ if ((rowreq_ctx->data) &&
+ !(rowreq_ctx->rowreq_flags & MFD_ROW_DATA_FROM_USER)){
+ modEoCCNUWhiteListTable_release_data(rowreq_ctx->data);
+ }
+
+ if (rowreq_ctx->undo){
+ modEoCCNUWhiteListTable_release_data(rowreq_ctx->undo);
+ rowreq_ctx->undo = NULL;
+ }
+
+ /*
+ * free index oid pointer
+ */
+ if (rowreq_ctx->oid_idx.oids != rowreq_ctx->oid_tmp)
+ free(rowreq_ctx->oid_idx.oids);
+
+ SNMP_FREE(rowreq_ctx);
+} /* modEoCCNUWhiteListTable_release_rowreq_ctx */
+
+/**
+ * @internal
+ * wrapper
+ */
+static int
+_mfd_modEoCCNUWhiteListTable_pre_request(netsnmp_mib_handler *handler,
+ netsnmp_handler_registration
+ *reginfo,
+ netsnmp_agent_request_info
+ *agtreq_info,
+ netsnmp_request_info *requests)
+{
+ int rc;
+
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:_mfd_modEoCCNUWhiteListTable_pre_request", "called\n"));
+
+ if (1 != netsnmp_row_merge_status_first(reginfo, agtreq_info)) {
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable",
+ "skipping additional pre_request\n"));
+ return SNMP_ERR_NOERROR;
+ }
+
+ rc = modEoCCNUWhiteListTable_pre_request
+ (modEoCCNUWhiteListTable_if_ctx.user_ctx);
+ if (MFD_SUCCESS != rc) {
+ /*
+ * nothing we can do about it but log it
+ */
+ DEBUGMSGTL(("modEoCCNUWhiteListTable", "error %d from "
+ "modEoCCNUWhiteListTable_pre_request\n", rc));
+ netsnmp_request_set_error_all(requests, SNMP_VALIDATE_ERR(rc));
+ }
+
+ return SNMP_ERR_NOERROR;
+} /* _mfd_modEoCCNUWhiteListTable_pre_request */
+
+/**
+ * @internal
+ * wrapper
+ */
+static int
+_mfd_modEoCCNUWhiteListTable_post_request(netsnmp_mib_handler *handler,
+ netsnmp_handler_registration
+ *reginfo,
+ netsnmp_agent_request_info
+ *agtreq_info,
+ netsnmp_request_info *requests)
+{
+ modEoCCNUWhiteListTable_rowreq_ctx *rowreq_ctx =
+ netsnmp_container_table_row_extract(requests);
+ int rc, packet_rc;
+
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:_mfd_modEoCCNUWhiteListTable_post_request", "called\n"));
+
+ /*
+ * release row context, if deleted
+ */
+ if (rowreq_ctx && (rowreq_ctx->rowreq_flags & MFD_ROW_DELETED))
+ modEoCCNUWhiteListTable_release_rowreq_ctx(rowreq_ctx);
+
+ /*
+ * wait for last call before calling user
+ */
+ if (1 != netsnmp_row_merge_status_last(reginfo, agtreq_info)) {
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable",
+ "waiting for last post_request\n"));
+ return SNMP_ERR_NOERROR;
+ }
+
+ packet_rc = netsnmp_check_all_requests_error(agtreq_info->asp, 0);
+ if ((MFD_SUCCESS != packet_rc) && modEoCCNUWhiteListTable_dirty_get()) {
+ /*
+ * we shouldn't get here. the undo steps should also clear
+ * the dirty flags.
+ */
+ snmp_log(LOG_WARNING,
+ "modEoCCNUWhiteListTable dirty flag set in post_request "
+ "but status != SUCCESS.\n");
+ }
+
+ rc = modEoCCNUWhiteListTable_post_request
+ (modEoCCNUWhiteListTable_if_ctx.user_ctx, packet_rc);
+ if (MFD_SUCCESS != rc) {
+ /*
+ * nothing we can do about it but log it
+ */
+ DEBUGMSGTL(("modEoCCNUWhiteListTable", "error %d from "
+ "modEoCCNUWhiteListTable_post_request\n", rc));
+ }
+
+ return SNMP_ERR_NOERROR;
+} /* _mfd_modEoCCNUWhiteListTable_post_request */
+
+/**
+ * @internal
+ * wrapper
+ */
+static modEoCCNUWhiteListTable_rowreq_ctx *
+_mfd_modEoCCNUWhiteListTable_rowreq_from_index(netsnmp_index * oid_idx,
+ int *rc_ptr)
+{
+ modEoCCNUWhiteListTable_rowreq_ctx *rowreq_ctx;
+ modEoCCNUWhiteListTable_mib_index mib_idx;
+ int rc;
+
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:_mfd_modEoCCNUWhiteListTable_rowreq_from_index", "called\n"));
+
+ if (NULL == rc_ptr)
+ rc_ptr = &rc;
+ *rc_ptr = MFD_SUCCESS;
+
+ memset(&mib_idx, 0x0, sizeof(mib_idx));
+
+ /*
+ * try to parse oid
+ */
+ *rc_ptr = modEoCCNUWhiteListTable_index_from_oid(oid_idx, &mib_idx);
+ if (MFD_SUCCESS != *rc_ptr) {
+ DEBUGMSGT(("modEoCCNUWhiteListTable", "error parsing index\n"));
+ return NULL;
+ }
+
+ /*
+ * allocate new context
+ */
+ rowreq_ctx = modEoCCNUWhiteListTable_allocate_rowreq_ctx(NULL, NULL);
+ if (NULL == rowreq_ctx) {
+ *rc_ptr = MFD_ERROR;
+ return NULL; /* msg already logged */
+ }
+
+ memcpy(&rowreq_ctx->tbl_idx, &mib_idx, sizeof(mib_idx));
+
+ /*
+ * check indexes
+ */
+ *rc_ptr = _modEoCCNUWhiteListTable_check_indexes(rowreq_ctx);
+ if (MFD_SUCCESS != *rc_ptr) {
+ netsnmp_assert((*rc_ptr == SNMP_ERR_NOCREATION) ||
+ (*rc_ptr == SNMP_ERR_INCONSISTENTNAME));
+ modEoCCNUWhiteListTable_release_rowreq_ctx(rowreq_ctx);
+ return NULL;
+ }
+
+ /*
+ * copy indexes
+ */
+ rowreq_ctx->oid_idx.len = oid_idx->len;
+ memcpy(rowreq_ctx->oid_idx.oids, oid_idx->oids,
+ oid_idx->len * sizeof(oid));
+
+ return rowreq_ctx;
+} /* _mfd_modEoCCNUWhiteListTable_rowreq_from_index */
+
+
+/**
+ * @internal
+ * wrapper
+ */
+static int
+_mfd_modEoCCNUWhiteListTable_object_lookup(netsnmp_mib_handler *handler,
+ netsnmp_handler_registration
+ *reginfo,
+ netsnmp_agent_request_info
+ *agtreq_info,
+ netsnmp_request_info *requests)
+{
+ int rc = SNMP_ERR_NOERROR;
+ modEoCCNUWhiteListTable_rowreq_ctx *rowreq_ctx =
+ netsnmp_container_table_row_extract(requests);
+
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:_mfd_modEoCCNUWhiteListTable_object_lookup", "called\n"));
+
+ /*
+ * get our context from mfd
+ * modEoCCNUWhiteListTable_interface_ctx *if_ctx =
+ * (modEoCCNUWhiteListTable_interface_ctx *)reginfo->my_reg_void;
+ */
+
+ if (NULL == rowreq_ctx) {
+ netsnmp_table_request_info *tblreq_info;
+ netsnmp_index oid_idx;
+
+ tblreq_info = netsnmp_extract_table_info(requests);
+ if (NULL == tblreq_info) {
+ snmp_log(LOG_ERR, "request had no table info\n");
+ return MFD_ERROR;
+ }
+
+ /*
+ * try create rowreq
+ */
+ oid_idx.oids = tblreq_info->index_oid;
+ oid_idx.len = tblreq_info->index_oid_len;
+
+ rowreq_ctx =
+ _mfd_modEoCCNUWhiteListTable_rowreq_from_index(&oid_idx, &rc);
+ if (MFD_SUCCESS == rc) {
+ netsnmp_assert(NULL != rowreq_ctx);
+ rowreq_ctx->rowreq_flags |= MFD_ROW_CREATED;
+ /*
+ * add rowreq_ctx to request data lists
+ */
+ netsnmp_container_table_row_insert(requests,
+ (netsnmp_index *)
+ rowreq_ctx);
+ }
+ }
+
+ if (MFD_SUCCESS != rc)
+ netsnmp_request_set_error_all(requests, rc);
+ else
+ modEoCCNUWhiteListTable_row_prep(rowreq_ctx);
+
+ return SNMP_VALIDATE_ERR(rc);
+} /* _mfd_modEoCCNUWhiteListTable_object_lookup */
+
+/***********************************************************************
+ *
+ * GET processing
+ *
+ ***********************************************************************/
+/*
+ * @internal
+ * Retrieve the value for a particular column
+ */
+NETSNMP_STATIC_INLINE int
+_modEoCCNUWhiteListTable_get_column(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx,
+ netsnmp_variable_list * var,
+ int column)
+{
+ int rc = SNMPERR_SUCCESS;
+
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:_mfd_modEoCCNUWhiteListTable_get_column", "called for %d\n", column));
+
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ switch (column) {
+
+ /*
+ * (INDEX) modEoCCNUWhiteListIndex(1)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/R/d/h
+ */
+ case COLUMN_MODEOCCNUWHITELISTINDEX:
+ var->type = ASN_INTEGER;
+ var->val_len = sizeof(long);
+ (*var->val.integer) = rowreq_ctx->tbl_idx.modEoCCNUWhiteListIndex;
+ break;
+
+ /*
+ * modEoCCNUWhiteListMACAddress(2)/MacAddress/ASN_OCTET_STR/char(char)//L/A/W/e/R/d/H
+ */
+ case COLUMN_MODEOCCNUWHITELISTMACADDRESS:
+ if (!
+ (COLUMN_MODEOCCNUWHITELISTMACADDRESS_FLAG & rowreq_ctx->
+ column_exists_flags)) {
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:_mfd_modEoCCNUWhiteListTable_get_column", "column %d (modEoCCNUWhiteListMACAddress) doesn't exist\n", column));
+ return MFD_SKIP;
+ }
+
+ var->type = ASN_OCTET_STR;
+ rc = modEoCCNUWhiteListMACAddress_get(rowreq_ctx,
+ (char **) &var->val.string,
+ &var->val_len);
+ break;
+
+ /*
+ * modEoCCNUWhiteListAuthorization(3)/INTEGER/ASN_INTEGER/long(u_long)//l/A/W/E/r/d/h
+ */
+ case COLUMN_MODEOCCNUWHITELISTAUTHORIZATION:
+ if (!
+ (COLUMN_MODEOCCNUWHITELISTAUTHORIZATION_FLAG & rowreq_ctx->
+ column_exists_flags)) {
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:_mfd_modEoCCNUWhiteListTable_get_column", "column %d (modEoCCNUWhiteListAuthorization) doesn't exist\n", column));
+ return MFD_SKIP;
+ }
+
+ var->val_len = sizeof(u_long);
+ var->type = ASN_INTEGER;
+ rc = modEoCCNUWhiteListAuthorization_get(rowreq_ctx,
+ (u_long *) var->val.
+ string);
+ break;
+
+ /*
+ * modEoCCNUWhiteListRFOutputLevel(4)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/r/d/h
+ */
+ case COLUMN_MODEOCCNUWHITELISTRFOUTPUTLEVEL:
+ if (!
+ (COLUMN_MODEOCCNUWHITELISTRFOUTPUTLEVEL_FLAG & rowreq_ctx->
+ column_exists_flags)) {
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:_mfd_modEoCCNUWhiteListTable_get_column", "column %d (modEoCCNUWhiteListRFOutputLevel) doesn't exist\n", column));
+ return MFD_SKIP;
+ }
+
+ var->val_len = sizeof(long);
+ var->type = ASN_INTEGER;
+ rc = modEoCCNUWhiteListRFOutputLevel_get(rowreq_ctx,
+ (long *) var->val.string);
+ break;
+
+ /*
+ * modEoCCNUWhiteListAutoUpgradeEN(5)/INTEGER/ASN_INTEGER/long(u_long)//l/A/W/E/r/d/h
+ */
+ case COLUMN_MODEOCCNUWHITELISTAUTOUPGRADEEN:
+ if (!
+ (COLUMN_MODEOCCNUWHITELISTAUTOUPGRADEEN_FLAG & rowreq_ctx->
+ column_exists_flags)) {
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:_mfd_modEoCCNUWhiteListTable_get_column", "column %d (modEoCCNUWhiteListAutoUpgradeEN) doesn't exist\n", column));
+ return MFD_SKIP;
+ }
+
+ var->val_len = sizeof(u_long);
+ var->type = ASN_INTEGER;
+ rc = modEoCCNUWhiteListAutoUpgradeEN_get(rowreq_ctx,
+ (u_long *) var->val.
+ string);
+ break;
+
+ /*
+ * modEoCCNUWhiteListRegisterOnlineState(6)/INTEGER/ASN_INTEGER/long(u_long)//l/A/w/E/r/d/h
+ */
+ case COLUMN_MODEOCCNUWHITELISTREGISTERONLINESTATE:
+ if (!
+ (COLUMN_MODEOCCNUWHITELISTREGISTERONLINESTATE_FLAG &
+ rowreq_ctx->column_exists_flags)) {
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:_mfd_modEoCCNUWhiteListTable_get_column", "column %d (modEoCCNUWhiteListRegisterOnlineState) doesn't exist\n", column));
+ return MFD_SKIP;
+ }
+
+ var->val_len = sizeof(u_long);
+ var->type = ASN_INTEGER;
+ rc = modEoCCNUWhiteListRegisterOnlineState_get(rowreq_ctx,
+ (u_long *) var->val.
+ string);
+ break;
+
+ /*
+ * modEoCCNUWhiteListStartTime(7)/TICKS/ASN_TIMETICKS/u_long(u_long)//l/A/W/e/r/d/h
+ */
+ case COLUMN_MODEOCCNUWHITELISTSTARTTIME:
+ if (!
+ (COLUMN_MODEOCCNUWHITELISTSTARTTIME_FLAG & rowreq_ctx->
+ column_exists_flags)) {
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:_mfd_modEoCCNUWhiteListTable_get_column", "column %d (modEoCCNUWhiteListStartTime) doesn't exist\n", column));
+ return MFD_SKIP;
+ }
+
+ var->val_len = sizeof(u_long);
+ var->type = ASN_TIMETICKS;
+ rc = modEoCCNUWhiteListStartTime_get(rowreq_ctx,
+ (u_long *) var->val.string);
+ break;
+
+ /*
+ * modEoCCNUWhiteListEndTime(8)/TICKS/ASN_TIMETICKS/u_long(u_long)//l/A/W/e/r/d/h
+ */
+ case COLUMN_MODEOCCNUWHITELISTENDTIME:
+ if (!
+ (COLUMN_MODEOCCNUWHITELISTENDTIME_FLAG & rowreq_ctx->
+ column_exists_flags)) {
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:_mfd_modEoCCNUWhiteListTable_get_column", "column %d (modEoCCNUWhiteListEndTime) doesn't exist\n", column));
+ return MFD_SKIP;
+ }
+
+ var->val_len = sizeof(u_long);
+ var->type = ASN_TIMETICKS;
+ rc = modEoCCNUWhiteListEndTime_get(rowreq_ctx,
+ (u_long *) var->val.string);
+ break;
+
+ /*
+ * modEoCCNUWhiteListRowStatus(9)/RowStatus/ASN_INTEGER/long(u_long)//l/A/W/E/r/d/h
+ */
+ case COLUMN_MODEOCCNUWHITELISTROWSTATUS:
+ if (!
+ (COLUMN_MODEOCCNUWHITELISTROWSTATUS_FLAG & rowreq_ctx->
+ column_exists_flags)) {
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:_mfd_modEoCCNUWhiteListTable_get_column", "column %d (modEoCCNUWhiteListRowStatus) doesn't exist\n", column));
+ return MFD_SKIP;
+ }
+
+ var->val_len = sizeof(u_long);
+ var->type = ASN_INTEGER;
+ rc = modEoCCNUWhiteListRowStatus_get(rowreq_ctx,
+ (u_long *) var->val.string);
+ break;
+
+ default:
+ if (MODEOCCNUWHITELISTTABLE_MIN_COL <= column
+ && column <= MODEOCCNUWHITELISTTABLE_MAX_COL) {
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:_mfd_modEoCCNUWhiteListTable_get_column", "assume column %d is reserved\n", column));
+ rc = MFD_SKIP;
+ } else {
+ snmp_log(LOG_ERR,
+ "unknown column %d in _modEoCCNUWhiteListTable_get_column\n",
+ column);
+ }
+ break;
+ }
+
+ return rc;
+} /* _modEoCCNUWhiteListTable_get_column */
+
+int
+_mfd_modEoCCNUWhiteListTable_get_values(netsnmp_mib_handler *handler,
+ netsnmp_handler_registration
+ *reginfo,
+ netsnmp_agent_request_info
+ *agtreq_info,
+ netsnmp_request_info *requests)
+{
+ modEoCCNUWhiteListTable_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:modEoCCNUWhiteListTable:_mfd_modEoCCNUWhiteListTable_get_values", "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ DEBUGMSGTL(("9:modEoCCNUWhiteListTable:_mfd_modEoCCNUWhiteListTable_get_values", "exists %p\n", (void *) rowreq_ctx->column_exists_flags));
+
+ 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 = _modEoCCNUWhiteListTable_get_column(rowreq_ctx,
+ requests->requestvb,
+ tri->colnum);
+ if (rc) {
+ if (MFD_SKIP == rc) {
+ requests->requestvb->type = SNMP_NOSUCHINSTANCE;
+ 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_modEoCCNUWhiteListTable_get_values */
+
+NETSNMP_STATIC_INLINE int
+_modEoCCNUWhiteListTable_check_indexes(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx)
+{
+ int rc = SNMPERR_SUCCESS;
+
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:_modEoCCNUWhiteListTable_check_indexes", "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+
+ /*
+ * (INDEX) modEoCCNUWhiteListIndex(1)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/R/d/h
+ */
+ /*
+ * check defined range(s).
+ */
+ if ((SNMPERR_SUCCESS == rc)
+ && ((rowreq_ctx->tbl_idx.modEoCCNUWhiteListIndex < 0)
+ || (rowreq_ctx->tbl_idx.modEoCCNUWhiteListIndex > 10240))
+ ) {
+ rc = SNMP_ERR_WRONGVALUE;
+ }
+ if (MFD_SUCCESS != rc)
+ return rc;
+ rc = modEoCCNUWhiteListIndex_check_index(rowreq_ctx);
+ if (MFD_SUCCESS != rc)
+ return SNMP_ERR_NOCREATION;
+
+ /*
+ * if individual parts look ok, check them as a whole
+ */
+ return
+ modEoCCNUWhiteListTable_validate_index
+ (modEoCCNUWhiteListTable_if_ctx.user_ctx, rowreq_ctx);
+} /* _modEoCCNUWhiteListTable_check_indexes */
+
+/***********************************************************************
+ *
+ * SET processing
+ *
+ ***********************************************************************/
+
+/*----------------------------------------------------------------------
+ *
+ * SET: Syntax checks
+ *
+ *---------------------------------------------------------------------*/
+/*
+ * @internal
+ * Check the syntax for a particular column
+ */
+NETSNMP_STATIC_INLINE int
+_modEoCCNUWhiteListTable_check_column(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx,
+ netsnmp_variable_list * var,
+ int column)
+{
+ int rc = SNMPERR_SUCCESS;
+
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:_modEoCCNUWhiteListTable_check_column", "called for %d\n", column));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ switch (column) {
+ /*
+ * (INDEX) modEoCCNUWhiteListIndex(1)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/R/d/h
+ */
+ case COLUMN_MODEOCCNUWHITELISTINDEX:
+ rc = SNMP_ERR_NOTWRITABLE; /* can not change index of active row */
+ break;
+
+ /*
+ * modEoCCNUWhiteListMACAddress(2)/MacAddress/ASN_OCTET_STR/char(char)//L/A/W/e/R/d/H
+ */
+ case COLUMN_MODEOCCNUWHITELISTMACADDRESS:
+ rc = netsnmp_check_vb_type_and_max_size(var, ASN_OCTET_STR,
+ sizeof(rowreq_ctx->data->
+ modEoCCNUWhiteListMACAddress));
+ /*
+ * check defined range(s).
+ */
+ if ((SNMPERR_SUCCESS == rc)
+ && (var->val_len != 6)
+ ) {
+ rc = SNMP_ERR_WRONGLENGTH;
+ }
+ if (SNMPERR_SUCCESS != rc) {
+ DEBUGMSGTL(("modEoCCNUWhiteListTable:_modEoCCNUWhiteListTable_check_column:modEoCCNUWhiteListMACAddress", "varbind validation failed (eg bad type or size)\n"));
+ } else {
+ rc = modEoCCNUWhiteListMACAddress_check_value(rowreq_ctx,
+ (char *) var->
+ val.string,
+ var->val_len);
+ if ((MFD_SUCCESS != rc) && (MFD_NOT_VALID_EVER != rc)
+ && (MFD_NOT_VALID_NOW != rc)) {
+ snmp_log(LOG_ERR,
+ "bad rc %d from modEoCCNUWhiteListMACAddress_check_value\n",
+ rc);
+ rc = SNMP_ERR_GENERR;
+ }
+ }
+ break;
+
+ /*
+ * modEoCCNUWhiteListAuthorization(3)/INTEGER/ASN_INTEGER/long(u_long)//l/A/W/E/r/d/h
+ */
+ case COLUMN_MODEOCCNUWHITELISTAUTHORIZATION:
+ rc = netsnmp_check_vb_type_and_size(var, ASN_INTEGER,
+ sizeof(rowreq_ctx->data->
+ modEoCCNUWhiteListAuthorization));
+ /*
+ * check that the value is one of defined enums
+ */
+ if ((SNMPERR_SUCCESS == rc)
+ && (*var->val.integer !=
+ MODEOCCNUWHITELISTAUTHORIZATION_NOT_AUTHORIZED)
+ && (*var->val.integer !=
+ MODEOCCNUWHITELISTAUTHORIZATION_AUTHORIZED)
+ ) {
+ rc = SNMP_ERR_WRONGVALUE;
+ }
+ if (SNMPERR_SUCCESS != rc) {
+ DEBUGMSGTL(("modEoCCNUWhiteListTable:_modEoCCNUWhiteListTable_check_column:modEoCCNUWhiteListAuthorization", "varbind validation failed (eg bad type or size)\n"));
+ } else {
+ rc = modEoCCNUWhiteListAuthorization_check_value(rowreq_ctx,
+ *((u_long *)
+ var->val.
+ string));
+ if ((MFD_SUCCESS != rc) && (MFD_NOT_VALID_EVER != rc)
+ && (MFD_NOT_VALID_NOW != rc)) {
+ snmp_log(LOG_ERR,
+ "bad rc %d from modEoCCNUWhiteListAuthorization_check_value\n",
+ rc);
+ rc = SNMP_ERR_GENERR;
+ }
+ }
+ break;
+
+ /*
+ * modEoCCNUWhiteListRFOutputLevel(4)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/r/d/h
+ */
+ case COLUMN_MODEOCCNUWHITELISTRFOUTPUTLEVEL:
+ rc = netsnmp_check_vb_type_and_size(var, ASN_INTEGER,
+ sizeof(rowreq_ctx->data->
+ modEoCCNUWhiteListRFOutputLevel));
+ if (SNMPERR_SUCCESS != rc) {
+ DEBUGMSGTL(("modEoCCNUWhiteListTable:_modEoCCNUWhiteListTable_check_column:modEoCCNUWhiteListRFOutputLevel", "varbind validation failed (eg bad type or size)\n"));
+ } else {
+ rc = modEoCCNUWhiteListRFOutputLevel_check_value(rowreq_ctx,
+ *((long *)
+ var->val.
+ string));
+ if ((MFD_SUCCESS != rc) && (MFD_NOT_VALID_EVER != rc)
+ && (MFD_NOT_VALID_NOW != rc)) {
+ snmp_log(LOG_ERR,
+ "bad rc %d from modEoCCNUWhiteListRFOutputLevel_check_value\n",
+ rc);
+ rc = SNMP_ERR_GENERR;
+ }
+ }
+ break;
+
+ /*
+ * modEoCCNUWhiteListAutoUpgradeEN(5)/INTEGER/ASN_INTEGER/long(u_long)//l/A/W/E/r/d/h
+ */
+ case COLUMN_MODEOCCNUWHITELISTAUTOUPGRADEEN:
+ rc = netsnmp_check_vb_type_and_size(var, ASN_INTEGER,
+ sizeof(rowreq_ctx->data->
+ modEoCCNUWhiteListAutoUpgradeEN));
+ /*
+ * check that the value is one of defined enums
+ */
+ if ((SNMPERR_SUCCESS == rc)
+ && (*var->val.integer !=
+ MODEOCCNUWHITELISTAUTOUPGRADEEN_DISABLE)
+ && (*var->val.integer !=
+ MODEOCCNUWHITELISTAUTOUPGRADEEN_ENABLE)
+ ) {
+ rc = SNMP_ERR_WRONGVALUE;
+ }
+ if (SNMPERR_SUCCESS != rc) {
+ DEBUGMSGTL(("modEoCCNUWhiteListTable:_modEoCCNUWhiteListTable_check_column:modEoCCNUWhiteListAutoUpgradeEN", "varbind validation failed (eg bad type or size)\n"));
+ } else {
+ rc = modEoCCNUWhiteListAutoUpgradeEN_check_value(rowreq_ctx,
+ *((u_long *)
+ var->val.
+ string));
+ if ((MFD_SUCCESS != rc) && (MFD_NOT_VALID_EVER != rc)
+ && (MFD_NOT_VALID_NOW != rc)) {
+ snmp_log(LOG_ERR,
+ "bad rc %d from modEoCCNUWhiteListAutoUpgradeEN_check_value\n",
+ rc);
+ rc = SNMP_ERR_GENERR;
+ }
+ }
+ break;
+
+ /*
+ * modEoCCNUWhiteListRegisterOnlineState(6)/INTEGER/ASN_INTEGER/long(u_long)//l/A/w/E/r/d/h
+ */
+ case COLUMN_MODEOCCNUWHITELISTREGISTERONLINESTATE:
+ rc = SNMP_ERR_NOTWRITABLE;
+ break;
+
+ /*
+ * modEoCCNUWhiteListStartTime(7)/TICKS/ASN_TIMETICKS/u_long(u_long)//l/A/W/e/r/d/h
+ */
+ case COLUMN_MODEOCCNUWHITELISTSTARTTIME:
+ rc = netsnmp_check_vb_type_and_size(var, ASN_TIMETICKS,
+ sizeof(rowreq_ctx->data->
+ modEoCCNUWhiteListStartTime));
+ if (SNMPERR_SUCCESS != rc) {
+ DEBUGMSGTL(("modEoCCNUWhiteListTable:_modEoCCNUWhiteListTable_check_column:modEoCCNUWhiteListStartTime", "varbind validation failed (eg bad type or size)\n"));
+ } else {
+ rc = modEoCCNUWhiteListStartTime_check_value(rowreq_ctx,
+ *((u_long *) var->
+ val.string));
+ if ((MFD_SUCCESS != rc) && (MFD_NOT_VALID_EVER != rc)
+ && (MFD_NOT_VALID_NOW != rc)) {
+ snmp_log(LOG_ERR,
+ "bad rc %d from modEoCCNUWhiteListStartTime_check_value\n",
+ rc);
+ rc = SNMP_ERR_GENERR;
+ }
+ }
+ break;
+
+ /*
+ * modEoCCNUWhiteListEndTime(8)/TICKS/ASN_TIMETICKS/u_long(u_long)//l/A/W/e/r/d/h
+ */
+ case COLUMN_MODEOCCNUWHITELISTENDTIME:
+ rc = netsnmp_check_vb_type_and_size(var, ASN_TIMETICKS,
+ sizeof(rowreq_ctx->data->
+ modEoCCNUWhiteListEndTime));
+ if (SNMPERR_SUCCESS != rc) {
+ DEBUGMSGTL(("modEoCCNUWhiteListTable:_modEoCCNUWhiteListTable_check_column:modEoCCNUWhiteListEndTime", "varbind validation failed (eg bad type or size)\n"));
+ } else {
+ rc = modEoCCNUWhiteListEndTime_check_value(rowreq_ctx,
+ *((u_long *) var->
+ val.string));
+ if ((MFD_SUCCESS != rc) && (MFD_NOT_VALID_EVER != rc)
+ && (MFD_NOT_VALID_NOW != rc)) {
+ snmp_log(LOG_ERR,
+ "bad rc %d from modEoCCNUWhiteListEndTime_check_value\n",
+ rc);
+ rc = SNMP_ERR_GENERR;
+ }
+ }
+ break;
+
+ /*
+ * modEoCCNUWhiteListRowStatus(9)/RowStatus/ASN_INTEGER/long(u_long)//l/A/W/E/r/d/h
+ */
+ case COLUMN_MODEOCCNUWHITELISTROWSTATUS:
+ rc = netsnmp_check_vb_rowstatus_value(var);
+ if (SNMPERR_SUCCESS != rc) {
+ DEBUGMSGTL(("modEoCCNUWhiteListTable:_modEoCCNUWhiteListTable_check_column:modEoCCNUWhiteListRowStatus", "varbind validation failed (eg bad type or size)\n"));
+ } else {
+ rc = modEoCCNUWhiteListRowStatus_check_value(rowreq_ctx,
+ *((u_long *) var->
+ val.string));
+ if ((MFD_SUCCESS != rc) && (MFD_NOT_VALID_EVER != rc)
+ && (MFD_NOT_VALID_NOW != rc)) {
+ snmp_log(LOG_ERR,
+ "bad rc %d from modEoCCNUWhiteListRowStatus_check_value\n",
+ rc);
+ rc = SNMP_ERR_GENERR;
+ }
+ }
+ break;
+
+ default: /** We shouldn't get here */
+ rc = SNMP_ERR_GENERR;
+ snmp_log(LOG_ERR,
+ "unknown column %d in _modEoCCNUWhiteListTable_check_column\n",
+ column);
+ }
+
+ return rc;
+} /* _modEoCCNUWhiteListTable_check_column */
+
+int
+_mfd_modEoCCNUWhiteListTable_check_objects(netsnmp_mib_handler *handler,
+ netsnmp_handler_registration
+ *reginfo,
+ netsnmp_agent_request_info
+ *agtreq_info,
+ netsnmp_request_info *requests)
+{
+ modEoCCNUWhiteListTable_rowreq_ctx *rowreq_ctx =
+ netsnmp_container_table_row_extract(requests);
+ netsnmp_table_request_info *tri;
+ int rc;
+
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:_mfd_modEoCCNUWhiteListTable_check_objects", "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ for (; requests; requests = requests->next) {
+
+ /*
+ * get column number from table request info, and check that column
+ */
+ tri = netsnmp_extract_table_info(requests);
+ if (NULL == tri)
+ continue;
+
+ rc = _modEoCCNUWhiteListTable_check_column(rowreq_ctx,
+ requests->requestvb,
+ tri->colnum);
+ if (rc) {
+ netsnmp_request_set_error(requests, SNMP_VALIDATE_ERR(rc));
+ break;
+ }
+
+ } /* for results */
+
+ return SNMP_ERR_NOERROR;
+} /* _mfd_modEoCCNUWhiteListTable_check_objects */
+
+/*----------------------------------------------------------------------
+ *
+ * SET: check dependencies
+ *
+ *---------------------------------------------------------------------*/
+/*
+ * @internal
+ * Check dependencies wrapper
+ */
+static int
+_mfd_modEoCCNUWhiteListTable_check_dependencies(netsnmp_mib_handler
+ *handler,
+ netsnmp_handler_registration
+ *reginfo,
+ netsnmp_agent_request_info
+ *agtreq_info,
+ netsnmp_request_info
+ *requests)
+{
+ int rc;
+ modEoCCNUWhiteListTable_rowreq_ctx *rowreq_ctx =
+ netsnmp_container_table_row_extract(requests);
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:_mfd_modEoCCNUWhiteListTable_check_dependencies", "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ rc = modEoCCNUWhiteListTable_check_dependencies(rowreq_ctx);
+ if (rc) {
+ DEBUGMSGTL(("modEoCCNUWhiteListTable:mfd", "error %d from "
+ "modEoCCNUWhiteListTable_check_dependencies\n",
+ rc));
+ netsnmp_request_set_error_all(requests, SNMP_VALIDATE_ERR(rc));
+ }
+
+ return SNMP_ERR_NOERROR;
+} /* _mfd_modEoCCNUWhiteListTable_check_dependencies */
+
+
+/*----------------------------------------------------------------------
+ *
+ * SET: Undo setup
+ *
+ *---------------------------------------------------------------------*/
+/*
+ * @internal
+ * Set the value for a particular column
+ */
+NETSNMP_STATIC_INLINE int
+_modEoCCNUWhiteListTable_undo_setup_column
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx, int column)
+{
+ int rc = SNMPERR_SUCCESS;
+
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:_modEoCCNUWhiteListTable_undo_setup_column", "called for %d\n", column));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ switch (column) {
+
+ /*
+ * modEoCCNUWhiteListMACAddress(2)/MacAddress/ASN_OCTET_STR/char(char)//L/A/W/e/R/d/H
+ */
+ case COLUMN_MODEOCCNUWHITELISTMACADDRESS:
+ rowreq_ctx->column_set_flags |=
+ COLUMN_MODEOCCNUWHITELISTMACADDRESS_FLAG;
+ rc = modEoCCNUWhiteListMACAddress_undo_setup(rowreq_ctx);
+ break;
+
+ /*
+ * modEoCCNUWhiteListAuthorization(3)/INTEGER/ASN_INTEGER/long(u_long)//l/A/W/E/r/d/h
+ */
+ case COLUMN_MODEOCCNUWHITELISTAUTHORIZATION:
+ rowreq_ctx->column_set_flags |=
+ COLUMN_MODEOCCNUWHITELISTAUTHORIZATION_FLAG;
+ rc = modEoCCNUWhiteListAuthorization_undo_setup(rowreq_ctx);
+ break;
+
+ /*
+ * modEoCCNUWhiteListRFOutputLevel(4)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/r/d/h
+ */
+ case COLUMN_MODEOCCNUWHITELISTRFOUTPUTLEVEL:
+ rowreq_ctx->column_set_flags |=
+ COLUMN_MODEOCCNUWHITELISTRFOUTPUTLEVEL_FLAG;
+ rc = modEoCCNUWhiteListRFOutputLevel_undo_setup(rowreq_ctx);
+ break;
+
+ /*
+ * modEoCCNUWhiteListAutoUpgradeEN(5)/INTEGER/ASN_INTEGER/long(u_long)//l/A/W/E/r/d/h
+ */
+ case COLUMN_MODEOCCNUWHITELISTAUTOUPGRADEEN:
+ rowreq_ctx->column_set_flags |=
+ COLUMN_MODEOCCNUWHITELISTAUTOUPGRADEEN_FLAG;
+ rc = modEoCCNUWhiteListAutoUpgradeEN_undo_setup(rowreq_ctx);
+ break;
+
+ /*
+ * modEoCCNUWhiteListStartTime(7)/TICKS/ASN_TIMETICKS/u_long(u_long)//l/A/W/e/r/d/h
+ */
+ case COLUMN_MODEOCCNUWHITELISTSTARTTIME:
+ rowreq_ctx->column_set_flags |=
+ COLUMN_MODEOCCNUWHITELISTSTARTTIME_FLAG;
+ rc = modEoCCNUWhiteListStartTime_undo_setup(rowreq_ctx);
+ break;
+
+ /*
+ * modEoCCNUWhiteListEndTime(8)/TICKS/ASN_TIMETICKS/u_long(u_long)//l/A/W/e/r/d/h
+ */
+ case COLUMN_MODEOCCNUWHITELISTENDTIME:
+ rowreq_ctx->column_set_flags |=
+ COLUMN_MODEOCCNUWHITELISTENDTIME_FLAG;
+ rc = modEoCCNUWhiteListEndTime_undo_setup(rowreq_ctx);
+ break;
+
+ /*
+ * modEoCCNUWhiteListRowStatus(9)/RowStatus/ASN_INTEGER/long(u_long)//l/A/W/E/r/d/h
+ */
+ case COLUMN_MODEOCCNUWHITELISTROWSTATUS:
+ rowreq_ctx->column_set_flags |=
+ COLUMN_MODEOCCNUWHITELISTROWSTATUS_FLAG;
+ rc = modEoCCNUWhiteListRowStatus_undo_setup(rowreq_ctx);
+ break;
+
+ default:
+ snmp_log(LOG_ERR,
+ "unknown column %d in _modEoCCNUWhiteListTable_undo_setup_column\n",
+ column);
+ break;
+ }
+
+ return rc;
+} /* _modEoCCNUWhiteListTable_undo_setup_column */
+
+int
+_mfd_modEoCCNUWhiteListTable_undo_setup_allocate(modEoCCNUWhiteListTable_rowreq_ctx *rowreq_ctx)
+{
+ int rc = MFD_SUCCESS;
+
+ if (NULL == rowreq_ctx)
+ return MFD_ERROR;
+
+ /*
+ * other tables share our container/context and call
+ * this function. so we need to check and see if
+ * someone else already allocated data
+ */
+ if (NULL == rowreq_ctx->undo) {
+ rowreq_ctx->undo = modEoCCNUWhiteListTable_allocate_data();
+ if (NULL == rowreq_ctx->undo) {
+ /** msg already logged */
+ rc = SNMP_ERR_RESOURCEUNAVAILABLE;
+ }
+ else {
+ /* TODO: check if something should be done here? */
+ }
+ }
+ ++rowreq_ctx->undo_ref_count;
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:_mfd_modEoCCNUWhiteListTable_undo_setup_allocate",
+ "++undo_refcount = %d\n",rowreq_ctx->undo_ref_count));
+
+ return rc;
+}
+
+/**
+ * @internal
+ * undo setup
+ */
+int
+_mfd_modEoCCNUWhiteListTable_undo_setup(netsnmp_mib_handler *handler,
+ netsnmp_handler_registration
+ *reginfo,
+ netsnmp_agent_request_info
+ *agtreq_info,
+ netsnmp_request_info *requests)
+{
+ int rc;
+ modEoCCNUWhiteListTable_rowreq_ctx *rowreq_ctx =
+ netsnmp_container_table_row_extract(requests);
+
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:_mfd_modEoCCNUWhiteListTable_undo_setup", "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * allocate undo context
+ */
+ rc = _mfd_modEoCCNUWhiteListTable_undo_setup_allocate(rowreq_ctx);
+ if (MFD_SUCCESS != rc) {
+ netsnmp_request_set_error_all(requests, rc);
+ return SNMP_ERR_NOERROR;
+ }
+
+ /*
+ * row undo setup
+ */
+ rowreq_ctx->column_set_flags = 0;
+ rc = modEoCCNUWhiteListTable_undo_setup(rowreq_ctx);
+ if (MFD_SUCCESS != rc) {
+ DEBUGMSGTL(("modEoCCNUWhiteListTable:mfd", "error %d from "
+ "modEoCCNUWhiteListTable_undo_setup\n", rc));
+ netsnmp_request_set_error_all(requests, SNMP_VALIDATE_ERR(rc));
+ } else {
+ /*
+ * column undo setup
+ */
+ netsnmp_table_request_info *tri;
+ for (; requests; requests = requests->next) {
+ /*
+ * set column data
+ */
+ tri = netsnmp_extract_table_info(requests);
+ if (NULL == tri)
+ continue;
+
+ rc = _modEoCCNUWhiteListTable_undo_setup_column(rowreq_ctx,
+ tri->colnum);
+ if (MFD_SUCCESS != rc) {
+ DEBUGMSGTL(("modEoCCNUWhiteListTable:mfd", "error %d from "
+ "modEoCCNUWhiteListTable_undo_setup_column\n",
+ rc));
+ netsnmp_set_request_error(agtreq_info, requests,
+ SNMP_VALIDATE_ERR(rc));
+ }
+ } /* for results */
+ }
+
+ return SNMP_ERR_NOERROR;
+} /* _mfd_modEoCCNUWhiteListTable_undo_setup */
+
+void
+_mfd_modEoCCNUWhiteListTable_undo_setup_release(modEoCCNUWhiteListTable_rowreq_ctx *rowreq_ctx)
+{
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:_mfd_modEoCCNUWhiteListTable_undo_setup_release", "called\n"));
+
+ netsnmp_assert(rowreq_ctx->undo_ref_count > 0);
+ --rowreq_ctx->undo_ref_count;
+ snmp_log(LOG_ERR, "undo_refcount at %d\n", rowreq_ctx->undo_ref_count);
+
+ if (0 == rowreq_ctx->undo_ref_count) {
+ modEoCCNUWhiteListTable_release_data(rowreq_ctx->undo);
+ rowreq_ctx->undo = NULL;
+ }
+}
+
+/**
+ * @internal
+ * undo setup
+ */
+int
+_mfd_modEoCCNUWhiteListTable_undo_cleanup(netsnmp_mib_handler *handler,
+ netsnmp_handler_registration
+ *reginfo,
+ netsnmp_agent_request_info
+ *agtreq_info,
+ netsnmp_request_info *requests)
+{
+ modEoCCNUWhiteListTable_rowreq_ctx *rowreq_ctx =
+ netsnmp_container_table_row_extract(requests);
+ int rc;
+
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:_mfd_modEoCCNUWhiteListTable_undo_cleanup", "called\n"));
+
+ /*
+ * failed row create in early stages has no rowreq_ctx
+ */
+ if (NULL == rowreq_ctx)
+ return MFD_SUCCESS;
+
+ /*
+ * call user cleanup
+ */
+ rc = modEoCCNUWhiteListTable_undo_cleanup(rowreq_ctx);
+ if (MFD_SUCCESS != rc) {
+ /*
+ * nothing we can do about it but log it
+ */
+ DEBUGMSGTL(("modEoCCNUWhiteListTable:mfd", "error %d from "
+ "modEoCCNUWhiteListTable_undo_cleanup\n", rc));
+ }
+
+ /*
+ * release undo context, if needed
+ */
+ _mfd_modEoCCNUWhiteListTable_undo_setup_release(rowreq_ctx);
+
+ return SNMP_ERR_NOERROR;
+} /* _mfd_modEoCCNUWhiteListTable_undo_cleanup */
+
+/*----------------------------------------------------------------------
+ *
+ * SET: Set values
+ *
+ *---------------------------------------------------------------------*/
+/*
+ * @internal
+ * Set the value for a particular column
+ */
+NETSNMP_STATIC_INLINE int
+_modEoCCNUWhiteListTable_set_column(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx,
+ netsnmp_variable_list * var,
+ int column)
+{
+ int rc = SNMPERR_SUCCESS;
+
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:_modEoCCNUWhiteListTable_set_column", "called for %d\n", column));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ switch (column) {
+
+ /*
+ * modEoCCNUWhiteListMACAddress(2)/MacAddress/ASN_OCTET_STR/char(char)//L/A/W/e/R/d/H
+ */
+ case COLUMN_MODEOCCNUWHITELISTMACADDRESS:
+ rowreq_ctx->column_set_flags |=
+ COLUMN_MODEOCCNUWHITELISTMACADDRESS_FLAG;
+ rc = modEoCCNUWhiteListMACAddress_set(rowreq_ctx,
+ (char *) var->val.string,
+ var->val_len);
+ break;
+
+ /*
+ * modEoCCNUWhiteListAuthorization(3)/INTEGER/ASN_INTEGER/long(u_long)//l/A/W/E/r/d/h
+ */
+ case COLUMN_MODEOCCNUWHITELISTAUTHORIZATION:
+ rowreq_ctx->column_set_flags |=
+ COLUMN_MODEOCCNUWHITELISTAUTHORIZATION_FLAG;
+ rc = modEoCCNUWhiteListAuthorization_set(rowreq_ctx,
+ *((u_long *) var->val.
+ string));
+ break;
+
+ /*
+ * modEoCCNUWhiteListRFOutputLevel(4)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/r/d/h
+ */
+ case COLUMN_MODEOCCNUWHITELISTRFOUTPUTLEVEL:
+ rowreq_ctx->column_set_flags |=
+ COLUMN_MODEOCCNUWHITELISTRFOUTPUTLEVEL_FLAG;
+ rc = modEoCCNUWhiteListRFOutputLevel_set(rowreq_ctx,
+ *((long *) var->val.
+ string));
+ break;
+
+ /*
+ * modEoCCNUWhiteListAutoUpgradeEN(5)/INTEGER/ASN_INTEGER/long(u_long)//l/A/W/E/r/d/h
+ */
+ case COLUMN_MODEOCCNUWHITELISTAUTOUPGRADEEN:
+ rowreq_ctx->column_set_flags |=
+ COLUMN_MODEOCCNUWHITELISTAUTOUPGRADEEN_FLAG;
+ rc = modEoCCNUWhiteListAutoUpgradeEN_set(rowreq_ctx,
+ *((u_long *) var->val.
+ string));
+ break;
+
+ /*
+ * modEoCCNUWhiteListStartTime(7)/TICKS/ASN_TIMETICKS/u_long(u_long)//l/A/W/e/r/d/h
+ */
+ case COLUMN_MODEOCCNUWHITELISTSTARTTIME:
+ rowreq_ctx->column_set_flags |=
+ COLUMN_MODEOCCNUWHITELISTSTARTTIME_FLAG;
+ rc = modEoCCNUWhiteListStartTime_set(rowreq_ctx,
+ *((u_long *) var->val.
+ string));
+ break;
+
+ /*
+ * modEoCCNUWhiteListEndTime(8)/TICKS/ASN_TIMETICKS/u_long(u_long)//l/A/W/e/r/d/h
+ */
+ case COLUMN_MODEOCCNUWHITELISTENDTIME:
+ rowreq_ctx->column_set_flags |=
+ COLUMN_MODEOCCNUWHITELISTENDTIME_FLAG;
+ rc = modEoCCNUWhiteListEndTime_set(rowreq_ctx,
+ *((u_long *) var->val.string));
+ break;
+
+ /*
+ * modEoCCNUWhiteListRowStatus(9)/RowStatus/ASN_INTEGER/long(u_long)//l/A/W/E/r/d/h
+ */
+ case COLUMN_MODEOCCNUWHITELISTROWSTATUS:
+ rowreq_ctx->column_set_flags |=
+ COLUMN_MODEOCCNUWHITELISTROWSTATUS_FLAG;
+ rc = modEoCCNUWhiteListRowStatus_set(rowreq_ctx,
+ *((u_long *) var->val.
+ string));
+ break;
+
+ default:
+ snmp_log(LOG_ERR,
+ "unknown column %d in _modEoCCNUWhiteListTable_set_column\n",
+ column);
+ rc = SNMP_ERR_GENERR;
+ break;
+ }
+
+ return rc;
+} /* _modEoCCNUWhiteListTable_set_column */
+
+int
+_mfd_modEoCCNUWhiteListTable_set_values(netsnmp_mib_handler *handler,
+ netsnmp_handler_registration
+ *reginfo,
+ netsnmp_agent_request_info
+ *agtreq_info,
+ netsnmp_request_info *requests)
+{
+ modEoCCNUWhiteListTable_rowreq_ctx *rowreq_ctx =
+ netsnmp_container_table_row_extract(requests);
+ netsnmp_table_request_info *tri;
+ int rc = SNMP_ERR_NOERROR;
+
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:_mfd_modEoCCNUWhiteListTable_set_values", "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ rowreq_ctx->column_set_flags = 0;
+ for (; requests; requests = requests->next) {
+ /*
+ * set column data
+ */
+ tri = netsnmp_extract_table_info(requests);
+ if (NULL == tri)
+ continue;
+
+ rc = _modEoCCNUWhiteListTable_set_column(rowreq_ctx,
+ requests->requestvb,
+ tri->colnum);
+ if (MFD_SUCCESS != rc) {
+ DEBUGMSGTL(("modEoCCNUWhiteListTable:mfd", "error %d from "
+ "modEoCCNUWhiteListTable_set_column\n", rc));
+ netsnmp_set_request_error(agtreq_info, requests,
+ SNMP_VALIDATE_ERR(rc));
+ }
+ } /* for results */
+
+ return SNMP_ERR_NOERROR;
+} /* _mfd_modEoCCNUWhiteListTable_set_values */
+
+/*----------------------------------------------------------------------
+ *
+ * SET: commit
+ *
+ *---------------------------------------------------------------------*/
+/**
+ * @internal
+ * commit the values
+ */
+int
+_mfd_modEoCCNUWhiteListTable_commit(netsnmp_mib_handler *handler,
+ netsnmp_handler_registration *reginfo,
+ netsnmp_agent_request_info
+ *agtreq_info,
+ netsnmp_request_info *requests)
+{
+ int rc;
+ modEoCCNUWhiteListTable_rowreq_ctx *rowreq_ctx =
+ netsnmp_container_table_row_extract(requests);
+
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:_mfd_modEoCCNUWhiteListTable_commit", "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ rc = modEoCCNUWhiteListTable_commit(rowreq_ctx);
+ if (MFD_SUCCESS != rc) {
+ DEBUGMSGTL(("modEoCCNUWhiteListTable:mfd", "error %d from "
+ "modEoCCNUWhiteListTable_commit\n", rc));
+ netsnmp_request_set_error_all(requests, SNMP_VALIDATE_ERR(rc));
+ }
+
+ if (rowreq_ctx->rowreq_flags & MFD_ROW_DIRTY) {
+ /*
+ * if we successfully commited this row, set the dirty flag. Use the
+ * current value + 1 (i.e. dirty = # rows changed).
+ * this is checked in post_request...
+ */
+ modEoCCNUWhiteListTable_dirty_set(modEoCCNUWhiteListTable_dirty_get() + 1); /* set table dirty flag */
+ }
+
+ return SNMP_ERR_NOERROR;
+}
+
+int
+_mfd_modEoCCNUWhiteListTable_undo_commit(netsnmp_mib_handler *handler,
+ netsnmp_handler_registration
+ *reginfo,
+ netsnmp_agent_request_info
+ *agtreq_info,
+ netsnmp_request_info *requests)
+{
+ int rc;
+ modEoCCNUWhiteListTable_rowreq_ctx *rowreq_ctx =
+ netsnmp_container_table_row_extract(requests);
+
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:_mfd_modEoCCNUWhiteListTable_undo_commit", "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ if (rowreq_ctx->rowreq_flags & MFD_ROW_DIRTY) {
+ u_int d = modEoCCNUWhiteListTable_dirty_get();
+
+ netsnmp_assert(d != 0);
+ if (d)
+ modEoCCNUWhiteListTable_dirty_set(d - 1);
+ }
+
+ rc = modEoCCNUWhiteListTable_undo_commit(rowreq_ctx);
+ if (MFD_SUCCESS != rc) {
+ /*
+ * nothing we can do about it but log it
+ */
+ DEBUGMSGTL(("modEoCCNUWhiteListTable:mfd", "error %d from "
+ "modEoCCNUWhiteListTable_undo_commit\n", rc));
+ }
+
+ if (rowreq_ctx->rowreq_flags & MFD_ROW_DIRTY) {
+ snmp_log(LOG_WARNING,
+ "modEoCCNUWhiteListTable row dirty flag still set after undo_commit\n");
+ rowreq_ctx->rowreq_flags &= ~MFD_ROW_DIRTY;
+ }
+
+ return SNMP_ERR_NOERROR;
+} /* _mfd_modEoCCNUWhiteListTable_commit */
+
+/*----------------------------------------------------------------------
+ *
+ * SET: Undo
+ *
+ *---------------------------------------------------------------------*/
+/**
+ * @internal
+ * undo the value for a particular column
+ */
+NETSNMP_STATIC_INLINE int
+_modEoCCNUWhiteListTable_undo_column(modEoCCNUWhiteListTable_rowreq_ctx *
+ rowreq_ctx,
+ netsnmp_variable_list * var,
+ int column)
+{
+ int rc = SNMPERR_SUCCESS;
+
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:_modEoCCNUWhiteListTable_undo_column", "called for %d\n", column));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ switch (column) {
+
+ /*
+ * modEoCCNUWhiteListMACAddress(2)/MacAddress/ASN_OCTET_STR/char(char)//L/A/W/e/R/d/H
+ */
+ case COLUMN_MODEOCCNUWHITELISTMACADDRESS:
+ rc = modEoCCNUWhiteListMACAddress_undo(rowreq_ctx);
+ break;
+
+ /*
+ * modEoCCNUWhiteListAuthorization(3)/INTEGER/ASN_INTEGER/long(u_long)//l/A/W/E/r/d/h
+ */
+ case COLUMN_MODEOCCNUWHITELISTAUTHORIZATION:
+ rc = modEoCCNUWhiteListAuthorization_undo(rowreq_ctx);
+ break;
+
+ /*
+ * modEoCCNUWhiteListRFOutputLevel(4)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/r/d/h
+ */
+ case COLUMN_MODEOCCNUWHITELISTRFOUTPUTLEVEL:
+ rc = modEoCCNUWhiteListRFOutputLevel_undo(rowreq_ctx);
+ break;
+
+ /*
+ * modEoCCNUWhiteListAutoUpgradeEN(5)/INTEGER/ASN_INTEGER/long(u_long)//l/A/W/E/r/d/h
+ */
+ case COLUMN_MODEOCCNUWHITELISTAUTOUPGRADEEN:
+ rc = modEoCCNUWhiteListAutoUpgradeEN_undo(rowreq_ctx);
+ break;
+
+ /*
+ * modEoCCNUWhiteListStartTime(7)/TICKS/ASN_TIMETICKS/u_long(u_long)//l/A/W/e/r/d/h
+ */
+ case COLUMN_MODEOCCNUWHITELISTSTARTTIME:
+ rc = modEoCCNUWhiteListStartTime_undo(rowreq_ctx);
+ break;
+
+ /*
+ * modEoCCNUWhiteListEndTime(8)/TICKS/ASN_TIMETICKS/u_long(u_long)//l/A/W/e/r/d/h
+ */
+ case COLUMN_MODEOCCNUWHITELISTENDTIME:
+ rc = modEoCCNUWhiteListEndTime_undo(rowreq_ctx);
+ break;
+
+ /*
+ * modEoCCNUWhiteListRowStatus(9)/RowStatus/ASN_INTEGER/long(u_long)//l/A/W/E/r/d/h
+ */
+ case COLUMN_MODEOCCNUWHITELISTROWSTATUS:
+ rc = modEoCCNUWhiteListRowStatus_undo(rowreq_ctx);
+ break;
+
+ default:
+ snmp_log(LOG_ERR,
+ "unknown column %d in _modEoCCNUWhiteListTable_undo_column\n",
+ column);
+ break;
+ }
+
+ return rc;
+} /* _modEoCCNUWhiteListTable_undo_column */
+
+int
+_mfd_modEoCCNUWhiteListTable_undo_values(netsnmp_mib_handler *handler,
+ netsnmp_handler_registration
+ *reginfo,
+ netsnmp_agent_request_info
+ *agtreq_info,
+ netsnmp_request_info *requests)
+{
+ int rc;
+ modEoCCNUWhiteListTable_rowreq_ctx *rowreq_ctx =
+ netsnmp_container_table_row_extract(requests);
+ netsnmp_table_request_info *tri;
+
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:_mfd_modEoCCNUWhiteListTable_undo_values", "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ rc = modEoCCNUWhiteListTable_undo(rowreq_ctx);
+ if (MFD_SUCCESS != rc) {
+ /*
+ * nothing we can do about it but log it
+ */
+ DEBUGMSGTL(("modEoCCNUWhiteListTable:mfd", "error %d from "
+ "modEoCCNUWhiteListTable_undo\n", rc));
+ }
+
+ for (; requests; requests = requests->next) {
+ /*
+ * set column data
+ */
+ tri = netsnmp_extract_table_info(requests);
+ if (NULL == tri)
+ continue;
+
+ rc = _modEoCCNUWhiteListTable_undo_column(rowreq_ctx,
+ requests->requestvb,
+ tri->colnum);
+ if (MFD_SUCCESS != rc) {
+ /*
+ * nothing we can do about it but log it
+ */
+ DEBUGMSGTL(("modEoCCNUWhiteListTable:mfd", "error %d from "
+ "modEoCCNUWhiteListTable_undo_column\n", rc));
+ }
+ } /* for results */
+
+ return SNMP_ERR_NOERROR;
+} /* _mfd_modEoCCNUWhiteListTable_undo_values */
+
+/*----------------------------------------------------------------------
+ *
+ * SET: irreversible commit
+ *
+ *---------------------------------------------------------------------*/
+/**
+ * @internal
+ * commit irreversible actions
+ */
+int
+_mfd_modEoCCNUWhiteListTable_irreversible_commit(netsnmp_mib_handler
+ *handler,
+ netsnmp_handler_registration
+ *reginfo,
+ netsnmp_agent_request_info
+ *agtreq_info,
+ netsnmp_request_info
+ *requests)
+{
+ modEoCCNUWhiteListTable_rowreq_ctx *rowreq_ctx =
+ netsnmp_container_table_row_extract(requests);
+
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:_mfd_modEoCCNUWhiteListTable_irreversible:commit", "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * check for and handle row creation/deletion
+ * and update column exist flags...
+ */
+ if (rowreq_ctx->rowreq_flags & MFD_ROW_DELETED) {
+ if (!(rowreq_ctx->rowreq_flags & MFD_ROW_CREATED))
+ CONTAINER_REMOVE(modEoCCNUWhiteListTable_if_ctx.container,
+ rowreq_ctx);
+ } else {
+ if (rowreq_ctx->column_set_flags) {
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:_mfd_irreversible_commit", "updating exists (%p) w/set (%p) = %p\n", rowreq_ctx->column_exists_flags, rowreq_ctx->column_set_flags, (rowreq_ctx->column_exists_flags | rowreq_ctx->column_set_flags)));
+ rowreq_ctx->column_exists_flags |=
+ rowreq_ctx->column_set_flags;
+ rowreq_ctx->column_set_flags = 0;
+ }
+ if (rowreq_ctx->rowreq_flags & MFD_ROW_CREATED) {
+ rowreq_ctx->rowreq_flags &= ~MFD_ROW_CREATED;
+ CONTAINER_INSERT(modEoCCNUWhiteListTable_if_ctx.container,
+ rowreq_ctx);
+ }
+ }
+
+ return SNMP_ERR_NOERROR;
+} /* _mfd_modEoCCNUWhiteListTable_irreversible_commit */
+
+/***********************************************************************
+ *
+ * DATA ACCESS
+ *
+ ***********************************************************************/
+static void _container_free(netsnmp_container * container);
+
+/**
+ * @internal
+ */
+static int
+_cache_load(netsnmp_cache * cache, void *vmagic)
+{
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:_cache_load",
+ "called\n"));
+
+ if ((NULL == cache) || (NULL == cache->magic)) {
+ snmp_log(LOG_ERR,
+ "invalid cache for modEoCCNUWhiteListTable_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
+ */
+ /* do not load cache if new row is currently being added */
+ if (adding_row){
+ snmp_log(LOG_ERR, "skipping modEoCCNUWhiteListTable_cache_load, row adding in progress\n");
+ return SNMP_ERR_NOERROR;
+ } else {
+ return modEoCCNUWhiteListTable_container_load((netsnmp_container *)
+ cache->magic);
+ }
+} /* _cache_load */
+
+/**
+ * @internal
+ */
+static void
+_cache_free(netsnmp_cache * cache, void *magic)
+{
+ netsnmp_container *container;
+
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:_cache_free",
+ "called\n"));
+
+ if ((NULL == cache) || (NULL == cache->magic)) {
+ snmp_log(LOG_ERR,
+ "invalid cache in modEoCCNUWhiteListTable_cache_free\n");
+ return;
+ }
+
+ container = (netsnmp_container *) cache->magic;
+ /* do not free cache if new row is currently being added */
+ if (!adding_row){
+ _container_free(container);
+ } else {
+ snmp_log(LOG_ERR, "skipping modEoCCNUWhiteListTable_cache_free, row adding in progress\n");
+ }
+} /* _cache_free */
+
+/**
+ * @internal
+ */
+static void
+_container_item_free(modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx,
+ void *context)
+{
+ char key_buffer[LIBSPID_KEY_MAX_LEN];
+ int ret;
+
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:_container_item_free",
+ "called\n"));
+
+ if (NULL == rowreq_ctx)
+ return;
+
+ /* convert MAC address from bin to string to serve as key for removing */
+ ret = libspid_mac_bin_to_str(rowreq_ctx->data->modEoCCNUWhiteListMACAddress, key_buffer);
+ if (LIBSPID_SUCCESS != ret){
+ snmp_log(LOG_ERR, "libspid_mac_bin_to_str error\n");
+ }
+
+ /* remove MAC address of current item from internal storage list */
+ if (NULL != se_find_slist("mod_eoc_white_list")){
+ ret = se_remove_label_from_slist("mod_eoc_white_list", key_buffer);
+ if (ret == SE_DNE){
+ snmp_log(LOG_ERR, "Error! MAC address not found in the table!\n");
+ }
+ } else {
+ snmp_log(LOG_ERR, "Trying to delete from empty MAC address list!\n");
+ }
+
+ modEoCCNUWhiteListTable_release_rowreq_ctx(rowreq_ctx);
+} /* _container_item_free */
+
+/**
+ * @internal
+ */
+static void
+_container_free(netsnmp_container * container)
+{
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:_container_free",
+ "called\n"));
+
+ if (NULL == container) {
+ snmp_log(LOG_ERR,
+ "invalid container in modEoCCNUWhiteListTable_container_free\n");
+ return;
+ }
+
+ /*
+ * call user code
+ */
+ modEoCCNUWhiteListTable_container_free(container);
+
+ /*
+ * free all items. inefficient, but easy.
+ */
+ CONTAINER_CLEAR(container,
+ (netsnmp_container_obj_func *) _container_item_free,
+ NULL);
+} /* _container_free */
+
+/**
+ * @internal
+ * initialize the container with functions or wrappers
+ */
+void
+_modEoCCNUWhiteListTable_container_init
+ (modEoCCNUWhiteListTable_interface_ctx * if_ctx)
+{
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:_modEoCCNUWhiteListTable_container_init", "called\n"));
+
+ /*
+ * cache init
+ */
+ if_ctx->cache = netsnmp_cache_create(30, /* timeout in seconds */
+ _cache_load, _cache_free,
+ modEoCCNUWhiteListTable_oid,
+ modEoCCNUWhiteListTable_oid_size);
+
+ if (NULL == if_ctx->cache) {
+ snmp_log(LOG_ERR,
+ "error creating cache for modEoCCNUWhiteListTable\n");
+ return;
+ }
+
+ if_ctx->cache->flags = NETSNMP_CACHE_DONT_INVALIDATE_ON_SET;
+
+ modEoCCNUWhiteListTable_container_init(&if_ctx->container,
+ if_ctx->cache);
+ if (NULL == if_ctx->container)
+ if_ctx->container =
+ netsnmp_container_find
+ ("modEoCCNUWhiteListTable:table_container");
+ if (NULL == if_ctx->container) {
+ snmp_log(LOG_ERR, "error creating container in "
+ "modEoCCNUWhiteListTable_container_init\n");
+ return;
+ }
+
+ if (NULL != if_ctx->cache)
+ if_ctx->cache->magic = (void *) if_ctx->container;
+} /* _modEoCCNUWhiteListTable_container_init */
+
+/**
+ * @internal
+ * shutdown the container with functions or wrappers
+ */
+void
+_modEoCCNUWhiteListTable_container_shutdown
+ (modEoCCNUWhiteListTable_interface_ctx * if_ctx)
+{
+ DEBUGMSGTL(("internal:modEoCCNUWhiteListTable:_modEoCCNUWhiteListTable_container_shutdown", "called\n"));
+
+ modEoCCNUWhiteListTable_container_shutdown(if_ctx->container);
+
+ _container_free(if_ctx->container);
+
+} /* _modEoCCNUWhiteListTable_container_shutdown */
+
+
+modEoCCNUWhiteListTable_rowreq_ctx *
+modEoCCNUWhiteListTable_row_find_by_mib_index
+ (modEoCCNUWhiteListTable_mib_index * mib_idx)
+{
+ modEoCCNUWhiteListTable_rowreq_ctx *rowreq_ctx;
+ oid oid_tmp[MAX_OID_LEN];
+ netsnmp_index oid_idx;
+ int rc;
+
+ /*
+ * set up storage for OID
+ */
+ oid_idx.oids = oid_tmp;
+ oid_idx.len = sizeof(oid_tmp) / sizeof(oid);
+
+ /*
+ * convert
+ */
+ rc = modEoCCNUWhiteListTable_index_to_oid(&oid_idx, mib_idx);
+ if (MFD_SUCCESS != rc)
+ return NULL;
+
+ rowreq_ctx =
+ CONTAINER_FIND(modEoCCNUWhiteListTable_if_ctx.container, &oid_idx);
+
+ return rowreq_ctx;
+}
+
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable_interface.h b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable_interface.h
new file mode 100644
index 0000000000..9e03f56657
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable_interface.h
@@ -0,0 +1,104 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ * version : 15899 $ of $
+ *
+ * $Id:$
+ */
+/** @ingroup 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 MODEOCCNUWHITELISTTABLE_INTERFACE_H
+#define MODEOCCNUWHITELISTTABLE_INTERFACE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#include "modEoCCNUWhiteListTable.h"
+
+
+ /*
+ ********************************************************************
+ * Table declarations
+ */
+
+ /*
+ * PUBLIC interface initialization routine
+ */
+ void
+ _modEoCCNUWhiteListTable_initialize_interface
+ (modEoCCNUWhiteListTable_registration * user_ctx, u_long flags);
+ void
+ _modEoCCNUWhiteListTable_shutdown_interface
+ (modEoCCNUWhiteListTable_registration * user_ctx);
+
+ modEoCCNUWhiteListTable_registration
+ *modEoCCNUWhiteListTable_registration_get(void);
+
+ modEoCCNUWhiteListTable_registration
+ *modEoCCNUWhiteListTable_registration_set
+ (modEoCCNUWhiteListTable_registration * newreg);
+
+ netsnmp_container *modEoCCNUWhiteListTable_container_get(void);
+ int modEoCCNUWhiteListTable_container_size(void);
+
+ u_int modEoCCNUWhiteListTable_dirty_get(void);
+ void modEoCCNUWhiteListTable_dirty_set(u_int status);
+
+ modEoCCNUWhiteListTable_data *
+ modEoCCNUWhiteListTable_allocate_data (void);
+ /* TEMP: added data as an argument (as in ipAddressTableInterface) */
+ modEoCCNUWhiteListTable_rowreq_ctx
+ *modEoCCNUWhiteListTable_allocate_rowreq_ctx(modEoCCNUWhiteListTable_data *, void *);
+ void
+ modEoCCNUWhiteListTable_release_rowreq_ctx
+ (modEoCCNUWhiteListTable_rowreq_ctx * rowreq_ctx);
+
+ int modEoCCNUWhiteListTable_index_to_oid(netsnmp_index *
+ oid_idx,
+ modEoCCNUWhiteListTable_mib_index
+ * mib_idx);
+ int modEoCCNUWhiteListTable_index_from_oid(netsnmp_index *
+ oid_idx,
+ modEoCCNUWhiteListTable_mib_index
+ * mib_idx);
+
+ /*
+ * access to certain internals. use with caution!
+ */
+ void
+ modEoCCNUWhiteListTable_valid_columns_set(netsnmp_column_info *vc);
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* MODEOCCNUWHITELISTTABLE_INTERFACE_H */
+/** @} */
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable_oids.h b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable_oids.h
new file mode 100644
index 0000000000..63b7336da4
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-eoc-mib/modEoCCNUGroup/modEoCCNUWhiteListTable/modEoCCNUWhiteListTable_oids.h
@@ -0,0 +1,71 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ * : generic-table-oids.m2c 12855 2005-09-27 15:56:08Z rstory $
+ *
+ * $Id:$
+ */
+#ifndef MODEOCCNUWHITELISTTABLE_OIDS_H
+#define MODEOCCNUWHITELISTTABLE_OIDS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+ /* definitions for scalars added to table modEoCCNUWhiteListTable */
+#define MODEOCCNUWHITELISTAMOUNTLIMITATION_OID 1,3,6,1,4,1,22764,3,1,5,1,1
+#define MODEOCCNUWHITELISTREGISTEREDAMOUNT_OID 1,3,6,1,4,1,22764,3,1,5,1,2
+ /*
+ * column number definitions for table modEoCCNUWhiteListTable
+ */
+#define MODEOCCNUWHITELISTTABLE_OID 1,3,6,1,4,1,22764,3,1,5,1,6
+
+#define COLUMN_MODEOCCNUWHITELISTINDEX 1
+#define COLUMN_MODEOCCNUWHITELISTINDEX_FLAG (0x1 << 0)
+
+#define COLUMN_MODEOCCNUWHITELISTMACADDRESS 2
+#define COLUMN_MODEOCCNUWHITELISTMACADDRESS_FLAG (0x1 << 1)
+
+#define COLUMN_MODEOCCNUWHITELISTAUTHORIZATION 3
+#define COLUMN_MODEOCCNUWHITELISTAUTHORIZATION_FLAG (0x1 << 2)
+
+#define COLUMN_MODEOCCNUWHITELISTRFOUTPUTLEVEL 4
+#define COLUMN_MODEOCCNUWHITELISTRFOUTPUTLEVEL_FLAG (0x1 << 3)
+
+#define COLUMN_MODEOCCNUWHITELISTAUTOUPGRADEEN 5
+#define COLUMN_MODEOCCNUWHITELISTAUTOUPGRADEEN_FLAG (0x1 << 4)
+
+#define COLUMN_MODEOCCNUWHITELISTREGISTERONLINESTATE 6
+#define COLUMN_MODEOCCNUWHITELISTREGISTERONLINESTATE_FLAG (0x1 << 5)
+
+#define COLUMN_MODEOCCNUWHITELISTSTARTTIME 7
+#define COLUMN_MODEOCCNUWHITELISTSTARTTIME_FLAG (0x1 << 6)
+
+#define COLUMN_MODEOCCNUWHITELISTENDTIME 8
+#define COLUMN_MODEOCCNUWHITELISTENDTIME_FLAG (0x1 << 7)
+
+#define COLUMN_MODEOCCNUWHITELISTROWSTATUS 9
+#define COLUMN_MODEOCCNUWHITELISTROWSTATUS_FLAG (0x1 << 8)
+
+
+#define MODEOCCNUWHITELISTTABLE_MIN_COL COLUMN_MODEOCCNUWHITELISTINDEX
+#define MODEOCCNUWHITELISTTABLE_MAX_COL COLUMN_MODEOCCNUWHITELISTROWSTATUS
+
+
+ /*
+ * TODO:405:r: Review MODEOCCNUWHITELISTTABLE_SETTABLE_COLS macro.
+ * OR together all the writable cols.
+ */
+#define MODEOCCNUWHITELISTTABLE_SETTABLE_COLS (COLUMN_MODEOCCNUWHITELISTINDEX_FLAG | COLUMN_MODEOCCNUWHITELISTMACADDRESS_FLAG | COLUMN_MODEOCCNUWHITELISTAUTHORIZATION_FLAG | COLUMN_MODEOCCNUWHITELISTRFOUTPUTLEVEL_FLAG | COLUMN_MODEOCCNUWHITELISTAUTOUPGRADEEN_FLAG | COLUMN_MODEOCCNUWHITELISTREGISTERONLINESTATE_FLAG | COLUMN_MODEOCCNUWHITELISTSTARTTIME_FLAG | COLUMN_MODEOCCNUWHITELISTENDTIME_FLAG | COLUMN_MODEOCCNUWHITELISTROWSTATUS_FLAG)
+ /*
+ * TODO:405:r: Review MODEOCCNUWHITELISTTABLE_REQUIRED_COLS macro.
+ * OR together all the required rows for row creation.
+ * default is writable cols w/out defaults.
+ */
+#define MODEOCCNUWHITELISTTABLE_REQUIRED_COLS (COLUMN_MODEOCCNUWHITELISTMACADDRESS_FLAG | COLUMN_MODEOCCNUWHITELISTAUTHORIZATION_FLAG | COLUMN_MODEOCCNUWHITELISTRFOUTPUTLEVEL_FLAG| COLUMN_MODEOCCNUWHITELISTAUTOUPGRADEEN_FLAG | COLUMN_MODEOCCNUWHITELISTSTARTTIME_FLAG | COLUMN_MODEOCCNUWHITELISTENDTIME_FLAG | COLUMN_MODEOCCNUWHITELISTROWSTATUS_FLAG)
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* MODEOCCNUWHITELISTTABLE_OIDS_H */