Package init
This commit is contained in:
parent
8e2f772764
commit
c0a52e6ef9
41
IETF-MIB-LICENSE.txt
Normal file
41
IETF-MIB-LICENSE.txt
Normal file
@ -0,0 +1,41 @@
|
||||
MIBs included in this software taken from IETF Documents are considered
|
||||
Code Components in accordance with the IETF Trust License Policy, as found
|
||||
here:
|
||||
|
||||
http://trustee.ietf.org/license-info/
|
||||
|
||||
They are available under the terms of the Simplified BSD license, a copy of
|
||||
which is included below.
|
||||
|
||||
*****
|
||||
|
||||
Copyright (c) 2013 IETF Trust and the persons identified as authors of
|
||||
the code. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
· Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
· Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
· Neither the name of Internet Society, IETF or IETF Trust, nor the
|
||||
names of specific contributors, may be used to endorse or promote
|
||||
products derived from this software without specific prior written
|
||||
permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS
|
||||
IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
|
||||
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
36
README.en.md
36
README.en.md
@ -1,36 +0,0 @@
|
||||
# libsmi
|
||||
|
||||
#### Description
|
||||
{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**}
|
||||
|
||||
#### Software Architecture
|
||||
Software architecture description
|
||||
|
||||
#### Installation
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### Instructions
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### Contribution
|
||||
|
||||
1. Fork the repository
|
||||
2. Create Feat_xxx branch
|
||||
3. Commit your code
|
||||
4. Create Pull Request
|
||||
|
||||
|
||||
#### Gitee Feature
|
||||
|
||||
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
|
||||
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
|
||||
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
|
||||
4. The most valuable open source project [GVP](https://gitee.com/gvp)
|
||||
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
|
||||
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
||||
39
README.md
39
README.md
@ -1,39 +0,0 @@
|
||||
# libsmi
|
||||
|
||||
#### 介绍
|
||||
{**以下是码云平台说明,您可以替换此简介**
|
||||
码云是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台
|
||||
无论是个人、团队、或是企业,都能够用码云实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)}
|
||||
|
||||
#### 软件架构
|
||||
软件架构说明
|
||||
|
||||
|
||||
#### 安装教程
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### 使用说明
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### 参与贡献
|
||||
|
||||
1. Fork 本仓库
|
||||
2. 新建 Feat_xxx 分支
|
||||
3. 提交代码
|
||||
4. 新建 Pull Request
|
||||
|
||||
|
||||
#### 码云特技
|
||||
|
||||
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
|
||||
2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com)
|
||||
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目
|
||||
4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目
|
||||
5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
|
||||
6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
||||
20
libsmi-0.4.8-CVE-2010-2891.patch
Normal file
20
libsmi-0.4.8-CVE-2010-2891.patch
Normal file
@ -0,0 +1,20 @@
|
||||
diff -up libsmi-0.4.8/lib/smi.c.CVE-2010-2891 libsmi-0.4.8/lib/smi.c
|
||||
--- libsmi-0.4.8/lib/smi.c.CVE-2010-2891 2010-11-01 14:27:57.209065000 -0400
|
||||
+++ libsmi-0.4.8/lib/smi.c 2010-11-01 14:29:17.615065001 -0400
|
||||
@@ -1314,10 +1314,15 @@ SmiNode *smiGetNode(SmiModule *smiModule
|
||||
}
|
||||
|
||||
if (isdigit((int)node2[0])) {
|
||||
- for (oidlen = 0, p = strtok(node2, ". "); p;
|
||||
+ for (oidlen = 0, p = strtok(node2, ". ");
|
||||
+ p && oidlen < sizeof(oid)/sizeof(oid[0]);
|
||||
oidlen++, p = strtok(NULL, ". ")) {
|
||||
oid[oidlen] = strtoul(p, NULL, 0);
|
||||
}
|
||||
+ if (p) {
|
||||
+ /* the numeric OID is too long */
|
||||
+ return NULL;
|
||||
+ }
|
||||
nodePtr = getNode(oidlen, oid);
|
||||
if (nodePtr) {
|
||||
if (modulePtr) {
|
||||
21
libsmi-0.4.8-format-security-fix.patch
Normal file
21
libsmi-0.4.8-format-security-fix.patch
Normal file
@ -0,0 +1,21 @@
|
||||
diff -up libsmi-0.4.8/tools/dump-tree.c.format-security libsmi-0.4.8/tools/dump-tree.c
|
||||
--- libsmi-0.4.8/tools/dump-tree.c.format-security 2013-12-03 13:57:07.138165398 -0500
|
||||
+++ libsmi-0.4.8/tools/dump-tree.c 2013-12-03 13:57:29.024137637 -0500
|
||||
@@ -117,7 +117,7 @@ static void fprintIndex(FILE *f, SmiNode
|
||||
smiElement; smiElement = smiGetNextElement(smiElement), i++) {
|
||||
if (i > 0) fprintf(f, ",");
|
||||
if (indexname) {
|
||||
- fprintf(f, indexname);
|
||||
+ fprintf(f, "%s", indexname);
|
||||
}
|
||||
indexname = smiGetElementNode(smiElement)->name;
|
||||
}
|
||||
@@ -143,7 +143,7 @@ static void fprintObjects(FILE *f, SmiNo
|
||||
smiElement = smiGetNextElement(smiElement), i++) {
|
||||
if (i > 0) fprintf(f, ",");
|
||||
if (objectname) {
|
||||
- fprintf(f, objectname);
|
||||
+ fprintf(f, "%s", objectname);
|
||||
}
|
||||
objectname = smiGetElementNode(smiElement)->name;
|
||||
}
|
||||
941
libsmi-0.4.8-symbols-clash.patch
Normal file
941
libsmi-0.4.8-symbols-clash.patch
Normal file
@ -0,0 +1,941 @@
|
||||
diff -up libsmi-0.4.8/lib/data.c.clash libsmi-0.4.8/lib/data.c
|
||||
--- libsmi-0.4.8/lib/data.c.clash 2012-10-24 18:07:24.251036502 +0200
|
||||
+++ libsmi-0.4.8/lib/data.c 2012-10-24 18:14:14.709159698 +0200
|
||||
@@ -79,6 +79,7 @@ static Handle *lastHandlePtr = NULL;
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Handle *addHandle(const char *name)
|
||||
{
|
||||
Handle *handlePtr;
|
||||
@@ -113,7 +114,7 @@ Handle *addHandle(const char *name)
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
-
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void removeHandle(Handle *handlePtr)
|
||||
{
|
||||
if (handlePtr->prevPtr) {
|
||||
@@ -150,6 +151,7 @@ void removeHandle(Handle *handlePtr)
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Handle *findHandleByName(const char *name)
|
||||
{
|
||||
Handle *handlePtr;
|
||||
@@ -186,7 +188,7 @@ Handle *findHandleByName(const char *nam
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
-
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
View *addView(const char *modulename)
|
||||
{
|
||||
View *viewPtr;
|
||||
@@ -221,6 +223,7 @@ View *addView(const char *modulename)
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
int isInView(const char *modulename)
|
||||
{
|
||||
View *viewPtr;
|
||||
@@ -257,6 +260,7 @@ int isInView(const char *modulename)
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Module *addModule(char *modulename, char *path, ModuleFlags flags,
|
||||
Parser *parserPtr)
|
||||
{
|
||||
@@ -320,6 +324,7 @@ Module *addModule(char *modulename, char
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setModuleIdentityObject(Module *modulePtr, Object *objectPtr)
|
||||
{
|
||||
modulePtr->objectPtr = objectPtr;
|
||||
@@ -343,6 +348,7 @@ void setModuleIdentityObject(Module *mod
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setModuleLastUpdated(Module *modulePtr, time_t lastUpdated)
|
||||
{
|
||||
modulePtr->lastUpdated = lastUpdated;
|
||||
@@ -366,6 +372,7 @@ void setModuleLastUpdated(Module *module
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setModuleOrganization(Module *modulePtr, char *organization)
|
||||
{
|
||||
modulePtr->export.organization = organization;
|
||||
@@ -392,6 +399,7 @@ void setModuleOrganization(Module *modul
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setModuleContactInfo(Module *modulePtr, char *contactinfo)
|
||||
{
|
||||
modulePtr->export.contactinfo = contactinfo;
|
||||
@@ -415,6 +423,7 @@ void setModuleContactInfo(Module *module
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setModuleDescription(Module *modulePtr, char *description,
|
||||
Parser *parserPtr)
|
||||
{
|
||||
@@ -446,6 +455,7 @@ void setModuleDescription(Module *module
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setModuleReference(Module *modulePtr, char *reference, Parser *parserPtr)
|
||||
{
|
||||
if (modulePtr->export.reference)
|
||||
@@ -477,6 +487,7 @@ void setModuleReference(Module *modulePt
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Module *findModuleByName(const char *modulename)
|
||||
{
|
||||
Module *modulePtr;
|
||||
@@ -510,6 +521,7 @@ Module *findModuleByName(const char *mod
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Revision *addRevision(time_t date, char *description, Parser *parserPtr)
|
||||
{
|
||||
Revision *revisionPtr, *r;
|
||||
@@ -574,6 +586,7 @@ Revision *addRevision(time_t date, char
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setRevisionLine(Revision *revisionPtr, int line, Parser *parserPtr)
|
||||
{
|
||||
if (line) {
|
||||
@@ -603,6 +616,7 @@ void setRevisionLine(Revision *revisionP
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Import *addImport(char *name, Parser *parserPtr)
|
||||
{
|
||||
Import *importPtr;
|
||||
@@ -649,6 +663,7 @@ Import *addImport(char *name, Parser *pa
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void addImportFlags(Import *importPtr, ImportFlags flags)
|
||||
{
|
||||
importPtr->flags |= flags;
|
||||
@@ -672,6 +687,7 @@ void addImportFlags(Import *importPtr, I
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setImportModulename(Import *importPtr, char *modulename)
|
||||
{
|
||||
if (importPtr->export.module) {
|
||||
@@ -700,6 +716,7 @@ void setImportModulename(Import *importP
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
int checkImports(Module *modulePtr, Parser *parserPtr)
|
||||
{
|
||||
int n = 0;
|
||||
@@ -767,6 +784,7 @@ int checkImports(Module *modulePtr, Pars
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Import *findImportByName(const char *name, Module *modulePtr)
|
||||
{
|
||||
Import *importPtr;
|
||||
@@ -806,6 +824,7 @@ Import *findImportByName(const char *nam
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Import *findImportByModulenameAndName(const char *modulename,
|
||||
const char *name, Module *modulePtr)
|
||||
{
|
||||
@@ -843,6 +862,7 @@ Import *findImportByModulenameAndName(co
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Object *addObject(char *objectname, Node *parentNodePtr, SmiSubid subid,
|
||||
ObjectFlags flags, Parser *parserPtr)
|
||||
{
|
||||
@@ -940,6 +960,7 @@ Object *addObject(char *objectname, Node
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Object *duplicateObject(Object *templatePtr, ObjectFlags flags,
|
||||
Parser *parserPtr)
|
||||
{
|
||||
@@ -1020,6 +1041,7 @@ Object *duplicateObject(Object *template
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Node *addNode (Node *parentNodePtr, SmiSubid subid, NodeFlags flags,
|
||||
Parser *parserPtr)
|
||||
{
|
||||
@@ -1097,6 +1119,7 @@ Node *addNode (Node *parentNodePtr, SmiS
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Node *createNodes(unsigned int oidlen, SmiSubid *oid)
|
||||
{
|
||||
Node *parentNodePtr, *nodePtr;
|
||||
@@ -1134,6 +1157,7 @@ Node *createNodes(unsigned int oidlen, S
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Node *createNodesByOidString(const char *oid)
|
||||
{
|
||||
char *p, *elements;
|
||||
@@ -1176,6 +1200,7 @@ Node *createNodesByOidString(const char
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Node *getParentNode(Node *nodePtr)
|
||||
{
|
||||
return nodePtr->parentPtr;
|
||||
@@ -1200,6 +1225,7 @@ Node *getParentNode(Node *nodePtr)
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
static void mergeNodeTrees(Node *toNodePtr, Node *fromNodePtr,
|
||||
Parser *parserPtr)
|
||||
{
|
||||
@@ -1300,6 +1326,7 @@ static void mergeNodeTrees(Node *toNodeP
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Object *setObjectName(Object *objectPtr, char *name, Parser *parserPtr)
|
||||
{
|
||||
Node *nodePtr, *nextPtr;
|
||||
@@ -1400,6 +1427,7 @@ Object *setObjectName(Object *objectPtr,
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setObjectType(Object *objectPtr, Type *typePtr)
|
||||
{
|
||||
objectPtr->typePtr = typePtr;
|
||||
@@ -1423,6 +1451,7 @@ void setObjectType(Object *objectPtr, Ty
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setObjectAccess(Object *objectPtr, SmiAccess access)
|
||||
{
|
||||
objectPtr->export.access = access;
|
||||
@@ -1446,6 +1475,7 @@ void setObjectAccess(Object *objectPtr,
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setObjectStatus(Object *objectPtr, SmiStatus status)
|
||||
{
|
||||
objectPtr->export.status = status;
|
||||
@@ -1469,6 +1499,7 @@ void setObjectStatus(Object *objectPtr,
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setObjectDescription(Object *objectPtr, char *description,
|
||||
Parser *parserPtr)
|
||||
{
|
||||
@@ -1500,6 +1531,7 @@ void setObjectDescription(Object *object
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setObjectReference(Object *objectPtr, char *reference, Parser *parserPtr)
|
||||
{
|
||||
if (objectPtr->export.reference)
|
||||
@@ -1529,6 +1561,7 @@ void setObjectReference(Object *objectPt
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setObjectFormat(Object *objectPtr, char *format)
|
||||
{
|
||||
if (objectPtr->export.format) smiFree(objectPtr->export.format);
|
||||
@@ -1553,6 +1586,7 @@ void setObjectFormat(Object *objectPtr,
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setObjectUnits(Object *objectPtr, char *units)
|
||||
{
|
||||
if (objectPtr->export.units) smiFree(objectPtr->export.units);
|
||||
@@ -1577,6 +1611,7 @@ void setObjectUnits(Object *objectPtr, c
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setObjectDecl(Object *objectPtr, SmiDecl decl)
|
||||
{
|
||||
objectPtr->export.decl = decl;
|
||||
@@ -1600,6 +1635,7 @@ void setObjectDecl(Object *objectPtr, Sm
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setObjectLine(Object *objectPtr, int line, Parser *parserPtr)
|
||||
{
|
||||
if (line) {
|
||||
@@ -1627,6 +1663,7 @@ void setObjectLine(Object *objectPtr, in
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setObjectNodekind(Object *objectPtr, SmiNodekind nodekind)
|
||||
{
|
||||
objectPtr->export.nodekind = nodekind;
|
||||
@@ -1650,6 +1687,7 @@ void setObjectNodekind(Object *objectPtr
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void addObjectFlags(Object *objectPtr, ObjectFlags flags)
|
||||
{
|
||||
objectPtr->flags |= flags;
|
||||
@@ -1673,6 +1711,7 @@ void addObjectFlags(Object *objectPtr, O
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void deleteObjectFlags(Object *objectPtr, ObjectFlags flags)
|
||||
{
|
||||
objectPtr->flags &= ~flags;
|
||||
@@ -1696,6 +1735,7 @@ void deleteObjectFlags(Object *objectPtr
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
int checkObjectFlags(Object *objectPtr, ObjectFlags flags)
|
||||
{
|
||||
return ((objectPtr->flags & flags) == flags);
|
||||
@@ -1746,6 +1786,7 @@ void setObjectIndex(Object *objectPtr, I
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setObjectList(Object *objectPtr, List *listPtr)
|
||||
{
|
||||
objectPtr->listPtr = listPtr;
|
||||
@@ -1769,6 +1810,7 @@ void setObjectList(Object *objectPtr, Li
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setObjectRelated(Object *objectPtr, Object *relatedPtr)
|
||||
{
|
||||
objectPtr->relatedPtr = relatedPtr;
|
||||
@@ -1792,6 +1834,7 @@ void setObjectRelated(Object *objectPtr,
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setObjectImplied(Object *objectPtr, int implied)
|
||||
{
|
||||
objectPtr->export.implied = implied;
|
||||
@@ -1815,6 +1858,7 @@ void setObjectImplied(Object *objectPtr,
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setObjectCreate(Object *objectPtr, int create)
|
||||
{
|
||||
objectPtr->export.create = create;
|
||||
@@ -1838,6 +1882,7 @@ void setObjectCreate(Object *objectPtr,
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setObjectIndexkind(Object *objectPtr, SmiIndexkind indexkind)
|
||||
{
|
||||
objectPtr->export.indexkind = indexkind;
|
||||
@@ -1861,6 +1906,7 @@ void setObjectIndexkind(Object *objectPt
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setObjectValue(Object *objectPtr, SmiValue *valuePtr)
|
||||
{
|
||||
objectPtr->export.value = *valuePtr;
|
||||
@@ -1885,6 +1931,7 @@ void setObjectValue(Object *objectPtr, S
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setObjectUniqueness(Object *objectPtr, List *listPtr)
|
||||
{
|
||||
objectPtr->uniquenessPtr = listPtr;
|
||||
@@ -1932,6 +1979,7 @@ void setObjectUniqueness(Object *objectP
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Node *findNodeByParentAndSubid(Node *parentNodePtr, SmiSubid subid)
|
||||
{
|
||||
Node *nodePtr;
|
||||
@@ -1968,6 +2016,7 @@ Node *findNodeByParentAndSubid(Node *par
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Node *findNodeByOid(unsigned int oidlen, SmiSubid *oid)
|
||||
{
|
||||
Node *nodePtr;
|
||||
@@ -2000,6 +2049,7 @@ Node *findNodeByOid(unsigned int oidlen,
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Node *findNodeByOidString(char *oid)
|
||||
{
|
||||
Node *nodePtr;
|
||||
@@ -2037,6 +2087,7 @@ Node *findNodeByOidString(char *oid)
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Object *findObjectByNode(Node *nodePtr)
|
||||
{
|
||||
Object *objectPtr;
|
||||
@@ -2079,6 +2130,7 @@ Object *findObjectByNode(Node *nodePtr)
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Object *findObjectByModuleAndNode(Module *modulePtr, Node *nodePtr)
|
||||
{
|
||||
Object *objectPtr;
|
||||
@@ -2114,6 +2166,7 @@ Object *findObjectByModuleAndNode(Module
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Object *findObjectByModulenameAndNode(const char *modulename, Node *nodePtr)
|
||||
{
|
||||
Object *objectPtr;
|
||||
@@ -2149,6 +2202,7 @@ Object *findObjectByModulenameAndNode(co
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Object *findObjectByName(const char *objectname)
|
||||
{
|
||||
Module *modulePtr;
|
||||
@@ -2193,6 +2247,7 @@ Object *findObjectByName(const char *obj
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Object *findNextObjectByName(const char *objectname, Object *prevObjectPtr)
|
||||
{
|
||||
Module *modulePtr;
|
||||
@@ -2236,6 +2291,7 @@ Object *findNextObjectByName(const char
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Object *findObjectByModulenameAndName(const char *modulename,
|
||||
const char *objectname)
|
||||
{
|
||||
@@ -2285,6 +2341,7 @@ Object *findObjectByModulenameAndName(co
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Object *findObjectByModuleAndName(Module *modulePtr, const char *objectname)
|
||||
{
|
||||
Object *objectPtr;
|
||||
@@ -2334,6 +2391,7 @@ Object *findObjectByModuleAndName(Module
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Type *addType(char *type_name, SmiBasetype basetype, TypeFlags flags,
|
||||
Parser *parserPtr)
|
||||
{
|
||||
@@ -2395,6 +2453,7 @@ Type *addType(char *type_name, SmiBasety
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Type *duplicateType(Type *templatePtr, TypeFlags flags, Parser *parserPtr)
|
||||
{
|
||||
Type *typePtr;
|
||||
@@ -2451,6 +2510,7 @@ Type *duplicateType(Type *templatePtr, T
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Type *setTypeName(Type *typePtr, char *name)
|
||||
{
|
||||
Type *type2Ptr;
|
||||
@@ -2543,6 +2603,7 @@ Type *setTypeName(Type *typePtr, char *n
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setTypeParent(Type *typePtr, Type *parentPtr)
|
||||
{
|
||||
typePtr->parentPtr = parentPtr;
|
||||
@@ -2566,6 +2627,7 @@ void setTypeParent(Type *typePtr, Type *
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setTypeStatus(Type *typePtr, SmiStatus status)
|
||||
{
|
||||
typePtr->export.status = status;
|
||||
@@ -2589,6 +2651,7 @@ void setTypeStatus(Type *typePtr, SmiSta
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setTypeBasetype(Type *typePtr, SmiBasetype basetype)
|
||||
{
|
||||
typePtr->export.basetype = basetype;
|
||||
@@ -2612,6 +2675,7 @@ void setTypeBasetype(Type *typePtr, SmiB
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setTypeDescription(Type *typePtr, char *description, Parser *parserPtr)
|
||||
{
|
||||
if (typePtr->export.description)
|
||||
@@ -2642,6 +2706,7 @@ void setTypeDescription(Type *typePtr, c
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setTypeReference(Type *typePtr, char *reference, Parser *parserPtr)
|
||||
{
|
||||
if (typePtr->export.reference)
|
||||
@@ -2676,6 +2741,7 @@ void setTypeReference(Type *typePtr, cha
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setTypeList(Type *typePtr, List *listPtr)
|
||||
{
|
||||
if (!typePtr->listPtr) {
|
||||
@@ -2701,6 +2767,7 @@ void setTypeList(Type *typePtr, List *li
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setTypeFormat(Type *typePtr, char *format)
|
||||
{
|
||||
if (typePtr->export.format) smiFree(typePtr->export.format);
|
||||
@@ -2726,6 +2793,7 @@ void setTypeFormat(Type *typePtr, char *
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setTypeUnits(Type *typePtr, char *units)
|
||||
{
|
||||
if (typePtr->export.units) smiFree(typePtr->export.units);
|
||||
@@ -2750,6 +2818,7 @@ void setTypeUnits(Type *typePtr, char *u
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setTypeDecl(Type *typePtr, SmiDecl decl)
|
||||
{
|
||||
typePtr->export.decl = decl;
|
||||
@@ -2773,6 +2842,7 @@ void setTypeDecl(Type *typePtr, SmiDecl
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setTypeLine(Type *typePtr, int line, Parser *parserPtr)
|
||||
{
|
||||
if (line) {
|
||||
@@ -2800,6 +2870,7 @@ void setTypeLine(Type *typePtr, int line
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setTypeValue(Type *typePtr, SmiValue *valuePtr)
|
||||
{
|
||||
typePtr->export.value = *valuePtr;
|
||||
@@ -2823,6 +2894,7 @@ void setTypeValue(Type *typePtr, SmiValu
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void addTypeFlags(Type *typePtr, TypeFlags flags)
|
||||
{
|
||||
typePtr->flags |= flags;
|
||||
@@ -2846,6 +2918,7 @@ void addTypeFlags(Type *typePtr, TypeFla
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void deleteTypeFlags(Type *typePtr, TypeFlags flags)
|
||||
{
|
||||
typePtr->flags &= ~flags;
|
||||
@@ -2870,6 +2943,7 @@ void deleteTypeFlags(Type *typePtr, Type
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Type * findTypeByName(const char *type_name)
|
||||
{
|
||||
Module *modulePtr;
|
||||
@@ -2908,6 +2982,7 @@ Type * findTypeByName(const char *type_n
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Type *findNextTypeByName(const char *type_name, Type *prevTypePtr)
|
||||
{
|
||||
Module *modulePtr;
|
||||
@@ -2946,6 +3021,7 @@ Type *findNextTypeByName(const char *typ
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Type *findTypeByModulenameAndName(const char *modulename,
|
||||
const char *type_name)
|
||||
{
|
||||
@@ -2985,6 +3061,7 @@ Type *findTypeByModulenameAndName(const
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Type *findTypeByModuleAndName(Module *modulePtr, const char *type_name)
|
||||
{
|
||||
Type *typePtr;
|
||||
@@ -3017,6 +3094,7 @@ Type *findTypeByModuleAndName(Module *mo
|
||||
*
|
||||
*---------------------------------------------------------------------- */
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
NamedNumber *findTypeNamedNumber(Type *typePtr,
|
||||
SmiInteger32 number)
|
||||
{
|
||||
@@ -3050,6 +3128,7 @@ NamedNumber *findTypeNamedNumber(Type *t
|
||||
*
|
||||
*---------------------------------------------------------------------- */
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Identity *addIdentity(char *identityname, Parser *parserPtr)
|
||||
{
|
||||
Identity *identityPtr;
|
||||
@@ -3096,6 +3175,7 @@ Identity *addIdentity(char *identityname
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setIdentityDecl(Identity *identityPtr, SmiDecl decl)
|
||||
{
|
||||
identityPtr->export.decl = decl;
|
||||
@@ -3117,6 +3197,7 @@ void setIdentityDecl(Identity *identityP
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setIdentityStatus(Identity *identityPtr, SmiStatus status)
|
||||
{
|
||||
identityPtr->export.status = status;
|
||||
@@ -3140,6 +3221,7 @@ void setIdentityStatus(Identity *identit
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setIdentityDescription(Identity *identityPtr, char *description, Parser *parserPtr)
|
||||
{
|
||||
if (identityPtr->export.description) smiFree(identityPtr->export.description);
|
||||
@@ -3169,6 +3251,7 @@ void setIdentityDescription(Identity *id
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setIdentityReference(Identity *identityPtr, char *reference, Parser *parserPtr)
|
||||
{
|
||||
if (identityPtr->export.reference)
|
||||
@@ -3197,6 +3280,7 @@ void setIdentityReference(Identity *iden
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setIdentityParent(Identity *identityPtr, Identity *parentPtr)
|
||||
{
|
||||
if(identityPtr) identityPtr->parentPtr = parentPtr;
|
||||
@@ -3220,6 +3304,7 @@ void setIdentityParent(Identity *identit
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Identity *findIdentityByName(const char *identityname)
|
||||
{
|
||||
Module *modulePtr;
|
||||
@@ -3256,6 +3341,7 @@ Identity *findIdentityByName(const char
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Identity *findIdentityByModuleAndName(Module *modulePtr,
|
||||
const char *identityname)
|
||||
{
|
||||
@@ -3291,6 +3377,7 @@ Identity *findIdentityByModuleAndName(Mo
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Identity *findIdentityByModulenameAndName(const char *modulename,
|
||||
const char *identity_name)
|
||||
{
|
||||
@@ -3329,6 +3416,7 @@ Identity *findIdentityByModulenameAndNam
|
||||
*
|
||||
*---------------------------------------------------------------------- */
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Class *addClass(char *classname, Parser *parserPtr)
|
||||
{
|
||||
Class *classPtr;
|
||||
@@ -3380,6 +3468,7 @@ Class *addClass(char *classname, Parser
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setClassDecl(Class *classPtr, SmiDecl decl)
|
||||
{
|
||||
classPtr->export.decl = decl;
|
||||
@@ -3401,6 +3490,7 @@ void setClassDecl(Class *classPtr, SmiDe
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setClassStatus(Class *classPtr, SmiStatus status)
|
||||
{
|
||||
classPtr->export.status = status;
|
||||
@@ -3424,6 +3514,7 @@ void setClassStatus(Class *classPtr, Smi
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setClassDescription(Class *classPtr, char *description, Parser *parserPtr)
|
||||
{
|
||||
if (classPtr->export.description) smiFree(classPtr->export.description);
|
||||
@@ -3453,6 +3544,7 @@ void setClassDescription(Class *classPtr
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setClassReference(Class *classPtr, char *reference, Parser *parserPtr)
|
||||
{
|
||||
if (classPtr->export.reference)
|
||||
@@ -3481,6 +3573,7 @@ void setClassReference(Class *classPtr,
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setClassParent(Class *classPtr, Class *parentPtr)
|
||||
{
|
||||
if(classPtr) classPtr->parentPtr = parentPtr;
|
||||
@@ -3502,6 +3595,7 @@ void setClassParent(Class *classPtr, Cla
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Class *findClassByModuleAndName(Module *modulePtr,char *name)
|
||||
{
|
||||
Class *classPtr;
|
||||
@@ -3534,6 +3628,7 @@ Class *findClassByModuleAndName(Module *
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Class *findClassByModulenameAndName(const char *modulename,
|
||||
const char *class_name)
|
||||
{
|
||||
@@ -3572,6 +3667,7 @@ Class *findClassByModulenameAndName(cons
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Attribute *duplicateTypeToAttribute(Type *templatePtr, Class *classPtr, Parser *parserPtr)
|
||||
{
|
||||
Attribute *attributePtr;
|
||||
@@ -3626,6 +3722,7 @@ Attribute *duplicateTypeToAttribute(Type
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Attribute *addAttribute(char *attribute_name,
|
||||
Class *classPtr, Parser *parserPtr)
|
||||
{
|
||||
@@ -3680,6 +3777,7 @@ Attribute *addAttribute(char *attribute_
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setAttributeDecl(Attribute *attributePtr, SmiDecl decl)
|
||||
{
|
||||
attributePtr->export.decl = decl;
|
||||
@@ -3701,6 +3799,7 @@ void setAttributeDecl(Attribute *attribu
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setAttributeParentType(Attribute *attributePtr, Type *parentPtr)
|
||||
{
|
||||
attributePtr->parentTypePtr = parentPtr;
|
||||
@@ -3722,6 +3821,7 @@ void setAttributeParentType(Attribute *a
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setAttributeParentClass(Attribute *attributePtr, Class *parentPtr)
|
||||
{
|
||||
attributePtr->parentClassPtr = parentPtr;
|
||||
@@ -3746,6 +3846,7 @@ void setAttributeParentClass(Attribute *
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setAttributeList(Attribute *attributePtr, List *listPtr)
|
||||
{
|
||||
if (!attributePtr->listPtr) {
|
||||
@@ -3769,6 +3870,7 @@ void setAttributeList(Attribute *attribu
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setAttributeName(Attribute *attributePtr, char *name)
|
||||
{
|
||||
|
||||
@@ -3790,6 +3892,7 @@ void setAttributeName(Attribute *attribu
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setAttributeAccess(Attribute *attributePtr,SmiAccess access)
|
||||
{
|
||||
attributePtr->export.access = access;
|
||||
@@ -3812,6 +3915,7 @@ void setAttributeAccess(Attribute *attri
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Event *addEvent(char *eventname, Class *classPtr,
|
||||
Parser *parserPtr)
|
||||
{
|
||||
@@ -3861,6 +3965,7 @@ Event *addEvent(char *eventname, Class *
|
||||
*
|
||||
*---------------------------------------------------------------------- */
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Macro *addMacro(char *macroname, MacroFlags flags, Parser *parserPtr)
|
||||
{
|
||||
Macro *macroPtr;
|
||||
@@ -3910,6 +4015,7 @@ Macro *addMacro(char *macroname, MacroFl
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setMacroStatus(Macro *macroPtr, SmiStatus status)
|
||||
{
|
||||
macroPtr->export.status = status;
|
||||
@@ -3933,6 +4039,7 @@ void setMacroStatus(Macro *macroPtr, Smi
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setMacroDescription(Macro *macroPtr, char *description, Parser *parserPtr)
|
||||
{
|
||||
if (macroPtr->export.description) smiFree(macroPtr->export.description);
|
||||
@@ -3962,6 +4069,7 @@ void setMacroDescription(Macro *macroPtr
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setMacroReference(Macro *macroPtr, char *reference, Parser *parserPtr)
|
||||
{
|
||||
if (macroPtr->export.reference)
|
||||
@@ -3990,6 +4098,7 @@ void setMacroReference(Macro *macroPtr,
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setMacroAbnf(Macro *macroPtr, char *abnf, Parser *parserPtr)
|
||||
{
|
||||
if (macroPtr->export.abnf)
|
||||
@@ -4020,6 +4129,7 @@ void setMacroAbnf(Macro *macroPtr, char
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setMacroDecl(Macro *macroPtr, SmiDecl decl)
|
||||
{
|
||||
macroPtr->export.decl = decl;
|
||||
@@ -4043,6 +4153,7 @@ void setMacroDecl(Macro *macroPtr, SmiDe
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
void setMacroLine(Macro *macroPtr, int line, Parser *parserPtr)
|
||||
{
|
||||
if (line) {
|
||||
@@ -4071,6 +4182,7 @@ void setMacroLine(Macro *macroPtr, int l
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Macro *findMacroByName(const char *macroname)
|
||||
{
|
||||
Module *modulePtr;
|
||||
@@ -4109,6 +4221,7 @@ Macro *findMacroByName(const char *macro
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Macro *findMacroByModuleAndName(Module *modulePtr, const char *macroname)
|
||||
{
|
||||
Macro *macroPtr;
|
||||
@@ -4144,6 +4257,7 @@ Macro *findMacroByModuleAndName(Module *
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
NamedNumber *findNamedNumberByName(Type *typePtr,const char *name)
|
||||
{
|
||||
List *listPtr;
|
||||
@@ -4580,6 +4694,7 @@ void smiFreeData()
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+__attribute__ ((visibility ("internal")))
|
||||
Module *loadModule(const char *modulename, Parser *parserPtr)
|
||||
{
|
||||
Parser parser;
|
||||
12
libsmi-0.4.8-wget111.patch
Normal file
12
libsmi-0.4.8-wget111.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -up libsmi-0.4.8/tools/smicache.in.BAD libsmi-0.4.8/tools/smicache.in
|
||||
--- libsmi-0.4.8/tools/smicache.in.BAD 2008-04-23 14:38:09.000000000 -0400
|
||||
+++ libsmi-0.4.8/tools/smicache.in 2008-04-23 14:38:13.000000000 -0400
|
||||
@@ -44,7 +44,7 @@ do_usage () {
|
||||
|
||||
|
||||
do_fetch () {
|
||||
- $WGET -q -O "$dir/$1" "$prefix/$1"
|
||||
+ $WGET -q -e "timestamping = off" -O "$dir/$1" "$prefix/$1"
|
||||
}
|
||||
|
||||
|
||||
BIN
libsmi-0.4.8.tar.gz
Normal file
BIN
libsmi-0.4.8.tar.gz
Normal file
Binary file not shown.
84
libsmi.spec
Normal file
84
libsmi.spec
Normal file
@ -0,0 +1,84 @@
|
||||
Name: libsmi
|
||||
Version: 0.4.8
|
||||
Release: 24
|
||||
Summary: A library to access SMI MIB information
|
||||
License: GPLv2+ and BSD
|
||||
URL: http://www.ibr.cs.tu-bs.de/projects/libsmi/index.html
|
||||
Source0: ftp://ftp.ibr.cs.tu-bs.de/pub/local/libsmi/%{name}-%{version}.tar.gz
|
||||
Source1: smi.conf
|
||||
Source2: IETF-MIB-LICENSE.txt
|
||||
Patch0: libsmi-0.4.8-wget111.patch
|
||||
Patch1: libsmi-0.4.8-CVE-2010-2891.patch
|
||||
Patch2: libsmi-0.4.8-symbols-clash.patch
|
||||
Patch3: libsmi-0.4.8-format-security-fix.patch
|
||||
|
||||
BuildRequires: libtool flex bison
|
||||
Requires: gawk wget
|
||||
|
||||
%description
|
||||
The core of the libsmi distribution is a library that allows management
|
||||
applications to access SMI MIB module definitions. On top of this library,
|
||||
there are tools to check, analyze dump, convert, and compare MIB
|
||||
definitions. Finally, the distribution contains a steadily maintained and
|
||||
revised archive of all IETF and IANA maintained standard MIB and PIB modules.
|
||||
|
||||
|
||||
%package devel
|
||||
Summary: Development environment for libsmi library
|
||||
Requires: %name = %version-%release
|
||||
Requires: pkgconfig
|
||||
|
||||
%description devel
|
||||
This package contains development files needed to develop
|
||||
libsmi-based applications.
|
||||
|
||||
%package_help
|
||||
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
cp %{SOURCE2} .
|
||||
|
||||
%build
|
||||
%configure --enable-smi --enable-sming --enable-shared --disable-static
|
||||
%make_build LIBTOOL=/usr/bin/libtool
|
||||
|
||||
iconv -f latin1 -t utf-8 <COPYING >COPYING.utf8
|
||||
mv COPYING.utf8 COPYING
|
||||
|
||||
%install
|
||||
%make_install
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}
|
||||
cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/smi.conf
|
||||
|
||||
%delete_la_and_a
|
||||
|
||||
%check
|
||||
make check ||:
|
||||
%ldconfig_scriptlets
|
||||
|
||||
|
||||
%files
|
||||
%license COPYING IETF-MIB-LICENSE.txt
|
||||
%config(noreplace) %{_sysconfdir}/smi.conf
|
||||
%{_bindir}/*
|
||||
%{_libdir}/*.so.*
|
||||
%{_datadir}/mibs/
|
||||
%{_datadir}/pibs/
|
||||
|
||||
%files devel
|
||||
%{_datadir}/aclocal/libsmi.m4
|
||||
%{_libdir}/pkgconfig/libsmi.pc
|
||||
%{_libdir}/*.so
|
||||
%{_includedir}/*
|
||||
|
||||
%files help
|
||||
%doc ANNOUNCE ChangeLog README THANKS TODO
|
||||
%doc doc/draft-irtf-nmrg-sming-02.txt smi.conf-example
|
||||
%{_mandir}/man1/*.1*
|
||||
%{_mandir}/man3/*.3*
|
||||
|
||||
%changelog
|
||||
* Tue Nov 19 2019 mengxian <mengxian@huawei.com> - 0.4.8-24
|
||||
- Package init
|
||||
40
smi.conf
Normal file
40
smi.conf
Normal file
@ -0,0 +1,40 @@
|
||||
#
|
||||
# smi.conf - Global/User SMI configuration file.
|
||||
#
|
||||
# See smi_config(3) for detailed information on configuration files.
|
||||
#
|
||||
|
||||
# Extend (note the semicolon) the libsmi default module search path.
|
||||
#path :/usr/local/share/mibs/sun
|
||||
#path :/usr/local/share/mibs/cisco
|
||||
|
||||
# Add a private directory.
|
||||
#path :/home/strauss/lib/mibs
|
||||
|
||||
# EXPERIMENTAL: Add a caching method (works only on UNIX systems).
|
||||
# NOTE: the cache directory must exist and permissions must be
|
||||
# handled appropriately. A simple but insecure way is to apply
|
||||
# a tmp flag to the directory (chmod 1777 /usr/local/share/mibs/cache).
|
||||
#cache /usr/local/share/mibs/cache /usr/local/bin/smicache -d /usr/local/share/mibs/cache -p http://www.ibr.cs.tu-bs.de/projects/libsmi/smicache/
|
||||
|
||||
# Don't show any errors by default.
|
||||
level 0
|
||||
|
||||
# Preload some basic SMIv2 modules.
|
||||
load SNMPv2-SMI
|
||||
load SNMPv2-TC
|
||||
load SNMPv2-CONF
|
||||
|
||||
# Make smilint shout loud to report all errors and warnings.
|
||||
smilint: level 9
|
||||
|
||||
# But please don't claim about any names longer than 32 chars.
|
||||
# (note: this is the prefix of errors `namelength-32-module,
|
||||
# -type, -object, -enumeration, and -bit)
|
||||
smilint: hide namelength-32
|
||||
|
||||
# Preloading some more modules for special applications.
|
||||
tcpdump: load DISMAN-SCRIPT-MIB
|
||||
tcpdump: load IF-MIB
|
||||
smiquery: load IF-MIB
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user