~ubuntu-branches/ubuntu/trusty/net-snmp/trusty

« back to all changes in this revision

Viewing changes to agent/mibgroup/if-mib/ifTable/ifTable.h

  • Committer: Bazaar Package Importer
  • Author(s): Steve Kowalik
  • Date: 2007-05-10 22:20:23 UTC
  • mto: (1.4.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 11.
  • Revision ID: james.westby@ubuntu.com-20070510222023-3fr07xb9i17xvq32
Tags: upstream-5.3.1
ImportĀ upstreamĀ versionĀ 5.3.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * Note: this file originally auto-generated by mib2c using
3
 
 *       version : 1.32 $ of : mfd-top.m2c,v $
 
3
 *       version : 1.48 $ of : mfd-top.m2c,v $
4
4
 *
5
 
 * $Id: ifTable.h,v 1.16.2.3 2006/01/25 16:28:10 dts12 Exp $
 
5
 * $Id: ifTable.h,v 1.21.2.2 2006/01/25 16:26:38 dts12 Exp $
6
6
 */
7
7
#ifndef IFTABLE_H
8
8
#define IFTABLE_H
12
12
#endif
13
13
 
14
14
 
15
 
/** @defgroup misc misc: Miscellaneous routines
 
15
/** @ingroup agent
 
16
 * @defgroup misc misc: Miscellaneous routines
16
17
 *
17
18
 * @{
18
19
 */
20
21
#include <net-snmp/data_access/interface.h>
21
22
 
22
23
    /*
23
 
     * OID, column number and enum definions for  
 
24
     * other required module components 
 
25
     */
 
26
    /* *INDENT-OFF*  */
 
27
config_require(if-mib/data_access/interface)
 
28
config_require(if-mib/ifTable/ifTable_interface)
 
29
config_require(if-mib/ifTable/ifTable_data_access)
 
30
/*
 
31
 * conflicts with mibII/interfaces
 
32
 */
 
33
config_exclude(mibII/interfaces)
 
34
    /* *INDENT-ON*  */
 
35
 
 
36
    /*
 
37
     * OID, column number and enum definions for ifTable 
24
38
     */
25
39
#include "ifTable_constants.h"
26
40
 
29
43
     * function declarations
30
44
     */
31
45
    void            init_ifTable(void);
 
46
    void            shutdown_ifTable(void);
32
47
 
33
48
    /*
34
49
     *********************************************************************
42
57
 **********************************************************************
43
58
 **********************************************************************/
44
59
    /*
45
 
     * ifTable is subid 2 of interfaces.
 
60
     * IF-MIB::ifTable is subid 2 of interfaces.
46
61
     * Its status is Current.
47
62
     * OID: .1.3.6.1.2.1.2.2, length: 8
48
63
     */
57
72
    /*
58
73
     * TODO:101:o: |-> Review ifTable registration context.
59
74
     */
60
 
    typedef netsnmp_data_list *ifTable_registration_ptr;
 
75
    typedef netsnmp_data_list ifTable_registration;
61
76
 
62
77
/**********************************************************************/
63
78
    /*
109
124
        /*
110
125
         * ifLastChange(9)/TICKS/ASN_TIMETICKS/u_long(u_long)//l/A/w/e/r/d/h
111
126
         */
112
 
        u_long          ifLastChange;
 
127
#define ifLastChange ifentry->lastchange
113
128
 
114
129
        /*
115
130
         * ifInOctets(10)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
154
169
        /*
155
170
         * ifOutNUcastPkts(18)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
156
171
         */
157
 
        u_long          ifOutNUcastPkts;
 
172
#define ifOutNUcastPkts ifentry->stats.onucast
158
173
 
159
174
        /*
160
175
         * ifOutDiscards(19)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
340
355
 
341
356
 
342
357
        /*
343
 
         * flags per row. Currently, the first 8 bits are reserverd
 
358
         * flags per row. Currently, the first (lower) 8 bits are reserved
344
359
         * for the user. See mfd.h for other flags.
345
360
         */
346
361
        u_int           rowreq_flags;
347
362
 
348
363
        /*
349
 
         * implementor's context pointer (provided during registration)
350
 
         */
351
 
        ifTable_registration_ptr ifTable_reg;
352
 
 
353
 
        /*
354
364
         * TODO:131:o: |   |-> Add useful data to ifTable rowreq context.
355
365
         */
356
366
        char            known_missing;
370
380
     *********************************************************************
371
381
     * function prototypes
372
382
     */
373
 
    int             ifTable_pre_request(ifTable_registration_ptr
 
383
    int             ifTable_pre_request(ifTable_registration *
374
384
                                        user_context);
375
 
    int             ifTable_post_request(ifTable_registration_ptr
376
 
                                         user_context);
 
385
    int             ifTable_post_request(ifTable_registration *
 
386
                                         user_context, int rc);
377
387
 
378
388
    int             ifTable_rowreq_ctx_init(ifTable_rowreq_ctx *
379
389
                                            rowreq_ctx,
380
 
                                            void *userreq_ctx);
 
390
                                            void *user_init_ctx);
381
391
    void            ifTable_rowreq_ctx_cleanup(ifTable_rowreq_ctx *
382
392
                                               rowreq_ctx);
383
393
 
385
395
                                               rowreq_ctx);
386
396
    int             ifTable_commit(ifTable_rowreq_ctx * rowreq_ctx);
387
397
 
 
398
    ifTable_rowreq_ctx *ifTable_row_find_by_mib_index(ifTable_mib_index *
 
399
                                                      mib_idx);
 
400
 
388
401
    extern oid      ifTable_oid[];
389
402
    extern int      ifTable_oid_size;
390
403
 
408
421
 **********************************************************************
409
422
 **********************************************************************/
410
423
    /*
411
 
     * ifTable is subid 2 of interfaces.
 
424
     * IF-MIB::ifTable is subid 2 of interfaces.
412
425
     * Its status is Current.
413
426
     * OID: .1.3.6.1.2.1.2.2, length: 8
414
427
     */
418
431
 
419
432
    int             ifDescr_get(ifTable_rowreq_ctx * rowreq_ctx,
420
433
                                char **ifDescr_val_ptr_ptr,
421
 
                                size_t *ifDescr_val_ptr_len_ptr);
 
434
                                size_t * ifDescr_val_ptr_len_ptr);
422
435
    int             ifType_get(ifTable_rowreq_ctx * rowreq_ctx,
423
436
                               u_long * ifType_val_ptr);
424
437
    int             ifMtu_get(ifTable_rowreq_ctx * rowreq_ctx,
428
441
    int             ifPhysAddress_get(ifTable_rowreq_ctx * rowreq_ctx,
429
442
                                      char **ifPhysAddress_val_ptr_ptr,
430
443
                                      size_t
431
 
                                      *ifPhysAddress_val_ptr_len_ptr);
 
444
                                      * ifPhysAddress_val_ptr_len_ptr);
432
445
    int             ifAdminStatus_get(ifTable_rowreq_ctx * rowreq_ctx,
433
446
                                      u_long * ifAdminStatus_val_ptr);
434
447
    int             ifOperStatus_get(ifTable_rowreq_ctx * rowreq_ctx,
462
475
                                  u_long * ifOutQLen_val_ptr);
463
476
    int             ifSpecific_get(ifTable_rowreq_ctx * rowreq_ctx,
464
477
                                   oid ** ifSpecific_val_ptr_ptr,
465
 
                                   size_t *ifSpecific_val_ptr_len_ptr);
 
478
                                   size_t * ifSpecific_val_ptr_len_ptr);
466
479
 
467
480
 
468
481
    int             ifTable_indexes_set_tbl_idx(ifTable_mib_index *
489
502
 **********************************************************************
490
503
 **********************************************************************/
491
504
    /*
492
 
     * ifTable is subid 2 of interfaces.
 
505
     * IF-MIB::ifTable is subid 2 of interfaces.
493
506
     * Its status is Current.
494
507
     * OID: .1.3.6.1.2.1.2.2, length: 8
495
508
     */
496
 
    int             ifIndex_check_index(ifTable_rowreq_ctx * rowreq_ctx);       /* internal */
497
509
 
498
510
 
499
511
    int             ifTable_undo_setup(ifTable_rowreq_ctx * rowreq_ctx);
500
512
    int             ifTable_undo_cleanup(ifTable_rowreq_ctx * rowreq_ctx);
 
513
    int             ifTable_undo(ifTable_rowreq_ctx * rowreq_ctx);
501
514
    int             ifTable_commit(ifTable_rowreq_ctx * rowreq_ctx);
502
515
    int             ifTable_undo_commit(ifTable_rowreq_ctx * rowreq_ctx);
503
516
 
703
716
}
704
717
#endif
705
718
#endif                          /* IFTABLE_H */
 
719
/**  @} */
 
720