2
* Note: this file originally auto-generated by mib2c using
3
* version : 1.48 $ of : mfd-top.m2c,v $
5
* $Id: ipv4InterfaceTable.c,v 1.3.2.1 2006/01/25 16:26:39 dts12 Exp $
7
/** \page MFD helper for ipv4InterfaceTable
9
* \section intro Introduction
14
* standard Net-SNMP includes
16
#include <net-snmp/net-snmp-config.h>
17
#include <net-snmp/net-snmp-includes.h>
18
#include <net-snmp/agent/net-snmp-agent-includes.h>
21
* include our parent header
23
#include "ipv4InterfaceTable.h"
25
#include <net-snmp/agent/mib_modules.h>
27
#include "ipv4InterfaceTable_interface.h"
29
oid ipv4InterfaceTable_oid[] = { IPV4INTERFACETABLE_OID };
30
int ipv4InterfaceTable_oid_size =
31
OID_LENGTH(ipv4InterfaceTable_oid);
33
ipv4InterfaceTable_registration ipv4InterfaceTable_user_context;
35
void initialize_table_ipv4InterfaceTable(void);
36
void shutdown_table_ipv4InterfaceTable(void);
40
* Initializes the ipv4InterfaceTable module
43
init_ipv4InterfaceTable(void)
45
DEBUGMSGTL(("verbose:ipv4InterfaceTable:init_ipv4InterfaceTable",
49
* TODO:300:o: Perform ipv4InterfaceTable one-time module initialization.
53
* we depend on the ifTable, so we put our init in with it
54
* to guarantee order of execution.
59
* last changed should be 0 at startup
61
ipv4InterfaceTable_lastChange_set(0);
63
} /* init_ipv4InterfaceTable */
66
* Shut-down the ipv4InterfaceTable module (agent is exiting)
69
shutdown_ipv4InterfaceTable(void)
71
if (should_init("ipv4InterfaceTable"))
72
shutdown_table_ipv4InterfaceTable();
77
* Initialize the table ipv4InterfaceTable
78
* (Define its contents and how it's structured)
81
initialize_table_ipv4InterfaceTable(void)
83
ipv4InterfaceTable_registration *user_context;
86
DEBUGMSGTL(("verbose:ipv4InterfaceTable:initialize_table_ipv4InterfaceTable", "called\n"));
89
* TODO:301:o: Perform ipv4InterfaceTable one-time table initialization.
93
* TODO:302:o: |->Initialize ipv4InterfaceTable user context
94
* if you'd like to pass in a pointer to some data for this
95
* table, allocate or set it up here.
98
* a netsnmp_data_list is a simple way to store void pointers. A simple
99
* string token is used to add, find or remove pointers.
102
netsnmp_create_data_list("ipv4InterfaceTable", NULL, NULL);
105
* No support for any flags yet, but in the future you would
106
* set any flags here.
111
* call interface initialization code
113
_ipv4InterfaceTable_initialize_interface(user_context, flags);
114
} /* initialize_table_ipv4InterfaceTable */
117
* Shutdown the table ipv4InterfaceTable
120
shutdown_table_ipv4InterfaceTable(void)
123
* call interface shutdown code
125
_ipv4InterfaceTable_shutdown_interface
126
(&ipv4InterfaceTable_user_context);
130
* extra context initialization (eg default values)
132
* @param rowreq_ctx : row request context
133
* @param user_init_ctx : void pointer for user (parameter to rowreq_ctx_allocate)
135
* @retval MFD_SUCCESS : no errors
136
* @retval MFD_ERROR : error (context allocate will fail)
139
ipv4InterfaceTable_rowreq_ctx_init(ipv4InterfaceTable_rowreq_ctx *
140
rowreq_ctx, void *user_init_ctx)
142
DEBUGMSGTL(("verbose:ipv4InterfaceTable:ipv4InterfaceTable_rowreq_ctx_init", "called\n"));
144
netsnmp_assert(NULL != rowreq_ctx);
147
* TODO:210:o: |-> Perform extra ipv4InterfaceTable rowreq initialization. (eg DEFVALS)
149
rowreq_ctx->data.ipv4InterfaceRetransmitTime = 1000;
153
} /* ipv4InterfaceTable_rowreq_ctx_init */
156
* extra context cleanup
161
ipv4InterfaceTable_rowreq_ctx_cleanup(ipv4InterfaceTable_rowreq_ctx *
164
DEBUGMSGTL(("verbose:ipv4InterfaceTable:ipv4InterfaceTable_rowreq_ctx_cleanup", "called\n"));
166
netsnmp_assert(NULL != rowreq_ctx);
169
* TODO:211:o: |-> Perform extra ipv4InterfaceTable rowreq cleanup.
171
} /* ipv4InterfaceTable_rowreq_ctx_cleanup */
174
* pre-request callback
176
* @param user_context
178
* @retval MFD_SUCCESS : success.
179
* @retval MFD_ERROR : other error
182
ipv4InterfaceTable_pre_request(ipv4InterfaceTable_registration *
185
DEBUGMSGTL(("verbose:ipv4InterfaceTable:ipv4InterfaceTable_pre_request", "called\n"));
188
* TODO:510:o: Perform ipv4InterfaceTable pre-request actions.
192
} /* ipv4InterfaceTable_pre_request */
195
* post-request callback
198
* New rows have been inserted into the container, and
199
* deleted rows have been removed from the container and
202
* @param user_context
203
* @param rc : MFD_SUCCESS if all requests succeeded
205
* @retval MFD_SUCCESS : success.
206
* @retval MFD_ERROR : other error (ignored)
209
ipv4InterfaceTable_post_request(ipv4InterfaceTable_registration *
210
user_context, int rc)
212
DEBUGMSGTL(("verbose:ipv4InterfaceTable:ipv4InterfaceTable_post_request", "called\n"));
215
* TODO:511:o: Perform ipv4InterfaceTable post-request actions.
219
* check to set if any rows were changed.
221
if (ipv4InterfaceTable_dirty_get()) {
223
* check if request was successful. If so, this would be
224
* a good place to save data to its persistent store.
226
if (MFD_SUCCESS == rc) {
228
* save changed rows, if you haven't already
232
ipv4InterfaceTable_dirty_set(0); /* clear table dirty flag */
236
} /* ipv4InterfaceTable_post_request */
239
/**********************************************************************
240
**********************************************************************
242
*** Table ipv4InterfaceTable
244
**********************************************************************
245
**********************************************************************/
247
* IP-MIB::ipv4InterfaceTable is subid 28 of ip.
248
* Its status is Current.
249
* OID: .1.3.6.1.2.1.4.28, length: 8
253
* ---------------------------------------------------------------------
254
* * TODO:200:r: Implement ipv4InterfaceTable data context functions.
258
/*---------------------------------------------------------------------
259
* IP-MIB::ipv4InterfaceEntry.ipv4InterfaceReasmMaxSize
260
* ipv4InterfaceReasmMaxSize is subid 2 of ipv4InterfaceEntry.
261
* Its status is Current, and its access level is ReadOnly.
262
* OID: .1.3.6.1.2.1.4.28.1.2
264
The size of the largest IPv4 datagram which this entity can
265
re-assemble from incoming IPv4 fragmented datagrams received
269
* accessible 1 isscalar 0 enums 0 hasdefval 0
270
* readable 1 iscolumn 1 ranges 1 hashint 0
275
* Its syntax is INTEGER32 (based on perltype INTEGER32)
276
* The net-snmp type is ASN_INTEGER. The C type decl is long (long)
279
* Extract the current value of the ipv4InterfaceReasmMaxSize data.
281
* Set a value using the data context for the row.
284
* Pointer to the row request context.
285
* @param ipv4InterfaceReasmMaxSize_val_ptr
286
* Pointer to storage for a long variable
288
* @retval MFD_SUCCESS : success
289
* @retval MFD_SKIP : skip this node (no value for now)
290
* @retval MFD_ERROR : Any other error
293
ipv4InterfaceReasmMaxSize_get(ipv4InterfaceTable_rowreq_ctx * rowreq_ctx,
294
long *ipv4InterfaceReasmMaxSize_val_ptr)
296
/** we should have a non-NULL pointer */
297
netsnmp_assert(NULL != ipv4InterfaceReasmMaxSize_val_ptr);
300
DEBUGMSGTL(("verbose:ipv4InterfaceTable:ipv4InterfaceReasmMaxSize_get",
303
netsnmp_assert(NULL != rowreq_ctx);
306
(rowreq_ctx->data.ifentry->
307
ns_flags & NETSNMP_INTERFACE_FLAGS_HAS_V4_REASMMAX))
311
* TODO:231:o: |-> Extract the current value of the ipv4InterfaceReasmMaxSize data.
312
* copy (* ipv4InterfaceReasmMaxSize_val_ptr ) from rowreq_ctx->data
314
(*ipv4InterfaceReasmMaxSize_val_ptr) =
315
rowreq_ctx->data.ipv4InterfaceReasmMaxSize;
318
} /* ipv4InterfaceReasmMaxSize_get */
320
/*---------------------------------------------------------------------
321
* IP-MIB::ipv4InterfaceEntry.ipv4InterfaceEnableStatus
322
* ipv4InterfaceEnableStatus is subid 3 of ipv4InterfaceEntry.
323
* Its status is Current, and its access level is ReadWrite.
324
* OID: .1.3.6.1.2.1.4.28.1.3
326
The indication of whether IPv4 is enabled (up) or disabled
327
(down) on this interface. This object does not affect the
328
state of the interface itself, only its connection to an
329
IPv4 stack. The IF-MIB should be used to control the state
333
* accessible 1 isscalar 0 enums 1 hasdefval 0
334
* readable 1 iscolumn 1 ranges 0 hashint 0
337
* Enum range: 1/8. Values: up(1), down(2)
339
* Its syntax is INTEGER (based on perltype INTEGER)
340
* The net-snmp type is ASN_INTEGER. The C type decl is long (u_long)
343
* Extract the current value of the ipv4InterfaceEnableStatus data.
345
* Set a value using the data context for the row.
348
* Pointer to the row request context.
349
* @param ipv4InterfaceEnableStatus_val_ptr
350
* Pointer to storage for a long variable
352
* @retval MFD_SUCCESS : success
353
* @retval MFD_SKIP : skip this node (no value for now)
354
* @retval MFD_ERROR : Any other error
357
ipv4InterfaceEnableStatus_get(ipv4InterfaceTable_rowreq_ctx * rowreq_ctx,
358
u_long * ipv4InterfaceEnableStatus_val_ptr)
360
/** we should have a non-NULL pointer */
361
netsnmp_assert(NULL != ipv4InterfaceEnableStatus_val_ptr);
364
DEBUGMSGTL(("verbose:ipv4InterfaceTable:ipv4InterfaceEnableStatus_get",
367
netsnmp_assert(NULL != rowreq_ctx);
370
* TODO:231:o: |-> Extract the current value of the ipv4InterfaceEnableStatus data.
371
* copy (* ipv4InterfaceEnableStatus_val_ptr ) from rowreq_ctx->data
373
(*ipv4InterfaceEnableStatus_val_ptr) =
374
rowreq_ctx->data.ipv4InterfaceEnableStatus;
377
} /* ipv4InterfaceEnableStatus_get */
379
/*---------------------------------------------------------------------
380
* IP-MIB::ipv4InterfaceEntry.ipv4InterfaceRetransmitTime
381
* ipv4InterfaceRetransmitTime is subid 4 of ipv4InterfaceEntry.
382
* Its status is Current, and its access level is ReadOnly.
383
* OID: .1.3.6.1.2.1.4.28.1.4
385
The time between retransmissions of ARP requests to a
386
neighbor when resolving the address or when probing the
387
reachability of a neighbor.
390
* accessible 1 isscalar 0 enums 0 hasdefval 1
391
* readable 1 iscolumn 1 ranges 0 hashint 0
396
* Its syntax is UNSIGNED32 (based on perltype UNSIGNED32)
397
* The net-snmp type is ASN_UNSIGNED. The C type decl is u_long (u_long)
400
* Extract the current value of the ipv4InterfaceRetransmitTime data.
402
* Set a value using the data context for the row.
405
* Pointer to the row request context.
406
* @param ipv4InterfaceRetransmitTime_val_ptr
407
* Pointer to storage for a u_long variable
409
* @retval MFD_SUCCESS : success
410
* @retval MFD_SKIP : skip this node (no value for now)
411
* @retval MFD_ERROR : Any other error
414
ipv4InterfaceRetransmitTime_get(ipv4InterfaceTable_rowreq_ctx * rowreq_ctx,
416
ipv4InterfaceRetransmitTime_val_ptr)
418
/** we should have a non-NULL pointer */
419
netsnmp_assert(NULL != ipv4InterfaceRetransmitTime_val_ptr);
422
DEBUGMSGTL(("verbose:ipv4InterfaceTable:ipv4InterfaceRetransmitTime_get", "called\n"));
424
netsnmp_assert(NULL != rowreq_ctx);
427
(rowreq_ctx->data.ifentry->
428
ns_flags & NETSNMP_INTERFACE_FLAGS_HAS_V4_RETRANSMIT))
432
* TODO:231:o: |-> Extract the current value of the ipv4InterfaceRetransmitTime data.
433
* copy (* ipv4InterfaceRetransmitTime_val_ptr ) from rowreq_ctx->data
435
(*ipv4InterfaceRetransmitTime_val_ptr) =
436
rowreq_ctx->data.ipv4InterfaceRetransmitTime;
439
} /* ipv4InterfaceRetransmitTime_get */
444
/**********************************************************************
445
**********************************************************************
447
*** Table ipv4InterfaceTable
449
**********************************************************************
450
**********************************************************************/
452
* IP-MIB::ipv4InterfaceTable is subid 28 of ip.
453
* Its status is Current.
454
* OID: .1.3.6.1.2.1.4.28, length: 8
457
* NOTE: if you update this chart, please update the versions in
458
* local/mib2c-conf.d/parent-set.m2i
459
* agent/mibgroup/helpers/baby_steps.c
460
* while you're at it.
463
***********************************************************************
464
* Baby Steps Flow Chart (2004.06.05) *
466
* +--------------+ +================+ U = unconditional path *
467
* |optional state| ||required state|| S = path for success *
468
* +--------------+ +================+ E = path for error *
469
***********************************************************************
477
* +----------------|| object ||
483
* |<---------------|| values ||
487
* | +<-------|| undo ||
489
* | | +==============+
491
* | | +==============+
492
* | | || set ||-------------------------->+
493
* | | || value || E |
494
* | | +==============+ |
496
* | | +--------------+ |
497
* | | | check |-------------------------->|
498
* | | | consistency | E |
499
* | | +--------------+ |
501
* | | +==============+ +==============+ |
502
* | | || commit ||-------->|| undo || |
503
* | | || || E || commit || |
504
* | | +==============+ +==============+ |
505
* | | | S U |<--------+
506
* | | +--------------+ +==============+
507
* | | | irreversible | || undo ||
508
* | | | commit | || set ||
509
* | | +--------------+ +==============+
511
* | +-------------->|<------------------------+
516
* +---------------------->| U
525
* Setup up context with information needed to undo a set request.
527
* This function will be called before the individual node undo setup
528
* functions are called. If you need to do any undo setup that is not
529
* related to a specific column, you can do it here.
531
* Note that the undo context has been allocated with
532
* ipv4InterfaceTable_allocate_data(), but may need extra
533
* initialization similar to what you may have done in
534
* ipv4InterfaceTable_rowreq_ctx_init().
535
* Note that an individual node's undo_setup function will only be called
536
* if that node is being set to a new value.
538
* If there is any setup specific to a particular column (e.g. allocating
539
* memory for a string), you should do that setup in the node's undo_setup
540
* function, so it won't be done unless it is necessary.
543
* Pointer to the table context (ipv4InterfaceTable_rowreq_ctx)
545
* @retval MFD_SUCCESS : success
546
* @retval MFD_ERROR : error. set will fail.
549
ipv4InterfaceTable_undo_setup(ipv4InterfaceTable_rowreq_ctx * rowreq_ctx)
551
int rc = MFD_SUCCESS;
553
DEBUGMSGTL(("verbose:ipv4InterfaceTable:ipv4InterfaceTable_undo_setup",
556
/** we should have a non-NULL pointer */
557
netsnmp_assert(NULL != rowreq_ctx);
560
* TODO:451:M: |-> Setup ipv4InterfaceTable undo.
561
* set up ipv4InterfaceTable undo information, in preparation for a set.
562
* Undo storage is in (* ipv4InterfaceRetransmitTime_val_ptr )*
566
} /* ipv4InterfaceTable_undo_setup */
569
* Undo a set request.
571
* This function will be called before the individual node undo
572
* functions are called. If you need to do any undo that is not
573
* related to a specific column, you can do it here.
575
* Note that an individual node's undo function will only be called
576
* if that node is being set to a new value.
578
* If there is anything specific to a particular column (e.g. releasing
579
* memory for a string), you should do that setup in the node's undo
580
* function, so it won't be done unless it is necessary.
583
* Pointer to the table context (ipv4InterfaceTable_rowreq_ctx)
585
* @retval MFD_SUCCESS : success
586
* @retval MFD_ERROR : error. set will fail.
589
ipv4InterfaceTable_undo(ipv4InterfaceTable_rowreq_ctx * rowreq_ctx)
591
int rc = MFD_SUCCESS;
593
DEBUGMSGTL(("verbose:ipv4InterfaceTable:ipv4InterfaceTable_undo",
596
/** we should have a non-NULL pointer */
597
netsnmp_assert(NULL != rowreq_ctx);
600
* TODO:451:M: |-> ipv4InterfaceTable undo.
601
* ipv4InterfaceTable undo information, in response to a failed set.
602
* Undo storage is in (* ipv4InterfaceRetransmitTime_val_ptr )*
606
} /* ipv4InterfaceTable_undo_setup */
609
* Cleanup up context undo information.
611
* This function will be called after set/commit processing. If you
612
* allocated any resources in undo_setup, this is the place to release
615
* This function is called regardless of the success or failure of the set
616
* request. If you need to perform different steps for cleanup depending
617
* on success or failure, you can add a flag to the rowreq_ctx.
620
* Pointer to the table context (ipv4InterfaceTable_rowreq_ctx)
622
* @retval MFD_SUCCESS : success
623
* @retval MFD_ERROR : error
626
ipv4InterfaceTable_undo_cleanup(ipv4InterfaceTable_rowreq_ctx * rowreq_ctx)
628
int rc = MFD_SUCCESS;
630
DEBUGMSGTL(("verbose:ipv4InterfaceTable:ipv4InterfaceTable_undo_cleanup", "called\n"));
632
/** we should have a non-NULL pointer */
633
netsnmp_assert(NULL != rowreq_ctx);
636
* TODO:452:M: |-> Cleanup ipv4InterfaceTable undo.
637
* Undo storage is in (* ipv4InterfaceRetransmitTime_val_ptr )*
641
} /* ipv4InterfaceTable_undo_cleanup */
646
* At this point, you should have done everything you can to ensure that
647
* this commit will not fail.
649
* Should you need different behavior depending on which columns were
650
* set, rowreq_ctx->column_set_flags will indicate which writeable columns were
651
* set. The definitions for the COLUMN_*_FLAG bits can be found in
652
* ipv4InterfaceTable.h.
653
* A new row will have the MFD_ROW_CREATED bit set in rowreq_flags.
656
* Pointer to the users context.
658
* @retval MFD_SUCCESS : success
659
* @retval MFD_ERROR : error
662
ipv4InterfaceTable_commit(ipv4InterfaceTable_rowreq_ctx * rowreq_ctx)
664
int rc = MFD_SUCCESS;
667
DEBUGMSGTL(("verbose:ipv4InterfaceTable:ipv4InterfaceTable_commit",
670
/** we should have a non-NULL pointer */
671
netsnmp_assert(NULL != rowreq_ctx);
674
* save flags, then clear until we actually do something
676
save_flags = rowreq_ctx->column_set_flags;
677
rowreq_ctx->column_set_flags = 0;
680
* commit ipv4InterfaceTable data
681
* 1) check the column's flag in save_flags to see if it was set.
682
* 2) clear the flag when you handle that column
683
* 3) set the column's flag in column_set_flags if it needs undo
684
* processing in case of a failure.
686
if (save_flags & COLUMN_IPV4INTERFACEENABLESTATUS_FLAG) {
687
save_flags &= ~COLUMN_IPV4INTERFACEENABLESTATUS_FLAG; /* clear ipv4InterfaceEnableStatus */
689
* TODO:482:o: |-> commit column ipv4InterfaceEnableStatus.
694
"ipv4InterfaceTable column ipv4InterfaceEnableStatus commit failed\n");
697
* set flag, in case we need to undo ipv4InterfaceEnableStatus
699
rowreq_ctx->column_set_flags |=
700
COLUMN_IPV4INTERFACEENABLESTATUS_FLAG;
705
* if we successfully commited this row, set the dirty flag.
707
if (MFD_SUCCESS == rc) {
708
rowreq_ctx->rowreq_flags |= MFD_ROW_DIRTY;
712
snmp_log(LOG_ERR, "unhandled columns (0x%x) in commit\n",
718
} /* ipv4InterfaceTable_commit */
721
* undo commit new values.
723
* Should you need different behavior depending on which columns were
724
* set, rowreq_ctx->column_set_flags will indicate which writeable columns were
725
* set. The definitions for the COLUMN_*_FLAG bits can be found in
726
* ipv4InterfaceTable.h.
727
* A new row will have the MFD_ROW_CREATED bit set in rowreq_flags.
730
* Pointer to the users context.
732
* @retval MFD_SUCCESS : success
733
* @retval MFD_ERROR : error
736
ipv4InterfaceTable_undo_commit(ipv4InterfaceTable_rowreq_ctx * rowreq_ctx)
738
int rc = MFD_SUCCESS;
740
DEBUGMSGTL(("verbose:ipv4InterfaceTable:ipv4InterfaceTable_undo_commit", "called\n"));
742
/** we should have a non-NULL pointer */
743
netsnmp_assert(NULL != rowreq_ctx);
746
* TODO:485:M: |-> Undo ipv4InterfaceTable commit.
747
* check the column's flag in rowreq_ctx->column_set_flags to see
748
* if it was set during commit, then undo it.
750
* eg: if (rowreq_ctx->column_set_flags & COLUMN__FLAG) {}
755
* if we successfully un-commited this row, clear the dirty flag.
757
if (MFD_SUCCESS == rc) {
758
rowreq_ctx->rowreq_flags &= ~MFD_ROW_DIRTY;
762
} /* ipv4InterfaceTable_undo_commit */
765
* TODO:440:M: Implement ipv4InterfaceTable node value checks.
766
* TODO:450:M: Implement ipv4InterfaceTable undo functions.
767
* TODO:460:M: Implement ipv4InterfaceTable set functions.
768
* TODO:480:M: Implement ipv4InterfaceTable commit functions.
770
/*---------------------------------------------------------------------
771
* IP-MIB::ipv4InterfaceEntry.ipv4InterfaceEnableStatus
772
* ipv4InterfaceEnableStatus is subid 3 of ipv4InterfaceEntry.
773
* Its status is Current, and its access level is ReadWrite.
774
* OID: .1.3.6.1.2.1.4.28.1.3
776
The indication of whether IPv4 is enabled (up) or disabled
777
(down) on this interface. This object does not affect the
778
state of the interface itself, only its connection to an
779
IPv4 stack. The IF-MIB should be used to control the state
783
* accessible 1 isscalar 0 enums 1 hasdefval 0
784
* readable 1 iscolumn 1 ranges 0 hashint 0
787
* Enum range: 1/8. Values: up(1), down(2)
789
* Its syntax is INTEGER (based on perltype INTEGER)
790
* The net-snmp type is ASN_INTEGER. The C type decl is long (u_long)
793
* Check that the proposed new value is potentially valid.
796
* Pointer to the row request context.
797
* @param ipv4InterfaceEnableStatus_val
798
* A long containing the new value.
800
* @retval MFD_SUCCESS : incoming value is legal
801
* @retval MFD_NOT_VALID_NOW : incoming value is not valid now
802
* @retval MFD_NOT_VALID_EVER : incoming value is never valid
804
* This is the place to check for requirements that are not
805
* expressed in the mib syntax (for example, a requirement that
806
* is detailed in the description for an object).
808
* You should check that the requested change between the undo value and the
809
* new value is legal (ie, the transistion from one value to another
813
* This check is only to determine if the new value
814
* is \b potentially valid. This is the first check of many, and
815
* is one of the simplest ones.
818
* this is not the place to do any checks for values
819
* which depend on some other value in the mib. Those
820
* types of checks should be done in the
821
* ipv4InterfaceTable_check_dependencies() function.
823
* The following checks have already been done for you:
824
* The syntax is ASN_INTEGER
825
* The value is one of up(1), down(2)
827
* If there a no other checks you need to do, simply return MFD_SUCCESS.
831
ipv4InterfaceEnableStatus_check_value(ipv4InterfaceTable_rowreq_ctx *
833
u_long ipv4InterfaceEnableStatus_val)
835
DEBUGMSGTL(("verbose:ipv4InterfaceTable:ipv4InterfaceEnableStatus_check_value", "called\n"));
837
/** should never get a NULL pointer */
838
netsnmp_assert(NULL != rowreq_ctx);
841
* TODO:441:o: |-> Check for valid ipv4InterfaceEnableStatus value.
844
* did the access code set the flag indicating that we can control
845
* individual protocols on this interface?
847
if (rowreq_ctx->data.ifentry->ns_flags &
848
NETSNMP_INTERFACE_FLAGS_CAN_DOWN_PROTOCOL);
850
return MFD_NOT_VALID_EVER;
852
return MFD_SUCCESS; /* ipv4InterfaceEnableStatus value not illegal */
853
} /* ipv4InterfaceEnableStatus_check_value */
856
* Save old value information
859
* Pointer to the table context (ipv4InterfaceTable_rowreq_ctx)
861
* @retval MFD_SUCCESS : success
862
* @retval MFD_ERROR : error. set will fail.
864
* This function will be called after the table level undo setup function
865
* ipv4InterfaceTable_undo_setup has been called.
868
* this function will only be called if a new value is set for this column.
870
* If there is any setup specific to a particular column (e.g. allocating
871
* memory for a string), you should do that setup in this function, so it
872
* won't be done unless it is necessary.
875
ipv4InterfaceEnableStatus_undo_setup(ipv4InterfaceTable_rowreq_ctx *
878
DEBUGMSGTL(("verbose:ipv4InterfaceTable:ipv4InterfaceEnableStatus_undo_setup", "called\n"));
880
/** should never get a NULL pointer */
881
netsnmp_assert(NULL != rowreq_ctx);
884
* TODO:455:o: |-> Setup ipv4InterfaceEnableStatus undo.
887
* copy ipv4InterfaceEnableStatus data
888
* set rowreq_ctx->undo->ipv4InterfaceEnableStatus from rowreq_ctx->data.ipv4InterfaceEnableStatus
890
rowreq_ctx->undo->ipv4InterfaceEnableStatus =
891
rowreq_ctx->data.ipv4InterfaceEnableStatus;
895
} /* ipv4InterfaceEnableStatus_undo_setup */
901
* Pointer to the users context. You should know how to
902
* manipulate the value from this object.
903
* @param ipv4InterfaceEnableStatus_val
904
* A long containing the new value.
907
ipv4InterfaceEnableStatus_set(ipv4InterfaceTable_rowreq_ctx * rowreq_ctx,
908
u_long ipv4InterfaceEnableStatus_val)
911
DEBUGMSGTL(("verbose:ipv4InterfaceTable:ipv4InterfaceEnableStatus_set",
914
/** should never get a NULL pointer */
915
netsnmp_assert(NULL != rowreq_ctx);
918
* TODO:461:M: |-> Set ipv4InterfaceEnableStatus value.
919
* set ipv4InterfaceEnableStatus value in rowreq_ctx->data
921
rowreq_ctx->data.ipv4InterfaceEnableStatus =
922
ipv4InterfaceEnableStatus_val;
925
} /* ipv4InterfaceEnableStatus_set */
928
* undo the previous set.
931
* Pointer to the users context.
934
ipv4InterfaceEnableStatus_undo(ipv4InterfaceTable_rowreq_ctx * rowreq_ctx)
937
DEBUGMSGTL(("verbose:ipv4InterfaceTable:ipv4InterfaceEnableStatus_undo", "called\n"));
939
netsnmp_assert(NULL != rowreq_ctx);
942
* TODO:456:o: |-> Clean up ipv4InterfaceEnableStatus undo.
945
* copy ipv4InterfaceEnableStatus data
946
* set rowreq_ctx->data.ipv4InterfaceEnableStatus from rowreq_ctx->undo->ipv4InterfaceEnableStatus
948
rowreq_ctx->data.ipv4InterfaceEnableStatus =
949
rowreq_ctx->undo->ipv4InterfaceEnableStatus;
953
} /* ipv4InterfaceEnableStatus_undo */