added my Recipes

This commit is contained in:
2024-07-11 14:16:35 +02:00
parent 38bc4f53ac
commit 09b621d929
7118 changed files with 525762 additions and 3 deletions

View File

@@ -0,0 +1,53 @@
From 77b520a8ee193b6d9f12e049f505d8d98204c11c Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 31 Aug 2022 17:13:32 -0700
Subject: [PATCH] Define createIdentifierRef prototype in yang-complex-types.c
Provide needed prototype to make compiler happy
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
lib/parser-yang.y | 3 ++-
lib/yang-complex-types.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
--- a/lib/parser-yang.y
+++ b/lib/parser-yang.y
@@ -41,7 +41,8 @@
#include "yang-complex-types.h"
#include "util.h"
#include "error.h"
-
+#include "yang-check.h"
+
#ifdef HAVE_DMALLOC_H
#include <dmalloc.h>
#endif
@@ -61,7 +62,8 @@
#define debug
#endif
-
+extern void createIdentifierRef(struct _YangNode *node, char* prefix, char* ident);
+extern void smiyyerror(char *msg, Parser *parserPtr);
/*
* NOTE: The argument lvalp ist not really a void pointer. Unfortunately,
* we don't know it better at this point. bison generated C code declares
--- a/lib/yang-complex-types.c
+++ b/lib/yang-complex-types.c
@@ -35,12 +35,13 @@
#include "yang-data.h"
#include "yang-check.h"
#include "yang-complex-types.h"
-
/*
* Current parser defined in parser-yang. Workaround - can't include data.h
*/
extern Parser *currentParser;
+extern void createIdentifierRef(struct _YangNode *node, char* prefix, char* ident);
+
static const int parents_complex_type[] = {
YANG_DECL_MODULE, YANG_DECL_SUBMODULE, YANG_DECL_CONTAINER,
YANG_DECL_LIST, YANG_DECL_RPC, YANG_DECL_INPUT,

View File

@@ -0,0 +1,28 @@
From 86b706f694b822d8028fd36320147767056d2ffa Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 6 Sep 2022 12:09:00 -0700
Subject: [PATCH] parser-yang: Define _DEFAULT_SOURCE
This is needed for timegm API
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
lib/parser-yang.y | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/parser-yang.y b/lib/parser-yang.y
index b111607..0ded9d2 100644
--- a/lib/parser-yang.y
+++ b/lib/parser-yang.y
@@ -21,6 +21,7 @@
#ifdef BACKEND_YANG
#define _ISOC99_SOURCE
+#define _DEFAULT_SOURCE
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
--
2.37.3

View File

@@ -0,0 +1,277 @@
From 460d3a5ef450c30b34a663a073ee53329441ef6e Mon Sep 17 00:00:00 2001
From: Jackie Huang <jackie.huang@windriver.com>
Date: Tue, 23 Feb 2016 16:34:38 +0800
Subject: [PATCH] libsmi: fix the test dump files
These test dump files were generated by smidump 0.4.5
which would not match with the ones generated by 0.4.8,
so update them with the ones for 0.4.8.
Upstream-Status: Pending
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
test/dumps/cm/MAU-MIB | 8 ++++----
test/dumps/cm/RMON2-MIB | 6 +++---
test/dumps/sming/IF-MIB | 22 +++++++++++++---------
test/dumps/sming/MAU-MIB | 19 +++++++++++--------
test/dumps/sming/RMON2-MIB | 40 ++++++++++++++++++++++++----------------
test/dumps/sming/SNMPv2-MIB | 11 +++++++----
6 files changed, 62 insertions(+), 44 deletions(-)
diff --git a/test/dumps/cm/MAU-MIB b/test/dumps/cm/MAU-MIB
index 0d97284..0cfd4e1 100644
--- a/test/dumps/cm/MAU-MIB
+++ b/test/dumps/cm/MAU-MIB
@@ -53,7 +53,7 @@
<attribute name="text">
<composite type="text">
<attribute name="string">
- <string>#Conceptual model of MAU-MIB - generated by smidump 0.4.5#</string>
+ <string>#Conceptual model of MAU-MIB - generated by smidump 0.4.8#</string>
</attribute>
<attribute name="font">
<font name="Courier"/>
@@ -1294,7 +1294,7 @@
<point val="29.52,49.18"/>
</attribute>
<attribute name="obj_bb">
- <rectangle val="28.67,32.93;30.37,34.63"/>
+ <rectangle val="28.67,32.93;30.37,34.62"/>
</attribute>
<attribute name="orth_points">
<point val="29.52,49.18"/>
@@ -1678,7 +1678,7 @@
<point val="37.68,49.18"/>
</attribute>
<attribute name="obj_bb">
- <rectangle val="28.67,32.93;30.37,34.63"/>
+ <rectangle val="28.67,32.93;30.37,34.62"/>
</attribute>
<attribute name="orth_points">
<point val="37.68,49.18"/>
@@ -1737,7 +1737,7 @@
<point val="29.52,35.78"/>
</attribute>
<attribute name="obj_bb">
- <rectangle val="28.67,32.93;30.37,34.63"/>
+ <rectangle val="28.67,32.93;30.37,34.62"/>
</attribute>
<attribute name="orth_points">
<point val="29.52,35.78"/>
diff --git a/test/dumps/cm/RMON2-MIB b/test/dumps/cm/RMON2-MIB
index 30ae8dd..1b9d268 100644
--- a/test/dumps/cm/RMON2-MIB
+++ b/test/dumps/cm/RMON2-MIB
@@ -53,7 +53,7 @@
<attribute name="text">
<composite type="text">
<attribute name="string">
- <string>#Conceptual model of RMON2-MIB - generated by smidump 0.4.5#</string>
+ <string>#Conceptual model of RMON2-MIB - generated by smidump 0.4.8#</string>
</attribute>
<attribute name="font">
<font name="Courier"/>
@@ -2841,8 +2841,8 @@
</attribute>
<attribute name="orth_points">
<point val="18.80,55.45"/>
- <point val="18.80,68.63"/>
- <point val="22.80,68.63"/>
+ <point val="18.80,68.62"/>
+ <point val="22.80,68.62"/>
<point val="22.80,81.80"/>
</attribute>
<attribute name="orth_orient">
diff --git a/test/dumps/sming/IF-MIB b/test/dumps/sming/IF-MIB
index 21432cb..c2ffc06 100644
--- a/test/dumps/sming/IF-MIB
+++ b/test/dumps/sming/IF-MIB
@@ -1,16 +1,18 @@
//
-// This module has been generated by smidump 0.4.5. Do not edit.
+// This module has been generated by smidump 0.4.8. Do not edit.
//
module IF-MIB {
- import IANAifType-MIB (IANAifType);
- import IRTF-NMRG-SMING (Counter32, Counter64,
- DisplayString255, Gauge32,
- PhysAddress, TimeStamp, TimeTicks,
- TruthValue);
- import IRTF-NMRG-SMING-SNMP (AutonomousType, RowStatus,
- TestAndIncr, mib-2);
- import SNMPv2-MIB (snmpTraps);
+ import SNMPv2-SMI (MODULE-IDENTITY, OBJECT-TYPE, Counter32,
+ Gauge32, Counter64, Integer32, TimeTicks,
+ mib-2, NOTIFICATION-TYPE);
+ import SNMPv2-TC (TEXTUAL-CONVENTION, DisplayString,
+ PhysAddress, TruthValue, RowStatus,
+ TimeStamp, AutonomousType, TestAndIncr);
+ import SNMPv2-CONF (MODULE-COMPLIANCE, OBJECT-GROUP,
+ NOTIFICATION-GROUP);
+ import SNMPv2-MIB (snmpTraps);
+ import IANAifType-MIB (IANAifType);
//
// MODULE META INFORMATION
@@ -79,6 +81,7 @@ module IF-MIB {
typedef InterfaceIndex {
type Integer32 (1..2147483647);
format "d";
+ status current;
description
"A unique value, greater than zero, for each interface or
interface sub-layer in the managed system. It is
@@ -91,6 +94,7 @@ module IF-MIB {
typedef InterfaceIndexOrZero {
type Integer32 (0..2147483647);
format "d";
+ status current;
description
"This textual convention is an extension of the
InterfaceIndex convention. The latter defines a greater
diff --git a/test/dumps/sming/MAU-MIB b/test/dumps/sming/MAU-MIB
index 2cffd99..64cf714 100644
--- a/test/dumps/sming/MAU-MIB
+++ b/test/dumps/sming/MAU-MIB
@@ -1,15 +1,18 @@
//
-// This module has been generated by smidump 0.4.5. Do not edit.
+// This module has been generated by smidump 0.4.8. Do not edit.
//
module MAU-MIB {
- import IANA-MAU-MIB (IANAifJackType,
- IANAifMauAutoNegCapBits,
- IANAifMauMediaAvailable,
- IANAifMauTypeListBits);
- import IF-MIB (InterfaceIndex);
- import IRTF-NMRG-SMING (Counter32, Counter64, TruthValue);
- import IRTF-NMRG-SMING-SNMP (AutonomousType, mib-2);
+ import SNMPv2-SMI (Counter32, Integer32, Counter64, OBJECT-TYPE,
+ MODULE-IDENTITY, NOTIFICATION-TYPE, mib-2);
+ import SNMPv2-TC (TruthValue, AutonomousType,
+ TEXTUAL-CONVENTION);
+ import SNMPv2-CONF (OBJECT-GROUP, MODULE-COMPLIANCE,
+ NOTIFICATION-GROUP);
+ import IF-MIB (InterfaceIndex);
+ import IANA-MAU-MIB (IANAifMauTypeListBits,
+ IANAifMauMediaAvailable,
+ IANAifMauAutoNegCapBits, IANAifJackType);
//
// MODULE META INFORMATION
diff --git a/test/dumps/sming/RMON2-MIB b/test/dumps/sming/RMON2-MIB
index 423b9bc..04763e5 100644
--- a/test/dumps/sming/RMON2-MIB
+++ b/test/dumps/sming/RMON2-MIB
@@ -1,23 +1,26 @@
//
-// This module has been generated by smidump 0.4.5. Do not edit.
+// This module has been generated by smidump 0.4.8. Do not edit.
//
module RMON2-MIB {
- import IF-MIB (ifIndex);
- import IRTF-NMRG-SMING (Counter32, DisplayString255,
- Gauge32, IpAddress, TimeStamp,
- TimeTicks);
- import IRTF-NMRG-SMING-SNMP (RowStatus, mib-2);
- import RMON-MIB (OwnerString, channelEntry,
- etherStatsEntry, filter,
- filterEntry, history,
- historyControlEntry,
- hostControlEntry, hosts, matrix,
- matrixControlEntry, statistics);
- import TOKEN-RING-RMON-MIB (ringStationControlEntry,
- sourceRoutingStatsEntry,
- tokenRing, tokenRingMLStatsEntry,
- tokenRingPStatsEntry);
+ import SNMPv2-SMI (MODULE-IDENTITY, OBJECT-TYPE,
+ Counter32, Integer32, Gauge32,
+ IpAddress, TimeTicks, mib-2);
+ import SNMPv2-TC (TEXTUAL-CONVENTION, RowStatus,
+ DisplayString, TimeStamp);
+ import SNMPv2-CONF (MODULE-COMPLIANCE, OBJECT-GROUP);
+ import IF-MIB (ifIndex);
+ import RMON-MIB (OwnerString, statistics, history,
+ hosts, matrix, filter,
+ etherStatsEntry,
+ historyControlEntry,
+ hostControlEntry,
+ matrixControlEntry, filterEntry,
+ channelEntry);
+ import TOKEN-RING-RMON-MIB (tokenRing, tokenRingMLStatsEntry,
+ tokenRingPStatsEntry,
+ ringStationControlEntry,
+ sourceRoutingStatsEntry);
//
// MODULE META INFORMATION
@@ -167,6 +170,7 @@ module RMON2-MIB {
typedef ZeroBasedCounter32 {
type Gauge32;
+ status current;
description
"This TC describes an object that counts events with the
following semantics: objects of this type will be set to
@@ -188,6 +192,7 @@ module RMON2-MIB {
typedef LastCreateTime {
type TimeTicks;
+ status current;
description
"This TC describes an object that stores the value of the
sysUpTime object at the last time its entry was created.
@@ -208,6 +213,7 @@ module RMON2-MIB {
typedef TimeFilter {
type TimeTicks;
+ status current;
description
"To be used for the index to a table. Allows an application
to download only those rows changed since a particular time.
@@ -424,6 +430,7 @@ module RMON2-MIB {
typedef DataSource {
type ObjectIdentifier;
+ status current;
description
"Identifies the source of the data that the associated
function is configured to analyze. This source can be any
@@ -439,6 +446,7 @@ module RMON2-MIB {
typedef ControlString {
type OctetString (0..255);
+ status current;
description
"This data type is used to communicate with a modem or a
diff --git a/test/dumps/sming/SNMPv2-MIB b/test/dumps/sming/SNMPv2-MIB
index ca355c8..0c88939 100644
--- a/test/dumps/sming/SNMPv2-MIB
+++ b/test/dumps/sming/SNMPv2-MIB
@@ -1,11 +1,14 @@
//
-// This module has been generated by smidump 0.4.5. Do not edit.
+// This module has been generated by smidump 0.4.8. Do not edit.
//
module SNMPv2-MIB {
- import IRTF-NMRG-SMING (Counter32, DisplayString255,
- TimeStamp, TimeTicks, snmpModules);
- import IRTF-NMRG-SMING-SNMP (TestAndIncr, mib-2);
+ import SNMPv2-SMI (MODULE-IDENTITY, OBJECT-TYPE,
+ NOTIFICATION-TYPE, TimeTicks, Counter32,
+ snmpModules, mib-2);
+ import SNMPv2-TC (DisplayString, TestAndIncr, TimeStamp);
+ import SNMPv2-CONF (MODULE-COMPLIANCE, OBJECT-GROUP,
+ NOTIFICATION-GROUP);
//
// MODULE META INFORMATION
--
1.9.1

View File

@@ -0,0 +1,48 @@
#
# smi.conf - Global/User SMI configuration file. (EXAMPLE)
#
# Copyright (c) 2000 Frank Strauss, Technical University of Braunschweig.
#
# See the file "COPYING" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# @(#) $Id: smi.conf-example 1134 2001-06-11 09:59:13Z strauss $
#
#
# See smi_config(3) for detailed information on configuration files.
#
# Extend (note the semicolon) the libsmi default module search path.
path :/usr/share/mibs/iana
path :/usr/share/mibs/ietf
path :/usr/share/mibs/irtf
path :/usr/share/mibs/tubs
# 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

View File

@@ -0,0 +1,36 @@
SUMMARY = "A Library to Access SMI MIB Information"
HOMEPAGE = "https://www.ibr.cs.tu-bs.de/projects/libsmi"
LICENSE = "BSD-3-Clause & TCL"
LIC_FILES_CHKSUM = "file://COPYING;md5=3ad3076f9332343a21636cfd351f05b7"
SRC_URI = "https://www.ibr.cs.tu-bs.de/projects/${BPN}/download/${BP}.tar.gz \
file://smi.conf \
file://libsmi-fix-the-test-dump-files.patch \
file://0001-Define-createIdentifierRef-prototype-in-yang-complex.patch \
file://0001-parser-yang-Define-_DEFAULT_SOURCE.patch \
"
SRC_URI[md5sum] = "4bf47483c06c9f07d1b10fbc74eddf11"
SRC_URI[sha256sum] = "f21accdadb1bb328ea3f8a13fc34d715baac6e2db66065898346322c725754d3"
DEPENDS += "bison-native flex-native"
RDEPENDS:${PN} += "wget"
inherit autotools-brokensep
EXTRA_OECONF = "ac_cv_path_SH=/bin/sh ac_cv_path_WGET=${bindir}/wget ac_cv_path_AWK=${bindir}/awk"
do_install:append () {
install -d ${D}${sysconfdir}
install -m 0644 ${WORKDIR}/smi.conf ${D}${sysconfdir}/smi.conf
}
PACKAGES += "${PN}-mibs ${PN}-pibs ${PN}-yang"
FILES:${PN}-mibs += "${datadir}/mibs"
FILES:${PN}-pibs += "${datadir}/pibs"
FILES:${PN}-yang += "${datadir}/yang"
RRECOMMENDS:${PN} = "${BPN}-mibs"