OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [net/] [snmp/] [agent/] [current/] [include/] [var_struct.h] - Blame information for rev 786

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
//==========================================================================
2
//
3
//      ./agent/current/include/var_struct.h
4
//
5
//
6
//==========================================================================
7
// ####ECOSGPLCOPYRIGHTBEGIN####                                            
8
// -------------------------------------------                              
9
// This file is part of eCos, the Embedded Configurable Operating System.   
10
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
11
//
12
// eCos is free software; you can redistribute it and/or modify it under    
13
// the terms of the GNU General Public License as published by the Free     
14
// Software Foundation; either version 2 or (at your option) any later      
15
// version.                                                                 
16
//
17
// eCos is distributed in the hope that it will be useful, but WITHOUT      
18
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or    
19
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License    
20
// for more details.                                                        
21
//
22
// You should have received a copy of the GNU General Public License        
23
// along with eCos; if not, write to the Free Software Foundation, Inc.,    
24
// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.            
25
//
26
// As a special exception, if other files instantiate templates or use      
27
// macros or inline functions from this file, or you compile this file      
28
// and link it with other works to produce a work based on this file,       
29
// this file does not by itself cause the resulting work to be covered by   
30
// the GNU General Public License. However the source code for this file    
31
// must still be made available in accordance with section (3) of the GNU   
32
// General Public License v2.                                               
33
//
34
// This exception does not invalidate any other reasons why a work based    
35
// on this file might be covered by the GNU General Public License.         
36
// -------------------------------------------                              
37
// ####ECOSGPLCOPYRIGHTEND####                                              
38
//####UCDSNMPCOPYRIGHTBEGIN####
39
//
40
// -------------------------------------------
41
//
42
// Portions of this software may have been derived from the UCD-SNMP
43
// project,  <http://ucd-snmp.ucdavis.edu/>  from the University of
44
// California at Davis, which was originally based on the Carnegie Mellon
45
// University SNMP implementation.  Portions of this software are therefore
46
// covered by the appropriate copyright disclaimers included herein.
47
//
48
// The release used was version 4.1.2 of May 2000.  "ucd-snmp-4.1.2"
49
// -------------------------------------------
50
//
51
//####UCDSNMPCOPYRIGHTEND####
52
//==========================================================================
53
//#####DESCRIPTIONBEGIN####
54
//
55
// Author(s):    hmt
56
// Contributors: hmt
57
// Date:         2000-05-30
58
// Purpose:      Port of UCD-SNMP distribution to eCos.
59
// Description:  
60
//              
61
//
62
//####DESCRIPTIONEND####
63
//
64
//==========================================================================
65
/********************************************************************
66
       Copyright 1989, 1991, 1992 by Carnegie Mellon University
67
 
68
                          Derivative Work -
69
Copyright 1996, 1998, 1999, 2000 The Regents of the University of California
70
 
71
                         All Rights Reserved
72
 
73
Permission to use, copy, modify and distribute this software and its
74
documentation for any purpose and without fee is hereby granted,
75
provided that the above copyright notice appears in all copies and
76
that both that copyright notice and this permission notice appear in
77
supporting documentation, and that the name of CMU and The Regents of
78
the University of California not be used in advertising or publicity
79
pertaining to distribution of the software without specific written
80
permission.
81
 
82
CMU AND THE REGENTS OF THE UNIVERSITY OF CALIFORNIA DISCLAIM ALL
83
WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
84
WARRANTIES OF MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL CMU OR
85
THE REGENTS OF THE UNIVERSITY OF CALIFORNIA BE LIABLE FOR ANY SPECIAL,
86
INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
87
FROM THE LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
88
CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
89
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
90
*********************************************************************/
91
#ifndef VAR_STRUCT_H
92
#define VAR_STRUCT_H
93
/*
94
 * The subtree structure contains a subtree prefix which applies to
95
 * all variables in the associated variable list.
96
 *
97
 * By converting to a tree of subtree structures, entries can
98
 * now be subtrees of another subtree in the structure. i.e:
99
 * 1.2
100
 * 1.2.0
101
 */
102
struct subtree {
103
    oid                 name[16];       /* objid prefix of registered subtree */
104
    u_char              namelen;        /* number of subid's in name above */
105
    oid                 start[16];      /* objid of start of covered range */
106
    u_char              start_len;      /* number of subid's in start name */
107
    oid                 end[16];        /* objid of end of covered range */
108
    u_char              end_len;        /* number of subid's in end name */
109
    struct variable     *variables;   /* pointer to variables array */
110
    int                 variables_len;  /* number of entries in above array */
111
    int                 variables_width; /* sizeof each variable entry */
112
    char                label[256];     /* calling module's label */
113
    struct snmp_session *session;
114
    u_char              flags;
115
    u_char              priority;
116
    struct subtree      *next;          /* List of 'sibling' subtrees */
117
    struct subtree      *prev;          /* Make siblings a doubly-linked list */
118
    struct subtree      *children;      /* List of 'child' subtrees */
119
};
120
 
121
/*
122
 * This is a new variable structure that doesn't have as much memory
123
 * tied up in the object identifier.  It's elements have also been re-arranged
124
 * so that the name field can be variable length.  Any number of these
125
 * structures can be created with lengths tailor made to a particular
126
 * application.  The first 5 elements of the structure must remain constant.
127
 */
128
struct variable2 {
129
    u_char          magic;          /* passed to function as a hint */
130
    u_char          type;           /* type of variable */
131
    u_short         acl;            /* access control list for variable */
132
    FindVarMethod  *findVar;        /* function that finds variable */
133
    u_char          namelen;        /* length of name below */
134
    oid             name[2];       /* object identifier of variable */
135
};
136
 
137
struct variable4 {
138
    u_char          magic;          /* passed to function as a hint */
139
    u_char          type;           /* type of variable */
140
    u_short         acl;            /* access control list for variable */
141
    FindVarMethod  *findVar;        /* function that finds variable */
142
    u_char          namelen;        /* length of name below */
143
    oid             name[4];       /* object identifier of variable */
144
};
145
 
146
struct variable7 {
147
    u_char          magic;          /* passed to function as a hint */
148
    u_char          type;           /* type of variable */
149
    u_short         acl;            /* access control list for variable */
150
    FindVarMethod  *findVar;        /* function that finds variable */
151
    u_char          namelen;        /* length of name below */
152
    oid             name[7];       /* object identifier of variable */
153
};
154
 
155
struct variable8 {
156
    u_char          magic;          /* passed to function as a hint */
157
    u_char          type;           /* type of variable */
158
    u_short         acl;            /* access control list for variable */
159
    FindVarMethod  *findVar;        /* function that finds variable */
160
    u_char          namelen;        /* length of name below */
161
    oid             name[8];       /* object identifier of variable */
162
};
163
 
164
struct variable13 {
165
    u_char          magic;          /* passed to function as a hint */
166
    u_char          type;           /* type of variable */
167
    u_short         acl;            /* access control list for variable */
168
    FindVarMethod  *findVar;        /* function that finds variable */
169
    u_char          namelen;        /* length of name below */
170
    oid             name[13];       /* object identifier of variable */
171
};
172
#endif /* VAR_STRUCT_H */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.