--- /dev/null
+FROM debian:9
+
+RUN apt update && apt install -y \
+build-essential \
+jq \
+gawk \
+gettext \
+git \
+libncurses5-dev \
+libssl-dev \
+python \
+subversion \
+time \
+zlib1g-dev \
+&& rm -rf /var/lib/apt/lists/*
+
+# LEDE Build System (LEDE GnuPG key for unattended build jobs)
+RUN curl 'https://git.openwrt.org/?p=keyring.git;a=blob_plain;f=gpg/626471F1.asc' | gpg --import \
+ && echo '54CC74307A2C6DC9CE618269CD84BCED626471F1:6:' | gpg --import-ownertrust
+
+# LEDE Release Builder (17.01 "Reboot" Signing Key)
+RUN curl 'https://git.openwrt.org/?p=keyring.git;a=blob_plain;f=gpg/D52BBB6B.asc' | gpg --import \
+ && echo 'B09BE781AE8A0CD4702FDCD3833C6010D52BBB6B:6:' | gpg --import-ownertrust
+
+# OpenWrt Release Builder (18.06 Signing Key)
+RUN curl 'https://git.openwrt.org/?p=keyring.git;a=blob_plain;f=gpg/17E1CE16.asc' | gpg --import \
+ && echo '6768C55E79B032D77A28DA5F0F20257417E1CE16:6:' | gpg --import-ownertrust
--- /dev/null
+# Build/update the docker image
+
+docker pull debian:9
+docker build --rm .
+docker tag <IMAGE ID> docker.io/champtar/openwrtpackagesci:latest
+docker push docker.io/champtar/openwrtpackagesci:latest
--- /dev/null
+version: 2.0
+jobs:
+ build:
+ docker:
+ - image: champtar/openwrtpackagesci@sha256:d46da22bc628f4b369147eebfa1b032e4066510da42a073b22acbf6b6595b77f
+ environment:
+ - SDK_BASE_URL: "https://downloads.lede-project.org/snapshots/targets/ar71xx/generic"
+ - SDK_FILE: "openwrt-sdk-ar71xx-generic_gcc-7.3.0_musl.Linux-x86_64.tar.xz"
+ - BRANCH: "master"
+ steps:
+ - run:
+ name: Download the SDK
+ working_directory: ~/sdk
+ command: |
+ curl "$SDK_BASE_URL/sha256sums" -sS -o sha256sums
+ curl "$SDK_BASE_URL/sha256sums.asc" -sS -o sha256sums.asc
+ gpg --with-fingerprint --verify sha256sums.asc sha256sums
+ curl "$SDK_BASE_URL/$SDK_FILE" -sS -o "$SDK_FILE"
+ sha256sum -c --ignore-missing sha256sums
+
+ - checkout:
+ path: ~/openwrt_packages
+
+ - run:
+ name: Prepare build_dir
+ working_directory: ~/build_dir
+ command: |
+ tar Jxf ~/sdk/$SDK_FILE --strip=1
+ cat > feeds.conf <<EOF
+ src-git base https://github.com/lede-project/source.git
+ src-link packages $HOME/openwrt_packages
+ src-git luci https://github.com/openwrt/luci.git
+ EOF
+ cat feeds.conf
+ # enable BUILD_LOG
+ sed -i '1s/^/config BUILD_LOG\n\tbool\n\tdefault y\n\n/' Config-build.in
+ ./scripts/feeds update -a > /dev/null
+ ./scripts/feeds install -a > /dev/null
+ make defconfig > /dev/null
+
+ - run:
+ name: Download & check & compile
+ working_directory: ~/build_dir
+ command: |
+ PKGS=$(cd ~/openwrt_packages; git diff --diff-filter=d --name-only "origin/$BRANCH..." | grep 'Makefile$' | grep -v '/files/' | awk -F/ '{ print $(NF-1) }')
+ echo "Packages: $PKGS"
+ for PKG in $PKGS ; do
+ make "package/$PKG/download" V=s
+ make "package/$PKG/check" V=s
+ done
+ for PKG in $PKGS ; do
+ make "package/$PKG/compile" -j3 V=s
+ done
+
+ - store_artifacts:
+ path: ~/build_dir/logs
+
+ - store_artifacts:
+ path: ~/build_dir/bin
+
+workflows:
+ version: 2
+ buildpr:
+ jobs:
+ - build:
+ filters:
+ branches:
+ ignore: master
# Contributing Guidelines
-(See <http://wiki.openwrt.org/doc/devel/packages> for overall format and construction)
+Ref: <https://openwrt.org/docs/guide-developer/packages> for overall format and construction
### Basic guidelines
All packages you commit or submit by pull-request should follow these simple guidelines:
-* Package a version which is still maintained by the upstream author.
-* Will be updated regularly to maintained and supported versions.
+
+* Package a version which is still maintained by the upstream author and will be updated regularly with supported versions.
* Have no dependencies outside the OpenWrt core packages or this repository feed.
* Have been tested to compile with the correct includes and dependencies. Please also test with "Compile with full language support" found under "General Build Settings" set if language support is relevant to your package.
-* Do NOT use a rolling source file (e.g. foo-latest.tar.gz) or the head of a branch as source for the package since that would create unpredictable builds which change over time.
* Best of all -- it works as expected!
+### Package Sources (archives and repositories)
+
+* PKG_SOURCE should reference the smallest available archive. In order of preference: xz (most compressed), bzip2, gz and zip. As a last resort, downloads from source repositories can be used.
+* PKG_SOURCE_URL should link to an official release archive. Use of HTTPS: is preferred. If a source archive is not available, a locally generated archive fetched using git, svn, cvs or in rare circumstances, hg or bzr.
+* Convenience macros for popular mirrors are defined. Using these macros will make your package downloads more robust by mapping to a list of possible source mirrors for archive availability.
+ - @SF - Sourceforge (downloads.sourceforge.net) with 5 retries due to re-directs
+ - @GITHUB - Github (raw.githubusercontent.com) with 5 retries due to re-directs
+ - @GNU - 8 regional servers
+ - @GNOME - 8 regional servers
+ - @SAVANNAH - 8 regional servers
+ - @APACHE - 8 regional servers
+ - @KERNEL - Linux kernel archives & mirrors
+* Please *DO NOT* use an archive which changes over time. A version labeled "latest" is not constant each download. Also, using the head of a branch will create unpredictable results which can be different each build.
+
#### Makefile contents should contain:
-* An up-to-date copyright notice. Use OpenWrt if no other present or supply your own.
-* A (PKG_)MAINTAINER definition listing either yourself or another person in the field.
- (E.g.: PKG_MAINTAINER:= Joe D. Hacker `<jdh@jdhs-email-provider.org`>)
+* Provide an up-to-date Copyright notice or **none**. Copyright should not be assigned to OpenWrt unless you are explicitly requested by or working under contract to OpenWrt. Assigning a Copyright to yourself or organization you represent is acceptable.
+* A (PKG_)MAINTAINER definition listing either yourself and/or another person responsible for this package (E.g.: PKG_MAINTAINER:= Joe D. Hacker `<jdh@jdhs-email-provider.org`>). Listing multiple maintainers is encouraged in order to keep the package active and up-to-date. Leaving this blank will also be accepted, however the review process may not be as quick as one with a maintainer.
* A PKG_LICENSE tag declaring the main license of the package.
(E.g.: PKG_LICENSE:=GPL-2.0+) Please use SPDX identifiers if possible (see list at the bottom).
* An optional PKG_LICENSE_FILES tag including the filenames of the license-files in the source-package.
* PKG_RELEASE should be initially set to 1 or reset to 1 if the software version is changed. You should increment it if the package itself has changed. For example, modifying a support script, changing configure options like --disable* or --enable* switches, or if you changed something in the package which causes the resulting binaries to be different. Changes like correcting md5sums, changing mirror URLs, adding a maintainer field or updating a comment or copyright year in a Makefile do not require a change to PKG_RELEASE.
* Avoid reuse of PKG_NAME in call, define and eval lines to improve readability.
+
#### Commits in your pull-requests should:
* Have a useful description prefixed with the package name
(E.g.: "foopkg: Add libzot dependency")
-* Include Signed-off-by in the comment
- (See <https://dev.openwrt.org/wiki/SubmittingPatches#a10.Signyourwork>)
+* Include Signed-off-by tag in the commit comments.
+ See: [Sign your work](https://openwrt.org/docs/guide-developer/submittingpatches-tomerge?s[]=sign#sign_your_work)
### Advice on pull requests:
This is the OpenWrt "packages"-feed containing community-maintained build scripts, options and patches for applications, modules and libraries used within OpenWrt.
-Installation of pre-built packages is handled directly by the **opkg** utility within your running OpenWrt system or by using the [OpenWrt SDK](http://wiki.openwrt.org/doc/howto/obtain.firmware.sdk) on a build system.
+Installation of pre-built packages is handled directly by the **opkg** utility within your running OpenWrt system or by using the [OpenWrt SDK](https://openwrt.org/docs/guide-developer/obtain.firmware.sdk) on a build system.
## Usage
-This repository is intended to be layered on-top of an OpenWrt buildroot. If you do not have an OpenWrt buildroot installed, see the documentation at: [OpenWrt Buildroot – Installation](http://wiki.openwrt.org/doc/howto/buildroot.exigence) on the OpenWrt support site.
+This repository is intended to be layered on-top of an OpenWrt buildroot. If you do not have an OpenWrt buildroot installed, see the documentation at: [OpenWrt Buildroot – Installation](https://openwrt.org/docs/guide-developer/build-system/install-buildsystem) on the OpenWrt support site.
This feed is enabled by default. To install all its package definitions, run:
```
--- /dev/null
+#
+# Copyright (C) 2007-2018 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=gkrellmd
+PKG_VERSION:=2.3.10
+PKG_RELEASE:=1
+
+PKG_SOURCE:=gkrellm-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=http://gkrellm.srcbox.net/releases
+PKG_HASH:=8b9ec8baadcd5830c6aff04ba86dc9ed317a15c1c3787440bd1e680fb2fcd766
+PKG_MAINTAINER:=Peter Denison <openwrt@marshadder.org>
+PKG_LICENSE:=GPL-2.0+
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/gkrellm-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/gkrellmd
+ SECTION:=admin
+ CATEGORY:=Administration
+ DEPENDS:=+glib2
+ TITLE:=The GNU Krell Monitors Server
+ URL:=http://gkrellm.net/
+endef
+
+define Package/gkrellmd/description
+ Gkrellmd listens for connections from gkrellm clients. When
+ a gkrellm client connects to a gkrellmd server all builtin
+ monitors collect their data from the server.
+endef
+
+define Package/gkrellmd/conffiles
+/etc/$(PKG_NAME).conf
+endef
+
+define Build/Compile
+ CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CPPFLAGS)" \
+ LDFLAGS="$(EXTRA_LDFLAGS) " \
+ $(MAKE) -C $(PKG_BUILD_DIR)/server \
+ CC="$(TARGET_CC)" \
+ glib2="yes" \
+ without-libsensors="yes" \
+ GLIB2_LIB="$(TARGET_LDFLAGS) -lglib-2.0 -lgmodule-2.0" \
+ GLIB2_INCLUDE="-I$(STAGING_DIR)/usr/include/glib-2.0 -I$(STAGING_DIR)/usr/lib/glib-2.0/include"
+endef
+
+define Package/gkrellmd/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/server/$(PKG_NAME) $(1)/usr/bin/
+ $(INSTALL_DIR) $(1)/etc
+ $(INSTALL_CONF) $(PKG_BUILD_DIR)/server/$(PKG_NAME).conf $(1)/etc/
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
+endef
+
+$(eval $(call BuildPackage,gkrellmd))
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2007 OpenWrt.org
+
+START=60
+BIN=gkrellmd
+RUN_D=/var/run
+PID_F=$RUN_D/$BIN.pid
+
+start() {
+ mkdir -p $RUN_D
+ $BIN $OPTIONS
+}
+
+stop() {
+ [ -f $PID_F ] && kill $(cat $PID_F)
+}
--- /dev/null
+Index: gkrellm-2.3.10/server/gkrellmd.conf
+===================================================================
+--- gkrellm-2.3.10.orig/server/gkrellmd.conf 2008-03-09 10:19:26.000000000 +0100
++++ gkrellm-2.3.10/server/gkrellmd.conf 2008-03-09 10:19:26.000000000 +0100
+@@ -4,7 +4,7 @@
+ # the client update frequency. Values may be from 1 to 10 and should be
+ # smaller values to reduce network traffic.
+ #
+-#update-hz 3
++update-hz 10
+
+ # Limit number of simultaneous clients allowed to connect.
+ #
+@@ -30,18 +30,18 @@
+ # Drop privileges after startup (you must start gkrellmd as root to do it).
+ # NOTE: Option ignored on Windows
+ #
+-#user nobody
++user nobody
+ #group proc
+
+ # Create a PID file for the running gkrellmd. Default is no PID file.
+ # NOTE: Option ignored on Windows
+ #
+-#pidfile /var/run/gkrellmd.pid
++pidfile /var/run/gkrellmd.pid
+
+ # Run in background and detach from the controlling terminal
+ # NOTE: Option ignored on Windows
+ #
+-#detach
++detach
+
+ # Time interval between checks for various monitors. If nfs-interval
+ # is <= 0 then gkrellmd will not read data for nfs file system types.
PKG_NAME:=htop
PKG_VERSION:=2.2.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://hisham.hm/htop/releases/$(PKG_VERSION)/
+PKG_SOURCE_URL:=https://hisham.hm/htop/releases/$(PKG_VERSION)/
PKG_HASH:=d9d6826f10ce3887950d709b53ee1d8c1849a70fa38e91d5896ad8cbc6ba3c57
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:htop:htop
-PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
CATEGORY:=Administration
TITLE:=Interactive processes viewer
DEPENDS:=+libncurses
- URL:=http://htop.sourceforge.net/
+ URL:=https://hisham.hm/htop/
MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
endef
PKG_NAME:=ipmitool
PKG_VERSION:=1.8.18
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/$(PKG_NAME)
CATEGORY:=Administration
DEPENDS:=+libopenssl +libncurses +libreadline
TITLE:=Command-line interface to IPMI-enabled devices
- URL:=http://sourceforge.net/projects/ipmitool/
+ URL:=https://github.com/ipmitool/ipmitool
MAINTAINER:=Alexander Couzens <lynxis@fe80.eu>
endef
--- /dev/null
+From cf39da53236abf02d39c6a98a645488933f3e861 Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Tue, 21 Aug 2018 19:29:07 -0700
+Subject: [PATCH] ipmitool: Fix compile with deprecated APIs disabled.
+
+From the man page:
+
+EVP_CIPHER_CTX was made opaque in OpenSSL 1.1.0. As a result,
+EVP_CIPHER_CTX_reset() appeared and EVP_CIPHER_CTX_cleanup() disappeared.
+EVP_CIPHER_CTX_init() remains as an alias for EVP_CIPHER_CTX_reset().
+
+Signed-off-by: Rosen Penev <rosenp@gmail.com>
+---
+ src/plugins/lanplus/lanplus_crypt_impl.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/src/plugins/lanplus/lanplus_crypt_impl.c b/src/plugins/lanplus/lanplus_crypt_impl.c
+index 9652a5e..e94401e 100644
+--- a/src/plugins/lanplus/lanplus_crypt_impl.c
++++ b/src/plugins/lanplus/lanplus_crypt_impl.c
+@@ -183,7 +183,11 @@ lanplus_encrypt_aes_cbc_128(const uint8_t * iv,
+ lprintf(LOG_DEBUG, "ERROR: EVP_CIPHER_CTX_new() failed");
+ return;
+ }
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ EVP_CIPHER_CTX_init(ctx);
++#else
++ EVP_CIPHER_CTX_reset(ctx);
++#endif
+ EVP_EncryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv);
+ EVP_CIPHER_CTX_set_padding(ctx, 0);
+
+@@ -262,7 +266,11 @@ lanplus_decrypt_aes_cbc_128(const uint8_t * iv,
+ lprintf(LOG_DEBUG, "ERROR: EVP_CIPHER_CTX_new() failed");
+ return;
+ }
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ EVP_CIPHER_CTX_init(ctx);
++#else
++ EVP_CIPHER_CTX_reset(ctx);
++#endif
+ EVP_DecryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv);
+ EVP_CIPHER_CTX_set_padding(ctx, 0);
+
+--
+2.7.4
+
include $(TOPDIR)/rules.mk
PKG_NAME:=monit
-PKG_VERSION:=5.24.0
-PKG_RELEASE:=1
+PKG_VERSION:=5.25.2
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=754d1f0e165e5a26d4639a6a83f44ccf839e381f2622e0946d5302fa1f2d2414
PKG_SOURCE_URL:=https://mmonit.com/monit/dist
+PKG_HASH:=aa0ce6361d1155e43e30a86dcff00b2003d434f221c360981ced830275abc64a
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=AGPL-3.0
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:tildeslash:monit
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
--- a/configure
+++ b/configure
-@@ -13852,14 +13852,7 @@ fi
+@@ -14390,14 +14390,7 @@ fi
# Find the right directory to put the root-mode PID file in
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pid file location" >&5
$as_echo_n "checking pid file location... " >&6; }
--- /dev/null
+diff --git a/src/ssl/Ssl.c b/src/ssl/Ssl.c
+index 6501f25..9c24ad5 100644
+--- a/src/ssl/Ssl.c
++++ b/src/ssl/Ssl.c
+@@ -302,8 +302,8 @@ static boolean_t _retry(int socket, int *timeout, int (*callback)(int socket, ti
+
+
+ #if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
+-static unsigned long _threadID() {
+- return (unsigned long)Thread_self();
++static void _threadID(CRYPTO_THREADID *id) {
++ CRYPTO_THREADID_set_numeric(id, (unsigned long)Thread_self());
+ }
+
+
+@@ -482,7 +482,7 @@ void Ssl_start() {
+ instanceMutexTable = CALLOC(locks, sizeof(Mutex_T));
+ for (int i = 0; i < locks; i++)
+ Mutex_init(instanceMutexTable[i]);
+- CRYPTO_set_id_callback(_threadID);
++ CRYPTO_THREADID_set_callback(_threadID);
+ CRYPTO_set_locking_callback(_mutexLock);
+ #endif
+ if (File_exist(URANDOM_DEVICE))
+@@ -496,7 +496,7 @@ void Ssl_start() {
+
+ void Ssl_stop() {
+ #if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
+- CRYPTO_set_id_callback(NULL);
++ CRYPTO_THREADID_set_callback(NULL);
+ CRYPTO_set_locking_callback(NULL);
+ for (int i = 0; i < CRYPTO_num_locks(); i++)
+ Mutex_destroy(instanceMutexTable[i]);
+@@ -510,7 +510,7 @@ void Ssl_stop() {
+
+ void Ssl_threadCleanup() {
+ #if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
+- ERR_remove_state(0);
++ ERR_remove_thread_state(NULL);
+ #endif
+ }
+
PKG_NAME:=muninlite
PKG_VERSION:=1.0.4
-PKG_RELEASE:=8
+PKG_RELEASE:=9
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/$(PKG_NAME)
--- /dev/null
+--- a/plugins/irqstats 2007-11-30 11:39:08.000000000 +0100
++++ b/plugins/irqstats 2018-08-29 08:20:50.809468406 +0200
+@@ -1,6 +1,6 @@
+ config_irqstats() {
+ echo "graph_title Individual interrupts
+-graph_args --base 1000 -l 0;
++graph_args --base 1000 -l 0
+ graph_vlabel interrupts / \${graph_period}
+ graph_category system"
+ CPUS=$(grep 'CPU[0-9]' /proc/interrupts | wc -w)
include $(TOPDIR)/rules.mk
PKG_NAME:=netdata
-PKG_VERSION:=1.10.0
+PKG_VERSION:=1.11.0
PKG_RELEASE:=1
PKG_MAINTAINER:=
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=COPYING
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=https://github.com/firehol/netdata/releases/download/v$(PKG_VERSION)
-PKG_HASH:=0514fc002c5c5fb730156b3fe928965b22327833c6c17e22b7097eda657e77a2
+PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/netdata/netdata/releases/download/v$(PKG_VERSION)
+PKG_HASH:=c42c8411c22c72e3e52fed38d7b9537bcfaf568d01e9c1e35ec645490627619d
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)_rolling
PKG_INSTALL:=1
PKG_FIXUP:=autoreconf
+PKG_USE_MIPS16:=0
include $(INCLUDE_DIR)/package.mk
define Package/netdata/description
netdata is a highly optimized Linux daemon providing real-time performance
monitoring for Linux systems, applications and SNMP devices over the web.
+
+ If you want to use Python plugins install python3, python3-yaml and
+ python3-urllib3 however urllib3 isn't packaged yet (needs a PR on GitHub)
endef
TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS))
TARGET_CFLAGS += -ffunction-sections -fdata-sections -O3
TARGET_LDFLAGS += -Wl,--gc-sections
-CONFIGURE_ARGS += --with-zlib --with-math --disable-x86-sse --disable-lto
+CONFIGURE_ARGS += \
+ --with-zlib \
+ --with-math \
+ --disable-x86-sse \
+ --enable-lto \
+ --without-libcap \
+ --disable-plugin-nfacct
define Package/netdata/conffiles
/etc/netdata/
endef
define Package/netdata/install
- mkdir -p $(1)/etc/netdata
+ $(INSTALL_DIR) $(1)/etc/netdata/custom-plugins.d
$(CP) $(PKG_INSTALL_DIR)/etc/netdata $(1)/etc
$(CP) ./files/netdata.conf $(1)/etc/netdata
- mkdir -p $(1)/usr/share/netdata
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/netdata $(1)/usr/lib
+ $(CP) $(1)/usr/lib/netdata/conf.d/fping.conf $(1)/etc
+ $(CP) $(1)/usr/lib/netdata/conf.d/health_alarm_notify.conf $(1)/etc
+ rm -rf $(1)/usr/lib/netdata/python.d/python_modules/pyyaml2
+ rm -rf $(1)/usr/lib/netdata/python.d/python_modules/pyyaml3
+ rm -rf $(1)/usr/lib/netdata/python.d/python_modules/urllib3
+ $(CP) $(1)/usr/lib/netdata/plugins.d/tc-qos-helper.sh $(1)/etc
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/netdata $(1)/usr/sbin
+ $(INSTALL_DIR) $(1)/usr/share/netdata
$(CP) $(PKG_INSTALL_DIR)/usr/share/netdata $(1)/usr/share
rm -rf $(1)/usr/share/netdata/web/images
rm -rf $(1)/usr/share/netdata/web/old
rm $(1)/usr/share/netdata/web/fonts/*.svg
rm $(1)/usr/share/netdata/web/fonts/*.ttf
rm $(1)/usr/share/netdata/web/fonts/*.woff
- mkdir -p $(1)/usr/lib/netdata
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/netdata $(1)/usr/lib
- rm $(1)/usr/lib/netdata/python.d/python-modules-installer.sh
- chmod 4755 $(1)/usr/lib/netdata/plugins.d/apps.plugin
- mkdir -p $(1)/etc/init.d
+ $(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/netdata.init $(1)/etc/init.d/netdata
- mkdir -p $(1)/usr/sbin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/netdata $(1)/usr/sbin
endef
$(eval $(call BuildPackage,netdata))
--- /dev/null
+diff --git a/collectors/charts.d.plugin/charts.d.conf b/collectors/charts.d.plugin/charts.d.conf
+index acb2a6f..8111859 100644
+--- a/collectors/charts.d.plugin/charts.d.conf
++++ b/collectors/charts.d.plugin/charts.d.conf
+@@ -30,7 +30,7 @@
+
+ # the default enable/disable for all charts.d collectors
+ # the default is "yes"
+-# enable_all_charts="yes"
++enable_all_charts="no"
+
+ # BY DEFAULT ENABLED MODULES
+ # ap=yes
+diff --git a/collectors/python.d.plugin/python.d.conf b/collectors/python.d.plugin/python.d.conf
+index 97f4cb8..001a3f1 100644
+--- a/collectors/python.d.plugin/python.d.conf
++++ b/collectors/python.d.plugin/python.d.conf
+@@ -7,7 +7,7 @@
+ #
+
+ # Enable / disable the whole python.d.plugin (all its modules)
+-enabled: yes
++enabled: no
+
+ # ----------------------------------------------------------------------
+ # Enable / Disable python.d.plugin modules
+++ /dev/null
---- a/conf.d/charts.d.conf
-+++ b/conf.d/charts.d.conf
-@@ -30,7 +30,7 @@
-
- # the default enable/disable for all charts.d collectors
- # the default is "yes"
--# enable_all_charts="yes"
-+enable_all_charts="no"
-
- # BY DEFAULT ENABLED MODULES
- # ap=yes
---- a/conf.d/python.d.conf
-+++ b/conf.d/python.d.conf
-@@ -7,7 +7,7 @@
- #
-
- # Enable / disable the whole python.d.plugin (all its modules)
--enabled: yes
-+enabled: no
-
- # Prevent log flood
- # Define how many log messages can be written to log file in one log_interval
--- /dev/null
+diff --git a/collectors/python.d.plugin/python.d.plugin.in b/collectors/python.d.plugin/python.d.plugin.in
+index 7ac03fd..d0a3f19 100755
+--- a/collectors/python.d.plugin/python.d.plugin.in
++++ b/collectors/python.d.plugin/python.d.plugin.in
+@@ -1,6 +1,4 @@
+-#!/usr/bin/env bash
+-'''':; exec "$(command -v python || command -v python3 || command -v python2 ||
+-echo "ERROR python IS NOT AVAILABLE IN THIS SYSTEM")" "$0" "$@" # '''
++#!/usr/bin/python3
+
+ # -*- coding: utf-8 -*-
+ # Description:
include $(TOPDIR)/rules.mk
PKG_NAME:=sudo
-PKG_VERSION:=1.8.21p2
+PKG_VERSION:=1.8.25p1
PKG_RELEASE:=1
-PKG_LICENSE:=ISC
-PKG_LICENSE_FILES:=doc/LICENSE
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.sudo.ws/dist
-PKG_HASH:=74c5746cd33a814e2431c39faf0d76f7f8a697379bd073862e3b156cf0d76368
+PKG_SOURCE_URL:=https://www.sudo.ws/dist
+PKG_HASH:=9dc99c7a7d37a0ab938410995c133e15d6afb970c2c66f9264fe36d20c89195b
+
+PKG_LICENSE:=ISC
+PKG_LICENSE_FILES:=doc/LICENSE
+PKG_CPE_ID:=cpe:/a:todd_miller:sudo
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_BUILD_DEPENDS:=sudo/host
SECTION:=admin
CATEGORY:=Administration
TITLE:=Delegate authority to run commands
- URL:=http://www.sudo.ws/
+ URL:=https://www.sudo.ws/
MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
endef
-diff -rupN sudo-1.8.11p2.orig/lib/util/Makefile.in sudo-1.8.11p2/lib/util/Makefile.in
---- sudo-1.8.11p2.orig/lib/util/Makefile.in 2014-10-07 22:26:20.000000000 +0200
-+++ sudo-1.8.11p2/lib/util/Makefile.in 2014-12-09 21:44:35.610041162 +0100
-@@ -142,10 +142,10 @@ libsudo_util.la: $(LTOBJS) @LT_LDDEP@
+--- a/lib/util/Makefile.in
++++ b/lib/util/Makefile.in
+@@ -161,10 +161,10 @@ libsudo_util.la: $(LTOBJS) @LT_LDDEP@
esac
siglist.c: mksiglist
+ mksigname > $@
mksiglist: $(srcdir)/mksiglist.c $(srcdir)/mksiglist.h $(incdir)/sudo_compat.h $(top_builddir)/config.h
- $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/mksiglist.c -o $@
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(srcdir)/mksiglist.c -o $@
-diff -rupN sudo-1.8.11p2.orig/Makefile.in sudo-1.8.11p2/Makefile.in
---- sudo-1.8.11p2.orig/Makefile.in 2014-10-07 22:26:20.000000000 +0200
-+++ sudo-1.8.11p2/Makefile.in 2014-12-09 22:00:27.256934143 +0100
-@@ -62,7 +62,7 @@ SHELL = @SHELL@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -63,7 +63,7 @@ SHELL = @SHELL@
SED = @SED@
INSTALL = $(SHELL) $(top_srcdir)/install-sh -c
+++ /dev/null
-diff -rupN sudo-1.8.14p3.orig/include/sudo_util.h sudo-1.8.14p3/include/sudo_util.h
---- sudo-1.8.14p3.orig/include/sudo_util.h 2015-07-22 14:22:49.000000000 +0200
-+++ sudo-1.8.14p3/include/sudo_util.h 2015-08-30 18:41:24.509814946 +0200
-@@ -23,6 +23,8 @@
- # include "compat/stdbool.h"
- #endif /* HAVE_STDBOOL_H */
-
-+#include <sys/types.h>
-+
- /*
- * Macros for operating on struct timeval.
- */
include $(TOPDIR)/rules.mk
PKG_NAME:=syslog-ng
-PKG_VERSION:=3.16.1
-PKG_RELEASE:=1
+PKG_VERSION:=3.17.2
+PKG_RELEASE:=2
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/balabit/syslog-ng/releases/download/$(PKG_NAME)-$(PKG_VERSION)/
-PKG_HASH:=c7ee6f1d5e98d86f191964e580111bfa71081ecbb3275cea035bbba177b73a29
+PKG_HASH:=73601f7ca13c6b534318d5b0648ec1833aa9ca0516d6c3f90085b090d548c50b
PKG_INSTALL:=1
$(call libtool_remove_files,$(1))
endef
+define Package/syslog-ng/prerm
+ #!/bin/sh
+ # check if we are on real system
+ if [ -z "$${IPKG_INSTROOT}" ]; then
+ # wish we had pidof unconditionally
+ pid=$(ps | grep syslog | grep -v grep | awk '{ print $$1; }')
+ [ -n "$$pid" ] && /etc/init.d/syslog-ng stop
+ [ "$${PKG_UPGRADE}" != "1" ] && {
+ echo "Removing rc.d symlink for syslog-ng"
+ /etc/init.d/syslog-ng disable
+ }
+ fi
+ exit 0
+endef
+
$(eval $(call BuildPackage,syslog-ng))
-@version:3.9
+@version: 3.17
options {
chain_hostnames(no);
--- /dev/null
+diff --git a/configure.ac b/configure.ac
+index 94f950c76..e3bda0599 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -783,6 +783,7 @@ AC_CHECK_FUNCS(strdup \
+ strcasestr \
+ memrchr \
+ localtime_r \
++ getprotobynumber_r \
+ gmtime_r \
+ strnlen \
+ strtok_r)
+diff --git a/lib/compat/CMakeLists.txt b/lib/compat/CMakeLists.txt
+index 4fa05d7e0..95fcb0e0d 100644
+--- a/lib/compat/CMakeLists.txt
++++ b/lib/compat/CMakeLists.txt
+@@ -10,7 +10,8 @@ set(COMPAT_HEADERS
+ compat/openssl_support.h
+ compat/pcre.h
+ compat/getent.h
+- compat/getent-bb.h
++ compat/getent-sun.h
++ compat/getent-generic.h
+ PARENT_SCOPE)
+
+ set(COMPAT_SOURCES
+@@ -24,7 +25,8 @@ set(COMPAT_SOURCES
+ compat/strnlen.c
+ compat/time.c
+ compat/openssl_support.c
+- compat/getent.c
++ compat/getent-sun.c
++ compat/getent-generic.c
+ PARENT_SCOPE)
+
+ add_test_subdirectory(tests)
+diff --git a/lib/compat/Makefile.am b/lib/compat/Makefile.am
+index e5c1f4e56..8d5010558 100644
+--- a/lib/compat/Makefile.am
++++ b/lib/compat/Makefile.am
+@@ -13,9 +13,10 @@ compatinclude_HEADERS = \
+ lib/compat/string.h \
+ lib/compat/time.h \
+ lib/compat/openssl_support.h \
+- lib/compat/pcre.h \
+- lib/compat/getent.h \
+- lib/compat/getent-bb.h
++ lib/compat/pcre.h \
++ lib/compat/getent.h \
++ lib/compat/getent-sun.h \
++ lib/compat/getent-generic.h
+
+ compat_sources = \
+ lib/compat/getutent.c \
+@@ -28,6 +29,7 @@ compat_sources = \
+ lib/compat/strnlen.c \
+ lib/compat/time.c \
+ lib/compat/openssl_support.c \
+- lib/compat/getent.c
++ lib/compat/getent-sun.c \
++ lib/compat/getent-generic.c
+
+ include lib/compat/tests/Makefile.am
+diff --git a/lib/compat/getent-generic.c b/lib/compat/getent-generic.c
+new file mode 100644
+index 000000000..f75d1cc0a
+--- /dev/null
++++ b/lib/compat/getent-generic.c
+@@ -0,0 +1,150 @@
++/*
++ * Copyright (c) 2017 Balabit
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
++ *
++ * As an additional exemption you are allowed to compile & link against the
++ * OpenSSL libraries as published by the OpenSSL project. See the file
++ * COPYING for details.
++ *
++ */
++
++#include "compat/getent-generic.h"
++
++#ifndef SYSLOG_NG_HAVE_GETPROTOBYNUMBER_R
++
++#include <glib.h>
++#include <errno.h>
++
++G_LOCK_DEFINE_STATIC(getproto);
++
++/* this code does not support proto aliases, as we wouldn't be using
++ * them anyway. Should we ever want to support it, we would need to
++ * suballocate @buf and store all of the aliases in the same character
++ * array.
++ */
++static void
++_extract_protoent_fields(struct protoent *dst, struct protoent *src, char *buf, size_t buflen)
++{
++ g_strlcpy(buf, src->p_name, buflen);
++ dst->p_name = buf;
++ dst->p_aliases = NULL;
++ dst->p_proto = src->p_proto;
++}
++
++int
++_compat_generic__getprotobynumber_r(int proto,
++ struct protoent *result_buf, char *buf,
++ size_t buflen, struct protoent **result)
++{
++ struct protoent *pe;
++
++ G_LOCK(getproto);
++ pe = getprotobynumber(proto);
++
++ if (pe)
++ {
++ _extract_protoent_fields(result_buf, pe, buf, buflen);
++ *result = result_buf;
++ errno = 0;
++ }
++
++ G_UNLOCK(getproto);
++ return errno;
++}
++
++int
++_compat_generic__getprotobyname_r(const char *name,
++ struct protoent *result_buf, char *buf,
++ size_t buflen, struct protoent **result)
++{
++ struct protoent *pe;
++
++ G_LOCK(getproto);
++ pe = getprotobyname(name);
++
++ if (pe)
++ {
++ _extract_protoent_fields(result_buf, pe, buf, buflen);
++ *result = result_buf;
++ errno = 0;
++ }
++
++ G_UNLOCK(getproto);
++ return errno;
++}
++
++G_LOCK_DEFINE_STATIC(getserv);
++
++/* this code does not support service aliases or using the s_proto field, as
++ * we wouldn't be using them anyway. Should we ever want to support it, we
++ * would need to suballocate @buf and store all of the aliases in the same
++ * character array.
++ */
++static void
++_extract_servent_fields(struct servent *dst, struct servent *src, char *buf, size_t buflen)
++{
++ g_strlcpy(buf, src->s_name, buflen);
++ dst->s_name = buf;
++ dst->s_aliases = NULL;
++ dst->s_port = src->s_port;
++ /* we don't support s_proto */
++ dst->s_proto = NULL;
++}
++
++
++int
++_compat_generic__getservbyport_r(int port, const char *proto,
++ struct servent *result_buf, char *buf,
++ size_t buflen, struct servent **result)
++{
++ struct servent *se;
++
++ G_LOCK(getserv);
++ se = getservbyport(port, proto);
++
++ if (se)
++ {
++ _extract_servent_fields(result_buf, se, buf, buflen);
++ *result = result_buf;
++ errno = 0;
++ }
++
++ G_UNLOCK(getserv);
++ return errno;
++}
++
++int
++_compat_generic__getservbyname_r(const char *name, const char *proto,
++ struct servent *result_buf, char *buf,
++ size_t buflen, struct servent **result)
++{
++ struct servent *se;
++
++ G_LOCK(getserv);
++ se = getservbyname(name, proto);
++
++ if (se)
++ {
++ _extract_servent_fields(result_buf, se, buf, buflen);
++ *result = result_buf;
++ errno = 0;
++ }
++
++ G_UNLOCK(getserv);
++ return errno;
++}
++
++#endif
+diff --git a/lib/compat/getent-generic.h b/lib/compat/getent-generic.h
+new file mode 100644
+index 000000000..cc95a2646
+--- /dev/null
++++ b/lib/compat/getent-generic.h
+@@ -0,0 +1,54 @@
++/*
++ * Copyright (c) 2017 Balabit
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
++ *
++ * As an additional exemption you are allowed to compile & link against the
++ * OpenSSL libraries as published by the OpenSSL project. See the file
++ * COPYING for details.
++ *
++ */
++
++#ifndef COMPAT_GETENT_GENERIC_H_INCLUDED
++#define COMPAT_GETENT_GENERIC_H_INCLUDED
++
++#include "compat/compat.h"
++
++#ifndef SYSLOG_NG_HAVE_GETPROTOBYNUMBER_R
++
++#include <sys/types.h>
++#include <grp.h>
++#include <pwd.h>
++#include <netdb.h>
++
++int _compat_generic__getprotobynumber_r(int proto,
++ struct protoent *result_buf, char *buf,
++ size_t buflen, struct protoent **result);
++
++int _compat_generic__getprotobyname_r(const char *name,
++ struct protoent *result_buf, char *buf,
++ size_t buflen, struct protoent **result);
++
++int _compat_generic__getservbyport_r(int port, const char *proto,
++ struct servent *result_buf, char *buf,
++ size_t buflen, struct servent **result);
++
++int _compat_generic__getservbyname_r(const char *name, const char *proto,
++ struct servent *result_buf, char *buf,
++ size_t buflen, struct servent **result);
++
++#endif
++
++#endif
+diff --git a/lib/compat/getent.c b/lib/compat/getent-sun.c
+similarity index 63%
+rename from lib/compat/getent.c
+rename to lib/compat/getent-sun.c
+index bb9b5b431..dce676f2f 100644
+--- a/lib/compat/getent.c
++++ b/lib/compat/getent-sun.c
+@@ -21,40 +21,45 @@
+ *
+ */
+
+-#if defined(sun) || defined(__sun)
++#include "compat/getent-sun.h"
+
+-#include "compat/getent-bb.h"
++#if defined(sun) || defined(__sun)
+ #include <errno.h>
+
+-int bb__getprotobynumber_r(int proto,
+- struct protoent *result_buf, char *buf,
+- size_t buflen, struct protoent **result)
++int
++_compat_sun__getprotobynumber_r(int proto,
++ struct protoent *result_buf, char *buf,
++ size_t buflen, struct protoent **result)
+ {
+ *result = getprotobynumber_r(proto, result_buf, buf, buflen);
+ return (*result ? NULL : errno);
+ }
+
+-int bb__getprotobyname_r(const char *name,
+- struct protoent *result_buf, char *buf,
+- size_t buflen, struct protoent **result)
++int
++_compat_sun__getprotobyname_r(const char *name,
++ struct protoent *result_buf, char *buf,
++ size_t buflen, struct protoent **result)
+ {
+ *result = getprotobyname_r(name, result_buf, buf, buflen);
+ return (*result ? NULL : errno);
+ }
+
+-int bb__getservbyport_r(int port, const char *proto,
+- struct servent *result_buf, char *buf,
+- size_t buflen, struct servent **result)
++int
++_compat_sun__getservbyport_r(int port, const char *proto,
++ struct servent *result_buf, char *buf,
++ size_t buflen, struct servent **result)
+ {
+ *result = getservbyport_r(port, proto, result_buf, buf, buflen);
+ return (*result ? NULL : errno);
+ }
+
+-int bb__getservbyname_r(const char *name, const char *proto,
+- struct servent *result_buf, char *buf,
+- size_t buflen, struct servent **result)
++int
++_compat_sun__getservbyname_r(const char *name, const char *proto,
++ struct servent *result_buf, char *buf,
++ size_t buflen, struct servent **result)
+ {
+ *result = getservbyname_r(name, proto, result_buf, buf, buflen);
+ return (*result ? NULL : errno);
+ }
++
+ #endif
+diff --git a/lib/compat/getent-bb.h b/lib/compat/getent-sun.h
+similarity index 53%
+rename from lib/compat/getent-bb.h
+rename to lib/compat/getent-sun.h
+index 15aa2f5e5..fc1eccd2c 100644
+--- a/lib/compat/getent-bb.h
++++ b/lib/compat/getent-sun.h
+@@ -21,8 +21,10 @@
+ *
+ */
+
+-#ifndef GETENT_BB_H_INCLUDED
+-#define GETENT_BB_H_INCLUDED
++#ifndef COMPAT_GETENT_SUN_H_INCLUDED
++#define COMPAT_GETENT_SUN_H_INCLUDED
++
++#include "compat/compat.h"
+
+ #if defined(sun) || defined(__sun)
+
+@@ -31,21 +33,21 @@
+ #include <pwd.h>
+ #include <netdb.h>
+
+-int bb__getprotobynumber_r(int proto,
+- struct protoent *result_buf, char *buf,
+- size_t buflen, struct protoent **result);
++int _compat_sun__getprotobynumber_r(int proto,
++ struct protoent *result_buf, char *buf,
++ size_t buflen, struct protoent **result);
+
+-int bb__getprotobyname_r(const char *name,
+- struct protoent *result_buf, char *buf,
+- size_t buflen, struct protoent **result);
++int _compat_sun__getprotobyname_r(const char *name,
++ struct protoent *result_buf, char *buf,
++ size_t buflen, struct protoent **result);
+
+-int bb__getservbyport_r(int port, const char *proto,
+- struct servent *result_buf, char *buf,
+- size_t buflen, struct servent **result);
++int _compat_sun__getservbyport_r(int port, const char *proto,
++ struct servent *result_buf, char *buf,
++ size_t buflen, struct servent **result);
+
+-int bb__getservbyname_r(const char *name, const char *proto,
+- struct servent *result_buf, char *buf,
+- size_t buflen, struct servent **result);
++int _compat_sun__getservbyname_r(const char *name, const char *proto,
++ struct servent *result_buf, char *buf,
++ size_t buflen, struct servent **result);
+
+ #endif
+
+diff --git a/lib/compat/getent.h b/lib/compat/getent.h
+index 09a9f73d6..01c3deb6d 100644
+--- a/lib/compat/getent.h
++++ b/lib/compat/getent.h
+@@ -21,22 +21,28 @@
+ *
+ */
+
+-#ifndef GETENT_COMPAT_H_INCLUDED
+-#define GETENT_COMPAT_H_INCLUDED
++#ifndef COMPAT_GETENT_H_INCLUDED
++#define COMPAT_GETENT_H_INCLUDED
+
+-#include <sys/types.h>
+-#include <grp.h>
+-#include <pwd.h>
+-#include <netdb.h>
++#include "compat/compat.h"
+
+-#if defined(sun) || defined(__sun)
++#ifndef SYSLOG_NG_HAVE_GETPROTOBYNUMBER_R
+
+-#define getprotobynumber_r bb__getprotobynumber_r
+-#define getprotobyname_r bb__getprotobyname_r
+-#define getservbyport_r bb__getservbyport_r
+-#define getservbyname_r bb__getservbyname_r
++#define getprotobynumber_r _compat_generic__getprotobynumber_r
++#define getprotobyname_r _compat_generic__getprotobyname_r
++#define getservbyport_r _compat_generic__getservbyport_r
++#define getservbyname_r _compat_generic__getservbyname_r
+
+-#include "getent-bb.h"
++#include "getent-generic.h"
+
+-#endif // Solaris
++#elif defined(sun) || defined(__sun)
++
++#define getprotobynumber_r _compat_sun__getprotobynumber_r
++#define getprotobyname_r _compat_sun__getprotobyname_r
++#define getservbyport_r _compat_sun__getservbyport_r
++#define getservbyname_r _compat_sun__getservbyname_r
++
++#include "getent-sun.h"
++
++#endif
+ #endif
+++ /dev/null
-diff -u --recursive syslog-ng-3.16.1-vanilla/configure.ac syslog-ng-3.16.1/configure.ac
---- syslog-ng-3.16.1-vanilla/configure.ac 2018-06-01 06:02:07.000000000 -0400
-+++ syslog-ng-3.16.1/configure.ac 2018-07-15 19:31:30.307354198 -0400
-@@ -793,6 +793,14 @@
- AC_CHECK_FUNCS([inotify_init])
-
- dnl ***************************************************************************
-+dnl secret-storage headers/libraries
-+dnl ***************************************************************************
-+
-+SECRET_STORAGE_LIBS="\$(top_builddir)/lib/secret-storage/libsecret-storage.la"
-+SECRET_STORAGE_NO_LIBTOOL_LIBS="\$(top_builddir)/lib/eventlog/src/.libs/libsecret-storage.so"
-+SECRET_STORAGE_CFLAGS="-I\$(top_srcdir)/lib/secret-storage"
-+
-+dnl ***************************************************************************
- dnl libevtlog headers/libraries (remove after relicensing libevtlog)
- dnl ***************************************************************************
-
-@@ -1592,7 +1600,7 @@
- java_module_path="$moduledir"/java-modules
- fi
-
--CPPFLAGS="$CPPFLAGS $GLIB_CFLAGS $EVTLOG_CFLAGS $PCRE_CFLAGS $OPENSSL_CFLAGS $LIBNET_CFLAGS $LIBDBI_CFLAGS $IVYKIS_CFLAGS -D_GNU_SOURCE -D_DEFAULT_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
-+CPPFLAGS="$CPPFLAGS $GLIB_CFLAGS $EVTLOG_CFLAGS $SECRET_STORAGE_CFLAGS $PCRE_CFLAGS $OPENSSL_CFLAGS $LIBNET_CFLAGS $LIBDBI_CFLAGS $IVYKIS_CFLAGS -D_GNU_SOURCE -D_DEFAULT_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
-
- ########################################################
- ## NOTES: on how syslog-ng is linked
-@@ -1640,7 +1648,7 @@
- MODULE_DEPS_LIBS="\$(top_builddir)/lib/libsyslog-ng.la"
-
- if test "x$linking_mode" = "xdynamic"; then
-- SYSLOGNG_DEPS_LIBS="$LIBS $BASE_LIBS $GLIB_LIBS $EVTLOG_LIBS $RESOLV_LIBS $LIBCAP_LIBS $PCRE_LIBS $REGEX_LIBS $DL_LIBS"
-+ SYSLOGNG_DEPS_LIBS="$LIBS $BASE_LIBS $GLIB_LIBS $EVTLOG_LIBS $SECRET_STORAGE_LIBS $RESOLV_LIBS $LIBCAP_LIBS $PCRE_LIBS $REGEX_LIBS $DL_LIBS"
-
- if test "x$with_ivykis" = "xinternal"; then
- # when using the internal ivykis, we're linking it statically into libsyslog-ng.so
-@@ -1659,8 +1667,8 @@
- # syslog-ng binary is linked with the default link command (e.g. libtool)
- SYSLOGNG_LINK='$(LINK)'
- else
-- SYSLOGNG_DEPS_LIBS="$LIBS $BASE_LIBS $RESOLV_LIBS $EVTLOG_NO_LIBTOOL_LIBS $LD_START_STATIC -Wl,${WHOLE_ARCHIVE_OPT} $GLIB_LIBS $PCRE_LIBS $REGEX_LIBS -Wl,${NO_WHOLE_ARCHIVE_OPT} $IVYKIS_NO_LIBTOOL_LIBS $LD_END_STATIC $LIBCAP_LIBS $DL_LIBS"
-- TOOL_DEPS_LIBS="$LIBS $BASE_LIBS $GLIB_LIBS $EVTLOG_LIBS $RESOLV_LIBS $LIBCAP_LIBS $PCRE_LIBS $REGEX_LIBS $IVYKIS_LIBS $DL_LIBS"
-+ SYSLOGNG_DEPS_LIBS="$LIBS $BASE_LIBS $RESOLV_LIBS $EVTLOG_NO_LIBTOOL_LIBS $SECRET_STORAGE_NO_LIBTOOL_LIBS $LD_START_STATIC -Wl,${WHOLE_ARCHIVE_OPT} $GLIB_LIBS $PCRE_LIBS $REGEX_LIBS -Wl,${NO_WHOLE_ARCHIVE_OPT} $IVYKIS_NO_LIBTOOL_LIBS $LD_END_STATIC $LIBCAP_LIBS $DL_LIBS"
-+ TOOL_DEPS_LIBS="$LIBS $BASE_LIBS $GLIB_LIBS $EVTLOG_LIBS $SECRET_STORAGE_LIBS $RESOLV_LIBS $LIBCAP_LIBS $PCRE_LIBS $REGEX_LIBS $IVYKIS_LIBS $DL_LIBS"
- CORE_DEPS_LIBS=""
-
- # bypass libtool in case we want to do mixed linking because it
-Only in syslog-ng-3.16.1-vanilla/: syslog-ng-3.16.1
include $(TOPDIR)/rules.mk
PKG_NAME:=zabbix
-PKG_VERSION:=3.4.10
-PKG_RELEASE:=1
+PKG_VERSION:=3.4.14
+PKG_RELEASE:=6
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=cdee0fd44e11ae214b2cc252974da22f3627c326ea2c61a0315af95165c52d1b
+PKG_HASH:=7443873cc970672d3c884230d3aeb082f2d8afcc2b757506c2d684ffdd12d77e
PKG_SOURCE_URL:=@SF/zabbix
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:zabbix:zabbix
PKG_INSTALL:=1
PKG_FIXUP:=autoreconf
+PKG_CONFIG_DEPENDS:= \
+ CONFIG_ZABBIX_GNUTLS \
+ CONFIG_ZABBIX_OPENSSL \
+ CONFIG_ZABBIX_MYSQL \
+ CONFIG_ZABBIX_POSTGRESQL
+
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
+define Package/zabbix-agentd/config
+comment "SSL support"
+
+choice
+ prompt "Selected SSL library"
+ default ZABBIX_NOSSL
+
+ config ZABBIX_OPENSSL
+ bool "OpenSSL"
+
+ config ZABBIX_GNUTLS
+ bool "GnuTLS"
+
+ config ZABBIX_NOSSL
+ bool "No SSL support"
+
+endchoice
+endef
+
+define Package/zabbix-server/config
+comment "Database Software"
+
+choice
+ prompt "Selected Database Software"
+ default ZABBIX_POSTGRESQL
+
+ config ZABBIX_MYSQL
+ bool "MySQL/MariaDB"
+
+ config ZABBIX_POSTGRESQL
+ bool "PostgreSQL"
+
+endchoice
+endef
+
define Package/zabbix/Default
SECTION:=admin
CATEGORY:=Administration
TITLE:=Zabbix
- URL:=http://www.zabbix.com/
+ URL:=https://www.zabbix.com/
SUBMENU:=zabbix
MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
USERID:=zabbix=53:zabbix=53
- DEPENDS += $(ICONV_DEPENDS) +libpcre
+ DEPENDS += $(ICONV_DEPENDS) +libpcre +ZABBIX_GNUTLS:libgnutls +ZABBIX_OPENSSL:libopenssl
endef
define Package/zabbix-agentd
define Package/zabbix-extra-network
$(call Package/zabbix/Default)
TITLE+= discovery/userparameters for network
- DEPENDS = +zabbix-agentd +libuci-lua +lua
+ DEPENDS = +zabbix-agentd +libubus-lua +lua
endef
define Package/zabbix-extra-wifi
$(call Package/zabbix/Default)
TITLE+= discovery/userparameters for wifi
- DEPENDS = +zabbix-agentd +libiwinfo-lua +libuci-lua +lua
+ DEPENDS = +zabbix-agentd +libiwinfo-lua +libubus-lua +lua
endef
define Package/zabbix-sender
define Package/zabbix-server
$(call Package/zabbix/Default)
TITLE+= server
- DEPENDS += +pgsql-cli +libevent2
+ DEPENDS += +ZABBIX_POSTGRESQL:libpq +ZABBIX_MYSQL:libmariadbclient +libevent2
+endef
+
+define Package/zabbix-server-frontend
+ $(call Package/zabbix/Default)
+ TITLE+= server-frontend
+ DEPENDS += +php7 +php7-cgi +ZABBIX_POSTGRESQL:php7-mod-pgsql +ZABBIX_MYSQL:php7-mod-mysqli \
+ +php7-mod-gd +php7-mod-bcmath +php7-mod-ctype +php7-mod-xmlreader +php7-mod-xmlwriter \
+ +php7-mod-session +php7-mod-sockets +php7-mod-mbstring +php7-mod-gettext
endef
define Package/zabbix-proxy
$(call Package/zabbix/Default)
TITLE+= proxy
- DEPENDS += +pgsql-cli
+ DEPENDS += +ZABBIX_POSTGRESQL:libpq +ZABBIX_MYSQL:libmariadbclient
endef
define Package/zabbix-extra-mac80211/description
--enable-proxy \
$(call autoconf_bool,CONFIG_IPV6,ipv6) \
--disable-java \
- --with-postgresql \
+ $(if $(CONFIG_ZABBIX_MYSQL),--with-mysql) \
+ $(if $(CONFIG_ZABBIX_POSTGRESQL),--with-postgresql) \
--with-libevent=$(STAGING_DIR)/usr/include/libevent \
- --with-libpcre=$(STAGING_DIR)/usr/include
+ --with-libpcre=$(STAGING_DIR)/usr/include \
+ $(if $(CONFIG_ZABBIX_GNUTLS),--with-gnutls="$(STAGING_DIR)/usr") \
+ $(if $(CONFIG_ZABBIX_OPENSSL),--with-openssl="$(STAGING_DIR)/usr")
MAKE_FLAGS += ARCH="linux"
define Package/zabbix-extra-network/install
$(call Package/zabbix/install/zabbix.conf.d,$(1),network)
+ $(INSTALL_DIR) $(1)/usr/share/acl.d
+ $(INSTALL_DATA) ./files/zabbix-network-ubus-acl.json $(1)/usr/share/acl.d/zabbix-network.json
+endef
+
+define Package/zabbix-extra-network/postinst
+#!/bin/sh
+if [ -z "$${IPKG_INSTROOT}" ]; then
+ killall -HUP ubusd
+fi
endef
define Package/zabbix-extra-wifi/install
$(call Package/zabbix/install/zabbix.conf.d,$(1),wifi)
+ $(INSTALL_DIR) $(1)/usr/share/acl.d
+ $(INSTALL_DATA) ./files/zabbix-wifi-ubus-acl.json $(1)/usr/share/acl.d/zabbix-wifi.json
+endef
+
+define Package/zabbix-extra-wifi/postinst
+#!/bin/sh
+if [ -z "$${IPKG_INSTROOT}" ]; then
+ killall -HUP ubusd
+fi
endef
define Package/zabbix-sender/install
$(call Package/zabbix/install/etc,$(1),server)
endef
+define Package/zabbix-server-frontend/install
+ $(INSTALL_DIR) $(1)/www/zabbix
+ $(CP) $(PKG_BUILD_DIR)/frontends/php/* $(1)/www/zabbix
+endef
+
define Package/zabbix-proxy/install
$(call Package/zabbix/install/sbin,$(1),proxy)
$(call Package/zabbix/install/etc,$(1),proxy)
$(eval $(call BuildPackage,zabbix-extra-wifi))
$(eval $(call BuildPackage,zabbix-sender))
$(eval $(call BuildPackage,zabbix-server))
+$(eval $(call BuildPackage,zabbix-server-frontend))
$(eval $(call BuildPackage,zabbix-proxy))
$(eval $(call BuildPackage,zabbix-get))
# network interface discovery
# example: {"data":[{"{#IF}":"lo", "{#NET}":"loopback"},{"{#IF}":"br-lan", "{#NET}":"lan"},{"{#IF}":"eth0.1", "{#NET}":"wan"}]}
#
-UserParameter=netowrt.discovery,lua -l uci -e 'x = uci.cursor(nil, "/var/state");list = "{\"data\":[";x:foreach("network", "interface", function(s) list=list.."{\"{#IF}\":\""..s.ifname.."\", \"{#NET}\":\""..s[".name"].."\"}," end); list=string.gsub(list,",$",""); print(list.."]}")'
-
-
-
+UserParameter=netowrt.discovery,lua -l ubus -e 'u=ubus.connect();list="{\"data\":[";dump=u:call("network.interface", "dump", {});for _, intf in ipairs(dump.interface) do list=list.."{\"{#IF}\":\""..intf.device.."\", \"{#NET}\":\""..intf.interface.."\"},";end;list=string.gsub(list,",$","");print(list.."]}")'
# wifi interface discovery
# example: {"data":[{"{#IF}":"wlan0", "{#MODE}":"ap", "{#SSID}":"Openwrt", "{#NET}":"lan", "{#DEV}":"radio0", "{#ENC}":"psk2+ccmp", "{#TYPE}":"mac80211", "{#HWMODE}":"11ng", "{#CHANNEL}":"11", "{#BSSID}":"xx:xx:xx:xx:xx:xx"}]}
-# ubus call only work as root so you need to run zabbix as root to use wifi.ifdiscovery
UserParameter=wifi.ifdiscovery, lua -l ubus -l iwinfo -e 'u=ubus.connect();list="{\"data\":[";stat=u:call("network.wireless", "status", {});for dev, dev_table in pairs(stat) do for i, iface in pairs(dev_table["interfaces"]) do c=iface["config"];i=iface["ifname"];t=iwinfo.type(i);iw=iwinfo[t];e = iw.encryption(i);e = e and e.description or "None";n = table.concat(c["network"]," ");list=list.."{\"{#IF}\":\""..i.."\", \"{#MODE}\":\""..iw.mode(i).."\", \"{#SSID}\":\""..c["ssid"].."\", \"{#NET}\":\""..n.."\", \"{#DEV}\":\""..dev.."\", \"{#ENC}\":\""..e.."\", \"{#TYPE}\":\""..t.."\", \"{#HWMODE}\":\"".."?".."\", \"{#CHANNEL}\":\""..iw.channel(i).."\", \"{#BSSID}\":\""..iw.bssid(i).."\"},";end;end;list=string.gsub(list,",$","");print(list.."]}")'
--- /dev/null
+{
+ "user": "zabbix",
+ "access": {
+ "network.interface": {
+ "methods": [ "dump" ]
+ }
+ }
+}
--- /dev/null
+{
+ "user": "zabbix",
+ "access": {
+ "network.wireless": {
+ "methods": [ "status" ]
+ }
+ }
+}
### Option: LogFileSize
# Maximum size of log file in MB.
# 0 - disable automatic log rotation.
-@@ -114,6 +111,7 @@ Server=127.0.0.1
+@@ -116,6 +113,7 @@ Server=127.0.0.1
# Range: 0-100
# Default:
# StartAgents=3
##### Active checks related
-@@ -129,8 +127,6 @@ Server=127.0.0.1
+@@ -131,8 +129,6 @@ Server=127.0.0.1
# Default:
# ServerActive=
### Option: Hostname
# Unique, case sensitive hostname.
# Required for active checks and must match hostname as configured on the server.
-@@ -140,8 +136,6 @@ ServerActive=127.0.0.1
+@@ -142,8 +138,6 @@ ServerActive=127.0.0.1
# Default:
# Hostname=
### Option: HostnameItem
# Item used for generating Hostname if it is undefined. Ignored if Hostname is defined.
# Does not support UserParameters or aliases.
-@@ -259,8 +253,8 @@ Hostname=Zabbix server
+@@ -261,8 +255,8 @@ Hostname=Zabbix server
# Include=
# Include=/usr/local/etc/zabbix_agentd.userparams.conf
sys/socket.h sys/loadavg.h arpa/inet.h \
sys/vmmeter.h strings.h vm/vm_param.h \
sys/time.h kstat.h sys/syscall.h sys/sysmacros.h \
-
-Index: zabbix-3.2.7/src/libs/zbxcommon/str.c
-===================================================================
---- zabbix-3.2.7.orig/src/libs/zbxcommon/str.c
-+++ zabbix-3.2.7/src/libs/zbxcommon/str.c
-@@ -51,7 +51,7 @@ static const char help_message_footer[]
+--- a/src/libs/zbxcommon/str.c
++++ b/src/libs/zbxcommon/str.c
+@@ -52,7 +52,7 @@ static const char help_message_footer[]
void version(void)
{
printf("%s (Zabbix) %s\n", title_message, ZABBIX_VERSION);
include $(TOPDIR)/rules.mk
PKG_NAME:=automake
-PKG_VERSION:=1.15
-PKG_RELEASE:=4
+PKG_VERSION:=1.15.1
+PKG_RELEASE:=1
PKG_SOURCE_URL:=@GNU/automake
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_HASH:=9908c75aabd49d13661d6dcb1bc382252d22cc77bf733a2d55e87f2aa2db8636
+PKG_HASH:=af6ba39142220687c500f79b4aa2f181d9b24e4f8d8ec497cea4ba26c64bedaf
PKG_MAINTAINER:=Heinrich Schuchardt <xypron.glpk@gmx.de>
PKG_LICENSE:=GPL-3.0+
FIX_PATHS = $(SED) '1c \#!/usr/bin/perl' -e 's| /[^ ]*/bin/perl| /usr/bin/perl|g'
+AM_VERSION:=$(word 1,$(subst ., ,$(PKG_VERSION))).$(word 2,$(subst ., ,$(PKG_VERSION)))
+
define Package/automake/install
$(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/automake-$(PKG_VERSION) \
- $(1)/usr/bin/automake-$(PKG_VERSION)
- $(LN) automake-$(PKG_VERSION) $(1)/usr/bin/automake
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aclocal-$(PKG_VERSION) \
- $(1)/usr/bin/aclocal-$(PKG_VERSION)
- $(LN) aclocal-$(PKG_VERSION) $(1)/usr/bin/aclocal
- $(FIX_PATHS) $(1)/usr/bin/automake-$(PKG_VERSION)
- $(FIX_PATHS) $(1)/usr/bin/aclocal-$(PKG_VERSION)
- $(INSTALL_DIR) $(1)/usr/share/automake-$(PKG_VERSION)
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/automake-$(AM_VERSION) \
+ $(1)/usr/bin/automake-$(AM_VERSION)
+ $(LN) automake-$(AM_VERSION) $(1)/usr/bin/automake
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aclocal-$(AM_VERSION) \
+ $(1)/usr/bin/aclocal-$(AM_VERSION)
+ $(LN) aclocal-$(AM_VERSION) $(1)/usr/bin/aclocal
+ $(FIX_PATHS) $(1)/usr/bin/automake-$(AM_VERSION)
+ $(FIX_PATHS) $(1)/usr/bin/aclocal-$(AM_VERSION)
+ $(INSTALL_DIR) $(1)/usr/share/automake-$(AM_VERSION)
for dir in \
- automake-$(PKG_VERSION) automake-$(PKG_VERSION)/Automake \
- automake-$(PKG_VERSION)/am aclocal \
- aclocal-$(PKG_VERSION) aclocal-$(PKG_VERSION)/internal \
+ automake-$(AM_VERSION) automake-$(AM_VERSION)/Automake \
+ automake-$(AM_VERSION)/am aclocal \
+ aclocal-$(AM_VERSION) aclocal-$(AM_VERSION)/internal \
; do \
$(INSTALL_DIR) $(1)/usr/share/$$$$dir; \
for file in $$$$(cd $(PKG_INSTALL_DIR) && \
PKG_NAME:=patch
PKG_VERSION:=2.7.6
-PKG_RELEASE:=1
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/patch
PKG_HASH:=ac610bda97abe0d9f6b7c963255a11dcb196c25e337c61f94e4778d632f1d8fd
+
PKG_LICENSE:=GPL-3.0+
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:gnu:patch
+
+PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
SECTION:=devel
CATEGORY:=Development
TITLE:=patch
- URL:=http://www.gnu.org/
+ URL:=https://savannah.gnu.org/projects/patch/
MAINTAINER:=Russell Senior <russell@personaltelco.net>
endef
--- /dev/null
+From 9bf998b5fcbcde1dea0e472dc1538abb97e9012e Mon Sep 17 00:00:00 2001
+From: Andreas Gruenbacher <agruen@gnu.org>
+Date: Mon, 12 Feb 2018 16:48:24 +0100
+Subject: [PATCH] Fix segfault with mangled rename patch
+
+http://savannah.gnu.org/bugs/?53132
+* src/pch.c (intuit_diff_type): Ensure that two filenames are specified
+for renames and copies (fix the existing check).
+---
+ src/pch.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/pch.c b/src/pch.c
+index ff9ed2c..bc6278c 100644
+--- a/src/pch.c
++++ b/src/pch.c
+@@ -974,7 +974,8 @@ intuit_diff_type (bool need_header, mode_t *p_file_type)
+ if ((pch_rename () || pch_copy ())
+ && ! inname
+ && ! ((i == OLD || i == NEW) &&
+- p_name[! reverse] &&
++ p_name[reverse] && p_name[! reverse] &&
++ name_is_valid (p_name[reverse]) &&
+ name_is_valid (p_name[! reverse])))
+ {
+ say ("Cannot %s file without two valid file names\n", pch_rename () ? "rename" : "copy");
+--
+2.19.1
+
--- /dev/null
+From b56779aed483f0036a32a65e62ab7b5e461b07cc Mon Sep 17 00:00:00 2001
+From: Andreas Gruenbacher <agruen@gnu.org>
+Date: Fri, 6 Apr 2018 12:14:49 +0200
+Subject: [PATCH] Fix arbitrary command execution in ed-style patches
+ (CVE-2018-1000156)
+
+* src/pch.c (do_ed_script): Write ed script to a temporary file instead
+of piping it to ed: this will cause ed to abort on invalid commands
+instead of rejecting them and carrying on.
+* tests/ed-style: New test case.
+* tests/Makefile.am (TESTS): Add test case.
+---
+ src/pch.c | 89 +++++++++++++++++++++++++++++++++++------------
+ tests/Makefile.am | 1 +
+ tests/ed-style | 41 ++++++++++++++++++++++
+ 3 files changed, 108 insertions(+), 23 deletions(-)
+ create mode 100644 tests/ed-style
+
+diff --git a/src/pch.c b/src/pch.c
+index bc6278c..4fd5a05 100644
+--- a/src/pch.c
++++ b/src/pch.c
+@@ -33,6 +33,7 @@
+ # include <io.h>
+ #endif
+ #include <safe.h>
++#include <sys/wait.h>
+
+ #define INITHUNKMAX 125 /* initial dynamic allocation size */
+
+@@ -2389,22 +2390,28 @@ do_ed_script (char const *inname, char const *outname,
+ static char const editor_program[] = EDITOR_PROGRAM;
+
+ file_offset beginning_of_this_line;
+- FILE *pipefp = 0;
+ size_t chars_read;
++ FILE *tmpfp = 0;
++ char const *tmpname;
++ int tmpfd;
++ pid_t pid;
++
++ if (! dry_run && ! skip_rest_of_patch)
++ {
++ /* Write ed script to a temporary file. This causes ed to abort on
++ invalid commands such as when line numbers or ranges exceed the
++ number of available lines. When ed reads from a pipe, it rejects
++ invalid commands and treats the next line as a new command, which
++ can lead to arbitrary command execution. */
++
++ tmpfd = make_tempfile (&tmpname, 'e', NULL, O_RDWR | O_BINARY, 0);
++ if (tmpfd == -1)
++ pfatal ("Can't create temporary file %s", quotearg (tmpname));
++ tmpfp = fdopen (tmpfd, "w+b");
++ if (! tmpfp)
++ pfatal ("Can't open stream for file %s", quotearg (tmpname));
++ }
+
+- if (! dry_run && ! skip_rest_of_patch) {
+- int exclusive = *outname_needs_removal ? 0 : O_EXCL;
+- assert (! inerrno);
+- *outname_needs_removal = true;
+- copy_file (inname, outname, 0, exclusive, instat.st_mode, true);
+- sprintf (buf, "%s %s%s", editor_program,
+- verbosity == VERBOSE ? "" : "- ",
+- outname);
+- fflush (stdout);
+- pipefp = popen(buf, binary_transput ? "wb" : "w");
+- if (!pipefp)
+- pfatal ("Can't open pipe to %s", quotearg (buf));
+- }
+ for (;;) {
+ char ed_command_letter;
+ beginning_of_this_line = file_tell (pfp);
+@@ -2415,14 +2422,14 @@ do_ed_script (char const *inname, char const *outname,
+ }
+ ed_command_letter = get_ed_command_letter (buf);
+ if (ed_command_letter) {
+- if (pipefp)
+- if (! fwrite (buf, sizeof *buf, chars_read, pipefp))
++ if (tmpfp)
++ if (! fwrite (buf, sizeof *buf, chars_read, tmpfp))
+ write_fatal ();
+ if (ed_command_letter != 'd' && ed_command_letter != 's') {
+ p_pass_comments_through = true;
+ while ((chars_read = get_line ()) != 0) {
+- if (pipefp)
+- if (! fwrite (buf, sizeof *buf, chars_read, pipefp))
++ if (tmpfp)
++ if (! fwrite (buf, sizeof *buf, chars_read, tmpfp))
+ write_fatal ();
+ if (chars_read == 2 && strEQ (buf, ".\n"))
+ break;
+@@ -2435,13 +2442,49 @@ do_ed_script (char const *inname, char const *outname,
+ break;
+ }
+ }
+- if (!pipefp)
++ if (!tmpfp)
+ return;
+- if (fwrite ("w\nq\n", sizeof (char), (size_t) 4, pipefp) == 0
+- || fflush (pipefp) != 0)
++ if (fwrite ("w\nq\n", sizeof (char), (size_t) 4, tmpfp) == 0
++ || fflush (tmpfp) != 0)
+ write_fatal ();
+- if (pclose (pipefp) != 0)
+- fatal ("%s FAILED", editor_program);
++
++ if (lseek (tmpfd, 0, SEEK_SET) == -1)
++ pfatal ("Can't rewind to the beginning of file %s", quotearg (tmpname));
++
++ if (! dry_run && ! skip_rest_of_patch) {
++ int exclusive = *outname_needs_removal ? 0 : O_EXCL;
++ *outname_needs_removal = true;
++ if (inerrno != ENOENT)
++ {
++ *outname_needs_removal = true;
++ copy_file (inname, outname, 0, exclusive, instat.st_mode, true);
++ }
++ sprintf (buf, "%s %s%s", editor_program,
++ verbosity == VERBOSE ? "" : "- ",
++ outname);
++ fflush (stdout);
++
++ pid = fork();
++ if (pid == -1)
++ pfatal ("Can't fork");
++ else if (pid == 0)
++ {
++ dup2 (tmpfd, 0);
++ execl ("/bin/sh", "sh", "-c", buf, (char *) 0);
++ _exit (2);
++ }
++ else
++ {
++ int wstatus;
++ if (waitpid (pid, &wstatus, 0) == -1
++ || ! WIFEXITED (wstatus)
++ || WEXITSTATUS (wstatus) != 0)
++ fatal ("%s FAILED", editor_program);
++ }
++ }
++
++ fclose (tmpfp);
++ safe_unlink (tmpname);
+
+ if (ofp)
+ {
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 6b6df63..16f8693 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -32,6 +32,7 @@ TESTS = \
+ crlf-handling \
+ dash-o-append \
+ deep-directories \
++ ed-style \
+ empty-files \
+ false-match \
+ fifo \
+diff --git a/tests/ed-style b/tests/ed-style
+new file mode 100644
+index 0000000..d8c0689
+--- /dev/null
++++ b/tests/ed-style
+@@ -0,0 +1,41 @@
++# Copyright (C) 2018 Free Software Foundation, Inc.
++#
++# Copying and distribution of this file, with or without modification,
++# in any medium, are permitted without royalty provided the copyright
++# notice and this notice are preserved.
++
++. $srcdir/test-lib.sh
++
++require cat
++use_local_patch
++use_tmpdir
++
++# ==============================================================
++
++cat > ed1.diff <<EOF
++0a
++foo
++.
++EOF
++
++check 'patch -e foo -i ed1.diff' <<EOF
++EOF
++
++check 'cat foo' <<EOF
++foo
++EOF
++
++cat > ed2.diff <<EOF
++1337a
++r !echo bar
++,p
++EOF
++
++check 'patch -e foo -i ed2.diff 2> /dev/null || echo "Status: $?"' <<EOF
++?
++Status: 2
++EOF
++
++check 'cat foo' <<EOF
++foo
++EOF
+--
+2.19.1
+
--- /dev/null
+From 71607715f11c9875a5aaaf3240885c45f79138e9 Mon Sep 17 00:00:00 2001
+From: Andreas Gruenbacher <agruen@gnu.org>
+Date: Fri, 17 Aug 2018 13:35:40 +0200
+Subject: [PATCH] Fix swapping fake lines in pch_swap
+
+* src/pch.c (pch_swap): Fix swapping p_bfake and p_efake when there is a
+blank line in the middle of a context-diff hunk: that empty line stays
+in the middle of the hunk and isn't swapped.
+
+Fixes: https://savannah.gnu.org/bugs/index.php?53133
+---
+ src/pch.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/pch.c b/src/pch.c
+index 4fd5a05..b0dd14d 100644
+--- a/src/pch.c
++++ b/src/pch.c
+@@ -2115,7 +2115,7 @@ pch_swap (void)
+ }
+ if (p_efake >= 0) { /* fix non-freeable ptr range */
+ if (p_efake <= i)
+- n = p_end - i + 1;
++ n = p_end - p_ptrn_lines;
+ else
+ n = -i;
+ p_efake += n;
+--
+2.19.1
+
PKG_SOURCE_URL:=https://github.com/dorimanx/exfat-nofuse.git
PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2017-06-20
-PKG_SOURCE_VERSION:=de4c760bc9a05ead83bc3ec6eec6cf1fb106f523
-PKG_MIRROR_HASH:=2aa53a83daf4be46e437842ee67d2e0ea327642cb6b8856a79153b52ec726a57
+PKG_SOURCE_DATE:=2018-04-17
+PKG_SOURCE_VERSION:=01c30ad52625a7261e1b0d874553b6ca7af25966
+PKG_MIRROR_HASH:=47e3b6b8384e4beaa07dc762f4e0cce9a067750cbb4b2fb4ba18d2348038c270
PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
PKG_LICENSE:=GPL-2.0
--- /dev/null
+#
+# Copyright (C) 2017 Banglang Huang
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
+
+PKG_NAME:=pf-ring
+PKG_VERSION:=7.2.0
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Banglang Huang <banglang.huang@foxmail.com>
+
+PKG_LICENSE:=GPL-2.0
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/ntop/PF_RING/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=5d349ac37a6ece5966bf606a6f131d628b98d88654c2f502d3c4b8bbf6ef9796
+
+PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/PF_RING-$(PKG_VERSION)
+
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+CONFIGURE_PATH:=kernel
+MAKE_PATH:=kernel
+
+define KernelPackage/pf-ring
+ SUBMENU:=Network Support
+ TITLE:=PF_RING Kernel driver
+ FILES:=$(PKG_BUILD_DIR)/kernel/pf_ring.ko
+ AUTOLOAD:=$(call AutoLoad,90,pf_ring,1)
+endef
+
+define KernelPackage/pf-ring/description
+ Kernel module for libpf-ring package
+endef
+
+EXTRA_CFLAGS += \
+ -I$(PKG_BUILD_DIR)/kernel
+
+MAKE_OPTS := \
+ ARCH="$(LINUX_KARCH)" \
+ CROSS_COMPILE="$(TARGET_CROSS)" \
+ SUBDIRS="$(PKG_BUILD_DIR)/kernel" \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ EXTRA_CFLAGS="$(EXTRA_CFLAGS)"
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include/linux
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/linux/*.h $(1)/usr/include/linux
+endef
+
+define Build/Compile
+ +$(MAKE) -C "$(LINUX_DIR)" \
+ $(MAKE_OPTS) \
+ modules
+endef
+
+$(eval $(call KernelPackage,pf-ring))
include $(TOPDIR)/rules.mk
PKG_NAME:=erlang
-PKG_VERSION:=19.3
-PKG_RELEASE:=6
+PKG_VERSION:=21.0
+PKG_RELEASE:=1
PKG_SOURCE:=otp_src_$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:= http://www.erlang.org/download/
-PKG_HASH:=fe4a00651db39b8542b04530a48d24b2f2e7e0b77cbe93d728c9f05325bdfe83
+PKG_HASH:=c7d247c0cad2d2e718eaca2e2dff051136a1347a92097abf19ebf65ea2870131
PKG_LICENSE:=ErlPL-1.1
PKG_LICENSE_FILES:=EPLICENCE
-PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org> \
- Arnaud Sautaux <arnaud.sautaux@infoteam.ch>
+PKG_MAINTAINER:=Arnaud Sautaux <arnaud.sautaux@infoteam.ch>
PKG_BUILD_DEPENDS:=erlang/host openssl
PKG_USE_MIPS16:=0
define Package/erlang
$(call Package/erlang/Default)
DEPENDS+= +libncurses +librt +zlib
- PROVIDES:= erlang-erts=8.3 erlang-kernel=5.2 erlang-sasl=3.0.3 erlang-stdlib=3.3
+ PROVIDES:= erlang-erts=10.0.1 erlang-kernel=6.0 erlang-sasl=3.2 erlang-stdlib=3.5
endef
define Package/erlang/description
define Package/erlang-asn1
$(call Package/erlang/Default)
TITLE:=Abstract Syntax Notation One (ASN.1) support
- VERSION:=4.0.4
+ VERSION:=5.0.6
DEPENDS+= +erlang +erlang-syntax-tools
endef
define Package/erlang-compiler
$(call Package/erlang/Default)
TITLE:=Byte code compiler
- VERSION:=7.0.4
+ VERSION:=7.2
DEPENDS+= +erlang +erlang-hipe
endef
define Package/erlang-crypto
$(call Package/erlang/Default)
TITLE:=Cryptography support
- VERSION:=3.7.3
+ VERSION:=4.3
DEPENDS+= +erlang +libopenssl
endef
define Package/erlang-hipe
$(call Package/erlang/Default)
TITLE:=High Performance Erlang
- VERSION:=3.15.4
+ VERSION:=3.18
DEPENDS+= +erlang
endef
define Package/erlang-inets
$(call Package/erlang/Default)
TITLE:=Internet clients and servers
- VERSION:=6.3.6
+ VERSION:=7.0
DEPENDS+= +erlang
endef
define Package/erlang-mnesia
$(call Package/erlang/Default)
TITLE:=Distributed database
- VERSION:=4.14.3
+ VERSION:=4.15.4
DEPENDS+= +erlang
endef
define Package/erlang-runtime-tools
$(call Package/erlang/Default)
TITLE:=Low-profile debugging/tracing tools
- VERSION:=1.11.1
+ VERSION:=1.13
DEPENDS+= +erlang
endef
define Package/erlang-snmp
$(call Package/erlang/Default)
TITLE:=Simple Network Management Protocol (SNMP) support
- VERSION:=5.2.5
+ VERSION:=5.2.11
DEPENDS+= +erlang +erlang-asn1
endef
define Package/erlang-public-key
$(call Package/erlang/Default)
TITLE:=Public Key support
- VERSION:=1.4
+ VERSION:=1.6
DEPENDS+= +erlang +erlang-crypto +erlang-asn1
endef
define Package/erlang-ssh
$(call Package/erlang/Default)
TITLE:=Secure Shell (SSH) support
- VERSION:=4.4.1
+ VERSION:=4.7
DEPENDS+= +erlang +erlang-crypto
endef
define Package/erlang-ssl
$(call Package/erlang/Default)
TITLE:=Secure Sockets Layer (SSL) support
- VERSION:=8.1.1
+ VERSION:=9.0
DEPENDS+= +erlang +erlang-crypto
endef
define Package/erlang-syntax-tools
$(call Package/erlang/Default)
TITLE:=Abstract Erlang syntax trees handling support
- VERSION:=2.1.1
+ VERSION:=2.1.5
DEPENDS+= +erlang
endef
define Package/erlang-tools
$(call Package/erlang/Default)
TITLE:=Erlang tools support
- VERSION:=2.9.1
+ VERSION:=3.0
DEPENDS+= +erlang
endef
define Package/erlang-reltool
$(call Package/erlang/Default)
TITLE:=Erlang reltool support
- VERSION:=0.7.3
+ VERSION:=0.7.6
DEPENDS+= +erlang
endef
define Package/erlang-os_mon
$(call Package/erlang/Default)
TITLE:=Erlang OS Monitoring Application
- VERSION:=2.4.2
+ VERSION:=2.4.5
DEPENDS+= +erlang
endef
define Package/erlang-xmerl
$(call Package/erlang/Default)
TITLE:=Erlang XML export
- VERSION:=1.3.13
+ VERSION:=1.3.17
DEPENDS+= +erlang
endef
--- /dev/null
+#
+# Copyright (C) 2018 Jeffery To
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=golang-github-agl-ed25519
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/agl/ed25519.git
+PKG_SOURCE_VERSION:=5312a61534124124185d41f09206b9fef1d88403
+PKG_SOURCE_DATE:=20170117
+PKG_MIRROR_HASH:=be9e9223e7a15f4c12d9f652f5a50a59c01fd1f87ee73bea0ebfd661b5a7ca9c
+
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+PKG_BUILD_DEPENDS:=golang/host
+PKG_BUILD_PARALLEL:=1
+
+GO_PKG:=github.com/agl/ed25519
+GO_PKG_SOURCE_ONLY:=1
+
+include $(INCLUDE_DIR)/package.mk
+include ../golang-package.mk
+
+define Package/golang-github-agl-ed25519-dev
+$(call GoPackage/GoSubMenu)
+ TITLE:=Ed25519 signature algorithm for Go
+ URL:=https://github.com/agl/ed25519
+ DEPENDS:=$(GO_ARCH_DEPENDS) \
+ +golang-golang-x-crypto-dev
+ PKGARCH:=all
+endef
+
+define Package/golang-github-agl-ed25519-dev/description
+Ed25519 is a public-key signature system based on elliptic-curve
+cryptography.
+endef
+
+$(eval $(call GoSrcPackage,golang-github-agl-ed25519-dev))
+$(eval $(call BuildPackage,golang-github-agl-ed25519-dev))
--- /dev/null
+#
+# Copyright (C) 2018 Jeffery To
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=golang-github-dchest-siphash
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/dchest/siphash.git
+PKG_SOURCE_VERSION:=4ebf1de738443ea7f45f02dc394c4df1942a126d
+PKG_SOURCE_DATE:=20160831
+PKG_MIRROR_HASH:=57da99437a6dba8c0b34bb09da48c0b8b1e70391ae0e3563453206794defe051
+
+PKG_LICENSE:=CC0-1.0
+PKG_LICENSE_FILES:=README.md
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+PKG_BUILD_DEPENDS:=golang/host
+PKG_BUILD_PARALLEL:=1
+
+GO_PKG:=github.com/dchest/siphash
+GO_PKG_SOURCE_ONLY:=1
+
+include $(INCLUDE_DIR)/package.mk
+include ../golang-package.mk
+
+define Package/golang-github-dchest-siphash-dev
+$(call GoPackage/GoSubMenu)
+ TITLE:=Go implementation of SipHash-2-4
+ URL:=https://github.com/dchest/siphash
+ DEPENDS:=$(GO_ARCH_DEPENDS)
+ PKGARCH:=all
+endef
+
+define Package/golang-github-dchest-siphash-dev/description
+SipHash-2-4 is a pseudorandom function (a.k.a. keyed hash function)
+optimized for speed on short messages.
+endef
+
+$(eval $(call GoSrcPackage,golang-github-dchest-siphash-dev))
+$(eval $(call BuildPackage,golang-github-dchest-siphash-dev))
--- /dev/null
+#
+# Copyright (C) 2018 Jeffery To
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=golang-golang-x-crypto
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/golang/crypto.git
+PKG_SOURCE_VERSION:=a49355c7e3f8fe157a85be2f77e6e269a0f89602
+PKG_SOURCE_DATE:=20180620
+PKG_MIRROR_HASH:=80b16b203736ac56883d0610edbc5981eb78f15b7b35d11b5ca639f7c3814214
+
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+PKG_BUILD_DEPENDS:=golang/host
+PKG_BUILD_PARALLEL:=1
+
+GO_PKG:=golang.org/x/crypto
+GO_PKG_SOURCE_ONLY:=1
+
+include $(INCLUDE_DIR)/package.mk
+include ../golang-package.mk
+
+define Package/golang-golang-x-crypto-dev
+$(call GoPackage/GoSubMenu)
+ TITLE:=Go supplementary cryptography libraries
+ URL:=https://godoc.org/golang.org/x/crypto
+ DEPENDS:=$(GO_ARCH_DEPENDS) \
+ +golang-golang-x-net-dev \
+ +golang-golang-x-sys-dev
+ PKGARCH:=all
+endef
+
+define Package/golang-golang-x-crypto-dev/description
+Supplementary Go cryptography libraries.
+endef
+
+$(eval $(call GoSrcPackage,golang-golang-x-crypto-dev))
+$(eval $(call BuildPackage,golang-golang-x-crypto-dev))
--- /dev/null
+#
+# Copyright (C) 2018 Jeffery To
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=golang-golang-x-net
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/golang/net.git
+PKG_SOURCE_VERSION:=afe8f62b1d6bbd81f31868121a50b06d8188e1f9
+PKG_SOURCE_DATE:=20180620
+PKG_MIRROR_HASH:=9a8bb3bf21ea60121d7e87f1bd1af9effbdcd908f758be99457653172d13eb1e
+
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+PKG_BUILD_DEPENDS:=golang/host
+PKG_BUILD_PARALLEL:=1
+
+GO_PKG:=golang.org/x/net
+# exclude http2/h2i to break circular dependency with golang-golang-x-crypto-dev
+# since there are no other binaries, can skip compilation
+GO_PKG_SOURCE_ONLY:=1
+
+include $(INCLUDE_DIR)/package.mk
+include ../golang-package.mk
+
+define Package/golang-golang-x-net-dev
+$(call GoPackage/GoSubMenu)
+ TITLE:=Go supplementary network libraries
+ URL:=https://godoc.org/golang.org/x/net
+ DEPENDS:=$(GO_ARCH_DEPENDS) +golang-golang-x-text-dev
+ PKGARCH:=all
+endef
+
+define Package/golang-golang-x-net-dev/description
+Supplementary Go networking libraries.
+endef
+
+# http2/testdata/draft-ietf-httpbis-http2.xml is a non-free document
+# http2/z_spec_test.go uses http2/testdata/draft-ietf-httpbis-http2.xml
+define Package/golang-golang-x-net-dev/install
+ $(call GoPackage/Package/Install/Src,$(1))
+
+ rm -f $(1)$(GO_PKG_PATH)/src/$(GO_PKG)/http2/testdata/draft-ietf-httpbis-http2.xml
+ rmdir $(1)$(GO_PKG_PATH)/src/$(GO_PKG)/http2/testdata/
+
+ rm -f $(1)$(GO_PKG_PATH)/src/$(GO_PKG)/http2/z_spec_test.go
+endef
+
+$(eval $(call GoSrcPackage,golang-golang-x-net-dev))
+$(eval $(call BuildPackage,golang-golang-x-net-dev))
--- /dev/null
+#
+# Copyright (C) 2018 Jeffery To
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=golang-golang-x-sys
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/golang/sys.git
+PKG_SOURCE_VERSION:=63fc586f45fe72d95d5240a5d5eb95e6503907d3
+PKG_SOURCE_DATE:=20180621
+PKG_MIRROR_HASH:=3afe7936fb9fb291ef9b9cfa88f51576cdc19abbd34240232ce284958ac7dbaf
+
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+PKG_BUILD_DEPENDS:=golang/host
+PKG_BUILD_PARALLEL:=1
+
+GO_PKG:=golang.org/x/sys
+GO_PKG_SOURCE_ONLY:=1
+
+include $(INCLUDE_DIR)/package.mk
+include ../golang-package.mk
+
+define Package/golang-golang-x-sys-dev
+$(call GoPackage/GoSubMenu)
+ TITLE:=Go packages for interaction with the OS
+ URL:=https://godoc.org/golang.org/x/sys
+ DEPENDS:=$(GO_ARCH_DEPENDS)
+ PKGARCH:=all
+endef
+
+define Package/golang-golang-x-sys-dev/description
+Supplementary Go packages for low-level interactions with the operating
+system.
+endef
+
+$(eval $(call GoSrcPackage,golang-golang-x-sys-dev))
+$(eval $(call BuildPackage,golang-golang-x-sys-dev))
--- /dev/null
+#
+# Copyright (C) 2018 Jeffery To
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=golang-golang-x-text
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/golang/text.git
+PKG_SOURCE_VERSION:=5cec4b58c438bd98288aeb248bab2c1840713d21
+PKG_SOURCE_DATE:=20180520
+PKG_MIRROR_HASH:=6c541a59f32f57afa54a2216045ddf16a077f8fe2e823fbbe77723eca04ddddb
+
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+PKG_BUILD_DEPENDS:=golang/host
+PKG_BUILD_PARALLEL:=1
+
+GO_PKG:=golang.org/x/text
+# exclude gotext (and message/pipeline) to avoid dependency on golang.org/x/tools
+# since there are no other binaries, can skip compilation
+GO_PKG_SOURCE_ONLY:=1
+
+include $(INCLUDE_DIR)/package.mk
+include ../golang-package.mk
+
+define Package/golang-golang-x-text-dev
+$(call GoPackage/GoSubMenu)
+ TITLE:=Go text processing support
+ URL:=https://godoc.org/golang.org/x/text
+ DEPENDS:=$(GO_ARCH_DEPENDS)
+ PKGARCH:=all
+endef
+
+define Package/golang-golang-x-text-dev/description
+Supplementary Go libraries for text processing, many involving Unicode.
+endef
+
+$(eval $(call GoSrcPackage,golang-golang-x-text-dev))
+$(eval $(call BuildPackage,golang-golang-x-text-dev))
GO386=$(GO_386) \
GOARM=$(GO_ARM) \
GOMIPS=$(GO_MIPS) \
+ GOMIPS64=$(GO_MIPS64) \
CGO_ENABLED=1 \
CGO_CFLAGS="$(filter-out $(GO_CFLAGS_TO_REMOVE),$(TARGET_CFLAGS))" \
CGO_CPPFLAGS="$(TARGET_CPPFLAGS)" \
\
if [ "$(GO_PKG_SOURCE_ONLY)" != 1 ]; then \
case $(GO_ARCH) in \
- arm) installsuffix="-installsuffix v$(GO_ARM)" ;; \
- mips|mipsle) installsuffix="-installsuffix $(GO_MIPS)" ;; \
+ arm) installsuffix="-installsuffix v$(GO_ARM)" ;; \
+ mips|mipsle) installsuffix="-installsuffix $(GO_MIPS)" ;; \
+ mips64|mips64le) installsuffix="-installsuffix $(GO_MIPS64)" ;; \
esac ; \
trimpath="all=-trimpath=$(GO_PKG_BUILD_DIR)" ; \
ldflags="all=-linkmode external -extldflags '$(TARGET_LDFLAGS)'" ; \
--- /dev/null
+#
+# Copyright (C) 2018 Jeffery To
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=golang-torproject-pluggable-transports-goptlib
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://git.torproject.org/pluggable-transports/goptlib.git
+PKG_SOURCE_VERSION:=7d56ec4f381e8b1aedfda360594e35a5731b5337
+PKG_SOURCE_DATE:=20180320
+PKG_MIRROR_HASH:=ec28d8882e031046efd561764e1b9119376844a1c3d4941e038cfbe32e60b058
+
+PKG_LICENSE:=CC0-1.0
+PKG_LICENSE_FILES:=COPYING
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+PKG_BUILD_DEPENDS:=golang/host
+PKG_BUILD_PARALLEL:=1
+
+GO_PKG:=git.torproject.org/pluggable-transports/goptlib.git
+GO_PKG_SOURCE_ONLY:=1
+
+include $(INCLUDE_DIR)/package.mk
+include ../golang-package.mk
+
+define Package/golang-torproject-pluggable-transports-goptlib-dev
+$(call GoPackage/GoSubMenu)
+ TITLE:=Tor pluggable transports library for Go
+ URL:=https://gitweb.torproject.org/pluggable-transports/goptlib.git/
+ DEPENDS:=$(GO_ARCH_DEPENDS)
+ PKGARCH:=all
+endef
+
+define Package/golang-torproject-pluggable-transports-goptlib-dev/description
+goptlib is a library for writing Tor pluggable transports in Go.
+endef
+
+$(eval $(call GoSrcPackage,golang-torproject-pluggable-transports-goptlib-dev))
+$(eval $(call BuildPackage,golang-torproject-pluggable-transports-goptlib-dev))
CGO_CXXFLAGS CGO_CXXFLAGS_ALLOW CGO_CXXFLAGS_DISALLOW \
CGO_FFLAGS CGO_FFLAGS_ALLOW CGO_FFLAGS_DISALLOW \
CGO_LDFLAGS CGO_LDFLAGS_ALLOW CGO_LDFLAGS_DISALLOW \
- GOARM GO386 GOMIPS \
+ GOARM GO386 GOMIPS GOMIPS64 \
GOROOT_FINAL GO_EXTLINK_ENABLED GIT_ALLOW_PROTOCOL \
CC_FOR_TARGET CXX_FOR_TARGET GO_DISTFLAGS GO_GCFLAGS GO_LDFLAGS GOBUILDTIMELOGFILE GOROOT_BOOTSTRAP \
BOOT_GO_GCFLAGS GOEXPERIMENT GOBOOTSTRAP_TOOLEXEC
GO_MIPS:=$(if $(filter $(GO_ARCH),mips mipsle),$(if $(CONFIG_HAS_FPU),hardfloat,softfloat),)
+GO_MIPS64:=$(if $(filter $(GO_ARCH),mips64 mips64le),$(if $(CONFIG_HAS_FPU),hardfloat,softfloat),)
+
# -fno-plt: causes "unexpected GOT reloc for non-dynamic symbol" errors
# -mips32r2: conflicts with -march=mips32 set by go
GO_CFLAGS_TO_REMOVE:=$(if \
$(filter $(GO_ARCH),386),-fno-plt,$(if \
$(filter $(GO_ARCH),mips mipsle),-mips32r2,))
-# mips64 / mips64el doesn't have softfloat support yet
-# https://github.com/golang/go/issues/14635
-GO_ARCH_DEPENDS:=@(aarch64||arm||i386||i686||mips||mipsel||powerpc64||x86_64)
+GO_ARCH_DEPENDS:=@(aarch64||arm||i386||i686||mips||mips64||mips64el||mipsel||powerpc64||x86_64)
GO_TARGET_PREFIX:=/usr
GO_TARGET_VERSION_ID:=$(GO_VERSION_MAJOR_MINOR)
endif
-GO_VERSION_MAJOR_MINOR:=1.10
-GO_VERSION_PATCH:=3
+GO_VERSION_MAJOR_MINOR:=1.11
+GO_VERSION_PATCH:=2
PKG_NAME:=golang
PKG_VERSION:=$(GO_VERSION_MAJOR_MINOR)$(if $(GO_VERSION_PATCH),.$(GO_VERSION_PATCH))
-PKG_RELEASE:=2
+PKG_RELEASE:=1
GO_SOURCE_URLS:=https://dl.google.com/go/ \
https://mirrors.ustc.edu.cn/golang/ \
PKG_SOURCE:=go$(PKG_VERSION).src.tar.gz
PKG_SOURCE_URL:=$(GO_SOURCE_URLS)
-PKG_HASH:=567b1cc66c9704d1c019c50bef946272e911ec6baf244310f87f4e678be155f2
+PKG_HASH:=042fba357210816160341f1002440550e952eb12678f7c9e7e9d389437942550
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
# when go compiles a program, it will use the host std lib
# so remove it now and force go to rebuild std for target later
define Host/Install
+ $(call Host/Uninstall)
+
$(call GoCompiler/Host/Install/Bin,)
$(call GoCompiler/Host/Install/Src,)
PKG_NAME:=jamvm
PKG_VERSION:=2.0.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_LICENSE:=GPL-2.0+
PKG_MAINTAINER:=Dana H. Myers <k6jq@comcast.net>
CATEGORY:=Languages
TITLE:=A compact Java Virtual Machine
URL:=http://sourceforge.net/projects/jamvm
- DEPENDS:=+zlib +libpthread +librt +classpath @!avr32
+ DEPENDS:=+zlib +libpthread +librt +classpath \
+ @(i386||i686||x86_64||arm||armeb||mips||mipsel||powerpc||powerpc64) +CONFIG_powerpc64:libffi
endef
define Package/jamvm/description
--- /dev/null
+From 7152ded5219453c9ff1cd062cecbeaf4d77e4cab Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Date: Thu, 26 May 2016 15:05:48 +0200
+Subject: [PATCH] Use <fenv.h> instead of <fpu_control.h>
+
+musl libc (http://musl-libc.org lack the non-standard <fpu_control.h>
+header, which is used in src/os/linux/{i386,x86_64}/init.c files to
+setup the floating point precision. This patch makes it use the
+standard C <fenv.h> header instead.
+
+Original patch at Felix Janda at
+https://sourceforge.net/p/jamvm/patches/6/.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ src/os/linux/i386/init.c | 12 ++++++------
+ src/os/linux/x86_64/init.c | 16 ++++++----------
+ 2 files changed, 12 insertions(+), 16 deletions(-)
+
+diff --git a/src/os/linux/i386/init.c b/src/os/linux/i386/init.c
+index d9c6648..94a733e 100644
+--- a/src/os/linux/i386/init.c
++++ b/src/os/linux/i386/init.c
+@@ -19,18 +19,18 @@
+ * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+-#include <fpu_control.h>
++#include <fenv.h>
+
+ /* Change floating point precision to double (64-bit) from
+ * the extended (80-bit) Linux default. */
+
+ void setDoublePrecision() {
+- fpu_control_t cw;
++ fenv_t fenv;
+
+- _FPU_GETCW(cw);
+- cw &= ~_FPU_EXTENDED;
+- cw |= _FPU_DOUBLE;
+- _FPU_SETCW(cw);
++ fegetenv(&fenv);
++ fenv.__control_word &= ~0x300; /* _FPU_EXTENDED */
++ fenv.__control_word |= 0x200; /* _FPU_DOUBLE */
++ fesetenv(&fenv);
+ }
+
+ void initialisePlatform() {
+diff --git a/src/os/linux/x86_64/init.c b/src/os/linux/x86_64/init.c
+index 9d55229..a76a923 100644
+--- a/src/os/linux/x86_64/init.c
++++ b/src/os/linux/x86_64/init.c
+@@ -19,9 +19,7 @@
+ * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+-#ifdef __linux__
+-#include <fpu_control.h>
+-#endif
++#include <fenv.h>
+
+ /* Change the x87 FPU precision to double (64-bit) from the extended
+ (80-bit) Linux default. Note, unlike on i386, my testcases pass
+@@ -30,14 +28,12 @@
+ */
+
+ void setDoublePrecision() {
+-#ifdef __linux__
+- fpu_control_t cw;
++ fenv_t fenv;
+
+- _FPU_GETCW(cw);
+- cw &= ~_FPU_EXTENDED;
+- cw |= _FPU_DOUBLE;
+- _FPU_SETCW(cw);
+-#endif
++ fegetenv(&fenv);
++ fenv.__control_word &= ~0x300; /*_FPU_EXTENDED */
++ fenv.__control_word |= 0x200; /*_FPU_DOUBLE */
++ fesetenv(&fenv);
+ }
+
+ void initialisePlatform() {
+--
+2.7.4
+
include $(TOPDIR)/rules.mk
PKG_NAME:=lsqlite3
-PKG_VERSION:=0.9.3
+PKG_VERSION:=0.9.5
PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_URL:=http://lua.sqlite.org/index.cgi/zip/lsqlite3_fsl09w.zip
-PKG_HASH:=b857df8b66d01a803378cc86e56b787958beffdc8b851ad304f4ce8c7f0e9dbb
+PKG_SOURCE:=lsqlite3_fsl09y.zip
+PKG_SOURCE_URL:=http://lua.sqlite.org/index.cgi/zip/
+PKG_HASH:=d38402aa7640055d260c1246c36e6d6d31b425a25a805431f13695694466b722
PKG_LICENSE:=MIT
PKG_MAINTAINER:=Oskari Rauta <oskari.rauta@gmail.com>
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(PKG_NAME)_fsl09w.zip
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(basename $(PKG_SOURCE))
include $(INCLUDE_DIR)/package.mk
TARGET_CFLAGS += $(FPIC) -std=gnu99
TARGET_CPPFLAGS += -DLUA_USE_LINUX
-TARGET_LDFLAGS += -llua -lsqlite3 -lpthread
+TARGET_LDFLAGS += -lsqlite3 -lpthread
define Build/Compile
$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) \
- -c $(PKG_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/lsqlite3.c \
- -o $(PKG_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/lsqlite3.o \
- -DSQLITE_VERSION="$(PKG_VERSION)"
+ -c $(PKG_BUILD_DIR)/lsqlite3.c \
+ -o $(PKG_BUILD_DIR)/lsqlite3.o \
+ -DLSQLITE_VERSION=\"$(PKG_VERSION)\"
$(TARGET_CC) $(TARGET_LDFLAGS) -shared \
- $(PKG_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/lsqlite3.o \
- -o $(PKG_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/lsqlite3.so
+ $(PKG_BUILD_DIR)/lsqlite3.o \
+ -o $(PKG_BUILD_DIR)/lsqlite3.so
endef
define Package/lsqlite3/install
$(INSTALL_DIR) $(1)/usr/lib/lua
- $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/*.so $(1)/usr/lib/lua/
+ $(CP) $(PKG_BUILD_DIR)/*.so $(1)/usr/lib/lua/
endef
$(eval $(call BuildPackage,lsqlite3))
PKG_NAME:=luajit
PKG_VERSION:=2017-01-17-71ff7ef
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_MAINTAINER:=Morteza Milani <milani@pichak.co>
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=COPYRIGHT
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/luajit-2.1
- $(CP) $(PKG_INSTALL_DIR)/usr/include/luajit-2.1/*.h $(1)/usr/include/luajit-2.1
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/luajit-2.1/*.{h,hpp} $(1)/usr/include/luajit-2.1
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{a,so*} $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
define Package/luajit/install
$(INSTALL_DIR) $(1)/usr/lib/
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/luajit-2.1.0-beta2 $(1)/usr/bin/$(PKG_NAME)
endef
--- /dev/null
+if PACKAGE_node-mozilla-iot-gateway
+
+ comment "Optional features"
+
+ config MOIT_enable-plugin-support
+ bool "Enable packages needed for some plugins"
+ default y
+
+endif
PKG_NPM_NAME:=mozilla-iot-gateway
PKG_NAME:=node-$(PKG_NPM_NAME)
-PKG_VERSION:=0.3.1
+PKG_VERSION:=0.6.0
PKG_RELEASE:=1
+PKG_REV:=df2d06def2051238bde7b8e5ee306262235d4c9f
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/mozilla-iot/gateway.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=v$(PKG_VERSION)
+PKG_SOURCE_VERSION:=$(PKG_REV)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MIRROR_HASH:=ba05bc3e93c36768244df922434e7132c2dae85a1ff9e3213beea087a4844d11
+PKG_MIRROR_HASH:=d686df778a7de693db11273eb87c16ec4d9e3ff9bbb550ed3ef94e29e96750e2
PKG_BUILD_DEPENDS:=node/host openzwave
CATEGORY:=Languages
TITLE:=Things Gateway by Mozilla
URL:=https://iot.mozilla.org/gateway/
- DEPENDS:=+node +node-npm +libopenzwave +python +openssl-util
+ DEPENDS:= +libpthread +node +node-npm +libopenzwave +openzwave-config +python +python3-light +python3-pip +openssl-util
+ DEPENDS+= +MOIT_enable-plugin-support:git-http
+ MENU:=1
endef
define Package/node-mozilla-iot-gateway/description
and defining a standard data model and APIs to make them interoperable.
endef
+define Package/node-mozilla-iot-gateway/config
+ source "$(SOURCE)/Config.in"
+endef
+
CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))))
define Build/Compile
endef
define Package/node-mozilla-iot-gateway/install
- $(INSTALL_DIR) $(1)/opt/mozilla-iot/gateway
+ $(INSTALL_DIR) $(1)/opt/mozilla-iot/gateway/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/things-gateway/* $(1)/opt/mozilla-iot/gateway
$(STAGING_DIR_HOSTPKG)/bin/npm --prefix=$(1)/opt/mozilla-iot/gateway install $(1)/opt/mozilla-iot/gateway
- $(LN) ../constants.js $(1)/opt/mozilla-iot/gateway/src/addons/addon-constants.js
- $(LN) /tmp/mozilla-iot/gateway/run-app.log $(1)/opt/mozilla-iot/gateway/run-app.log
+
+ # Clean up of old build files that confuse OpenWrt's dependency checker
+ $(RM) -r $(1)/opt/mozilla-iot/gateway/node_modules/sqlite3/lib/binding/node-v57-linux-x64
+ $(RM) -r $(1)/opt/mozilla-iot/gateway/node_modules/ursa-optional/build/Release/ursaNative.node
+ $(RM) -r $(1)/opt/mozilla-iot/gateway/node_modules/ursa-optional/build/Release/obj.target/ursaNative.node
+
+ $(INSTALL_DIR) $(1)/opt/mozilla-iot/gateway/node_modules/sqlite3/lib/binding/node-v57-linux-arm/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/things-gateway/node_modules/sqlite3/lib/binding/node-v57-linux-arm/node_sqlite3.node \
+ $(1)/opt/mozilla-iot/gateway/node_modules/sqlite3/lib/binding/node-v57-linux-arm/
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/mozilla-iot-gateway.init $(1)/etc/init.d/mozilla-iot-gateway
START=99
-_npm=/usr/bin/npm
+HOME=/root
+MOZIOT_HOME="${HOME}/.mozilla-iot"
+export PATH="/opt/mozilla-iot/gateway/tools:${PATH}"
+
+run_app() {
+ cd /opt/mozilla-iot/gateway
+
+ echo "node version"
+ node --version
+ echo "npm version"
+ npm --version
+ echo "Starting gateway ..."
+ npm start
+}
start()
{
- mkdir -p /tmp/mozilla-iot/gateway/
- cd /opt/mozilla-iot/gateway/
- $_npm start &> /tmp/mozilla-iot/gateway/run-app.log &
+ mkdir -p /usr/etc/
+ ln -sf /etc/openzwave /usr/etc/openzwave
+
+ mkdir -p "${MOZIOT_HOME}/log"
+ run_app &> "${MOZIOT_HOME}/log/run-app.log" &
}
include $(TOPDIR)/rules.mk
PKG_NAME:=perl-cgi
-PKG_VERSION:=4.38
+PKG_VERSION:=4.40
PKG_RELEASE:=1
PKG_SOURCE_URL:=http://www.cpan.org/authors/id/L/LE/LEEJO
PKG_SOURCE:=CGI-$(PKG_VERSION).tar.gz
-PKG_HASH:=8c58f4a529bb92a914b22b7e64c5e31185c9854a4070a6dfad44fe5cc248e7d4
+PKG_HASH:=10efff3061b3c31a33b3cc59f955aef9c88d57d12dbac46389758cef92f24f56
PKG_LICENSE:=GPL Artistic-2.0
PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>, \
include $(TOPDIR)/rules.mk
PKG_NAME:=perl-text-csv_xs
-PKG_VERSION:=1.36
+PKG_VERSION:=1.37
PKG_RELEASE:=1
PKG_SOURCE_URL:=https://www.cpan.org/authors/id/H/HM/HMBRAND/
PKG_SOURCE:=Text-CSV_XS-$(PKG_VERSION).tgz
-PKG_HASH:=c321b09ad98a332138f25f55afb83befd7c045134085c7cb280fc325e688942c
+PKG_HASH:=20e16da9c38b0938f308c01d954f49d2c6922bac0d2d979bf2ad483fe7476ba2
PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
PKG_MAINTAINER:=Philip Prindeville <philipp@redfish-solutions.com>
#
-# Copyright (C) 2006-2016 OpenWrt.org
+# Copyright (C) 2006-2018 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
+include perlver.mk
+
PKG_NAME:=perl
-PKG_VERSION:=5.28.0
-PKG_RELEASE:=1
+PKG_VERSION:=$(PERL_VERSION)
+PKG_RELEASE:=2
PKG_SOURCE_URL:=\
https://cpan.metacpan.org/src/5.0 \
--- a/perl.c
+++ b/perl.c
-@@ -286,7 +286,7 @@ perl_construct(pTHXx)
+@@ -303,7 +303,7 @@ perl_construct(pTHXx)
PL_localpatches = local_patches; /* For possible -v */
#endif
-#if defined(LIBM_LIB_VERSION)
-+#if defined(LIBM_LIB_VERSION) && (defined(__GLIBC__) || defined(__UCLIBC__))
++#if defined(LIBM_LIB_VERSION) && defined(__UCLIBC__)
/*
* Some BSDs and Cygwin default to POSIX math instead of IEEE.
* This switches them over to IEEE.
# This makefile simplifies perl module builds.
#
-PERL_VERSION:=5.28
+ifeq ($(origin PERL_INCLUDE_DIR),undefined)
+ PERL_INCLUDE_DIR:=$(dir $(lastword $(MAKEFILE_LIST)))
+endif
+
+include $(PERL_INCLUDE_DIR)/perlver.mk
+
+ifneq ($(PKG_NAME),perl)
+ PKG_VERSION:=$(PKG_VERSION)+perl$(PERL_VERSION2)
+endif
+
+PERL_VERSION:=$(PERL_VERSION2)
# Build environment
HOST_PERL_PREFIX:=$(STAGING_DIR_HOSTPKG)/usr
EXTRA_LIBS:=bsd
EXTRA_LIBDIRS:=$(STAGING_DIR)/lib
endif
-PERL_CMD:=$(STAGING_DIR_HOSTPKG)/usr/bin/perl$(PERL_VERSION).0
+PERL_CMD:=$(STAGING_DIR_HOSTPKG)/usr/bin/perl$(PERL_VERSION3)
MOD_CFLAGS_PERL:=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(TARGET_CFLAGS) $(TARGET_CPPFLAGS)
ifdef CONFIG_PERL_THREADS
--- /dev/null
+PERL_VERSION:=5.28.0
+
+PERL_EXPLODE:=$(subst ., ,$(PERL_VERSION))
+
+PERL_MAJOR:=$(word 1,$(PERL_EXPLODE))
+PERL_MINOR:=$(word 2,$(PERL_EXPLODE))
+PERL_REL:=$(word 3,$(PERL_EXPLODE))
+
+PERL_VERSION3:=$(PERL_VERSION)
+PERL_VERSION2:=$(PERL_MAJOR).$(PERL_MINOR)
PECL_NAME:=pecl_http
PECL_LONGNAME:=Extended HTTP Support
-PKG_VERSION:=3.1.0
-PKG_RELEASE:=5
-PKG_HASH:=e3de67b156e7d5f6c2e5eb1e2b5f0acceb7004f1260d68c9f8b2c0f9629aabf0
+PKG_VERSION:=3.2.0
+PKG_RELEASE:=1
+PKG_HASH:=6fb7f038365fb1f3302f1b7e7d6b55d5c422bdea36057b1efe02bbe6ad3cc01b
PKG_NAME:=php7-pecl-http
PKG_SOURCE:=$(PECL_NAME)-$(PKG_VERSION).tgz
+++ /dev/null
---- a/src/php_http_etag.c 2016-12-12 10:04:21.000000000 +0100
-+++ b/src/php_http_etag.c 2016-12-23 21:10:59.523222367 +0100
-@@ -60,7 +60,7 @@
- unsigned char buf[4];
-
- *((uint *) e->ctx) = ~*((uint *) e->ctx);
--#if WORDS_BIGENDIAN
-+#ifdef WORDS_BIGENDIAN
- etag = php_http_etag_digest((unsigned char *) e->ctx, 4);
- #else
- buf[0] = ((unsigned char *) e->ctx)[3];
+++ /dev/null
-From ab5b4e3acd2b0379e5d8bc95a8d4f83ce5c91fb7 Mon Sep 17 00:00:00 2001
-From: Michael Heimpold <mhei@heimpold.de>
-Date: Sun, 4 Jun 2017 15:00:33 +0200
-Subject: [PATCH] Handle NULL strings gracefully during constant registration
-
-When libcurl is compiled not using e.g. libz or SSL, then a call to
-curl_version_info could return NULL in the corresponding fields of
-curl_version_info_data.
-
-Passing such NULL pointers down to REGISTER_NS_STRING_CONSTANT results
-in a segfault during php startup, so let's check for this special case
-and register a NULL constant in this case.
-
-Signed-off-by: Michael Heimpold <mhei@heimpold.de>
----
- src/php_http_client_curl.c | 16 ++++++++++++----
- 1 file changed, 12 insertions(+), 4 deletions(-)
-
-diff --git a/src/php_http_client_curl.c b/src/php_http_client_curl.c
-index f286324..f07bb8f 100644
---- a/src/php_http_client_curl.c
-+++ b/src/php_http_client_curl.c
-@@ -2429,6 +2429,14 @@ php_http_client_ops_t *php_http_client_curl_get_ops(void)
- return &php_http_client_curl_ops;
- }
-
-+#define REGISTER_NS_STRING_OR_NULL_CONSTANT(ns, name, str, flags) \
-+ do { \
-+ if ((str) != NULL) { \
-+ REGISTER_NS_STRING_CONSTANT(ns, name, str, flags); \
-+ } else { \
-+ REGISTER_NS_NULL_CONSTANT(ns, name, flags); \
-+ } \
-+ } while (0)
-
- PHP_MINIT_FUNCTION(http_client_curl)
- {
-@@ -2509,12 +2517,12 @@ PHP_MINIT_FUNCTION(http_client_curl)
- REGISTER_NS_STRING_CONSTANT("http\\Client\\Curl", "VERSIONS", curl_version(), CONST_CS|CONST_PERSISTENT);
- #if CURLVERSION_NOW >= 0
- REGISTER_NS_STRING_CONSTANT("http\\Client\\Curl\\Versions", "CURL", (char *) info->version, CONST_CS|CONST_PERSISTENT);
-- REGISTER_NS_STRING_CONSTANT("http\\Client\\Curl\\Versions", "SSL", (char *) info->ssl_version, CONST_CS|CONST_PERSISTENT);
-- REGISTER_NS_STRING_CONSTANT("http\\Client\\Curl\\Versions", "LIBZ", (char *) info->libz_version, CONST_CS|CONST_PERSISTENT);
-+ REGISTER_NS_STRING_OR_NULL_CONSTANT("http\\Client\\Curl\\Versions", "SSL", (char *) info->ssl_version, CONST_CS|CONST_PERSISTENT);
-+ REGISTER_NS_STRING_OR_NULL_CONSTANT("http\\Client\\Curl\\Versions", "LIBZ", (char *) info->libz_version, CONST_CS|CONST_PERSISTENT);
- # if CURLVERSION_NOW >= 1
-- REGISTER_NS_STRING_CONSTANT("http\\Client\\Curl\\Versions", "ARES", (char *) info->ares, CONST_CS|CONST_PERSISTENT);
-+ REGISTER_NS_STRING_OR_NULL_CONSTANT("http\\Client\\Curl\\Versions", "ARES", (char *) info->ares, CONST_CS|CONST_PERSISTENT);
- # if CURLVERSION_NOW >= 2
-- REGISTER_NS_STRING_CONSTANT("http\\Client\\Curl\\Versions", "IDN", (char *) info->libidn, CONST_CS|CONST_PERSISTENT);
-+ REGISTER_NS_STRING_OR_NULL_CONSTANT("http\\Client\\Curl\\Versions", "IDN", (char *) info->libidn, CONST_CS|CONST_PERSISTENT);
- # endif
- # endif
- #endif
---
-2.7.4
-
+++ /dev/null
-From 8158548a80733b3af9539356b47527d960a13287 Mon Sep 17 00:00:00 2001
-From: Michael Wallner <mike@php.net>
-Date: Thu, 1 Feb 2018 14:36:09 +0100
-Subject: [PATCH] fix #73
-
-include idna.h prior idn2.h to ensure INDA_H is defined and libidn2 does
-not try to define the idna compat layer
----
- src/php_http.c | 6 +++---
- src/php_http_url.c | 6 +++---
- 2 files changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/src/php_http.c b/src/php_http.c
-index 207c248..bc9166a 100644
---- a/src/php_http.c
-+++ b/src/php_http.c
-@@ -31,12 +31,12 @@
- #if PHP_HTTP_HAVE_LIBICU
- # include <unicode/uversion.h>
- #endif
--#if PHP_HTTP_HAVE_LIBIDN2
--# include <idn2.h>
--#endif
- #if PHP_HTTP_HAVE_LIBIDN
- # include <idna.h>
- #endif
-+#if PHP_HTTP_HAVE_LIBIDN2
-+# include <idn2.h>
-+#endif
- #if PHP_HTTP_HAVE_LIBIDNKIT2 || PHP_HTTP_HAVE_LIBIDNKIT
- #include "idn/version.h"
- #endif
-diff --git a/src/php_http_url.c b/src/php_http_url.c
-index 029e6a8..361e61c 100644
---- a/src/php_http_url.c
-+++ b/src/php_http_url.c
-@@ -12,12 +12,12 @@
-
- #include "php_http_api.h"
-
--#if PHP_HTTP_HAVE_LIBIDN2
--# include <idn2.h>
--#endif
- #if PHP_HTTP_HAVE_LIBIDN
- # include <idna.h>
- #endif
-+#if PHP_HTTP_HAVE_LIBIDN2
-+# include <idn2.h>
-+#endif
- #if PHP_HTTP_HAVE_LIBICU
- # include <unicode/uidna.h>
- #endif
---
-2.7.4
-
include $(TOPDIR)/rules.mk
PKG_NAME:=php
-PKG_VERSION:=7.2.8
+PKG_VERSION:=7.2.11
PKG_RELEASE:=1
PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://www.php.net/distributions/
-PKG_HASH:=53ba0708be8a7db44256e3ae9fcecc91b811e5b5119e6080c951ffe7910ffb0f
+PKG_HASH:=da1a705c0bc46410e330fc6baa967666c8cd2985378fb9707c01a8e33b01d985
PKG_FIXUP:=libtool autoreconf
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
PHP7_MODULES = \
+ bcmath \
calendar ctype curl \
fileinfo \
dom \
default y
endef
+define Package/php7-mod-intl/config
+ config PHP7_FULLICUDATA
+ bool "Add dependency to full ICU Data"
+ depends on PACKAGE_php7-mod-intl
+ default n
+endef
+
+define Package/php7-mod-intl/description
+ Note that this package depends in ICU library which is built without data
+ by default. This is to satisfy programs build and run dependencies but to
+ keep the installed footprint small on the target system(s).
+ However, the data is required to make the ICU library useful - and thus
+ directly affects PHPs ICU extension, too - so consider to also
+ select/install package 'icu-full-data'.
+endef
+
# not everything groks --disable-nls
DISABLE_NLS:=
--with-zlib="$(STAGING_DIR)/usr" \
--with-zlib-dir="$(STAGING_DIR)/usr"
+ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-bcmath),)
+ CONFIGURE_ARGS+= --enable-bcmath=shared
+else
+ CONFIGURE_ARGS+= --disable-bcmath
+endif
+
ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-calendar),)
CONFIGURE_ARGS+= --enable-calendar=shared
else
$(eval $(call BuildPackage,php7-fpm))
#$(eval $(call BuildModule,NAME,TITLE[,PKG DEPENDS]))
+$(eval $(call BuildModule,bcmath,Bcmath))
$(eval $(call BuildModule,calendar,Calendar))
$(eval $(call BuildModule,ctype,Ctype))
$(eval $(call BuildModule,curl,cURL,+PACKAGE_php7-mod-curl:libcurl))
$(eval $(call BuildModule,hash,Hash))
$(eval $(call BuildModule,iconv,iConv,$(ICONV_DEPENDS)))
$(eval $(call BuildModule,imap,IMAP,+PACKAGE_php7-mod-imap:libopenssl +PACKAGE_libpam:libpam +PACKAGE_php7-mod-imap:uw-imap))
-$(eval $(call BuildModule,intl,Internationalization Functions,+PACKAGE_php7-mod-intl:icu))
+$(eval $(call BuildModule,intl,Internationalization Functions,+PACKAGE_php7-mod-intl:icu +PHP7_FULLICUDATA:icu-full-data))
$(eval $(call BuildModule,json,JSON))
$(eval $(call BuildModule,ldap,LDAP,+PACKAGE_php7-mod-ldap:libopenldap +PACKAGE_php7-mod-ldap:libsasl2))
$(eval $(call BuildModule,mbstring,MBString))
$(eval $(call BuildModule,mysqli,MySQL Improved Extension,+PACKAGE_php7-mod-mysqli:php7-mod-mysqlnd,30))
-$(eval $(call BuildModule,mysqlnd,MySQL Native Driver))
+$(eval $(call BuildModule,mysqlnd,MySQL Native Driver,+php7-mod-hash))
$(eval $(call BuildModule,opcache,OPcache,,,zend))
-$(eval $(call BuildModule,openssl,OpenSSL,+PACKAGE_php7-mod-openssl:libopenssl))
+$(eval $(call BuildModule,openssl,OpenSSL,+PACKAGE_php7-mod-openssl:libopenssl,15))
$(eval $(call BuildModule,pcntl,PCNTL))
$(eval $(call BuildModule,pdo,PHP Data Objects))
$(eval $(call BuildModule,pdo-mysql,PDO driver for MySQL,+php7-mod-pdo +PACKAGE_php7-mod-pdo-mysql:php7-mod-mysqlnd))
include $(TOPDIR)/rules.mk
PKG_NAME:=django-constance
-PKG_VERSION:=2.0.0
+PKG_VERSION:=2.3.1
PKG_RELEASE:=1
PKG_LICENSE:=BSD-3-Clause
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/8a/37/4fa87dd0e43aa0a66fc419d58e67a9b6da70e1853d646c4b501c1ee7208b/
-PKG_HASH:=6eec9f3ac4e5657b93e64f3379181d1e727088df10dd34f0398cd12119b9f0b0
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/django-constance
+PKG_HASH:=a49735063b2c30015d2e52a90609ea9798da722ed070f091de51714758a5d018
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
include $(TOPDIR)/rules.mk
PKG_NAME:=django-picklefield
-PKG_VERSION:=1.0.0
+PKG_VERSION:=1.1.0
PKG_RELEASE:=1
PKG_LICENSE:=MIT
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/e8/69/232d78ef16cad8dd4c2f871b0f44d87bcde36ed6a90597416e903034600b/
-PKG_HASH:=61e3ba7f6df82d8df9e6be3a8c55ef589eb3bf926c3d25d2b7949b07eae78354
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/django-picklefield
+PKG_HASH:=ce7fee5c6558fe5dc8924993d994ccde75bb75b91cd82787cbd4c92b95a69f9c
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
CATEGORY:=Languages
MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
TITLE:=Pickled object field for Django
- URL:=http://github.com/gintas/django-picklefield/
+ URL:=https://github.com/gintas/django-picklefield
DEPENDS:=+python +django
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=django-postoffice
-PKG_VERSION:=3.0.3
+PKG_VERSION:=3.1.0
PKG_RELEASE:=1
PKG_LICENSE:=MIT
PKG_SOURCE:=django-post_office-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/0f/8c/8c7e1d8998741fd195f7df947c509bc31a03d505aca03488c39e59da11f0/
-PKG_BUILD_DIR:=$(BUILD_DIR)/django-post_office-$(PKG_VERSION)/
-PKG_HASH:=8d691b2e53ba8121d770ce448f05568874cf78a3cf63215918ad49536db5e76a
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/django-post_office
+PKG_HASH:=827937a944fe47cea393853069cd9315d080298c8ddb0faf787955d6aa51a030
+PKG_BUILD_DIR:=$(BUILD_DIR)/django-post_office-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
include $(TOPDIR)/rules.mk
PKG_NAME:=django-restframework
-PKG_VERSION:=3.7.1
+PKG_VERSION:=3.9.0
PKG_RELEASE:=1
PKG_LICENSE:=BSD-3-Clause
PKG_SOURCE:=djangorestframework-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/d0/ab/8b991e7d3e26af7cf6327c84b341e60004fc56325d8a4d4019e1474f7456/
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/djangorestframework
+PKG_HASH:=607865b0bb1598b153793892101d881466bd5a991de12bd6229abb18b1c86136
PKG_BUILD_DIR:=$(BUILD_DIR)/djangorestframework-$(PKG_VERSION)
-PKG_HASH:=305b2c6564ca46d3b558ba21110ed717135c467adf1a6dfd192bd85f4bb04d50
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
CATEGORY:=Languages
MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
TITLE:=Web APIs for Django, made easy.
- URL:=http://www.django-rest-framework.org/
+ URL:=https://www.django-rest-framework.org
DEPENDS:=+python +django
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=django-statici18n
-PKG_VERSION:=1.6.1
+PKG_VERSION:=1.8.2
PKG_RELEASE:=1
PKG_LICENSE:=BSD-3-Clause
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/0a/24/1bed254529fc492ee5daf4cba18cf188b059866049889ecf1f178f25a2c2/
-PKG_HASH:=47d30939d52bcbbf1cbfe56b786bc2f2ea874266a8315cb027c061f320c4e2f6
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/django-statici18n
+PKG_HASH:=ba9eeb3c4517027922645999359f8335fbb9fea04c457123cfbd6b4a36cbeda4
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
CATEGORY:=Languages
MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
TITLE:=A Django app that provides helper for generating JavaScript catalog to static files.
- URL:=http://django-statici18n.readthedocs.org/
+ URL:=https://django-statici18n.readthedocs.org/
DEPENDS:=+python +django
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=django
-PKG_VERSION:=1.8.18
+PKG_VERSION:=1.11.16
PKG_RELEASE=1
PKG_LICENSE:=BSD-3-Clause
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/django/django.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=2d4bc5a60aa8a076689667c550ded96b87bc463e
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=c82c2cc338ae46ba8572d9960fc98dca932edc43a00f011fed102810a86185ae
+PKG_SOURCE:=Django-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/D/Django
+PKG_HASH:=29268cc47816a44f27308e60f71da635f549c47d8a1d003b28de55141df75791
+PKG_BUILD_DIR=$(BUILD_DIR)/Django-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
include $(TOPDIR)/rules.mk
PKG_NAME:=flup
-PKG_VERSION:=1.0.2
+PKG_VERSION:=1.0.3
PKG_RELEASE:=1
PKG_LICENSE:=BSD-3-Clause
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://pypi.python.org/packages/source/f/flup/
-PKG_HASH:=4bad317a5fc1ce3d4fe5e9b6d846ec38a8023e16876785d4f88102f2c8097dd9
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/f/flup
+PKG_HASH:=5eb09f26eb0751f8380d8ac43d1dfb20e1d42eca0fa45ea9289fa532a79cd159
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
CATEGORY:=Languages
MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
TITLE:=Random assortment of WSGI servers
- URL:=http://www.saddi.com/software/flup/
+ URL:=https://www.saddi.com/software/flup/
DEPENDS:=+python
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=gunicorn
-PKG_VERSION:=19.7.1
+PKG_VERSION:=19.9.0
PKG_RELEASE=1
PKG_LICENSE:=MIT
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/30/3a/10bb213cede0cc4d13ac2263316c872a64bf4c819000c8ccd801f1d5f822/
-PKG_HASH:=eee1169f0ca667be05db3351a0960765620dad53f53434262ff8901b68a1b622
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/g/gunicorn
+PKG_HASH:=fa2662097c66f920f53f70621c6c58ca4a3c4d3434205e608e121b5b3b71f4f3
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
CATEGORY:=Languages
TITLE:=WSGI HTTP Server for UNIX
MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
- URL:=http://gunicorn.org/
+ URL:=https://gunicorn.org
DEPENDS:=+python +python-setuptools
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=jdcal
-PKG_VERSION:=1.3
+PKG_VERSION:=1.4
PKG_RELEASE:=1
PKG_LICENSE:=BSD-3-Clause
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/9b/fa/40beb2aa43a13f740dd5be367a10a03270043787833409c61b79e69f1dfd/
-PKG_HASH:=b760160f8dc8cc51d17875c6b663fafe64be699e10ce34b6a95184b5aa0fdc9e
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/j/jdcal
+PKG_HASH:=ea0a5067c5f0f50ad4c7bdc80abad3d976604f6fb026b0b3a17a9d84bb9046c9
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
CATEGORY:=Languages
MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
TITLE:=Julian dates from proleptic Gregorian and Julian calendars.
- URL:=http://github.com/phn/jdcal
+ URL:=https://github.com/phn/jdcal
DEPENDS:=+python
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=micropython-lib
-PKG_VERSION=1.9-$(PKG_SOURCE_VERSION)
+PKG_VERSION:=1.9.3
PKG_RELEASE:=1
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/micropython/micropython-lib/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=66e15380eb109613263beb6825b8eecb9191088270c1a59e8c7d922dd57183c7
+
PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
PKG_LICENSE:=MIT, PSFL
PKG_LICENSE_FILES:=LICENSE
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/micropython/micropython-lib.git
-PKG_SOURCE_VERSION:=f5fe55aaef1a39d3d56f07040c0ff9f7e841fdf7
-
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)
-PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.xz
-PKG_MIRROR_HASH:=76565b5d44d47ccf61562f98dcf166d8103760eed7f3d84f5f7f31610140d780
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/rules.mk
PKG_NAME:=micropython
-PKG_VERSION=1.9.2-$(PKG_SOURCE_VERSION)
+PKG_VERSION:=1.9.4
PKG_RELEASE:=1
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/micropython/micropython/releases/download/v$(PKG_VERSION)
+PKG_HASH:=0db042011bffcbd65362b67eb3cca87eaefa9f2a55b747fa75e922c706b8ce1a
+
PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/micropython/micropython.git
-PKG_SOURCE_VERSION:=1f78e7a43130acfa4bedf16c1007a1b0f37c75c3
-
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.xz
-PKG_MIRROR_HASH:=18234ffd1e91ac461080b4213399a6a18d4163fe314782b2e6ffbd1bfe48537b
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
SECTION:=lang
CATEGORY:=Languages
TITLE:=Micro Python
- URL:=http://micropython.org
+ URL:=https://micropython.org
DEPENDS:=+libffi
endef
endef
-MAKE_FLAGS += -C $(PKG_BUILD_DIR)/unix FROZEN_MPY_DIR=
+MAKE_FLAGS += -C $(PKG_BUILD_DIR)/ports/unix FROZEN_MPY_DIR=
define Build/Compile
- $(call Build/Compile/Default,axtls)
- $(call Build/Compile/Default)
+ $(call Build/Compile/Default,axtls)
+ $(call Build/Compile/Default)
endef
define Package/micropython/install
$(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/unix/micropython $(1)/usr/bin/micropython
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/ports/unix/micropython $(1)/usr/bin/micropython
endef
$(eval $(call BuildPackage,micropython))
+++ /dev/null
-Index: micropython-1.5-20161117-e81a5353cb794b8d6c57317488e5db6a1c524755/unix/Makefile
-===================================================================
---- micropython-1.5-20161117-e81a5353cb794b8d6c57317488e5db6a1c524755.orig/unix/Makefile 2016-11-17 02:43:13.000000000 +0100
-+++ micropython-1.5-20161117-e81a5353cb794b8d6c57317488e5db6a1c524755/unix/Makefile 2016-11-17 16:49:02.937809018 +0100
-@@ -21,7 +21,7 @@
- INC += -I$(BUILD)
-
- # compiler settings
--CWARN = -Wall -Werror
-+CWARN = -Wall
- CWARN += -Wpointer-arith -Wuninitialized
- CFLAGS = $(INC) $(CWARN) -ansi -std=gnu99 -DUNIX $(CFLAGS_MOD) $(COPT) $(CFLAGS_EXTRA)
-
--- /dev/null
+diff --git a/ports/unix/Makefile b/ports/unix/Makefile
+index cbdd3f3..0ab157d 100644
+--- a/ports/unix/Makefile
++++ b/ports/unix/Makefile
+@@ -21,7 +21,7 @@ INC += -I$(TOP)
+ INC += -I$(BUILD)
+
+ # compiler settings
+-CWARN = -Wall -Werror
++CWARN = -Wall
+ CWARN += -Wpointer-arith -Wuninitialized
+ CFLAGS = $(INC) $(CWARN) -std=gnu99 -DUNIX $(CFLAGS_MOD) $(COPT) $(CFLAGS_EXTRA)
+
+++ /dev/null
---- a/py/persistentcode.c 2017-09-22 13:26:04.914339465 +0000
-+++ b/py/persistentcode.c 2017-09-22 13:26:22.618319621 +0000
-@@ -373,7 +373,7 @@
-
- // here we define mp_raw_code_save_file depending on the port
- // TODO abstract this away properly
-
--#if defined(__i386__) || defined(__x86_64__) || (defined(__arm__) && (defined(__unix__)))
-+#if defined(__i386__) || defined(__x86_64__) || defined(__unix__)
-
- #include <unistd.h>
-
include $(TOPDIR)/rules.mk
PKG_NAME:=openpyxl
-PKG_VERSION:=2.5.0b1
+PKG_VERSION:=2.5.9
PKG_RELEASE:=1
PKG_LICENSE:=MIT
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/88/3c/34fbe561fc92e6a75f297478b123c2590ca986d9f2d2dbf340d879aa24dd/
-PKG_HASH:=3b42ece7933b46b2128f8d4111c57c80fb5aa46f4d16e7f83281f169e7398ba7
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/o/openpyxl
+PKG_HASH:=022c0f3fa1e873cc0ba20651c54dd5e6276fc4ff150b4060723add4fc448645e
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
include $(TOPDIR)/rules.mk
PKG_NAME:=pyodbc
-PKG_VERSION:=4.0.21
+PKG_VERSION:=4.0.24
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/0f/04/c5638a4636fb8117fdc45685f489864459d193b1d892b61dce785ddf58f9
-PKG_HASH:=9655f84ca9e5cb2dfffff705601017420c840d55271ba62dd44f05383eff0329
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pyodbc
+PKG_HASH:=4326abb737dec36156998d52324921673d30f575e1e0998f0c5edd7de20e61d4
PKG_BUILD_DEPENDS:=python python3 unixodbc
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE.txt
+++ /dev/null
---- a/src/connection.cpp
-+++ b/src/connection.cpp
-@@ -18,6 +18,14 @@
- #include "cnxninfo.h"
- #include "sqlwchar.h"
-
-+#ifdef WORDS_BIGENDIAN
-+# define OPTENC_UTF16NE OPTENC_UTF16BE
-+# define ENCSTR_UTF16NE "utf-16be"
-+#else
-+# define OPTENC_UTF16NE OPTENC_UTF16LE
-+# define ENCSTR_UTF16NE "utf-16le"
-+#endif
-+
- #if PY_MAJOR_VERSION < 3
- static bool IsStringType(PyObject* t) { return (void*)t == (void*)&PyString_Type; }
- static bool IsUnicodeType(PyObject* t) { return (void*)t == (void*)&PyUnicode_Type; }
-@@ -90,7 +98,7 @@ static bool Connect(PyObject* pConnectSt
- // indication that we can handle Unicode. We are going to use the same unicode ending
- // as we do for binding parameters.
-
-- SQLWChar wchar(pConnectString, SQL_C_WCHAR, encoding, "utf-16le");
-+ SQLWChar wchar(pConnectString, SQL_C_WCHAR, encoding, ENCSTR_UTF16NE);
- if (!wchar)
- return false;
-
-@@ -216,24 +224,24 @@ PyObject* Connection_New(PyObject* pConn
- // single-byte text we don't actually know what the encoding is. For example, with SQL
- // Server the encoding is based on the database's collation. We ask the driver / DB to
- // convert to SQL_C_WCHAR and use the ODBC default of UTF-16LE.
-- cnxn->sqlchar_enc.optenc = OPTENC_UTF16LE;
-- cnxn->sqlchar_enc.name = _strdup("utf-16le");
-+ cnxn->sqlchar_enc.optenc = OPTENC_UTF16NE;
-+ cnxn->sqlchar_enc.name = _strdup(ENCSTR_UTF16NE);
- cnxn->sqlchar_enc.ctype = SQL_C_WCHAR;
-
-- cnxn->sqlwchar_enc.optenc = OPTENC_UTF16LE;
-- cnxn->sqlwchar_enc.name = _strdup("utf-16le");
-+ cnxn->sqlwchar_enc.optenc = OPTENC_UTF16NE;
-+ cnxn->sqlwchar_enc.name = _strdup(ENCSTR_UTF16NE);
- cnxn->sqlwchar_enc.ctype = SQL_C_WCHAR;
-
-- cnxn->metadata_enc.optenc = OPTENC_UTF16LE;
-- cnxn->metadata_enc.name = _strdup("utf-16le");
-+ cnxn->metadata_enc.optenc = OPTENC_UTF16NE;
-+ cnxn->metadata_enc.name = _strdup(ENCSTR_UTF16NE);
- cnxn->metadata_enc.ctype = SQL_C_WCHAR;
-
- // Note: I attempted to use UTF-8 here too since it can hold any type, but SQL Server fails
- // with a data truncation error if we send something encoded in 2 bytes to a column with 1
- // character. I don't know if this is a bug in SQL Server's driver or if I'm missing
- // something, so we'll stay with the default ODBC conversions.
-- cnxn->unicode_enc.optenc = OPTENC_UTF16LE;
-- cnxn->unicode_enc.name = _strdup("utf-16le");
-+ cnxn->unicode_enc.optenc = OPTENC_UTF16NE;
-+ cnxn->unicode_enc.name = _strdup(ENCSTR_UTF16NE);
- cnxn->unicode_enc.ctype = SQL_C_WCHAR;
-
- #if PY_MAJOR_VERSION < 3
include $(TOPDIR)/rules.mk
PKG_NAME:=python-attrs
-PKG_VERSION:=18.1.0
+PKG_VERSION:=18.2.0
PKG_RELEASE:=1
PKG_SOURCE:=attrs-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/a/attrs
-PKG_HASH:=e0d0eb91441a3b53dab4d9b743eafc1ac44476296a2053b6ca3af0b139faf87b
+PKG_HASH:=10cbf6e27dbce8c30807caf056c8eb50917e0eaafe86347671b57254006c3e69
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-attrs-$(PKG_VERSION)
include $(TOPDIR)/rules.mk
PKG_NAME:=python-certifi
-PKG_VERSION:=2018.4.16
+PKG_VERSION:=2018.10.15
PKG_RELEASE:=1
PKG_LICENSE:=MPL-2.0
PKG_SOURCE:=certifi-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/4d/9c/46e950a6f4d6b4be571ddcae21e7bc846fcbb88f1de3eff0f6dd0a6be55d
-PKG_HASH:=13e698f54293db9f89122b0581843a782ad0934a4fe0172d2a980ba77fc61bb7
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/c/certifi
+PKG_HASH:=6d58c986d22b038c8c0df30d639f23a3e6d172a05c3583e766f4c0b785c0986a
PKG_BUILD_DIR:=$(BUILD_DIR)/certifi-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
PKG_NAME:=python-crypto
PKG_VERSION:=2.6.1
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=pycrypto-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pycrypto
PKG_HASH:=f2ce1e989b272cfcb677616763e0a2e7ec659effa67a88aa92b3a65528f60a3c
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-crypto-$(PKG_VERSION)
PKG_LICENSE:=Public Domain
PKG_LICENSE_FILES:=COPYRIGHT
+PKG_CPE_ID:=cpe:/a:dlitz:pycrypto
PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
include $(INCLUDE_DIR)/package.mk
SECTION:=lang-python
CATEGORY:=Languages
SUBMENU:=Python
- URL:=http://www.pycrypto.org/
+ URL:=https://www.dlitz.net/software/pycrypto/
endef
define Package/python-crypto
--- /dev/null
+From 8dbe0dc3eea5c689d4f76b37b93fe216cf1f00d4 Mon Sep 17 00:00:00 2001
+From: Legrandin <helderijs@gmail.com>
+Date: Sun, 22 Dec 2013 22:24:46 +0100
+Subject: [PATCH] Throw exception when IV is used with ECB or CTR
+
+The IV parameter is currently ignored when initializing
+a cipher in ECB or CTR mode.
+
+For CTR mode, it is confusing: it takes some time to see
+that a different parameter is needed (the counter).
+
+For ECB mode, it is outright dangerous.
+
+This patch forces an exception to be raised.
+---
+ lib/Crypto/SelfTest/Cipher/common.py | 31 +++++++++++++++++++++++--------
+ src/block_template.c | 11 +++++++++++
+ 2 files changed, 34 insertions(+), 8 deletions(-)
+
+diff --git a/lib/Crypto/SelfTest/Cipher/common.py b/lib/Crypto/SelfTest/Cipher/common.py
+index 420b6ff..a5f8a88 100644
+--- a/lib/Crypto/SelfTest/Cipher/common.py
++++ b/lib/Crypto/SelfTest/Cipher/common.py
+@@ -239,16 +239,30 @@ class RoundtripTest(unittest.TestCase):
+ return """%s .decrypt() output of .encrypt() should not be garbled""" % (self.module_name,)
+
+ def runTest(self):
+- for mode in (self.module.MODE_ECB, self.module.MODE_CBC, self.module.MODE_CFB, self.module.MODE_OFB, self.module.MODE_OPENPGP):
++
++ ## ECB mode
++ mode = self.module.MODE_ECB
++ encryption_cipher = self.module.new(a2b_hex(self.key), mode)
++ ciphertext = encryption_cipher.encrypt(self.plaintext)
++ decryption_cipher = self.module.new(a2b_hex(self.key), mode)
++ decrypted_plaintext = decryption_cipher.decrypt(ciphertext)
++ self.assertEqual(self.plaintext, decrypted_plaintext)
++
++ ## OPENPGP mode
++ mode = self.module.MODE_OPENPGP
++ encryption_cipher = self.module.new(a2b_hex(self.key), mode, self.iv)
++ eiv_ciphertext = encryption_cipher.encrypt(self.plaintext)
++ eiv = eiv_ciphertext[:self.module.block_size+2]
++ ciphertext = eiv_ciphertext[self.module.block_size+2:]
++ decryption_cipher = self.module.new(a2b_hex(self.key), mode, eiv)
++ decrypted_plaintext = decryption_cipher.decrypt(ciphertext)
++ self.assertEqual(self.plaintext, decrypted_plaintext)
++
++ ## All other non-AEAD modes (but CTR)
++ for mode in (self.module.MODE_CBC, self.module.MODE_CFB, self.module.MODE_OFB):
+ encryption_cipher = self.module.new(a2b_hex(self.key), mode, self.iv)
+ ciphertext = encryption_cipher.encrypt(self.plaintext)
+-
+- if mode != self.module.MODE_OPENPGP:
+- decryption_cipher = self.module.new(a2b_hex(self.key), mode, self.iv)
+- else:
+- eiv = ciphertext[:self.module.block_size+2]
+- ciphertext = ciphertext[self.module.block_size+2:]
+- decryption_cipher = self.module.new(a2b_hex(self.key), mode, eiv)
++ decryption_cipher = self.module.new(a2b_hex(self.key), mode, self.iv)
+ decrypted_plaintext = decryption_cipher.decrypt(ciphertext)
+ self.assertEqual(self.plaintext, decrypted_plaintext)
+
+diff --git a/src/block_template.c b/src/block_template.c
+index f940e0e..d555ceb 100644
+--- a/src/block_template.c
++++ b/src/block_template.c
+@@ -170,6 +170,17 @@ ALGnew(PyObject *self, PyObject *args, PyObject *kwdict)
+ "Key cannot be the null string");
+ return NULL;
+ }
++ if (IVlen != 0 && mode == MODE_ECB)
++ {
++ PyErr_Format(PyExc_ValueError, "ECB mode does not use IV");
++ return NULL;
++ }
++ if (IVlen != 0 && mode == MODE_CTR)
++ {
++ PyErr_Format(PyExc_ValueError,
++ "CTR mode needs counter parameter, not IV");
++ return NULL;
++ }
+ if (IVlen != BLOCK_SIZE && mode != MODE_ECB && mode != MODE_CTR)
+ {
+ PyErr_Format(PyExc_ValueError,
+From 58de28a5d32bc10e15766e5a59f41b07397cc6cb Mon Sep 17 00:00:00 2001
+From: Richard Mitchell <richard.j.mitchell@gmail.com>
+Date: Mon, 28 Apr 2014 16:58:27 +0100
+Subject: [PATCH] Fix speedtest run for ECB modes.
+
+---
+ pct-speedtest.py | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/pct-speedtest.py b/pct-speedtest.py
+index 4ce18be..c7b893a 100644
+--- a/pct-speedtest.py
++++ b/pct-speedtest.py
+@@ -121,6 +121,8 @@ class Benchmark:
+ blocks = self.random_blocks(16384, 1000)
+ if mode is None:
+ cipher = module.new(key)
++ elif mode==module.MODE_ECB:
++ cipher = module.new(key, module.MODE_ECB)
+ else:
+ cipher = module.new(key, mode, iv)
+
--- /dev/null
+--- a/lib/Crypto/PublicKey/ElGamal.py
++++ b/lib/Crypto/PublicKey/ElGamal.py
+@@ -153,33 +153,33 @@ def generate(bits, randfunc, progress_fu
+ if number.isPrime(obj.p, randfunc=randfunc):
+ break
+ # Generate generator g
+- # See Algorithm 4.80 in Handbook of Applied Cryptography
+- # Note that the order of the group is n=p-1=2q, where q is prime
+ if progress_func:
+ progress_func('g\n')
+ while 1:
++ # Choose a square residue; it will generate a cyclic group of order q.
++ obj.g = pow(number.getRandomRange(2, obj.p, randfunc), 2, obj.p)
++
+ # We must avoid g=2 because of Bleichenbacher's attack described
+ # in "Generating ElGamal signatures without knowning the secret key",
+ # 1996
+- #
+- obj.g = number.getRandomRange(3, obj.p, randfunc)
+- safe = 1
+- if pow(obj.g, 2, obj.p)==1:
+- safe=0
+- if safe and pow(obj.g, q, obj.p)==1:
+- safe=0
++ if obj.g in (1, 2):
++ continue
++
+ # Discard g if it divides p-1 because of the attack described
+ # in Note 11.67 (iii) in HAC
+- if safe and divmod(obj.p-1, obj.g)[1]==0:
+- safe=0
++ if (obj.p - 1) % obj.g == 0:
++ continue
++
+ # g^{-1} must not divide p-1 because of Khadir's attack
+ # described in "Conditions of the generator for forging ElGamal
+ # signature", 2011
+ ginv = number.inverse(obj.g, obj.p)
+- if safe and divmod(obj.p-1, ginv)[1]==0:
+- safe=0
+- if safe:
+- break
++ if (obj.p - 1) % ginv == 0:
++ continue
++
++ # Found
++ break
++
+ # Generate private key x
+ if progress_func:
+ progress_func('x\n')
include $(TOPDIR)/rules.mk
PKG_NAME:=python-cryptography
-PKG_VERSION:=2.2.2
+PKG_VERSION:=2.3.1
PKG_RELEASE:=1
PKG_SOURCE:=cryptography-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.io/packages/source/c/cryptography
-PKG_HASH:=9fc295bf69130a342e7a19a39d7bbeb15c0bcaabc7382ec33ef3b2b7d18d2f63
+PKG_SOURCE_URL:= https://files.pythonhosted.org/packages/source/c/cryptography
+PKG_HASH:=8d10113ca826a4c29d5b85b2c4e045ffa8bad74fb525ee0eceb1d38d4c70dfd6
PKG_LICENSE:=Apache-2.0 BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE.APACHE LICENSE.BSD
include $(TOPDIR)/rules.mk
PKG_NAME:=python-dateutil
-PKG_VERSION:=2.6.1
+PKG_VERSION:=2.7.5
PKG_RELEASE:=1
PKG_LICENSE:=BSD-2-Clause
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/54/bb/f1db86504f7a49e1d9b9301531181b00a1c7325dc85a29160ee3eaa73a54/
-PKG_HASH:=891c38b2a02f5bb1be3e4793866c8df49c7d19baabf9c1bad62547e0b4866aca
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/python-dateutil
+PKG_HASH:=88f9287c0174266bb0d8cedd395cfba9c58e87e5ad86b2ce58859bc11be3cf02
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
include $(TOPDIR)/rules.mk
PKG_NAME:=python-egenix-mx-base
-PKG_VERSION:=3.2.8
+PKG_VERSION:=3.2.9
PKG_RELEASE:=1
PKG_MAINTAINER:=Dmitry Trefilov <the-alien@live.ru>
PKG_LICENSE:=eGenix.com Public License 1.1.0
PKG_LICENSE_FILES:=LICENSE COPYRIGHT
-PKG_SOURCE:=egenix-mx-base-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://downloads.egenix.com/python/
-PKG_HASH:=0da55233e45bc3f88870e62e60a79c2c86bad4098b8128343fd7be877f44a3c0
+PKG_SOURCE:=egenix-mx-base-$(PKG_VERSION).zip
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/e/egenix-mx-base
+PKG_HASH:=1844adcc137834724c1aca825dc9e1cbd8d81710f208231ea4bdb6d8b3006a95
PKG_BUILD_DIR:=$(BUILD_DIR)/egenix-mx-base-$(PKG_VERSION)
PKG_BUILD_DEPENDS:=python
CATEGORY:=Languages
DEPENDS:=+USE_EGLIBC:librt +USE_UCLIBC:librt +python
TITLE:=Egenix mxBase
- URL:=http://www.egenix.com/products/python/mxBase/
+ URL:=https://www.egenix.com/products/python/mxBase/
endef
define Package/python-egenix-mx-base/description
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=python-evdev
-PKG_VERSION:=0.7.0
+PKG_VERSION:=1.1.2
PKG_RELEASE:=1
PKG_LICENSE:=BSD-3-Clause
PKG_MAINTAINER:=Paulo Costa <me@paulo.costa.nom.br>, Alexandru Ardelean <ardeleanalex@gmail.com>
PKG_SOURCE:=evdev-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/67/15/eac376f3e1fc1960a54439c21459b2582e68340001aff83b4ace9e5bd110
-PKG_HASH:=57edafc469a414f58b51af1bfb9ee2babb9f626dd2df530d71c1176871850aa1
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/e/evdev
+PKG_HASH:=2dd67291be20e70643e8ef6f2381efc10e0c6e44a32abb3c1db74996ea3b0351
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-evdev-$(PKG_VERSION)
include $(TOPDIR)/rules.mk
PKG_NAME:=python-gnupg
-PKG_VERSION:=0.4.1
+PKG_VERSION:=0.4.3
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/fc/f1/df6c06da34939f67ea622e0b31dbc5bdb5121b271ab530d151df59974425/
-PKG_HASH:=ef47b02eaf41dee3cf4b02ddf83130827318de9fe3eae89d01a3f05859e20e1a
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/python-gnupg
+PKG_HASH:=2d158dfc6b54927752b945ebe57e6a0c45da27747fa3b9ae66eccc0d2147ac0d
PKG_LICENSE:=GPL-3.0+
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
-PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
- URL:=https://github.com/isislovecruft/python-gnupg
+ URL:=https://gnupg.readthedocs.io/en/latest/
DEPENDS:=+gnupg
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=python-ldap
-PKG_VERSION:=2.4.32
+PKG_VERSION:=3.1.0
PKG_RELEASE:=1
PKG_MAINTAINER:=Dmitry Trefilov <the-alien@live.ru>
PKG_LICENSE:=Python-style
PKG_LICENSE_FILES:=LICENSE
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/67/d9/fa0ea70d1792875745116ad62ac8d4bcb07550b15cded591bb57df6a6d9a
-PKG_HASH:=5810f1b5a9ae9255df99fb9c2dcab7352fed325687efda56c0faae1a82c5e3cb
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/python-ldap
+PKG_HASH:=41975e79406502c092732c57ef0c2c2eb318d91e8e765f81f5d4ab6c1db727c5
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
CATEGORY:=Languages
DEPENDS:=+libopenldap +python
TITLE:=Python modules for implementing LDAP clients
- URL:=http://python-ldap.org/
+ URL:=https://python-ldap.org/
endef
define Package/python-ldap/description
+++ /dev/null
-From: Dmitrij Trefilov <the-alien@live.ru>
-
-Subject: [PATCH] lang: removed hardcoded include and library directories from setup.cfg
-Signed-off-by: Dmitrij Trefilov <the-alien@live.ru>
----
---- a/setup.cfg
-+++ b/setup.cfg
-@@ -1,6 +1,6 @@
- [_ldap]
--library_dirs = /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64
--include_dirs = /usr/include /usr/include/sasl /usr/local/include /usr/local/include/sasl
-+library_dirs =
-+include_dirs =
- defines = HAVE_SASL HAVE_TLS HAVE_LIBLDAP_R
- extra_compile_args =
- extra_objects =
include $(TOPDIR)/rules.mk
PKG_NAME:=python-lxml
-PKG_VERSION:=4.2.1
+PKG_VERSION:=4.2.5
PKG_RELEASE:=1
-PKG_SOURCE:=lxml-$(PKG_VERSION).tgz
-PKG_SOURCE_URL:=http://lxml.de/files/
-PKG_HASH:=e2629cdbcad82b83922a3488937632a4983ecc0fed3e5cfbf430d069382eeb9b
+PKG_SOURCE:=lxml-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/l/lxml
+PKG_HASH:=36720698c29e7a9626a0dc802ef8885f8f0239bfd1689628ecd459a061f2807f
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-lxml-$(PKG_VERSION)
PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
- URL:=http://lxml.de
+ URL:=https://lxml.de
DEPENDS:=+libxml2 +libxslt +libexslt
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=python-mysql
-PKG_VERSION:=1.3.12
-PKG_RELEASE:=3
+PKG_VERSION:=1.3.13
+PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0
PKG_SOURCE:=mysqlclient-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/m/mysqlclient
-PKG_HASH:=2d9ec33de39f4d9c64ad7322ede0521d85829ce36a76f9dd3d6ab76a9c8648e5
+PKG_HASH:=ff8ee1be84215e6c30a746b728c41eb0701a46ca76e343af445b35ce6250644f
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-mysql-$(PKG_VERSION)
include $(TOPDIR)/rules.mk
PKG_NAME:=python-pcapy
-PKG_VERSION:=0.11.1
+PKG_VERSION:=0.11.4
PKG_RELEASE:=1
+
+PKG_SOURCE:=pcapy-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pcapy
+PKG_HASH:=aa239913678d7ba116e66057a37f914de7726aecd11d00db470127df115c4e78
+PKG_BUILD_DIR:=$(BUILD_DIR)/pcapy-$(PKG_VERSION)
+
PKG_MAINTAINER:=Andrew McConachie <andrew@depht.com>
PKG_LICENSE:=Apache-1.1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MIRROR_HASH:=05c8d6978baa3512070ff4c041e5931384e702bbc2ac2c8063760176035958f1
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/CoreSecurity/pcapy.git
-PKG_SOURCE_VERSION:=b91a418374d1636408c435f11799ef725ef70097
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
include $(TOPDIR)/rules.mk
PKG_NAME:=python-psycopg2
-PKG_VERSION:=2.6.2
+PKG_VERSION:=2.7.5
PKG_RELEASE:=1
+
+PKG_SOURCE:=psycopg2-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/psycopg2
+PKG_HASH:=eccf962d41ca46e6326b97c8fe0a6687b58dfc1a5f6540ed071ff1474cea749e
+PKG_BUILD_DIR:=$(BUILD_DIR)/psycopg2-$(PKG_VERSION)
+
PKG_MAINTAINER:=Dmitry Trefilov <the-alien@live.ru>
PKG_LICENSE:=LGPL-3.0+
PKG_LICENSE_FILES:=LICENSE
-PKG_SOURCE:=psycopg2-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://initd.org/psycopg/tarballs/PSYCOPG-2-6/
-PKG_HASH:=70490e12ed9c5c818ecd85d185d363335cc8a8cbf7212e3c185431c79ff8c05c
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/psycopg2-$(PKG_VERSION)
PKG_BUILD_DEPENDS:=python/host
include $(INCLUDE_DIR)/package.mk
SECTION:=lang
CATEGORY:=Languages
TITLE:=PostgreSQL database adapter for Python
- URL:=http://www.initd.org/
+ URL:=http://initd.org/psycopg/
DEPENDS:=+python +libpq +python-egenix-mx-base
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=python-pyasn1-modules
-PKG_VERSION:=0.2.1
-PKG_RELEASE:=2
+PKG_VERSION:=0.2.2
+PKG_RELEASE:=1
PKG_SOURCE:=pyasn1-modules-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/ab/76/36ab0e099e6bd27ed95b70c2c86c326d3affa59b9b535c63a2f892ac9f45
-PKG_HASH:=af00ea8f2022b6287dc375b2c70f31ab5af83989fc6fe9eacd4976ce26cd7ccc
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pyasn1-modules
+PKG_HASH:=a0cf3e1842e7c60fde97cb22d275eb6f9524f5c5250489e292529de841417547
PKG_LICENSE:=BSD-2-Clause
PKG_LICENSE_FILES:=LICENSE.txt
include $(TOPDIR)/rules.mk
PKG_NAME:=python-pyasn1
-PKG_VERSION:=0.4.3
+PKG_VERSION:=0.4.4
PKG_RELEASE:=1
PKG_SOURCE:=pyasn1-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pyasn1
-PKG_HASH:=fb81622d8f3509f0026b0683fe90fea27be7284d3826a5f2edf97f69151ab0fc
+PKG_HASH:=f58f2a3d12fd754aa123e9fa74fb7345333000a035f3921dbdaa08597aa53137
PKG_LICENSE:=BSD-2-Clause
PKG_LICENSE_FILES:=LICENSE.txt
include $(TOPDIR)/rules.mk
PKG_NAME:=python-requests
-PKG_VERSION:=2.19.1
+PKG_VERSION:=2.20.0
PKG_RELEASE:=1
PKG_LICENSE:=Apache-2.0
PKG_SOURCE:=requests-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/54/1f/782a5734931ddf2e1494e4cd615a51ff98e1879cbe9eecbdfeaf09aa75e9
-PKG_HASH:=ec22d826a36ed72a7358ff3fe56cbd4ba69dd7a6718ffd450ff0e9df7a47ce6a
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/r/requests
+PKG_HASH:=99dcfdaaeb17caf6e526f32b6a7b780461512ab3f1d992187801694cba42770c
PKG_BUILD_DIR:=$(BUILD_DIR)/requests-$(PKG_VERSION)
+PKG_CPE_ID:=cpe:/a:python-requests:requests
+
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
include $(TOPDIR)/rules.mk
PKG_NAME:=python-urllib3
-PKG_VERSION:=1.22
+PKG_VERSION:=1.24
PKG_RELEASE:=1
PKG_LICENSE:=MIT
PKG_SOURCE:=urllib3-$(PKG_VERSION).tar.gz
-PKG_BUILD_DIR:=$(BUILD_DIR)/urllib3-$(PKG_VERSION)/
-PKG_SOURCE_URL:=https://pypi.python.org/packages/ee/11/7c59620aceedcc1ef65e156cc5ce5a24ef87be4107c2b74458464e437a5d/
-PKG_HASH:=cc44da8e1145637334317feebd728bd869a35285b93cbb4cca2577da7e62db4f
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/u/urllib3
+PKG_HASH:=41c3db2fc01e5b907288010dec72f9d0a74e37d6994e6eb56849f59fea2265ae
+PKG_BUILD_DIR:=$(BUILD_DIR)/urllib3-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
include $(TOPDIR)/rules.mk
PKG_NAME:=PyYAML
-PKG_VERSION:=3.12
+PKG_VERSION:=3.13
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://pyyaml.org/download/pyyaml/
-PKG_HASH:=592766c6303207a20efc445587778322d7f73b161bd994f227adaa341ba212ab
+PKG_SOURCE_URL:=https://pypi.python.org/packages/source/P/PyYAML
+PKG_HASH:=3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=COPYING
SUBMENU:=Python
SECTION:=lang
CATEGORY:=Languages
- URL:=http://pyyaml.org/wiki/PyYAML
+ URL:=https://pyyaml.org/wiki/PyYAML
DEPENDS:=+libyaml
endef
endef
HOST_LDFLAGS += \
- $$$$(pkg-config --static --libs libcrypto libssl)
+ $$$$(pkg-config --static --libs libcrypto libssl) -Wl$(comma)-rpath=$(STAGING_DIR_HOSTPKG)/lib
ifeq ($(HOST_OS),Linux)
HOST_LDFLAGS += \
# Note: keep in sync with setuptools & pip
PYTHON3_VERSION_MAJOR:=3
PYTHON3_VERSION_MINOR:=7
-PYTHON3_VERSION_MICRO:=0
+PYTHON3_VERSION_MICRO:=1
PYTHON3_VERSION:=$(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR)
PYTHON_VERSION_MICRO:=$(PYTHON3_VERSION_MICRO)
PKG_NAME:=python3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION)
-PKG_HASH:=0382996d1ee6aafe59763426cf0139ffebe36984474d0ec4126dd1c40a8b3549
+PKG_HASH:=fa7e2b8e8c9402f192ad56dc4f814089d1c4466c97d780f5e5acc02c04243d6d
PKG_LICENSE:=PSF
PKG_LICENSE_FILES:=LICENSE Modules/_ctypes/libffi_msvc/LICENSE Modules/_ctypes/darwin/LICENSE Modules/_ctypes/libffi/LICENSE Modules/_ctypes/libffi_osx/LICENSE Tools/pybench/LICENSE
endef
HOST_LDFLAGS += \
- $$$$(pkg-config --static --libs libcrypto libssl)
+ $$$$(pkg-config --static --libs libcrypto libssl) -Wl$(comma)-rpath=$(STAGING_DIR_HOSTPKG)/lib
ifeq ($(HOST_OS),Linux)
HOST_LDFLAGS += \
include $(TOPDIR)/rules.mk
PKG_NAME:=pytz
-PKG_VERSION:=2018.3
+PKG_VERSION:=2018.6
PKG_RELEASE:=1
PKG_LICENSE:=MIT
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/1b/50/4cdc62fc0753595fc16c8f722a89740f487c6e5670c644eb8983946777be/
-PKG_HASH:=410bcd1d6409026fbaa65d9ed33bf6dd8b1e94a499e32168acfc7b332e4095c0
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pytz
+PKG_HASH:=642253af8eae734d1509fc6ac9c1aee5e5b69d76392660889979b9870610a46b
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
$(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
endef
+define Package/pytz/InstallDev
+ $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
+ $(CP) \
+ $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
+ $(1)$(PYTHON_PKG_DIR)
+endef
+
define Package/pytz/install
$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
$(CP) \
PKG_NAME:=rcssmin
PKG_VERSION:=1.0.6
-PKG_RELEASE=1
+PKG_RELEASE=2
PKG_LICENSE:=Apache-2.0
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/ndparker/rcssmin.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=4764e3bc47ca8d44be3198892e73c51d8a0a9970
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=a52728cc5653bf3c2a2f92954c6001338442a6e589bd364c497ba615c4365211
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/r/rcssmin
+PKG_HASH:=ca87b695d3d7864157773a61263e5abb96006e9ff0e021eff90cbe0e1ba18270
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
include $(TOPDIR)/rules.mk
PKG_NAME:=simplejson
-PKG_VERSION:=3.11.1
+PKG_VERSION:=3.16.0
PKG_RELEASE:=1
PKG_LICENSE:=MIT
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/08/48/c97b668d6da7d7bebe7ea1817a6f76394b0ec959cb04214ca833c34359df/
-PKG_HASH:=01a22d49ddd9a168b136f26cac87d9a335660ce07aa5c630b8e3607d6f4325e7
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/s/simplejson
+PKG_HASH:=b1f329139ba647a9548aa05fb95d046b4a677643070dc2afc05fa2e975d09ca5
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
CATEGORY:=Languages
MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
TITLE:=Simple, fast, extensible JSON encoder/decoder for Python
- URL:=http://simplejson.readthedocs.org/
+ URL:=https://simplejson.readthedocs.org/
DEPENDS:=+python
endef
PKG_NAME:=twisted
PKG_VERSION:=18.4.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=Twisted-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/T/Twisted
PKG_HASH:=a4cc164a781859c74de47f17f0e85f4bce8a3321a9d0892c015c8f80c4158ad9
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-twisted-$(PKG_VERSION)
-PKG_BUILD_DEPENDS:=USE_MUSL:librpc
+PKG_BUILD_DEPENDS:=libtirpc
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
include $(TOPDIR)/rules.mk
PKG_NAME:=ruby
-PKG_VERSION:=2.5.1
+PKG_VERSION:=2.5.3
PKG_RELEASE:=1
# First two numbes
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://cache.ruby-lang.org/pub/ruby/$(PKG_ABI_VERSION)/
-PKG_HASH:=886ac5eed41e3b5fc699be837b0087a6a5a3d10f464087560d2d21b3e71b754d
+PKG_HASH:=1cc9d0359a8ea35fc6111ec830d12e60168f3b9b305a3c2578357d360fcf306f
PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
PKG_LICENSE:=BSD-2-Clause
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:ruby-lang:ruby
PKG_BUILD_DEPENDS:=ruby/host
PKG_INSTALL:=1
#
-# Copyright (C) 2006-2015 OpenWrt.org
+# Copyright (C) 2006-2018 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=tcl
-PKG_VERSION:=8.6.4
+TCL_MAJOR_VERSION:=8.6
+PKG_VERSION:=${TCL_MAJOR_VERSION}.8
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)$(PKG_VERSION)-src.tar.gz
PKG_SOURCE_URL:=@SF/$(PKG_NAME)
-PKG_HASH:=9e6ed94c981c1d0c5f5fefb8112d06c6bf4d050a7327e95e71d417c416519c8d
-
+PKG_HASH:=c43cb0c1518ce42b00e7c8f6eaddd5195c53a98f94adc717234a65cbcfd3f96a
PKG_LICENSE:=TCL
PKG_LICENSE_FILES:=license.terms
PKG_MAINTAINER:=Joe Mistachkin <joe@mistachkin.com>
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)$(PKG_VERSION)
+HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)$(PKG_VERSION)
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
+include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk
define Package/tcl
SUBMENU:=Tcl
SECTION:=lang
CATEGORY:=Languages
- DEPENDS:=+libpthread @BROKEN
+ DEPENDS:=+libpthread +zlib
TITLE:=The Tcl language
URL:=http://www.tcl.tk/
endef
MAKE_PATH := unix
+define Build/Prepare
+ $(call Build/Prepare/Default)
+ rm -rf $(PKG_BUILD_DIR)/pkgs/*
+endef
+
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libtcl*.{a,so*} $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/tclConfig.sh $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/tclooConfig.sh $(1)/usr/lib/
+
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/tcl.pc \
+ $(1)/usr/lib/pkgconfig
endef
define Package/tcl/install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
+
+ $(CP) -a $(PKG_INSTALL_DIR)/usr/lib/tcl8 $(1)/usr/lib/
+ $(CP) -a $(PKG_INSTALL_DIR)/usr/lib/tcl$(TCL_MAJOR_VERSION) $(1)/usr/lib/
+ $(LN) tclsh$(TCL_MAJOR_VERSION) $(1)/usr/bin/tclsh
+endef
+
+define Host/Configure
+ $(call Host/Configure/Default,$(1),$(2),$(CONFIGURE_PATH)/$(3))
+endef
+
+define Host/Compile
+ +$(HOST_MAKE_VARS) \
+ $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/$(MAKE_PATH) \
+ $(HOST_MAKE_FLAGS) \
+ $(1)
+endef
+
+define Host/Install
+ $(call Host/Compile,install)
+ (cd $(HOST_BUILD_PREFIX)/bin; test -f tclsh || ln -s tclsh$(TCL_MAJOR_VERSION) tclsh)
endef
+$(eval $(call HostBuild))
$(eval $(call BuildPackage,tcl))
+++ /dev/null
---- a/unix/Makefile.in
-+++ b/unix/Makefile.in
-@@ -817,15 +817,15 @@ install-tzdata: tclsh
- @echo "Installing time zone data"
- @@LD_LIBRARY_PATH_VAR@="`pwd`:$${@LD_LIBRARY_PATH_VAR@}"; export @LD_LIBRARY_PATH_VAR@; \
- TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \
-- ./tclsh $(TOOL_DIR)/installData.tcl \
-- $(TOP_DIR)/library/tzdata "$(SCRIPT_INSTALL_DIR)"/tzdata
-+ #./tclsh $(TOOL_DIR)/installData.tcl \
-+ # $(TOP_DIR)/library/tzdata "$(SCRIPT_INSTALL_DIR)"/tzdata
-
- install-msgs: tclsh
- @echo "Installing message catalogs"
- @@LD_LIBRARY_PATH_VAR@="`pwd`:$${@LD_LIBRARY_PATH_VAR@}"; export @LD_LIBRARY_PATH_VAR@; \
- TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \
-- ./tclsh $(TOOL_DIR)/installData.tcl \
-- $(TOP_DIR)/library/msgs "$(SCRIPT_INSTALL_DIR)"/msgs
-+ #./tclsh $(TOOL_DIR)/installData.tcl \
-+ # $(TOP_DIR)/library/msgs "$(SCRIPT_INSTALL_DIR)"/msgs
-
- install-doc: doc
- @for i in "$(MAN_INSTALL_DIR)" "$(MAN1_INSTALL_DIR)" "$(MAN3_INSTALL_DIR)" "$(MANN_INSTALL_DIR)" ; \
+++ /dev/null
---- a/generic/tclStrToD.c
-+++ b/generic/tclStrToD.c
-@@ -73,7 +73,7 @@ typedef unsigned int fpu_control_t __att
- * MIPS floating-point units need special settings in control registers
- * to use gradual underflow as we expect.
- */
--#if defined(__mips)
-+#if defined(__sgi) && defined(_COMPILER_VERSION)
- #include <sys/fpu.h>
- #endif
- /*
-@@ -2166,7 +2166,7 @@ TclInitDoubleConversion(void)
- } bitwhack;
- #endif
-
--#if defined(__mips)
-+#if defined(__sgi) && defined(_COMPILER_VERSION)
- union fpc_csr mipsCR;
-
- mipsCR.fc_word = get_fpc_csr();
include $(TOPDIR)/rules.mk
PKG_NAME:=vala
-PKG_VERSION:=0.34.5
+PKG_VERSION:=0.34.18
PKG_RELEASE:=1
PKG_LICENSE:=LGPL-2.1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=@GNOME/vala/0.34/
-PKG_HASH:=3fd4ba371778bc87da42827b8d23f1f42b0629759a9a1c40c9683dfb7e73fae5
+PKG_SOURCE_URL:=@GNOME/vala/0.34
+PKG_HASH:=b89044c6eb70556ca2486812a42983944b4f6ef18db66b5af1a9006de11b1cd2
PKG_BUILD_DEPENDS:=glib2 glib2/host vala/host
HOST_BUILD_DEPENDS:=glib2/host
include $(TOPDIR)/rules.mk
PKG_NAME:=alsa-lib
-PKG_VERSION:=1.1.6
+PKG_VERSION:=1.1.7
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/lib/ \
http://distfiles.gentoo.org/distfiles/
-PKG_HASH:=5f2cd274b272cae0d0d111e8a9e363f08783329157e8dd68b3de0c096de6d724
+PKG_HASH:=9d6000b882a3b2df56300521225d69717be6741b71269e488bb20a20783bdc09
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>, \
Peter Wagner <tripolar@gmx.at>
include $(TOPDIR)/rules.mk
PKG_NAME:=apr
-PKG_VERSION:=1.6.3
+PKG_VERSION:=1.6.5
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@APACHE/apr/
-PKG_HASH:=131f06d16d7aabd097fa992a33eec2b6af3962f93e6d570a9bd4d85e95993172
+PKG_HASH:=a67ca9fcf9c4ff59bce7f428a323c8b5e18667fdea7b0ebad47d194371b0a105
PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
PKG_LICENSE:=Apache License
PKG_SOURCE_URL:=https://github.com/lathiat/avahi/releases/download/v$(PKG_VERSION) \
https://avahi.org/download
PKG_HASH:=57a99b5dfe7fdae794e3d1ee7a62973a368e91e414bd0dfa5d84434de5b14804
+
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
+PKG_CPE_ID:=cpe:/a:avahi:avahi
PKG_BUILD_DEPENDS:=intltool/host
-
PKG_FIXUP:=autoreconf
PKG_REMOVE_FILES:=autogen.sh
#
-# Copyright (C) 2015-2018 OpenWrt.org
-#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# Dude, this "boost" is really one of the most crude stuff I ported yet.
#
-
include $(TOPDIR)/rules.mk
-include $(INCLUDE_DIR)/nls.mk
-include $(INCLUDE_DIR)/target.mk
PKG_NAME:=boost
-PKG_VERSION:=1.67.0
-PKG_SOURCE_VERSION:=1_67_0
-PKG_RELEASE:=2
+PKG_VERSION:=1.68.0
+PKG_SOURCE_VERSION:=1_68_0
+PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)_$(PKG_SOURCE_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/$(PKG_NAME)/$(PKG_NAME)/$(PKG_VERSION) https://dl.bintray.com/boostorg/release/$(PKG_VERSION)/source/
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_SOURCE_VERSION)
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)_$(PKG_SOURCE_VERSION)
-PKG_HASH:=2684c972994ee57fc5632e03bf044746f6eb45d4920c343937a465fd67a5adba
+PKG_HASH:=7f6130bc3cf65f56a618888ce9d5ea704fa10b462be126ad053e80e553d6d8b7
PKG_LICENSE:=Boost Software License <http://www.boost.org/users/license.html>
PKG_MAINTAINER:=Carlos M. Ferreira <carlosmf.pt@gmail.com>
-PKG_BUILD_PARALLEL:=0
+PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
include $(INCLUDE_DIR)/package.mk
-include $(INCLUDE_DIR)/host-build.mk
-
+include $(INCLUDE_DIR)/nls.mk
define Package/boost/Default
SECTION:=libs
endef
define Package/boost/description
-This package provides the Boost v1.67.0 libraries.
+This package provides the Boost v1.68.0 libraries.
Boost is a set of free, peer-reviewed, portable C++ source libraries.
-----------------------------------------------------------------------------
- chrono
- container
- context
- - contract (new in 1.67.0)
+ - contract
- coroutine (Deprecated - use Coroutine2)
- - coroutine2 (Requires GCC v5 and up)
- date_time
PKG_BUILD_DEPENDS:=boost/host PACKAGE_python:python PACKAGE_python3:python3
+include ../../lang/python/python-version.mk
+BOOST_PYTHON_VER=$(PYTHON_VERSION)
+
+include ../../lang/python/python3-version.mk
+BOOST_PYTHON3_VER=$(PYTHON3_VERSION)
+
BOOST_LIBS =
define Package/boost-libs
select boost-coroutine2
select boost-graph-parallel
+ # Invisible config dependency
+ config boost-fiber-exclude
+ bool
+ default y if (CPU_TYPE=mips32 || CPU_TYPE=mips64)
+
config boost-test-pkg
bool "Boost test package."
default m if ALL
$(foreach lib,$(BOOST_LIBS), \
config PACKAGE_boost-$(lib)
- prompt "Boost $(lib) library."
+ prompt "Boost $(lib) $(if $(findstring python,$(lib)),$(paren_left)v$(if $(findstring 3,$(lib)),$(BOOST_PYTHON3_VER),$(BOOST_PYTHON_VER))$(paren_right) ,)library."
default m if ALL
$(if $(findstring locale,$(lib)),depends on BUILD_NLS,)\
- $(if $(findstring python,$(lib)),depends on PACKAGE_$(lib),)
-
+ $(if $(findstring python,$(lib)),depends on PACKAGE_$(lib),)\
+ $(if $(findstring fiber,$(lib)),depends on (CPU_TYPE!=mips32 && CPU_TYPE!=mips64),)
)
endmenu
$(eval $(call DefineBoostLibrary,coroutine,system chrono context thread,))
$(eval $(call DefineBoostLibrary,date_time,,))
#$(eval $(call DefineBoostLibrary,exception,,))
-$(eval $(call DefineBoostLibrary,fiber,coroutine filesystem,,))
+$(eval $(call DefineBoostLibrary,fiber,coroutine filesystem,,!boost-fiber-exclude))
$(eval $(call DefineBoostLibrary,filesystem,system,))
$(eval $(call DefineBoostLibrary,graph,regex,))
$(eval $(call DefineBoostLibrary,iostreams,,+zlib +liblzma +libbz2))
$(eval $(call DefineBoostLibrary,type_erasure,chrono system thread,))
$(eval $(call DefineBoostLibrary,wave,date_time thread filesystem,))
+include $(INCLUDE_DIR)/host-build.mk
define Host/Compile
# b2 does not provide a configure-script nor a Makefile
TARGET_LDFLAGS += -pthread -lrt
TARGET_CFLAGS += \
- $(if $(CONFIG_PACKAGE_boost-python), -I$(STAGING_DIR)/usr/include/python2.7/) \
- $(if $(CONFIG_PACKAGE_boost-python3), -I$(STAGING_DIR)/usr/include/python3.6/) \
$(if $(CONFIG_SOFT_FLOAT),-DBOOST_NO_FENV_H) -fPIC
EXTRA_CXXFLAGS += $(if $(CONFIG_GCC_VERSION_4_8),-std=gnu++11,-std=gnu++14)
comma := ,
define Build/Compile
- $(info Selected Boost API $(BOOST_ABI) for architecture $(ARCH) and cpu $(CPU_TYPE) $(CPU_SUBTYPE))
+ $(info Selected Boost API $(BOOST_ABI) for architecture $(ARCH) and cpu $(CONFIG_CPU_TYPE) $(if $(CONFIG_CPU_SUBTYPE),and cpu subtype $(CONFIG_CPU_SUBTYPE),))
( cd $(PKG_BUILD_DIR) ; \
- echo "using gcc : $(ARCH) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS)\" <cxxflags>\"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > tools/build/src/user-config.jam ; \
- $(if $(CONFIG_PACKAGE_boost-python3), \
- echo "using python : 3.6 : : $(STAGING_DIR)/usr/include/python3.6/ : $(STAGING_DIR)/usr/lib/libpython3.6.so ;" >> \
- tools/build/src/user-config.jam; \
- ) \
- $(if $(CONFIG_PACKAGE_boost-python), \
- echo "using python : 2.7 : : $(STAGING_DIR)/usr/include/python2.7/ : $(STAGING_DIR)/usr/lib/libpython2.7.so ;" >> \
- tools/build/src/user-config.jam; \
- ) \
+ echo "using gcc : $(ARCH) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS)\" <cxxflags>\"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > \
+ tools/build/src/user-config.jam ; \
b2 \
$(CONFIGURE_ARGS) \
--ignore-site-config \
--without-mpi \
$(if $(CONFIG_boost-graph-parallel),,--without-graph_parallel) \
$(if $(CONFIG_PACKAGE_boost-test),,--without-test) \
+ --without-python \
$(foreach lib,$(BOOST_LIBS), \
- $(if $(findstring python,$(lib)), \
- $(if $(CONFIG_PACKAGE_boost-python),python=2.7,--without-python), \
- $(if $(CONFIG_PACKAGE_boost-$(lib)),, \
- $(if $(findstring $(lib),wserialization),,--without-$(lib)) \
- ) \
+ $(if $(findstring python,$(lib)),, \
+ $(if $(CONFIG_PACKAGE_boost-$(lib)),, \
+ $(if $(findstring wserialization,$(lib)),,--without-$(lib)) \
) \
+ ) \
) \
$(if $(CONFIG_PACKAGE_boost-locale),boost.locale.iconv=on -sICONV_PATH=$(ICONV_PREFIX) boost.locale.posix=$(if $(USE_MUSL),on,off), \
boost.locale.iconv=off) \
$(if $(CONFIG_PACKAGE_boost-iostreams),-sNO_BZIP2=1 -sZLIB_INCLUDE=$(STAGING_DIR)/usr/include \
-sZLIB_LIBPATH=$(STAGING_DIR)/usr/lib) \
install ;\
+ $(if $(CONFIG_PACKAGE_boost-python), \
+ echo "using gcc : $(ARCH) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/python$(BOOST_PYTHON_VER)/ \" <cxxflags>\"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > \
+ tools/build/src/user-config.jam ; \
+ echo "using python : $(BOOST_PYTHON_VER) : : $(STAGING_DIR)/usr/include/python$(BOOST_PYTHON_VER)/ : $(STAGING_DIR)/usr/lib/libpython$(BOOST_PYTHON_VER).so ;" >> \
+ tools/build/src/user-config.jam; \
+ b2 -a \
+ $(CONFIGURE_ARGS) \
+ --ignore-site-config \
+ --toolset=gcc-$(ARCH) abi=$(BOOST_ABI) \
+ --disable-long-double \
+ $(if $(CONFIG_boost-variant-release), variant=release,) \
+ $(if $(CONFIG_boost-variant-debug), variant=debug,) \
+ $(if $(CONFIG_boost-variant-profile), variant=profile,) \
+ $(if $(CONFIG_boost-use-name-tags),--layout=tagged,--layout=system) \
+ $(if $(CONFIG_boost-build-type-complete),--build-type=complete,--build-type=minimal) \
+ $(if $(CONFIG_boost-shared-libs),link=shared,) \
+ $(if $(CONFIG_boost-static-libs),link=static,) \
+ $(if $(CONFIG_boost-static-and-shared-libs),link=static$(comma)shared,) \
+ $(if $(CONFIG_boost-runtime-shared),runtime-link=shared,) \
+ $(if $(CONFIG_boost-runtime-static),runtime-link=static,) \
+ $(if $(CONFIG_boost-runtime-static-and-shared),runtime-link=shared$(comma)static,) \
+ $(if $(CONFIG_boost-single-thread),threading=single,) \
+ threading=multi \
+ --with-python \
+ install ;\
+ ,) \
$(if $(CONFIG_PACKAGE_boost-python3), \
- b2 \
+ echo "using gcc : $(ARCH) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/python$(BOOST_PYTHON3_VER)/ \" <cxxflags>\"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > \
+ tools/build/src/user-config.jam ; \
+ echo "using python : $(BOOST_PYTHON3_VER) : : $(STAGING_DIR)/usr/include/python$(BOOST_PYTHON3_VER)/ : $(STAGING_DIR)/usr/lib/libpython$(BOOST_PYTHON3_VER).so ;" >> \
+ tools/build/src/user-config.jam; \
+ b2 -a \
$(CONFIGURE_ARGS) \
--ignore-site-config \
--toolset=gcc-$(ARCH) abi=$(BOOST_ABI) \
$(if $(CONFIG_boost-runtime-static-and-shared),runtime-link=shared$(comma)static,) \
$(if $(CONFIG_boost-single-thread),threading=single,) \
threading=multi \
- $(foreach lib,$(BOOST_LIBS), \
- $(if $(findstring python,$(lib)), \
- $(if $(CONFIG_PACKAGE_boost-python3),python=3.6,), \
- ) \
- ) \
+ --with-python \
install ;\
,) \
)
# copies _all_ header files - independent of <--with-library>-argument above
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) -v $(PKG_INSTALL_DIR)/lib/*.a $(1)/usr/lib/ # copies all compiled archive files
- $(FIND) $(PKG_INSTALL_DIR)/lib/ -name '*.so*' -exec $(CP) {} $(1)/usr/lib/ \; # copies all the shared objects files
+ # copies all compiled archive and shared object files
+ $(CP) -v $(PKG_INSTALL_DIR)/lib/*.{a,so*} $(1)/usr/lib/
endef
define Host/Install
- $(INSTALL_DIR) \
- $(STAGING_DIR_HOSTPKG)/bin
-
- $(CP) \
- $(HOST_BUILD_DIR)/tools/build/src/engine/bin.*/b2 \
- $(STAGING_DIR_HOSTPKG)/bin/
+ $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin
+ $(CP) $(HOST_BUILD_DIR)/tools/build/src/engine/bin.*/b2 $(STAGING_DIR_HOSTPKG)/bin/
endef
define Package/boost/Default/install
- $(INSTALL_DIR) \
- $(1)/usr/lib
-
- $(FIND) \
- $(PKG_INSTALL_DIR)/lib/ -name 'libboost_$(2).so*' -exec $(CP) {} $(1)/usr/lib/ \;
- $(FIND) \
- $(PKG_INSTALL_DIR)/lib/ -name 'libboost_$(2)_*.so*' -exec $(CP) {} $(1)/usr/lib/ \;
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(if $(findstring python,$(2)), $(if $(findstring 3,$(2)), \
+ $(CP) $(PKG_INSTALL_DIR)/lib/libboost_python3*.so* $(1)/usr/lib/ , \
+ $(CP) $(PKG_INSTALL_DIR)/lib/libboost_python2*.so* $(1)/usr/lib/ ), \
+ $(CP) $(PKG_INSTALL_DIR)/lib/libboost_$(2)*.so* $(1)/usr/lib/ )
endef
define Package/boost-test/install
- $(INSTALL_DIR) \
- $(1)/usr/lib
-
- $(FIND) \
- $(PKG_INSTALL_DIR)/lib/ -name 'libboost_unit_test_framework*.so*' -exec $(CP) {} $(1)/usr/lib/ \;
-
- $(FIND) \
- $(PKG_INSTALL_DIR)/lib/ -name 'libboost_prg_exec_monitor*.so*' -exec $(CP) {} $(1)/usr/lib/ \;
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/lib/libboost_unit_test_framework*.so* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/lib/libboost_prg_exec_monitor*.so* $(1)/usr/lib/
endef
define BuildBoostLibrary
include $(TOPDIR)/rules.mk
PKG_NAME:=c-ares
-PKG_VERSION:=1.14.0
-PKG_RELEASE:=1
+PKG_VERSION:=1.15.0
+PKG_RELEASE:=4
PKG_LICENSE:=MIT
+PKG_CPE_ID:=cpe:/a:c-ares_project:c-ares
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://c-ares.haxx.se/download
-PKG_HASH:=45d3c1fd29263ceec2afc8ff9cd06d5f8f889636eb4e80ce3cc7f0eaf7aadc6e
+PKG_HASH:=6cdb97871f2930530c97deb7cf5c8fa4be5a0b02c7cea6e7c7667672a39d6852
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_NAME:=classpath
PKG_VERSION:=0.99
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=Dana H. Myers <k6jq@comcast.net>
--- /dev/null
+--- a/native/jni/java-math/gnu_java_math_GMP.c
++++ b/native/jni/java-math/gnu_java_math_GMP.c
+@@ -1132,6 +1132,7 @@
+ break;
+ case 1:
+ res = mpz_popcount (_this);
++ __attribute__((fallthrough));
+ default:
+ JCL_ThrowException (env, "java/lang/Error",
+ "Unexpected sign value for a native MPI");
include $(TOPDIR)/rules.mk
PKG_NAME:=confuse
-PKG_VERSION:=3.2.1
+PKG_VERSION:=3.2.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/martinh/libconfuse/releases/download/v$(PKG_VERSION)
-PKG_HASH:=23c63272baf2ef4e2cbbafad2cf57de7eb81f006ec347c00b954819824add25e
+PKG_HASH:=a9240b653d02e8cfc52db48e8c4224426e528e1faa09b65e8ca08a197fad210b
PKG_MAINTAINER:=
PKG_LICENSE:=ISC
-PKG_FIXUP:=autoreconf
-
include $(INCLUDE_DIR)/package.mk
define Package/confuse
PKG_NAME:=cyrus-sasl
PKG_VERSION_BASE:=2.1.27
-PKG_VERSION:=$(PKG_VERSION_BASE)-rc7
-PKG_RELEASE:=1
+PKG_VERSION:=$(PKG_VERSION_BASE)-rc8
+PKG_RELEASE:=2
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.cyrusimap.org/releases/
-PKG_HASH:=c1846b80e80286c94941a1e27974bba759b171ccad25d5b49bd8d9deab10f54b
+PKG_HASH:=8d95201b4f2c2ec4c0ebafd01c00d7d1e0f2513352b3f850ae2723a90c6c6789
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION_BASE)
PKG_LICENSE:=BSD-4c BSD
PKG_LICENSE_FILES:=COPYING cmulocal/COPYING saslauthd/COPYING
+PKG_CPE_ID:=cpe:/a:cmu:cyrus-sasl
PKG_FIXUP:=autoreconf
PKG_MACRO_PATHS:=cmulocal config ../cmulocal ../config
--- /dev/null
+From d2a7592b9884049d3da384c5c37f77629ce9ac56 Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Tue, 6 Nov 2018 18:58:30 -0800
+Subject: [PATCH] openssl: Fix compilation without deprecated APIs
+
+bn.h was missing. Including engine.h does not work if OpenSSL was built
+without it. cyrus-sasl makes no use of it anyway.
+---
+ common/crypto-compat.c | 1 -
+ common/crypto-compat.h | 1 +
+ 2 files changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/common/crypto-compat.c b/common/crypto-compat.c
+index f4717b6..8195879 100644
+--- a/common/crypto-compat.c
++++ b/common/crypto-compat.c
+@@ -12,7 +12,6 @@
+ #if defined(HAVE_OPENSSL) && (OPENSSL_VERSION_NUMBER < 0x10100000L)
+
+ #include <string.h>
+-#include <openssl/engine.h>
+
+ static void *OPENSSL_zalloc(size_t num)
+ {
+diff --git a/common/crypto-compat.h b/common/crypto-compat.h
+index 73424ad..d3ffdca 100644
+--- a/common/crypto-compat.h
++++ b/common/crypto-compat.h
+@@ -15,6 +15,7 @@
+ #include <openssl/dh.h>
+ #include <openssl/evp.h>
+ #include <openssl/hmac.h>
++#include <openssl/bn.h>
+
+ int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d);
+ int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q);
+--
+2.19.1
+
include $(TOPDIR)/rules.mk
PKG_NAME:=expat
-PKG_VERSION:=2.2.5
+PKG_VERSION:=2.2.6
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/expat
-PKG_HASH:=d9dc32efba7e74f788fcc4f212a43216fc37cf5f23f4c2339664d473353aedf6
+PKG_HASH:=17b43c2716d521369f82fc2dc70f359860e90fa440bea65b3b85f0b246ea81f2
PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>, \
Ted Hess <thess@kitschensync.net>
CONFIGURE_ARGS += \
--enable-shared \
- --enable-static
+ --enable-static \
+ --without-docbook
+
+HOST_CONFIGURE_ARGS += \
+ --without-docbook
define Host/Install
$(MAKE) -C $(HOST_BUILD_DIR) install
define Package/fftw3
SECTION:=libs
CATEGORY:=Libraries
- DEPENDS:=@!avr32 +libpthread
+ DEPENDS:=+libpthread
VARIANT:=double
TITLE:=Fast Fourier transform library
URL:=http://www.fftw.org/
include $(TOPDIR)/rules.mk
PKG_NAME:=file
-PKG_VERSION:=5.33
-PKG_RELEASE:=2
+PKG_VERSION:=5.35
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://sources.lede-project.org/ \
- http://pkgs.fedoraproject.org/lookaside/pkgs/file/ \
+PKG_SOURCE_URL:=https://src.fedoraproject.org/lookaside/pkgs/file/ \
http://download.openpkg.org/components/cache/file/ \
ftp://ftp.astron.com/pub/file/
-PKG_HASH:=1c52c8c3d271cd898d5511c36a68059cda94036111ab293f01f83c3525b737c6
+PKG_HASH:=30c45e817440779be7aac523a905b123cba2a6ed0bf4f5439e1e99ba940b5546
PKG_LICENSE:=BSD-2c
PKG_LICENSE_FILES:=COPYING
-PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
define Package/file/Default
TITLE:=File type determination
- URL:=ftp://ftp.astron.com/pub/file/
+ URL:=https://darwinsys.com/file/
MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
endef
PKG_NAME:=flac
PKG_VERSION:=1.3.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=http://downloads.xiph.org/releases/flac/
+PKG_SOURCE_URL:=https://downloads.xiph.org/releases/flac/
PKG_HASH:=91cfc3ed61dc40f47f050a109b08610667d73477af6ef36dcad31c31a4a8d53f
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
PKG_LICENSE:=GFDL-1.2 GPL-2 LGPL-2.1 BSD-3-Clause
PKG_LICENSE_FILES:=README COPYING.FDL COPYING.GPL COPYING.LGPL COPYING.Xiph
+PKG_CPE_ID:=cpe:/a:flac_project:flac
PKG_FIXUP:=autoreconf
PKG_REMOVE_FILES:=autogen.sh aclocal.m4
--- /dev/null
+From 4f47b63e9c971e6391590caf00a0f2a5ed612e67 Mon Sep 17 00:00:00 2001
+From: Erik de Castro Lopo <erikd@mega-nerd.com>
+Date: Sat, 8 Apr 2017 18:34:49 +1000
+Subject: [PATCH] stream_decoder.c: Fix a memory leak
+
+Leak reported by Secunia Research.
+---
+ src/libFLAC/stream_decoder.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/libFLAC/stream_decoder.c b/src/libFLAC/stream_decoder.c
+index 14d5fe7f..a5527511 100644
+--- a/src/libFLAC/stream_decoder.c
++++ b/src/libFLAC/stream_decoder.c
+@@ -1759,6 +1759,9 @@ FLAC__bool read_metadata_vorbiscomment_(FLAC__StreamDecoder *decoder, FLAC__Stre
+ }
+ memset (obj->comments[i].entry, 0, obj->comments[i].length) ;
+ if (!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, obj->comments[i].entry, obj->comments[i].length)) {
++ /* Current i-th entry is bad, so we delete it. */
++ free (obj->comments[i].entry) ;
++ obj->comments[i].entry = NULL ;
+ obj->num_comments = i;
+ goto skip;
+ }
+--
+2.17.0
+
PKG_LICENSE:=FTL GPL-2.0 MIT ZLIB
PKG_LICENSE_FILES:=docs/LICENSE.TXT docs/FTL.TXT docs/GPLv2.TXT src/bdf/README src/pcf/README src/gzip/zlib.h
+PKG_CPE_ID:=cpe:/a:freetype:freetype2
PKG_MAINTAINER:=Val Kulkov <val.kulkov@gmail.com>
PKG_FIXUP:=autoreconf
PKG_NAME:=getdns
PKG_VERSION:=1.4.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
$(if $(CONFIG_GETDNS_ENABLE_IDN_LIBIDN2), , --without-libidn2 ) \
--with-ssl="$(STAGING_DIR)/usr" \
+# This will make 'configure' think that our libbsd.so is missing the
+# functions inet_pton, inet_ntop, strlcpy and use the builtin. This
+# removes the libbsd dependency
+CONFIGURE_VARS += LIBBSD_LIBS=-lc
+
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/getdns/
$(CP) $(PKG_INSTALL_DIR)/usr/include/getdns/getdns*.h $(1)/usr/include/getdns/
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:giflib_project:giflib
PKG_FIXUP:=autoreconf
PKG_REMOVE_FILES:=autogen.sh aclocal.m4
include $(TOPDIR)/rules.mk
PKG_NAME:=glib2
-PKG_VERSION:=2.56.1
-PKG_RELEASE:=1
+PKG_VERSION:=2.58.1
+PKG_RELEASE:=2
PKG_SOURCE:=glib-$(PKG_VERSION).tar.xz
PKG_BUILD_DIR:=$(BUILD_DIR)/glib-$(PKG_VERSION)
-PKG_SOURCE_URL:=@GNOME/glib/2.56
-PKG_HASH:=40ef3f44f2c651c7a31aedee44259809b6f03d3d20be44545cd7d177221c0b8d
+PKG_SOURCE_URL:=@GNOME/glib/2.58
+PKG_HASH:=97d6a9d926b6aa3dfaadad3077cfb43eec74432ab455dff14250c769d526d7d6
PKG_BUILD_PARALLEL:=1
HOST_BUILD_PARALLEL:=1
The GLib library of C routines
endef
+TARGET_CFLAGS += -Wno-error=implicit-function-declaration
+
HOST_CONFIGURE_ARGS += \
--disable-selinux \
--with-libiconv=gnu \
--with-pcre=internal \
- --enable-libmount=no
+ --disable-libmount
CONFIGURE_ARGS += \
--enable-shared \
--enable-static \
- --enable-debug=no \
+ --disable-debug \
--disable-selinux \
- --enable-libmount=no \
+ --disable-libmount \
--disable-fam \
+ --disable-gtk-doc-html \
+ --disable-man \
--with-libiconv=gnu \
--with-pcre=internal
ac_cv_func_posix_getgrgid_r=yes
define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/bin/* \
+ $(1)/usr/bin/
+
$(INSTALL_DIR) $(1)/usr/include
$(CP) \
$(PKG_INSTALL_DIR)/usr/include/glib-2.0 \
---- a/gtk-doc.make
+diff --git a/gtk-doc.make b/gtk-doc.make
+new file mode 100644
+index 0000000..14f18fd
+--- /dev/null
+++ b/gtk-doc.make
-@@ -298,7 +298,7 @@ uninstall-local:
- #
- # Require gtk-doc when making dist
- #
--if HAVE_GTK_DOC
-+if ENABLE_GTK_DOC
- dist-check-gtkdoc: docs
- else
- dist-check-gtkdoc:
+@@ -0,0 +1,2 @@
++EXTRA_DIST =
++CLEANFILES =
include $(TOPDIR)/rules.mk
PKG_NAME:=gnutls
-PKG_VERSION:=3.5.16
+PKG_VERSION:=3.5.19
PKG_RELEASE:=1
PKG_USE_MIPS16:=0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://www.gnupg.org/ftp/gcrypt/gnutls/v3.5
-PKG_HASH:=0924dec90c37c05f49fec966eba3672dab4d336d879e5c06e06e13325cbfec25
+PKG_HASH:=1936eb64f03aaefd6eb16cef0567457777618573826b94d03376bb6a4afadc44
#PKG_FIXUP:=autoreconf gettext-version
PKG_MAINTAINER:=Nikos Mavrogiannopoulos <nmav@gnutls.org>
PKG_LICENSE:=LGPLv2.1+
+PKG_CPE_ID:=cpe:/a:gnu:gnutls
PKG_INSTALL:=1
PKG_LIBTOOL_PATHS:=. lib
include $(TOPDIR)/rules.mk
PKG_NAME:=hiredis
-PKG_VERSION:=0.13.3
-PKG_RELEASE:=2
+PKG_VERSION:=0.14.0
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/redis/hiredis/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=717e6fc8dc2819bef522deaca516de9e51b9dfa68fe393b7db5c3b6079196f78
+PKG_HASH:=042f965e182b80693015839a9d0278ae73fae5d5d09d8bf6d0e6a39a8c4393bd
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=COPYING
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
+++ /dev/null
-Index: hiredis-0.13.3/hiredis.h
-===================================================================
---- hiredis-0.13.3.orig/hiredis.h
-+++ hiredis-0.13.3/hiredis.h
-@@ -98,7 +98,7 @@
- * then GNU strerror_r returned an internal static buffer and we \
- * need to copy the result into our private buffer. */ \
- if (err_str != (buf)) { \
-- buf[(len)] = '\0'; \
-+ (buf)[(len)] = '\0'; \
- strncat((buf), err_str, ((len) - 1)); \
- } \
- } while (0)
--- /dev/null
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=hwloc
+PKG_VERSION:=2.0.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://download.open-mpi.org/release/$(PKG_NAME)/v2.0/
+PKG_HASH:=f1156df22fc2365a31a3dc5f752c53aad49e34a5e22d75ed231cd97eaa437f9d
+
+PKG_LICENSE:=BSD-3-Clause
+PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
+PKG_INSTALL:=1
+
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/hwloc/Default
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=Portable Hardware Locality
+ URL:=https://www.open-mpi.org/projects/hwloc/
+endef
+
+define Package/hwloc/Default/description
+ The Portable Hardware Locality (hwloc) software package provides a
+ portable abstraction (across OS, versions, architectures, ...) of the
+ hierarchical topology of modern architectures, including NUMA memory
+ nodes, sockets, shared caches, cores and simultaneous multithreading. It
+ also gathers various system attributes such as cache and memory
+ information as well as the locality of I/O devices such as network
+ interfaces, InfiniBand HCAs or GPUs.
+endef
+
+define Package/hwloc-utils
+$(call Package/hwloc/Default)
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE+= utilities
+ DEPENDS+= +libhwloc
+endef
+
+define Package/hwloc-utils/description
+$(call Package/hwloc/Default/description)
+ This package contains the hwloc utilities.
+endef
+
+define Package/libhwloc
+$(call Package/hwloc/Default)
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE+= libraries
+endef
+
+define Package/libhwloc/description
+$(call Package/hwloc/Default/description)
+ This package contains the hwloc libraries.
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(STAGING_DIR)/usr/include
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/hwloc.h $(STAGING_DIR)/usr/include/
+ $(INSTALL_DIR) $(STAGING_DIR)/usr/include/hwloc
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/hwloc/*.h $(STAGING_DIR)/usr/include/hwloc/
+ $(INSTALL_DIR) $(STAGING_DIR)/usr/include/hwloc/autogen
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/hwloc/autogen/*.h $(STAGING_DIR)/usr/include/hwloc/autogen/
+ $(INSTALL_DIR) $(STAGING_DIR)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib* $(STAGING_DIR)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(INSTALL_DATA) \
+ $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
+ $(1)/usr/lib/pkgconfig
+endef
+
+define Package/hwloc-utils/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+endef
+
+define Package/libhwloc/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,hwloc-utils))
+$(eval $(call BuildPackage,libhwloc))
include $(TOPDIR)/rules.mk
PKG_NAME:=icu4c
-PKG_VERSION:=62.1
+PKG_VERSION:=63.1
PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-62_1-src.tgz
+PKG_SOURCE:=$(PKG_NAME)-63_1-src.tgz
PKG_SOURCE_URL:=http://download.icu-project.org/files/$(PKG_NAME)/$(PKG_VERSION)
-PKG_HASH:=3dd9868d666350dda66a6e305eecde9d479fb70b30d5b55d78a1deffb97d5aa3
+PKG_HASH:=05c490b69454fce5860b7e8e2821231674af0a11d7ef2febea9a32512998cb9d
PKG_LICENSE:=ICU-1.8.1+
PKG_LICENSE_FILES:=LICENSE
DEPENDS:=+libstdcpp +libpthread
endef
+define Package/icu/description
+ ICU is a mature, widely used set of C/C++ and Java libraries providing Unicode and Globalization support for software applications. ICU is widely portable and gives applications the same results on all platforms and between C/C++ and Java software.
+ This package supports C/C++.
+endef
+
+define Package/icu-full-data
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=Full ICU Data
+ URL:=http://icu-project.org
+ DEPENDS:=+icu
+endef
+
+define Package/icu-full-data/description
+ ICU makes use of a wide variety of data tables to provide many of its services. Examples include converter mapping tables, collation rules, transliteration rules, break iterator rules and dictionaries, and other locale data.
+ This package contains the complete data library provided by ICU.
+ A custom data library can be generated at http://apps.icu-project.org/datacustom/
+endef
+
+define Package/icu-data-tools
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=ICU Data manipulation tools
+ URL:=http://icu-project.org
+ DEPENDS:=+icu
+endef
+
+define Package/icu-data-tools/description
+ This package provides tools for manipulating ICU data.
+endef
+
CONFIGURE_CMD:= ./runConfigureICU
CONFIGURE_ARGS:= \
Linux/gcc \
--disable-tracing \
--disable-extras \
--enable-dyload \
- --disable-tools \
+ --with-data-packaging=archive \
--disable-tests \
--disable-samples \
--with-cross-build="$(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)" \
$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
endef
-$(eval $(call BuildPackage,icu))
+define Package/icu-full-data/install
+ $(INSTALL_DIR) $(1)/usr/share/icu/$(PKG_VERSION)
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/icu/$(PKG_VERSION)/icudt*.dat \
+ $(1)/usr/share/icu/$(PKG_VERSION)/
+endef
+
+define Package/icu-data-tools/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
+endef
+
$(eval $(call HostBuild))
+$(eval $(call BuildPackage,icu))
+$(eval $(call BuildPackage,icu-full-data))
+$(eval $(call BuildPackage,icu-data-tools))
index 9db6c52..6aa2273 100644
--- a/Makefile.in
+++ b/Makefile.in
-@@ -186,7 +186,6 @@ install-icu: $(INSTALLED_BUILT_FILES)
+@@ -190,7 +190,6 @@ install-icu: $(INSTALLED_BUILT_FILES)
$(INSTALL_SCRIPT) $(top_srcdir)/install-sh $(DESTDIR)$(pkgdatadir)/install-sh
@$(MKINSTALLDIRS) $(DESTDIR)$(libdir)/pkgconfig
$(INSTALL_DATA) $(ALL_PKGCONFIG_FILES) $(DESTDIR)$(libdir)/pkgconfig/
- $(INSTALL_DATA) $(top_srcdir)/../LICENSE $(DESTDIR)$(pkgdatadir)/LICENSE
+ ifeq ($(INSTALL_ICU_CONFIG),true)
$(INSTALL_SCRIPT) $(top_builddir)/config/icu-config $(DESTDIR)$(bindir)/icu-config
- $(INSTALL_DATA) $(top_builddir)/config/Makefile.inc $(DESTDIR)$(pkglibdir)/Makefile.inc
- $(INSTALL_DATA) $(top_builddir)/config/pkgdata.inc $(DESTDIR)$(pkglibdir)/pkgdata.inc
+ endif
include $(TOPDIR)/rules.mk
PKG_NAME:=intltool
-PKG_LIBVER:=0.40
-PKG_VERSION:=$(PKG_LIBVER).6
-PKG_RELEASE:=3
+PKG_LIBVER:=0.51
+PKG_VERSION:=$(PKG_LIBVER).0
+PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=@GNOME/intltool/$(PKG_LIBVER)
-PKG_HASH:=4d1e5f8561f09c958e303d4faa885079a5e173a61d28437d0013ff5efc9e3b64
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://launchpad.net/intltool/trunk/$(PKG_VERSION)/+download
+PKG_HASH:=67c74d94196b153b774ab9f89b2fa6c6ba79352407037c8c14d5aeb334e959cd
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
PKG_HOST_ONLY:=1
SECTION:=libs
CATEGORY:=Libraries
TITLE:=set of tools to centralize translation using GNU gettext
- URL:=http://www.freedesktop.org/wiki/Software/intltool
+ URL:=https://www.freedesktop.org/wiki/Software/intltool
BUILDONLY:=1
endef
---- a/configure.in
-+++ b/configure.in
-@@ -25,7 +25,7 @@ AC_MSG_CHECKING([for XML::Parser])
+--- a/configure.ac
++++ b/configure.ac
+@@ -27,7 +27,7 @@ AC_MSG_CHECKING([for XML::Parser])
if `$PERL -e "require XML::Parser" 2>/dev/null`; then
AC_MSG_RESULT([ok])
else
- AC_MSG_ERROR([XML::Parser perl module is required for intltool])
-+ AC_MSG_RESULT([XML::Parser perl module is required for some intltool utilitities])
++ AC_MSG_RESULT([XML::Parser perl module is required for intltool])
fi
+ AC_PATH_PROG(BZR, bzr)
- AC_OUTPUT([
--- a/intltool.m4
+++ b/intltool.m4
-@@ -127,7 +127,7 @@ if test "x$2" != "xno-xml"; then
+@@ -148,7 +148,7 @@ if test "x$2" != "xno-xml"; then
if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
AC_MSG_RESULT([ok])
else
- AC_MSG_ERROR([XML::Parser perl module is required for intltool])
-+ AC_MSG_RESULT([XML::Parser perl module is required for some intltool utilitities])
++ AC_MSG_RESULT([XML::Parser perl module is required for intltool])
fi
fi
--- /dev/null
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=keyutils
+PKG_VERSION:=1.5.10
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=http://people.redhat.com/dhowells/keyutils/
+PKG_HASH:=115c3deae7f181778fd0e0ffaa2dad1bf1fe2f5677cf2e0e348cdb7a1c93afb6
+
+PKG_FIXUP:=libtool
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libkeyutils
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=Key utilities library
+ URL:=http://people.redhat.com/dhowells/keyutils/
+endef
+
+define Package/keyutils/description
+ Key utilities library
+endef
+
+define Build/Install
+ make -C $(PKG_BUILD_DIR) DESTDIR=$(PKG_INSTALL_DIR) LIBDIR=/usr/lib install
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libkeyutils.{a,so*} $(1)/usr/lib/
+endef
+
+define Package/libkeyutils/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libkeyutils.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libkeyutils))
--- /dev/null
+Author: Marcus Meissner <meissner@suse.de>
+Description: Added 2 cifs helpers to request-key.conf (for CIFS DFS support)
+
+diff -Naurp keyutils.orig/request-key.conf keyutils/request-key.conf
+--- keyutils.orig/request-key.conf 2011-08-22 11:46:30.332025250 +0200
++++ keyutils/request-key.conf 2011-08-22 11:49:40.096967441 +0200
+@@ -38,4 +38,6 @@ create user debug:* expired
+ create user debug:* revoked /bin/keyctl reject %k 30 %c %S
+ create user debug:loop:* * |/bin/cat
+ create user debug:* * /usr/share/keyutils/request-key-debug.sh %k %d %c %S
++create cifs.spnego * * /usr/sbin/cifs.upcall -c %k
++create dns_resolver * * /usr/sbin/cifs.upcall %k
+ negate * * * /bin/keyctl negate %k 30 %S
--- /dev/null
+Author: Nobuhiro Iwamatsu <iwamatsu@debian.org>
+Description: Avoid setting Intel Architecture specific CFLAGS (Closes: #638925).
+
+diff -Naurp keyutils.orig/Makefile keyutils/Makefile
+--- keyutils.orig/Makefile 2011-08-22 11:51:20.521464216 +0200
++++ keyutils/Makefile 2011-08-24 19:17:09.855361713 +0200
+@@ -56,12 +56,10 @@ BUILDFOR := $(shell file /usr/bin/make |
+ LNS := ln -sf
+
+ ifeq ($(BUILDFOR),32-bit)
+-CFLAGS += -m32
+ LIBDIR := /lib
+ USRLIBDIR := /usr/lib
+ else
+ ifeq ($(BUILDFOR),64-bit)
+-CFLAGS += -m64
+ LIBDIR := /lib64
+ USRLIBDIR := /usr/lib64
+ endif
PKG_NAME:=ldns
PKG_VERSION:=1.7.0
-PKG_RELEASE:=1
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.nlnetlabs.nl/downloads/ldns
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
-PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
+PKG_MAINTAINER:=
PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
--- /dev/null
+From c8391790c96d4c8a2c10f9ab1460fda83b509fc2 Mon Sep 17 00:00:00 2001
+From: Willem Toorop <willem@nlnetlabs.nl>
+Date: Thu, 27 Apr 2017 00:14:58 +0200
+Subject: [PATCH] Check parse limit before t increment
+
+Thanks Stephan Zeisberg
+---
+ parse.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/parse.c b/parse.c
+index e68627c..947dbb8 100644
+--- a/parse.c
++++ b/parse.c
+@@ -118,6 +118,10 @@ ldns_fget_token_l(FILE *f, char *token, const char *delim, size_t limit, int *li
+ if (line_nr) {
+ *line_nr = *line_nr + 1;
+ }
++ if (limit > 0 && (i >= limit || (size_t)(t-token) >= limit)) {
++ *t = '\0';
++ return -1;
++ }
+ *t++ = ' ';
+ prev_c = c;
+ continue;
+--
+2.9.5
+
--- /dev/null
+From 3bdeed02505c9bbacb3b64a97ddcb1de967153b7 Mon Sep 17 00:00:00 2001
+From: Willem Toorop <willem@nlnetlabs.nl>
+Date: Thu, 27 Apr 2017 00:25:20 +0200
+Subject: [PATCH] bugfix #1257: Free after reallocing to 0 size
+
+Thanks Stephan Zeisberg
+---
+ str2host.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/str2host.c b/str2host.c
+index b274b17..f2a317b 100644
+--- a/str2host.c
++++ b/str2host.c
+@@ -1525,8 +1525,10 @@ ldns_str2rdf_long_str(ldns_rdf **rd, const char *str)
+ if (! str) {
+ return LDNS_STATUS_SYNTAX_BAD_ESCAPE;
+ }
+- length = (size_t)(dp - data);
+-
++ if (!(length = (size_t)(dp - data))) {
++ LDNS_FREE(data);
++ return LDNS_STATUS_SYNTAX_EMPTY;
++ }
+ /* Lose the overmeasure */
+ data = LDNS_XREALLOC(dp = data, uint8_t, length);
+ if (! data) {
+--
+2.9.5
+
--- /dev/null
+--- a/dnssec.c
++++ b/dnssec.c
+@@ -23,6 +23,9 @@
+ #include <openssl/rand.h>
+ #include <openssl/err.h>
+ #include <openssl/md5.h>
++#include <openssl/bn.h>
++#include <openssl/rsa.h>
++#include <openssl/dsa.h>
+ #endif
+
+ ldns_rr *
+--- a/dnssec_sign.c
++++ b/dnssec_sign.c
+@@ -17,6 +17,9 @@
+ #include <openssl/rand.h>
+ #include <openssl/err.h>
+ #include <openssl/md5.h>
++#include <openssl/bn.h>
++#include <openssl/rsa.h>
++#include <openssl/dsa.h>
+ #endif /* HAVE_SSL */
+
+ ldns_rr *
+--- a/dnssec_verify.c
++++ b/dnssec_verify.c
+@@ -594,7 +594,9 @@ ldns_dnssec_trust_tree_print_sm_fmt(FILE
+ if (tree->parent_status[i]
+ == LDNS_STATUS_SSL_ERR) {
+ printf("; SSL Error: ");
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ ERR_load_crypto_strings();
++#endif
+ ERR_print_errors_fp(stdout);
+ printf("\n");
+ }
+--- a/drill/drill.c
++++ b/drill/drill.c
+@@ -1013,7 +1013,7 @@ main(int argc, char *argv[])
+ xfree(tsig_data);
+ xfree(tsig_algorithm);
+
+-#ifdef HAVE_SSL
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ CRYPTO_cleanup_all_ex_data();
+ ERR_free_strings();
+ EVP_cleanup();
+--- a/host2str.c
++++ b/host2str.c
+@@ -28,6 +28,12 @@
+ #include <time.h>
+ #include <sys/time.h>
+
++#ifdef HAVE_SSL
++#include <openssl/bn.h>
++#include <openssl/rsa.h>
++#include <openssl/dsa.h>
++#endif
++
+ #ifndef INET_ADDRSTRLEN
+ #define INET_ADDRSTRLEN 16
+ #endif
+--- a/keys.c
++++ b/keys.c
+@@ -16,8 +16,12 @@
+
+ #ifdef HAVE_SSL
+ #include <openssl/ssl.h>
+-#include <openssl/engine.h>
+ #include <openssl/rand.h>
++#include <openssl/bn.h>
++#include <openssl/rsa.h>
++#include <openssl/dsa.h>
++#include <openssl/engine.h>
++#include <openssl/ui.h>
+ #endif /* HAVE_SSL */
+
+ ldns_lookup_table ldns_signing_algorithms[] = {
include $(TOPDIR)/rules.mk
PKG_NAME:=libaio
-PKG_VERSION:=0.3.110
+PKG_VERSION:=0.3.111
PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
-PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/liba/libaio/
-PKG_HASH:=e019028e631725729376250e32b473012f7cb68e1f7275bfc1bbcdd0f8745f7e
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://releases.pagure.org/libaio
+PKG_HASH:=62cf871ad8fd09eb3418f00aca7a7d449299b8e1de31c65f28bf6a2ef1fa502a
PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
PKG_LICENSE:=LGPL-2.1
+PKG_ASLR_PIE:=1
+PKG_BUILD_PARALLEL:=1
+
PKG_USE_MIPS16:=0
include $(INCLUDE_DIR)/package.mk
LIBAIO_CFLAGS:=-nostdlib -nostartfiles -I. $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(FPIC)
-TARGET_CFLAGS += $(FPIC)
-
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
$(TARGET_CONFIGURE_OPTS) \
+Description: Add/fix support for m68k, mips, paris, sparc
+Author: Guillem Jover <guillem@debian.org>
+Origin: vendor
+Forwarded: no
+Last-Update: 2014-10-09
+
+
---
- harness/main.c | 10 ++
+ harness/main.c | 10 +++++++++
src/libaio.h | 1
- src/syscall-m68k.h | 78 +++++++++++++++++
- src/syscall-mips.h | 223 +++++++++++++++++++++++++++++++++++++++++++++++++++
- src/syscall-parisc.h | 146 +++++++++++++++++++++++++++++++++
- src/syscall-sparc.h | 20 +++-
- src/syscall.h | 6 +
- 7 files changed, 479 insertions(+), 5 deletions(-)
+ src/syscall-m68k.h | 5 ++++
+ src/syscall-mips.h | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/syscall-parisc.h | 6 +++++
+ src/syscall.h | 6 +++++
+ 6 files changed, 82 insertions(+)
--- /dev/null
+++ b/src/syscall-m68k.h
-@@ -0,0 +1,78 @@
+@@ -0,0 +1,5 @@
+#define __NR_io_setup 241
+#define __NR_io_destroy 242
+#define __NR_io_getevents 243
+#define __NR_io_submit 244
+#define __NR_io_cancel 245
-+
-+#define io_syscall1(type,fname,sname,atype,a) \
-+type fname(atype a) \
-+{ \
-+register long __res __asm__ ("%d0") = __NR_##sname; \
-+register long __a __asm__ ("%d1") = (long)(a); \
-+__asm__ __volatile__ ("trap #0" \
-+ : "+d" (__res) \
-+ : "d" (__a) ); \
-+return (type) __res; \
-+}
-+
-+#define io_syscall2(type,fname,sname,atype,a,btype,b) \
-+type fname(atype a,btype b) \
-+{ \
-+register long __res __asm__ ("%d0") = __NR_##sname; \
-+register long __a __asm__ ("%d1") = (long)(a); \
-+register long __b __asm__ ("%d2") = (long)(b); \
-+__asm__ __volatile__ ("trap #0" \
-+ : "+d" (__res) \
-+ : "d" (__a), "d" (__b) \
-+ ); \
-+return (type) __res; \
-+}
-+
-+#define io_syscall3(type,fname,sname,atype,a,btype,b,ctype,c) \
-+type fname(atype a,btype b,ctype c) \
-+{ \
-+register long __res __asm__ ("%d0") = __NR_##sname; \
-+register long __a __asm__ ("%d1") = (long)(a); \
-+register long __b __asm__ ("%d2") = (long)(b); \
-+register long __c __asm__ ("%d3") = (long)(c); \
-+__asm__ __volatile__ ("trap #0" \
-+ : "+d" (__res) \
-+ : "d" (__a), "d" (__b), \
-+ "d" (__c) \
-+ ); \
-+return (type) __res; \
-+}
-+
-+#define io_syscall4(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d) \
-+type fname (atype a, btype b, ctype c, dtype d) \
-+{ \
-+register long __res __asm__ ("%d0") = __NR_##sname; \
-+register long __a __asm__ ("%d1") = (long)(a); \
-+register long __b __asm__ ("%d2") = (long)(b); \
-+register long __c __asm__ ("%d3") = (long)(c); \
-+register long __d __asm__ ("%d4") = (long)(d); \
-+__asm__ __volatile__ ("trap #0" \
-+ : "+d" (__res) \
-+ : "d" (__a), "d" (__b), \
-+ "d" (__c), "d" (__d) \
-+ ); \
-+return (type) __res; \
-+}
-+
-+#define io_syscall5(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d,etype,e) \
-+type fname (atype a,btype b,ctype c,dtype d,etype e) \
-+{ \
-+register long __res __asm__ ("%d0") = __NR_##sname; \
-+register long __a __asm__ ("%d1") = (long)(a); \
-+register long __b __asm__ ("%d2") = (long)(b); \
-+register long __c __asm__ ("%d3") = (long)(c); \
-+register long __d __asm__ ("%d4") = (long)(d); \
-+register long __e __asm__ ("%d5") = (long)(e); \
-+__asm__ __volatile__ ("trap #0" \
-+ : "+d" (__res) \
-+ : "d" (__a), "d" (__b), \
-+ "d" (__c), "d" (__d), "d" (__e) \
-+ ); \
-+return (type) __res; \
-+}
-+
--- a/src/syscall.h
+++ b/src/syscall.h
-@@ -28,6 +28,12 @@
+@@ -27,6 +27,12 @@
+ #include "syscall-arm.h"
+ #elif defined(__sparc__)
#include "syscall-sparc.h"
- #elif defined(__aarch64__)
- #include "syscall-arm64.h"
+#elif defined(__m68k__)
+#include "syscall-m68k.h"
+#elif defined(__hppa__)
+#include "syscall-parisc.h"
+#elif defined(__mips__)
+#include "syscall-mips.h"
- #else
- #warning "using generic syscall method"
+ #elif defined(__aarch64__) || defined(__riscv)
#include "syscall-generic.h"
+ #else
--- /dev/null
+++ b/src/syscall-mips.h
-@@ -0,0 +1,223 @@
+@@ -0,0 +1,54 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ *
+ * Copyright (C) 1995, 96, 97, 98, 99, 2000 by Ralf Baechle
+ * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
-+ *
-+ * Changed system calls macros _syscall5 - _syscall7 to push args 5 to 7 onto
-+ * the stack. Robin Farine for ACN S.A, Copyright (C) 1996 by ACN S.A
+ */
+
+#ifndef _MIPS_SIM_ABI32
+#define __NR_io_submit (__NR_Linux + 203)
+#define __NR_io_cancel (__NR_Linux + 204)
+#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
-+
-+#define io_syscall1(type,fname,sname,atype,a) \
-+type fname(atype a) \
-+{ \
-+ register unsigned long __a0 asm("$4") = (unsigned long) a; \
-+ register unsigned long __a3 asm("$7"); \
-+ unsigned long __v0; \
-+ \
-+ __asm__ volatile ( \
-+ ".set\tnoreorder\n\t" \
-+ "li\t$2, %3\t\t\t# " #fname "\n\t" \
-+ "syscall\n\t" \
-+ "move\t%0, $2\n\t" \
-+ ".set\treorder" \
-+ : "=&r" (__v0), "=r" (__a3) \
-+ : "r" (__a0), "i" (__NR_##sname) \
-+ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
-+ "memory"); \
-+ \
-+ if (__a3 == 0) \
-+ return (type) __v0; \
-+ return (type) -1; \
-+}
-+
-+#define io_syscall2(type,fname,sname,atype,a,btype,b) \
-+type fname(atype a, btype b) \
-+{ \
-+ register unsigned long __a0 asm("$4") = (unsigned long) a; \
-+ register unsigned long __a1 asm("$5") = (unsigned long) b; \
-+ register unsigned long __a3 asm("$7"); \
-+ unsigned long __v0; \
-+ \
-+ __asm__ volatile ( \
-+ ".set\tnoreorder\n\t" \
-+ "li\t$2, %4\t\t\t# " #fname "\n\t" \
-+ "syscall\n\t" \
-+ "move\t%0, $2\n\t" \
-+ ".set\treorder" \
-+ : "=&r" (__v0), "=r" (__a3) \
-+ : "r" (__a0), "r" (__a1), "i" (__NR_##sname) \
-+ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
-+ "memory"); \
-+ \
-+ if (__a3 == 0) \
-+ return (type) __v0; \
-+ return (type) -1; \
-+}
-+
-+#define io_syscall3(type,fname,sname,atype,a,btype,b,ctype,c) \
-+type fname(atype a, btype b, ctype c) \
-+{ \
-+ register unsigned long __a0 asm("$4") = (unsigned long) a; \
-+ register unsigned long __a1 asm("$5") = (unsigned long) b; \
-+ register unsigned long __a2 asm("$6") = (unsigned long) c; \
-+ register unsigned long __a3 asm("$7"); \
-+ unsigned long __v0; \
-+ \
-+ __asm__ volatile ( \
-+ ".set\tnoreorder\n\t" \
-+ "li\t$2, %5\t\t\t# " #fname "\n\t" \
-+ "syscall\n\t" \
-+ "move\t%0, $2\n\t" \
-+ ".set\treorder" \
-+ : "=&r" (__v0), "=r" (__a3) \
-+ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##sname) \
-+ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
-+ "memory"); \
-+ \
-+ if (__a3 == 0) \
-+ return (type) __v0; \
-+ return (type) -1; \
-+}
-+
-+#define io_syscall4(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d) \
-+type fname(atype a, btype b, ctype c, dtype d) \
-+{ \
-+ register unsigned long __a0 asm("$4") = (unsigned long) a; \
-+ register unsigned long __a1 asm("$5") = (unsigned long) b; \
-+ register unsigned long __a2 asm("$6") = (unsigned long) c; \
-+ register unsigned long __a3 asm("$7") = (unsigned long) d; \
-+ unsigned long __v0; \
-+ \
-+ __asm__ volatile ( \
-+ ".set\tnoreorder\n\t" \
-+ "li\t$2, %5\t\t\t# " #fname "\n\t" \
-+ "syscall\n\t" \
-+ "move\t%0, $2\n\t" \
-+ ".set\treorder" \
-+ : "=&r" (__v0), "+r" (__a3) \
-+ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##sname) \
-+ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
-+ "memory"); \
-+ \
-+ if (__a3 == 0) \
-+ return (type) __v0; \
-+ return (type) -1; \
-+}
-+
-+#if (_MIPS_SIM == _MIPS_SIM_ABI32)
-+
-+/*
-+ * Using those means your brain needs more than an oil change ;-)
-+ */
-+
-+#define io_syscall5(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d,etype,e) \
-+type fname(atype a, btype b, ctype c, dtype d, etype e) \
-+{ \
-+ register unsigned long __a0 asm("$4") = (unsigned long) a; \
-+ register unsigned long __a1 asm("$5") = (unsigned long) b; \
-+ register unsigned long __a2 asm("$6") = (unsigned long) c; \
-+ register unsigned long __a3 asm("$7") = (unsigned long) d; \
-+ unsigned long __v0; \
-+ \
-+ __asm__ volatile ( \
-+ ".set\tnoreorder\n\t" \
-+ "lw\t$2, %6\n\t" \
-+ "subu\t$29, 32\n\t" \
-+ "sw\t$2, 16($29)\n\t" \
-+ "li\t$2, %5\t\t\t# " #fname "\n\t" \
-+ "syscall\n\t" \
-+ "move\t%0, $2\n\t" \
-+ "addiu\t$29, 32\n\t" \
-+ ".set\treorder" \
-+ : "=&r" (__v0), "+r" (__a3) \
-+ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##sname), \
-+ "m" ((unsigned long)e) \
-+ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
-+ "memory"); \
-+ \
-+ if (__a3 == 0) \
-+ return (type) __v0; \
-+ return (type) -1; \
-+}
-+
-+#endif /* (_MIPS_SIM == _MIPS_SIM_ABI32) */
-+
-+#if (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64)
-+
-+#define io_syscall5(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d,etype,e) \
-+type fname (atype a,btype b,ctype c,dtype d,etype e) \
-+{ \
-+ register unsigned long __a0 asm("$4") = (unsigned long) a; \
-+ register unsigned long __a1 asm("$5") = (unsigned long) b; \
-+ register unsigned long __a2 asm("$6") = (unsigned long) c; \
-+ register unsigned long __a3 asm("$7") = (unsigned long) d; \
-+ register unsigned long __a4 asm("$8") = (unsigned long) e; \
-+ unsigned long __v0; \
-+ \
-+ __asm__ volatile ( \
-+ ".set\tnoreorder\n\t" \
-+ "li\t$2, %6\t\t\t# " #fname "\n\t" \
-+ "syscall\n\t" \
-+ "move\t%0, $2\n\t" \
-+ ".set\treorder" \
-+ : "=&r" (__v0), "+r" (__a3) \
-+ : "r" (__a0), "r" (__a1), "r" (__a2), "r" (__a4), "i" (__NR_##sname) \
-+ : "$2", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
-+ "memory"); \
-+ \
-+ if (__a3 == 0) \
-+ return (type) __v0; \
-+ return (type) -1; \
-+}
-+
-+#endif /* (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) */
-+
--- a/src/libaio.h
+++ b/src/libaio.h
-@@ -66,6 +66,7 @@ typedef enum io_iocb_cmd {
+@@ -71,6 +71,7 @@ typedef enum io_iocb_cmd {
/* big endian, 64 bits */
#elif defined(__powerpc64__) || defined(__s390x__) || \
+ (defined(__hppa__) && defined(__arch64__)) || \
(defined(__sparc__) && defined(__arch64__)) || \
- (defined(__aarch64__) && defined(__AARCH64EB__))
- #define PADDED(x, y) unsigned y; x
+ (defined(__aarch64__) && defined(__AARCH64EB__)) || \
+ (defined(__GNUC__) && defined(__BYTE_ORDER__) && \
--- /dev/null
+++ b/src/syscall-parisc.h
-@@ -0,0 +1,146 @@
-+/*
-+ * Linux system call numbers.
-+ *
-+ * Cary Coutant says that we should just use another syscall gateway
-+ * page to avoid clashing with the HPUX space, and I think he's right:
-+ * it will would keep a branch out of our syscall entry path, at the
-+ * very least. If we decide to change it later, we can ``just'' tweak
-+ * the LINUX_GATEWAY_ADDR define at the bottom and make __NR_Linux be
-+ * 1024 or something. Oh, and recompile libc. =)
-+ *
-+ * 64-bit HPUX binaries get the syscall gateway address passed in a register
-+ * from the kernel at startup, which seems a sane strategy.
-+ */
-+
+@@ -0,0 +1,6 @@
+#define __NR_Linux 0
+#define __NR_io_setup (__NR_Linux + 215)
+#define __NR_io_destroy (__NR_Linux + 216)
+#define __NR_io_getevents (__NR_Linux + 217)
+#define __NR_io_submit (__NR_Linux + 218)
+#define __NR_io_cancel (__NR_Linux + 219)
-+
-+#define SYS_ify(syscall_name) __NR_##syscall_name
-+
-+/* Assume all syscalls are done from PIC code just to be
-+ * safe. The worst case scenario is that you lose a register
-+ * and save/restore r19 across the syscall. */
-+#define PIC
-+
-+/* Definition taken from glibc 2.3.3
-+ * sysdeps/unix/sysv/linux/hppa/sysdep.h
-+ */
-+
-+#ifdef PIC
-+/* WARNING: CANNOT BE USED IN A NOP! */
-+# define K_STW_ASM_PIC " copy %%r19, %%r4\n"
-+# define K_LDW_ASM_PIC " copy %%r4, %%r19\n"
-+# define K_USING_GR4 "%r4",
-+#else
-+# define K_STW_ASM_PIC " \n"
-+# define K_LDW_ASM_PIC " \n"
-+# define K_USING_GR4
-+#endif
-+
-+/* GCC has to be warned that a syscall may clobber all the ABI
-+ registers listed as "caller-saves", see page 8, Table 2
-+ in section 2.2.6 of the PA-RISC RUN-TIME architecture
-+ document. However! r28 is the result and will conflict with
-+ the clobber list so it is left out. Also the input arguments
-+ registers r20 -> r26 will conflict with the list so they
-+ are treated specially. Although r19 is clobbered by the syscall
-+ we cannot say this because it would violate ABI, thus we say
-+ r4 is clobbered and use that register to save/restore r19
-+ across the syscall. */
-+
-+#define K_CALL_CLOB_REGS "%r1", "%r2", K_USING_GR4 \
-+ "%r20", "%r29", "%r31"
-+
-+#undef K_INLINE_SYSCALL
-+#define K_INLINE_SYSCALL(name, nr, args...) ({ \
-+ long __sys_res; \
-+ { \
-+ register unsigned long __res __asm__("r28"); \
-+ K_LOAD_ARGS_##nr(args) \
-+ /* FIXME: HACK stw/ldw r19 around syscall */ \
-+ __asm__ volatile( \
-+ K_STW_ASM_PIC \
-+ " ble 0x100(%%sr2, %%r0)\n" \
-+ " ldi %1, %%r20\n" \
-+ K_LDW_ASM_PIC \
-+ : "=r" (__res) \
-+ : "i" (SYS_ify(name)) K_ASM_ARGS_##nr \
-+ : "memory", K_CALL_CLOB_REGS K_CLOB_ARGS_##nr \
-+ ); \
-+ __sys_res = (long)__res; \
-+ } \
-+ __sys_res; \
-+})
-+
-+#define K_LOAD_ARGS_0()
-+#define K_LOAD_ARGS_1(r26) \
-+ register unsigned long __r26 __asm__("r26") = (unsigned long)(r26); \
-+ K_LOAD_ARGS_0()
-+#define K_LOAD_ARGS_2(r26,r25) \
-+ register unsigned long __r25 __asm__("r25") = (unsigned long)(r25); \
-+ K_LOAD_ARGS_1(r26)
-+#define K_LOAD_ARGS_3(r26,r25,r24) \
-+ register unsigned long __r24 __asm__("r24") = (unsigned long)(r24); \
-+ K_LOAD_ARGS_2(r26,r25)
-+#define K_LOAD_ARGS_4(r26,r25,r24,r23) \
-+ register unsigned long __r23 __asm__("r23") = (unsigned long)(r23); \
-+ K_LOAD_ARGS_3(r26,r25,r24)
-+#define K_LOAD_ARGS_5(r26,r25,r24,r23,r22) \
-+ register unsigned long __r22 __asm__("r22") = (unsigned long)(r22); \
-+ K_LOAD_ARGS_4(r26,r25,r24,r23)
-+#define K_LOAD_ARGS_6(r26,r25,r24,r23,r22,r21) \
-+ register unsigned long __r21 __asm__("r21") = (unsigned long)(r21); \
-+ K_LOAD_ARGS_5(r26,r25,r24,r23,r22)
-+
-+/* Even with zero args we use r20 for the syscall number */
-+#define K_ASM_ARGS_0
-+#define K_ASM_ARGS_1 K_ASM_ARGS_0, "r" (__r26)
-+#define K_ASM_ARGS_2 K_ASM_ARGS_1, "r" (__r25)
-+#define K_ASM_ARGS_3 K_ASM_ARGS_2, "r" (__r24)
-+#define K_ASM_ARGS_4 K_ASM_ARGS_3, "r" (__r23)
-+#define K_ASM_ARGS_5 K_ASM_ARGS_4, "r" (__r22)
-+#define K_ASM_ARGS_6 K_ASM_ARGS_5, "r" (__r21)
-+
-+/* The registers not listed as inputs but clobbered */
-+#define K_CLOB_ARGS_6
-+#define K_CLOB_ARGS_5 K_CLOB_ARGS_6, "%r21"
-+#define K_CLOB_ARGS_4 K_CLOB_ARGS_5, "%r22"
-+#define K_CLOB_ARGS_3 K_CLOB_ARGS_4, "%r23"
-+#define K_CLOB_ARGS_2 K_CLOB_ARGS_3, "%r24"
-+#define K_CLOB_ARGS_1 K_CLOB_ARGS_2, "%r25"
-+#define K_CLOB_ARGS_0 K_CLOB_ARGS_1, "%r26"
-+
-+#define io_syscall1(type,fname,sname,type1,arg1) \
-+type fname(type1 arg1) \
-+{ \
-+ return K_INLINE_SYSCALL(sname, 1, arg1); \
-+}
-+
-+#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \
-+type fname(type1 arg1, type2 arg2) \
-+{ \
-+ return K_INLINE_SYSCALL(sname, 2, arg1, arg2); \
-+}
-+
-+#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \
-+type fname(type1 arg1, type2 arg2, type3 arg3) \
-+{ \
-+ return K_INLINE_SYSCALL(sname, 3, arg1, arg2, arg3); \
-+}
-+
-+#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
-+type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
-+{ \
-+ return K_INLINE_SYSCALL(sname, 4, arg1, arg2, arg3, arg4); \
-+}
-+
-+#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \
-+type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \
-+{ \
-+ return K_INLINE_SYSCALL(sname, 5, arg1, arg2, arg3, arg4, arg5); \
-+}
-+
--- a/harness/main.c
+++ b/harness/main.c
@@ -12,7 +12,17 @@
#else
//#warning Not really sure where kernel memory is. Guessing.
#define KERNEL_RW_POINTER ((void *)0xffffffff81000000)
---- a/src/syscall-sparc.h
-+++ b/src/syscall-sparc.h
-@@ -20,7 +20,9 @@ __asm__ __volatile__ ("t 0x10\n\t" \
- : "=r" (__res), "=&r" (__o0) \
- : "1" (__o0), "r" (__g1) \
- : "cc"); \
--return (type) __res; \
-+if (__res < -255 || __res >= 0) \
-+ return (type) __res; \
-+return -1; \
- }
-
- #define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \
-@@ -38,7 +40,9 @@ __asm__ __volatile__ ("t 0x10\n\t" \
- : "=r" (__res), "=&r" (__o0) \
- : "1" (__o0), "r" (__o1), "r" (__g1) \
- : "cc"); \
--return (type) __res; \
-+if (__res < -255 || __res >= 0) \
-+ return (type) __res; \
-+return -1; \
- }
-
- #define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \
-@@ -57,7 +61,9 @@ __asm__ __volatile__ ("t 0x10\n\t" \
- : "=r" (__res), "=&r" (__o0) \
- : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__g1) \
- : "cc"); \
--return (type) __res; \
-+if (__res < -255 || __res >= 0) \
-+ return (type) __res; \
-+return -1; \
- }
-
- #define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
-@@ -77,7 +83,9 @@ __asm__ __volatile__ ("t 0x10\n\t" \
- : "=r" (__res), "=&r" (__o0) \
- : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__o3), "r" (__g1) \
- : "cc"); \
--return (type) __res; \
-+if (__res < -255 || __res >= 0) \
-+ return (type) __res; \
-+return -1; \
- }
-
- #define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
-@@ -99,5 +107,7 @@ __asm__ __volatile__ ("t 0x10\n\t" \
- : "=r" (__res), "=&r" (__o0) \
- : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__o3), "r" (__o4), "r" (__g1) \
- : "cc"); \
--return (type) __res; \
-+if (__res < -255 || __res >= 0) \
-+ return (type) __res; \
-+return -1; \
- }
-From: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
-Subject: Add SH supprt
-
-The test-suite logs can be found at:
-
- <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=535288>
+Author: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
+Description: Add SH supprt
+ The test-suite logs can be found at:
+ .
+ <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=535288>
---
- harness/main.c | 2 -
- src/libaio.h | 4 ++
- src/syscall-sh.h | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
- src/syscall.h | 2 +
- 4 files changed, 84 insertions(+), 2 deletions(-)
+ harness/main.c | 2 +-
+ src/libaio.h | 4 +++-
+ src/syscall-sh.h | 6 ++++++
+ src/syscall.h | 2 ++
+ 4 files changed, 12 insertions(+), 2 deletions(-)
--- a/harness/main.c
- defined(__sh__) || defined(__bfin__) || defined(__MIPSEL__) || \
+ (defined(__sh__) && defined(__LITTLE_ENDIAN__)) || \
+ defined(__bfin__) || defined(__MIPSEL__) || \
- defined(__cris__)
- #define PADDED(x, y) x; unsigned y
- #define PADDEDptr(x, y) x; unsigned y
-@@ -76,6 +77,7 @@ typedef enum io_iocb_cmd {
+ defined(__cris__) || (defined(__riscv) && __riscv_xlen == 32) || \
+ (defined(__GNUC__) && defined(__BYTE_ORDER__) && \
+ __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ && __SIZEOF_LONG__ == 4)
+@@ -83,6 +84,7 @@ typedef enum io_iocb_cmd {
/* big endian, 32 bits */
#elif defined(__PPC__) || defined(__s390__) || \
(defined(__arm__) && defined(__ARMEB__)) || \
+ (defined(__sh__) && defined (__BIG_ENDIAN__)) || \
defined(__sparc__) || defined(__MIPSEB__) || defined(__m68k__) || \
- defined(__hppa__) || defined(__frv__) || defined(__avr32__)
- #define PADDED(x, y) unsigned y; x
+ defined(__hppa__) || defined(__frv__) || defined(__avr32__) || \
+ (defined(__GNUC__) && defined(__BYTE_ORDER__) && \
--- /dev/null
+++ b/src/syscall-sh.h
-@@ -0,0 +1,78 @@
+@@ -0,0 +1,6 @@
+/* Copy from ./arch/sh/include/asm/unistd_32.h */
+#define __NR_io_setup 245
+#define __NR_io_destroy 246
+#define __NR_io_getevents 247
+#define __NR_io_submit 248
+#define __NR_io_cancel 249
-+
-+#define io_syscall1(type,fname,sname,type1,arg1) \
-+type fname(type1 arg1) \
-+{ \
-+register long __sc0 __asm__ ("r3") = __NR_##sname; \
-+register long __sc4 __asm__ ("r4") = (long) arg1; \
-+__asm__ __volatile__ ("trapa #0x11" \
-+ : "=z" (__sc0) \
-+ : "0" (__sc0), "r" (__sc4) \
-+ : "memory"); \
-+ return (type) __sc0;\
-+}
-+
-+#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \
-+type fname(type1 arg1,type2 arg2) \
-+{ \
-+register long __sc0 __asm__ ("r3") = __NR_##sname; \
-+register long __sc4 __asm__ ("r4") = (long) arg1; \
-+register long __sc5 __asm__ ("r5") = (long) arg2; \
-+ __asm__ __volatile__ ("trapa #0x12" \
-+ : "=z" (__sc0) \
-+ : "0" (__sc0), "r" (__sc4), "r" (__sc5) \
-+ : "memory"); \
-+ return (type) __sc0;\
-+}
-+
-+#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \
-+type fname(type1 arg1,type2 arg2,type3 arg3) \
-+{ \
-+register long __sc0 __asm__ ("r3") = __NR_##sname; \
-+register long __sc4 __asm__ ("r4") = (long) arg1; \
-+register long __sc5 __asm__ ("r5") = (long) arg2; \
-+register long __sc6 __asm__ ("r6") = (long) arg3; \
-+ __asm__ __volatile__ ("trapa #0x13" \
-+ : "=z" (__sc0) \
-+ : "0" (__sc0), "r" (__sc4), "r" (__sc5), "r" (__sc6) \
-+ : "memory"); \
-+ return (type) __sc0;\
-+}
-+
-+#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
-+type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
-+{ \
-+register long __sc0 __asm__ ("r3") = __NR_##sname; \
-+register long __sc4 __asm__ ("r4") = (long) arg1; \
-+register long __sc5 __asm__ ("r5") = (long) arg2; \
-+register long __sc6 __asm__ ("r6") = (long) arg3; \
-+register long __sc7 __asm__ ("r7") = (long) arg4; \
-+__asm__ __volatile__ ("trapa #0x14" \
-+ : "=z" (__sc0) \
-+ : "0" (__sc0), "r" (__sc4), "r" (__sc5), "r" (__sc6), \
-+ "r" (__sc7) \
-+ : "memory" ); \
-+ return (type) __sc0;\
-+}
-+
-+#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \
-+type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \
-+{ \
-+register long __sc3 __asm__ ("r3") = __NR_##sname; \
-+register long __sc4 __asm__ ("r4") = (long) arg1; \
-+register long __sc5 __asm__ ("r5") = (long) arg2; \
-+register long __sc6 __asm__ ("r6") = (long) arg3; \
-+register long __sc7 __asm__ ("r7") = (long) arg4; \
-+register long __sc0 __asm__ ("r0") = (long) arg5; \
-+__asm__ __volatile__ ("trapa #0x15" \
-+ : "=z" (__sc0) \
-+ : "0" (__sc0), "r" (__sc4), "r" (__sc5), "r" (__sc6), "r" (__sc7), \
-+ "r" (__sc3) \
-+ : "memory" ); \
-+ return (type) __sc0;\
-+}
--- a/src/syscall.h
+++ b/src/syscall.h
-@@ -34,6 +34,8 @@
+@@ -33,6 +33,8 @@
#include "syscall-parisc.h"
#elif defined(__mips__)
#include "syscall-mips.h"
+#elif defined(__sh__)
+#include "syscall-sh.h"
- #else
- #warning "using generic syscall method"
+ #elif defined(__aarch64__) || defined(__riscv)
#include "syscall-generic.h"
+ #else
--- /dev/null
+Description: Fix structure padding for mips64
+Author: Guillem Jover <guillem@debian.org>
+Forwarded: no
+Last-Update: 2014-07-23
+
+
+---
+ src/libaio.h | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/src/libaio.h
++++ b/src/libaio.h
+@@ -52,7 +52,8 @@ typedef enum io_iocb_cmd {
+ /* little endian, 32 bits */
+ #if defined(__i386__) || (defined(__arm__) && !defined(__ARMEB__)) || \
+ (defined(__sh__) && defined(__LITTLE_ENDIAN__)) || \
+- defined(__bfin__) || defined(__MIPSEL__) || \
++ defined(__bfin__) || \
++ (defined(__MIPSEL__) && !defined(__mips64)) || \
+ defined(__cris__) || (defined(__riscv) && __riscv_xlen == 32) || \
+ (defined(__GNUC__) && defined(__BYTE_ORDER__) && \
+ __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ && __SIZEOF_LONG__ == 4)
+@@ -62,6 +63,7 @@ typedef enum io_iocb_cmd {
+
+ /* little endian, 64 bits */
+ #elif defined(__ia64__) || defined(__x86_64__) || defined(__alpha__) || \
++ (defined(__mips64) && defined(__MIPSEL__)) || \
+ (defined(__aarch64__) && defined(__AARCH64EL__)) || \
+ (defined(__riscv) && __riscv_xlen == 64) || \
+ (defined(__GNUC__) && defined(__BYTE_ORDER__) && \
+@@ -74,6 +76,7 @@ typedef enum io_iocb_cmd {
+ #elif defined(__powerpc64__) || defined(__s390x__) || \
+ (defined(__hppa__) && defined(__arch64__)) || \
+ (defined(__sparc__) && defined(__arch64__)) || \
++ (defined(__mips64) && defined(__MIPSEB__)) || \
+ (defined(__aarch64__) && defined(__AARCH64EB__)) || \
+ (defined(__GNUC__) && defined(__BYTE_ORDER__) && \
+ __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ && __SIZEOF_LONG__ == 8)
+++ /dev/null
----
- src/syscall-sparc64.h | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++
- src/syscall.h | 2 +
- 2 files changed, 100 insertions(+)
-
---- a/src/syscall.h
-+++ b/src/syscall.h
-@@ -24,6 +24,8 @@
- #include "syscall-alpha.h"
- #elif defined(__arm__)
- #include "syscall-arm.h"
-+#elif defined(__sparc__) && defined(__arch64__)
-+#include "syscall-sparc64.h"
- #elif defined(__sparc__)
- #include "syscall-sparc.h"
- #elif defined(__aarch64__)
---- /dev/null
-+++ b/src/syscall-sparc64.h
-@@ -0,0 +1,98 @@
-+#define __NR_io_setup 268
-+#define __NR_io_destroy 269
-+#define __NR_io_submit 270
-+#define __NR_io_cancel 271
-+#define __NR_io_getevents 272
-+
-+#define io_syscall1(type,fname,sname,type1,arg1) \
-+type fname(type1 arg1) \
-+{ \
-+ unsigned long __res; \
-+ register unsigned long __g1 __asm__("g1") = __NR_##sname; \
-+ register unsigned long __o0 __asm__("o0") = (unsigned long) arg1; \
-+ __asm__ __volatile__("t 0x6d\n\t" \
-+ "sub %%g0, %%o0, %0\n\t" \
-+ "movcc %%xcc, %%o0, %0\n" \
-+ "1:" \
-+ : "=r" (__res), "=&r" (__o0) \
-+ : "1" (__o0), "r" (__g1) \
-+ : "cc"); \
-+ return (type) __res; \
-+}
-+
-+#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \
-+type fname(type1 arg1, type2 arg2) \
-+{ \
-+ unsigned long __res; \
-+ register unsigned long __g1 __asm__("g1") = __NR_##sname; \
-+ register unsigned long __o0 __asm__("o0") = (unsigned long) arg1; \
-+ register unsigned long __o1 __asm__("o1") = (unsigned long) arg2; \
-+ __asm__ __volatile__("t 0x6d\n\t" \
-+ "sub %%g0, %%o0, %0\n\t" \
-+ "movcc %%xcc, %%o0, %0\n" \
-+ "1:" \
-+ : "=r" (__res), "=&r" (__o0) \
-+ : "1" (__o0), "r" (__o1), "r" (__g1) \
-+ : "cc"); \
-+ return (type) __res; \
-+}
-+
-+#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \
-+type fname(type1 arg1, type2 arg2, type3 arg3) \
-+{ \
-+ unsigned long __res; \
-+ register unsigned long __g1 __asm__("g1") = __NR_##sname; \
-+ register unsigned long __o0 __asm__("o0") = (unsigned long) arg1; \
-+ register unsigned long __o1 __asm__("o1") = (unsigned long) arg2; \
-+ register unsigned long __o2 __asm__("o2") = (unsigned long) arg3; \
-+ __asm__ __volatile__("t 0x6d\n\t" \
-+ "sub %%g0, %%o0, %0\n\t" \
-+ "movcc %%xcc, %%o0, %0\n" \
-+ "1:" \
-+ : "=r" (__res), "=&r" (__o0) \
-+ : "1" (__o0), "r" (__o1), "r" (__o2), \
-+ "r" (__g1) \
-+ : "cc"); \
-+ return (type) __res; \
-+}
-+
-+#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
-+type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
-+{ \
-+ unsigned long __res; \
-+ register unsigned long __g1 __asm__("g1") = __NR_##sname; \
-+ register unsigned long __o0 __asm__("o0") = (unsigned long) arg1; \
-+ register unsigned long __o1 __asm__("o1") = (unsigned long) arg2; \
-+ register unsigned long __o2 __asm__("o2") = (unsigned long) arg3; \
-+ register unsigned long __o3 __asm__("o3") = (unsigned long) arg4; \
-+ __asm__ __volatile__("t 0x6d\n\t" \
-+ "sub %%g0, %%o0, %0\n\t" \
-+ "movcc %%xcc, %%o0, %0\n" \
-+ "1:" \
-+ : "=r" (__res), "=&r" (__o0) \
-+ : "1" (__o0), "r" (__o1), "r" (__o2), \
-+ "r" (__o3), "r" (__g1) \
-+ : "cc"); \
-+ return (type) __res; \
-+}
-+
-+#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \
-+type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \
-+{ \
-+ unsigned long __res; \
-+ register unsigned long __g1 __asm__("g1") = __NR_##sname; \
-+ register unsigned long __o0 __asm__("o0") = (unsigned long) arg1; \
-+ register unsigned long __o1 __asm__("o1") = (unsigned long) arg2; \
-+ register unsigned long __o2 __asm__("o2") = (unsigned long) arg3; \
-+ register unsigned long __o3 __asm__("o3") = (unsigned long) arg4; \
-+ register unsigned long __o4 __asm__("o4") = (unsigned long) arg5; \
-+ __asm__ __volatile__("t 0x6d\n\t" \
-+ "sub %%g0, %%o0, %0\n\t" \
-+ "movcc %%xcc, %%o0, %0\n" \
-+ "1:" \
-+ : "=r" (__res), "=&r" (__o0) \
-+ : "1" (__o0), "r" (__o1), "r" (__o2), \
-+ "r" (__o3), "r" (__o4), "r" (__g1) \
-+ : "cc"); \
-+ return (type) __res; \
-+}
-Index: libaio-0.3.109/src/syscall-x86_64.h
-===================================================================
---- libaio-0.3.109.orig/src/syscall-x86_64.h 2009-10-09 11:17:02.000000000 -0700
-+++ libaio-0.3.109/src/syscall-x86_64.h 2013-03-03 07:15:13.000000000 -0800
-@@ -1,8 +1,18 @@
+Description: Add support for x32 (from the Yocto project)
+Author: Daniel Schepler <dschepler@gmail.com>
+Origin: vendor
+Forwarded: no
+Bug-Debian: 702183
+Last-Update: 2013-05-06
+
+
+---
+ harness/main.c | 2 +-
+ src/syscall-x86_64.h | 10 ++++++++++
+ 2 files changed, 11 insertions(+), 1 deletion(-)
+
+--- a/src/syscall-x86_64.h
++++ b/src/syscall-x86_64.h
+@@ -1,5 +1,15 @@
+#ifndef __NR_io_setup
#define __NR_io_setup 206
+#endif
+#ifndef __NR_io_cancel
#define __NR_io_cancel 210
+#endif
-
- #define __syscall_clobber "r11","rcx","memory"
- #define __syscall "syscall"
-@@ -42,10 +52,11 @@
- type fname (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
- { \
- long __res; \
--__asm__ volatile ("movq %5,%%r10 ;" __syscall \
-+register long __a4 asm ("r10") = (long) arg4; \
-+__asm__ volatile (__syscall \
- : "=a" (__res) \
- : "0" (__NR_##sname),"D" ((long)(arg1)),"S" ((long)(arg2)), \
-- "d" ((long)(arg3)),"g" ((long)(arg4)) : __syscall_clobber,"r10" ); \
-+ "d" ((long)(arg3)),"r" (__a4)); \
- return __res; \
- }
-
-@@ -54,10 +65,11 @@
- type fname (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \
- { \
- long __res; \
--__asm__ volatile ("movq %5,%%r10 ; movq %6,%%r8 ; " __syscall \
-+register long __a4 asm ("r10") = (long) arg4; \
-+register long __a5 asm ("r8") = (long) arg5; \
-+__asm__ volatile (__syscall \
- : "=a" (__res) \
- : "0" (__NR_##sname),"D" ((long)(arg1)),"S" ((long)(arg2)), \
-- "d" ((long)(arg3)),"g" ((long)(arg4)),"g" ((long)(arg5)) : \
-- __syscall_clobber,"r8","r10" ); \
-+ "d" ((long)(arg3)),"r" (__a4),"r" (__a5)); \
- return __res; \
- }
-Index: libaio-0.3.109/harness/main.c
-===================================================================
---- libaio-0.3.109.orig/harness/main.c 2013-03-03 06:58:51.000000000 -0800
-+++ libaio-0.3.109/harness/main.c 2013-03-03 07:23:40.000000000 -0800
+--- a/harness/main.c
++++ b/harness/main.c
@@ -14,7 +14,7 @@
#if __LP64__ == 0
#if defined(__i386__) || defined(__powerpc__) || defined(__mips__)
+++ /dev/null
-Description: Fix mips/mipsel syscall wrappers to return correct error values.
-Author: Jurica Stanojkovic <Jurica.Stanojkovic@rt-rk.com>
-Forwarded: no
-Last-Update: 2012-09-24
-
-
-diff -upNr a/src/syscall-mips.h b/src/syscall-mips.h
---- a/src/syscall-mips.h 2012-09-13 11:46:35.652286733 +0200
-+++ b/src/syscall-mips.h 2012-09-13 16:09:17.964407909 +0200
-@@ -76,7 +76,7 @@ type fname(atype a) \
- \
- if (__a3 == 0) \
- return (type) __v0; \
-- return (type) -1; \
-+ return (type) 0 - __v0; \
- }
-
- #define io_syscall2(type,fname,sname,atype,a,btype,b) \
-@@ -100,7 +100,7 @@ type fname(atype a, btype b) \
- \
- if (__a3 == 0) \
- return (type) __v0; \
-- return (type) -1; \
-+ return (type) 0 - __v0; \
- }
-
- #define io_syscall3(type,fname,sname,atype,a,btype,b,ctype,c) \
-@@ -125,7 +125,7 @@ type fname(atype a, btype b, ctype c) \
- \
- if (__a3 == 0) \
- return (type) __v0; \
-- return (type) -1; \
-+ return (type) 0 - __v0; \
- }
-
- #define io_syscall4(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d) \
-@@ -150,7 +150,7 @@ type fname(atype a, btype b, ctype c, dt
- \
- if (__a3 == 0) \
- return (type) __v0; \
-- return (type) -1; \
-+ return (type) 0 - __v0; \
- }
-
- #if (_MIPS_SIM == _MIPS_SIM_ABI32)
-@@ -186,7 +186,7 @@ type fname(atype a, btype b, ctype c, dt
- \
- if (__a3 == 0) \
- return (type) __v0; \
-- return (type) -1; \
-+ return (type) 0 - __v0; \
- }
-
- #endif /* (_MIPS_SIM == _MIPS_SIM_ABI32) */
-@@ -216,7 +216,7 @@ type fname (atype a,btype b,ctype c,dtyp
- \
- if (__a3 == 0) \
- return (type) __v0; \
-- return (type) -1; \
-+ return (type) 0 - __v0; \
- }
-
- #endif /* (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) */
+++ /dev/null
-Description: Fix structure padding for mips64
-Author: Guillem Jover <guillem@debian.org>
-Forwarded: no
-Last-Update: 2014-07-23
-
----
- src/libaio.h | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
---- a/src/libaio.h
-+++ b/src/libaio.h
-@@ -52,7 +52,8 @@ typedef enum io_iocb_cmd {
- /* little endian, 32 bits */
- #if defined(__i386__) || (defined(__arm__) && !defined(__ARMEB__)) || \
- (defined(__sh__) && defined(__LITTLE_ENDIAN__)) || \
-- defined(__bfin__) || defined(__MIPSEL__) || \
-+ defined(__bfin__) || \
-+ (defined(__MIPSEL__) && !defined(__mips64)) || \
- defined(__cris__)
- #define PADDED(x, y) x; unsigned y
- #define PADDEDptr(x, y) x; unsigned y
-@@ -60,6 +61,7 @@ typedef enum io_iocb_cmd {
-
- /* little endian, 64 bits */
- #elif defined(__ia64__) || defined(__x86_64__) || defined(__alpha__) || \
-+ (defined(__mips64) && defined(__MIPSEL__)) || \
- (defined(__aarch64__) && defined(__AARCH64EL__))
- #define PADDED(x, y) x, y
- #define PADDEDptr(x, y) x
-@@ -69,6 +71,7 @@ typedef enum io_iocb_cmd {
- #elif defined(__powerpc64__) || defined(__s390x__) || \
- (defined(__hppa__) && defined(__arch64__)) || \
- (defined(__sparc__) && defined(__arch64__)) || \
-+ (defined(__mips64) && defined(__MIPSEB__)) || \
- (defined(__aarch64__) && defined(__AARCH64EB__))
- #define PADDED(x, y) unsigned y; x
- #define PADDEDptr(x,y) x
include $(TOPDIR)/rules.mk
PKG_NAME:=libarchive
-PKG_VERSION:=3.3.2
+PKG_VERSION:=3.3.3
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.libarchive.org/downloads
-PKG_HASH:=ed2dbd6954792b2c054ccf8ec4b330a54b85904a80cef477a1c74643ddafa0ce
+PKG_SOURCE_URL:=https://www.libarchive.org/downloads
+PKG_HASH:=ba7eb1781c9fbbae178c4c6bad1c6eb08edab9a1496c64833d1715d022b30e2e
PKG_MAINTAINER:=Johannes Morgenroth <morgenroth@ibr.cs.tu-bs.de>
PKG_LICENSE:=BSD-2-Clause
CATEGORY:=Libraries
DEPENDS:=+zlib +liblzma +libbz2 +libexpat
TITLE:=Multi-format archive and compression library
- URL:=http://www.libarchive.org/
+ URL:=https://www.libarchive.org/
endef
define Package/libarchive
PKG_NAME:=libartnet
PKG_VERSION:=1.1.2
-PKG_RELEASE:=1.1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/OpenLightingProject/libartnet/releases/download/1.1.2
--- /dev/null
+diff --git a/artnet/transmit.c b/artnet/transmit.c
+index ce19b11..e882db9 100644
+--- a/artnet/transmit.c
++++ b/artnet/transmit.c
+@@ -163,7 +163,7 @@ int artnet_tx_tod_data(node n, int id) {
+ bloc = 0;
+
+ while (remaining > 0) {
+- memset(&tod.data.toddata.tod,0x00, ARTNET_MAX_UID_COUNT);
++ memset(&tod.data.toddata.tod,0x00, ARTNET_MAX_UID_COUNT * sizeof(tod.data.toddata.tod));
+ lim = min(ARTNET_MAX_UID_COUNT, remaining);
+ tod.data.toddata.blockCount = bloc++;
+ tod.data.toddata.uidCount = lim;
--- /dev/null
+#
+# Copyright (C) 2006-2012 OpenWrt.org
+# Copyright (C) 2017-2018 Luiz Angelo Daros de Luca <luizluca@gmail.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=cups
+PKG_VERSION:=2.2.8
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-source.tar.gz
+PKG_SOURCE_URL:=https://github.com/apple/cups/releases/download/v$(PKG_VERSION)/
+PKG_HASH:=3968fc1d26fc48727508db1c1380e36c6694ab90177fd6920aec5f6cc73af9e4
+PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=LICENSE.txt
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libcups/Default
+ URL:=http://www.cups.org/
+ SUBMENU:=Printing
+endef
+
+define Package/libcups
+$(call Package/cups/Default)
+ SECTION:=libs
+ CATEGORY:=Libraries
+ DEPENDS:=+zlib +libpthread +libpng +libjpeg +libusb-1.0
+ TITLE:=Common UNIX Printing System - Core library
+endef
+
+define Package/libcups/description
+ Common UNIX Printing System - Core library
+endef
+
+TARGET_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib
+
+CONFIGURE_ARGS+=--with-cups-user="nobody" \
+ --with-cups-group="nogroup" \
+ --with-components="core" \
+ --with-pdftops="none" \
+ --without-perl \
+ --without-python \
+ --without-php \
+ --enable-shared \
+ --enable-image \
+ --enable-libusb \
+ --disable-acl \
+ --disable-dbus \
+ --disable-dnssd \
+ --disable-launchd \
+ --disable-ldap \
+ --disable-pam \
+ --disable-slp \
+ --disable-gnutls \
+ --disable-openssl \
+ --disable-cdsassl \
+ --disable-ssl \
+ --disable-gssapi \
+ --disable-tiff \
+ UNAME="Linux" \
+ LIBS="$(TARGET_LDFLAGS) -lz -lpng -ljpeg"
+
+define Build/Compile
+ $(MAKE) -C $(PKG_BUILD_DIR)/cups \
+ $(TARGET_CONFIGURE_OPTS) \
+ DSTROOT="$(PKG_INSTALL_DIR)" \
+ STRIP="/bin/true" \
+ libcups.so.2 install-libs install-headers
+ $(MAKE) -C $(PKG_BUILD_DIR)/filter \
+ $(TARGET_CONFIGURE_OPTS) \
+ DSTROOT="$(PKG_INSTALL_DIR)" \
+ STRIP="/bin/true" \
+ libcupsimage.so.2 install-libs install-headers
+ $(INSTALL_DIR) $(PKG_INSTALL_DIR)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/cups-config $(PKG_INSTALL_DIR)/usr/bin
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(2)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cups-config $(2)/usr/bin/
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/cups $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib*/libcups*.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libcups))
include $(TOPDIR)/rules.mk
PKG_NAME:=libdmapsharing
-PKG_VERSION:=3.9.1
+PKG_VERSION:=3.9.3
PKG_RELEASE:=1
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
PKG_SOURCE:=libdmapsharing-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.flyn.org/projects/libdmapsharing/
-PKG_HASH:=7567888f588d0ee0a017385c09c68ceec0383b3e9b47f0df061a4386a69b1610
+PKG_HASH:=a19df4b6fbd669fc95824860c235aa4aed33b69ecc25eb9d9d6dccb4e98c3f18
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
CATEGORY:=Libraries
DEPENDS:=+libsoup +mdnsresponder +gstreamer1-libs +gstreamer1-plugins-base +gst1-mod-app
TITLE:=libdmapsharing
- URL:=http://www.flyn.org/projects/libdmapsharing/
+ URL:=https://www.flyn.org/projects/libdmapsharing/
endef
define Package/libdmapsharing/decription
+++ /dev/null
---- a/config/config.sub
-+++ b/config/config.sub
-@@ -228,7 +228,7 @@ case $basic_machine in
- | a29k \
- | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
- | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
-- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
-+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
- | c4x | clipper \
- | d10v | d30v | dlx | dsp16xx \
- | fr30 | frv \
-@@ -290,7 +290,7 @@ case $basic_machine in
- | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
- | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
-- | avr-* \
-+ | avr-* | avr32-* \
- | bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c54x-* \
- | clipper-* | cydra-* \
include $(TOPDIR)/rules.mk
PKG_NAME:=libev
-PKG_VERSION:=4.22
+PKG_VERSION:=4.24
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://dist.schmorp.de/libev/Attic/
-PKG_HASH:=736079e8ac543c74d59af73f9c52737b3bfec9601f020bf25a87a4f4d0f01bd6
+PKG_HASH:=973593d3479abdf657674a55afe5f78624b0e440614e2b8cb3a07f16d4d7f821
PKG_LICENSE:=BSD-2-Clause
PKG_MAINTAINER:=Karl Palsson <karlp@tweak.net.au>
include $(TOPDIR)/rules.mk
PKG_NAME:=libevdev
-PKG_VERSION:=1.5.6
+PKG_VERSION:=1.5.9
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=http://www.freedesktop.org/software/libevdev/
-PKG_HASH:=ecec7e9d66b1d3692f10b3b20aa97fb25e874a784c5552a7b1698091fef5a688
+PKG_SOURCE_URL:=https://www.freedesktop.org/software/libevdev/
+PKG_HASH:=e1663751443bed9d3e76a4fe2caf6fa866a79705d91cacad815c04e706198a75
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=COPYING
SECTION:=libs
CATEGORY:=Libraries
TITLE:=a wrapper library for evdev devices
- URL:=http://www.freedesktop.org/wiki/Software/libevdev/
+ URL:=https://www.freedesktop.org/wiki/Software/libevdev/
endef
define Package/libevdev/description
PKG_NAME:=libevhtp
PKG_VERSION:=1.1.6
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_LICENSE:=BSD-3-Clause
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://chromium.googlesource.com/external/github.com/ellzey/libevhtp
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=91071e2f20749cd469b87ac2ef1c158dc2a6806f
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=c9c4415539e78ac9021a8507cd16b9101564dd03286bc84428cc1ee11f0df1fd
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/criticalstack/libevhtp/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=725dd0a32237b2a097cdc2003d09278a082ccce310aaba7441a5fd8fa8f26635
PKG_INSTALL:=1
--- /dev/null
+diff --git a/evhtp.c b/evhtp.c
+index 24687be..b646925 100644
+--- a/evhtp.c
++++ b/evhtp.c
+@@ -1667,9 +1667,9 @@ _evhtp_accept_cb(evserv_t * serv, int fd, struct sockaddr * s, int sl, void * ar
+
+ #ifndef EVHTP_DISABLE_SSL
+ #ifndef EVHTP_DISABLE_EVTHR
+-static unsigned long
+-_evhtp_ssl_get_thread_id(void) {
+- return (unsigned long)pthread_self();
++static void
++_evhtp_ssl_get_thread_id(CRYPTO_THREADID *id) {
++ CRYPTO_THREADID_set_numeric(id, (unsigned long)pthread_self());
+ }
+
+ static void
+@@ -2999,7 +2999,7 @@ evhtp_ssl_use_threads(void) {
+ pthread_mutex_init(&(ssl_locks[i]), NULL);
+ }
+
+- CRYPTO_set_id_callback(_evhtp_ssl_get_thread_id);
++ CRYPTO_THREADID_set_callback(_evhtp_ssl_get_thread_id);
+ CRYPTO_set_locking_callback(_evhtp_ssl_thread_lock);
+
+ return 0;
include $(TOPDIR)/rules.mk
PKG_NAME:=libextractor
-PKG_VERSION:=1.6
+PKG_VERSION:=1.7
PKG_RELEASE:=1
# ToDo:
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
-PKG_HASH:=26d4adca2e381d2a0c8b3037ec85e094ac5d40485623794466cfc176f5bbf69d
+PKG_HASH:=e0a6fde824cf2212c4f217a5e0fc03391251cfb46ca000117f66cf7ae4368e8f
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=COPYING
include $(TOPDIR)/rules.mk
PKG_NAME:=libfastjson
-PKG_VERSION:=0.99.2
-PKG_RELEASE:=2
+PKG_VERSION:=0.99.8
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MIRROR_HASH:=66676a4c8de8c5399dfe1cfd064d140afca58e3d8187bae0a3dccdf83165d9d1
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_URL:=https://github.com/rsyslog/libfastjson.git
-PKG_SOURCE_VERSION:=v$(PKG_VERSION)
+PKG_SOURCE_URL:=http://download.rsyslog.com/libfastjson
+PKG_HASH:=3544c757668b4a257825b3cbc26f800f59ef3c1ff2a260f40f96b48ab1d59e07
PKG_MAINTAINER:=Dov Murik <dmurik@us.ibm.com>
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=COPYING
-PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/rules.mk
PKG_NAME:=libfmt
-PKG_VERSION:=5.1.0
-PKG_RELEASE:=1
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/fmtlib/fmt.git
-PKG_SOURCE_VERSION:=$(PKG_VERSION)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_MIRROR_HASH:=458debd5a0fbfdc36715ce63a0c1b1be84140ee9fbe28232a27c90448630469c
+PKG_VERSION:=5.2.1
+PKG_RELEASE:=2
+
+PKG_SOURCE_NAME:=fmt
+PKG_SOURCE:=$(PKG_SOURCE_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/fmtlib/$(PKG_SOURCE_NAME)/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=3c812a18e9f72a88631ab4732a97ce9ef5bcbefb3235e9fd465f059ba204359b
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_NAME)-$(PKG_VERSION)
PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
PKG_LICENSE:=BSD-2-Clause
PKG_NAME:=libftdi1
PKG_VERSION:=1.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://www.intra2net.com/en/developer/libftdi/download/
--- /dev/null
+--- a/python/CMakeLists.txt
++++ b/python/CMakeLists.txt
+@@ -3,7 +3,7 @@ option ( LINK_PYTHON_LIBRARY "Link again
+
+ if ( PYTHON_BINDINGS )
+ # workaround for cmake bug #0013449
+- if ( NOT DEFINED CMAKE_FIND_ROOT_PATH )
++ if ( NOT DEFINED CMAKE_FIND_ROOT_PATH OR CMAKE_VERSION VERSION_GREATER_EQUAL 3.0.0 )
+ find_package ( SWIG )
+ else ()
+ find_program ( SWIG_EXECUTABLE NAMES swig2.0 swig )
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libgabe
+PKG_VERSION:=0.99
+PKG_RELEASE:=1
+
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
+
+PKG_LICENSE:=GPLv2
+PKG_LICENSE_FILES:=COPYING
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_URL:=https://github.com/schanzen/libgabe.git
+PKG_SOURCE_VERSION:=f72c594eaed35d5a506e8f6c091200a73e17e702
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.xz
+PKG_MIRROR_HASH:=cc5527f7976d904d6c50f40612c5b3d0617342cfc8cf856434a305cfb42e27ff
+
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libgabe
+ SECTION:=libs
+ CATEGORY:=Libraries
+ DEPENDS:=+glib2 +libgcrypt +libgmp +libpbc
+ TITLE:=Ciphertext-Policy Attribute-Based Encryption
+ URL:=https://github.com/schanzen/libgabe
+endef
+
+define Package/libgabe/description
+ This is a fork of the libbswabe library by John Bethencourt
+ (http://hms.isi.jhu.edu/acsc/cpabe/) replacing openssl with libgcrypt
+ and fixing some bugs.
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include/
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
+endef
+
+define Package/libgabe/install
+# static library only
+endef
+
+$(eval $(call BuildPackage,libgabe))
include $(TOPDIR)/rules.mk
PKG_NAME:=libgcrypt
-PKG_VERSION:=1.8.3
+PKG_VERSION:=1.8.4
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://www.gnupg.org/ftp/gcrypt/libgcrypt/
-PKG_HASH:=66ec90be036747602f2b48f98312361a9180c97c68a690a5f376fa0f67d0af7c
+PKG_HASH:=f638143a0672628fde0cad745e9b14deb85dffb175709cacc1f4fe24b93f2227
PKG_LICENSE:=LGPL-2.1+ GPL-2.0+
PKG_LICENSE_FILES:=COPYING
include $(TOPDIR)/rules.mk
PKG_NAME:=glog
-PKG_RELEASE:=1
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/google/glog.git
-PKG_SOURCE_VERSION:=v0.3.5
-PKG_MIRROR_HASH:=4677fba927e2d9cdcbc518c34c88465260d506d88072ea16217a8171310b9a1c
+PKG_VERSION:=0.3.5
+PKG_RELEASE:=2
-PKG_FIXUP:=autoreconf
-PKG_INSTALL:=1
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/google/glog/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=7580e408a2c0b5a89ca214739978ce6ff480b5e7d8d7698a2aa92fadc484d1e0
+PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILE:=COPYING
+PKG_FIXUP:=autoreconf
+
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+
include $(INCLUDE_DIR)/package.mk
define Package/glog
module. Documentation for the implementation is in doc/.
endef
+CONFIGURE_VARS+=ac_cv_have_libunwind_h=0
+
TARGET_CXXFLAGS+=-std=c++11
TARGET_LDFLAGS+=-lpthread
#
# Copyright (C) 2006-2012 OpenWrt.org
-# Copyright (C) 2017 Leonardo Medici
+# Copyright (C) 2017-2018 Leonardo Medici
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=libgphoto2
-PKG_VERSION:=2.5.18
+PKG_VERSION:=2.5.19
PKG_RELEASE:=1
PORT_VERSION:=0.12.0
PKG_MAINTAINER:=Leonardo Medici <leonardo_medici@me.com>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/gphoto
-PKG_HASH:=5b17b89d7ca0ec35c72c94ac3701e87d49e52371f9509b8e5c08c913ae57a7ec
+PKG_HASH:=62523e52e3b8542301e072635b518387f2bd0948347775cf10cb2da9a6612c63
PKG_LICENSE:=LGPL-2.1
PKG_LICENSE_FILES:=COPYING
-Index: libgphoto2-2.5.18/configure.ac
+Index: libgphoto2-2.5.19/configure.ac
===================================================================
---- libgphoto2-2.5.18.orig/configure.ac
-+++ libgphoto2-2.5.18/configure.ac
+--- libgphoto2-2.5.19.orig/configure.ac
++++ libgphoto2-2.5.19/configure.ac
@@ -209,7 +209,6 @@ ALL_LINGUAS="cs da de es eu fr hu it ja
GP_GETTEXT_HACK([${PACKAGE}-${LIBGPHOTO2_CURRENT_MIN}],[The gPhoto Team],[${MAIL_GPHOTO_TRANSLATION}])
AM_GNU_GETTEXT_VERSION([0.14.1])
AM_ICONV()
GP_GETTEXT_FLAGS()
-Index: libgphoto2-2.5.18/libgphoto2_port/configure.ac
+Index: libgphoto2-2.5.19/libgphoto2_port/configure.ac
===================================================================
---- libgphoto2-2.5.18.orig/libgphoto2_port/configure.ac
-+++ libgphoto2-2.5.18/libgphoto2_port/configure.ac
+--- libgphoto2-2.5.19.orig/libgphoto2_port/configure.ac
++++ libgphoto2-2.5.19/libgphoto2_port/configure.ac
@@ -124,7 +124,6 @@ GP_GETTEXT_HACK([${PACKAGE}-${LIBGPHOTO2
ALL_LINGUAS="cs da de es eu fi fr it ja nl pl pt_BR ru sk sr sv uk vi zh_CN zh_TW"
AM_GNU_GETTEXT_VERSION([0.14.1])
-Index: libgphoto2-2.5.18/Makefile.am
+Index: libgphoto2-2.5.19/Makefile.am
===================================================================
---- libgphoto2-2.5.18.orig/Makefile.am
-+++ libgphoto2-2.5.18/Makefile.am
+--- libgphoto2-2.5.19.orig/Makefile.am
++++ libgphoto2-2.5.19/Makefile.am
@@ -8,7 +8,7 @@ bin_SCRIPTS = gphoto2-config
EXTRA_DIST = HACKING MAINTAINERS TESTERS installcheck.mk
EXTRA_DIST += libgphoto2.pc.in
pkgconfig_DATA = libgphoto2.pc
-Index: libgphoto2-2.5.18/Makefile.in
+Index: libgphoto2-2.5.19/Makefile.in
===================================================================
---- libgphoto2-2.5.18.orig/Makefile.in
-+++ libgphoto2-2.5.18/Makefile.in
+--- libgphoto2-2.5.19.orig/Makefile.in
++++ libgphoto2-2.5.19/Makefile.in
@@ -482,7 +482,7 @@ EXTRA_DIST = HACKING MAINTAINERS TESTERS
INSTALL README.in README README.packaging
pkgconfig_DATA = libgphoto2.pc
noinst_DATA = libgphoto2-uninstalled.pc
doc_DATA = AUTHORS COPYING NEWS ABOUT-NLS ChangeLog README \
-Index: libgphoto2-2.5.18/configure.ac
+Index: libgphoto2-2.5.19/configure.ac
===================================================================
---- libgphoto2-2.5.18.orig/configure.ac
-+++ libgphoto2-2.5.18/configure.ac
+--- libgphoto2-2.5.19.orig/configure.ac
++++ libgphoto2-2.5.19/configure.ac
@@ -635,20 +635,11 @@ gphoto-m4/Makefile
libgphoto2/Makefile
libgphoto2.pc
],[
dnl This relies on this code being called for each of the above files
dnl with ac_file set to the filename.
-Index: libgphoto2-2.5.18/libgphoto2_port/Makefile.am
+Index: libgphoto2-2.5.19/libgphoto2_port/Makefile.am
===================================================================
---- libgphoto2-2.5.18.orig/libgphoto2_port/Makefile.am
-+++ libgphoto2-2.5.18/libgphoto2_port/Makefile.am
+--- libgphoto2-2.5.19.orig/libgphoto2_port/Makefile.am
++++ libgphoto2-2.5.19/libgphoto2_port/Makefile.am
@@ -25,7 +25,7 @@ udevscript_PROGRAMS =
bin_SCRIPTS = gphoto2-port-config
########################################################################
-Index: libgphoto2-2.5.18/libgphoto2_port/Makefile.in
+Index: libgphoto2-2.5.19/libgphoto2_port/Makefile.in
===================================================================
---- libgphoto2-2.5.18.orig/libgphoto2_port/Makefile.in
-+++ libgphoto2-2.5.18/libgphoto2_port/Makefile.in
+--- libgphoto2-2.5.19.orig/libgphoto2_port/Makefile.in
++++ libgphoto2-2.5.19/libgphoto2_port/Makefile.in
@@ -574,7 +574,7 @@ EXTRA_LTLIBRARIES = disk.la ptpip.la ser
bin_SCRIPTS = gphoto2-port-config
########################################################################
# All iolibs are defined as EXTRA_LTLIBRARIES. This requires that
-Index: libgphoto2-2.5.18/libgphoto2_port/configure.ac
+Index: libgphoto2-2.5.19/libgphoto2_port/configure.ac
===================================================================
---- libgphoto2-2.5.18.orig/libgphoto2_port/configure.ac
-+++ libgphoto2-2.5.18/libgphoto2_port/configure.ac
+--- libgphoto2-2.5.19.orig/libgphoto2_port/configure.ac
++++ libgphoto2-2.5.19/libgphoto2_port/configure.ac
@@ -512,13 +512,10 @@ AC_SUBST([AM_LDFLAGS])
# ---------------------------------------------------------------------------
AC_CONFIG_FILES([
include $(TOPDIR)/rules.mk
PKG_NAME:=libgpiod
-PKG_VERSION:=1.1
+PKG_VERSION:=1.1.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/software/libs/libgpiod/
-PKG_HASH:=9758466468a7ef3f5e30c182c1303abef6241e665cda4d82a64328a7474838c1
+PKG_HASH:=172fa1544ecb51f37533b3e67862298d50c0a5cc84975f3c0706dc15467f0dfd
PKG_LICENSE:=LGPL-2.1+
PKG_LICENSE_FILES:=COPYING
include $(TOPDIR)/rules.mk
PKG_NAME:=libical
-PKG_VERSION:=1.0
+PKG_VERSION:=3.0.4
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=7c39b3448e4927a2de2775d853f52b3aaeb42400970a3db0b01a78987e6ec0b7
-PKG_SOURCE_URL:=@SF/freeassociation
+PKG_HASH:=72b216e10233c3f60cb06062facf41f3b0f70615e5a60b47f9853341a0d5d145
+PKG_SOURCE_URL:=https://github.com/libical/libical/releases/download/v$(PKG_VERSION)/
-PKG_LICENSE:=LGPL-2.1 MPL-1.0
+PKG_LICENSE:=LGPL-2.1 MPL-2.0
PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
-
-PKG_FIXUP:=libtool
-PKG_INSTALL:=1
+PKG_MAINTAINER:=Jose Zapater <jzapater@gmail.com>
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
define Package/libical
SECTION:=libs
CATEGORY:=Libraries
- TITLE:=iCal (RFC 2445) library
- URL:=http://www.nabber.org/projects/ical/
+ TITLE:=An implementation of iCalendar protocols and data formats
+ URL:=http://libical.github.io/libical/
DEPENDS:=+libpthread
endef
define Package/libical/description
- This package provides a a read/write library of classes for object oriented
- languages (Initial goals of PHP and Python) that implement and enforce the iCal
- standard (RFC 2445).
+ Libical is an Open Source implementation of the iCalendar protocols and protocol
+ data units. The iCalendar specification describes how calendar clients can
+ communicate with calendar servers so users can store their calendar data and
+ arrange meetings with other users.
+ Libical implements RFC2445, RFC2446 and some of RFC2447.
endef
-CONFIGURE_ARGS += \
- --enable-shared \
- --enable-static \
- --disable-cxx \
- --disable-java \
- --disable-python \
+CMAKE_OPTIONS += -DWITH_CXX_BINDINGS=false -DICAL_BUILD_DOCS=false -DICAL_GLIB=false
define Build/InstallDev
- $(INSTALL_DIR) $(1)/usr/include
- $(CP) $(PKG_INSTALL_DIR)/usr/include/{ical.h,libical} $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/include/libical
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/libical/* $(1)/usr/include/libical/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libical{,ss,vcal}.{a,so*} $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
--- /dev/null
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 1cc7180..295bc20 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -161,43 +161,43 @@ endif()
+ # libicu is highly recommended for RSCALE support
+ # libicu can be found at http://www.icu-project.org
+ # RSCALE info at http://tools.ietf.org/html/rfc7529
+-find_package(ICU)
+-set_package_properties(ICU PROPERTIES
+- TYPE RECOMMENDED
+- PURPOSE "For RSCALE (RFC7529) support"
+-)
+-add_feature_info(
+- "RSCALE support (RFC7529)"
+- ICU_FOUND
+- "build in RSCALE support"
+-)
+-if(ICU_FOUND)
+- set(REQUIRES_PRIVATE_ICU "Requires.private: icu-i18n") #for libical.pc
+- set(HAVE_LIBICU 1)
+- if(ICU_MAJOR_VERSION VERSION_GREATER 50)
+- set(HAVE_ICU_DANGI TRUE)
+- else()
+- set(HAVE_ICU_DANGI FALSE)
+- endif()
+-endif()
+-if(ICU_I18N_FOUND)
+- set(HAVE_LIBICU_I18N 1)
+-endif()
++# find_package(ICU)
++# set_package_properties(ICU PROPERTIES
++# TYPE RECOMMENDED
++# PURPOSE "For RSCALE (RFC7529) support"
++# )
++# add_feature_info(
++# "RSCALE support (RFC7529)"
++# ICU_FOUND
++# "build in RSCALE support"
++# )
++# if(ICU_FOUND)
++# set(REQUIRES_PRIVATE_ICU "Requires.private: icu-i18n") #for libical.pc
++# set(HAVE_LIBICU 1)
++# if(ICU_MAJOR_VERSION VERSION_GREATER 50)
++# set(HAVE_ICU_DANGI TRUE)
++# else()
++# set(HAVE_ICU_DANGI FALSE)
++# endif()
++# endif()
++# if(ICU_I18N_FOUND)
++# set(HAVE_LIBICU_I18N 1)
++# endif()
+
+ # compile in Berkeley DB support
+-find_package(BDB)
+-set_package_properties(BDB PROPERTIES
+- TYPE OPTIONAL
+- PURPOSE "For Berkeley DB storage support"
+-)
+-add_feature_info(
+- "Berkeley DB storage support"
+- BDB_FOUND
+- "build in support for Berkeley DB storage"
+-)
+-if(BDB_FOUND)
+- set(HAVE_BDB True)
+-endif()
++# find_package(BDB)
++# set_package_properties(BDB PROPERTIES
++# TYPE OPTIONAL
++# PURPOSE "For Berkeley DB storage support"
++# )
++# add_feature_info(
++# "Berkeley DB storage support"
++# BDB_FOUND
++# "build in support for Berkeley DB storage"
++# )
++# if(BDB_FOUND)
++# set(HAVE_BDB True)
++# endif()
+
+ # MSVC specific definitions
+ if(WIN32)
TITLE:=Library for interfacing with Linux IIO devices
URL:=https://github.com/analogdevicesinc/libiio
DEPENDS:=\
+ +zlib \
+LIBIIO_USB_BACKEND:libusb-1.0 \
+LIBIIO_NETWORK_BACKEND:libavahi-client \
+LIBIIO_XML_BACKEND:libxml2
include $(TOPDIR)/rules.mk
PKG_NAME:=libmraa
-PKG_VERSION:=0.9.0
+PKG_VERSION:=2.0.0
+PKG_RELEASE:=1
-PKG_RELEASE=$(PKG_SOURCE_VERSION)
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/intel-iot-devkit/mraa.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=049ba5fa9f2d18ac0ec6729c46916b34998d3c5f
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=0c81cff6dcfe401ead0d8976c6f9a6a86b75ab38413a45a40b7eb20b639d78e4
-PKG_BUILD_DEPENDS:=node python/host swig/host node/host
-CMAKE_INSTALL:=1
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/intel-iot-devkit/mraa/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=c9f3c3741c6894be5516adecfe6b55a38960b6718b268a9afd645f7955e5a716
+PKG_BUILD_DIR:=$(BUILD_DIR)/mraa-$(PKG_VERSION)
PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
PKG_LICENSE:=LGPL-2.1
+PKG_BUILD_DEPENDS:=node python/host swig/host node/host
+CMAKE_INSTALL:=1
+
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
CMAKE_OPTIONS=-DBUILDARCH=$(CONFIG_ARCH) \
-DENABLEEXAMPLES=0 \
- -DNODE_EXECUTABLE=$(STAGING_DIR_HOSTPKG)/bin/node \
- -DSWIG_DIR=$(STAGING_DIR_HOSTPKG)/bin
+ -DNODE_EXECUTABLE=$(STAGING_DIR_HOSTPKG)/bin/node
TARGET_CFLAGS+=-I$(STAGING_DIR)/usr/include/node
define Package/libmraa
SECTION:=libs
CATEGORY:=Libraries
- DEPENDS:=+python +libstdcpp
+ DEPENDS:=+python +libstdcpp +libjson-c
TITLE:=Intel IoT lowlevel IO library
endef
+++ /dev/null
- CMakeLists.txt | 10 ++++------
- api/mraa/types.h | 1 +
- include/mraa_internal.h | 7 +++++++
- src/CMakeLists.txt | 5 +++++
- src/i2c/i2c.c | 2 +-
- src/mraa.c | 3 +++
- src/uart/uart.c | 1 +
- 7 files changed, 22 insertions(+), 7 deletions(-)
-
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -14,12 +14,7 @@
- set (CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
-
- # Make a version file containing the current version from git.
--include (GetGitRevisionDescription)
--git_describe (VERSION "--tags")
--if ("x_${VERSION}" STREQUAL "x_GIT-NOTFOUND" OR "x_${VERSION}" STREQUAL "x_HEAD-HASH-NOTFOUND" OR "x_${VERSION}" STREQUAL "x_-128-NOTFOUND")
-- message (WARNING " - Install git to compile a production libmraa!")
-- set (VERSION "v0.8.1-dirty")
--endif ()
-+set (VERSION "v0.9.0")
-
- message (INFO " - libmraa Version ${VERSION}")
-
-@@ -84,8 +79,10 @@
- set (X86PLAT ON)
- elseif (DETECTED_ARCH MATCHES "arm.*")
- set (ARMPLAT ON)
-+elseif (DETECTED_ARCH MATCHES "mips")
-+ set (MIPSPLAT ON)
- else ()
-- message(FATAL_ERROR "Only x86 and arm platforms currently supported")
-+ message(FATAL_ERROR "Only x86, arm and mips platforms currently supported")
- endif()
-
- if (BUILDSWIGPYTHON)
---- a/api/mraa/types.h
-+++ b/api/mraa/types.h
-@@ -46,6 +46,7 @@
- MRAA_BEAGLEBONE = 6, /**< The different BeagleBone Black Modes B/C */
- MRAA_BANANA = 7, /**< Allwinner A20 based Banana Pi and Banana Pro */
- MRAA_INTEL_NUC5 = 8, /**< The Intel 5th generations Broadwell NUCs */
-+ MRAA_MTK_LINKIT = 9, /**< Mediatek MT7688 based Linkit (Air) */
-
- // USB platform extenders start at 256
- MRAA_FTDI_FT4222 = 256, /**< FTDI FT4222 USB to i2c bridge */
---- a/include/mraa_internal.h
-+++ b/include/mraa_internal.h
-@@ -66,6 +66,13 @@
- mraa_platform_t mraa_usb_platform_extender(mraa_board_t* board);
-
- /**
-+ * runtime detect running arm platforms
-+ *
-+ * @return mraa_platform_t of the init'ed platform
-+ */
-+mraa_platform_t mraa_mips_platform();
-+
-+/**
- * helper function to check if file exists
- *
- * @param filename to check
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -71,6 +71,11 @@
- add_subdirectory(usb)
- endif ()
-
-+if (MIPSPLAT)
-+ add_subdirectory(mips)
-+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DMIPSPLAT=1")
-+endif()
-+
- set (mraa_LIB_SRCS
- ${mraa_LIB_PLAT_SRCS_NOAUTO}
- # autogenerated version file
---- a/src/i2c/i2c.c
-+++ b/src/i2c/i2c.c
-@@ -31,9 +31,9 @@
- #include <stdlib.h>
- #include <unistd.h>
- #include <fcntl.h>
-+#include <errno.h>
- #include <inttypes.h>
- #include <sys/types.h>
--#include <sys/errno.h>
- #include <sys/ioctl.h>
- #include "linux/i2c-dev.h"
-
---- a/src/mraa.c
-+++ b/src/mraa.c
-@@ -111,6 +111,9 @@
- #elif defined(ARMPLAT)
- // Use runtime ARM platform detection
- platform_type = mraa_arm_platform();
-+#elif MIPSPLAT
-+ // Use runtime ARM platform detection
-+ platform_type = mraa_mips_platform();
- #else
- #error mraa_ARCH NOTHING
- #endif
---- a/src/uart/uart.c
-+++ b/src/uart/uart.c
-@@ -26,6 +26,7 @@
-
- #include <stdlib.h>
- #include <sys/stat.h>
-+#include <sys/time.h>
- #include <unistd.h>
- #include <string.h>
- #include <termios.h>
+++ /dev/null
-From 2c67c6f51ce5bab18c79f4304ccf42716f59f13c Mon Sep 17 00:00:00 2001
-From: John Crispin <blogic@openwrt.org>
-Date: Thu, 23 Jul 2015 13:21:25 +0200
-Subject: [PATCH 2/4] add mips support
-
-Signed-off-by: John Crispin <blogic@openwrt.org>
----
- include/mips/mediatek.h | 39 ++++++
- src/mips/CMakeLists.txt | 6 +
- src/mips/mediatek.c | 349 +++++++++++++++++++++++++++++++++++++++++++++++
- src/mips/mips.c | 60 ++++++++
- 4 files changed, 454 insertions(+)
- create mode 100644 include/mips/mediatek.h
- create mode 100644 src/mips/CMakeLists.txt
- create mode 100644 src/mips/mediatek.c
- create mode 100644 src/mips/mips.c
-
---- /dev/null
-+++ b/include/mips/mediatek.h
-@@ -0,0 +1,39 @@
-+/*
-+ * Author: Thomas Ingleby <thomas.c.ingleby@intel.com>
-+ * Author: Michael Ring <mail@michael-ring.org>
-+ * Copyright (c) 2014 Intel Corporation.
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining
-+ * a copy of this software and associated documentation files (the
-+ * "Software"), to deal in the Software without restriction, including
-+ * without limitation the rights to use, copy, modify, merge, publish,
-+ * distribute, sublicense, and/or sell copies of the Software, and to
-+ * permit persons to whom the Software is furnished to do so, subject to
-+ * the following conditions:
-+ *
-+ * The above copyright notice and this permission notice shall be
-+ * included in all copies or substantial portions of the Software.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-+ */
-+
-+#pragma once
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+#include "mraa_internal.h"
-+
-+mraa_board_t *
-+ mraa_mtk_linkit();
-+
-+#ifdef __cplusplus
-+}
-+#endif
---- /dev/null
-+++ b/src/mips/CMakeLists.txt
-@@ -0,0 +1,6 @@
-+message (INFO " - Adding MIPS platforms")
-+set (mraa_LIB_PLAT_SRCS_NOAUTO ${mraa_LIB_SRCS_NOAUTO}
-+ ${PROJECT_SOURCE_DIR}/src/mips/mips.c
-+ ${PROJECT_SOURCE_DIR}/src/mips/mediatek.c
-+ PARENT_SCOPE
-+)
---- /dev/null
-+++ b/src/mips/mediatek.c
-@@ -0,0 +1,349 @@
-+/*
-+ * Author: Thomas Ingleby <thomas.c.ingleby@intel.com>
-+ * Author: Michael Ring <mail@michael-ring.org>
-+ * Copyright (c) 2014 Intel Corporation.
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining
-+ * a copy of this software and associated documentation files (the
-+ * "Software"), to deal in the Software without restriction, including
-+ * without limitation the rights to use, copy, modify, merge, publish,
-+ * distribute, sublicense, and/or sell copies of the Software, and to
-+ * permit persons to whom the Software is furnished to do so, subject to
-+ * the following conditions:
-+ *
-+ * The above copyright notice and this permission notice shall be
-+ * included in all copies or substantial portions of the Software.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-+ */
-+
-+#include <stdio.h>
-+#include <stdint.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <sys/mman.h>
-+#include <mraa/common.h>
-+
-+#include "mraa_internal.h"
-+
-+#include "common.h"
-+
-+#define PLATFORM_MEDIATEK_LINKIT 1
-+#define PLATFORM_MEDIATEK_LINKIT_AIR 2
-+#define MMAP_PATH "/dev/mem"
-+#define MT7628_GPIO_BASE 0x100
-+#define MT7628_BLOCK_SIZE (4 * 1024)
-+#define MT7628_GPIO_CTRL 0x00
-+#define MT7628_GPIO_DATA 0x20
-+#define MT7628_GPIO_SET 0x30
-+#define MT7628_GPIO_CLEAR 0x40
-+
-+#define MAX_SIZE 64
-+
-+// MMAP
-+static uint8_t* mmap_reg = NULL;
-+static int mmap_fd = 0;
-+static int mmap_size;
-+static unsigned int mmap_count = 0;
-+static int platform_detected = 0;
-+
-+mraa_result_t
-+mraa_mtk_linkit_mmap_write(mraa_gpio_context dev, int value)
-+{
-+ volatile uint32_t* addr;
-+ if (value) {
-+ *(volatile uint32_t*) (mmap_reg + MT7628_GPIO_SET + (dev->pin / 32) * 4) =
-+ (uint32_t)(1 << (dev->pin % 32));
-+ } else {
-+ *(volatile uint32_t*) (mmap_reg + MT7628_GPIO_CLEAR + (dev->pin / 32) * 4) =
-+ (uint32_t)(1 << (dev->pin % 32));
-+ }
-+ return MRAA_SUCCESS;
-+}
-+
-+static mraa_result_t
-+mraa_mtk_linkit_mmap_unsetup()
-+{
-+ if (mmap_reg == NULL) {
-+ syslog(LOG_ERR, "linkit mmap: null register can't unsetup");
-+ return MRAA_ERROR_INVALID_RESOURCE;
-+ }
-+ munmap(mmap_reg, mmap_size);
-+ mmap_reg = NULL;
-+ if (close(mmap_fd) != 0) {
-+ return MRAA_ERROR_INVALID_RESOURCE;
-+ }
-+ return MRAA_SUCCESS;
-+}
-+
-+int
-+mraa_mtk_linkit_mmap_read(mraa_gpio_context dev)
-+{
-+ uint32_t value = *(volatile uint32_t*) (mmap_reg + MT7628_GPIO_DATA + (dev->pin / 32) * 4);
-+ if (value & (uint32_t)(1 << (dev->pin % 32))) {
-+ return 1;
-+ }
-+ return 0;
-+}
-+
-+mraa_result_t
-+mraa_mtk_linkit_mmap_setup(mraa_gpio_context dev, mraa_boolean_t en)
-+{
-+ if (dev == NULL) {
-+ syslog(LOG_ERR, "linkit mmap: context not valid");
-+ return MRAA_ERROR_INVALID_HANDLE;
-+ }
-+
-+ if (en == 0) {
-+ if (dev->mmap_write == NULL && dev->mmap_read == NULL) {
-+ syslog(LOG_ERR, "linkit mmap: can't disable disabled mmap gpio");
-+ return MRAA_ERROR_INVALID_PARAMETER;
-+ }
-+ dev->mmap_write = NULL;
-+ dev->mmap_read = NULL;
-+ mmap_count--;
-+ if (mmap_count == 0) {
-+ return mraa_mtk_linkit_mmap_unsetup();
-+ }
-+ return MRAA_SUCCESS;
-+ }
-+
-+ if (dev->mmap_write != NULL && dev->mmap_read != NULL) {
-+ syslog(LOG_ERR, "linkit mmap: can't enable enabled mmap gpio");
-+ return MRAA_ERROR_INVALID_PARAMETER;
-+ }
-+
-+ // Might need to make some elements of this thread safe.
-+ // For example only allow one thread to enter the following block
-+ // to prevent mmap'ing twice.
-+ if (mmap_reg == NULL) {
-+ if ((mmap_fd = open(MMAP_PATH, O_RDWR)) < 0) {
-+ syslog(LOG_ERR, "linkit map: unable to open resource0 file");
-+ return MRAA_ERROR_INVALID_HANDLE;
-+ }
-+
-+ mmap_reg = (uint8_t*) mmap(NULL, MT7628_BLOCK_SIZE, PROT_READ | PROT_WRITE,
-+ MAP_FILE | MAP_SHARED, mmap_fd, MT7628_GPIO_BASE);
-+ if (mmap_reg == MAP_FAILED) {
-+ syslog(LOG_ERR, "linkit mmap: failed to mmap");
-+ mmap_reg = NULL;
-+ close(mmap_fd);
-+ return MRAA_ERROR_NO_RESOURCES;
-+ }
-+ }
-+ dev->mmap_write = &mraa_mtk_linkit_mmap_write;
-+ dev->mmap_read = &mraa_mtk_linkit_mmap_read;
-+ mmap_count++;
-+
-+ return MRAA_SUCCESS;
-+}
-+
-+mraa_board_t*
-+mraa_mtk_linkit()
-+{
-+ mraa_board_t* b = (mraa_board_t*) malloc(sizeof(mraa_board_t));
-+ if (b == NULL) {
-+ return NULL;
-+ }
-+
-+ b->platform_name = "LINKIT";
-+ platform_detected = PLATFORM_MEDIATEK_LINKIT;
-+ b->phy_pin_count = 31;
-+
-+ b->aio_count = 0;
-+ b->adc_raw = 0;
-+ b->adc_supported = 0;
-+ b->pwm_default_period = 500;
-+ b->pwm_max_period = 2147483;
-+ b->pwm_min_period = 1;
-+
-+ b->pins = (mraa_pininfo_t*) malloc(sizeof(mraa_pininfo_t) * b->phy_pin_count);
-+
-+ advance_func->gpio_mmap_setup = &mraa_mtk_linkit_mmap_setup;
-+
-+ strncpy(b->pins[0].name, "P0", MRAA_PIN_NAME_SIZE);
-+ b->pins[0].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 };
-+
-+ strncpy(b->pins[1].name, "P1", MRAA_PIN_NAME_SIZE);
-+ b->pins[1].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 };
-+
-+ strncpy(b->pins[2].name, "P2", MRAA_PIN_NAME_SIZE);
-+ b->pins[2].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 };
-+
-+ strncpy(b->pins[3].name, "P3", MRAA_PIN_NAME_SIZE);
-+ b->pins[3].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 };
-+
-+ strncpy(b->pins[4].name, "P4", MRAA_PIN_NAME_SIZE);
-+ b->pins[4].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 };
-+
-+ strncpy(b->pins[5].name, "P5", MRAA_PIN_NAME_SIZE);
-+ b->pins[5].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 };
-+
-+ strncpy(b->pins[6].name, "P6", MRAA_PIN_NAME_SIZE);
-+ b->pins[6].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 };
-+
-+ strncpy(b->pins[7].name, "P7", MRAA_PIN_NAME_SIZE);
-+ b->pins[7].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 };
-+
-+ strncpy(b->pins[8].name, "P8", MRAA_PIN_NAME_SIZE);
-+ b->pins[8].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 };
-+ b->pins[8].gpio.pinmap = 21;
-+ b->pins[8].uart.parent_id = 2;
-+ b->pins[8].uart.mux_total = 0;
-+
-+ strncpy(b->pins[9].name, "P9", MRAA_PIN_NAME_SIZE);
-+ b->pins[9].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 };
-+ b->pins[9].gpio.pinmap = 20;
-+ b->pins[9].uart.parent_id = 2;
-+ b->pins[9].uart.mux_total = 0;
-+
-+ strncpy(b->pins[10].name, "P10", MRAA_PIN_NAME_SIZE);
-+ b->pins[10].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
-+ b->pins[10].gpio.pinmap = 2;
-+
-+ strncpy(b->pins[11].name, "P11", MRAA_PIN_NAME_SIZE);
-+ b->pins[11].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
-+ b->pins[11].gpio.pinmap = 3;
-+
-+ strncpy(b->pins[12].name, "P12", MRAA_PIN_NAME_SIZE);
-+ b->pins[12].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
-+ b->pins[12].gpio.pinmap = 0;
-+
-+ strncpy(b->pins[13].name, "P13", MRAA_PIN_NAME_SIZE);
-+ b->pins[13].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
-+ b->pins[13].gpio.pinmap = 1;
-+
-+ strncpy(b->pins[14].name, "P14", MRAA_PIN_NAME_SIZE);
-+ b->pins[14].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 };
-+
-+ strncpy(b->pins[15].name, "P15", MRAA_PIN_NAME_SIZE);
-+ b->pins[15].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
-+ b->pins[15].gpio.pinmap = 44;
-+
-+ strncpy(b->pins[16].name, "P16", MRAA_PIN_NAME_SIZE);
-+ b->pins[16].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 };
-+ b->pins[16].gpio.pinmap = 46;
-+ b->pins[16].uart.parent_id = 1;
-+ b->pins[16].uart.mux_total = 0;
-+
-+ strncpy(b->pins[17].name, "P17", MRAA_PIN_NAME_SIZE);
-+ b->pins[17].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 };
-+ b->pins[17].gpio.pinmap = 45;
-+ b->pins[17].uart.parent_id = 1;
-+ b->pins[17].uart.mux_total = 0;
-+
-+ strncpy(b->pins[18].name, "P18", MRAA_PIN_NAME_SIZE);
-+ b->pins[18].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 };
-+ b->pins[18].gpio.pinmap = 13;
-+ b->pins[18].uart.parent_id = 1;
-+ b->pins[18].uart.mux_total = 0;
-+
-+ strncpy(b->pins[19].name, "P19", MRAA_PIN_NAME_SIZE);
-+ b->pins[19].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 };
-+ b->pins[19].gpio.pinmap = 12;
-+ b->pins[19].uart.parent_id = 0;
-+ b->pins[19].uart.mux_total = 0;
-+
-+ strncpy(b->pins[20].name, "P20", MRAA_PIN_NAME_SIZE);
-+ b->pins[20].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 1, 0, 0 };
-+ b->pins[20].gpio.pinmap = 5;
-+ b->pins[20].i2c.pinmap = 0;
-+ b->pins[20].i2c.mux_total = 0;
-+
-+ strncpy(b->pins[21].name, "P21", MRAA_PIN_NAME_SIZE);
-+ b->pins[21].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 1, 0, 0 };
-+ b->pins[21].gpio.pinmap = 4;
-+ b->pins[21].i2c.pinmap = 0;
-+ b->pins[21].i2c.mux_total = 0;
-+
-+ strncpy(b->pins[22].name, "P22", MRAA_PIN_NAME_SIZE);
-+ b->pins[22].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 1, 0, 0, 0 };
-+ b->pins[22].gpio.pinmap = 8;
-+ b->pins[22].spi.pinmap = 0;
-+ b->pins[22].spi.mux_total = 0;
-+
-+ strncpy(b->pins[23].name, "P23", MRAA_PIN_NAME_SIZE);
-+ b->pins[23].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 1, 0, 0, 0 };
-+ b->pins[23].gpio.pinmap = 9;
-+ b->pins[23].spi.pinmap = 0;
-+ b->pins[23].spi.mux_total = 0;
-+
-+ strncpy(b->pins[24].name, "P24", MRAA_PIN_NAME_SIZE);
-+ b->pins[24].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 1, 0, 0, 0 };
-+ b->pins[24].gpio.pinmap = 7;
-+ b->pins[24].spi.pinmap = 0;
-+ b->pins[24].spi.mux_total = 0;
-+
-+ strncpy(b->pins[25].name, "P25", MRAA_PIN_NAME_SIZE);
-+ b->pins[25].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 1, 0, 0, 0 };
-+ b->pins[25].gpio.pinmap = 6;
-+ b->pins[25].spi.pinmap = 0;
-+ b->pins[25].spi.mux_total = 0;
-+
-+ strncpy(b->pins[26].name, "P26", MRAA_PIN_NAME_SIZE);
-+ b->pins[26].capabilites = (mraa_pincapabilities_t){ 1, 1, 1, 0, 0, 0, 0, 0 };
-+ b->pins[26].gpio.pinmap = 18;
-+
-+ strncpy(b->pins[27].name, "P27", MRAA_PIN_NAME_SIZE);
-+ b->pins[27].capabilites = (mraa_pincapabilities_t){ 1, 1, 1, 0, 0, 0, 0, 0 };
-+ b->pins[27].gpio.pinmap = 19;
-+
-+ strncpy(b->pins[28].name, "P28", MRAA_PIN_NAME_SIZE);
-+ b->pins[28].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
-+ b->pins[28].gpio.pinmap = 16;
-+
-+ strncpy(b->pins[29].name, "P29", MRAA_PIN_NAME_SIZE);
-+ b->pins[29].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
-+ b->pins[29].gpio.pinmap = 17;
-+
-+ strncpy(b->pins[30].name, "P30", MRAA_PIN_NAME_SIZE);
-+ b->pins[30].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
-+ b->pins[30].gpio.pinmap = 14;
-+
-+ strncpy(b->pins[31].name, "P31", MRAA_PIN_NAME_SIZE);
-+ b->pins[31].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
-+ b->pins[31].gpio.pinmap = 15;
-+
-+ // BUS DEFINITIONS
-+ b->i2c_bus_count = 1;
-+ b->def_i2c_bus = 0;
-+ b->i2c_bus[0].bus_id = 0;
-+ b->i2c_bus[0].sda = 20;
-+ b->i2c_bus[0].scl = 21;
-+
-+ b->spi_bus_count = 1;
-+ b->def_spi_bus = 0;
-+ b->spi_bus[0].bus_id = 0;
-+ b->spi_bus[0].slave_s = 0;
-+ b->spi_bus[0].cs = 25;
-+ b->spi_bus[0].mosi = 22;
-+ b->spi_bus[0].miso = 23;
-+ b->spi_bus[0].sclk = 21;
-+
-+ b->uart_dev_count = 3;
-+ b->def_uart_dev = 0;
-+ b->uart_dev[0].rx = 18;
-+ b->uart_dev[0].tx = 19;
-+
-+ b->uart_dev[1].rx = 16;
-+ b->uart_dev[1].tx = 17;
-+
-+ b->uart_dev[2].rx = 9;
-+ b->uart_dev[2].tx = 8;
-+
-+ b->gpio_count = 0;
-+ int i;
-+ for (i = 0; i < b->phy_pin_count; i++) {
-+ if (b->pins[i].capabilites.gpio) {
-+ b->gpio_count++;
-+ }
-+ }
-+
-+ return b;
-+}
---- /dev/null
-+++ b/src/mips/mips.c
-@@ -0,0 +1,60 @@
-+/*
-+ * Author: Thomas Ingleby <thomas.c.ingleby@intel.com>
-+ * Author: Michael Ring <mail@michael-ring.org>
-+ * Copyright (c) 2014 Intel Corporation.
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining
-+ * a copy of this software and associated documentation files (the
-+ * "Software"), to deal in the Software without restriction, including
-+ * without limitation the rights to use, copy, modify, merge, publish,
-+ * distribute, sublicense, and/or sell copies of the Software, and to
-+ * permit persons to whom the Software is furnished to do so, subject to
-+ * the following conditions:
-+ *
-+ * The above copyright notice and this permission notice shall be
-+ * included in all copies or substantial portions of the Software.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-+ */
-+
-+#include <stdlib.h>
-+#include <string.h>
-+
-+#include "mraa_internal.h"
-+#include "mips/mediatek.h"
-+
-+mraa_platform_t
-+mraa_mips_platform()
-+{
-+ mraa_platform_t platform_type = MRAA_UNKNOWN_PLATFORM;
-+ size_t len = 100;
-+ char* line = malloc(len);
-+ FILE* fh = fopen("/proc/cpuinfo", "r");
-+ if (fh != NULL) {
-+ while (getline(&line, &len, fh) != -1) {
-+ if (strncmp(line, "machine", 7) == 0) {
-+ if (strstr(line, "MediaTek LinkIt Smart 7688")) {
-+ platform_type = MRAA_MTK_LINKIT;
-+ }
-+ }
-+ }
-+ fclose(fh);
-+ }
-+ free(line);
-+
-+ switch (platform_type) {
-+ case MRAA_MTK_LINKIT:
-+ plat = mraa_mtk_linkit();
-+ break;
-+ default:
-+ plat = NULL;
-+ syslog(LOG_ERR, "Unknown Platform, currently not supported by MRAA");
-+ }
-+ return platform_type;
-+}
+++ /dev/null
-From 9540f9b93704e8e80ab2048954ca88d8e6eddf86 Mon Sep 17 00:00:00 2001
-From: John Crispin <blogic@openwrt.org>
-Date: Thu, 23 Jul 2015 16:43:42 +0200
-Subject: [PATCH 3/4] uart
-
----
- src/uart/uart.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/src/uart/uart.c b/src/uart/uart.c
-index 3ef55a4..5102f81 100644
---- a/src/uart/uart.c
-+++ b/src/uart/uart.c
-@@ -34,6 +34,9 @@
- #include "uart.h"
- #include "mraa_internal.h"
-
-+#ifndef CMSPAR
-+#define CMSPAR 010000000000
-+#endif
- // This function takes an unsigned int and converts it to a B* speed_t
- // that can be used with linux/posix termios
- static speed_t
---
-1.7.10.4
-
+++ /dev/null
-From 3c34e5f87a741ec2fc7809fc8c169a832275d32c Mon Sep 17 00:00:00 2001
-From: John Crispin <blogic@openwrt.org>
-Date: Thu, 23 Jul 2015 18:19:32 +0200
-Subject: [PATCH 4/4] fixes
-
----
- src/mips/mediatek.c | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
---- a/src/mips/mediatek.c
-+++ b/src/mips/mediatek.c
-@@ -37,12 +37,12 @@
- #define PLATFORM_MEDIATEK_LINKIT 1
- #define PLATFORM_MEDIATEK_LINKIT_AIR 2
- #define MMAP_PATH "/dev/mem"
--#define MT7628_GPIO_BASE 0x100
--#define MT7628_BLOCK_SIZE (4 * 1024)
--#define MT7628_GPIO_CTRL 0x00
--#define MT7628_GPIO_DATA 0x20
--#define MT7628_GPIO_SET 0x30
--#define MT7628_GPIO_CLEAR 0x40
-+#define MT7628_GPIOMODE_BASE 0x10000000
-+#define MT7628_BLOCK_SIZE 0x1000
-+#define MT7628_GPIO_CTRL 0x600
-+#define MT7628_GPIO_DATA 0x620
-+#define MT7628_GPIO_SET 0x630
-+#define MT7628_GPIO_CLEAR 0x640
-
- #define MAX_SIZE 64
-
-@@ -50,6 +50,9 @@
- static uint8_t* mmap_reg = NULL;
- static int mmap_fd = 0;
- static int mmap_size;
-+static uint8_t* gpio_mmap_reg = NULL;
-+static int gpio_mmap_fd = 0;
-+static int gpio_mmap_size;
- static unsigned int mmap_count = 0;
- static int platform_detected = 0;
-
-@@ -129,9 +132,10 @@
- }
-
- mmap_reg = (uint8_t*) mmap(NULL, MT7628_BLOCK_SIZE, PROT_READ | PROT_WRITE,
-- MAP_FILE | MAP_SHARED, mmap_fd, MT7628_GPIO_BASE);
-+ MAP_FILE | MAP_SHARED, mmap_fd, 0x10000000);
- if (mmap_reg == MAP_FAILED) {
-- syslog(LOG_ERR, "linkit mmap: failed to mmap");
-+ perror("foo");
-+ syslog(LOG_ERR, "linkit mmap: failed to mmap");
- mmap_reg = NULL;
- close(mmap_fd);
- return MRAA_ERROR_NO_RESOURCES;
-@@ -144,201 +148,442 @@
- return MRAA_SUCCESS;
- }
-
-+static int mmap_gpiomode(void)
-+{
-+ if ((gpio_mmap_fd = open(MMAP_PATH, O_RDWR)) < 0) {
-+ syslog(LOG_ERR, "linkit map: unable to open resource0 file");
-+ return MRAA_ERROR_INVALID_HANDLE;
-+ }
-+
-+ gpio_mmap_reg = (uint8_t*) mmap(NULL, MT7628_BLOCK_SIZE, PROT_READ | PROT_WRITE,
-+ MAP_FILE | MAP_SHARED, gpio_mmap_fd, MT7628_GPIOMODE_BASE);
-+ if (gpio_mmap_reg == MAP_FAILED) {
-+ syslog(LOG_ERR, "linkit gpio_mmap: failed to mmap");
-+ gpio_mmap_reg = NULL;
-+ close(gpio_mmap_fd);
-+ return MRAA_ERROR_NO_RESOURCES;
-+ }
-+ return 0;
-+}
-+
-+static void set_gpiomode(unsigned int mask, unsigned int shift, unsigned int val)
-+{
-+ unsigned int reg;
-+ unsigned int offset = 0x60;
-+
-+ if (shift >= 32) {
-+ shift -= 32;
-+ offset += 4;
-+ }
-+
-+ reg = *(volatile uint32_t*) (gpio_mmap_reg + offset);
-+
-+ reg &= ~(mask << shift);
-+ reg |= (val << shift);
-+ *(volatile uint32_t*) (gpio_mmap_reg + offset) = reg;
-+}
-+
-+enum {
-+ MUX_GPIO = 0,
-+ MUX_SPI_S,
-+ MUX_SPI_CS1,
-+ MUX_I2S,
-+ MUX_UART0,
-+ MUX_I2C,
-+ MUX_UART1,
-+ MUX_UART2,
-+ MUX_PWM0,
-+ MUX_PWM1,
-+ MUX_EPHY,
-+ MUX_WLED,
-+ __MUX_MAX,
-+};
-+
-+static unsigned char gpio_mux_groups[64];
-+static struct pinmux {
-+ char *name;
-+ char *func[4];
-+ unsigned int shift;
-+ unsigned int mask;
-+} mt7688_mux[] = {
-+ {
-+ .name = "refclk",
-+ .func = { "refclk", "gpio", NULL, NULL },
-+ .shift = 18,
-+ .mask = 0x1,
-+ }, {
-+ .name = "spi_s",
-+ .func = { "spi_s", "gpio", "utif", "pwm" },
-+ .shift = 2,
-+ .mask = 0x3,
-+ }, {
-+ .name = "spi_cs1",
-+ .func = { "spi_cs1", "gpio", NULL, "refclk" },
-+ .shift = 4,
-+ .mask = 0x3,
-+ }, {
-+ .name = "i2s",
-+ .func = { "i2s", "gpio", "pcm", NULL },
-+ .shift = 6,
-+ .mask = 0x3,
-+ }, {
-+ .name = "uart0",
-+ .func = { "uart", "gpio", NULL, NULL },
-+ .shift = 8,
-+ .mask = 0x3,
-+ }, {
-+ .name = "i2c",
-+ .func = { "i2c", "gpio", NULL, NULL },
-+ .shift = 20,
-+ .mask = 0x3,
-+ }, {
-+ .name = "uart1",
-+ .func = { "uart", "gpio", NULL, NULL },
-+ .shift = 24,
-+ .mask = 0x3,
-+ }, {
-+ .name = "uart2",
-+ .func = { "uart", "gpio", "pwm", NULL },
-+ .shift = 26,
-+ .mask = 0x3,
-+ }, {
-+ .name = "pwm0",
-+ .func = { "pwm", "gpio", NULL, NULL },
-+ .shift = 28,
-+ .mask = 0x3,
-+ }, {
-+ .name = "pwm1",
-+ .func = { "pwm", "gpio", NULL, NULL },
-+ .shift = 30,
-+ .mask = 0x3,
-+ }, {
-+ .name = "ephy",
-+ .func = { "ephy", "gpio", NULL, NULL },
-+ .shift = 34,
-+ .mask = 0x3,
-+ }, {
-+ .name = "wled",
-+ .func = { "wled", "gpio", NULL, NULL },
-+ .shift = 32,
-+ .mask = 0x3,
-+ },
-+};
-+
-+mraa_result_t gpio_init_pre(int pin)
-+{
-+ struct pinmux *m = &mt7688_mux[gpio_mux_groups[pin]];
-+
-+ set_gpiomode(m->mask, m->shift, 1);
-+
-+ return 0;
-+}
-+
-+static void gpiomode_set(unsigned int id, char *name)
-+{
-+ int i;
-+
-+ if (id >= __MUX_MAX)
-+ return;
-+
-+ for (i = 0; i < 4; i++) {
-+ if (!mt7688_mux[id].func[i] || strcmp(mt7688_mux[id].func[i], name))
-+ continue;
-+ set_gpiomode(mt7688_mux[id].mask, mt7688_mux[id].shift, i);
-+ syslog(0, "mraa: set pinmux %s -> %s\n", mt7688_mux[id].name, name);
-+ return;
-+ }
-+}
-+
-+mraa_result_t i2c_init_pre(unsigned int bus)
-+{
-+ gpiomode_set(MUX_I2C, "i2c");
-+ return 0;
-+}
-+
-+mraa_result_t
-+pwm_init_post(mraa_pwm_context pwm)
-+{
-+ switch(pwm->pin) {
-+ case 0:
-+ gpiomode_set(MUX_PWM0, "pwm");
-+ break;
-+ case 1:
-+ gpiomode_set(MUX_PWM1, "pwm");
-+ break;
-+ case 2:
-+ case 3:
-+ gpiomode_set(MUX_UART2, "pwm");
-+ break;
-+ }
-+ return 0;
-+}
-+
-+mraa_result_t spi_init_pre(int bus)
-+{
-+ gpiomode_set(MUX_SPI_CS1, "spi_cs1");
-+ return 0;
-+}
-+
-+mraa_result_t uart_init_pre(int index)
-+{
-+ switch(index) {
-+ case 0:
-+ gpiomode_set(MUX_UART0, "uart");
-+ break;
-+ case 1:
-+ gpiomode_set(MUX_UART1, "uart");
-+ break;
-+ case 2:
-+ gpiomode_set(MUX_UART2, "uart");
-+ break;
-+ }
-+ return 0;
-+}
-+
-+mraa_result_t
-+i2c_freq(mraa_i2c_context dev, mraa_i2c_mode_t mode)
-+{
-+ switch (mode) {
-+ case MRAA_I2C_STD:
-+ break;
-+ default:
-+ syslog(LOG_ERR, "Invalid i2c frequency");
-+ break;
-+ }
-+ return MRAA_SUCCESS;
-+}
-+
-+
- mraa_board_t*
- mraa_mtk_linkit()
- {
-+ int i;
-+
-+ if (mmap_gpiomode())
-+ return NULL;
-+
- mraa_board_t* b = (mraa_board_t*) malloc(sizeof(mraa_board_t));
- if (b == NULL) {
- return NULL;
- }
-
-- b->platform_name = "LINKIT";
-+ memset(b, 0, sizeof(mraa_board_t));
-+
-+ b->platform_name = "LinkIt Smart 7688";
- platform_detected = PLATFORM_MEDIATEK_LINKIT;
-- b->phy_pin_count = 31;
-+ b->phy_pin_count = 64;
-
- b->aio_count = 0;
- b->adc_raw = 0;
- b->adc_supported = 0;
- b->pwm_default_period = 500;
-- b->pwm_max_period = 2147483;
-+ b->pwm_max_period = 1000000;
- b->pwm_min_period = 1;
-
-- b->pins = (mraa_pininfo_t*) malloc(sizeof(mraa_pininfo_t) * b->phy_pin_count);
--
-- advance_func->gpio_mmap_setup = &mraa_mtk_linkit_mmap_setup;
--
-- strncpy(b->pins[0].name, "P0", MRAA_PIN_NAME_SIZE);
-- b->pins[0].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 };
--
-- strncpy(b->pins[1].name, "P1", MRAA_PIN_NAME_SIZE);
-- b->pins[1].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 };
--
-- strncpy(b->pins[2].name, "P2", MRAA_PIN_NAME_SIZE);
-- b->pins[2].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 };
--
-- strncpy(b->pins[3].name, "P3", MRAA_PIN_NAME_SIZE);
-- b->pins[3].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 };
--
-- strncpy(b->pins[4].name, "P4", MRAA_PIN_NAME_SIZE);
-- b->pins[4].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 };
--
-- strncpy(b->pins[5].name, "P5", MRAA_PIN_NAME_SIZE);
-- b->pins[5].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 };
--
-- strncpy(b->pins[6].name, "P6", MRAA_PIN_NAME_SIZE);
-- b->pins[6].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 };
--
-- strncpy(b->pins[7].name, "P7", MRAA_PIN_NAME_SIZE);
-- b->pins[7].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 };
--
-- strncpy(b->pins[8].name, "P8", MRAA_PIN_NAME_SIZE);
-- b->pins[8].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 };
-- b->pins[8].gpio.pinmap = 21;
-- b->pins[8].uart.parent_id = 2;
-- b->pins[8].uart.mux_total = 0;
-+ b->adv_func = (mraa_adv_func_t*) calloc(1, sizeof(mraa_adv_func_t));
-+ if (b->adv_func == NULL) {
-+ return NULL;
-+ }
-
-- strncpy(b->pins[9].name, "P9", MRAA_PIN_NAME_SIZE);
-- b->pins[9].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 };
-- b->pins[9].gpio.pinmap = 20;
-- b->pins[9].uart.parent_id = 2;
-- b->pins[9].uart.mux_total = 0;
-+ b->adv_func->i2c_init_pre = i2c_init_pre;
-+ b->adv_func->pwm_init_post = pwm_init_post;
-+ b->adv_func->spi_init_pre = spi_init_pre;
-+ b->adv_func->uart_init_pre = uart_init_pre;
-+ b->adv_func->gpio_init_pre = gpio_init_pre;
-+ b->adv_func->i2c_set_frequency_replace = &i2c_freq;
-
-- strncpy(b->pins[10].name, "P10", MRAA_PIN_NAME_SIZE);
-- b->pins[10].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
-- b->pins[10].gpio.pinmap = 2;
-+ b->pins = (mraa_pininfo_t*) malloc(sizeof(mraa_pininfo_t) * b->phy_pin_count);
-
-- strncpy(b->pins[11].name, "P11", MRAA_PIN_NAME_SIZE);
-- b->pins[11].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
-- b->pins[11].gpio.pinmap = 3;
-+ memset(b->pins, 0, sizeof(mraa_pininfo_t) * b->phy_pin_count);
-+ memset(gpio_mux_groups, -1, sizeof(gpio_mux_groups));
-
-- strncpy(b->pins[12].name, "P12", MRAA_PIN_NAME_SIZE);
-- b->pins[12].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
-- b->pins[12].gpio.pinmap = 0;
-+ b->adv_func->gpio_mmap_setup = &mraa_mtk_linkit_mmap_setup;
-
-- strncpy(b->pins[13].name, "P13", MRAA_PIN_NAME_SIZE);
-- b->pins[13].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
-- b->pins[13].gpio.pinmap = 1;
-+ for (i = 0; i < b->phy_pin_count; i++) {
-+ snprintf(b->pins[i].name, MRAA_PIN_NAME_SIZE, "GPIO%d", i);
-+ b->pins[i].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 };
-+ }
-
-- strncpy(b->pins[14].name, "P14", MRAA_PIN_NAME_SIZE);
-- b->pins[14].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 };
-+ strncpy(b->pins[43].name, "GPIO43", MRAA_PIN_NAME_SIZE);
-+ b->pins[43].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
-+ b->pins[43].gpio.pinmap = 43;
-+ gpio_mux_groups[43] = MUX_EPHY;
-+
-+ strncpy(b->pins[20].name, "GPIO20", MRAA_PIN_NAME_SIZE);
-+ b->pins[20].capabilites = (mraa_pincapabilities_t){ 1, 1, 1, 0, 0, 0, 0, 1 };
-+ b->pins[20].gpio.pinmap = 20;
-+ b->pins[20].uart.parent_id = 2;
-+ b->pins[20].uart.mux_total = 0;
-+ b->pins[20].pwm.parent_id = 0;
-+ b->pins[20].pwm.pinmap = 2;
-+ gpio_mux_groups[20] = MUX_UART2;
-+
-+ strncpy(b->pins[21].name, "GPIO21", MRAA_PIN_NAME_SIZE);
-+ b->pins[21].capabilites = (mraa_pincapabilities_t){ 1, 1, 1, 0, 0, 0, 0, 1 };
-+ b->pins[21].gpio.pinmap = 21;
-+ b->pins[21].uart.parent_id = 2;
-+ b->pins[21].uart.mux_total = 0;
-+ b->pins[21].pwm.parent_id = 0;
-+ b->pins[21].pwm.pinmap = 3;
-+ gpio_mux_groups[21] = MUX_UART2;
-+
-+ strncpy(b->pins[2].name, "GPIO2", MRAA_PIN_NAME_SIZE);
-+ b->pins[2].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
-+ b->pins[2].gpio.pinmap = 2;
-+ gpio_mux_groups[2] = MUX_I2S;
-+
-+ strncpy(b->pins[3].name, "GPIO3", MRAA_PIN_NAME_SIZE);
-+ b->pins[3].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
-+ b->pins[3].gpio.pinmap = 3;
-+ gpio_mux_groups[3] = MUX_I2S;
-+
-+ strncpy(b->pins[0].name, "GPIO0", MRAA_PIN_NAME_SIZE);
-+ b->pins[0].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
-+ b->pins[0].gpio.pinmap = 0;
-+ gpio_mux_groups[0] = MUX_I2S;
-+
-+ strncpy(b->pins[1].name, "GPIO1", MRAA_PIN_NAME_SIZE);
-+ b->pins[1].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
-+ b->pins[1].gpio.pinmap = 1;
-+ gpio_mux_groups[1] = MUX_I2S;
-+
-+ strncpy(b->pins[37].name, "GPIO37", MRAA_PIN_NAME_SIZE);
-+ b->pins[37].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
-+ b->pins[37].gpio.pinmap = 37;
-+ gpio_mux_groups[37] = MUX_GPIO;
-+
-+ strncpy(b->pins[44].name, "GPIO44", MRAA_PIN_NAME_SIZE);
-+ b->pins[44].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
-+ b->pins[44].gpio.pinmap = 44;
-+ gpio_mux_groups[44] = MUX_WLED;
-+
-+ strncpy(b->pins[46].name, "GPIO46", MRAA_PIN_NAME_SIZE);
-+ b->pins[46].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 };
-+ b->pins[46].gpio.pinmap = 46;
-+ b->pins[46].uart.parent_id = 1;
-+ b->pins[46].uart.mux_total = 0;
-+ gpio_mux_groups[46] = MUX_UART1;
-+
-+ strncpy(b->pins[45].name, "GPIO45", MRAA_PIN_NAME_SIZE);
-+ b->pins[45].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 };
-+ b->pins[45].gpio.pinmap = 45;
-+ b->pins[45].uart.parent_id = 1;
-+ b->pins[45].uart.mux_total = 0;
-+ gpio_mux_groups[45] = MUX_UART1;
-+
-+ strncpy(b->pins[13].name, "GPIO13", MRAA_PIN_NAME_SIZE);
-+ b->pins[13].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 };
-+ b->pins[13].gpio.pinmap = 13;
-+ b->pins[13].uart.parent_id = 1;
-+ b->pins[13].uart.mux_total = 0;
-+ gpio_mux_groups[13] = MUX_UART0;
-+
-+ strncpy(b->pins[12].name, "GPIO12", MRAA_PIN_NAME_SIZE);
-+ b->pins[12].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 };
-+ b->pins[12].gpio.pinmap = 12;
-+ b->pins[12].uart.parent_id = 0;
-+ b->pins[12].uart.mux_total = 0;
-+ gpio_mux_groups[12] = MUX_UART0;
-+
-+ strncpy(b->pins[5].name, "GPIO5", MRAA_PIN_NAME_SIZE);
-+ b->pins[5].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 1, 0, 0 };
-+ b->pins[5].gpio.pinmap = 5;
-+ b->pins[5].i2c.pinmap = 0;
-+ b->pins[5].i2c.mux_total = 0;
-+ gpio_mux_groups[5] = MUX_I2C;
-+
-+ strncpy(b->pins[4].name, "GPIO4", MRAA_PIN_NAME_SIZE);
-+ b->pins[4].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 1, 0, 0 };
-+ b->pins[4].gpio.pinmap = 4;
-+ b->pins[4].i2c.pinmap = 0;
-+ b->pins[4].i2c.mux_total = 0;
-+ gpio_mux_groups[4] = MUX_I2C;
-+
-+ strncpy(b->pins[6].name, "GPIO6", MRAA_PIN_NAME_SIZE);
-+ b->pins[6].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 1, 0, 0, 0 };
-+ b->pins[6].gpio.pinmap = 6;
-+ b->pins[6].spi.pinmap = 0;
-+ b->pins[6].spi.mux_total = 0;
-+ gpio_mux_groups[6] = MUX_SPI_CS1;
-+
-+ strncpy(b->pins[7].name, "GPIO7", MRAA_PIN_NAME_SIZE);
-+ b->pins[7].capabilites = (mraa_pincapabilities_t){ 1, 0, 0, 0, 1, 0, 0, 0 };
-+ b->pins[7].spi.pinmap = 0;
-+ b->pins[7].spi.mux_total = 0;
-+
-+ strncpy(b->pins[8].name, "GPIO8", MRAA_PIN_NAME_SIZE);
-+ b->pins[8].capabilites = (mraa_pincapabilities_t){ 1, 0, 0, 0, 1, 0, 0, 0 };
-+ b->pins[8].spi.pinmap = 0;
-+ b->pins[8].spi.mux_total = 0;
-+
-+ strncpy(b->pins[9].name, "GPIO9", MRAA_PIN_NAME_SIZE);
-+ b->pins[9].capabilites = (mraa_pincapabilities_t){ 1, 0, 0, 0, 1, 0, 0, 0 };
-+ b->pins[9].spi.pinmap = 0;
-+ b->pins[9].spi.mux_total = 0;
-+
-+ strncpy(b->pins[18].name, "GPIO18", MRAA_PIN_NAME_SIZE);
-+ b->pins[18].capabilites = (mraa_pincapabilities_t){ 1, 1, 1, 0, 0, 0, 0, 0 };
-+ b->pins[18].gpio.pinmap = 18;
-+ b->pins[18].pwm.parent_id = 0;
-+ b->pins[18].pwm.pinmap = 0;
-+ gpio_mux_groups[18] = MUX_PWM0;
-+
-+ strncpy(b->pins[19].name, "GPIO19", MRAA_PIN_NAME_SIZE);
-+ b->pins[19].capabilites = (mraa_pincapabilities_t){ 1, 1, 1, 0, 0, 0, 0, 0 };
-+ b->pins[19].gpio.pinmap = 19;
-+ b->pins[19].pwm.parent_id = 0;
-+ b->pins[19].pwm.pinmap = 1;
-+ gpio_mux_groups[19] = MUX_PWM1;
-+
-+ strncpy(b->pins[16].name, "GPIO16", MRAA_PIN_NAME_SIZE);
-+ b->pins[16].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
-+ b->pins[16].gpio.pinmap = 16;
-+ gpio_mux_groups[16] = MUX_SPI_S;
-+
-+ strncpy(b->pins[17].name, "GPIO17", MRAA_PIN_NAME_SIZE);
-+ b->pins[17].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
-+ b->pins[17].gpio.pinmap = 17;
-+ gpio_mux_groups[17] = MUX_SPI_S;
-+
-+ strncpy(b->pins[14].name, "GPIO14", MRAA_PIN_NAME_SIZE);
-+ b->pins[14].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
-+ b->pins[14].gpio.pinmap = 14;
-+ gpio_mux_groups[14] = MUX_SPI_S;
-
-- strncpy(b->pins[15].name, "P15", MRAA_PIN_NAME_SIZE);
-+ strncpy(b->pins[15].name, "GPIO15", MRAA_PIN_NAME_SIZE);
- b->pins[15].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
-- b->pins[15].gpio.pinmap = 44;
--
-- strncpy(b->pins[16].name, "P16", MRAA_PIN_NAME_SIZE);
-- b->pins[16].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 };
-- b->pins[16].gpio.pinmap = 46;
-- b->pins[16].uart.parent_id = 1;
-- b->pins[16].uart.mux_total = 0;
--
-- strncpy(b->pins[17].name, "P17", MRAA_PIN_NAME_SIZE);
-- b->pins[17].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 };
-- b->pins[17].gpio.pinmap = 45;
-- b->pins[17].uart.parent_id = 1;
-- b->pins[17].uart.mux_total = 0;
--
-- strncpy(b->pins[18].name, "P18", MRAA_PIN_NAME_SIZE);
-- b->pins[18].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 };
-- b->pins[18].gpio.pinmap = 13;
-- b->pins[18].uart.parent_id = 1;
-- b->pins[18].uart.mux_total = 0;
--
-- strncpy(b->pins[19].name, "P19", MRAA_PIN_NAME_SIZE);
-- b->pins[19].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 };
-- b->pins[19].gpio.pinmap = 12;
-- b->pins[19].uart.parent_id = 0;
-- b->pins[19].uart.mux_total = 0;
--
-- strncpy(b->pins[20].name, "P20", MRAA_PIN_NAME_SIZE);
-- b->pins[20].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 1, 0, 0 };
-- b->pins[20].gpio.pinmap = 5;
-- b->pins[20].i2c.pinmap = 0;
-- b->pins[20].i2c.mux_total = 0;
--
-- strncpy(b->pins[21].name, "P21", MRAA_PIN_NAME_SIZE);
-- b->pins[21].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 1, 0, 0 };
-- b->pins[21].gpio.pinmap = 4;
-- b->pins[21].i2c.pinmap = 0;
-- b->pins[21].i2c.mux_total = 0;
--
-- strncpy(b->pins[22].name, "P22", MRAA_PIN_NAME_SIZE);
-- b->pins[22].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 1, 0, 0, 0 };
-- b->pins[22].gpio.pinmap = 8;
-- b->pins[22].spi.pinmap = 0;
-- b->pins[22].spi.mux_total = 0;
--
-- strncpy(b->pins[23].name, "P23", MRAA_PIN_NAME_SIZE);
-- b->pins[23].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 1, 0, 0, 0 };
-- b->pins[23].gpio.pinmap = 9;
-- b->pins[23].spi.pinmap = 0;
-- b->pins[23].spi.mux_total = 0;
--
-- strncpy(b->pins[24].name, "P24", MRAA_PIN_NAME_SIZE);
-- b->pins[24].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 1, 0, 0, 0 };
-- b->pins[24].gpio.pinmap = 7;
-- b->pins[24].spi.pinmap = 0;
-- b->pins[24].spi.mux_total = 0;
--
-- strncpy(b->pins[25].name, "P25", MRAA_PIN_NAME_SIZE);
-- b->pins[25].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 1, 0, 0, 0 };
-- b->pins[25].gpio.pinmap = 6;
-- b->pins[25].spi.pinmap = 0;
-- b->pins[25].spi.mux_total = 0;
--
-- strncpy(b->pins[26].name, "P26", MRAA_PIN_NAME_SIZE);
-- b->pins[26].capabilites = (mraa_pincapabilities_t){ 1, 1, 1, 0, 0, 0, 0, 0 };
-- b->pins[26].gpio.pinmap = 18;
--
-- strncpy(b->pins[27].name, "P27", MRAA_PIN_NAME_SIZE);
-- b->pins[27].capabilites = (mraa_pincapabilities_t){ 1, 1, 1, 0, 0, 0, 0, 0 };
-- b->pins[27].gpio.pinmap = 19;
--
-- strncpy(b->pins[28].name, "P28", MRAA_PIN_NAME_SIZE);
-- b->pins[28].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
-- b->pins[28].gpio.pinmap = 16;
--
-- strncpy(b->pins[29].name, "P29", MRAA_PIN_NAME_SIZE);
-- b->pins[29].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
-- b->pins[29].gpio.pinmap = 17;
--
-- strncpy(b->pins[30].name, "P30", MRAA_PIN_NAME_SIZE);
-- b->pins[30].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
-- b->pins[30].gpio.pinmap = 14;
--
-- strncpy(b->pins[31].name, "P31", MRAA_PIN_NAME_SIZE);
-- b->pins[31].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
-- b->pins[31].gpio.pinmap = 15;
-+ b->pins[15].gpio.pinmap = 15;
-+ gpio_mux_groups[15] = MUX_SPI_S;
-
- // BUS DEFINITIONS
- b->i2c_bus_count = 1;
- b->def_i2c_bus = 0;
-- b->i2c_bus[0].bus_id = 0;
-- b->i2c_bus[0].sda = 20;
-- b->i2c_bus[0].scl = 21;
-+ b->i2c_bus[0].bus_id = 0;
-+ b->i2c_bus[0].sda = 5;
-+ b->i2c_bus[0].scl = 4;
-
- b->spi_bus_count = 1;
- b->def_spi_bus = 0;
-- b->spi_bus[0].bus_id = 0;
-- b->spi_bus[0].slave_s = 0;
-- b->spi_bus[0].cs = 25;
-- b->spi_bus[0].mosi = 22;
-- b->spi_bus[0].miso = 23;
-- b->spi_bus[0].sclk = 21;
-+ b->spi_bus[0].bus_id = 32766;
-+ b->spi_bus[0].slave_s = 1;
-+ b->spi_bus[0].cs = 6;
-+ b->spi_bus[0].mosi = 8;
-+ b->spi_bus[0].miso = 9;
-+ b->spi_bus[0].sclk = 7;
-
- b->uart_dev_count = 3;
- b->def_uart_dev = 0;
-- b->uart_dev[0].rx = 18;
-- b->uart_dev[0].tx = 19;
--
-- b->uart_dev[1].rx = 16;
-- b->uart_dev[1].tx = 17;
--
-- b->uart_dev[2].rx = 9;
-- b->uart_dev[2].tx = 8;
-+ b->uart_dev[0].rx = 13;
-+ b->uart_dev[0].tx = 12;
-+ b->uart_dev[0].device_path = "/dev/ttyS0";
-+ b->uart_dev[1].rx = 46;
-+ b->uart_dev[1].tx = 45;
-+ b->uart_dev[1].device_path = "/dev/ttyS1";
-+ b->uart_dev[2].rx = 21;
-+ b->uart_dev[2].tx = 20;
-+ b->uart_dev[2].device_path = "/dev/ttyS2";
-
- b->gpio_count = 0;
-- int i;
- for (i = 0; i < b->phy_pin_count; i++) {
- if (b->pins[i].capabilites.gpio) {
- b->gpio_count++;
---- a/src/gpio/gpio.c
-+++ b/src/gpio/gpio.c
-@@ -113,6 +113,8 @@
- close(export);
- }
-
-+ mraa_gpio_use_mmaped(dev, 1);
-+
- init_internal_cleanup:
- if (status != MRAA_SUCCESS) {
- if (dev != NULL)
include $(TOPDIR)/rules.mk
PKG_NAME:=libndpi
-PKG_VERSION:=2.2
-PKG_RELEASE:=1
-PKG_MAINTAINER:=Banglang Huang <banglang.huang@foxmail.com>
+PKG_VERSION:=2.4
+PKG_RELEASE:=3
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/ntop/nDPI.git
-PKG_SOURCE_VERSION:=56dcf659de5de5385406068704a89c6a39e34041
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/ntop/nDPI/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=5243e16b1c4a2728e9487466b2b496d8ffef18a44ff7ee6dfdc21e72008c6d29
+PKG_BUILD_DIR:=$(BUILD_DIR)/nDPI-$(PKG_VERSION)
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_MIRROR_HASH:=425f48e21295d4b522d0190181bd5943ae0664c20a3aa47f3c62611dd4c7b93f
+PKG_MAINTAINER:=Banglang Huang <banglang.huang@foxmail.com>
PKG_LICENSE:=LGPLv3
-PKG_INSTALL:=1
PKG_FIXUP:=autoreconf
+PKG_BUILD_DEPENDS:=libpcap
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
endef
define Package/libndpi/description
- nDPI is an open source LGPLv3 library for deep-packet inspection.
+ nDPI is an open source LGPLv3 library for deep-packet inspection.
Based on OpenDPI it includes ntop extensions.
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/
$(CP) \
- $(PKG_INSTALL_DIR)/usr/include/libndpi-$(PKG_VERSION).0/libndpi \
+ $(PKG_INSTALL_DIR)/usr/local/include/ndpi \
$(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) \
- $(PKG_INSTALL_DIR)/usr/lib/libndpi.so* \
+ $(PKG_INSTALL_DIR)/usr/local/lib/libndpi.so \
$(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
define Package/libndpi/install
$(INSTALL_DIR) $(1)/usr/lib/
$(CP) \
- $(PKG_INSTALL_DIR)/usr/lib/libndpi.so* \
+ $(PKG_INSTALL_DIR)/usr/local/lib/libndpi.so \
$(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/bin/
$(CP) \
--- /dev/null
+From 91ac4e4beed953fc9d2185ca2e6813dde47e8d5a Mon Sep 17 00:00:00 2001
+From: Guido Falsi <mad@madpilot.net>
+Date: Mon, 27 Aug 2018 17:52:56 +0200
+Subject: [PATCH 1/9] Move the configure include file inclusion and code
+ depending on it in code protected by the NDPI_LIB_COMPILATION define, this
+ should avoid it polluting the environment when including this file from
+ ntopng, version against stable branch.
+
+---
+ src/include/ndpi_typedefs.h | 15 ++++++++++-----
+ src/lib/ndpi_main.c | 7 -------
+ 2 files changed, 10 insertions(+), 12 deletions(-)
+
+diff --git a/src/include/ndpi_typedefs.h b/src/include/ndpi_typedefs.h
+index 6a61b44..386b217 100644
+--- a/src/include/ndpi_typedefs.h
++++ b/src/include/ndpi_typedefs.h
+@@ -26,9 +26,6 @@
+
+ #include "ndpi_define.h"
+
+-/* Needed to have access to HAVE_* defines */
+-#include "ndpi_config.h"
+-
+ /* NDPI_LOG_LEVEL */
+ typedef enum {
+ NDPI_LOG_ERROR,
+@@ -854,7 +851,17 @@ typedef struct ndpi_proto {
+ #define NUM_CUSTOM_CATEGORIES 5
+ #define CUSTOM_CATEGORY_LABEL_LEN 32
+
++#ifdef NDPI_LIB_COMPILATION
++
++/* Needed to have access to HAVE_* defines */
++#include "ndpi_define.h"
++
+ #ifdef HAVE_HYPERSCAN
++struct hs {
++ hs_database_t *database;
++ hs_scratch_t *scratch;
++};
++
+ struct hs_list {
+ char *expression;
+ unsigned int id;
+@@ -862,8 +869,6 @@ struct hs_list {
+ };
+ #endif
+
+-#ifdef NDPI_LIB_COMPILATION
+-
+ struct ndpi_detection_module_struct {
+ NDPI_PROTOCOL_BITMASK detection_bitmask;
+ NDPI_PROTOCOL_BITMASK generic_http_packet_bitmask;
+diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
+index b002126..8061aa1 100644
+--- a/src/lib/ndpi_main.c
++++ b/src/lib/ndpi_main.c
+@@ -51,13 +51,6 @@
+ #include <hs/hs.h>
+ #endif
+
+-#ifdef HAVE_HYPERSCAN
+-struct hs {
+- hs_database_t *database;
+- hs_scratch_t *scratch;
+-};
+-#endif
+-
+ #define NDPI_CONST_GENERIC_PROTOCOL_NAME "GenericProtocol"
+
+ static int _ndpi_debug_callbacks = 0;
+--
+2.19.1
+
--- /dev/null
+From 6be5188ff93780a7f2acd48f41c4ac1846597091 Mon Sep 17 00:00:00 2001
+From: Luca <deri@ntop.org>
+Date: Tue, 11 Sep 2018 10:02:34 +0300
+Subject: [PATCH 2/9] Fixes #600 Backport of recent fixes (e.g. #601)
+
+---
+ Makefile.am | 5 ++-
+ autogen.sh | 2 +-
+ configure.seed | 13 +++++--
+ src/lib/Makefile | 26 --------------
+ src/lib/Makefile.in | 54 ++++++++++++++++++++++++++++++
+ src/lib/ndpi_main.c | 2 --
+ src/lib/protocols/ssl.c | 36 ++++++++++++++------
+ src/lib/third_party/include/hash.h | 1 +
+ 8 files changed, 94 insertions(+), 45 deletions(-)
+ delete mode 100644 src/lib/Makefile
+ create mode 100644 src/lib/Makefile.in
+
+diff --git a/Makefile.am b/Makefile.am
+index 17c6748..37f0849 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,8 +1,7 @@
+ ACLOCAL_AMFLAGS = -I m4
+-
+ SUBDIRS = src/lib example tests
+
+-pkgconfigdir = $(libdir)/pkgconfig
++pkgconfigdir = $(prefix)/libdata/pkgconfig
+ pkgconfig_DATA = libndpi.pc
+
+-EXTRA_DIST = libndpi.sym autogen.sh
++EXTRA_DIST = autogen.sh
+diff --git a/autogen.sh b/autogen.sh
+index 6596b2f..efeffc4 100755
+--- a/autogen.sh
++++ b/autogen.sh
+@@ -5,7 +5,7 @@ NDPI_MINOR="4"
+ NDPI_PATCH="0"
+ NDPI_VERSION_SHORT="$NDPI_MAJOR.$NDPI_MINOR.$NDPI_PATCH"
+
+-rm -f configure config.h config.h.in src/lib/Makefile.in
++rm -f configure config.h config.h.in
+
+ AUTOCONF=$(command -v autoconf)
+ AUTOMAKE=$(command -v automake)
+diff --git a/configure.seed b/configure.seed
+index 6b85c66..8f8817f 100644
+--- a/configure.seed
++++ b/configure.seed
+@@ -10,6 +10,7 @@ AC_PROG_CC
+ AM_PROG_CC_C_O
+ AX_PTHREAD
+
++NDPI_VERSION_SHORT="@NDPI_VERSION_SHORT@"
+ NDPI_MAJOR="@NDPI_MAJOR@"
+ NDPI_MINOR="@NDPI_MINOR@"
+ NDPI_PATCH="@NDPI_PATCH@"
+@@ -51,11 +52,16 @@ else
+ AC_CHECK_LIB([numa], [numa_available], [LIBNUMA="-lnuma"])
+ fi
+
+-
++if test -z `which clang`; then
++CC=gcc
++else
++CC=clang
++fi
++
+ HS_LIB=
+ HS_INC=
+
+-AC_ARG_WITH(hyperscan, [ --with-hyperscan Enable nDPI build with Intel Hyperscan])
++AC_ARG_WITH(hyperscan, [ --with-hyperscan Enable nDPI build with Intel Hyperscan])
+
+ if test "${with_hyperscan+set}" = set; then
+ BKP=$LIBS
+@@ -127,12 +133,13 @@ AC_ARG_ENABLE([debug-messages],
+
+ AC_CHECK_LIB(pthread, pthread_setaffinity_np, AC_DEFINE_UNQUOTED(HAVE_PTHREAD_SETAFFINITY_NP, 1, [libc has pthread_setaffinity_np]))
+
+-AC_CONFIG_FILES([Makefile example/Makefile tests/Makefile libndpi.pc src/include/ndpi_define.h])
++AC_CONFIG_FILES([Makefile example/Makefile tests/Makefile libndpi.pc src/include/ndpi_define.h src/lib/Makefile])
+ AC_CONFIG_HEADERS(src/include/ndpi_config.h)
+ AC_SUBST(GIT_RELEASE)
+ AC_SUBST(NDPI_MAJOR)
+ AC_SUBST(NDPI_MINOR)
+ AC_SUBST(NDPI_PATCH)
++AC_SUBST(NDPI_VERSION_SHORT)
+ AC_SUBST(SVN_DATE)
+ AC_SUBST(JSON_C_LIB)
+ AC_SUBST(PCAP_INC)
+diff --git a/src/lib/Makefile b/src/lib/Makefile
+deleted file mode 100644
+index 19c6f1c..0000000
+--- a/src/lib/Makefile
++++ /dev/null
+@@ -1,26 +0,0 @@
+-#
+-# Simple non-autotools dependent makefile
+-#
+-# ./autogen.sh
+-# cd src/lib
+-# make -f Makefile.simple
+-#
+-CFLAGS += -fPIC -DPIC -I../include -Ithird_party/include -DNDPI_LIB_COMPILATION -g
+-RANLIB = ranlib
+-
+-OBJECTS = $(patsubst protocols/%.c, protocols/%.o, $(wildcard protocols/*.c)) $(patsubst third_party/src/%.c, third_party/src/%.o, $(wildcard third_party/src/*.c)) ndpi_main.o
+-HEADERS = $(wildcard ../include/*.h)
+-
+-all: libndpi.a
+-
+-ndpi_main.c: ndpi_content_match.c.inc
+-
+-libndpi.a: $(OBJECTS)
+- ar rc $@ $(OBJECTS)
+- $(RANLIB) $@
+-
+-%.o: %.c $(HEADERS) Makefile
+- $(CC) $(CFLAGS) -c $< -o $@
+-
+-clean:
+- /bin/rm -f libndpi.a $(OBJECTS)
+diff --git a/src/lib/Makefile.in b/src/lib/Makefile.in
+new file mode 100644
+index 0000000..ca29001
+--- /dev/null
++++ b/src/lib/Makefile.in
+@@ -0,0 +1,54 @@
++#
++# Simple non-autotools dependent makefile
++#
++# ./autogen.sh
++# cd src/lib
++# make Makefile
++#
++
++
++#
++# Installation directories
++#
++prefix = /usr/local
++libdir = ${prefix}/lib
++includedir = ${prefix}/include/ndpi
++CC = @CC@
++CFLAGS += -fPIC -DPIC -I../include -Ithird_party/include -DNDPI_LIB_COMPILATION -O2 # -g
++RANLIB = ranlib
++
++OBJECTS = $(patsubst protocols/%.c, protocols/%.o, $(wildcard protocols/*.c)) $(patsubst third_party/src/%.c, third_party/src/%.o, $(wildcard third_party/src/*.c)) ndpi_main.o
++HEADERS = $(wildcard ../include/*.h)
++NDPI_LIB_STATIC = libndpi.a
++NDPI_LIB_SHARED_BASE = libndpi.so
++NDPI_LIB_SHARED = $(NDPI_LIB_SHARED_BASE).@NDPI_VERSION_SHORT@
++NDPI_LIBS = $(NDPI_LIB_STATIC) $(NDPI_LIB_SHARED)
++
++ifeq ($(OS),Darwin)
++CC=clang
++endif
++
++all: $(NDPI_LIBS)
++
++ndpi_main.c: ndpi_content_match.c.inc
++
++$(NDPI_LIB_STATIC): $(OBJECTS)
++ ar rc $@ $(OBJECTS)
++ $(RANLIB) $@
++
++$(NDPI_LIB_SHARED): $(OBJECTS)
++ $(CC) -shared -fPIC -o $@ $(OBJECTS)
++ ln -Fs $(NDPI_LIB_SHARED) $(NDPI_LIB_SHARED_BASE)
++
++%.o: %.c $(HEADERS) Makefile
++ $(CC) $(CFLAGS) -c $< -o $@
++
++clean:
++ /bin/rm -f $(NDPI_LIB_STATIC) $(OBJECTS) *.o *.so *.lo
++
++install: $(NDPI_LIBS)
++ mkdir -p $(DESTDIR)$(libdir)
++ cp $(NDPI_LIBS) $(DESTDIR)$(libdir)/
++ ln -Fs $(DESTDIR)$(libdir)/$(NDPI_LIB_SHARED) $(DESTDIR)$(libdir)/$(NDPI_LIB_SHARED_BASE)
++ mkdir -p $(DESTDIR)$(includedir)
++ cp ../include/*.h $(DESTDIR)$(includedir)
+diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
+index 8061aa1..540e158 100644
+--- a/src/lib/ndpi_main.c
++++ b/src/lib/ndpi_main.c
+@@ -43,9 +43,7 @@
+
+ #include "ndpi_content_match.c.inc"
+ #include "third_party/include/ndpi_patricia.h"
+-#include "third_party/src/ndpi_patricia.c"
+ #include "third_party/include/hash.h"
+-#include "third_party/src/hash.c"
+
+ #ifdef HAVE_HYPERSCAN
+ #include <hs/hs.h>
+diff --git a/src/lib/protocols/ssl.c b/src/lib/protocols/ssl.c
+index b8c3697..59aedcb 100644
+--- a/src/lib/protocols/ssl.c
++++ b/src/lib/protocols/ssl.c
+@@ -27,7 +27,7 @@
+
+ #include "ndpi_api.h"
+
+-/* #define CERTIFICATE_DEBUG 1 */
++// #define CERTIFICATE_DEBUG 1
+ #define NDPI_MAX_SSL_REQUEST_SIZE 10000
+
+ /* Skype.c */
+@@ -246,28 +246,43 @@ int getSSLcertificate(struct ndpi_detection_module_struct *ndpi_struct,
+ u_int16_t compression_len;
+ u_int16_t extensions_len;
+
+- compression_len = packet->payload[offset+1];
+- offset += compression_len + 3;
++ offset++;
++ compression_len = packet->payload[offset];
++ offset++;
++
++#ifdef CERTIFICATE_DEBUG
++ printf("SSL [compression_len: %u]\n", compression_len);
++#endif
++
++ // offset += compression_len + 3;
++ offset += compression_len;
+
+ if(offset < total_len) {
+- extensions_len = packet->payload[offset];
++ extensions_len = ntohs(*((u_int16_t*)&packet->payload[offset]));
++ offset += 2;
++
++#ifdef CERTIFICATE_DEBUG
++ printf("SSL [extensions_len: %u]\n", extensions_len);
++#endif
+
+- if((extensions_len+offset) < total_len) {
++ if((extensions_len+offset) <= total_len) {
+ /* Move to the first extension
+ Type is u_int to avoid possible overflow on extension_len addition */
+- u_int extension_offset = 1;
++ u_int extension_offset = 0;
+
+ while(extension_offset < extensions_len) {
+ u_int16_t extension_id, extension_len;
+
+- memcpy(&extension_id, &packet->payload[offset+extension_offset], 2);
++ extension_id = ntohs(*((u_int16_t*)&packet->payload[offset+extension_offset]));
+ extension_offset += 2;
+
+- memcpy(&extension_len, &packet->payload[offset+extension_offset], 2);
++ extension_len = ntohs(*((u_int16_t*)&packet->payload[offset+extension_offset]));
+ extension_offset += 2;
+
+- extension_id = ntohs(extension_id), extension_len = ntohs(extension_len);
+-
++#ifdef CERTIFICATE_DEBUG
++ printf("SSL [extension_id: %u][extension_len: %u]\n", extension_id, extension_len);
++#endif
++
+ if(extension_id == 0) {
+ u_int begin = 0,len;
+ char *server_name = (char*)&packet->payload[offset+extension_offset];
+@@ -316,6 +331,7 @@ int sslTryAndRetrieveServerCertificate(struct ndpi_detection_module_struct *ndpi
+ if((packet->payload_packet_len > 9) && (packet->payload[0] == 0x16)) {
+ char certificate[64];
+ int rc;
++
+ certificate[0] = '\0';
+ rc = getSSLcertificate(ndpi_struct, flow, certificate, sizeof(certificate));
+ packet->ssl_certificate_num_checks++;
+diff --git a/src/lib/third_party/include/hash.h b/src/lib/third_party/include/hash.h
+index 4f53e5a..2251706 100644
+--- a/src/lib/third_party/include/hash.h
++++ b/src/lib/third_party/include/hash.h
+@@ -25,5 +25,6 @@ extern int ht_hash( hashtable_t *hashtable, char *key );
+ extern entry_t *ht_newpair( char *key, u_int16_t value );
+ extern void ht_set( hashtable_t *hashtable, char *key, u_int16_t value );
+ extern u_int16_t ht_get( hashtable_t *hashtable, char *key );
++extern void ht_free( hashtable_t *hashtable );
+
+ #endif /* _HASH_H_ */
+--
+2.19.1
+
--- /dev/null
+From efd8348c3a5ace204410608f1805c9d5899096ab Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=D0=98=D0=B2=D0=B0=D0=BD=20=D0=A1=D0=BF=D0=B8=D0=BD=D0=B5?=
+ =?UTF-8?q?=D0=BD=D0=BA=D0=BE?= <ispinenko@ideco.ru>
+Date: Thu, 13 Sep 2018 18:23:47 +0500
+Subject: [PATCH 3/9] Fixed duplicate protocol name. #607
+
+---
+ src/lib/ndpi_main.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
+index 540e158..33ccbb1 100644
+--- a/src/lib/ndpi_main.c
++++ b/src/lib/ndpi_main.c
+@@ -1225,7 +1225,7 @@ static void ndpi_init_protocol_defaults(struct ndpi_detection_module_struct *ndp
+ ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */);
+ ndpi_set_proto_defaults(ndpi_mod, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_VIDTO,
+ no_master,
+- no_master, "PPStream", NDPI_PROTOCOL_CATEGORY_MEDIA,
++ no_master, "Vidto", NDPI_PROTOCOL_CATEGORY_MEDIA,
+ ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
+ ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */);
+
+--
+2.19.1
+
--- /dev/null
+From ba72865f23cd0d52f373573308e0e05c5bd37ba8 Mon Sep 17 00:00:00 2001
+From: Luca Deri <deri@ntop.org>
+Date: Wed, 19 Sep 2018 11:11:15 +0200
+Subject: [PATCH 4/9] Added missing ndpi_protocol2id() prototype Fixed error
+ when crearing symlink in Makefile
+
+---
+ src/include/ndpi_api.h | 15 ++++++++++++++-
+ src/lib/Makefile.in | 2 +-
+ 2 files changed, 15 insertions(+), 2 deletions(-)
+
+diff --git a/src/include/ndpi_api.h b/src/include/ndpi_api.h
+index 3fefc8e..56c5436 100644
+--- a/src/include/ndpi_api.h
++++ b/src/include/ndpi_api.h
+@@ -420,7 +420,7 @@ extern "C" {
+ char *bigram_to_match);
+
+ /**
+- * Write the protocol name in the buffer -buf- as master_protocol.protocol
++ * Write the protocol name in the buffer -buf- as master_protocol.protocol (string)
+ *
+ * @par ndpi_mod = the detection module
+ * @par proto = the struct ndpi_protocol contain the protocols name
+@@ -432,6 +432,19 @@ extern "C" {
+ char* ndpi_protocol2name(struct ndpi_detection_module_struct *ndpi_mod,
+ ndpi_protocol proto, char *buf, u_int buf_len);
+
++ /**
++ * Write the protocol name in the buffer -buf- as master_protocol.protocol (number)
++ *
++ * @par ndpi_mod = the detection module
++ * @par proto = the struct ndpi_protocol contain the protocols name
++ * @par buf = the buffer to write the name of the protocols
++ * @par buf_len = the length of the buffer
++ * @return the buffer contains the master_protocol and protocol name
++ *
++ */
++ char* ndpi_protocol2id(struct ndpi_detection_module_struct *ndpi_mod,
++ ndpi_protocol proto, char *buf, u_int buf_len);
++
+ /**
+ * Find out if a given category is custom/user-defined
+ *
+diff --git a/src/lib/Makefile.in b/src/lib/Makefile.in
+index ca29001..cbbc54b 100644
+--- a/src/lib/Makefile.in
++++ b/src/lib/Makefile.in
+@@ -38,7 +38,7 @@ $(NDPI_LIB_STATIC): $(OBJECTS)
+
+ $(NDPI_LIB_SHARED): $(OBJECTS)
+ $(CC) -shared -fPIC -o $@ $(OBJECTS)
+- ln -Fs $(NDPI_LIB_SHARED) $(NDPI_LIB_SHARED_BASE)
++ ln -fs $(NDPI_LIB_SHARED) $(NDPI_LIB_SHARED_BASE)
+
+ %.o: %.c $(HEADERS) Makefile
+ $(CC) $(CFLAGS) -c $< -o $@
+--
+2.19.1
+
--- /dev/null
+From 54fd7face86f3d5287bc8d0f2633bd13c66498cf Mon Sep 17 00:00:00 2001
+From: Vitaly Lavrov <vel21ripn@gmail.com>
+Date: Sun, 30 Sep 2018 22:49:18 +0300
+Subject: [PATCH 5/9] Do not use the available clang as the default compiler.
+ Use the CC environment variable when running autogen.sh and configure.
+
+---
+ configure.seed | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/configure.seed b/configure.seed
+index 8f8817f..b150fdb 100644
+--- a/configure.seed
++++ b/configure.seed
+@@ -51,12 +51,6 @@ if test $SHORT_MACHINE = "arm"; then
+ else
+ AC_CHECK_LIB([numa], [numa_available], [LIBNUMA="-lnuma"])
+ fi
+-
+-if test -z `which clang`; then
+-CC=gcc
+-else
+-CC=clang
+-fi
+
+ HS_LIB=
+ HS_INC=
+--
+2.19.1
+
--- /dev/null
+From 6dcf1f3fbab782804339db5a3fe8cd0c88c07795 Mon Sep 17 00:00:00 2001
+From: lucaderi <deri@ntop.org>
+Date: Thu, 4 Oct 2018 21:36:46 +0200
+Subject: [PATCH 6/9] Backported ndpi_protocol2id
+
+---
+ src/include/ndpi_api.h | 17 +++++++++++++++--
+ src/lib/ndpi_main.c | 17 +++++++++++++++++
+ 2 files changed, 32 insertions(+), 2 deletions(-)
+
+diff --git a/src/include/ndpi_api.h b/src/include/ndpi_api.h
+index 56c5436..ccbad73 100644
+--- a/src/include/ndpi_api.h
++++ b/src/include/ndpi_api.h
+@@ -274,7 +274,7 @@ extern "C" {
+ */
+ u_int16_t ndpi_get_flow_masterprotocol(struct ndpi_detection_module_struct *ndpi_struct,
+ struct ndpi_flow_struct *flow);
+-
++
+ /**
+ * API call that is called internally by ndpi_detection_process_packet or by apps
+ * that want to avoid calling ndpi_detection_process_packet as they have already
+@@ -432,6 +432,19 @@ extern "C" {
+ char* ndpi_protocol2name(struct ndpi_detection_module_struct *ndpi_mod,
+ ndpi_protocol proto, char *buf, u_int buf_len);
+
++ /**
++ * Same as ndpi_protocol2name() with the difference that the numeric protocol
++ * name is returned
++ *
++ * @par ndpi_mod = the detection module
++ * @par proto = the struct ndpi_protocol contain the protocols name
++ * @par buf = the buffer to write the name of the protocols
++ * @par buf_len = the length of the buffer
++ * @return the buffer contains the master_protocol and protocol name
++ *
++ */
++ char* ndpi_protocol2id(struct ndpi_detection_module_struct *ndpi_mod,
++ ndpi_protocol proto, char *buf, u_int buf_len);
+ /**
+ * Write the protocol name in the buffer -buf- as master_protocol.protocol (number)
+ *
+@@ -746,7 +759,7 @@ extern "C" {
+ u_int ndpi_get_ndpi_num_custom_protocols(struct ndpi_detection_module_struct *ndpi_mod);
+ u_int ndpi_get_ndpi_detection_module_size();
+ void ndpi_set_log_level(struct ndpi_detection_module_struct *ndpi_mod, u_int l);
+-
++
+ /**
+ * Add a string to match to an automata
+ *
+diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
+index 33ccbb1..e1cf577 100644
+--- a/src/lib/ndpi_main.c
++++ b/src/lib/ndpi_main.c
+@@ -5319,6 +5319,23 @@ ndpi_protocol ndpi_guess_undetected_protocol(struct ndpi_detection_module_struct
+
+ /* ****************************************************** */
+
++char* ndpi_protocol2id(struct ndpi_detection_module_struct *ndpi_mod,
++ ndpi_protocol proto, char *buf, u_int buf_len) {
++ if((proto.master_protocol != NDPI_PROTOCOL_UNKNOWN)
++ && (proto.master_protocol != proto.app_protocol)) {
++ if(proto.app_protocol != NDPI_PROTOCOL_UNKNOWN)
++ snprintf(buf, buf_len, "%u.%u",
++ proto.master_protocol, proto.app_protocol);
++ else
++ snprintf(buf, buf_len, "%u", proto.master_protocol);
++ } else
++ snprintf(buf, buf_len, "%u", proto.app_protocol);
++
++ return(buf);
++}
++
++/* ****************************************************** */
++
+ char* ndpi_protocol2name(struct ndpi_detection_module_struct *ndpi_mod,
+ ndpi_protocol proto, char *buf, u_int buf_len) {
+ if((proto.master_protocol != NDPI_PROTOCOL_UNKNOWN)
+--
+2.19.1
+
--- /dev/null
+From a1f6cbb6c9a212b5b3b6605254ae35bead5c43df Mon Sep 17 00:00:00 2001
+From: Hank Leininger <hlein@korelogic.com>
+Date: Mon, 8 Oct 2018 18:17:30 -0600
+Subject: [PATCH 7/9] Symlink the shared library to pwd.
+
+DESTDIR is used, for instance, by distros to facilitate installing
+to a temp path for testing / package-building.
+
+In general nDPI supports DESTDIR (yay!), but using an absolute path
+for the target of the library link has two problems:
+
+1) If DESTDIR is set to /some/tmp/path, we end up with a link that
+points to /some/tmp/path/usr/lib/libndpi-x.y.z, which is definitely
+not what is intended - once the package is installed, the link is
+broken.
+
+2) Absolute links are problematic for distributions; pointing to
+/usr/lib/libndpi-x.y.z during package build-and-test would point to
+either a nonexistent file, or an old and possibly wrong one.
+
+Both of these are avoided if we just link to the target with no path
+at all.
+---
+ src/lib/Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/lib/Makefile.in b/src/lib/Makefile.in
+index cbbc54b..dc1e34b 100644
+--- a/src/lib/Makefile.in
++++ b/src/lib/Makefile.in
+@@ -49,6 +49,6 @@ clean:
+ install: $(NDPI_LIBS)
+ mkdir -p $(DESTDIR)$(libdir)
+ cp $(NDPI_LIBS) $(DESTDIR)$(libdir)/
+- ln -Fs $(DESTDIR)$(libdir)/$(NDPI_LIB_SHARED) $(DESTDIR)$(libdir)/$(NDPI_LIB_SHARED_BASE)
++ ln -Fs $(NDPI_LIB_SHARED) $(DESTDIR)$(libdir)/$(NDPI_LIB_SHARED_BASE)
+ mkdir -p $(DESTDIR)$(includedir)
+ cp ../include/*.h $(DESTDIR)$(includedir)
+--
+2.19.1
+
--- /dev/null
+From cfd97bbbca6afddb1bcedb407cb21127d7cb5d53 Mon Sep 17 00:00:00 2001
+From: Hank Leininger <hlein@korelogic.com>
+Date: Mon, 8 Oct 2018 19:08:51 -0600
+Subject: [PATCH 8/9] Use a more standard path for pkg-config files.
+
+The Linuxes I've checked all seem to use /usr/{,local/}lib*/pkgconfig,
+not /usr/libdata/. I think FreeBSD does use /usr/libdata/ but also
+supports /usr/lib*/pkgconfig, although I have not tested this change
+on a FreeBSD system.
+---
+ Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 37f0849..4090817 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,7 +1,7 @@
+ ACLOCAL_AMFLAGS = -I m4
+ SUBDIRS = src/lib example tests
+
+-pkgconfigdir = $(prefix)/libdata/pkgconfig
++pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = libndpi.pc
+
+ EXTRA_DIST = autogen.sh
+--
+2.19.1
+
--- /dev/null
+From b4b7a810697145b718a9a3b6d8a39e700613a640 Mon Sep 17 00:00:00 2001
+From: Hank Leininger <hlein@korelogic.com>
+Date: Mon, 8 Oct 2018 21:22:41 -0600
+Subject: [PATCH 9/9] Correct the include file path in -I CFLAGS argument.
+
+src/lib/Makefile.in install headers into ${prefix}/include/ndpi,
+but the shipped libndpi.pc.in specifies a different path. Therefore
+anything trying to build using $(pkg-config --cflags libndpi) will
+fail to find the nDPI headers.
+
+This patch simply makes libndpi.pc.in agree with src/lib/Makefile.in.
+---
+ libndpi.pc.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libndpi.pc.in b/libndpi.pc.in
+index 291429c..5e1cde7 100644
+--- a/libndpi.pc.in
++++ b/libndpi.pc.in
+@@ -7,4 +7,4 @@ Name: libndpi
+ Description: deep packet inspection library
+ Version: @VERSION@
+ Libs: -L${libdir} -lndpi
+-Cflags: -I${includedir}/libndpi-@VERSION@
++Cflags: -I${includedir}/ndpi
+--
+2.19.1
+
include $(TOPDIR)/rules.mk
PKG_NAME:=libnetconf2
+PKG_VERSION:=0.12-r1
PKG_LICENSE:=BSD-3-Clause
PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
-PKG_VERSION:=0.11.37
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/CESNET/libnetconf2/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=86269d3f1bc85bb17d8823d214f9a676ee3b14ee18a0b87a230380df8503e8f5
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=46d56e08b161eb60f37410dae4d5e1a8a1bedd58
-PKG_MIRROR_HASH:=e12007b69eee42d1eb9925a93bcac7a71139583a76a59c78039b48cc20fc431f
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
-PKG_SOURCE_URL:=https://github.com/cesnet/libnetconf2/
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)
-
-PKG_BUILD_ROOT:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
-PKG_BUILD_DIR:=$(PKG_BUILD_ROOT)
+CMAKE_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
-CMAKE_INSTALL:=1
-
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
CATEGORY:=Libraries
TITLE:=NETCONF library
URL:=$(PKG_SOURCE_URL)
- DEPENDS:= +libyang +libssh +libopenssl
+ DEPENDS:= +libyang +libssh +libopenssl +libpthread
endef
define Package/libnetconf2/description
--- /dev/null
+Index: libnetconf2-0.12-r1/CMakeLists.txt
+===================================================================
+--- libnetconf2-0.12-r1.orig/CMakeLists.txt
++++ libnetconf2-0.12-r1/CMakeLists.txt
+@@ -172,8 +172,10 @@ target_link_libraries(netconf2 ${CMAKE_T
+
+ # check availability for some pthread functions
+ set(CMAKE_REQUIRED_LIBRARIES pthread)
++include(CheckFunctionExists)
+ check_function_exists(pthread_spin_lock HAVE_SPINLOCK)
+ check_function_exists(pthread_mutex_timedlock HAVE_PTHREAD_MUTEX_TIMEDLOCK)
++check_function_exists(pthread_rwlockattr_setkind_np HAVE_PTHREAD_RWLOCKATTR_SETKIND_NP)
+
+ # dependencies - openssl
+ if(ENABLE_TLS OR ENABLE_DNSSEC OR ENABLE_SSH)
+Index: libnetconf2-0.12-r1/src/config.h.in
+===================================================================
+--- libnetconf2-0.12-r1.orig/src/config.h.in
++++ libnetconf2-0.12-r1/src/config.h.in
+@@ -65,4 +65,7 @@
+ */
+ #define NC_PS_QUEUE_SIZE @MAX_PSPOLL_THREAD_COUNT@
+
++/* Portability feature-check macros. */
++#cmakedefine HAVE_PTHREAD_RWLOCKATTR_SETKIND_NP
++
+ #endif /* NC_CONFIG_H_ */
+Index: libnetconf2-0.12-r1/src/session_server.c
+===================================================================
+--- libnetconf2-0.12-r1.orig/src/session_server.c
++++ libnetconf2-0.12-r1/src/session_server.c
+@@ -520,6 +520,7 @@ nc_server_init(struct ly_ctx *ctx)
+ errno=0;
+
+ if (pthread_rwlockattr_init(&attr) == 0) {
++#if defined(HAVE_PTHREAD_RWLOCKATTR_SETKIND_NP)
+ if (pthread_rwlockattr_setkind_np(&attr, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP) == 0) {
+ if (pthread_rwlock_init(&server_opts.endpt_lock, &attr) != 0) {
+ ERR("%s: failed to init rwlock(%s).", __FUNCTION__, strerror(errno));
+@@ -530,6 +531,7 @@ nc_server_init(struct ly_ctx *ctx)
+ } else {
+ ERR("%s: failed set attribute (%s).", __FUNCTION__, strerror(errno));
+ }
++#endif
+ pthread_rwlockattr_destroy(&attr);
+ } else {
+ ERR("%s: failed init attribute (%s).", __FUNCTION__, strerror(errno));
include $(TOPDIR)/rules.mk
PKG_NAME:=liboping
-PKG_VERSION:=1.9.0
+PKG_VERSION:=1.10.0
PKG_RELEASE:=1
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
PKG_LICENSE:=LGPL-2.1+
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://noping.cc/files
-PKG_HASH:=44bb1d88b56b88fda5533edb3aa005c69b3cd396f20453a157d7e31e536f3530
+PKG_HASH:=eb38aa93f93e8ab282d97e2582fbaea88b3f889a08cbc9dbf20059c3779d5cd8
PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
define Package/liboping/Default
- URL:=http://verplant.org/liboping/
+ URL:=https://noping.cc
endef
define Package/liboping
include $(TOPDIR)/rules.mk
PKG_NAME:=libp11
-PKG_VERSION:=0.4.7
+PKG_VERSION:=0.4.9
PKG_RELEASE:=1
-PKG_HASH:=32e486d4279e09174b63eb263bc840016ebfa80b0b154390c0539b211aec0452
+
+PKG_SOURCE_URL:=https://github.com/OpenSC/libp11/releases/download/$(PKG_NAME)-$(PKG_VERSION)/
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=9d1c76d74c21ca224f96204982097ebc6b956f645b2b0b5f9c502a20e9ffcfd8
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_LICENSE:=LGPL-2.1+
PKG_LICENSE_FILES:=COPYING
-PKG_SOURCE_URL:=https://github.com/OpenSC/libp11/releases/download/$(PKG_NAME)-$(PKG_VERSION)/
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-
+PKG_BUILD_PARALLEL:=1
PKG_FIXUP:=libtool
PKG_INSTALL:=1
--- a/src/Makefile.am
+++ b/src/Makefile.am
-@@ -47,13 +47,6 @@ pkcs11_la_LIBADD = $(libp11_la_OBJECTS)
+@@ -49,13 +49,6 @@ pkcs11_la_LIBADD = $(libp11_la_OBJECTS) $(OPENSSL_LIBS)
pkcs11_la_LDFLAGS = $(AM_LDFLAGS) -module -shared -shrext $(SHARED_EXT) \
-avoid-version -export-symbols "$(srcdir)/pkcs11.exports"
mylibdir=$(libdir)
--- a/src/Makefile.in
+++ b/src/Makefile.in
-@@ -844,7 +844,7 @@ distdir: $(DISTFILES)
+@@ -872,7 +872,7 @@ distdir: $(DISTFILES)
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) config.h
installdirs:
-@@ -915,7 +915,7 @@ install-dvi-am:
+@@ -944,7 +944,7 @@ install-dvi-am:
install-exec-am: install-enginesexecLTLIBRARIES install-libLTLIBRARIES
@$(NORMAL_INSTALL)
install-html: install-html-am
install-html-am:
-@@ -960,7 +960,7 @@ uninstall-am: uninstall-enginesexecLTLIB
+@@ -989,7 +989,7 @@ uninstall-am: uninstall-enginesexecLTLIBRARIES \
.MAKE: all check-am install-am install-exec-am install-strip
clean-enginesexecLTLIBRARIES clean-generic \
clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \
ctags-am distclean distclean-compile distclean-generic \
-@@ -968,7 +968,7 @@ uninstall-am: uninstall-enginesexecLTLIB
+@@ -997,7 +997,7 @@ uninstall-am: uninstall-enginesexecLTLIBRARIES \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-dvi install-dvi-am \
install-enginesexecLTLIBRARIES install-exec install-exec-am \
include $(TOPDIR)/rules.mk
PKG_NAME:=libpam
-PKG_VERSION:=1.2.0
-PKG_RELEASE:=2
+PKG_VERSION:=1.3.0
+PKG_RELEASE:=1
PKG_SOURCE:=Linux-PAM-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://www.linux-pam.org/library/
-PKG_HASH:=cd8beac5961e942e9c73b32a3cd1a3457755f8fb35d07c9ec64511e19e135ea4
+PKG_HASH:=241aed1ef522f66ed672719ecf2205ec513fd0075ed80cda8e086a5b1a01d1bb
PKG_INSTALL:=1
PKG_FIXUP:=autoreconf
PKG_MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
fi
- if test ${libdir} = '${exec_prefix}/lib'
- then
-- case "`uname -m`" in
+- case "$host_cpu" in
- x86_64|ppc64|s390x|sparc64)
- libdir="/lib64" ;;
- *)
index 306b6e2..084071a 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -534,7 +534,10 @@ AC_CHECK_FUNCS(fseeko getdomainname gethostname gettimeofday lckpwdf mkdir selec
+@@ -524,7 +524,10 @@ AC_CHECK_FUNCS(fseeko getdomainname gethostname gettimeofday lckpwdf mkdir selec
AC_CHECK_FUNCS(strcspn strdup strspn strstr strtol uname)
AC_CHECK_FUNCS(getutent_r getpwnam_r getpwuid_r getgrnam_r getgrgid_r getspnam_r)
AC_CHECK_FUNCS(getgrouplist getline getdelim)
index 084071a..ca4bf5b 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -536,8 +536,10 @@ AC_CHECK_FUNCS(getutent_r getpwnam_r getpwuid_r getgrnam_r getgrgid_r getspnam_r
+@@ -526,8 +526,10 @@ AC_CHECK_FUNCS(getutent_r getpwnam_r getpwuid_r getgrnam_r getgrgid_r getspnam_r
AC_CHECK_FUNCS(getgrouplist getline getdelim)
AC_CHECK_FUNCS(inet_ntop inet_pton innetgr)
AC_CHECK_FUNCS([ruserok_af ruserok], [break])
+++ /dev/null
-From a35daea1b8be768d1b0be6eae157fbf3e5380f92 Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Wed, 17 Jun 2015 18:22:31 +0800
-Subject: [PATCH 4/7] build: fix build when crypt() is not part of crypt_libs.
-
-* configure.ac: ditto.
-
-Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index ca4bf5b..6553c78 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -408,7 +408,7 @@ AS_IF([test "x$ac_cv_header_xcrypt_h" = "xyes"],
- [crypt_libs="crypt"])
-
- BACKUP_LIBS=$LIBS
--AC_SEARCH_LIBS([crypt],[$crypt_libs], LIBCRYPT="-l$ac_lib", LIBCRYPT="")
-+AC_SEARCH_LIBS([crypt],[$crypt_libs], LIBCRYPT="${ac_lib:+-l$ac_lib}", LIBCRYPT="")
- AC_CHECK_FUNCS(crypt_r crypt_gensalt_r)
- LIBS=$BACKUP_LIBS
- AC_SUBST(LIBCRYPT)
---
-1.7.10.4
-
index 2d330e5..970724a 100644
--- a/modules/pam_unix/pam_unix_passwd.c
+++ b/modules/pam_unix/pam_unix_passwd.c
-@@ -336,7 +336,7 @@ static int _do_setpass(pam_handle_t* pamh, const char *forwho,
+@@ -410,7 +410,7 @@ static int _do_setpass(pam_handle_t* pamh, const char *forwho,
}
if (on(UNIX_NIS, ctrl) && _unix_comesfromsource(pamh, forwho, 0, 1)) {
+++ /dev/null
-From c681bd104627139eac2f40fe303e1f67676233e8 Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Wed, 17 Jun 2015 15:33:43 +0800
-Subject: [PATCH 7/7] Check if innetgr is available at compile time.
-
-innetgr may not be there so make sure that when innetgr is not present
-then we inform about it and not use it.
-
-* modules/pam_group/pam_group.c: ditto
-* modules/pam_succeed_if/pam_succeed_if.c: ditto
-* modules/pam_time/pam_time.c: ditto
-
-Signed-off-by: Khem Raj <raj.khem at gmail.com>
-Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
----
- modules/pam_group/pam_group.c | 4 ++++
- modules/pam_succeed_if/pam_succeed_if.c | 17 +++++++++++++----
- modules/pam_time/pam_time.c | 4 ++++
- 3 files changed, 21 insertions(+), 4 deletions(-)
-
-diff --git a/modules/pam_group/pam_group.c b/modules/pam_group/pam_group.c
-index be5f20f..6a065ca 100644
---- a/modules/pam_group/pam_group.c
-+++ b/modules/pam_group/pam_group.c
-@@ -656,7 +656,11 @@ static int check_account(pam_handle_t *pamh, const char *service,
- }
- /* If buffer starts with @, we are using netgroups */
- if (buffer[0] == '@')
-+#ifdef HAVE_INNETGR
- good &= innetgr (&buffer[1], NULL, user, NULL);
-+#else
-+ pam_syslog (pamh, LOG_ERR, "pam_group does not have netgroup support");
-+#endif
- /* otherwise, if the buffer starts with %, it's a UNIX group */
- else if (buffer[0] == '%')
- good &= pam_modutil_user_in_group_nam_nam(pamh, user, &buffer[1]);
-diff --git a/modules/pam_succeed_if/pam_succeed_if.c b/modules/pam_succeed_if/pam_succeed_if.c
-index aa828fc..c0c68a0 100644
---- a/modules/pam_succeed_if/pam_succeed_if.c
-+++ b/modules/pam_succeed_if/pam_succeed_if.c
-@@ -231,18 +231,27 @@ evaluate_notingroup(pam_handle_t *pamh, const char *user, const char *group)
- }
- /* Return PAM_SUCCESS if the (host,user) is in the netgroup. */
- static int
--evaluate_innetgr(const char *host, const char *user, const char *group)
-+evaluate_innetgr(const pam_handle_t* pamh, const char *host, const char *user, const char *group)
- {
-+#ifdef HAVE_INNETGR
- if (innetgr(group, host, user, NULL) == 1)
- return PAM_SUCCESS;
-+#else
-+ pam_syslog (pamh, LOG_ERR, "pam_succeed_if does not have netgroup support");
-+#endif
-+
- return PAM_AUTH_ERR;
- }
- /* Return PAM_SUCCESS if the (host,user) is NOT in the netgroup. */
- static int
--evaluate_notinnetgr(const char *host, const char *user, const char *group)
-+evaluate_notinnetgr(const pam_handle_t* pamh, const char *host, const char *user, const char *group)
- {
-+#ifdef HAVE_INNETGR
- if (innetgr(group, host, user, NULL) == 0)
- return PAM_SUCCESS;
-+#else
-+ pam_syslog (pamh, LOG_ERR, "pam_succeed_if does not have netgroup support");
-+#endif
- return PAM_AUTH_ERR;
- }
-
-@@ -387,14 +396,14 @@ evaluate(pam_handle_t *pamh, int debug,
- const void *rhost;
- if (pam_get_item(pamh, PAM_RHOST, &rhost) != PAM_SUCCESS)
- rhost = NULL;
-- return evaluate_innetgr(rhost, user, right);
-+ return evaluate_innetgr(pamh, rhost, user, right);
- }
- /* (Rhost, user) is not in this group. */
- if (strcasecmp(qual, "notinnetgr") == 0) {
- const void *rhost;
- if (pam_get_item(pamh, PAM_RHOST, &rhost) != PAM_SUCCESS)
- rhost = NULL;
-- return evaluate_notinnetgr(rhost, user, right);
-+ return evaluate_notinnetgr(pamh, rhost, user, right);
- }
- /* Fail closed. */
- return PAM_SERVICE_ERR;
-diff --git a/modules/pam_time/pam_time.c b/modules/pam_time/pam_time.c
-index c94737c..0b34a14 100644
---- a/modules/pam_time/pam_time.c
-+++ b/modules/pam_time/pam_time.c
-@@ -555,7 +555,11 @@ check_account(pam_handle_t *pamh, const char *service,
- }
- /* If buffer starts with @, we are using netgroups */
- if (buffer[0] == '@')
-+#ifdef HAVE_INNETGR
- good &= innetgr (&buffer[1], NULL, user, NULL);
-+#else
-+ pam_syslog (pamh, LOG_ERR, "pam_time does not have netgroup support");
-+#endif
- else
- good &= logic_field(pamh, user, buffer, count, is_same);
- D(("with user: %s", good ? "passes":"fails" ));
---
-1.7.10.4
-
--- /dev/null
+From 9f23ba5a40b42acf4463b593bffd73caee8b527c Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Sun, 15 Jul 2018 20:43:44 -0700
+Subject: [PATCH] Replace strndupa with strcpy
+
+glibc only. A static string is better.
+
+Signed-off-by: Rosen Penev <rosenp@gmail.com>
+---
+ modules/pam_exec/pam_exec.c | 31 +++++++++++--------------------
+ 1 file changed, 11 insertions(+), 20 deletions(-)
+
+diff --git a/modules/pam_exec/pam_exec.c b/modules/pam_exec/pam_exec.c
+index 0ab6548..2fbab4f 100644
+--- a/modules/pam_exec/pam_exec.c
++++ b/modules/pam_exec/pam_exec.c
+@@ -102,7 +102,7 @@ call_exec (const char *pam_type, pam_handle_t *pamh,
+ int use_stdout = 0;
+ int optargc;
+ const char *logfile = NULL;
+- const char *authtok = NULL;
++ char authtok[PAM_MAX_RESP_SIZE];
+ pid_t pid;
+ int fds[2];
+ int stdout_fds[2];
+@@ -178,11 +178,11 @@ call_exec (const char *pam_type, pam_handle_t *pamh,
+ }
+
+ pam_set_item (pamh, PAM_AUTHTOK, resp);
+- authtok = strndupa (resp, PAM_MAX_RESP_SIZE);
++ strcpy (authtok, resp);
+ _pam_drop (resp);
+ }
+ else
+- authtok = strndupa (void_pass, PAM_MAX_RESP_SIZE);
++ strcpy (authtok, void_pass);
+
+ if (pipe(fds) != 0)
+ {
+@@ -222,23 +222,14 @@ call_exec (const char *pam_type, pam_handle_t *pamh,
+
+ if (expose_authtok) /* send the password to the child */
+ {
+- if (authtok != NULL)
+- { /* send the password to the child */
+- if (debug)
+- pam_syslog (pamh, LOG_DEBUG, "send password to child");
+- if (write(fds[1], authtok, strlen(authtok)+1) == -1)
+- pam_syslog (pamh, LOG_ERR,
+- "sending password to child failed: %m");
+- authtok = NULL;
+- }
+- else
+- {
+- if (write(fds[1], "", 1) == -1) /* blank password */
+- pam_syslog (pamh, LOG_ERR,
+- "sending password to child failed: %m");
+- }
+- close(fds[0]); /* close here to avoid possible SIGPIPE above */
+- close(fds[1]);
++ if (debug)
++ pam_syslog (pamh, LOG_DEBUG, "send password to child");
++ if (write(fds[1], authtok, strlen(authtok)) == -1)
++ pam_syslog (pamh, LOG_ERR,
++ "sending password to child failed: %m");
++
++ close(fds[0]); /* close here to avoid possible SIGPIPE above */
++ close(fds[1]);
+ }
+
+ if (use_stdout)
+--
+2.19.1
+
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libpbc
+PKG_VERSION:=0.5.14
+PKG_RELEASE:=1
+PKG_HASH:=772527404117587560080241cedaf441e5cac3269009cdde4c588a1dce4c23d2
+
+PKG_SOURCE:=pbc-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://crypto.stanford.edu/pbc/files/
+PKG_BUILD_DIR:=$(BUILD_DIR)/pbc-$(PKG_VERSION)
+PKG_INSTALL:=1
+
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
+PKG_LICENSE:=LGPL-3.0+
+PKG_LICENSE_FILES:=COPYING
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libpbc
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=The Pairing-Based Cryptography Library
+ URL:=https://crypto.stanford.edu/pbc/
+ DEPENDS:=+libgmp
+endef
+
+define Package/libpbc/description
+ Pairing-based cryptography is a relatively young area of cryptography
+ that revolves around a certain function with special properties.
+
+ The PBC (Pairing-Based Cryptography) library is a free C library
+ (released under the GNU Lesser General Public License) built on the GMP
+ library that performs the mathematical operations underlying
+ pairing-based cryptosystems.
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include/pbc
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/pbc/*.h $(1)/usr/include/pbc
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpbc* $(1)/usr/lib/
+endef
+
+define Package/libpbc/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpbc.so.* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libpbc))
--- /dev/null
+#
+# Copyright (C) 2017 Banglang Huang
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libpfring
+PKG_VERSION:=7.2.0
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Banglang Huang <banglang.huang@foxmail.com>
+
+PKG_LICENSE:=LGPL-2.1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/ntop/PF_RING/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=5d349ac37a6ece5966bf606a6f131d628b98d88654c2f502d3c4b8bbf6ef9796
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/PF_RING-$(PKG_VERSION)
+
+PKG_INSTALL:=1
+PKG_FIXUP:=patch-libtool
+
+include $(INCLUDE_DIR)/package.mk
+
+CONFIGURE_PATH:=userland
+MAKE_PATH:=userland/lib
+
+define Package/libpfring
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=Library for PR_RING (package process framework)
+ URL:=https://github.com/ntop/pf_ring
+ DEPENDS:=+kmod-pf-ring +libpcap +libpthread
+endef
+
+define Package/libpfring/description
+ PF_RING is a high speed packet capture library that turns a commodity PC into an efficient and cheap
+ network measurement box suitable for both packet and active traffic analysis and manipulation.
+ Moreover, PF_RING opens totally new markets as it enables the creation of efficient application such as
+ traffic balancers or packet filters in a matter of lines of codes.
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include/
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/include/* \
+ $(1)/usr/include/
+
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/lib/libpfring.so* \
+ $(1)/usr/lib/
+endef
+
+CONFIGURE_VARS += \
+ MACHINE="$(ARCH)" \
+ ac_cv_lib_nl_3_nl_socket_alloc=no
+
+define Package/libpfring/install
+ $(INSTALL_DIR) $(1)/usr/lib/
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/lib/libpfring.so* \
+ $(1)/usr/lib/
+ $(LN) libpfring.so $(1)/usr/lib/libpfring.so.1
+endef
+
+$(eval $(call BuildPackage,libpfring))
--- /dev/null
+--- a/userland/configure
++++ b/userland/configure
+@@ -3745,12 +3745,6 @@ fi
+ if test "$IS_FREEBSD" != "1"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if r/w locks are supported" >&5
+ $as_echo_n "checking if r/w locks are supported... " >&6; }
+- if test "$cross_compiling" = yes; then :
+- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-as_fn_error $? "cannot run test program while cross compiling
+-See \`config.log' for more details" "$LINENO" 5; }
+-else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+
+@@ -3763,7 +3757,7 @@ else
+
+
+ _ACEOF
+-if ac_fn_c_try_run "$LINENO"; then :
++if ac_fn_c_try_compile "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+ cat >>confdefs.h <<_ACEOF
+@@ -3777,7 +3771,6 @@ $as_echo "no" >&6; }
+ fi
+ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+-fi
+
+ fi
+
--- /dev/null
+--- a/userland/configure
++++ b/userland/configure
+@@ -3296,14 +3296,16 @@ fi
+ done
+
+
+-MACHINE=`uname -m`
++if test -z "$MACHINE"; then
++ MACHINE=`uname -m`
++fi
+ CFLAGS=""
+ SYS_LIBS=""
+
+ VER=`cat ../kernel/linux/pf_ring.h | grep RING_VERSION | head -1 | cut -d '"' -f 2`
+ MAJOR_VER=`cat ../kernel/linux/pf_ring.h | grep RING_VERSION | head -1 | cut -d '"' -f 2 | cut -d '.' -f 1`
+
+-NATIVE=`$CC -c -Q -march=native --help=target| grep "march" | xargs | cut -d ' ' -f 2`
++NATIVE=`$CC -c -Q --help=target| grep "march" | xargs | cut -d ' ' -f 2`
+ if test -f "lib/libs/libpfring_zc_x86_64_$NATIVE.a"; then
+ CFLAGS="-march=native -mtune=native $CFLAGS"
+ LIBARCH="_$NATIVE"
--- /dev/null
+--- a/userland/lib/pfring_mod.c
++++ b/userland/lib/pfring_mod.c
+@@ -24,6 +24,7 @@
+ #include <ifaddrs.h>
+
+ #ifdef ENABLE_BPF
++#include <string.h>
+ #include <pcap/pcap.h>
+ #include <pcap/bpf.h>
+ #include <pcap-int.h>
include $(TOPDIR)/rules.mk
PKG_NAME:=libpng
-PKG_VERSION:=1.6.34
+PKG_VERSION:=1.6.35
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@SF/libpng
-PKG_HASH:=2f1e960d92ce3b3abd03d06dfec9637dfbd22febf107a536b44f7a47c60659f6
+PKG_HASH:=23912ec8c9584917ed9b09c5023465d71709dce089be503c7867fec68a93bcd7
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
PKG_LICENSE:=Libpng GPL-2.0+ BSD-3-Clause
PKC_LICENSE_FILES:=LICENSE contrib/gregbook/COPYING contrib/gregbook/LICENSE
+PKG_CPE_ID:=cpe:/a:libpng:libpng
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_NAME:=libpsl
PKG_VERSION:=0.20.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
PKG_SOURCE_URL:=https://github.com/rockdaboot/libpsl/releases/download/$(PKG_NAME)-$(PKG_VERSION)/
PKG_HASH:=f8fd0aeb66252dfcc638f14d9be1e2362fdaf2ca86bde0444ff4d5cc961b560f
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
C library to handle the Public Suffix List
endef
-CONFIGURE_ARGS += --disable-rpath
+CONFIGURE_ARGS += \
+ --disable-gtk-doc-html \
+ --disable-man \
+ --disable-rpath
define Build/InstallDev
$(INSTALL_DIR) \
include $(TOPDIR)/rules.mk
PKG_NAME:=libsearpc
-PKG_VERSION:=3.0.8
-PKG_RELEASE=$(PKG_SOURCE_VERSION)-1
+PKG_VERSION:=3.1.0
+PKG_RELEASE=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/haiwen/libsearpc/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=cbd86d3c37b54ca2060ca537a07940fe3e98498abf345b2f3e1cec488230231a
+
PKG_LICENSE:=GPL-3.0
+PKG_LICENSE_FILES:=LICENSE.txt
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/haiwen/libsearpc.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=12a01268825e9c7e17794c58c367e3b4db912ad9
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=8ca4785c4d276afeac212a26a143b22e45b85cf196c1218e4630f6072a33f430
PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
CATEGORY:=Libraries
TITLE:=Seafile RPC Library
MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
- URL:=http://seafile.com/
+ URL:=https://seafile.com
DEPENDS:=+glib2 +jansson +python $(ICONV_DEPENDS)
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=libseccomp
-PKG_VERSION:=2.2.1
+PKG_VERSION:=2.3.3
PKG_RELEASE:=1
PKG_USE_MIPS16:=0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/seccomp/libseccomp/releases/download/v$(PKG_VERSION)/
-PKG_HASH:=0ba1789f54786c644af54cdffc9fd0dd0a8bb2b2ee153933f658855d2851a740
+PKG_HASH:=7fc28f4294cc72e61c529bedf97e705c3acf9c479a8f1a3028d4cd2ca9f3b155
PKG_MAINTAINER:=Nikos Mavrogiannopoulos <nmav@gnutls.org>
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_LIBTOOL_PATHS:=. lib
-PKG_CHECK_FORMAT_SECURITY:=0
PKG_CONFIG_DEPENDS:= \
CONFIG_KERNEL_SECCOMP
+++ /dev/null
-Index: libseccomp-2.2.1/src/system.h
-===================================================================
---- libseccomp-2.2.1.orig/src/system.h
-+++ libseccomp-2.2.1/src/system.h
-@@ -23,7 +23,9 @@
- #define _SYSTEM_H
-
- #include <linux/filter.h>
-+#ifdef __GLIBC__
- #include <linux/prctl.h>
-+#endif
-
- #include "configure.h"
-
TITLE:=Library for reading/writing audio files
URL:=http://www.mega-nerd.com/libsndfile/
MAINTAINER:=Peter Wagner <tripolar@gmx.at>
- DEPENDS:=@!avr32
endef
define Package/libsndfile/description
-#
+#
# Copyright (C) 2014 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
include $(TOPDIR)/rules.mk
PKG_NAME:=libsoup
-PKG_VERSION:=2.63.2
+PKG_VERSION:=2.65.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=@GNOME/$(PKG_NAME)/2.63
-PKG_HASH:=3931f8ae282f010fa0d6c31841751d7c4bff72f116d13f34a5bf98a96550a4f9
+PKG_SOURCE_URL:=@GNOME/$(PKG_NAME)/2.65
+PKG_HASH:=3f3718623338f1bd7d7899dae2bdb613348212d59999a27432120afc1435ff04
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:gnome:libsoup
+PKG_BUILD_PARALLEL:=1
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
SECTION:=libs
CATEGORY:=Libraries
TITLE:=libsoup
- URL:=http://live.gnome.org/LibSoup
+ URL:=https://wiki.gnome.org/Projects/libsoup
MAINTAINER:=W. Michael Petullo <mike@flyn.org>
DEPENDS:=+glib2 +libxml2 +libgnutls +libsqlite3 +libpsl $(ICONV_DEPENDS) $(INTL_DEPENDS)
endef
define Build/Configure
$(call Build/Configure/Default, \
- --enable-ssl \
--disable-glibtest \
+ --disable-gtk-doc-html \
+ --disable-more-warnings \
+ --disable-vala \
--without-apache-httpd \
--without-gnome \
--without-gssapi \
- --enable-vala=no \
- --disable-more-warnings \
)
endef
PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
PKG_NAME:=libssh
-PKG_VERSION:=0.7.5
+PKG_VERSION:=0.7.6
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=https://red.libssh.org/attachments/download/218/
-PKG_HASH:=54e86dd5dc20e5367e58f3caab337ce37675f863f80df85b6b1614966a337095
+PKG_SOURCE_URL:=https://www.libssh.org/files/0.7/
+PKG_HASH:=1d607d3859274f755942324afb0f887ee22edd157f9596a2e69e3a28ec6d1092
+
+PKG_CPE_ID:=cpe:/a:libssh:libssh
CMAKE_INSTALL:=1
PKG_BUILD_PARALLEL:=1
-PKG_INSTALL:=1
PKG_USE_MIPS16:=0
include $(INCLUDE_DIR)/package.mk
endef
CMAKE_OPTIONS = \
- -DCMAKE_INSTALL_PREFIX:PATH=/usr \
- -DCMAKE_BUILD_TYPE:STRING=Release \
-DHAVE_STRTOULL=1 \
-DHAVE_GETADDRINFO=1 \
-DHAVE_TERMIOS_H=1 \
--- /dev/null
+From f81ca6161223e3566ce78a427571235fb6848fe9 Mon Sep 17 00:00:00 2001
+From: Andreas Schneider <asn@cryptomilk.org>
+Date: Wed, 29 Aug 2018 18:41:15 +0200
+Subject: [PATCH 1/8] misc: Add strndup implementation if not provides by the
+ OS
+
+Fixes T112
+
+Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
+(cherry picked from commit 247983e9820fd264cb5a59c14cc12846c028bd08)
+Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
+---
+ ConfigureChecks.cmake | 1 +
+ config.h.cmake | 3 +++
+ include/libssh/priv.h | 4 ++++
+ src/misc.c | 21 +++++++++++++++++++++
+ 4 files changed, 29 insertions(+)
+
+--- a/ConfigureChecks.cmake
++++ b/ConfigureChecks.cmake
+@@ -115,6 +115,7 @@ endif (NOT WITH_GCRYPT)
+
+ check_function_exists(isblank HAVE_ISBLANK)
+ check_function_exists(strncpy HAVE_STRNCPY)
++check_function_exists(strndup HAVE_STRNDUP)
+ check_function_exists(strtoull HAVE_STRTOULL)
+
+ if (NOT WIN32)
+--- a/config.h.cmake
++++ b/config.h.cmake
+@@ -103,6 +103,9 @@
+ /* Define to 1 if you have the `strncpy' function. */
+ #cmakedefine HAVE_STRNCPY 1
+
++/* Define to 1 if you have the `strndup' function. */
++#cmakedefine HAVE_STRNDUP 1
++
+ /* Define to 1 if you have the `cfmakeraw' function. */
+ #cmakedefine HAVE_CFMAKERAW 1
+
+--- a/include/libssh/priv.h
++++ b/include/libssh/priv.h
+@@ -43,6 +43,10 @@
+ # endif
+ #endif /* !defined(HAVE_STRTOULL) */
+
++#if !defined(HAVE_STRNDUP)
++char *strndup(const char *s, size_t n);
++#endif /* ! HAVE_STRNDUP */
++
+ #ifdef HAVE_BYTESWAP_H
+ #include <byteswap.h>
+ #endif
+--- a/src/misc.c
++++ b/src/misc.c
+@@ -1028,6 +1028,27 @@ int ssh_match_group(const char *group, c
+ return 0;
+ }
+
++#if !defined(HAVE_STRNDUP)
++char *strndup(const char *s, size_t n)
++{
++ char *x = NULL;
++
++ if (n + 1 < n) {
++ return NULL;
++ }
++
++ x = malloc(n + 1);
++ if (x == NULL) {
++ return NULL;
++ }
++
++ memcpy(x, s, n);
++ x[n] = '\0';
++
++ return x;
++}
++#endif /* ! HAVE_STRNDUP */
++
+ /** @} */
+
+ /* vim: set ts=4 sw=4 et cindent: */
--- /dev/null
+From e4c6d591df6a9c34c1ff3ec9f367c7257122bef3 Mon Sep 17 00:00:00 2001
+From: Andreas Schneider <asn@cryptomilk.org>
+Date: Wed, 17 Oct 2018 07:23:10 +0200
+Subject: [PATCH 2/8] packet: Add missing break in ssh_packet_incoming_filter()
+
+CID 1396239
+
+Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
+(cherry picked from commit fe618a35dc4be3e73ddf29d0c4a96b98d3b9c48f)
+Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
+---
+ src/packet.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/src/packet.c
++++ b/src/packet.c
+@@ -285,6 +285,7 @@ static enum ssh_packet_filter_result_e s
+ (session->dh_handshake_state != DH_STATE_FINISHED))
+ {
+ rc = SSH_PACKET_DENIED;
++ break;
+ }
+
+ rc = SSH_PACKET_ALLOWED;
--- /dev/null
+From 734e3ce6747a5ed120b93a1ff253b3fde5f20024 Mon Sep 17 00:00:00 2001
+From: Meng Tan <mtan@wallix.com>
+Date: Wed, 17 Oct 2018 14:50:08 +0200
+Subject: [PATCH 3/8] server: Set correct state after sending INFO_REQUEST (Kbd
+ Interactive)
+
+Signed-off-by: Meng Tan <mtan@wallix.com>
+Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
+(cherry picked from commit 4ea46eecce9f4e676150fe27fec34e1570b70ace)
+Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
+---
+ src/server.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/src/server.c
++++ b/src/server.c
+@@ -976,6 +976,7 @@ int ssh_message_auth_interactive_request
+ msg->session->kbdint->prompts = NULL;
+ msg->session->kbdint->echo = NULL;
+ }
++ msg->session->auth.state = SSH_AUTH_STATE_INFO;
+
+ return rc;
+ }
--- /dev/null
+From 3fe7510b261098e3937ab5417935916a46e6727b Mon Sep 17 00:00:00 2001
+From: Andreas Schneider <asn@cryptomilk.org>
+Date: Fri, 19 Oct 2018 11:40:44 +0200
+Subject: [PATCH 4/8] messages: Check that the requested service is
+ 'ssh-connection'
+
+Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
+(cherry picked from commit 9c200d3ef4f62d724d3bae2563b81c38cc31e215)
+Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
+---
+ src/messages.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+--- a/src/messages.c
++++ b/src/messages.c
+@@ -649,6 +649,7 @@ SSH_PACKET_CALLBACK(ssh_packet_userauth_
+ ssh_message msg = NULL;
+ char *service = NULL;
+ char *method = NULL;
++ int cmp;
+ int rc;
+
+ (void)user;
+@@ -675,6 +676,13 @@ SSH_PACKET_CALLBACK(ssh_packet_userauth_
+ service, method,
+ msg->auth_request.username);
+
++ cmp = strcmp(service, "ssh-connection");
++ if (cmp != 0) {
++ SSH_LOG(SSH_LOG_WARNING,
++ "Invalid service request: %s",
++ service);
++ goto end;
++ }
+
+ if (strcmp(method, "none") == 0) {
+ msg->auth_request.method = SSH_AUTH_METHOD_NONE;
--- /dev/null
+From acb0e4f401440ca325e441064d2cb4b896fb9a3d Mon Sep 17 00:00:00 2001
+From: Andreas Schneider <asn@cryptomilk.org>
+Date: Wed, 17 Oct 2018 17:32:54 +0200
+Subject: [PATCH 5/8] examples: Explicitly track auth state in
+ samplesshd-kbdint
+
+Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
+(cherry picked from commit 0ff566b6dde5cd27653aa35280feceefad5d5224)
+Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
+---
+ examples/samplesshd-kbdint.c | 20 ++++++++++++++++----
+ 1 file changed, 16 insertions(+), 4 deletions(-)
+
+--- a/examples/samplesshd-kbdint.c
++++ b/examples/samplesshd-kbdint.c
+@@ -23,6 +23,7 @@ clients must be made or how a client sho
+ #include <stdlib.h>
+ #include <string.h>
+ #include <stdio.h>
++#include <stdbool.h>
+
+ #define SSHD_USER "libssh"
+ #define SSHD_PASSWORD "libssh"
+@@ -36,6 +37,7 @@ clients must be made or how a client sho
+ #endif
+
+ static int port = 22;
++static bool authenticated = false;
+
+ #ifdef WITH_PCAP
+ static const char *pcap_file = "debug.server.pcap";
+@@ -61,11 +63,20 @@ static void cleanup_pcap(void) {
+ #endif
+
+
+-static int auth_password(const char *user, const char *password){
+- if(strcmp(user, SSHD_USER))
++static int auth_password(const char *user, const char *password)
++{
++ int cmp;
++
++ cmp = strcmp(user, SSHD_USER);
++ if (cmp != 0) {
+ return 0;
+- if(strcmp(password, SSHD_PASSWORD))
++ }
++ cmp = strcmp(password, SSHD_PASSWORD);
++ if (cmp != 0) {
+ return 0;
++ }
++
++ authenticated = true;
+ return 1; // authenticated
+ }
+ #ifdef HAVE_ARGP_H
+@@ -200,6 +211,7 @@ static int kbdint_check_response(ssh_ses
+ return 0;
+ }
+
++ authenticated = true;
+ return 1;
+ }
+
+@@ -328,7 +340,7 @@ int main(int argc, char **argv){
+
+ /* proceed to authentication */
+ auth = authenticate(session);
+- if(!auth){
++ if (!auth || !authenticated) {
+ printf("Authentication error: %s\n", ssh_get_error(session));
+ ssh_disconnect(session);
+ return 1;
--- /dev/null
+From 7ad80ba1cc48f7af1f192692d100a6255d97b843 Mon Sep 17 00:00:00 2001
+From: Andreas Schneider <asn@cryptomilk.org>
+Date: Wed, 24 Oct 2018 19:57:17 +0200
+Subject: [PATCH 6/8] server: Fix compile error
+
+Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
+Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
+---
+ src/server.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/src/server.c
++++ b/src/server.c
+@@ -976,7 +976,7 @@ int ssh_message_auth_interactive_request
+ msg->session->kbdint->prompts = NULL;
+ msg->session->kbdint->echo = NULL;
+ }
+- msg->session->auth.state = SSH_AUTH_STATE_INFO;
++ msg->session->auth_state = SSH_AUTH_STATE_INFO;
+
+ return rc;
+ }
--- /dev/null
+From 103973215443f6e02e010114a3f7ac19eb6f3c8c Mon Sep 17 00:00:00 2001
+From: Meng Tan <mtan@wallix.com>
+Date: Thu, 25 Oct 2018 17:06:06 +0200
+Subject: [PATCH 7/8] gssapi: Set correct state after sending GSSAPI_RESPONSE
+ (select mechanism OID)
+
+Signed-off-by: Meng Tan <mtan@wallix.com>
+Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
+(cherry picked from commit bce8d567053232debd6ec490af5a7d27e1160f39)
+Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
+---
+ src/gssapi.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/src/gssapi.c
++++ b/src/gssapi.c
+@@ -120,6 +120,7 @@ static int ssh_gssapi_send_response(ssh_
+ ssh_set_error_oom(session);
+ return SSH_ERROR;
+ }
++ session->auth_state = SSH_AUTH_STATE_GSSAPI_TOKEN;
+
+ packet_send(session);
+ SSH_LOG(SSH_LOG_PACKET,
--- /dev/null
+From 9d5cf209df4c260546e1468cc15fbbbfba3097c6 Mon Sep 17 00:00:00 2001
+From: Andreas Schneider <asn@cryptomilk.org>
+Date: Sat, 27 Oct 2018 22:15:56 +0200
+Subject: [PATCH 8/8] libcrypto: Fix memory leak in evp_final()
+
+Fixes T116
+
+Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
+(cherry picked from commit a2807474621e51b386ea26ce2a01d2b1aa295c7b)
+Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
+---
+ src/libcrypto.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/src/libcrypto.c
++++ b/src/libcrypto.c
+@@ -165,6 +165,7 @@ void evp_update(EVPCTX ctx, const void *
+ void evp_final(EVPCTX ctx, unsigned char *md, unsigned int *mdlen)
+ {
+ EVP_DigestFinal(ctx, md, mdlen);
++ EVP_MD_CTX_free(ctx);
+ }
+ #endif
+
--- /dev/null
+From a8523d83c242c6f71dbf69fab0ca91d768e78f05 Mon Sep 17 00:00:00 2001
+From: Andreas Schneider <asn@cryptomilk.org>
+Date: Sun, 6 Nov 2016 12:07:32 +0100
+Subject: [PATCH] threads: Use new API call for OpenSSL CRYPTO THREADID
+
+BUG: https://red.libssh.org/issues/222
+
+Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
+---
+ ConfigureChecks.cmake | 4 ++++
+ config.h.cmake | 3 +++
+ src/threads.c | 19 +++++++++++++++++--
+ 3 files changed, 24 insertions(+), 2 deletions(-)
+
+diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
+index 0a53c5b1..43179d8f 100644
+--- a/ConfigureChecks.cmake
++++ b/ConfigureChecks.cmake
+@@ -95,6 +95,10 @@ if (OPENSSL_FOUND)
+ set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
+ set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_CRYPTO_LIBRARY})
+ check_function_exists(CRYPTO_ctr128_encrypt HAVE_OPENSSL_CRYPTO_CTR128_ENCRYPT)
++
++ set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
++ set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_CRYPTO_LIBRARY})
++ check_function_exists(CRYPTO_THREADID_set_callback HAVE_OPENSSL_CRYPTO_THREADID_SET_CALLBACK)
+ endif()
+
+ if (CMAKE_HAVE_PTHREAD_H)
+diff --git a/config.h.cmake b/config.h.cmake
+index 3e7f7939..b87fea5c 100644
+--- a/config.h.cmake
++++ b/config.h.cmake
+@@ -79,6 +79,9 @@
+ /* Define to 1 if you have the `CRYPTO_ctr128_encrypt' function. */
+ #cmakedefine HAVE_OPENSSL_CRYPTO_CTR128_ENCRYPT 1
+
++/* Define to 1 if you have the `CRYPTO_THREADID_set_callback' function. */
++#cmakedefine HAVE_OPENSSL_CRYPTO_THREADID_SET_CALLBACK 1
++
+ /* Define to 1 if you have the `snprintf' function. */
+ #cmakedefine HAVE_SNPRINTF 1
+
+diff --git a/src/threads.c b/src/threads.c
+index 7f3a304e..062c3b84 100644
+--- a/src/threads.c
++++ b/src/threads.c
+@@ -116,6 +116,15 @@ static void libcrypto_lock_callback(int mode, int i, const char *file, int line)
+ }
+ }
+
++#ifdef HAVE_OPENSSL_CRYPTO_THREADID_SET_CALLBACK
++static void libcrypto_THREADID_callback(CRYPTO_THREADID *id)
++{
++ unsigned long thread_id = (*user_callbacks->thread_id)();
++
++ CRYPTO_THREADID_set_numeric(id, thread_id);
++}
++#endif /* HAVE_OPENSSL_CRYPTO_THREADID_SET_CALLBACK */
++
+ static int libcrypto_thread_init(void){
+ int n=CRYPTO_num_locks();
+ int i;
+@@ -127,8 +136,14 @@ static int libcrypto_thread_init(void){
+ for (i=0;i<n;++i){
+ user_callbacks->mutex_init(&libcrypto_mutexes[i]);
+ }
+- CRYPTO_set_id_callback(user_callbacks->thread_id);
+- CRYPTO_set_locking_callback(libcrypto_lock_callback);
++
++#ifdef HAVE_OPENSSL_CRYPTO_THREADID_SET_CALLBACK
++ CRYPTO_THREADID_set_callback(libcrypto_THREADID_callback);
++#else
++ CRYPTO_set_id_callback(user_callbacks->thread_id);
++#endif
++
++ CRYPTO_set_locking_callback(libcrypto_lock_callback);
+
+ return SSH_OK;
+ }
+--
+2.19.1
+
set(PACKAGE ${APPLICATION_NAME})
set(VERSION ${APPLICATION_VERSION})
-@@ -270,6 +269,8 @@ if (WITH_GSSAPI AND NOT GSSAPI_FOUND)
+@@ -276,6 +275,8 @@ if (WITH_GSSAPI AND NOT GSSAPI_FOUND)
endif (WITH_GSSAPI AND NOT GSSAPI_FOUND)
# ENDIAN
--- /dev/null
+From 8d5cf617d53d0545a0d141abf94396c28ca7e736 Mon Sep 17 00:00:00 2001
+From: Andreas Schneider <asn@cryptomilk.org>
+Date: Sun, 29 Oct 2017 16:06:14 +0100
+Subject: [PATCH] pki_crypto: Don't use deprecated function with newer
+ OpenSSL
+
+Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
+---
+ src/pki_crypto.c | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+diff --git a/src/pki_crypto.c b/src/pki_crypto.c
+index 9e27436c..34d6e81c 100644
+--- a/src/pki_crypto.c
++++ b/src/pki_crypto.c
+@@ -451,11 +451,24 @@ int pki_key_generate_rsa(ssh_key key, int parameter){
+
+ int pki_key_generate_dss(ssh_key key, int parameter){
+ int rc;
++#if OPENSSL_VERSION_NUMBER > 0x10100000L
++ rc = DSA_generate_parameters_ex(key->dsa,
++ parameter,
++ NULL, /* seed */
++ 0, /* seed_len */
++ NULL, /* counter_ret */
++ NULL, /* h_ret */
++ NULL); /* cb */
++ if (rc != 1) {
++ return SSH_ERROR;
++ }
++#else
+ key->dsa = DSA_generate_parameters(parameter, NULL, 0, NULL, NULL,
+ NULL, NULL);
+ if(key->dsa == NULL){
+ return SSH_ERROR;
+ }
++#endif
+ rc = DSA_generate_key(key->dsa);
+ if (rc != 1){
+ DSA_free(key->dsa);
+--
+2.19.1
+
--- /dev/null
+From ab67e42d6a0529f5fb81ee86049bf10abe99f839 Mon Sep 17 00:00:00 2001
+From: Jakub Jelen <jjelen@redhat.com>
+Date: Tue, 7 Nov 2017 09:38:40 +0100
+Subject: [PATCH] pki_crypto: Avoid segfault with OpenSSL 1.1.0
+
+Signed-off-by: Jakub Jelen <jjelen@redhat.com>
+Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
+---
+ src/pki_crypto.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/pki_crypto.c b/src/pki_crypto.c
+index 34d6e81c..30f49a81 100644
+--- a/src/pki_crypto.c
++++ b/src/pki_crypto.c
+@@ -452,6 +452,10 @@ int pki_key_generate_rsa(ssh_key key, int parameter){
+ int pki_key_generate_dss(ssh_key key, int parameter){
+ int rc;
+ #if OPENSSL_VERSION_NUMBER > 0x10100000L
++ key->dsa = DSA_new();
++ if (!key->dsa) {
++ return SSH_ERROR;
++ }
+ rc = DSA_generate_parameters_ex(key->dsa,
+ parameter,
+ NULL, /* seed */
+--
+2.19.1
+
--- /dev/null
+From c39f7578765859d7416e4140c92d034c8cae3341 Mon Sep 17 00:00:00 2001
+From: Jakub Jelen <jjelen@redhat.com>
+Date: Wed, 8 Nov 2017 15:35:08 +0100
+Subject: [PATCH] pki_crypto: Avoid potential memory leak
+
+Signed-off-by: Jakub Jelen <jjelen@redhat.com>
+Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
+---
+ src/pki_crypto.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/pki_crypto.c b/src/pki_crypto.c
+index 30f49a81..d9f7753a 100644
+--- a/src/pki_crypto.c
++++ b/src/pki_crypto.c
+@@ -453,7 +453,7 @@ int pki_key_generate_dss(ssh_key key, int parameter){
+ int rc;
+ #if OPENSSL_VERSION_NUMBER > 0x10100000L
+ key->dsa = DSA_new();
+- if (!key->dsa) {
++ if (key->dsa == NULL) {
+ return SSH_ERROR;
+ }
+ rc = DSA_generate_parameters_ex(key->dsa,
+@@ -464,6 +464,8 @@ int pki_key_generate_dss(ssh_key key, int parameter){
+ NULL, /* h_ret */
+ NULL); /* cb */
+ if (rc != 1) {
++ DSA_free(key->dsa);
++ key->dsa = NULL;
+ return SSH_ERROR;
+ }
+ #else
+--
+2.19.1
+
--- /dev/null
+From 8349ff1ec3d001aa85cc94a9004509cca8ebf036 Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Wed, 7 Nov 2018 17:17:53 -0800
+Subject: [PATCH] crypto: Fix compilation for OpenSSL without deprecated
+ APIs
+
+Added missing bn.h include.
+
+Made engine.h include conditional, otherwise it would fail.
+
+DSA_generate_parameters was deprecated long before 1.1.0.
+
+Signed-off-by: Rosen Penev <rosenp@gmail.com>
+---
+ src/libcrypto-compat.c | 5 ++++-
+ src/libcrypto-compat.h | 1 +
+ src/pki_crypto.c | 2 +-
+ 3 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/src/libcrypto-compat.c b/src/libcrypto-compat.c
+index 4b1f36a5..b8b4f11a 100644
+--- a/src/libcrypto-compat.c
++++ b/src/libcrypto-compat.c
+@@ -8,9 +8,12 @@
+ */
+
+ #include <string.h>
+-#include <openssl/engine.h>
+ #include "libcrypto-compat.h"
+
++#ifndef OPENSSL_NO_ENGINE
++#include <openssl/engine.h>
++#endif
++
+ static void *OPENSSL_zalloc(size_t num)
+ {
+ void *ret = OPENSSL_malloc(num);
+diff --git a/src/libcrypto-compat.h b/src/libcrypto-compat.h
+index 21542c65..00e4f2a3 100644
+--- a/src/libcrypto-compat.h
++++ b/src/libcrypto-compat.h
+@@ -10,6 +10,7 @@
+ #include <openssl/dh.h>
+ #include <openssl/evp.h>
+ #include <openssl/hmac.h>
++#include <openssl/bn.h>
+
+ int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d);
+ int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q);
+diff --git a/src/pki_crypto.c b/src/pki_crypto.c
+index d9f7753a..c1aac409 100644
+--- a/src/pki_crypto.c
++++ b/src/pki_crypto.c
+@@ -451,7 +451,7 @@ int pki_key_generate_rsa(ssh_key key, int parameter){
+
+ int pki_key_generate_dss(ssh_key key, int parameter){
+ int rc;
+-#if OPENSSL_VERSION_NUMBER > 0x10100000L
++#if OPENSSL_VERSION_NUMBER > 0x00908000L
+ key->dsa = DSA_new();
+ if (key->dsa == NULL) {
+ return SSH_ERROR;
+--
+2.19.1
+
+++ /dev/null
---- a/src/libcrypto.c
-+++ b/src/libcrypto.c
-@@ -43,10 +43,12 @@
- #include <openssl/hmac.h>
- #include <openssl/opensslv.h>
- #include <openssl/rand.h>
-+#include "libcrypto-compat.h"
-
- #ifdef HAVE_OPENSSL_AES_H
- #define HAS_AES
- #include <openssl/aes.h>
-+#include <openssl/modes.h>
- #endif
- #ifdef HAVE_OPENSSL_BLOWFISH_H
- #define HAS_BLOWFISH
-@@ -133,18 +135,20 @@ static const EVP_MD *nid_to_evpmd(int ni
- void evp(int nid, unsigned char *digest, int len, unsigned char *hash, unsigned int *hlen)
- {
- const EVP_MD *evp_md = nid_to_evpmd(nid);
-- EVP_MD_CTX md;
-+ EVP_MD_CTX *md;
-
-- EVP_DigestInit(&md, evp_md);
-- EVP_DigestUpdate(&md, digest, len);
-- EVP_DigestFinal(&md, hash, hlen);
-+ md = EVP_MD_CTX_new();
-+ EVP_DigestInit(md, evp_md);
-+ EVP_DigestUpdate(md, digest, len);
-+ EVP_DigestFinal(md, hash, hlen);
-+ EVP_MD_CTX_free(md);
- }
-
- EVPCTX evp_init(int nid)
- {
- const EVP_MD *evp_md = nid_to_evpmd(nid);
-
-- EVPCTX ctx = malloc(sizeof(EVP_MD_CTX));
-+ EVPCTX ctx = EVP_MD_CTX_new();
- if (ctx == NULL) {
- return NULL;
- }
-@@ -322,32 +326,33 @@ void ssh_mac_final(unsigned char *md, ss
- HMACCTX hmac_init(const void *key, int len, enum ssh_hmac_e type) {
- HMACCTX ctx = NULL;
-
-- ctx = malloc(sizeof(*ctx));
-+ ctx = HMAC_CTX_new();
- if (ctx == NULL) {
- return NULL;
- }
-
- #ifndef OLD_CRYPTO
-- HMAC_CTX_init(ctx); // openssl 0.9.7 requires it.
-+ HMAC_CTX_reset(ctx); // openssl 0.9.7 requires it.
- #endif
-
- switch(type) {
- case SSH_HMAC_SHA1:
-- HMAC_Init(ctx, key, len, EVP_sha1());
-+ HMAC_Init_ex(ctx, key, len, EVP_sha1(), NULL);
- break;
- case SSH_HMAC_SHA256:
-- HMAC_Init(ctx, key, len, EVP_sha256());
-+ HMAC_Init_ex(ctx, key, len, EVP_sha256(), NULL);
- break;
- case SSH_HMAC_SHA384:
-- HMAC_Init(ctx, key, len, EVP_sha384());
-+ HMAC_Init_ex(ctx, key, len, EVP_sha384(), NULL);
- break;
- case SSH_HMAC_SHA512:
-- HMAC_Init(ctx, key, len, EVP_sha512());
-+ HMAC_Init_ex(ctx, key, len, EVP_sha512(), NULL);
- break;
- case SSH_HMAC_MD5:
-- HMAC_Init(ctx, key, len, EVP_md5());
-+ HMAC_Init_ex(ctx, key, len, EVP_md5(), NULL);
- break;
- default:
-+ HMAC_CTX_free(ctx);
- SAFE_FREE(ctx);
- ctx = NULL;
- }
-@@ -363,7 +368,8 @@ void hmac_final(HMACCTX ctx, unsigned ch
- HMAC_Final(ctx,hashmacbuf,len);
-
- #ifndef OLD_CRYPTO
-- HMAC_CTX_cleanup(ctx);
-+ HMAC_CTX_free(ctx);
-+ ctx = NULL;
- #else
- HMAC_cleanup(ctx);
- #endif
-@@ -455,7 +461,11 @@ static void aes_ctr128_encrypt(struct ss
- * Same for num, which is being used to store the current offset in blocksize in CTR
- * function.
- */
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
- AES_ctr128_encrypt(in, out, len, cipher->key, cipher->IV, tmp_buffer, &num);
-+#else
-+ CRYPTO_ctr128_encrypt(in, out, len, cipher->key, cipher->IV, tmp_buffer, &num, (block128_f)AES_encrypt);
-+#endif
- }
- #endif /* BROKEN_AES_CTR */
- #endif /* HAS_AES */
---- a/src/pki_crypto.c
-+++ b/src/pki_crypto.c
-@@ -31,6 +31,7 @@
- #include <openssl/dsa.h>
- #include <openssl/err.h>
- #include <openssl/rsa.h>
-+#include "libcrypto-compat.h"
-
- #ifdef HAVE_OPENSSL_EC_H
- #include <openssl/ec.h>
-@@ -230,7 +231,10 @@ ssh_key pki_key_dup(const ssh_key key, i
- }
-
- switch (key->type) {
-- case SSH_KEYTYPE_DSS:
-+ case SSH_KEYTYPE_DSS: {
-+ const BIGNUM *p = NULL, *q = NULL, *g = NULL,
-+ *pub_key = NULL, *priv_key = NULL;
-+ BIGNUM *np, *nq, *ng, *npub_key, *npriv_key;
- new->dsa = DSA_new();
- if (new->dsa == NULL) {
- goto fail;
-@@ -243,36 +247,54 @@ ssh_key pki_key_dup(const ssh_key key, i
- * pub_key = public key y = g^x
- * priv_key = private key x
- */
-- new->dsa->p = BN_dup(key->dsa->p);
-- if (new->dsa->p == NULL) {
-+ DSA_get0_pqg(key->dsa, &p, &q, &g);
-+ np = BN_dup(p);
-+ nq = BN_dup(q);
-+ ng = BN_dup(g);
-+ if (np == NULL || nq == NULL || ng == NULL) {
-+ BN_free(np);
-+ BN_free(nq);
-+ BN_free(ng);
- goto fail;
- }
-
-- new->dsa->q = BN_dup(key->dsa->q);
-- if (new->dsa->q == NULL) {
-+ rc = DSA_set0_pqg(new->dsa, np, nq, ng);
-+ if (rc == 0) {
-+ BN_free(np);
-+ BN_free(nq);
-+ BN_free(ng);
- goto fail;
- }
-
-- new->dsa->g = BN_dup(key->dsa->g);
-- if (new->dsa->g == NULL) {
-+ DSA_get0_key(key->dsa, &pub_key, &priv_key);
-+ npub_key = BN_dup(pub_key);
-+ if (npub_key == NULL) {
- goto fail;
- }
-
-- new->dsa->pub_key = BN_dup(key->dsa->pub_key);
-- if (new->dsa->pub_key == NULL) {
-+ rc = DSA_set0_key(new->dsa, npub_key, NULL);
-+ if (rc == 0) {
- goto fail;
- }
-
- if (!demote && (key->flags & SSH_KEY_FLAG_PRIVATE)) {
-- new->dsa->priv_key = BN_dup(key->dsa->priv_key);
-- if (new->dsa->priv_key == NULL) {
-+ npriv_key = BN_dup(priv_key);
-+ if (npriv_key == NULL) {
-+ goto fail;
-+ }
-+
-+ rc = DSA_set0_key(new->dsa, NULL, npriv_key);
-+ if (rc == 0) {
- goto fail;
- }
- }
-
- break;
-+ }
- case SSH_KEYTYPE_RSA:
-- case SSH_KEYTYPE_RSA1:
-+ case SSH_KEYTYPE_RSA1: {
-+ const BIGNUM *n = NULL, *e = NULL, *d = NULL;
-+ BIGNUM *nn, *ne, *nd;
- new->rsa = RSA_new();
- if (new->rsa == NULL) {
- goto fail;
-@@ -288,62 +310,82 @@ ssh_key pki_key_dup(const ssh_key key, i
- * dmq1 = d mod (q-1)
- * iqmp = q^-1 mod p
- */
-- new->rsa->n = BN_dup(key->rsa->n);
-- if (new->rsa->n == NULL) {
-+ RSA_get0_key(key->rsa, &n, &e, &d);
-+ nn = BN_dup(n);
-+ ne = BN_dup(e);
-+ if (nn == NULL || ne == NULL) {
-+ BN_free(nn);
-+ BN_free(ne);
- goto fail;
- }
-
-- new->rsa->e = BN_dup(key->rsa->e);
-- if (new->rsa->e == NULL) {
-+ rc = RSA_set0_key(new->rsa, nn, ne, NULL);
-+ if (rc == 0) {
-+ BN_free(nn);
-+ BN_free(ne);
- goto fail;
- }
-
- if (!demote && (key->flags & SSH_KEY_FLAG_PRIVATE)) {
-- new->rsa->d = BN_dup(key->rsa->d);
-- if (new->rsa->d == NULL) {
-+ const BIGNUM *p = NULL, *q = NULL, *dmp1 = NULL,
-+ *dmq1 = NULL, *iqmp = NULL;
-+ BIGNUM *np, *nq, *ndmp1, *ndmq1, *niqmp;
-+
-+ nd = BN_dup(d);
-+ if (nd == NULL) {
-+ goto fail;
-+ }
-+
-+ rc = RSA_set0_key(new->rsa, NULL, NULL, nd);
-+ if (rc == 0) {
- goto fail;
- }
-
- /* p, q, dmp1, dmq1 and iqmp may be NULL in private keys, but the
- * RSA operations are much faster when these values are available.
- */
-- if (key->rsa->p != NULL) {
-- new->rsa->p = BN_dup(key->rsa->p);
-- if (new->rsa->p == NULL) {
-+ RSA_get0_factors(key->rsa, &p, &q);
-+ if (p != NULL && q != NULL) { /* need to set both of them */
-+ np = BN_dup(p);
-+ nq = BN_dup(q);
-+ if (np == NULL || nq == NULL) {
-+ BN_free(np);
-+ BN_free(nq);
- goto fail;
- }
-- }
-
-- if (key->rsa->q != NULL) {
-- new->rsa->q = BN_dup(key->rsa->q);
-- if (new->rsa->q == NULL) {
-+ rc = RSA_set0_factors(new->rsa, np, nq);
-+ if (rc == 0) {
-+ BN_free(np);
-+ BN_free(nq);
- goto fail;
- }
- }
-
-- if (key->rsa->dmp1 != NULL) {
-- new->rsa->dmp1 = BN_dup(key->rsa->dmp1);
-- if (new->rsa->dmp1 == NULL) {
-+ RSA_get0_crt_params(key->rsa, &dmp1, &dmq1, &iqmp);
-+ if (dmp1 != NULL || dmq1 != NULL || iqmp != NULL) {
-+ ndmp1 = BN_dup(dmp1);
-+ ndmq1 = BN_dup(dmq1);
-+ niqmp = BN_dup(iqmp);
-+ if (ndmp1 == NULL || ndmq1 == NULL || niqmp == NULL) {
-+ BN_free(ndmp1);
-+ BN_free(ndmq1);
-+ BN_free(niqmp);
- goto fail;
- }
-- }
-
-- if (key->rsa->dmq1 != NULL) {
-- new->rsa->dmq1 = BN_dup(key->rsa->dmq1);
-- if (new->rsa->dmq1 == NULL) {
-- goto fail;
-- }
-- }
--
-- if (key->rsa->iqmp != NULL) {
-- new->rsa->iqmp = BN_dup(key->rsa->iqmp);
-- if (new->rsa->iqmp == NULL) {
-+ rc = RSA_set0_crt_params(new->rsa, ndmp1, ndmq1, niqmp);
-+ if (rc == 0) {
-+ BN_free(ndmp1);
-+ BN_free(ndmq1);
-+ BN_free(niqmp);
- goto fail;
- }
- }
- }
-
- break;
-+ }
- case SSH_KEYTYPE_ECDSA:
- #ifdef HAVE_OPENSSL_ECC
- new->ecdsa_nid = key->ecdsa_nid;
-@@ -409,11 +451,30 @@ int pki_key_generate_rsa(ssh_key key, in
-
- int pki_key_generate_dss(ssh_key key, int parameter){
- int rc;
-+#if OPENSSL_VERSION_NUMBER > 0x10100000L
-+ key->dsa = DSA_new();
-+ if (key->dsa == NULL) {
-+ return SSH_ERROR;
-+ }
-+ rc = DSA_generate_parameters_ex(key->dsa,
-+ parameter,
-+ NULL, /* seed */
-+ 0, /* seed_len */
-+ NULL, /* counter_ret */
-+ NULL, /* h_ret */
-+ NULL); /* cb */
-+ if (rc != 1) {
-+ DSA_free(key->dsa);
-+ key->dsa = NULL;
-+ return SSH_ERROR;
-+ }
-+#else
- key->dsa = DSA_generate_parameters(parameter, NULL, 0, NULL, NULL,
- NULL, NULL);
- if(key->dsa == NULL){
- return SSH_ERROR;
- }
-+#endif
- rc = DSA_generate_key(key->dsa);
- if (rc != 1){
- DSA_free(key->dsa);
-@@ -466,51 +527,64 @@ int pki_key_compare(const ssh_key k1,
- enum ssh_keycmp_e what)
- {
- switch (k1->type) {
-- case SSH_KEYTYPE_DSS:
-+ case SSH_KEYTYPE_DSS: {
-+ const BIGNUM *p1, *p2, *q1, *q2, *g1, *g2,
-+ *pub_key1, *pub_key2, *priv_key1, *priv_key2;
- if (DSA_size(k1->dsa) != DSA_size(k2->dsa)) {
- return 1;
- }
-- if (bignum_cmp(k1->dsa->p, k2->dsa->p) != 0) {
-+ DSA_get0_pqg(k1->dsa, &p1, &q1, &g1);
-+ DSA_get0_pqg(k2->dsa, &p2, &q2, &g2);
-+ if (bignum_cmp(p1, p2) != 0) {
- return 1;
- }
-- if (bignum_cmp(k1->dsa->q, k2->dsa->q) != 0) {
-+ if (bignum_cmp(q1, q2) != 0) {
- return 1;
- }
-- if (bignum_cmp(k1->dsa->g, k2->dsa->g) != 0) {
-+ if (bignum_cmp(g1, g2) != 0) {
- return 1;
- }
-- if (bignum_cmp(k1->dsa->pub_key, k2->dsa->pub_key) != 0) {
-+ DSA_get0_key(k1->dsa, &pub_key1, &priv_key1);
-+ DSA_get0_key(k2->dsa, &pub_key2, &priv_key2);
-+ if (bignum_cmp(pub_key1, pub_key2) != 0) {
- return 1;
- }
-
- if (what == SSH_KEY_CMP_PRIVATE) {
-- if (bignum_cmp(k1->dsa->priv_key, k2->dsa->priv_key) != 0) {
-+ if (bignum_cmp(priv_key1, priv_key2) != 0) {
- return 1;
- }
- }
- break;
-+ }
- case SSH_KEYTYPE_RSA:
-- case SSH_KEYTYPE_RSA1:
-+ case SSH_KEYTYPE_RSA1: {
-+ const BIGNUM *e1, *e2, *n1, *n2, *p1, *p2, *q1, *q2;
- if (RSA_size(k1->rsa) != RSA_size(k2->rsa)) {
- return 1;
- }
-- if (bignum_cmp(k1->rsa->e, k2->rsa->e) != 0) {
-+ RSA_get0_key(k1->rsa, &n1, &e1, NULL);
-+ RSA_get0_key(k2->rsa, &n2, &e2, NULL);
-+ if (bignum_cmp(e1, e2) != 0) {
- return 1;
- }
-- if (bignum_cmp(k1->rsa->n, k2->rsa->n) != 0) {
-+ if (bignum_cmp(n1, n2) != 0) {
- return 1;
- }
-
- if (what == SSH_KEY_CMP_PRIVATE) {
-- if (bignum_cmp(k1->rsa->p, k2->rsa->p) != 0) {
-+ RSA_get0_factors(k1->rsa, &p1, &q1);
-+ RSA_get0_factors(k2->rsa, &p2, &q2);
-+ if (bignum_cmp(p1, p2) != 0) {
- return 1;
- }
-
-- if (bignum_cmp(k1->rsa->q, k2->rsa->q) != 0) {
-+ if (bignum_cmp(q1, q2) != 0) {
- return 1;
- }
- }
- break;
-+ }
- case SSH_KEYTYPE_ECDSA:
- #ifdef HAVE_OPENSSL_ECC
- {
-@@ -586,7 +660,7 @@ ssh_string pki_private_key_to_pem(const
- } else {
- rc = PEM_write_bio_DSAPrivateKey(mem,
- key->dsa,
-- NULL, /* cipher */
-+ EVP_aes_128_cbc(),
- NULL, /* kstr */
- 0, /* klen */
- NULL, /* auth_fn */
-@@ -611,7 +685,7 @@ ssh_string pki_private_key_to_pem(const
- } else {
- rc = PEM_write_bio_RSAPrivateKey(mem,
- key->rsa,
-- NULL, /* cipher */
-+ EVP_aes_128_cbc(),
- NULL, /* kstr */
- 0, /* klen */
- NULL, /* auth_fn */
-@@ -621,8 +695,8 @@ ssh_string pki_private_key_to_pem(const
- goto err;
- }
- break;
-- case SSH_KEYTYPE_ECDSA:
- #ifdef HAVE_ECC
-+ case SSH_KEYTYPE_ECDSA:
- if (passphrase == NULL) {
- struct pem_get_password_struct pgp = { auth_fn, auth_data };
-
-@@ -636,7 +710,7 @@ ssh_string pki_private_key_to_pem(const
- } else {
- rc = PEM_write_bio_ECPrivateKey(mem,
- key->ecdsa,
-- NULL, /* cipher */
-+ EVP_aes_128_cbc(),
- NULL, /* kstr */
- 0, /* klen */
- NULL, /* auth_fn */
-@@ -819,43 +893,65 @@ int pki_pubkey_build_dss(ssh_key key,
- ssh_string q,
- ssh_string g,
- ssh_string pubkey) {
-+ int rc;
-+ BIGNUM *bp, *bq, *bg, *bpub_key;
-+
- key->dsa = DSA_new();
- if (key->dsa == NULL) {
- return SSH_ERROR;
- }
-
-- key->dsa->p = make_string_bn(p);
-- key->dsa->q = make_string_bn(q);
-- key->dsa->g = make_string_bn(g);
-- key->dsa->pub_key = make_string_bn(pubkey);
-- if (key->dsa->p == NULL ||
-- key->dsa->q == NULL ||
-- key->dsa->g == NULL ||
-- key->dsa->pub_key == NULL) {
-- DSA_free(key->dsa);
-- return SSH_ERROR;
-+ bp = make_string_bn(p);
-+ bq = make_string_bn(q);
-+ bg = make_string_bn(g);
-+ bpub_key = make_string_bn(pubkey);
-+ if (bp == NULL || bq == NULL ||
-+ bg == NULL || bpub_key == NULL) {
-+ goto fail;
-+ }
-+
-+ rc = DSA_set0_pqg(key->dsa, bp, bq, bg);
-+ if (rc == 0) {
-+ goto fail;
-+ }
-+
-+ rc = DSA_set0_key(key->dsa, bpub_key, NULL);
-+ if (rc == 0) {
-+ goto fail;
- }
-
- return SSH_OK;
-+fail:
-+ DSA_free(key->dsa);
-+ return SSH_ERROR;
- }
-
- int pki_pubkey_build_rsa(ssh_key key,
- ssh_string e,
- ssh_string n) {
-+ int rc;
-+ BIGNUM *be, *bn;
-+
- key->rsa = RSA_new();
- if (key->rsa == NULL) {
- return SSH_ERROR;
- }
-
-- key->rsa->e = make_string_bn(e);
-- key->rsa->n = make_string_bn(n);
-- if (key->rsa->e == NULL ||
-- key->rsa->n == NULL) {
-- RSA_free(key->rsa);
-- return SSH_ERROR;
-+ be = make_string_bn(e);
-+ bn = make_string_bn(n);
-+ if (be == NULL || bn == NULL) {
-+ goto fail;
-+ }
-+
-+ rc = RSA_set0_key(key->rsa, bn, be, NULL);
-+ if (rc == 0) {
-+ goto fail;
- }
-
- return SSH_OK;
-+fail:
-+ RSA_free(key->rsa);
-+ return SSH_ERROR;
- }
-
- ssh_string pki_publickey_to_blob(const ssh_key key)
-@@ -889,23 +985,26 @@ ssh_string pki_publickey_to_blob(const s
- }
-
- switch (key->type) {
-- case SSH_KEYTYPE_DSS:
-- p = make_bignum_string(key->dsa->p);
-+ case SSH_KEYTYPE_DSS: {
-+ const BIGNUM *bp, *bq, *bg, *bpub_key;
-+ DSA_get0_pqg(key->dsa, &bp, &bq, &bg);
-+ p = make_bignum_string((BIGNUM *)bp);
- if (p == NULL) {
- goto fail;
- }
-
-- q = make_bignum_string(key->dsa->q);
-+ q = make_bignum_string((BIGNUM *)bq);
- if (q == NULL) {
- goto fail;
- }
-
-- g = make_bignum_string(key->dsa->g);
-+ g = make_bignum_string((BIGNUM *)bg);
- if (g == NULL) {
- goto fail;
- }
-
-- n = make_bignum_string(key->dsa->pub_key);
-+ DSA_get0_key(key->dsa, &bpub_key, NULL);
-+ n = make_bignum_string((BIGNUM *)bpub_key);
- if (n == NULL) {
- goto fail;
- }
-@@ -937,14 +1036,17 @@ ssh_string pki_publickey_to_blob(const s
- n = NULL;
-
- break;
-+ }
- case SSH_KEYTYPE_RSA:
-- case SSH_KEYTYPE_RSA1:
-- e = make_bignum_string(key->rsa->e);
-+ case SSH_KEYTYPE_RSA1: {
-+ const BIGNUM *be, *bn;
-+ RSA_get0_key(key->rsa, &bn, &be, NULL);
-+ e = make_bignum_string((BIGNUM *)be);
- if (e == NULL) {
- goto fail;
- }
-
-- n = make_bignum_string(key->rsa->n);
-+ n = make_bignum_string((BIGNUM *)bn);
- if (n == NULL) {
- goto fail;
- }
-@@ -964,6 +1066,7 @@ ssh_string pki_publickey_to_blob(const s
- n = NULL;
-
- break;
-+ }
- case SSH_KEYTYPE_ECDSA:
- #ifdef HAVE_OPENSSL_ECC
- rc = ssh_buffer_reinit(buffer);
-@@ -1065,13 +1168,15 @@ int pki_export_pubkey_rsa1(const ssh_key
- char *e;
- char *n;
- int rsa_size = RSA_size(key->rsa);
-+ const BIGNUM *be, *bn;
-
-- e = bignum_bn2dec(key->rsa->e);
-+ RSA_get0_key(key->rsa, &bn, &be, NULL);
-+ e = bignum_bn2dec(be);
- if (e == NULL) {
- return SSH_ERROR;
- }
-
-- n = bignum_bn2dec(key->rsa->n);
-+ n = bignum_bn2dec(bn);
- if (n == NULL) {
- OPENSSL_free(e);
- return SSH_ERROR;
-@@ -1136,6 +1241,7 @@ static ssh_string pki_dsa_signature_to_b
- {
- char buffer[40] = { 0 };
- ssh_string sig_blob = NULL;
-+ const BIGNUM *pr, *ps;
-
- ssh_string r;
- int r_len, r_offset_in, r_offset_out;
-@@ -1143,12 +1249,13 @@ static ssh_string pki_dsa_signature_to_b
- ssh_string s;
- int s_len, s_offset_in, s_offset_out;
-
-- r = make_bignum_string(sig->dsa_sig->r);
-+ DSA_SIG_get0(sig->dsa_sig, &pr, &ps);
-+ r = make_bignum_string((BIGNUM *)pr);
- if (r == NULL) {
- return NULL;
- }
-
-- s = make_bignum_string(sig->dsa_sig->s);
-+ s = make_bignum_string((BIGNUM *)ps);
- if (s == NULL) {
- ssh_string_free(r);
- return NULL;
-@@ -1201,13 +1308,15 @@ ssh_string pki_signature_to_blob(const s
- ssh_string s;
- ssh_buffer b;
- int rc;
-+ const BIGNUM *pr, *ps;
-
- b = ssh_buffer_new();
- if (b == NULL) {
- return NULL;
- }
-
-- r = make_bignum_string(sig->ecdsa_sig->r);
-+ ECDSA_SIG_get0(sig->ecdsa_sig, &pr, &ps);
-+ r = make_bignum_string((BIGNUM *)pr);
- if (r == NULL) {
- ssh_buffer_free(b);
- return NULL;
-@@ -1219,7 +1328,7 @@ ssh_string pki_signature_to_blob(const s
- return NULL;
- }
-
-- s = make_bignum_string(sig->ecdsa_sig->s);
-+ s = make_bignum_string((BIGNUM *)ps);
- if (s == NULL) {
- ssh_buffer_free(b);
- return NULL;
-@@ -1324,6 +1433,7 @@ ssh_signature pki_signature_from_blob(co
- ssh_string s;
- size_t len;
- int rc;
-+ BIGNUM *pr = NULL, *ps = NULL;
-
- sig = ssh_signature_new();
- if (sig == NULL) {
-@@ -1363,9 +1473,9 @@ ssh_signature pki_signature_from_blob(co
- }
- ssh_string_fill(r, ssh_string_data(sig_blob), 20);
-
-- sig->dsa_sig->r = make_string_bn(r);
-+ pr = make_string_bn(r);
- ssh_string_free(r);
-- if (sig->dsa_sig->r == NULL) {
-+ if (pr == NULL) {
- ssh_signature_free(sig);
- return NULL;
- }
-@@ -1377,9 +1487,15 @@ ssh_signature pki_signature_from_blob(co
- }
- ssh_string_fill(s, (char *)ssh_string_data(sig_blob) + 20, 20);
-
-- sig->dsa_sig->s = make_string_bn(s);
-+ ps = make_string_bn(s);
- ssh_string_free(s);
-- if (sig->dsa_sig->s == NULL) {
-+ if (ps == NULL) {
-+ ssh_signature_free(sig);
-+ return NULL;
-+ }
-+
-+ rc = DSA_SIG_set0(sig->dsa_sig, pr, ps);
-+ if (rc == 0) {
- ssh_signature_free(sig);
- return NULL;
- }
-@@ -1427,17 +1543,17 @@ ssh_signature pki_signature_from_blob(co
- ssh_print_hexa("r", ssh_string_data(r), ssh_string_len(r));
- #endif
-
-- make_string_bn_inplace(r, sig->ecdsa_sig->r);
-+ pr = make_string_bn(r);
- ssh_string_burn(r);
- ssh_string_free(r);
-- if (sig->ecdsa_sig->r == NULL) {
-+ if (pr == NULL) {
- ssh_buffer_free(b);
- ssh_signature_free(sig);
- return NULL;
- }
-
- s = buffer_get_ssh_string(b);
-- rlen = buffer_get_rest_len(b);
-+ rlen = buffer_get_len(b);
- ssh_buffer_free(b);
- if (s == NULL) {
- ssh_signature_free(sig);
-@@ -1448,10 +1564,16 @@ ssh_signature pki_signature_from_blob(co
- ssh_print_hexa("s", ssh_string_data(s), ssh_string_len(s));
- #endif
-
-- make_string_bn_inplace(s, sig->ecdsa_sig->s);
-+ ps = make_string_bn(s);
- ssh_string_burn(s);
- ssh_string_free(s);
-- if (sig->ecdsa_sig->s == NULL) {
-+ if (ps == NULL) {
-+ ssh_signature_free(sig);
-+ return NULL;
-+ }
-+
-+ rc = ECDSA_SIG_set0(sig->ecdsa_sig, pr, ps);
-+ if (rc == 0) {
- ssh_signature_free(sig);
- return NULL;
- }
-@@ -1578,8 +1700,12 @@ ssh_signature pki_do_sign(const ssh_key
- }
-
- #ifdef DEBUG_CRYPTO
-- ssh_print_bignum("r", sig->dsa_sig->r);
-- ssh_print_bignum("s", sig->dsa_sig->s);
-+ {
-+ const BIGNUM *pr, *ps;
-+ DSA_SIG_get0(sig->dsa_sig, &pr, &ps);
-+ ssh_print_bignum("r", (BIGNUM *) pr);
-+ ssh_print_bignum("s", (BIGNUM *) ps);
-+ }
- #endif
-
- break;
-@@ -1601,8 +1727,12 @@ ssh_signature pki_do_sign(const ssh_key
- }
-
- # ifdef DEBUG_CRYPTO
-- ssh_print_bignum("r", sig->ecdsa_sig->r);
-- ssh_print_bignum("s", sig->ecdsa_sig->s);
-+ {
-+ const BIGNUM *pr, *ps;
-+ ECDSA_SIG_get0(sig->ecdsa_sig, &pr, &ps);
-+ ssh_print_bignum("r", (BIGNUM *) pr);
-+ ssh_print_bignum("s", (BIGNUM *) ps);
-+ }
- # endif /* DEBUG_CRYPTO */
-
- break;
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -164,6 +164,9 @@ else (WITH_GCRYPT)
- ${libssh_SRCS}
- pki_crypto.c
- )
-+ if(OPENSSL_VERSION VERSION_LESS "1.1.0")
-+ set(libssh_SRCS ${libssh_SRCS} libcrypto-compat.c)
-+ endif()
- endif (WITH_GCRYPT)
-
- if (WITH_SFTP)
---- /dev/null
-+++ b/src/libcrypto-compat.c
-@@ -0,0 +1,334 @@
-+/*
-+ * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
-+ *
-+ * Licensed under the OpenSSL license (the "License"). You may not use
-+ * this file except in compliance with the License. You can obtain a copy
-+ * in the file LICENSE in the source distribution or at
-+ * https://www.openssl.org/source/license.html
-+ */
-+
-+#include "config.h"
-+
-+#include <string.h>
-+#include <openssl/engine.h>
-+#include "libcrypto-compat.h"
-+
-+static void *OPENSSL_zalloc(size_t num)
-+{
-+ void *ret = OPENSSL_malloc(num);
-+
-+ if (ret != NULL)
-+ memset(ret, 0, num);
-+ return ret;
-+}
-+
-+int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d)
-+{
-+ /* If the fields n and e in r are NULL, the corresponding input
-+ * parameters MUST be non-NULL for n and e. d may be
-+ * left NULL (in case only the public key is used).
-+ */
-+ if ((r->n == NULL && n == NULL)
-+ || (r->e == NULL && e == NULL))
-+ return 0;
-+
-+ if (n != NULL) {
-+ BN_free(r->n);
-+ r->n = n;
-+ }
-+ if (e != NULL) {
-+ BN_free(r->e);
-+ r->e = e;
-+ }
-+ if (d != NULL) {
-+ BN_free(r->d);
-+ r->d = d;
-+ }
-+
-+ return 1;
-+}
-+
-+int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q)
-+{
-+ /* If the fields p and q in r are NULL, the corresponding input
-+ * parameters MUST be non-NULL.
-+ */
-+ if ((r->p == NULL && p == NULL)
-+ || (r->q == NULL && q == NULL))
-+ return 0;
-+
-+ if (p != NULL) {
-+ BN_free(r->p);
-+ r->p = p;
-+ }
-+ if (q != NULL) {
-+ BN_free(r->q);
-+ r->q = q;
-+ }
-+
-+ return 1;
-+}
-+
-+int RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp)
-+{
-+ /* If the fields dmp1, dmq1 and iqmp in r are NULL, the corresponding input
-+ * parameters MUST be non-NULL.
-+ */
-+ if ((r->dmp1 == NULL && dmp1 == NULL)
-+ || (r->dmq1 == NULL && dmq1 == NULL)
-+ || (r->iqmp == NULL && iqmp == NULL))
-+ return 0;
-+
-+ if (dmp1 != NULL) {
-+ BN_free(r->dmp1);
-+ r->dmp1 = dmp1;
-+ }
-+ if (dmq1 != NULL) {
-+ BN_free(r->dmq1);
-+ r->dmq1 = dmq1;
-+ }
-+ if (iqmp != NULL) {
-+ BN_free(r->iqmp);
-+ r->iqmp = iqmp;
-+ }
-+
-+ return 1;
-+}
-+
-+void RSA_get0_key(const RSA *r,
-+ const BIGNUM **n, const BIGNUM **e, const BIGNUM **d)
-+{
-+ if (n != NULL)
-+ *n = r->n;
-+ if (e != NULL)
-+ *e = r->e;
-+ if (d != NULL)
-+ *d = r->d;
-+}
-+
-+void RSA_get0_factors(const RSA *r, const BIGNUM **p, const BIGNUM **q)
-+{
-+ if (p != NULL)
-+ *p = r->p;
-+ if (q != NULL)
-+ *q = r->q;
-+}
-+
-+void RSA_get0_crt_params(const RSA *r,
-+ const BIGNUM **dmp1, const BIGNUM **dmq1,
-+ const BIGNUM **iqmp)
-+{
-+ if (dmp1 != NULL)
-+ *dmp1 = r->dmp1;
-+ if (dmq1 != NULL)
-+ *dmq1 = r->dmq1;
-+ if (iqmp != NULL)
-+ *iqmp = r->iqmp;
-+}
-+
-+void DSA_get0_pqg(const DSA *d,
-+ const BIGNUM **p, const BIGNUM **q, const BIGNUM **g)
-+{
-+ if (p != NULL)
-+ *p = d->p;
-+ if (q != NULL)
-+ *q = d->q;
-+ if (g != NULL)
-+ *g = d->g;
-+}
-+
-+int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g)
-+{
-+ /* If the fields p, q and g in d are NULL, the corresponding input
-+ * parameters MUST be non-NULL.
-+ */
-+ if ((d->p == NULL && p == NULL)
-+ || (d->q == NULL && q == NULL)
-+ || (d->g == NULL && g == NULL))
-+ return 0;
-+
-+ if (p != NULL) {
-+ BN_free(d->p);
-+ d->p = p;
-+ }
-+ if (q != NULL) {
-+ BN_free(d->q);
-+ d->q = q;
-+ }
-+ if (g != NULL) {
-+ BN_free(d->g);
-+ d->g = g;
-+ }
-+
-+ return 1;
-+}
-+
-+void DSA_get0_key(const DSA *d,
-+ const BIGNUM **pub_key, const BIGNUM **priv_key)
-+{
-+ if (pub_key != NULL)
-+ *pub_key = d->pub_key;
-+ if (priv_key != NULL)
-+ *priv_key = d->priv_key;
-+}
-+
-+int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key)
-+{
-+ /* If the field pub_key in d is NULL, the corresponding input
-+ * parameters MUST be non-NULL. The priv_key field may
-+ * be left NULL.
-+ */
-+ if (d->pub_key == NULL && pub_key == NULL)
-+ return 0;
-+
-+ if (pub_key != NULL) {
-+ BN_free(d->pub_key);
-+ d->pub_key = pub_key;
-+ }
-+ if (priv_key != NULL) {
-+ BN_free(d->priv_key);
-+ d->priv_key = priv_key;
-+ }
-+
-+ return 1;
-+}
-+
-+void DSA_SIG_get0(const DSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps)
-+{
-+ if (pr != NULL)
-+ *pr = sig->r;
-+ if (ps != NULL)
-+ *ps = sig->s;
-+}
-+
-+int DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s)
-+{
-+ if (r == NULL || s == NULL)
-+ return 0;
-+ BN_clear_free(sig->r);
-+ BN_clear_free(sig->s);
-+ sig->r = r;
-+ sig->s = s;
-+ return 1;
-+}
-+
-+void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps)
-+{
-+ if (pr != NULL)
-+ *pr = sig->r;
-+ if (ps != NULL)
-+ *ps = sig->s;
-+}
-+
-+int ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s)
-+{
-+ if (r == NULL || s == NULL)
-+ return 0;
-+ BN_clear_free(sig->r);
-+ BN_clear_free(sig->s);
-+ sig->r = r;
-+ sig->s = s;
-+ return 1;
-+}
-+
-+EVP_MD_CTX *EVP_MD_CTX_new(void)
-+{
-+ return OPENSSL_zalloc(sizeof(EVP_MD_CTX));
-+}
-+
-+static void OPENSSL_clear_free(void *str, size_t num)
-+{
-+ if (str == NULL)
-+ return;
-+ if (num)
-+ OPENSSL_cleanse(str, num);
-+ OPENSSL_free(str);
-+}
-+
-+/* This call frees resources associated with the context */
-+int EVP_MD_CTX_reset(EVP_MD_CTX *ctx)
-+{
-+ if (ctx == NULL)
-+ return 1;
-+
-+ /*
-+ * Don't assume ctx->md_data was cleaned in EVP_Digest_Final, because
-+ * sometimes only copies of the context are ever finalised.
-+ */
-+ if (ctx->digest && ctx->digest->cleanup
-+ && !EVP_MD_CTX_test_flags(ctx, EVP_MD_CTX_FLAG_CLEANED))
-+ ctx->digest->cleanup(ctx);
-+ if (ctx->digest && ctx->digest->ctx_size && ctx->md_data
-+ && !EVP_MD_CTX_test_flags(ctx, EVP_MD_CTX_FLAG_REUSE)) {
-+ OPENSSL_clear_free(ctx->md_data, ctx->digest->ctx_size);
-+ }
-+ EVP_PKEY_CTX_free(ctx->pctx);
-+#ifndef OPENSSL_NO_ENGINE
-+ ENGINE_finish(ctx->engine);
-+#endif
-+ OPENSSL_cleanse(ctx, sizeof(*ctx));
-+
-+ return 1;
-+}
-+
-+void EVP_MD_CTX_free(EVP_MD_CTX *ctx)
-+{
-+ EVP_MD_CTX_reset(ctx);
-+ OPENSSL_free(ctx);
-+}
-+
-+HMAC_CTX *HMAC_CTX_new(void)
-+{
-+ HMAC_CTX *ctx = OPENSSL_zalloc(sizeof(HMAC_CTX));
-+
-+ if (ctx != NULL) {
-+ if (!HMAC_CTX_reset(ctx)) {
-+ HMAC_CTX_free(ctx);
-+ return NULL;
-+ }
-+ }
-+ return ctx;
-+}
-+
-+static void hmac_ctx_cleanup(HMAC_CTX *ctx)
-+{
-+ EVP_MD_CTX_reset(&ctx->i_ctx);
-+ EVP_MD_CTX_reset(&ctx->o_ctx);
-+ EVP_MD_CTX_reset(&ctx->md_ctx);
-+ ctx->md = NULL;
-+ ctx->key_length = 0;
-+ OPENSSL_cleanse(ctx->key, sizeof(ctx->key));
-+}
-+
-+void HMAC_CTX_free(HMAC_CTX *ctx)
-+{
-+ if (ctx != NULL) {
-+ hmac_ctx_cleanup(ctx);
-+#if OPENSSL_VERSION_NUMBER > 0x10100000L
-+ EVP_MD_CTX_free(&ctx->i_ctx);
-+ EVP_MD_CTX_free(&ctx->o_ctx);
-+ EVP_MD_CTX_free(&ctx->md_ctx);
-+#endif
-+ OPENSSL_free(ctx);
-+ }
-+}
-+
-+int HMAC_CTX_reset(HMAC_CTX *ctx)
-+{
-+ HMAC_CTX_init(ctx);
-+ return 1;
-+}
-+
-+#ifndef HAVE_OPENSSL_EVP_CIPHER_CTX_NEW
-+EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void)
-+{
-+ return OPENSSL_zalloc(sizeof(EVP_CIPHER_CTX));
-+}
-+
-+void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx)
-+{
-+ /* EVP_CIPHER_CTX_reset(ctx); alias */
-+ EVP_CIPHER_CTX_init(ctx);
-+ OPENSSL_free(ctx);
-+}
-+#endif
---- /dev/null
-+++ b/src/libcrypto-compat.h
-@@ -0,0 +1,42 @@
-+#ifndef LIBCRYPTO_COMPAT_H
-+#define LIBCRYPTO_COMPAT_H
-+
-+#include <openssl/opensslv.h>
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+
-+#include <openssl/rsa.h>
-+#include <openssl/dsa.h>
-+#include <openssl/ecdsa.h>
-+#include <openssl/dh.h>
-+#include <openssl/evp.h>
-+#include <openssl/hmac.h>
-+
-+int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d);
-+int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q);
-+int RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp);
-+void RSA_get0_key(const RSA *r, const BIGNUM **n, const BIGNUM **e, const BIGNUM **d);
-+void RSA_get0_factors(const RSA *r, const BIGNUM **p, const BIGNUM **q);
-+void RSA_get0_crt_params(const RSA *r, const BIGNUM **dmp1, const BIGNUM **dmq1, const BIGNUM **iqmp);
-+
-+void DSA_get0_pqg(const DSA *d, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g);
-+int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g);
-+void DSA_get0_key(const DSA *d, const BIGNUM **pub_key, const BIGNUM **priv_key);
-+int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key);
-+
-+void DSA_SIG_get0(const DSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps);
-+int DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s);
-+
-+void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps);
-+int ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s);
-+
-+int EVP_MD_CTX_reset(EVP_MD_CTX *ctx);
-+EVP_MD_CTX *EVP_MD_CTX_new(void);
-+void EVP_MD_CTX_free(EVP_MD_CTX *ctx);
-+
-+HMAC_CTX *HMAC_CTX_new(void);
-+int HMAC_CTX_reset(HMAC_CTX *ctx);
-+void HMAC_CTX_free(HMAC_CTX *ctx);
-+
-+#endif /* OPENSSL_VERSION_NUMBER */
-+
-+#endif /* LIBCRYPTO_COMPAT_H */
#
-# Copyright (C) 2016 OpenWrt.org
-#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
PKG_NAME:=talloc
PKG_VERSION:=2.1.14
MAJOR_VERSION:=2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.samba.org/ftp/talloc
PKG_HASH:=b185602756a628bac507fa8af8b9df92ace69d27c0add5dab93190ad7c3367ce
-PKG_MAINTAINER:=Lucile Quirion <lucile.quirion@savoirfairelinux.com>
+PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
PKG_LICENSE:=LGPL-3.0+
PKG_BUILD_PARALLEL:=0
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Core memory allocator used in Samba
- DEPENDS:=+USE_GLIBC:libbsd $(ICONV_DEPENDS) +libattr
+ DEPENDS:=$(ICONV_DEPENDS) +libattr
URL:=https://talloc.samba.org/talloc/doc/html/index.html
endef
--- /dev/null
+--- a/lib/replace/wscript
++++ b/lib/replace/wscript
+@@ -340,22 +340,13 @@ def configure(conf):
+
+ conf.CHECK_FUNCS('prctl dirname basename')
+
+- strlcpy_in_bsd = False
++ # Not checking for libbsd
++ conf.CHECK_FUNCS('strlcpy strlcat')
++ conf.CHECK_FUNCS('getpeereid')
++ conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h')
++ conf.CHECK_FUNCS('setproctitle_init')
+
+- # libbsd on some platforms provides strlcpy and strlcat
+- if not conf.CHECK_FUNCS('strlcpy strlcat'):
+- if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
+- checklibc=True):
+- strlcpy_in_bsd = True
+- if not conf.CHECK_FUNCS('getpeereid'):
+- conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
+- if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
+- conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
+- if not conf.CHECK_FUNCS('setproctitle_init'):
+- conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
+-
+- if not conf.CHECK_FUNCS('closefrom'):
+- conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
++ conf.CHECK_FUNCS('closefrom')
+
+ conf.CHECK_CODE('''
+ struct ucred cred;
+@@ -698,9 +689,6 @@ def configure(conf):
+
+ # look for a method of finding the list of network interfaces
+ for method in ['HAVE_IFACE_GETIFADDRS', 'HAVE_IFACE_AIX', 'HAVE_IFACE_IFCONF', 'HAVE_IFACE_IFREQ']:
+- bsd_for_strlcpy = ''
+- if strlcpy_in_bsd:
+- bsd_for_strlcpy = ' bsd'
+ if conf.CHECK_CODE('''
+ #define %s 1
+ #define NO_CONFIG_H 1
+@@ -713,7 +701,7 @@ def configure(conf):
+ #include "test/getifaddrs.c"
+ ''' % method,
+ method,
+- lib='nsl socket' + bsd_for_strlcpy,
++ lib='nsl socket',
+ addmain=False,
+ execute=True):
+ break
+@@ -761,7 +749,6 @@ def build(bld):
+ break
+
+ extra_libs = ''
+- if bld.CONFIG_SET('HAVE_LIBBSD'): extra_libs += ' bsd'
+
+ bld.SAMBA_SUBSYSTEM('LIBREPLACE_HOSTCC',
+ REPLACE_HOSTCC_SOURCE,
include $(TOPDIR)/rules.mk
PKG_NAME:=libtirpc
-PKG_VERSION:=1.0.3
+PKG_VERSION:=1.1.4
PKG_RELEASE:=1
PKG_SOURCE_URL:=@SF/libtirpc
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=86c3a78fc1bddefa96111dd233124c703b22a78884203c55c3e06b3be6a0fd5e
+PKG_HASH:=2ca529f02292e10c158562295a1ffd95d2ce8af97820e3534fe1b0e3aec7561d
PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
PKG_LICENSE:=BSD-3-Clause
PKG_FIXUP:=autoreconf
+PKG_REMOVE_FILES:=autogen.sh aclocal.m4
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
define Package/libtirpc
SECTION:=libs
endef
CONFIGURE_ARGS += --disable-gssapi
-# Info from Buildroot Makefile
-# getrpcby{number,name} are only provided if 'GQ' is defined
-TARGET_CFLAGS += -DGQ
-#CONFIGURE_VARS += \
-# GSSGLUE_LIBS="-lkrb5 -lk5crypto -l:libcom_err.so.3 -lkeyutils -lresolv -gssapi_krb5" \
-# GSSGLUE_CFLAGS=-I$(STAGING_DIR)/usr/include/krb5/
+HOST_CONFIGURE_ARGS += --disable-gssapi
-#EXTRA_LDFLAGS := -lgssapi_krb5
+TARGET_CFLAGS += -DGQ
+HOST_CFLAGS += -DGQ
define Package/libtirpc/install
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtirpc.so* $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtirpc.so* $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/etc
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/netconfig $(1)/etc/
endef
define Build/InstallDev
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libtirpc.pc $(1)/usr/lib/pkgconfig/libtirpc.pc
endef
+$(eval $(call HostBuild))
$(eval $(call BuildPackage,libtirpc))
--- /dev/null
+Consider musl provided built-in defines
+
+Helps compile libtirpc with musl
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+--- ./tirpc/rpc/types.h.orig 2018-03-17 10:23:10.022055255 +0100
++++ ./tirpc/rpc/types.h 2018-03-17 10:23:30.877751656 +0100
+@@ -66,7 +66,7 @@
+ #define mem_free(ptr, bsize) free(ptr)
+
+
+-#if defined __APPLE_CC__ || defined __FreeBSD__
++#if defined __APPLE_CC__ || defined __FreeBSD__ || !defined(__GLIBC__)
+ # define __u_char_defined
+ # define __daddr_t_defined
+ #endif
+++ /dev/null
-From 15adb318818f5d0ac609ef2b87643dd760487cb6 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?J=C3=B6rg=20Krause?= <joerg.krause@embedded.rocks>
-Date: Mon, 20 Jul 2015 20:30:11 +0200
-Subject: [PATCH 1/1] Disable parts of TIRPC requiring NIS support
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-[yann.morin.1998@free.fr: update for 0.3.1]
-Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
-[joerg.krause@embedded.rocks: update for 0.3.2]
-Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
-[peda@axentia.se: update for 1.0.1]
-Signed-off-by: Peter Rosin <peda@axentia.se>
-[bernd.kuhls@t-online.de: update for 1.0.2]
-Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
----
- src/Makefile.am | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 6cc567a..9834f9a 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -24,7 +24,7 @@ libtirpc_la_SOURCES = auth_none.c auth_unix.c authunix_prot.c bindresvport.c cln
- rpcb_st_xdr.c svc.c svc_auth.c svc_dg.c svc_auth_unix.c svc_auth_none.c \
- svc_auth_des.c \
- svc_generic.c svc_raw.c svc_run.c svc_simple.c svc_vc.c getpeereid.c \
-- auth_time.c auth_des.c authdes_prot.c debug.c des_crypt.c des_impl.c
-+ auth_des.c authdes_prot.c debug.c des_crypt.c des_impl.c
-
- ## XDR
- libtirpc_la_SOURCES += xdr.c xdr_rec.c xdr_array.c xdr_float.c xdr_mem.c xdr_reference.c xdr_stdio.c xdr_sizeof.c
-@@ -41,8 +41,8 @@ if GSS
- libtirpc_la_CFLAGS = -DHAVE_RPCSEC_GSS $(GSSAPI_CFLAGS)
- endif
-
--libtirpc_la_SOURCES += key_call.c key_prot_xdr.c getpublickey.c
--libtirpc_la_SOURCES += netname.c netnamer.c rpcdname.c rtime.c
-+#libtirpc_la_SOURCES += key_call.c key_prot_xdr.c getpublickey.c
-+#libtirpc_la_SOURCES += netname.c netnamer.c rpcdname.c rtime.c
-
- CLEANFILES = cscope.* *~
- DISTCLEANFILES = Makefile.in
---
-2.4.6
-
+++ /dev/null
-From 7aa1fe6a0f9280571117c30c03c2cc521cd86ec3 Mon Sep 17 00:00:00 2001
-From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-Date: Sat, 23 Jun 2012 21:58:07 +0200
-Subject: [PATCH] uClibc without RPC support and musl does not install rpcent.h
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-[yann.morin.1998@free.fr: update for 0.3.1]
-Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
-[joerg.krause@embedded.rocks: musl fix]
-Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
-[bernd.kuhls@t-online.de: update for 1.0.2]
-Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
----
- tirpc/rpc/rpcent.h | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/tirpc/rpc/rpcent.h b/tirpc/rpc/rpcent.h
-index 147f909..4a58180 100644
---- a/tirpc/rpc/rpcent.h
-+++ b/tirpc/rpc/rpcent.h
-@@ -48,8 +48,9 @@
- extern "C" {
- #endif
-
--/* These are defined in /usr/include/rpc/netdb.h */
--#if !defined(__GLIBC__) || defined(__UCLIBC__)
-+/* These are defined in /usr/include/rpc/netdb.h, unless we are using
-+ the C library without RPC support. */
-+#if defined(__UCLIBC__) && !defined(__UCLIBC_HAS_RPC__) || !defined(__GLIBC__)
- struct rpcent {
- char *r_name; /* name of server for this rpc program */
- char **r_aliases; /* alias list */
---
-1.9.1
-
+++ /dev/null
-From 79975eb4104667be85abd06874c258438826b674 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?J=C3=B6rg=20Krause?= <joerg.krause@embedded.rocks>
-Date: Fri, 24 Jul 2015 14:45:52 +0200
-Subject: [PATCH] Disable DES authentification support
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-uClibc and musl does not provide DES authentication.
-
-Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
-[peda@axentia.se: update for 1.0.1]
-Signed-off-by: Peter Rosin <peda@axentia.se>
-[bernd.kuhls@t-online.de: update for 1.0.2]
-Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
----
- src/Makefile.am | 2 +-
- src/rpc_soc.c | 32 --------------------------------
- 2 files changed, 1 insertion(+), 33 deletions(-)
-
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 960a522..3a88e31 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -22,9 +22,8 @@ libtirpc_la_SOURCES = auth_none.c auth_unix.c authunix_prot.c bindresvport.c cln
- pmap_prot.c pmap_prot2.c pmap_rmt.c rpc_prot.c rpc_commondata.c \
- rpc_callmsg.c rpc_generic.c rpc_soc.c rpcb_clnt.c rpcb_prot.c \
- rpcb_st_xdr.c svc.c svc_auth.c svc_dg.c svc_auth_unix.c svc_auth_none.c \
-- svc_auth_des.c \
- svc_generic.c svc_raw.c svc_run.c svc_simple.c svc_vc.c getpeereid.c \
-- auth_des.c authdes_prot.c debug.c des_crypt.c des_impl.c
-+ debug.c
-
- ## XDR
- libtirpc_la_SOURCES += xdr.c xdr_rec.c xdr_array.c xdr_float.c xdr_mem.c xdr_reference.c xdr_stdio.c xdr_sizeof.c
-diff --git a/src/svc_auth.c b/src/svc_auth.c
---- a/src/svc_auth.c
-+++ b/src/svc_auth.c
-@@ -114,9 +114,6 @@ _gss_authenticate(rqst, msg, no_dispatch)
- case AUTH_SHORT:
- dummy = _svcauth_short(rqst, msg);
- return (dummy);
-- case AUTH_DES:
-- dummy = _svcauth_des(rqst, msg);
-- return (dummy);
- #ifdef HAVE_RPCSEC_GSS
- case RPCSEC_GSS:
- dummy = _svcauth_gss(rqst, msg, no_dispatch);
-diff --git a/src/rpc_soc.c b/src/rpc_soc.c
-index e146ed4..161a1ec 100644
---- a/src/rpc_soc.c
-+++ b/src/rpc_soc.c
-@@ -522,86 +521,6 @@ clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
- }
-
- /*
-- * Create the client des authentication object. Obsoleted by
-- * authdes_seccreate().
-- */
--AUTH *
--authdes_create(servername, window, syncaddr, ckey)
-- char *servername; /* network name of server */
-- u_int window; /* time to live */
-- struct sockaddr *syncaddr; /* optional hostaddr to sync with */
-- des_block *ckey; /* optional conversation key to use */
--{
-- AUTH *nauth;
-- char hostname[NI_MAXHOST];
--
-- if (syncaddr) {
-- /*
-- * Change addr to hostname, because that is the way
-- * new interface takes it.
-- */
-- switch (syncaddr->sa_family) {
-- case AF_INET:
-- if (getnameinfo(syncaddr, sizeof(struct sockaddr_in), hostname,
-- sizeof hostname, NULL, 0, 0) != 0)
-- goto fallback;
-- break;
-- case AF_INET6:
-- if (getnameinfo(syncaddr, sizeof(struct sockaddr_in6), hostname,
-- sizeof hostname, NULL, 0, 0) != 0)
-- goto fallback;
-- break;
-- default:
-- goto fallback;
-- }
-- nauth = authdes_seccreate(servername, window, hostname, ckey);
-- return (nauth);
-- }
--fallback:
-- return authdes_seccreate(servername, window, NULL, ckey);
--}
--
--/*
-- * Create the client des authentication object. Obsoleted by
-- * authdes_pk_seccreate().
-- */
--extern AUTH *authdes_pk_seccreate(const char *, netobj *, u_int, const char *,
-- const des_block *, nis_server *);
--
--AUTH *
--authdes_pk_create(servername, pkey, window, syncaddr, ckey)
-- char *servername; /* network name of server */
-- netobj *pkey; /* public key */
-- u_int window; /* time to live */
-- struct sockaddr *syncaddr; /* optional hostaddr to sync with */
-- des_block *ckey; /* optional conversation key to use */
--{
-- AUTH *nauth;
-- char hostname[NI_MAXHOST];
--
-- if (syncaddr) {
-- /*
-- * Change addr to hostname, because that is the way
-- * new interface takes it.
-- */
-- switch (syncaddr->sa_family) {
-- case AF_INET:
-- if (getnameinfo(syncaddr, sizeof(struct sockaddr_in), hostname,
-- sizeof hostname, NULL, 0, 0) != 0)
-- goto fallback;
-- break;
-- default:
-- goto fallback;
-- }
-- nauth = authdes_pk_seccreate(servername, pkey, window, hostname, ckey, NULL);
-- return (nauth);
-- }
--fallback:
-- return authdes_pk_seccreate(servername, pkey, window, NULL, ckey, NULL);
--}
--
--
--/*
- * Create a client handle for a unix connection. Obsoleted by clnt_vc_create()
- */
- CLIENT *
---
-2.4.6
-
+++ /dev/null
---- a/tirpc/rpc/types.h 2018-03-27
-+++ b/tirpc/rpc/types.h 2018-03-27
-@@ -66,7 +66,7 @@ typedef int32_t rpc_inline_t;
- #define mem_free(ptr, bsize) free(ptr)
-
-
--#if defined __APPLE_CC__ || defined __FreeBSD__
-+#if defined __APPLE_CC__ || defined __FreeBSD__ || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
- # define __u_char_defined
- # define __daddr_t_defined
- #endif
PKG_NAME:=libupm
PKG_VERSION:=0.4.0
-PKG_RELEASE=$(PKG_SOURCE_VERSION)
+PKG_RELEASE=$(PKG_SOURCE_VERSION)-1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/intel-iot-devkit/upm.git
CMAKE_OPTIONS=-DBUILDARCH=$(CONFIG_ARCH) \
-DNODE_EXECUTABLE=$(STAGING_DIR_HOSTPKG)/bin/node \
- -DSWIG_DIR=$(STAGING_DIR_HOSTPKG)/bin
+ -DPython_ADDITIONAL_VERSIONS=2.7
define Package/libupm/Default
SECTION:=libs
-#
-# Copyright (C) 2006-2014 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
include $(TOPDIR)/rules.mk
PKG_NAME:=libupnp
-PKG_VERSION:=1.6.19
-PKG_RELEASE:=2
+PKG_VERSION:=1.6.25
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/pupnp
-PKG_HASH:=b3142b39601243b50532eec90f4a27dba85eb86f58d4b849ac94edeb29d9b22a
+PKG_HASH:=c5a300b86775435c076d58a79cc0d5a977d76027d2a7d721590729b7f369fa43
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/rules.mk
PKG_NAME:=libuv
-PKG_VERSION:=1.20.3
+PKG_VERSION:=1.23.2
PKG_RELEASE:=1
PKG_LICENSE_FILES:=LICENSE
PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://dist.libuv.org/dist/v$(PKG_VERSION)/
-PKG_HASH:=3bb7aad916c7a5fd0053dcb6adee49905360a2a160f4a59bc62dbe4370328579
+PKG_HASH:=8ab472ed816bb70c147ddbdfa7b9becfa10921df8a03faf2c87a54eac642c355
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION)
PKG_BUILD_PARALLEL:=1
PKG_NAME:=libuvc
-PKG_VERSION=0.0.5-20140812-$(PKG_SOURCE_VERSION)
+PKG_VERSION:=0.0.6
PKG_RELEASE:=1
PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/ktossell/libuvc.git
-PKG_SOURCE_VERSION:=2c6403405872aa865999b95ba15944295adf6c38
-
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MIRROR_HASH:=93f33620e00276989211d9c129a6d8b5e0f45df8d23235ff0c53c823c52a5ef5
+PKG_SOURCE_URL:=https://codeload.github.com/ktossell/libuvc/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=42175a53c1c704365fdc782b44233925e40c9344fbb7f942181c1090f06e2873
+
PKG_LICENSE:=BSD
+PKG_LICENSE_FILES:=LICENSE.txt
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
CMAKE_INSTALL:=1
CATEGORY:=Libraries
TITLE:=libuvc
DEPENDS:=+libusb-1.0 +libjpeg
- URL:=https://int80k.com/libuvc
+ URL:=https://int80k.com/libuvc
endef
define Package/libuvc/description
- This package contains libuvc is a cross-platform library for USB video devices,
+ This package contains libuvc is a cross-platform library for USB video devices,
built atop libusb.
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=libuwsc
-PKG_VERSION:=2.0.4
+PKG_VERSION:=3.1.0
PKG_RELEASE:=1
-PKG_SOURCE_PROTO:=git
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
-PKG_SOURCE_URL=https://github.com/zhaojh329/libuwsc.git
-PKG_MIRROR_HASH:=91c5964088d6df591e10c40deffef0be47f5c06896fcf27a7afe83c8e49b1a74
+PKG_SOURCE_URL=https://codeload.github.com/zhaojh329/libuwsc/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=13355ee4194716843c6cc773e9e616bb97cf64a4dd201dd1a5e3e9f8bd0de1dc
CMAKE_INSTALL:=1
PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_SOURCE_SUBDIR)
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
-define Package/libuwsc/default
+define Package/libuwsc/Default
+ TITLE:=A lightweight WebSocket client library based on libev
SECTION:=libs
CATEGORY:=Libraries
SUBMENU:=Networking
- TITLE:=Lightweight WebSocket client library
- DEPENDS:=+libubox
+ URL:=https://github.com/zhaojh329/libuwsc
+ DEPENDS:=+libev $(2)
+ VARIANT:=$(1)
+ PROVIDES:=libuwsc
endef
-define Package/libuwsc-nossl
- $(Package/libuwsc/default)
- TITLE += (NO SSL)
- VARIANT:=nossl
-endef
-
-define Package/libuwsc-openssl
- $(Package/libuwsc/default)
- TITLE += (openssl)
- DEPENDS += +libustream-openssl
- VARIANT:=openssl
-endef
-
-define Package/libuwsc-wolfssl
- $(Package/libuwsc/default)
- TITLE += (wolfssl)
- DEPENDS += +libustream-wolfssl
- VARIANT:=wolfssl
-endef
-
-define Package/libuwsc-mbedtls
- $(Package/libuwsc/default)
- TITLE += (mbedtls)
- DEPENDS += +libustream-mbedtls
- VARIANT:=mbedtls
-endef
-
-ifeq ($(BUILD_VARIANT),nossl)
- CMAKE_OPTIONS += -DUWSC_SSL_SUPPORT=off
+Package/libuwsc-openssl=$(call Package/libuwsc/Default,openssl,+PACKAGE_libuwsc-openssl:libopenssl)
+Package/libuwsc-wolfssl=$(call Package/libuwsc/Default,wolfssl,+PACKAGE_libuwsc-wolfssl:libwolfssl)
+Package/libuwsc-mbedtls=$(call Package/libuwsc/Default,mbedtls,+PACKAGE_libuwsc-mbedtls:libmbedtls)
+Package/libuwsc-nossl=$(call Package/libuwsc/Default,nossl)
+
+ifeq ($(BUILD_VARIANT),openssl)
+ CMAKE_OPTIONS += -DUWSC_USE_OPENSSL=ON
+else ifeq ($(BUILD_VARIANT),wolfssl)
+ CMAKE_OPTIONS += -DUWSC_USE_WOLFSSL=ON
+else ifeq ($(BUILD_VARIANT),mbedtls)
+ CMAKE_OPTIONS += -DUWSC_USE_MBEDTLS=ON
+else
+ CMAKE_OPTIONS += -DUWSC_SSL_SUPPORT=OFF
endif
-define Package/libuwsc/default/install
+define Package/libuwsc-$(BUILD_VARIANT)/install
$(INSTALL_DIR) $(1)/usr/lib/
- $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libuwsc.so* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libuwsc.so* $(1)/usr/lib/
endef
-Package/libuwsc-nossl/install = $(Package/libuwsc/default/install)
-Package/libuwsc-openssl/install = $(Package/libuwsc/default/install)
-Package/libuwsc-wolfssl/install = $(Package/libuwsc/default/install)
-Package/libuwsc-mbedtls/install = $(Package/libuwsc/default/install)
-
-$(eval $(call BuildPackage,libuwsc-nossl))
-$(eval $(call BuildPackage,libuwsc-mbedtls))
-$(eval $(call BuildPackage,libuwsc-wolfssl))
$(eval $(call BuildPackage,libuwsc-openssl))
+$(eval $(call BuildPackage,libuwsc-wolfssl))
+$(eval $(call BuildPackage,libuwsc-mbedtls))
+$(eval $(call BuildPackage,libuwsc-nossl))
#
-# Copyright (C) 2009-2015 OpenWrt.org
-# Copyright (C) 2009 David Cooper <dave@kupesoft.com>
-#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=v4l-utils
-PKG_VERSION:=1.10.0
+PKG_VERSION:=1.14.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=http://www.linuxtv.org/downloads/v4l-utils
-PKG_HASH:=78ead27ee58a701d7c6342303cf4520bdd4a2b88a7813bc99a0b389307e4336b
+PKG_SOURCE_URL:=https://www.linuxtv.org/downloads/v4l-utils
+PKG_HASH:=e6b962c4b1253cf852c31da13fd6b5bb7cbe5aa9e182881aec55123bae680692
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libv4l{1,2,convert}.{a,so*} $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libv4l{1,2,convert,2rds}.{a,so*} $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libv4l{1,2,convert}.pc $(1)/usr/lib/pkgconfig/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libv4l{1,2,convert,2rds}.pc $(1)/usr/lib/pkgconfig/
endef
define Package/libv4l/install
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libv4l{1,2,convert}.so.* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libv4l{1,2,convert,2rds}.so.* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/libv4l
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libv4l/v4l{1compat,2convert}.so $(1)/usr/lib/libv4l/
endef
$(CP) $(PKG_INSTALL_DIR)/etc/rc_maps.cfg $(1)/etc/
$(CP) $(PKG_INSTALL_DIR)/etc/rc_keymaps $(1)/etc/
$(INSTALL_DIR) $(1)/usr/bin
- $(CP) $(PKG_INSTALL_DIR)/usr/bin/{cx18,ivtv}-ctl $(1)/usr/bin/
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/{rds,media,cx18,ivtv}-ctl $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/decode_tm6000 $(1)/usr/bin/
- $(CP) $(PKG_INSTALL_DIR)/usr/bin/ir-keytable $(1)/usr/bin/
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/ir-{ctl,keytable} $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/v4l2-{compliance,ctl,sysfs-path} $(1)/usr/bin/
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/cec-{compliance,ctl,follower} $(1)/usr/bin/
endef
$(eval $(call BuildPackage,libv4l))
+--- a/utils/v4l2-ctl/v4l2-ctl.cpp
++++ b/utils/v4l2-ctl/v4l2-ctl.cpp
+@@ -46,6 +46,7 @@
+ #include <vector>
+ #include <map>
+ #include <algorithm>
++#include <string_iostream>
+ #include <fstream>
+
+ char options[OptLast];
--- a/utils/rds-ctl/rds-ctl.cpp
+++ b/utils/rds-ctl/rds-ctl.cpp
@@ -29,6 +29,7 @@
#include <libv4l2.h>
--- a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
-@@ -14,6 +14,7 @@
+@@ -17,6 +17,7 @@
#include <sys/mman.h>
#include <dirent.h>
#include <math.h>
+#include <time.h>
#include "v4l2-ctl.h"
+ #include "v4l-stream.h"
+--- a/utils/cec-ctl/cec-ctl.cpp
++++ b/utils/cec-ctl/cec-ctl.cpp
+@@ -30,6 +30,7 @@
+ #include <errno.h>
+ #include <sys/ioctl.h>
+ #include <stdarg.h>
++#include <time.h>
+ #include <cerrno>
+ #include <string>
+ #include <vector>
+--- a/utils/cec-compliance/cec-compliance.h
++++ b/utils/cec-compliance/cec-compliance.h
+@@ -21,6 +21,7 @@
+ #define _CEC_COMPLIANCE_H_
+ #include <stdarg.h>
++#include <time.h>
+ #include <cerrno>
+ #include <string>
+ #include <linux/cec-funcs.h>
+--- a/utils/cec-follower/cec-follower.h
++++ b/utils/cec-follower/cec-follower.h
+@@ -37,6 +37,7 @@
+ #define _CEC_FOLLOWER_H_
+
+ #include <stdarg.h>
++#include <time.h>
+ #include <cerrno>
+ #include <string>
+ #include <linux/cec-funcs.h>
+++ /dev/null
---- a/utils/v4l2-ctl/v4l2-ctl-common.cpp
-+++ b/utils/v4l2-ctl/v4l2-ctl-common.cpp
-@@ -671,15 +671,18 @@ static bool parse_subset(char *optarg)
-
- static bool parse_next_subopt(char **subs, char **value)
- {
-- static char *const subopts[] = {
-- NULL
-- };
-- int opt = getsubopt(subs, subopts, value);
-+ char *stmp = *subs;
-+ *value = NULL;
-
-- if (opt < 0 || *value)
-+ if (*subs) {
-+ *subs = strchr(stmp, ',');
-+ if (*subs)
-+ *(*subs)++ = 0;
-+ else *subs = stmp + strlen(stmp);
-+
-+ *value = stmp;
- return false;
-- fprintf(stderr, "No value given to suboption <%s>\n",
-- subopts[opt]);
-+ }
- return true;
- }
-
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=$(PKG_REV)
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_CPE_ID:=cpe:/a:john_koleszar:libvpx
PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
include $(TOPDIR)/rules.mk
PKG_NAME:=libwebsockets
-PKG_VERSION:=3.0.0
-PKG_RELEASE:=1
+PKG_VERSION:=3.0.1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_URL:=https://codeload.github.com/warmcat/libwebsockets/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=a6b611c212c52f161f70556339fdaa199b7e9b6a167c4638e086d19db75d6290
+PKG_HASH:=cb0cdd8d0954fcfd97a689077568f286cdbb44111883e0a85d29860449c47cbf
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
--- /dev/null
+--- a/lib/tls/private.h
++++ b/lib/tls/private.h
+@@ -64,6 +64,8 @@
+ #include <openssl/err.h>
+ #include <openssl/md5.h>
+ #include <openssl/sha.h>
++ #include <openssl/rsa.h>
++ #include <openssl/bn.h>
+ #ifdef LWS_HAVE_OPENSSL_ECDH_H
+ #include <openssl/ecdh.h>
+ #endif
index b260969..ece281d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -1050,9 +1050,9 @@ if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR (CMAKE_C_COMPILER_ID
+@@ -1055,9 +1055,9 @@ if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR (CMAKE_C_COMPILER_ID
endif()
if (UNIX AND NOT LWS_WITH_ESP32)
PKG_NAME:=libxml2
PKG_VERSION:=2.9.8
-PKG_RELEASE:=1
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://xmlsoft.org/sources/
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:xmlsoft:libxml2
PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
--- /dev/null
+From a436374994c47b12d5de1b8b1d191a098fa23594 Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <wellnhofer@aevum.de>
+Date: Mon, 30 Jul 2018 12:54:38 +0200
+Subject: [PATCH 12/13] Fix nullptr deref with XPath logic ops
+
+If the XPath stack is corrupted, for example by a misbehaving extension
+function, the "and" and "or" XPath operators could dereference NULL
+pointers. Check that the XPath stack isn't empty and optimize the
+logic operators slightly.
+
+Closes: https://gitlab.gnome.org/GNOME/libxml2/issues/5
+
+Also see
+https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=901817
+https://bugzilla.redhat.com/show_bug.cgi?id=1595985
+
+This is CVE-2018-14404.
+
+Thanks to Guy Inbar for the report.
+---
+ xpath.c | 10 ++++------
+ 1 file changed, 4 insertions(+), 6 deletions(-)
+
+diff --git a/xpath.c b/xpath.c
+index 3fae0bf4..5e3bb9ff 100644
+--- a/xpath.c
++++ b/xpath.c
+@@ -13297,9 +13297,8 @@ xmlXPathCompOpEval(xmlXPathParserContextPtr ctxt, xmlXPathStepOpPtr op)
+ return(0);
+ }
+ xmlXPathBooleanFunction(ctxt, 1);
+- arg1 = valuePop(ctxt);
+- arg1->boolval &= arg2->boolval;
+- valuePush(ctxt, arg1);
++ if (ctxt->value != NULL)
++ ctxt->value->boolval &= arg2->boolval;
+ xmlXPathReleaseObject(ctxt->context, arg2);
+ return (total);
+ case XPATH_OP_OR:
+@@ -13323,9 +13322,8 @@ xmlXPathCompOpEval(xmlXPathParserContextPtr ctxt, xmlXPathStepOpPtr op)
+ return(0);
+ }
+ xmlXPathBooleanFunction(ctxt, 1);
+- arg1 = valuePop(ctxt);
+- arg1->boolval |= arg2->boolval;
+- valuePush(ctxt, arg1);
++ if (ctxt->value != NULL)
++ ctxt->value->boolval |= arg2->boolval;
+ xmlXPathReleaseObject(ctxt->context, arg2);
+ return (total);
+ case XPATH_OP_EQUAL:
+--
+2.18.0
+
--- /dev/null
+From 2240fbf5912054af025fb6e01e26375100275e74 Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <wellnhofer@aevum.de>
+Date: Mon, 30 Jul 2018 13:14:11 +0200
+Subject: [PATCH 13/13] Fix infinite loop in LZMA decompression
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Check the liblzma error code more thoroughly to avoid infinite loops.
+
+Closes: https://gitlab.gnome.org/GNOME/libxml2/issues/13
+Closes: https://bugzilla.gnome.org/show_bug.cgi?id=794914
+
+This is CVE-2018-9251 and CVE-2018-14567.
+
+Thanks to Dongliang Mu and Simon Wörner for the reports.
+---
+ xzlib.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/xzlib.c b/xzlib.c
+index a839169e..0ba88cfa 100644
+--- a/xzlib.c
++++ b/xzlib.c
+@@ -562,6 +562,10 @@ xz_decomp(xz_statep state)
+ "internal error: inflate stream corrupt");
+ return -1;
+ }
++ /*
++ * FIXME: Remapping a couple of error codes and falling through
++ * to the LZMA error handling looks fragile.
++ */
+ if (ret == Z_MEM_ERROR)
+ ret = LZMA_MEM_ERROR;
+ if (ret == Z_DATA_ERROR)
+@@ -587,6 +591,11 @@ xz_decomp(xz_statep state)
+ xz_error(state, LZMA_PROG_ERROR, "compression error");
+ return -1;
+ }
++ if ((state->how != GZIP) &&
++ (ret != LZMA_OK) && (ret != LZMA_STREAM_END)) {
++ xz_error(state, ret, "lzma error");
++ return -1;
++ }
+ } while (strm->avail_out && ret != LZMA_STREAM_END);
+
+ /* update available output and crc check value */
+--
+2.18.0
+
include $(TOPDIR)/rules.mk
PKG_NAME:=libyang
-PKG_VERSION:=0.15.130
-PKG_RELEASE=$(PKG_SOURCE_VERSION)
+PKG_VERSION:=0.16-r2
PKG_LICENSE:=GPL-2.0+
PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=d6baaf90e24af3b07649e9dda6fc0d9b272b2ebc
-PKG_MIRROR_HASH:=eace667ae787ac27b7c717a52f672d05e55608c47d9e54d39d60f8ab5e47f0c9
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
-PKG_SOURCE_URL:=https://github.com/CESNET/libyang.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/CESNET/libyang/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=cf354481788f224c58ebe4785a08f992ef00af503529c8d516fdc4d0592996e0
-PKG_BUILD_ROOT:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
-PKG_BUILD_DIR:=$(PKG_BUILD_ROOT)
+CMAKE_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
define Package/loudmouth
SECTION:=libs
CATEGORY:=Libraries
- DEPENDS:=+glib2 +libopenssl
+ DEPENDS:=+glib2 +libopenssl +PACKAGE_krb5-libs:krb5-libs
TITLE:=loudmouth
URL:=https://github.com/mcabber/loudmouth
endef
--- /dev/null
+diff -u --recursive loudmouth-1.5.3-vanilla/loudmouth/lm-sasl.c loudmouth-1.5.3/loudmouth/lm-sasl.c
+--- loudmouth-1.5.3-vanilla/loudmouth/lm-sasl.c 2018-07-27 22:42:03.250616281 -0400
++++ loudmouth-1.5.3/loudmouth/lm-sasl.c 2018-07-27 22:42:26.756659723 -0400
+@@ -529,7 +529,7 @@
+ }
+
+ nonce = g_hash_table_lookup (challenge, "nonce");
+- if (nonce == NULL || nonce == '\0') {
++ if (nonce == NULL || *nonce == '\0') {
+ g_log (LM_LOG_DOMAIN, LM_LOG_LEVEL_SASL,
+ "%s: server didn't provide a nonce in the challenge",
+ G_STRFUNC);
-#
-# Copyright (C) 2006-2017 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
include $(TOPDIR)/rules.mk
PKG_NAME:=mxml
-PKG_VERSION:=2.11
+PKG_VERSION:=2.12
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/michaelrsweet/mxml.git
-PKG_SOURCE_VERSION:=7b0bb60e51d39b2aaa8e8ca5bf9f3c38e63d643b
-PKG_MIRROR_HASH:=e6f38a91f420c0bc64f892163049c37c5cc7744bffbcb05ad1fddec7b34ea438
+PKG_SOURCE_VERSION:=3aaa12c7d709d05286255d191998f29105dd407a
+PKG_MIRROR_HASH:=fccb77d4c9f6139db9937483596068f40112424ef261025227cda258a5561002
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_FIXUP:=autoreconf
CATEGORY:=Libraries
TITLE:=Mini-XML
URL:=http://www.minixml.org/
+ DEPENDS:=+zlib
endef
define Package/mxml/description
PKG_NAME:=openldap
PKG_VERSION:=2.4.46
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
PKG_SOURCE_URL:=https://gpl.savoirfairelinux.net/pub/mirrors/openldap/openldap-release/ \
--- /dev/null
+From d7a778004b0e0c7453075f1c7d429537162df436 Mon Sep 17 00:00:00 2001
+From: Howard Chu <hyc@openldap.org>
+Date: Fri, 21 Sep 2018 18:41:20 +0100
+Subject: [PATCH] ITS#8809 add missing includes
+
+---
+ libraries/libldap/tls_o.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/libraries/libldap/tls_o.c b/libraries/libldap/tls_o.c
+index 010f311d7..99626ec15 100644
+--- a/libraries/libldap/tls_o.c
++++ b/libraries/libldap/tls_o.c
+@@ -43,6 +43,9 @@
+ #include <openssl/err.h>
+ #include <openssl/rand.h>
+ #include <openssl/safestack.h>
++#include <openssl/bn.h>
++#include <openssl/rsa.h>
++#include <openssl/dh.h>
+ #elif defined( HAVE_SSL_H )
+ #include <ssl.h>
+ #endif
+--
+2.19.1
+
include $(TOPDIR)/rules.mk
PKG_NAME:=opus
-PKG_VERSION:=1.2.1
+PKG_VERSION:=1.3
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://archive.mozilla.org/pub/opus/
-PKG_HASH:=cfafd339ccd9c5ef8d6ab15d7e1a412c054bf4cb4ecbbbcc78c12ef2def70732
+PKG_SOURCE_URL:=https://archive.mozilla.org/pub/opus
+PKG_HASH:=4f3d69aefdf2dbaf9825408e452a8a414ffc60494c70633560700398820dc550
+PKG_MAINTAINER:=Ted Hess <thess@kitchensync.net>, Ian Leonard <antonlacon@gmail.com>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Ted Hess <thess@kitchensync.net>, Ian Leonard <antonlacon@gmail.com>
+PKG_CPE_ID:=cpe:/a:opus-codec:opus
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
SECTION:=libs
CATEGORY:=Libraries
TITLE:=OPUS Audio Codec
- URL:=http://opus-codec.org/
+ URL:=https://opus-codec.org
endef
define Package/libopus/description
endif
CPU_ASM_BLACKLIST:=xscale arm926ej-s
-
ifneq ($(findstring $(call qstrip,$(CONFIG_CPU_TYPE)),$(CPU_ASM_BLACKLIST)),)
CONFIGURE_ARGS+= --disable-asm
endif
include $(TOPDIR)/rules.mk
PKG_NAME:=p11-kit
-PKG_VERSION:=0.23.12
+PKG_VERSION:=0.23.14
PKG_RELEASE:=1
PKG_MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=58bae22f19db1de1a1103e7ca4149eed6e303e727878c2cd5ea9e6fe445fd403
+PKG_HASH:=1cb9fa6d237539f25f62f4c3d4ec71a1c8e0772957ec45ec5af92134129e0d70
PKG_SOURCE_URL:=https://github.com/p11-glue/$(PKG_NAME)/releases/download/$(PKG_VERSION)
-PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
+++ /dev/null
-From dec5f888a457e36d81065ebc69f7d8d966be527d Mon Sep 17 00:00:00 2001
-From: Daiki Ueno <dueno@redhat.com>
-Date: Thu, 31 May 2018 11:02:51 +0200
-Subject: [PATCH] build: Ease issetugid() check when cross-compiling
-
-When cross-compiling, the configure check for issetugid() aborts,
-because of the pessimistic default of AC_RUN_IFELSE. This patch
-provides the non-pessimistic default to AC_RUN_IFELSE and wrap the
-macro invocation with AC_CACHE_CHECK so that the user can override the
-check by setting ac_cv_issetugid_openbsd=yes, as suggested in:
-https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Runtime.html#Runtime
----
- configure.ac | 16 +++++++++-------
- 1 file changed, 9 insertions(+), 7 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index e99a3c7..bd6ece0 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -115,15 +115,17 @@ if test "$os_unix" = "yes"; then
-
- # Check if issetugid() is available and has compatible behavior with OpenBSD
- AC_CHECK_FUNCS([issetugid], [
-- AC_MSG_CHECKING([whether issetugid() can detect setuid/setgid])
-- issetugid_openbsd=no
-- AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]],
-- [[return issetugid ();]])],
-- [chmod 02777 ./conftest$EXEEXT; ./conftest$EXEEXT || issetugid_openbsd=yes])
-- if test "$issetugid_openbsd" = yes; then
-+ AC_CACHE_CHECK([whether issetugid() can detect setuid/setgid],
-+ [ac_cv_issetugid_openbsd],
-+ [ac_cv_issetugid_openbsd=no
-+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]],
-+ [[return issetugid ();]])],
-+ [chmod 02777 ./conftest$EXEEXT; ./conftest$EXEEXT || ac_cv_issetugid_openbsd=yes],
-+ [ac_cv_issetugid_openbsd=no],
-+ [ac_cv_issetugid_openbsd="guessing no"])])
-+ if test "$ac_cv_issetugid_openbsd" = yes; then
- AC_DEFINE([HAVE_ISSETUGID_OPENBSD], [1], [Whether issetugid() has compatible behavior with OpenBSD])
- fi
-- AC_MSG_RESULT([$issetugid_openbsd])
- ])
-
- # Required functions
---
-2.17.1
-
include $(TOPDIR)/rules.mk
PKG_NAME:=pcre2
-PKG_VERSION:=10.31
+PKG_VERSION:=10.32
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=@SF/$(PKG_NAME) \
- ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre
-PKG_HASH:=e07d538704aa65e477b6a392b32ff9fc5edf75ab9a40ddfc876186c4ff4d68ac
-PKG_MAINTAINER:=Shane Peelar <lookatyouhacker@gmail.com>
+PKG_SOURCE_URL:=@SF/pcre/$(PKG_NAME)/$(PKG_VERSION)
+PKG_HASH:=f29e89cc5de813f45786580101aaee3984a65818631d4ddbda7b32f699b87c2e
+PKG_MAINTAINER:=Shane Peelar <lookatyouhacker@gmail.com>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENCE
PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
define Package/libpcre2/default
SECTION:=libs
CATEGORY:=Libraries
- URL:=http://www.pcre.org/
+ URL:=https://www.pcre.org/
endef
define Package/libpcre2
include $(TOPDIR)/rules.mk
PKG_NAME:=postgresql
-PKG_VERSION:=9.6.8
+PKG_VERSION:=9.6.10
PKG_RELEASE:=1
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_LICENSE:=PostgreSQL
http://ftp.postgresql.org/pub/source/v$(PKG_VERSION) \
ftp://ftp.postgresql.org/pub/source/v$(PKG_VERSION)
-PKG_HASH:=eafdb3b912e9ec34bdd28b651d00226a6253ba65036cb9a41cad2d9e82e3eb70
+PKG_HASH:=8615acc56646401f0ede97a767dfd27ce07a8ae9c952afdb57163b7234fe8426
PKG_USE_MIPS16:=0
PKG_FIXUP:=autoreconf
include $(TOPDIR)/rules.mk
PKG_NAME:=libprotobuf-c
-PKG_VERSION:=v1.3.0
+PKG_VERSION:=1.3.1
PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_MIRROR_HASH:=596b8cfa47d66cf4278229b780125e199bc0df08defe849654b1ffb5e52b0c03
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_URL:=git://github.com/protobuf-c/protobuf-c.git
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=$(PKG_VERSION)
+PKG_SOURCE:=protobuf-c-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/protobuf-c/protobuf-c/releases/download/v$(PKG_VERSION)
+PKG_HASH:=51472d3a191d6d7b425e32b612e477c06f73fe23e07f6a6a839b11808e9d2267
+PKG_BUILD_DIR:=$(BUILD_DIR)/protobuf-c-$(PKG_VERSION)
+HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/protobuf-c-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
+PKG_LICENSE:=BSD-2c
PKG_BUILD_DEPENDS:=protobuf-c/host
HOST_BUILD_DEPENDS:=protobuf/host
PKG_INSTALL:=1
-PKG_FIXUP:=autoreconf
-
-PKG_LICENSE:=BSD-2c
-
-PKG_MAINTAINER:=Jacob Siverskog <jacob@teenageengineering.com>
+PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk
TITLE:=Protocol Buffers library
SECTION:=libs
CATEGORY:=Libraries
- URL:=http://code.google.com/p/protobuf-c/
+ URL:=https://github.com/protobuf-c/protobuf-c
endef
define Package/libprotobuf-c/description
include $(TOPDIR)/rules.mk
PKG_NAME:=qrencode
-PKG_VERSION:=4.0.0
+PKG_VERSION:=4.0.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=http://fukuchi.org/works/qrencode/
-PKG_HASH:=c90035e16921117d4086a7fdee65aab85be32beb4a376f6b664b8a425d327d0b
+PKG_SOURCE_URL:=https://fukuchi.org/works/qrencode
+PKG_HASH:=c9cb278d3b28dcc36b8d09e8cad51c0eca754eb004cb0247d4703cb4472b58b4
+
PKG_MAINTAINER:=Jonathan Bennett <JBennett@incomsystems.biz>
PKG_LICENSE:=LGPL-2.1+
+
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_FIXUP:=autoreconf
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Library for encoding data in a QR Code symbol
- URL:=http://fukuchi.org/works/qrencode/
+ URL:=https://fukuchi.org/works/qrencode/
endef
define Package/libqrencode/description
include $(TOPDIR)/rules.mk
PKG_NAME:=sbc
-PKG_VERSION:=1.3
-PKG_RELEASE:=2
+PKG_VERSION:=1.4
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/linux/bluetooth/
-PKG_HASH:=e61022cf576f14190241e7071753fdacdce5d1dea89ffd704110fc50be689309
+PKG_HASH:=518bf46e6bb3dc808a95e1eabad26fdebe8a099c1e781c27ed7fca6c2f4a54c9
PKG_LICENSE:=LGPL-2.1+
PKG_LICENSE_FILES:=COPYING.LIB
-PKG_MAINTAINER:=Dirk Neukirchen <dirkneukirchen@web.de>
+PKG_MAINTAINER:=
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
include $(TOPDIR)/rules.mk
PKG_NAME:=sqlite
-PKG_VERSION:=3230100
+PKG_VERSION:=3240000
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-autoconf-$(PKG_VERSION).tar.gz
-PKG_HASH:=92842b283e5e744eff5da29ed3c69391de7368fccc4d0ee6bf62490ce555ef25
+PKG_HASH:=d9d14e88c6fb6d68de9ca0d1f9797477d82fc3aed613558f87ffbdbbc5ceb74a
PKG_SOURCE_URL:=http://www.sqlite.org/2018/
PKG_LICENSE:=PUBLICDOMAIN
PKG_NAME:=tdb
PKG_VERSION:=1.3.16
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_LICENSE:=GPL-2.0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
--- /dev/null
+diff --git a/lib/replace/wscript b/lib/replace/wscript
+index fd00a42..337d559 100644
+--- a/lib/replace/wscript
++++ b/lib/replace/wscript
+@@ -340,22 +340,13 @@ def configure(conf):
+
+ conf.CHECK_FUNCS('prctl dirname basename')
+
+- strlcpy_in_bsd = False
+-
+- # libbsd on some platforms provides strlcpy and strlcat
+- if not conf.CHECK_FUNCS('strlcpy strlcat'):
+- if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
+- checklibc=True):
+- strlcpy_in_bsd = True
+- if not conf.CHECK_FUNCS('getpeereid'):
+- conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
+- if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
+- conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
+- if not conf.CHECK_FUNCS('setproctitle_init'):
+- conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
+-
+- if not conf.CHECK_FUNCS('closefrom'):
+- conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
++ # Not checking for libbsd
++ conf.CHECK_FUNCS('strlcpy strlcat')
++ conf.CHECK_FUNCS('getpeereid')
++ conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h')
++ conf.CHECK_FUNCS('setproctitle_init')
++
++ conf.CHECK_FUNCS('closefrom')
+
+ conf.CHECK_CODE('''
+ struct ucred cred;
+@@ -698,9 +689,6 @@ def configure(conf):
+
+ # look for a method of finding the list of network interfaces
+ for method in ['HAVE_IFACE_GETIFADDRS', 'HAVE_IFACE_AIX', 'HAVE_IFACE_IFCONF', 'HAVE_IFACE_IFREQ']:
+- bsd_for_strlcpy = ''
+- if strlcpy_in_bsd:
+- bsd_for_strlcpy = ' bsd'
+ if conf.CHECK_CODE('''
+ #define %s 1
+ #define NO_CONFIG_H 1
+@@ -713,7 +701,7 @@ def configure(conf):
+ #include "test/getifaddrs.c"
+ ''' % method,
+ method,
+- lib='nsl socket' + bsd_for_strlcpy,
++ lib='nsl socket',
+ addmain=False,
+ execute=True):
+ break
+@@ -761,7 +749,6 @@ def build(bld):
+ break
+
+ extra_libs = ''
+- if bld.CONFIG_SET('HAVE_LIBBSD'): extra_libs += ' bsd'
+
+ bld.SAMBA_SUBSYSTEM('LIBREPLACE_HOSTCC',
+ REPLACE_HOSTCC_SOURCE,
PKG_NAME:=tiff
PKG_VERSION:=4.0.9
-PKG_RELEASE:=3
+PKG_RELEASE:=5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://download.osgeo.org/libtiff
PKG_LICENSE:=BSD
PKG_LICENSE_FILES:=COPYRIGHT
+PKG_CPE_ID:=cpe:/a:libtiff:libtiff
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_CONFIG_DEPENDS:=CONFIG_PACKAGE_libtiffxx
+++ /dev/null
-From c6f41df7b581402dfba3c19a1e3df4454c551a01 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Sun, 31 Dec 2017 15:09:41 +0100
-Subject: [PATCH] libtiff/tif_print.c: TIFFPrintDirectory(): fix null pointer dereference on corrupted file. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2770
-
----
- libtiff/tif_print.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
---- a/libtiff/tif_print.c
-+++ b/libtiff/tif_print.c
-@@ -667,13 +667,13 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd,
- #if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__))
- fprintf(fd, " %3lu: [%8I64u, %8I64u]\n",
- (unsigned long) s,
-- (unsigned __int64) td->td_stripoffset[s],
-- (unsigned __int64) td->td_stripbytecount[s]);
-+ td->td_stripoffset ? (unsigned __int64) td->td_stripoffset[s] : 0,
-+ td->td_stripbytecount ? (unsigned __int64) td->td_stripbytecount[s] : 0);
- #else
- fprintf(fd, " %3lu: [%8llu, %8llu]\n",
- (unsigned long) s,
-- (unsigned long long) td->td_stripoffset[s],
-- (unsigned long long) td->td_stripbytecount[s]);
-+ td->td_stripoffset ? (unsigned long long) td->td_stripoffset[s] : 0,
-+ td->td_stripbytecount ? (unsigned long long) td->td_stripbytecount[s] : 0);
- #endif
- }
- }
+++ /dev/null
---- a/libtiff/tif_dir.c
-+++ b/libtiff/tif_dir.c
-@@ -1067,6 +1067,9 @@ _TIFFVGetField(TIFF* tif, uint32 tag, va
- if (td->td_samplesperpixel - td->td_extrasamples > 1) {
- *va_arg(ap, uint16**) = td->td_transferfunction[1];
- *va_arg(ap, uint16**) = td->td_transferfunction[2];
-+ } else {
-+ *va_arg(ap, uint16**) = NULL;
-+ *va_arg(ap, uint16**) = NULL;
- }
- break;
- case TIFFTAG_REFERENCEBLACKWHITE:
---- a/tools/tiff2pdf.c
-+++ b/tools/tiff2pdf.c
-@@ -237,7 +237,7 @@ typedef struct {
- float tiff_whitechromaticities[2];
- float tiff_primarychromaticities[6];
- float tiff_referenceblackwhite[2];
-- float* tiff_transferfunction[3];
-+ uint16* tiff_transferfunction[3];
- int pdf_image_interpolate; /* 0 (default) : do not interpolate,
- 1 : interpolate */
- uint16 tiff_transferfunctioncount;
-@@ -1047,6 +1047,8 @@ void t2p_read_tiff_init(T2P* t2p, TIFF*
- uint16 pagen=0;
- uint16 paged=0;
- uint16 xuint16=0;
-+ uint16 tiff_transferfunctioncount=0;
-+ uint16* tiff_transferfunction[3];
-
- directorycount=TIFFNumberOfDirectories(input);
- t2p->tiff_pages = (T2P_PAGE*) _TIFFmalloc(TIFFSafeMultiply(tmsize_t,directorycount,sizeof(T2P_PAGE)));
-@@ -1147,26 +1149,48 @@ void t2p_read_tiff_init(T2P* t2p, TIFF*
- }
- #endif
- if (TIFFGetField(input, TIFFTAG_TRANSFERFUNCTION,
-- &(t2p->tiff_transferfunction[0]),
-- &(t2p->tiff_transferfunction[1]),
-- &(t2p->tiff_transferfunction[2]))) {
-- if((t2p->tiff_transferfunction[1] != (float*) NULL) &&
-- (t2p->tiff_transferfunction[2] != (float*) NULL) &&
-- (t2p->tiff_transferfunction[1] !=
-- t2p->tiff_transferfunction[0])) {
-- t2p->tiff_transferfunctioncount = 3;
-- t2p->tiff_pages[i].page_extra += 4;
-- t2p->pdf_xrefcount += 4;
-- } else {
-- t2p->tiff_transferfunctioncount = 1;
-- t2p->tiff_pages[i].page_extra += 2;
-- t2p->pdf_xrefcount += 2;
-- }
-- if(t2p->pdf_minorversion < 2)
-- t2p->pdf_minorversion = 2;
-+ &(tiff_transferfunction[0]),
-+ &(tiff_transferfunction[1]),
-+ &(tiff_transferfunction[2]))) {
-+
-+ if((tiff_transferfunction[1] != (uint16*) NULL) &&
-+ (tiff_transferfunction[2] != (uint16*) NULL)
-+ ) {
-+ tiff_transferfunctioncount=3;
-+ } else {
-+ tiff_transferfunctioncount=1;
-+ }
- } else {
-- t2p->tiff_transferfunctioncount=0;
-+ tiff_transferfunctioncount=0;
- }
-+
-+ if (i > 0){
-+ if (tiff_transferfunctioncount != t2p->tiff_transferfunctioncount){
-+ TIFFError(
-+ TIFF2PDF_MODULE,
-+ "Different transfer function on page %d",
-+ i);
-+ t2p->t2p_error = T2P_ERR_ERROR;
-+ return;
-+ }
-+ }
-+
-+ t2p->tiff_transferfunctioncount = tiff_transferfunctioncount;
-+ t2p->tiff_transferfunction[0] = tiff_transferfunction[0];
-+ t2p->tiff_transferfunction[1] = tiff_transferfunction[1];
-+ t2p->tiff_transferfunction[2] = tiff_transferfunction[2];
-+ if(tiff_transferfunctioncount == 3){
-+ t2p->tiff_pages[i].page_extra += 4;
-+ t2p->pdf_xrefcount += 4;
-+ if(t2p->pdf_minorversion < 2)
-+ t2p->pdf_minorversion = 2;
-+ } else if (tiff_transferfunctioncount == 1){
-+ t2p->tiff_pages[i].page_extra += 2;
-+ t2p->pdf_xrefcount += 2;
-+ if(t2p->pdf_minorversion < 2)
-+ t2p->pdf_minorversion = 2;
-+ }
-+
- if( TIFFGetField(
- input,
- TIFFTAG_ICCPROFILE,
-@@ -1827,10 +1851,9 @@ void t2p_read_tiff_data(T2P* t2p, TIFF*
- &(t2p->tiff_transferfunction[0]),
- &(t2p->tiff_transferfunction[1]),
- &(t2p->tiff_transferfunction[2]))) {
-- if((t2p->tiff_transferfunction[1] != (float*) NULL) &&
-- (t2p->tiff_transferfunction[2] != (float*) NULL) &&
-- (t2p->tiff_transferfunction[1] !=
-- t2p->tiff_transferfunction[0])) {
-+ if((t2p->tiff_transferfunction[1] != (uint16*) NULL) &&
-+ (t2p->tiff_transferfunction[2] != (uint16*) NULL)
-+ ) {
- t2p->tiff_transferfunctioncount=3;
- } else {
- t2p->tiff_transferfunctioncount=1;
--- /dev/null
+From 49723b0eb683cca80142b01a48ba1475fed5188a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Nikola=20Forr=C3=B3?= <nforro@redhat.com>
+Date: Fri, 23 Mar 2018 15:35:39 +0100
+Subject: [PATCH] Fix for bug 2772
+
+It is possible to craft a TIFF document where the IFD list is circular,
+leading to an infinite loop while traversing the chain. The libtiff
+directory reader has a failsafe that will break out of this loop after
+reading 65535 directory entries, but it will continue processing,
+consuming time and resources to process what is essentially a bogus TIFF
+document.
+
+This change fixes the above behavior by breaking out of processing when
+a TIFF document has >= 65535 directories and terminating with an error.
+---
+ contrib/addtiffo/tif_overview.c | 14 +++++++++++++-
+ tools/tiff2pdf.c | 10 ++++++++++
+ tools/tiffcrop.c | 13 +++++++++++--
+ 3 files changed, 34 insertions(+), 3 deletions(-)
+
+diff --git a/contrib/addtiffo/tif_overview.c b/contrib/addtiffo/tif_overview.c
+index c61ffbb..03b3573 100644
+--- a/contrib/addtiffo/tif_overview.c
++++ b/contrib/addtiffo/tif_overview.c
+@@ -65,6 +65,8 @@
+ # define MAX(a,b) ((a>b) ? a : b)
+ #endif
+
++#define TIFF_DIR_MAX 65534
++
+ void TIFFBuildOverviews( TIFF *, int, int *, int, const char *,
+ int (*)(double,void*), void * );
+
+@@ -91,6 +93,7 @@ uint32 TIFF_WriteOverview( TIFF *hTIFF, uint32 nXSize, uint32 nYSize,
+ {
+ toff_t nBaseDirOffset;
+ toff_t nOffset;
++ tdir_t iNumDir;
+
+ (void) bUseSubIFDs;
+
+@@ -147,7 +150,16 @@ uint32 TIFF_WriteOverview( TIFF *hTIFF, uint32 nXSize, uint32 nYSize,
+ return 0;
+
+ TIFFWriteDirectory( hTIFF );
+- TIFFSetDirectory( hTIFF, (tdir_t) (TIFFNumberOfDirectories(hTIFF)-1) );
++ iNumDir = TIFFNumberOfDirectories(hTIFF);
++ if( iNumDir > TIFF_DIR_MAX )
++ {
++ TIFFErrorExt( TIFFClientdata(hTIFF),
++ "TIFF_WriteOverview",
++ "File `%s' has too many directories.\n",
++ TIFFFileName(hTIFF) );
++ exit(-1);
++ }
++ TIFFSetDirectory( hTIFF, (tdir_t) (iNumDir - 1) );
+
+ nOffset = TIFFCurrentDirOffset( hTIFF );
+
+diff --git a/tools/tiff2pdf.c b/tools/tiff2pdf.c
+index 454befb..bdb9126 100644
+--- a/tools/tiff2pdf.c
++++ b/tools/tiff2pdf.c
+@@ -68,6 +68,8 @@ extern int getopt(int, char**, char*);
+
+ #define PS_UNIT_SIZE 72.0F
+
++#define TIFF_DIR_MAX 65534
++
+ /* This type is of PDF color spaces. */
+ typedef enum {
+ T2P_CS_BILEVEL = 0x01, /* Bilevel, black and white */
+@@ -1049,6 +1051,14 @@ void t2p_read_tiff_init(T2P* t2p, TIFF* input){
+ uint16 xuint16=0;
+
+ directorycount=TIFFNumberOfDirectories(input);
++ if(directorycount > TIFF_DIR_MAX) {
++ TIFFError(
++ TIFF2PDF_MODULE,
++ "TIFF contains too many directories, %s",
++ TIFFFileName(input));
++ t2p->t2p_error = T2P_ERR_ERROR;
++ return;
++ }
+ t2p->tiff_pages = (T2P_PAGE*) _TIFFmalloc(TIFFSafeMultiply(tmsize_t,directorycount,sizeof(T2P_PAGE)));
+ if(t2p->tiff_pages==NULL){
+ TIFFError(
+diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c
+index c69177e..c60cb38 100644
+--- a/tools/tiffcrop.c
++++ b/tools/tiffcrop.c
+@@ -217,6 +217,8 @@ extern int getopt(int argc, char * const argv[], const char *optstring);
+ #define DUMP_TEXT 1
+ #define DUMP_RAW 2
+
++#define TIFF_DIR_MAX 65534
++
+ /* Offsets into buffer for margins and fixed width and length segments */
+ struct offset {
+ uint32 tmargin;
+@@ -2233,7 +2235,7 @@ main(int argc, char* argv[])
+ pageNum = -1;
+ else
+ total_images = 0;
+- /* read multiple input files and write to output file(s) */
++ /* Read multiple input files and write to output file(s) */
+ while (optind < argc - 1)
+ {
+ in = TIFFOpen (argv[optind], "r");
+@@ -2241,7 +2243,14 @@ main(int argc, char* argv[])
+ return (-3);
+
+ /* If only one input file is specified, we can use directory count */
+- total_images = TIFFNumberOfDirectories(in);
++ total_images = TIFFNumberOfDirectories(in);
++ if (total_images > TIFF_DIR_MAX)
++ {
++ TIFFError (TIFFFileName(in), "File contains too many directories");
++ if (out != NULL)
++ (void) TIFFClose(out);
++ return (1);
++ }
+ if (image_count == 0)
+ {
+ dirnum = 0;
+--
+2.13.6
+
--- /dev/null
+From de5385cd882a5ff0970f63f4d93da0cbc87230c2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Nikola=20Forr=C3=B3?= <nforro@redhat.com>
+Date: Tue, 17 Apr 2018 18:42:09 +0200
+Subject: [PATCH] Fix NULL pointer dereference in TIFFPrintDirectory
+
+The TIFFPrintDirectory function relies on the following assumptions,
+supposed to be guaranteed by the specification:
+
+(a) A Transfer Function field is only present if the TIFF file has
+ photometric type < 3.
+
+(b) If SamplesPerPixel > Color Channels, then the ExtraSamples field
+ has count SamplesPerPixel - (Color Channels) and contains
+ information about supplementary channels.
+
+While respect of (a) and (b) are essential for the well functioning of
+TIFFPrintDirectory, no checks are realized neither by the callee nor
+by TIFFPrintDirectory itself. Hence, following scenarios might happen
+and trigger the NULL pointer dereference:
+
+(1) TIFF File of photometric type 4 or more has illegal Transfer
+ Function field.
+
+(2) TIFF File has photometric type 3 or less and defines a
+ SamplesPerPixel field such that SamplesPerPixel > Color Channels
+ without defining all extra samples in the ExtraSamples fields.
+
+In this patch, we address both issues with respect of the following
+principles:
+
+(A) In the case of (1), the defined transfer table should be printed
+ safely even if it isn't 'legal'. This allows us to avoid expensive
+ checks in TIFFPrintDirectory. Also, it is quite possible that
+ an alternative photometric type would be developed (not part of the
+ standard) and would allow definition of Transfer Table. We want
+ libtiff to be able to handle this scenario out of the box.
+
+(B) In the case of (2), the transfer table should be printed at its
+ right size, that is if TIFF file has photometric type Palette
+ then the transfer table should have one row and not three, even
+ if two extra samples are declared.
+
+In order to fulfill (A) we simply add a new 'i < 3' end condition to
+the broken TIFFPrintDirectory loop. This makes sure that in any case
+where (b) would be respected but not (a), everything stays fine.
+
+(B) is fulfilled by the loop condition
+'i < td->td_samplesperpixel - td->td_extrasamples'. This is enough as
+long as (b) is respected.
+
+Naturally, we also make sure (b) is respected. This is done in the
+TIFFReadDirectory function by making sure any non-color channel is
+counted in ExtraSamples.
+
+This commit addresses CVE-2018-7456.
+---
+ libtiff/tif_dirread.c | 62 +++++++++++++++++++++++++++++++++++++++++++
+ libtiff/tif_print.c | 2 +-
+ 2 files changed, 63 insertions(+), 1 deletion(-)
+
+diff --git a/libtiff/tif_dirread.c b/libtiff/tif_dirread.c
+index 5e62e81..80aaf8d 100644
+--- a/libtiff/tif_dirread.c
++++ b/libtiff/tif_dirread.c
+@@ -167,6 +167,7 @@ static int TIFFFetchStripThing(TIFF* tif, TIFFDirEntry* dir, uint32 nstrips, uin
+ static int TIFFFetchSubjectDistance(TIFF*, TIFFDirEntry*);
+ static void ChopUpSingleUncompressedStrip(TIFF*);
+ static uint64 TIFFReadUInt64(const uint8 *value);
++static int _TIFFGetMaxColorChannels(uint16 photometric);
+
+ static int _TIFFFillStrilesInternal( TIFF *tif, int loadStripByteCount );
+
+@@ -3506,6 +3507,35 @@ static void TIFFReadDirEntryOutputErr(TIFF* tif, enum TIFFReadDirEntryErr err, c
+ }
+ }
+
++/*
++ * Return the maximum number of color channels specified for a given photometric
++ * type. 0 is returned if photometric type isn't supported or no default value
++ * is defined by the specification.
++ */
++static int _TIFFGetMaxColorChannels( uint16 photometric )
++{
++ switch (photometric) {
++ case PHOTOMETRIC_PALETTE:
++ case PHOTOMETRIC_MINISWHITE:
++ case PHOTOMETRIC_MINISBLACK:
++ return 1;
++ case PHOTOMETRIC_YCBCR:
++ case PHOTOMETRIC_RGB:
++ case PHOTOMETRIC_CIELAB:
++ return 3;
++ case PHOTOMETRIC_SEPARATED:
++ case PHOTOMETRIC_MASK:
++ return 4;
++ case PHOTOMETRIC_LOGL:
++ case PHOTOMETRIC_LOGLUV:
++ case PHOTOMETRIC_CFA:
++ case PHOTOMETRIC_ITULAB:
++ case PHOTOMETRIC_ICCLAB:
++ default:
++ return 0;
++ }
++}
++
+ /*
+ * Read the next TIFF directory from a file and convert it to the internal
+ * format. We read directories sequentially.
+@@ -3522,6 +3552,7 @@ TIFFReadDirectory(TIFF* tif)
+ uint32 fii=FAILED_FII;
+ toff_t nextdiroff;
+ int bitspersample_read = FALSE;
++ int color_channels;
+
+ tif->tif_diroff=tif->tif_nextdiroff;
+ if (!TIFFCheckDirOffset(tif,tif->tif_nextdiroff))
+@@ -4026,6 +4057,37 @@ TIFFReadDirectory(TIFF* tif)
+ }
+ }
+ }
++
++ /*
++ * Make sure all non-color channels are extrasamples.
++ * If it's not the case, define them as such.
++ */
++ color_channels = _TIFFGetMaxColorChannels(tif->tif_dir.td_photometric);
++ if (color_channels && tif->tif_dir.td_samplesperpixel - tif->tif_dir.td_extrasamples > color_channels) {
++ uint16 old_extrasamples;
++ uint16 *new_sampleinfo;
++
++ TIFFWarningExt(tif->tif_clientdata,module, "Sum of Photometric type-related "
++ "color channels and ExtraSamples doesn't match SamplesPerPixel. "
++ "Defining non-color channels as ExtraSamples.");
++
++ old_extrasamples = tif->tif_dir.td_extrasamples;
++ tif->tif_dir.td_extrasamples = (tif->tif_dir.td_samplesperpixel - color_channels);
++
++ // sampleinfo should contain information relative to these new extra samples
++ new_sampleinfo = (uint16*) _TIFFcalloc(tif->tif_dir.td_extrasamples, sizeof(uint16));
++ if (!new_sampleinfo) {
++ TIFFErrorExt(tif->tif_clientdata, module, "Failed to allocate memory for "
++ "temporary new sampleinfo array (%d 16 bit elements)",
++ tif->tif_dir.td_extrasamples);
++ goto bad;
++ }
++
++ memcpy(new_sampleinfo, tif->tif_dir.td_sampleinfo, old_extrasamples * sizeof(uint16));
++ _TIFFsetShortArray(&tif->tif_dir.td_sampleinfo, new_sampleinfo, tif->tif_dir.td_extrasamples);
++ _TIFFfree(new_sampleinfo);
++ }
++
+ /*
+ * Verify Palette image has a Colormap.
+ */
+diff --git a/libtiff/tif_print.c b/libtiff/tif_print.c
+index 24d4b98..10a588e 100644
+--- a/libtiff/tif_print.c
++++ b/libtiff/tif_print.c
+@@ -546,7 +546,7 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags)
+ uint16 i;
+ fprintf(fd, " %2ld: %5u",
+ l, td->td_transferfunction[0][l]);
+- for (i = 1; i < td->td_samplesperpixel; i++)
++ for (i = 1; i < td->td_samplesperpixel - td->td_extrasamples && i < 3; i++)
+ fprintf(fd, " %5u",
+ td->td_transferfunction[i][l]);
+ fputc('\n', fd);
+--
+2.17.0
+
--- /dev/null
+From e1cd2d7ab032e7fe80b4c13e07895194c8bac85e Mon Sep 17 00:00:00 2001
+From: Brian May <brian@linuxpenguins.xyz>
+Date: Thu, 7 Dec 2017 07:46:47 +1100
+Subject: [PATCH 1/4] [PATCH] tiff2pdf: Fix CVE-2017-9935
+
+Fix for http://bugzilla.maptools.org/show_bug.cgi?id=2704
+
+This vulnerability - at least for the supplied test case - is because we
+assume that a tiff will only have one transfer function that is the same
+for all pages. This is not required by the TIFF standards.
+
+We than read the transfer function for every page. Depending on the
+transfer function, we allocate either 2 or 4 bytes to the XREF buffer.
+We allocate this memory after we read in the transfer function for the
+page.
+
+For the first exploit - POC1, this file has 3 pages. For the first page
+we allocate 2 extra extra XREF entries. Then for the next page 2 more
+entries. Then for the last page the transfer function changes and we
+allocate 4 more entries.
+
+When we read the file into memory, we assume we have 4 bytes extra for
+each and every page (as per the last transfer function we read). Which
+is not correct, we only have 2 bytes extra for the first 2 pages. As a
+result, we end up writing past the end of the buffer.
+
+There are also some related issues that this also fixes. For example,
+TIFFGetField can return uninitalized pointer values, and the logic to
+detect a N=3 vs N=1 transfer function seemed rather strange.
+
+It is also strange that we declare the transfer functions to be of type
+float, when the standard says they are unsigned 16 bit values. This is
+fixed in another patch.
+
+This patch will check to ensure that the N value for every transfer
+function is the same for every page. If this changes, we abort with an
+error. In theory, we should perhaps check that the transfer function
+itself is identical for every page, however we don't do that due to the
+confusion of the type of the data in the transfer function.
+---
+ libtiff/tif_dir.c | 3 +++
+ tools/tiff2pdf.c | 69 +++++++++++++++++++++++++++++++----------------
+ 2 files changed, 49 insertions(+), 23 deletions(-)
+
+diff --git a/libtiff/tif_dir.c b/libtiff/tif_dir.c
+index f00f808..c36a5f3 100644
+--- a/libtiff/tif_dir.c
++++ b/libtiff/tif_dir.c
+@@ -1067,6 +1067,9 @@ _TIFFVGetField(TIFF* tif, uint32 tag, va_list ap)
+ if (td->td_samplesperpixel - td->td_extrasamples > 1) {
+ *va_arg(ap, uint16**) = td->td_transferfunction[1];
+ *va_arg(ap, uint16**) = td->td_transferfunction[2];
++ } else {
++ *va_arg(ap, uint16**) = NULL;
++ *va_arg(ap, uint16**) = NULL;
+ }
+ break;
+ case TIFFTAG_REFERENCEBLACKWHITE:
+diff --git a/tools/tiff2pdf.c b/tools/tiff2pdf.c
+index bdb9126..bd23c9e 100644
+--- a/tools/tiff2pdf.c
++++ b/tools/tiff2pdf.c
+@@ -239,7 +239,7 @@ typedef struct {
+ float tiff_whitechromaticities[2];
+ float tiff_primarychromaticities[6];
+ float tiff_referenceblackwhite[2];
+- float* tiff_transferfunction[3];
++ uint16* tiff_transferfunction[3];
+ int pdf_image_interpolate; /* 0 (default) : do not interpolate,
+ 1 : interpolate */
+ uint16 tiff_transferfunctioncount;
+@@ -1049,6 +1049,8 @@ void t2p_read_tiff_init(T2P* t2p, TIFF* input){
+ uint16 pagen=0;
+ uint16 paged=0;
+ uint16 xuint16=0;
++ uint16 tiff_transferfunctioncount=0;
++ uint16* tiff_transferfunction[3];
+
+ directorycount=TIFFNumberOfDirectories(input);
+ if(directorycount > TIFF_DIR_MAX) {
+@@ -1157,26 +1159,48 @@ void t2p_read_tiff_init(T2P* t2p, TIFF* input){
+ }
+ #endif
+ if (TIFFGetField(input, TIFFTAG_TRANSFERFUNCTION,
+- &(t2p->tiff_transferfunction[0]),
+- &(t2p->tiff_transferfunction[1]),
+- &(t2p->tiff_transferfunction[2]))) {
+- if((t2p->tiff_transferfunction[1] != (float*) NULL) &&
+- (t2p->tiff_transferfunction[2] != (float*) NULL) &&
+- (t2p->tiff_transferfunction[1] !=
+- t2p->tiff_transferfunction[0])) {
+- t2p->tiff_transferfunctioncount = 3;
+- t2p->tiff_pages[i].page_extra += 4;
+- t2p->pdf_xrefcount += 4;
+- } else {
+- t2p->tiff_transferfunctioncount = 1;
+- t2p->tiff_pages[i].page_extra += 2;
+- t2p->pdf_xrefcount += 2;
+- }
+- if(t2p->pdf_minorversion < 2)
+- t2p->pdf_minorversion = 2;
++ &(tiff_transferfunction[0]),
++ &(tiff_transferfunction[1]),
++ &(tiff_transferfunction[2]))) {
++
++ if((tiff_transferfunction[1] != (uint16*) NULL) &&
++ (tiff_transferfunction[2] != (uint16*) NULL)
++ ) {
++ tiff_transferfunctioncount=3;
++ } else {
++ tiff_transferfunctioncount=1;
++ }
+ } else {
+- t2p->tiff_transferfunctioncount=0;
++ tiff_transferfunctioncount=0;
+ }
++
++ if (i > 0){
++ if (tiff_transferfunctioncount != t2p->tiff_transferfunctioncount){
++ TIFFError(
++ TIFF2PDF_MODULE,
++ "Different transfer function on page %d",
++ i);
++ t2p->t2p_error = T2P_ERR_ERROR;
++ return;
++ }
++ }
++
++ t2p->tiff_transferfunctioncount = tiff_transferfunctioncount;
++ t2p->tiff_transferfunction[0] = tiff_transferfunction[0];
++ t2p->tiff_transferfunction[1] = tiff_transferfunction[1];
++ t2p->tiff_transferfunction[2] = tiff_transferfunction[2];
++ if(tiff_transferfunctioncount == 3){
++ t2p->tiff_pages[i].page_extra += 4;
++ t2p->pdf_xrefcount += 4;
++ if(t2p->pdf_minorversion < 2)
++ t2p->pdf_minorversion = 2;
++ } else if (tiff_transferfunctioncount == 1){
++ t2p->tiff_pages[i].page_extra += 2;
++ t2p->pdf_xrefcount += 2;
++ if(t2p->pdf_minorversion < 2)
++ t2p->pdf_minorversion = 2;
++ }
++
+ if( TIFFGetField(
+ input,
+ TIFFTAG_ICCPROFILE,
+@@ -1837,10 +1861,9 @@ void t2p_read_tiff_data(T2P* t2p, TIFF* input){
+ &(t2p->tiff_transferfunction[0]),
+ &(t2p->tiff_transferfunction[1]),
+ &(t2p->tiff_transferfunction[2]))) {
+- if((t2p->tiff_transferfunction[1] != (float*) NULL) &&
+- (t2p->tiff_transferfunction[2] != (float*) NULL) &&
+- (t2p->tiff_transferfunction[1] !=
+- t2p->tiff_transferfunction[0])) {
++ if((t2p->tiff_transferfunction[1] != (uint16*) NULL) &&
++ (t2p->tiff_transferfunction[2] != (uint16*) NULL)
++ ) {
+ t2p->tiff_transferfunctioncount=3;
+ } else {
+ t2p->tiff_transferfunctioncount=1;
+--
+2.17.0
+
--- /dev/null
+From b1997b9c3ac0d6bac5effd7558141986487217a9 Mon Sep 17 00:00:00 2001
+From: Even Rouault <even.rouault@spatialys.com>
+Date: Sun, 31 Dec 2017 15:09:41 +0100
+Subject: [PATCH 2/4] libtiff/tif_print.c: TIFFPrintDirectory(): fix null
+ pointer dereference on corrupted file. Fixes
+ http://bugzilla.maptools.org/show_bug.cgi?id=2770 / CVE-2017-18013
+
+---
+ libtiff/tif_print.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/libtiff/tif_print.c b/libtiff/tif_print.c
+index 10a588e..b9b53a0 100644
+--- a/libtiff/tif_print.c
++++ b/libtiff/tif_print.c
+@@ -667,13 +667,13 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags)
+ #if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__))
+ fprintf(fd, " %3lu: [%8I64u, %8I64u]\n",
+ (unsigned long) s,
+- (unsigned __int64) td->td_stripoffset[s],
+- (unsigned __int64) td->td_stripbytecount[s]);
++ td->td_stripoffset ? (unsigned __int64) td->td_stripoffset[s] : 0,
++ td->td_stripbytecount ? (unsigned __int64) td->td_stripbytecount[s] : 0);
+ #else
+ fprintf(fd, " %3lu: [%8llu, %8llu]\n",
+ (unsigned long) s,
+- (unsigned long long) td->td_stripoffset[s],
+- (unsigned long long) td->td_stripbytecount[s]);
++ td->td_stripoffset ? (unsigned long long) td->td_stripoffset[s] : 0,
++ td->td_stripbytecount ? (unsigned long long) td->td_stripbytecount[s] : 0);
+ #endif
+ }
+ }
+--
+2.17.0
+
--- /dev/null
+From 1c127eb3cb7653bd61b61f9c3cfeb36fd10edab1 Mon Sep 17 00:00:00 2001
+From: Even Rouault <even.rouault@spatialys.com>
+Date: Sat, 12 May 2018 15:32:31 +0200
+Subject: [PATCH 3/4] LZWDecodeCompat(): fix potential index-out-of-bounds
+ write. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2780 /
+ CVE-2018-8905
+
+The fix consists in using the similar code LZWDecode() to validate we
+don't write outside of the output buffer.
+---
+ libtiff/tif_lzw.c | 18 ++++++++++++------
+ 1 file changed, 12 insertions(+), 6 deletions(-)
+
+diff --git a/libtiff/tif_lzw.c b/libtiff/tif_lzw.c
+index bc8f9c8..186ea3c 100644
+--- a/libtiff/tif_lzw.c
++++ b/libtiff/tif_lzw.c
+@@ -604,6 +604,7 @@ LZWDecodeCompat(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s)
+ char *tp;
+ unsigned char *bp;
+ int code, nbits;
++ int len;
+ long nextbits, nextdata, nbitsmask;
+ code_t *codep, *free_entp, *maxcodep, *oldcodep;
+
+@@ -755,13 +756,18 @@ LZWDecodeCompat(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s)
+ } while (--occ);
+ break;
+ }
+- assert(occ >= codep->length);
+- op += codep->length;
+- occ -= codep->length;
+- tp = op;
++ len = codep->length;
++ tp = op + len;
+ do {
+- *--tp = codep->value;
+- } while( (codep = codep->next) != NULL );
++ int t;
++ --tp;
++ t = codep->value;
++ codep = codep->next;
++ *tp = (char)t;
++ } while (codep && tp > op);
++ assert(occ >= len);
++ op += len;
++ occ -= len;
+ } else {
+ *op++ = (char)code;
+ occ--;
+--
+2.17.0
+
--- /dev/null
+From 98ed6179dec22db48f6e235d8ca9e2708bf4e71a Mon Sep 17 00:00:00 2001
+From: Even Rouault <even.rouault@spatialys.com>
+Date: Sat, 12 May 2018 14:24:15 +0200
+Subject: [PATCH 4/4] TIFFWriteDirectorySec: avoid assertion. Fixes
+ http://bugzilla.maptools.org/show_bug.cgi?id=2795. CVE-2018-10963
+
+---
+ libtiff/tif_dirwrite.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/libtiff/tif_dirwrite.c b/libtiff/tif_dirwrite.c
+index c68d6d2..5d0a669 100644
+--- a/libtiff/tif_dirwrite.c
++++ b/libtiff/tif_dirwrite.c
+@@ -697,8 +697,11 @@ TIFFWriteDirectorySec(TIFF* tif, int isimage, int imagedone, uint64* pdiroff)
+ }
+ break;
+ default:
+- assert(0); /* we should never get here */
+- break;
++ TIFFErrorExt(tif->tif_clientdata,module,
++ "Cannot write tag %d (%s)",
++ TIFFFieldTag(o),
++ o->field_name ? o->field_name : "unknown");
++ goto bad;
+ }
+ }
+ }
+--
+2.17.0
+
--- /dev/null
+From 5c3bc1c78dfe05eb5f4224650ad606b75e1f7034 Mon Sep 17 00:00:00 2001
+From: Even Rouault <even.rouault@spatialys.com>
+Date: Sun, 11 Mar 2018 11:14:01 +0100
+Subject: [PATCH] ChopUpSingleUncompressedStrip: avoid memory exhaustion
+ (CVE-2017-11613)
+
+In ChopUpSingleUncompressedStrip(), if the computed number of strips is big
+enough and we are in read only mode, validate that the file size is consistent
+with that number of strips to avoid useless attempts at allocating a lot of
+memory for the td_stripbytecount and td_stripoffset arrays.
+
+Rework fix done in 3719385a3fac5cfb20b487619a5f08abbf967cf8 to work in more
+cases like https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6979.
+Credit to OSS Fuzz
+
+Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2724
+---
+ libtiff/tif_dirread.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/libtiff/tif_dirread.c b/libtiff/tif_dirread.c
+index 80aaf8d..5896a78 100644
+--- a/libtiff/tif_dirread.c
++++ b/libtiff/tif_dirread.c
+@@ -5760,6 +5760,16 @@ ChopUpSingleUncompressedStrip(TIFF* tif)
+ if( nstrips == 0 )
+ return;
+
++ /* If we are going to allocate a lot of memory, make sure that the */
++ /* file is as big as needed */
++ if( tif->tif_mode == O_RDONLY &&
++ nstrips > 1000000 &&
++ (offset >= TIFFGetFileSize(tif) ||
++ stripbytes > (TIFFGetFileSize(tif) - offset) / (nstrips - 1)) )
++ {
++ return;
++ }
++
+ newcounts = (uint64*) _TIFFCheckMalloc(tif, nstrips, sizeof (uint64),
+ "for chopped \"StripByteCounts\" array");
+ newoffsets = (uint64*) _TIFFCheckMalloc(tif, nstrips, sizeof (uint64),
+--
+2.17.1
+
--- /dev/null
+From 9171da596c88e6a2dadcab4a3a89dddd6e1b4655 Mon Sep 17 00:00:00 2001
+From: Nathan Baker <elitebadger@gmail.com>
+Date: Thu, 25 Jan 2018 21:28:15 +0000
+Subject: [PATCH] Add workaround to pal2rgb buffer overflow.
+
+---
+ tools/pal2rgb.c | 17 +++++++++++++++--
+ 1 file changed, 15 insertions(+), 2 deletions(-)
+
+diff --git a/tools/pal2rgb.c b/tools/pal2rgb.c
+index 0423598..01fcf94 100644
+--- a/tools/pal2rgb.c
++++ b/tools/pal2rgb.c
+@@ -184,8 +184,21 @@ main(int argc, char* argv[])
+ { unsigned char *ibuf, *obuf;
+ register unsigned char* pp;
+ register uint32 x;
+- ibuf = (unsigned char*)_TIFFmalloc(TIFFScanlineSize(in));
+- obuf = (unsigned char*)_TIFFmalloc(TIFFScanlineSize(out));
++ tmsize_t tss_in = TIFFScanlineSize(in);
++ tmsize_t tss_out = TIFFScanlineSize(out);
++ if (tss_out / tss_in < 3) {
++ /*
++ * BUG 2750: The following code does not know about chroma
++ * subsampling of JPEG data. It assumes that the output buffer is 3x
++ * the length of the input buffer due to exploding the palette into
++ * RGB tuples. If this assumption is incorrect, it could lead to a
++ * buffer overflow. Go ahead and fail now to prevent that.
++ */
++ fprintf(stderr, "Could not determine correct image size for output. Exiting.\n");
++ return -1;
++ }
++ ibuf = (unsigned char*)_TIFFmalloc(tss_in);
++ obuf = (unsigned char*)_TIFFmalloc(tss_out);
+ switch (config) {
+ case PLANARCONFIG_CONTIG:
+ for (row = 0; row < imagelength; row++) {
+--
+libgit2 0.27.0
+
include $(TOPDIR)/rules.mk
PKG_NAME:=unixodbc
-PKG_VERSION:=2.3.4
-PKG_RELEASE:=5
+PKG_VERSION:=2.3.7
+PKG_RELEASE:=1
-PKG_SOURCE_URL:=ftp://ftp.unixodbc.org/pub/unixODBC/
PKG_SOURCE:=unixODBC-$(PKG_VERSION).tar.gz
-PKG_HASH:=2e1509a96bb18d248bf08ead0d74804957304ff7c6f8b2e5965309c632421e39
-PKG_BUILD_DIR:=$(BUILD_DIR)/unixODBC-$(PKG_VERSION)
-HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/unixODBC-$(PKG_VERSION)
+PKG_SOURCE_URL:=http://www.unixodbc.org
+PKG_HASH:=45f169ba1f454a72b8fcbb82abd832630a3bf93baa84731cf2949f449e1e3e77
+
PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
PKG_LICENSE:=prog GPL libs LGPL
+PKG_CPE_ID:=cpe:/a:unixodbc:unixodbc
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/unixODBC-$(PKG_VERSION)
+HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/unixODBC-$(PKG_VERSION)
HOST_BUILD_DEPENDS:=unixodbc
+PKG_FIXUP:=autoreconf
+
# if your other package depends on unixodbc and needs
# odbc_config, add to your other Makefile
# PKG_BUILD_DEPENDS:=unixodbc/host
define Package/unixodbc/Default
SUBMENU:=database
TITLE:=unixODBC
- URL:=http://www.unixodbc.org/
+ URL:=http://www.unixodbc.org
endef
define Package/unixodbc
include $(TOPDIR)/rules.mk
PKG_NAME:=vips
-PKG_VERSION:=8.6.4
-PKG_RELEASE:=2
+PKG_VERSION:=8.6.5
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://github.com/jcupitt/libvips/releases/download/v8.6.4/
-PKG_HASH:=4631a080c92b2b371379252e451818604858942b754c924b09843a7f528a8af4
+PKG_SOURCE_URL:=https://github.com/jcupitt/libvips/releases/download/v8.6.5/
+PKG_HASH:=8702af0e340e220e0c08f8ded6c8248b18e7043938d9e8a2426631fd37a9d5db
PKG_FIXUP:=autoreconf
PKG_CHECK_FORMAT_SECURITY:=0
--- /dev/null
+#
+# Copyright (C) 2018 Bruno Randolf (br1@einfach.org)
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=websocketpp
+PKG_VERSION:=0.8.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/zaphoyd/websocketpp/archive/$(PKG_VERSION)/
+PKG_HASH:=178899de48c02853b55b1ea8681599641cedcdfce59e56beaff3dd0874bf0286
+
+PKG_MAINTAINER:=Bruno Randolf <br1@einfach.org>
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=COPYING
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+CMAKE_INSTALL:=1
+
+define Package/websocketpp
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=WebSocket++
+ URL:=https://www.zaphoyd.com/websocketpp
+endef
+
+define Package/websocketpp/description
+ WebSocket++ is a header only C++ library that implements RFC6455
+ The WebSocket Protocol.
+endef
+
+$(eval $(call BuildPackage,websocketpp))
include $(TOPDIR)/rules.mk
PKG_NAME:=xmlrpc-c
-PKG_VERSION:=1.39.13
-PKG_RELEASE:=2
+PKG_VERSION:=1.43.08
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
PKG_SOURCE_URL:=@SF/xmlrpc-c/Xmlrpc-c%20Super%20Stable/$(PKG_VERSION)
-PKG_HASH:=491e44cae3763d285fc2a75fe6574882964f16451adbb7e6f3293916e120fca9
+PKG_HASH:=c9f5b584a42493877ae0f09ed680d94e035ab389e8fa1873b1ec42118d5cfca3
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
PKG_LICENSE:=VARIOUS
--- a/config.mk.in
+++ b/config.mk.in
-@@ -175,7 +175,7 @@ ifeq ($(patsubst linux-gnu%,linux-gnu,$(
+@@ -176,7 +176,7 @@ ifeq ($(patsubst linux-gnu%,linux-gnu,$(
shlibfn = $(1:%=%.$(SHLIB_SUFFIX).$(MAJ).$(MIN))
shliblefn = $(1:%=%.$(SHLIB_SUFFIX))
# SHLIB_CLIB = -lc
--- a/configure.in
+++ b/configure.in
-@@ -224,9 +224,7 @@ dnl Checks for programs.
+@@ -223,9 +223,7 @@ dnl Checks for programs.
dnl =======================================================================
AC_PROG_CC
include $(TOPDIR)/rules.mk
PKG_NAME:=alpine
-PKG_VERSION:=2.21.999
-PKG_RELEASE:=1
+PKG_VERSION:=2.21.9999
+PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://repo.or.cz/alpine.git
-PKG_SOURCE_VERSION:=349642a84039a4b026513c32a3b4f8594acd50df
-PKG_MIRROR_HASH:=8db14c4ae14329a7cffc8ea5099b7fa5c7adf79ca03893b23b1a8c45b847e5af
+PKG_SOURCE_VERSION:=d3e6f3932f2af9deca8eed09e30a55e9bd524362
+PKG_MIRROR_HASH:=72f9e8c4c3ecbd5f73f527af98ad23f716fcede3af0ab0400c6e0bc9b1288e30
PKG_MAINTAINER:=Antti Seppälä <a.seppala@gmail.com>
PKG_LICENSE:=Apache-2.0
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
CATEGORY:=Mail
DEPENDS:=+libopenssl +libncurses +libpthread +libpam $(ICONV_DEPENDS) $(INTL_DEPENDS)
TITLE:=Alternatively Licensed Program for Internet News and Email
- URL:=http://www.washington.edu/alpine
+ URL:=http://alpine.x10host.com/alpine/
endef
define Package/alpine/Default/description
--- /dev/null
+diff --git a/imap/src/osdep/unix/ssl_unix.c b/imap/src/osdep/unix/ssl_unix.c
+index 4c4d6ef..f2df2f2 100644
+--- a/imap/src/osdep/unix/ssl_unix.c
++++ b/imap/src/osdep/unix/ssl_unix.c
+@@ -33,9 +33,9 @@
+ #include <bio.h>
+ #include <crypto.h>
+ #include <rand.h>
+-#ifdef OPENSSL_1_1_0
+ #include <rsa.h>
+ #include <bn.h>
++#ifdef OPENSSL_1_1_0
+ #ifdef TLSv1_1_client_method
+ #undef TLSv1_1_client_method
+ #endif /* TLSv1_1_client_method */
+@@ -862,22 +862,16 @@ static RSA *ssl_genkey (SSL_CTX_TYPE *con,int export,int keylength)
+ static RSA *key = NIL;
+ if (!key) { /* if don't have a key already */
+ /* generate key */
+-#ifdef OPENSSL_1_1_0
+ BIGNUM *e = BN_new();
+ if (!RSA_generate_key_ex (key, export ? keylength : 1024, e,NIL)) {
+-#else
+- if (!(key = RSA_generate_key (export ? keylength : 1024,RSA_F4,NIL,NIL))) {
+-#endif /* OPENSSL_1_1_0 */
+ syslog (LOG_ALERT,"Unable to generate temp key, host=%.80s",
+ tcp_clienthost ());
+ while ((i = ERR_get_error ()) != 0L)
+ syslog (LOG_ALERT,"SSL error status: %s",ERR_error_string (i,NIL));
+ exit (1);
+ }
+-#ifdef OPENSSL_1_1_0
+ BN_free(e);
+ e = NULL;
+-#endif /* OPENSSL_1_1_0 */
+ }
+ return key;
+ }
+diff --git a/pith/smkeys.h b/pith/smkeys.h
+index e37eea3..a6c143b 100644
+--- a/pith/smkeys.h
++++ b/pith/smkeys.h
+@@ -32,6 +32,8 @@
+ #include <openssl/safestack.h>
+ #include <openssl/conf.h>
+ #include <openssl/x509v3.h>
++#include <openssl/bn.h>
++#include <openssl/rsa.h>
+
+ #ifndef OPENSSL_1_1_0
+ #define X509_get0_notBefore(x) ((x) && (x)->cert_info \
+@@ -47,9 +49,6 @@
+ ? (x)->cert_info->validity->notAfter \
+ : NULL)
+ #define X509_REQ_get0_pubkey(x) (X509_REQ_get_pubkey((x)))
+-#else
+-#include <openssl/rsa.h>
+-#include <openssl/bn.h>
+ #endif /* OPENSSL_1_1_0 */
+
+ #define EMAILADDRLEADER "emailAddress="
PKG_NAME:=clamsmtp
PKG_VERSION:=1.10
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_URL:=http://thewalter.net/stef/software/clamsmtp/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
--- /dev/null
+diff --git a/common/sock_any.h b/common/sock_any.h
+index 77c3841..1e30974 100644
+--- a/common/sock_any.h
++++ b/common/sock_any.h
+@@ -39,7 +39,6 @@
+ #ifndef __SOCK_ANY_H__
+ #define __SOCK_ANY_H__
+
+-#include <sys/socket.h>
+ #include <sys/un.h>
+ #include <netinet/in.h>
+
PKG_NAME:=dovecot
PKG_VERSION:=2.3.2.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.dovecot.org/releases/2.3
endef
CONFIGURE_ARGS += \
+ --libexecdir=/usr/libexec \
--without-pam \
- --with-moduledir=/usr/lib/dovecot/modules \
--with-notify=dnotify \
--without-lzma \
--without-lz4 \
$(1)/etc/dovecot \
$(1)/usr/share/doc/dovecot \
$(1)/usr/lib/dovecot \
+ $(1)/usr/libexec/dovecot \
$(1)/usr/bin \
$(1)/usr/sbin
$(CP) $(PKG_INSTALL_DIR)/etc/dovecot/* $(1)/etc/dovecot/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot/* $(1)/usr/lib/dovecot/
+ $(CP) $(PKG_INSTALL_DIR)/usr/libexec/dovecot/* $(1)/usr/libexec/dovecot/
$(CP) $(PKG_INSTALL_DIR)/usr/share/doc/dovecot/example-config $(1)/usr/share/doc/dovecot/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/doveconf $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
--- /dev/null
+pigeonhole: Fix managesieve-login needs libdovecot-login
+
+When trying to use managesieve my MUA complained sieve wasn't supported.
+On investigation dovecot logs the following could be seen:
+
+ Aug 16 00:28:44 managesieve-login: Fatal: master:
+ service(managesieve-login): child 1430 returned error 127
+ Aug 16 00:31:32 managesieve-login: Error: Error loading shared
+ library libdovecot-login.so.0: No such file or directory
+ (needed by /usr/lib/dovecot/managesieve-login)
+ Aug 16 00:31:32 managesieve-login: Error: Error loading
+ shared library libdovecot.so.0: No such file or directory
+ (needed by /usr/lib/dovecot/managesieve-login)
+ Aug 16 00:31:32 managesieve-login: Error: Error relocating
+ /usr/lib/dovecot/managesieve-login: net_ip2addr: symbol not found
+
+The issue (verified with readelf on non-working build and build with my fix)
+is that there is no RPATH information in the pigeonhole binaries (like
+managesieve-login).
+
+The dovecot-config that is 'installed' in the staging dir
+assumes that plugins will be built on the same host as the installed files.
+The 'installed' dovecot-config (partial) looks like:
+
+LIBDOVECOT='-L/usr/lib/dovecot -ldovecot'
+LIBDOVECOT_LOGIN='-ldovecot-login -L/home/user/Build/openwrt/openwrt-ath79/staging_dir/target-mips_24kc_musl/usr/lib -lssl -lcrypto'
+LIBDOVECOT_SQL=-ldovecot-sql
+LIBDOVECOT_COMPRESS=-ldovecot-compression
+LIBDOVECOT_LDA=-ldovecot-lda
+LIBDOVECOT_STORAGE='-ldovecot-storage '
+LIBDOVECOT_DSYNC=-ldovecot-dsync
+LIBDOVECOT_LIBFTS=-ldovecot-fts
+
+This patch modifed dovecot-config that gets installed on the assumption
+that users of libdovecot will also be cross-compiled (a safe bet).
+Index: dovecot-2.3.2.1/Makefile.am
+===================================================================
+--- dovecot-2.3.2.1.orig/Makefile.am
++++ dovecot-2.3.2.1/Makefile.am
+@@ -73,7 +73,7 @@ install-exec-hook:
+ grep -v '^LIBDOVECOT_.*_INCLUDE' dovecot-config | \
+ grep -v '^LIBDOVECOT.*_DEPS' | sed \
+ -e "s|^\(DOVECOT_INSTALLED\)=.*$$|\1=yes|" \
+- -e "s|^\(LIBDOVECOT\)=.*$$|\1='-L$(pkglibdir) -ldovecot'|" \
++ -e "s|^\(LIBDOVECOT\)=.*$$|\1='-L$(STAGING_DIR)$(pkglibdir) -ldovecot'|" \
+ -e "s|^\(LIBDOVECOT_LOGIN\)=.*$$|\1='-ldovecot-login $(SSL_LIBS)'|" \
+ -e "s|^\(LIBDOVECOT_SQL\)=.*$$|\1=-ldovecot-sql|" \
+ -e "s|^\(LIBDOVECOT_COMPRESS\)=.*$$|\1=-ldovecot-compression|" \
+@@ -81,7 +81,8 @@ install-exec-hook:
+ -e "s|^\(LIBDOVECOT_LDA\)=.*$$|\1=-ldovecot-lda|" \
+ -e "s|^\(LIBDOVECOT_LIBFTS\)=.*$$|\1=-ldovecot-fts|" \
+ -e "s|^\(LIBDOVECOT_STORAGE\)=.*$$|\1='-ldovecot-storage $(LINKED_STORAGE_LDADD)'|" \
+- -e "s|^\(LIBDOVECOT_INCLUDE\)=.*$$|\1=-I$(pkgincludedir)|" \
++ -e "s|^\(LIBDOVECOT_INCLUDE\)=.*$$|\1=-I$(STAGING_DIR)$(pkgincludedir)|" \
++ -e "s|^\(DOVECOT_BINARY_LDFLAGS=\".*\)\"$$|\1 -Wl,-rpath -Wl,$(pkglibdir)\"|" \
+ > $(DESTDIR)$(pkglibdir)/dovecot-config
+
+ uninstall-hook:
PKG_NAME:=emailrelay
PKG_VERSION:=2.0
-PKG_RELEASE:=1
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.gz
PKG_SOURCE_URL:=@SF/emailrelay/$(PKG_VERSION)
--disable-testing \
--disable-windows
+# Workaround for https://sourceforge.net/p/emailrelay/bugs/38/
+# This should be fixed in the next release.
+CONFIGURE_VARS += \
+ ac_cv_search_pam_end=no
+
ifeq ($(CONFIG_EMAILRELAY_SSL),y)
CONFIGURE_ARGS += \
--with-openssl
option mode 'server'
option port '25'
option remote_clients '0'
+# option address_verifier '/usr/local/bin/address-verifier.sh'
+# option domain 'my.example.com'
+# option anonymous '1'
# option server_tls '/etc/path/to/certificate'
# option server_auth '/etc/emailrelay.auth'
# option extra_cmdline ''
option smarthost '192.0.2.1:25'
option port '25'
option remote_clients '0'
+# option address_verifier '/usr/local/bin/address-verifier.sh'
+# option domain 'my.example.com'
+# option anonymous '1'
# option server_tls '/etc/path/to/certificate'
# option server_auth '/etc/emailrelay.auth'
# option client_tls '1'
emailrelay_instance()
{
- local enabled mode port remote_clients server_tls server_auth extra_cmdline smarthost client_tls client_auth
+ local enabled mode port remote_clients server_tls server_auth extra_cmdline smarthost client_tls client_auth address_verifier domain anonymous
config_get_bool enabled "$1" enabled
config_get mode "$1" mode
config_get smarthost "$1" smarthost
config_get_bool client_tls "$1" client_tls
config_get client_auth "$1" client_auth
-
+ config_get address_verifier "$1" address_verifier
+ config_get domain "$1" domain
+ config_get_bool anonymous "$1" anonymous
[ "$enabled" = 0 ] && return 1
[ -n "$server_auth" ] && procd_append_param command --server-auth "$server_auth"
[ "$client_tls" = 1 ] && procd_append_param command --client-tls
[ -n "$client_auth" ] && procd_append_param command --client-auth "$client_auth"
+ [ -n "$address_verifier" ] && procd_append_param command --address-verifier "$address_verifier"
+ [ -n "$domain" ] && procd_append_param command --domain "$domain"
+ [ "$anonymous" = 1 ] && procd_append_param command --anonymous
;;
"cmdline")
# empty by intention (just append extra_cmdline)
-#
+#
# Copyright (C) 2014 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
include $(TOPDIR)/rules.mk
PKG_NAME:=mailman
+PKG_VERSION:=2.1.29
PKG_RELEASE:=1
-PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
-PKG_VERSION:=2.1.23
-PKG_HASH:=b022ca6f8534621c9dbe50c983948688bc4623214773b580c2c78e4a7ae43e69
+
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
+PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
+PKG_HASH:=838872713601e8a124146e550f53709482c1ef168f1e16d201465c651cbf0d2c
+
PKG_MAINTAINER:=Denis Shulyaka <Shulyaka@gmail.com>
PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=gnu-COPYING-GPL
+PKG_CPE_ID:=cpe:2.3:a:gnu:mailman
include $(INCLUDE_DIR)/package.mk
SECTION:=mail
CATEGORY:=Mail
TITLE:=The GNU Mailing List Manager
- URL:=http://www.gnu.org/software/mailman/
+ URL:=https://www.gnu.org/software/mailman/
DEPENDS:=+postfix +python +uhttpd +python-dns
endef
-diff -rupN mailman-2.1.14-1/Mailman/Defaults.py.in mailman-2.1.14-1_patched/Mailman/Defaults.py.in
---- mailman-2.1.14-1/Mailman/Defaults.py.in 2011-03-01 23:35:57.000000000 +0300
-+++ mailman-2.1.14-1_patched/Mailman/Defaults.py.in 2011-03-09 12:26:10.000000000 +0300
-@@ -489,7 +489,7 @@ DELIVERY_MODULE = 'SMTPDirect'
+--- a/Mailman/Defaults.py.in
++++ b/Mailman/Defaults.py.in
+@@ -506,7 +506,7 @@ SMTPLIB_DEBUG_LEVEL = 0
# standard out (or send an email to the site list owner) for manual twiddling
# of an /etc/aliases style file. Use 'Postfix' if you are using the Postfix
# MTA -- but then also see POSTFIX_STYLE_VIRTUAL_DOMAINS.
-diff -Naur mailman-2.1.18-1/configure mailman-2.1.18-1_patched/configure
---- mailman-2.1.18-1/configure 2014-10-26 12:00:38.090360119 +0300
-+++ mailman-2.1.18-1_patched/configure 2014-10-26 12:00:21.323016430 +0300
-@@ -2236,35 +2236,35 @@
+--- a/configure
++++ b/configure
+@@ -2255,35 +2255,35 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $version" >&5
$as_echo "$version" >&6; }
-diff -Naur mailman-2.1.18-1/configure mailman-2.1.18-1_patched/configure
---- mailman-2.1.18-1/configure 2014-05-06 20:43:56.000000000 +0400
-+++ mailman-2.1.18-1_patched/configure 2014-11-04 15:02:32.892666331 +0300
-@@ -3927,6 +3927,8 @@
+--- a/configure
++++ b/configure
+@@ -3957,6 +3957,8 @@ fi
$as_echo "$URLHOST" >&6; }
rm -f conftest.out conftest.py
-diff -Naur mailman-2.1.18-1/Mailman/MailList.py mailman-2.1.18-1_patched/Mailman/MailList.py
---- mailman-2.1.18-1/Mailman/MailList.py 2014-05-06 20:43:56.000000000 +0400
-+++ mailman-2.1.18-1_patched/Mailman/MailList.py 2014-11-04 15:57:06.832636147 +0300
-@@ -30,7 +30,7 @@
+--- a/Mailman/MailList.py
++++ b/Mailman/MailList.py
+@@ -30,7 +30,7 @@ import re
import shutil
import socket
import urllib
from cStringIO import StringIO
from UserDict import UserDict
-diff -Naur mailman-2.1.18-1/misc/paths.py.in mailman-2.1.18-1_patched/misc/paths.py.in
---- mailman-2.1.18-1/misc/paths.py.in 2014-05-06 20:43:56.000000000 +0400
-+++ mailman-2.1.18-1_patched/misc/paths.py.in 2014-11-04 15:55:49.594941540 +0300
-@@ -66,14 +66,14 @@
+--- a/misc/paths.py.in
++++ b/misc/paths.py.in
+@@ -71,14 +71,14 @@ sys.path.append(distdir)
# In a normal interactive Python environment, the japanese.pth and korean.pth
# files would be imported automatically. But because we inhibit the importing
# of the site module, we need to be explicit about importing these codecs.
include $(TOPDIR)/rules.mk
PKG_NAME:=msmtp
-PKG_VERSION:=1.6.6
+PKG_VERSION:=1.6.8
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=@SF/msmtp
-PKG_HASH:=da15db1f62bd0201fce5310adb89c86188be91cd745b7cb3b62b81a501e7fb5e
+PKG_SOURCE_URL:=https://marlam.de/msmtp/releases
+PKG_HASH:=55ff95a304d888b56d07d9c62327ab9bfe26532c9c2a2ed6aefc43bea1b659fb
PKG_LICENSE:=GPL-3.0+
PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
+PKG_MAINTAINER:=
-PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
CATEGORY:=Mail
DEPENDS:=$(INTL_DEPENDS)
TITLE:=Simple sendmail SMTP forwarding
- URL:=http://msmtp.sourceforge.net/
+ URL:=https://marlam.de/msmtp
endef
define Package/msmtp/Default/description
define Package/msmtp-mta
$(call Package/msmtp/Default)
TITLE+= (as MTA)
- DEPENDS+=@(PACKAGE_msmtp||PACAKGE_msmtp-nossl)
+ DEPENDS+=@(PACKAGE_msmtp||PACKAGE_msmtp-nossl)
endef
define Package/msmtp-mta/description
include $(TOPDIR)/rules.mk
PKG_NAME:=mutt
-PKG_VERSION:=1.10.0
+PKG_VERSION:=1.10.1
PKG_RELEASE:=1
PKG_SOURCE_URL:=ftp://ftp.mutt.org/pub/mutt/ \
https://bitbucket.org/mutt/mutt/downloads/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=0215b5f90ef9cc33441a6ca842379b64412ed7f8da83ed68bfaa319179f5535b
+PKG_HASH:=734a3883158ec3d180cf6538d8bd7f685ce641d2cdef657aa0038f76e79a54a0
PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=GPL
PKG_VERSION_PLUGIN:=0.5.2
PKG_VERSION_DOVECOT:=$(shell make --no-print-directory -C ../dovecot/ val.PKG_VERSION V=s)
PKG_VERSION:=$(PKG_VERSION_DOVECOT)-$(PKG_VERSION_PLUGIN)
-PKG_RELEASE:=3
+PKG_RELEASE:=4
DOVECOT_VERSION:=2.3
CPPFLAGS="$(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/include/dovecot/"
define Package/dovecot-pigeonhole/install
- $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/dovecot/
+ $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/dovecot/ $(1)/usr/libexec/dovecot/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot/* $(1)/usr/lib/dovecot/
+ $(CP) $(PKG_INSTALL_DIR)/usr/libexec/dovecot/* $(1)/usr/libexec/dovecot/
find $(1)/usr/lib/dovecot/ -name "*.a" -o -name "*.la" | xargs rm
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=postfix
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_VERSION:=3.3.1
PKG_SOURCE_URL:= \
https://cdn.postfix.johnriley.me/mirrors/postfix-release/official/ \
CONFIG_POSTFIX_CDB \
CONFIG_POSTFIX_DB \
CONFIG_POSTFIX_SQLITE \
+ CONFIG_POSTFIX_MYSQL \
CONFIG_POSTFIX_PGSQL \
CONFIG_POSTFIX_PCRE \
CONFIG_POSTFIX_EAI \
postfix=25:postfix=25 \
postdrop=26:postdrop=26
URL:=http://www.postfix.org/
- DEPENDS:=+POSTFIX_TLS:libopenssl +POSTFIX_SASL:libsasl2 +POSTFIX_LDAP:libopenldap +POSTFIX_DB:libdb47 +POSTFIX_SQLITE:libsqlite3 +POSTFIX_PGSQL:libpq +POSTFIX_EAI:icu +POSTFIX_PCRE:libpcre
+ DEPENDS:=+POSTFIX_TLS:libopenssl +POSTFIX_SASL:libsasl2 +POSTFIX_LDAP:libopenldap +POSTFIX_DB:libdb47 +POSTFIX_SQLITE:libsqlite3 +POSTFIX_MYSQL:libmysqlclient +POSTFIX_PGSQL:libpq +POSTFIX_EAI:icu +POSTFIX_PCRE:libpcre
endef
define Package/postfix/description
default y
help
Implements support for SQLite3 DB
+ config POSTFIX_MYSQL
+ bool "MYSQL support"
+ default n
+ help
+ Implements support for MySQL
config POSTFIX_PGSQL
bool "PostgreSQL support"
default n
AUXLIBS+=-L$(STAGING_DIR)/usr/lib -lsqlite3 -lpthread
endif
+ifdef CONFIG_POSTFIX_MYSQL
+ CCARGS+=-DHAS_MYSQL -I$(STAGING_DIR)/usr/include/mysql
+ AUXLIBS+=-L$(STAGING_DIR)/usr/lib -lmysqlclient -lz -lm
+endif
+
ifdef CONFIG_POSTFIX_PGSQL
CCARGS+=-DHAS_PGSQL -I$(STAGING_DIR)/usr/include/
AUXLIBS+=-L$(STAGING_DIR)/usr/lib -lpq
#!/bin/sh /etc/rc.common
# Copyright (C) 2014 OpenWrt.org
-START=50
+START=72
STOP=50
EXTRA_COMMANDS="status abort flush postinst"
EXTRA_HELP=" status Display the service status
PKG_NAME:=sendmail
PKG_VERSION:=8.15.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://artfiles.org/sendmail.org/pub/sendmail/ \
$(CP) $(PKG_BUILD_DIR)/cf/cf/generic-linux.mc $(PKG_BUILD_DIR)/cf/cf/sendmail.mc
$(SED) 's@TARGET_CC@$(TARGET_CC)@g' $(PKG_BUILD_DIR)/devtools/Site/$(SITECONFIG)
$(SED) 's@TARGET_CFLAGS@$(TARGET_CFLAGS)@g' $(PKG_BUILD_DIR)/devtools/Site/$(SITECONFIG)
+ $(SED) 's@STAGING_DIR@$(STAGING_DIR)@g' $(PKG_BUILD_DIR)/devtools/OS/$(TARGET_OS)
endef
define Build/Compile
define(`confLIBS', `-ldl')
define(`confEBINDIR', `/usr/sbin')
define(`confMKDIR', `mkdir')
-APPENDDEF(`confLIBSEARCH', `crypt nsl')
+define(`confLIBSEARCHPATH', `STAGING_DIR/lib STAGING_DIR/usr/lib')
+APPENDDEF(`confLIBSEARCH', `crypt')
define(`confMTCCOPTS', `-D_REENTRANT')
define(`confMTLDOPTS', `-lpthread')
include $(TOPDIR)/rules.mk
PKG_NAME:=ffmpeg
-PKG_VERSION:=3.2.10
-PKG_RELEASE:=4
+PKG_VERSION:=3.2.12
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://ffmpeg.org/releases/
-PKG_HASH:=3c1626220c7b68ff6be7312559f77f3c65ff6809daf645d4470ac0189926bdbc
+PKG_HASH:=8985cea7b1b3b2e0e2b2a8ac6187a7fb022fe8aa9d35101760a000205c59c412
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>, \
Ian Leonard <antonlacon@gmail.com>
PKG_LICENSE:=LGPL-2.1+ GPL-2+ LGPL-3
PKG_LICENSE_FILES:=COPYING.GPLv2 COPYING.GPLv3 COPYING.LGPLv2.1 COPYING.LGPLv3
+PKG_CPE_ID:=cpe:/a:ffmpeg:ffmpeg
FFMPEG_CUSTOM_ENCODERS:= \
ac3 \
define Package/ffserver
-$(call Package/ffserver/Default)
+$(call Package/ffmpeg/Default)
SECTION:=multimedia
CATEGORY:=Multimedia
TITLE+= streaming server
define Package/libffmpeg-full
$(call Package/libffmpeg/Default)
TITLE+= (full)
- DEPENDS+= +alsa-lib +PACKAGE_libopus:libopus
- ifeq ($(CONFIG_SOFT_FLOAT),y)
- DEPENDS+= +PACKAGE_shine:shine
- else
- DEPENDS+= +PACKAGE_lame-lib:lame-lib +PACKAGE_libx264:libx264 +PACKAGE_fdk-aac:fdk-aac
-
- endif
+ DEPENDS+= +alsa-lib +PACKAGE_libopus:libopus \
+ +SOFT_FLOAT:shine \
+ +!SOFT_FLOAT:lame-lib \
+ +!SOFT_FLOAT:libx264
VARIANT:=full
endef
endef
+# Strip off FPU notation
+REAL_CPU_TYPE:=$(firstword $(subst +, ,$(CONFIG_CPU_TYPE)))
+# Fixup cpu types recogized by ffmpeg configure
+REAL_CPU_TYPE:=$(subst octeonplus,octeon+,$(REAL_CPU_TYPE))
+
FFMPEG_CONFIGURE:= \
CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(FPIC)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
--enable-cross-compile \
--cross-prefix="$(TARGET_CROSS)" \
--arch="$(ARCH)" \
+ $(if $(REAL_CPU_TYPE),--cpu=$(call qstrip,$(REAL_CPU_TYPE)),) \
--target-os=linux \
--prefix="/usr" \
--pkg-config="pkg-config" \
else ifneq ($(findstring powerpc,$(CONFIG_ARCH)),)
FFMPEG_CONFIGURE+= \
--disable-altivec
+# libavcode/mips/aacdec_mips.c build problem
+else ifneq ($(findstring 24kf,$(CONFIG_CPU_TYPE)),)
+FFMPEG_CONFIGURE+= \
+ --disable-inline-asm
endif
# selectively disable optimizations according to arch/cpu type
ifneq ($(CONFIG_TARGET_x86),)
ifeq ($(CONFIG_NASM),y)
- FFMPEG_CONFIGURE += --yasmexe=nasm
+ # Set yasmexe to anything but YASM/NASM (ffmpeg configure will then find NASM correctly)
+ # Newer ffmpeg packages will use --enable-x86asm (with NASM default)
+ FFMPEG_CONFIGURE += --yasmexe=xyzzy
else
FFMPEG_CONFIGURE += --disable-yasm
endif
$(CP) $(PKG_INSTALL_DIR)/usr/include/lib{avcodec,avdevice,avfilter,avformat,avresample,avutil,swresample,swscale} $(1)/usr/include/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avdevice,avfilter,avformat,avresample,avutil,swresample,swscale}.{a,so*} $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/lib{avcodec,avdevice,avfilter,avformat,avresample,avutil,swresample,swscale}.pc $(1)/usr/lib/pkgconfig/
+ifneq ($(CONFIG_SOFT_FLOAT),y)
ifneq ($(CONFIG_PACKAGE_libx264),)
$(CP) $(PKG_INSTALL_DIR)/usr/include/libpostproc $(1)/usr/include/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpostproc.{a,so*} $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpostproc.pc $(1)/usr/lib/pkgconfig/
endif
+endif
endef
define Build/InstallDev/mini
define Package/libffmpeg-full/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avdevice,avfilter,avformat,avresample,avutil,swresample,swscale}.so.* $(1)/usr/lib/
+ifneq ($(CONFIG_SOFT_FLOAT),y)
ifneq ($(CONFIG_PACKAGE_libx264),)
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpostproc.so.* $(1)/usr/lib/
endif
+endif
endef
define Package/libffmpeg-mini/install
include $(TOPDIR)/rules.mk
PKG_NAME:=grilo
-PKG_VERSION:=0.3.4
+PKG_VERSION:=0.3.6
PKG_RELEASE:=1
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNOME/grilo/0.3/
-PKG_HASH:=7c6964053b42574c2f14715d2392a02ea5cbace955eb73e067c77aa3e43b066e
+PKG_HASH:=1e65ca82dd58020451417fde79310d4b940adc3f63ab59997419c52ed3bc9c91
PKG_BUILD_DEPENDS:=glib2 libsoup libxml2
include $(TOPDIR)/rules.mk
PKG_NAME:=gst1-libav
-PKG_VERSION:=1.14.1
+PKG_VERSION:=1.14.2
PKG_RELEASE:=1
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
PKG_SOURCE:=gst-libav-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://gstreamer.freedesktop.org/src/gst-libav
-PKG_HASH:=eff80a02d2f2fb9f34b67e9a26e9954d3218c7aa18e863f2a47805fa7066029d
+PKG_HASH:=8a351c39c5cfc2bbd31ca434ec4a290a730a26efbdea962fdd8306dce5c576de
PKG_LICENSE:=GPL-2.0 LGPL-2.0
PKG_LICENSE_FILES:=COPYING COPYING.LIB
include $(TOPDIR)/rules.mk
PKG_NAME:=gst1-plugins-bad
-PKG_VERSION:=1.14.1
+PKG_VERSION:=1.14.2
PKG_RELEASE:=1
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
PKG_BUILD_DIR:=$(BUILD_DIR)/gst-plugins-bad-$(PKG_VERSION)
PKG_SOURCE:=gst-plugins-bad-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://gstreamer.freedesktop.org/src/gst-plugins-bad/
-PKG_HASH:=2a77c6908032aafdf2cd2e5823fec948f16a25c2d1497a953828d762dc20d61a
+PKG_HASH:=34fab7da70994465a64468330b2168a4a0ed90a7de7e4c499b6d127c6c1b1eaf
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
include $(TOPDIR)/rules.mk
PKG_NAME:=gst1-plugins-base
-PKG_VERSION:=1.14.1
+PKG_VERSION:=1.14.2
PKG_RELEASE:=1
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
PKG_BUILD_DIR:=$(BUILD_DIR)/gst-plugins-base-$(PKG_VERSION)
PKG_SOURCE:=gst-plugins-base-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://gstreamer.freedesktop.org/src/gst-plugins-base/
-PKG_HASH:=1026c7c3082d825d9b5d034c1a6dd8a4ebab60eb3738b0a0afde4ad2dc0b0db5
+PKG_HASH:=a4b7e80ba869f599307449b17c9e00b5d1e94d3ba1d8a1a386b8770b2ef01c7c
PKG_CONFIG_DEPENDS:= \
CONFIG_PACKAGE_gst1-mod-alsa \
include $(TOPDIR)/rules.mk
PKG_NAME:=gst1-plugins-good
-PKG_VERSION:=1.14.1
+PKG_VERSION:=1.14.2
PKG_RELEASE:=1
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
PKG_BUILD_DIR:=$(BUILD_DIR)/gst-plugins-good-$(PKG_VERSION)
PKG_SOURCE:=gst-plugins-good-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://gstreamer.freedesktop.org/src/gst-plugins-good/
-PKG_HASH:=34ec062ddb766a32377532e039781f4a16fbc3e8b449e642605bacab26a99172
+PKG_HASH:=c0575e2811860bfff59b865b8d125153859a01f0615fa41e279b64d88d25caad
PKG_CONFIG_DEPENDS:= \
CONFIG_PACKAGE_gst1-mod-lame \
include $(TOPDIR)/rules.mk
PKG_NAME:=gst1-plugins-ugly
-PKG_VERSION:=1.14.1
+PKG_VERSION:=1.14.2
PKG_RELEASE:=1
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
PKG_BUILD_DIR:=$(BUILD_DIR)/gst-plugins-ugly-$(PKG_VERSION)
PKG_SOURCE:=gst-plugins-ugly-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://gstreamer.freedesktop.org/src/gst-plugins-ugly/
-PKG_HASH:=cff2430bb13f54ef81409a0b3d65ce409a376d4a7bab57a14a97d602539fe1d3
+PKG_HASH:=55e097d9d93921fdcf7abb0ff92d23b21dd9098e632f1ba433603b3bd1cf3d69
PKG_CONFIG_DEPENDS:= \
CONFIG_PACKAGE_gst1-mod-asf \
include $(TOPDIR)/rules.mk
PKG_NAME:=gstreamer1
-PKG_VERSION:=1.14.1
+PKG_VERSION:=1.14.2
PKG_RELEASE:=1
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
PKG_BUILD_DIR:=$(BUILD_DIR)/gstreamer-$(PKG_VERSION)
PKG_SOURCE:=gstreamer-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://gstreamer.freedesktop.org/src/gstreamer/
-PKG_HASH:=28d82b0d261544a9bf85b429399929e4986eb00efcf1ce16cc71d269a4c3186c
+PKG_HASH:=4bd6127299f3f29379046bbd58a526e6353b569e0e72f7b4df2ae70df6882e09
PKG_FIXUP:=autoreconf
PKG_REMOVE_FILES:=autogen.sh aclocal.m4
include $(TOPDIR)/rules.mk
PKG_NAME:=icecast
-PKG_VERSION:=2.4.3
-PKG_RELEASE:=3
+PKG_VERSION:=2.4.4
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://downloads.xiph.org/releases/icecast/
-PKG_HASH:=c85ca48c765d61007573ee1406a797ae6cb31fb5961a42e7f1c87adb45ddc592
+PKG_HASH:=49b5979f9f614140b6a38046154203ee28218d8fc549888596a683ad604e4d44
PKG_MAINTAINER:=André Gaul <andre@gaul.io>, \
Ted Hess <thess@kitschensync.net>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:icecast:icecast
PKG_FIXUP:=autoreconf
PKG_INSTALL:= 1
DEPENDS:=+libcurl +libxml2 +libxslt +libogg +libvorbisidec
TITLE:=A streaming media server for Ogg/Vorbis and MP3 audio streams
USERID:=icecast=87:icecast=87
- URL:=http://www.icecast.org/
+ URL:=https://icecast.org/
endef
define Package/icecast/description
+--- a/m4/ogg.m4
++++ b/m4/ogg.m4
+@@ -29,7 +29,7 @@ XIPH_GCC_WARNING([-I$ogg_prefix/include],,
+ ])
+ AC_CACHE_CHECK([for libogg], xt_cv_lib_ogg,
+ [dnl
+-OGG_LIBS="-logg"
++OGG_LIBS="-lvorbisidec"
+
+ #
+ # check if the installed Ogg is sufficiently new.
+diff --git a/m4/vorbis.m4 b/m4/vorbis.m4
+index 17add29..066dc2a 100644
+--- a/m4/vorbis.m4
++++ b/m4/vorbis.m4
+@@ -38,9 +38,9 @@ if test "x$vorbis_prefix" != "x$ogg_prefix"; then
+ ])
+ fi
+
+-VORBIS_LIBS="-lvorbis"
+-VORBISFILE_LIBS="-lvorbisfile"
+-VORBISENC_LIBS="-lvorbisenc"
++VORBIS_LIBS="-lvorbisidec"
++VORBISFILE_LIBS="-lvorbisidec"
++VORBISENC_LIBS="-lvorbisidec"
+
+ xt_save_LIBS="$LIBS"
+ xt_save_LDFLAGS="$LDFLAGS"
+@@ -58,18 +58,6 @@ AC_TRY_LINK_FUNC(ogg_stream_init, [xt_lib_vorbis=ok],
+ )
+ ])
+
+-if test "x$xt_lib_vorbis" = "xok"; then
+-#
+-# Now check if the installed Vorbis is sufficiently new.
+-#
+-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
+-#include <vorbis/codec.h>
+-#include <vorbis/vorbisenc.h>
+- ], [
+-struct ovectl_ratemanage_arg a;
+-])],,[xt_lib_vorbis="old version found"])
+-AC_MSG_RESULT([$xt_lib_vorbis])
+-fi
+ CPPFLAGS="$xt_save_CPPFLAGS"
+ LIBS="$xt_save_LIBS"
+ LDFLAGS="$xt_save_LDFLAGS"
--- a/src/format_vorbis.c
+++ b/src/format_vorbis.c
@@ -19,7 +19,7 @@
typedef struct vorbis_codec_tag
{
-@@ -583,3 +584,91 @@ static refbuf_t *process_vorbis_page (og
+@@ -583,3 +584,91 @@ static refbuf_t *process_vorbis_page (ogg_state_t *ogg_info,
return NULL;
}
+ oggpack_writeclear(&opb);
+ return 0;
+}
---- a/m4/vorbis.m4
-+++ b/m4/vorbis.m4
-@@ -38,9 +38,9 @@ if test "x$vorbis_prefix" != "x$ogg_pref
- ])
- fi
-
--VORBIS_LIBS="-lvorbis"
--VORBISFILE_LIBS="-lvorbisfile"
--VORBISENC_LIBS="-lvorbisenc"
-+VORBIS_LIBS="-lvorbisidec"
-+VORBISFILE_LIBS="-lvorbisidec"
-+VORBISENC_LIBS="-lvorbisidec"
-
- xt_save_LIBS="$LIBS"
- xt_save_LDFLAGS="$LDFLAGS"
-@@ -58,18 +58,6 @@ AC_TRY_LINK_FUNC(ogg_stream_init, [xt_li
- )
- ])
-
--if test "x$xt_lib_vorbis" = "xok"; then
--#
--# Now check if the installed Vorbis is sufficiently new.
--#
--AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
--#include <vorbis/codec.h>
--#include <vorbis/vorbisenc.h>
-- ], [
--struct ovectl_ratemanage_arg a;
--])],,[xt_lib_vorbis="old version found"])
--AC_MSG_RESULT([$xt_lib_vorbis])
--fi
- CPPFLAGS="$xt_save_CPPFLAGS"
- LIBS="$xt_save_LIBS"
- LDFLAGS="$xt_save_LDFLAGS"
---- a/m4/ogg.m4
-+++ b/m4/ogg.m4
-@@ -29,7 +29,7 @@ XIPH_GCC_WARNING([-I$ogg_prefix/include]
- ])
- AC_CACHE_CHECK([for libogg], xt_cv_lib_ogg,
- [dnl
--OGG_LIBS="-logg"
-+OGG_LIBS="-lvorbisidec"
-
- #
- # check if the installed Ogg is sufficiently new.
EXTRA_DIST = HACKING m4/acx_pthread.m4 m4/ogg.m4 \
m4/theora.m4 m4/vorbis.m4 m4/speex.m4 \
-@@ -11,7 +11,7 @@ EXTRA_DIST = HACKING m4/acx_pthread.m4 m
+@@ -11,7 +11,7 @@ EXTRA_DIST = HACKING m4/acx_pthread.m4 m4/ogg.m4 \
m4/xiph_types.m4 m4/xiph_xml2.m4
docdir = $(datadir)/doc/$(PACKAGE)
--- a/m4/xiph_curl.m4
+++ b/m4/xiph_curl.m4
-@@ -52,7 +52,7 @@ AC_CHECK_HEADERS([curl/curl.h],, curl_ok
+@@ -52,7 +52,7 @@ AC_CHECK_HEADERS([curl/curl.h],, curl_ok="no")
AC_MSG_CHECKING(for libcurl)
if test "$curl_ok" = "yes"
then
- <hostname>localhost</hostname>
+ <hostname>OpenWrt</hostname>
- <!-- You may have multiple <listener> elements -->
+ <!-- You may have multiple <listen-socket> elements -->
<listen-socket>
@@ -234,11 +234,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=motion
-PKG_VERSION=3.4.0-20141018-$(PKG_SOURCE_VERSION)
-PKG_RELEASE:=3
+PKG_VERSION:=4.1.1
+PKG_RELEASE:=2
PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=COPYING
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/Mr-Dave/motion.git
-PKG_SOURCE_VERSION:=9479d910f2149b5558788bb86f97f26522794212
+PKG_SOURCE:=$(PKG_NAME)-release-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/Motion-Project/motion/tar.gz/release-$(PKG_VERSION)?
+PKG_HASH:=2074b935bdfe28f84c2c3233274b06908336778f303bb13530d4299c3f8aa4e2
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-release-$(PKG_VERSION)
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
-PKG_MIRROR_HASH:=02602c775ec3829dac59aed16ea6b0d78f77a435b9c360db1a05cb27227da97e
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
PKG_BUILD_PARALLEL:=1
+PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk
CATEGORY:=Multimedia
DEPENDS:=+libjpeg +libpthread
TITLE:=webcam motion sensing and logging
- URL:=http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome
+ URL:=https://motion-project.github.io/
endef
define Package/motion/conffiles
--- /dev/null
+From 3c7cbd685017c1bf9ba2eaa811b63842bec28f64 Mon Sep 17 00:00:00 2001
+From: Mr-DaveDev <MotionMrDaveDev@gmail.com>
+Date: Mon, 1 Jan 2018 13:07:08 -0700
+Subject: [PATCH] Initialize the thread at start of main
+
+Closes #589
+---
+ logger.c | 5 -----
+ motion.c | 30 ++++++++++++++++--------------
+ 2 files changed, 16 insertions(+), 19 deletions(-)
+
+diff --git a/logger.c b/logger.c
+index c55044b..5ef2f85 100644
+--- a/logger.c
++++ b/logger.c
+@@ -193,11 +193,6 @@ void motion_log(int level, unsigned int type, int errno_flag, const char *fmt, .
+
+ //printf("log_type %d, type %d level %d\n", log_type, type, level);
+
+- /*
+- * If pthread_getspecific fails (e.g., because the thread's TLS doesn't
+- * contain anything for thread number, it returns NULL which casts to zero,
+- * which is nice because that's what we want in that case.
+- */
+ threadnr = (unsigned long)pthread_getspecific(tls_key_threadnr);
+
+ /*
+diff --git a/motion.c b/motion.c
+index 985d4b2..9fe58c1 100644
+--- a/motion.c
++++ b/motion.c
+@@ -2886,10 +2886,6 @@ static void motion_startup(int daemonize, int argc, char *argv[])
+ }
+
+
+- //set_log_level(cnt_list[0]->log_level);
+-
+- MOTION_LOG(NTC, TYPE_ALL, NO_ERRNO, "Motion "VERSION" Started");
+-
+ if ((cnt_list[0]->conf.log_file) && (strncmp(cnt_list[0]->conf.log_file, "syslog", 6))) {
+ set_log_mode(LOGMODE_FILE);
+ ptr_logfile = set_logfile(cnt_list[0]->conf.log_file);
+@@ -2908,6 +2904,8 @@ static void motion_startup(int daemonize, int argc, char *argv[])
+ MOTION_LOG(NTC, TYPE_ALL, NO_ERRNO, "Logging to syslog");
+ }
+
++ MOTION_LOG(NTC, TYPE_ALL, NO_ERRNO, "Motion "VERSION" Started");
++
+ if ((cnt_list[0]->conf.log_type_str == NULL) ||
+ !(cnt_list[0]->log_type = get_log_type(cnt_list[0]->conf.log_type_str))) {
+ cnt_list[0]->log_type = TYPE_DEFAULT;
+@@ -3053,8 +3051,22 @@ int main (int argc, char **argv)
+ */
+ struct sigaction sig_handler_action;
+ struct sigaction sigchild_action;
++
++
+ setup_signals(&sig_handler_action, &sigchild_action);
+
++ /*
++ * Create and a thread attribute for the threads we spawn later on.
++ * PTHREAD_CREATE_DETACHED means to create threads detached, i.e.
++ * their termination cannot be synchronized through 'pthread_join'.
++ */
++ pthread_attr_init(&thread_attr);
++ pthread_attr_setdetachstate(&thread_attr, PTHREAD_CREATE_DETACHED);
++
++ /* Create the TLS key for thread number. */
++ pthread_key_create(&tls_key_threadnr, NULL);
++ pthread_setspecific(tls_key_threadnr, (void *)(0));
++
+ motion_startup(1, argc, argv);
+
+ ffmpeg_global_init();
+@@ -3102,16 +3114,6 @@ int main (int argc, char **argv)
+ if (cnt_list[0]->conf.setup_mode)
+ MOTION_LOG(NTC, TYPE_ALL, NO_ERRNO, "Motion running in setup mode.");
+
+- /*
+- * Create and a thread attribute for the threads we spawn later on.
+- * PTHREAD_CREATE_DETACHED means to create threads detached, i.e.
+- * their termination cannot be synchronized through 'pthread_join'.
+- */
+- pthread_attr_init(&thread_attr);
+- pthread_attr_setdetachstate(&thread_attr, PTHREAD_CREATE_DETACHED);
+-
+- /* Create the TLS key for thread number. */
+- pthread_key_create(&tls_key_threadnr, NULL);
+
+ do {
+ if (restart) {
+--
+2.7.4
+
+++ /dev/null
---- a/motion.c
-+++ b/motion.c
-@@ -2630,6 +2630,17 @@ int main (int argc, char **argv)
- struct sigaction sigchild_action;
- setup_signals(&sig_handler_action, &sigchild_action);
-
-+ /*
-+ * Create and a thread attribute for the threads we spawn later on.
-+ * PTHREAD_CREATE_DETACHED means to create threads detached, i.e.
-+ * their termination cannot be synchronized through 'pthread_join'.
-+ */
-+ pthread_attr_init(&thread_attr);
-+ pthread_attr_setdetachstate(&thread_attr, PTHREAD_CREATE_DETACHED);
-+
-+ /* Create the TLS key for thread number. */
-+ pthread_key_create(&tls_key_threadnr, NULL);
-+
- motion_startup(1, argc, argv);
-
- #ifdef HAVE_FFMPEG
-@@ -2648,17 +2659,6 @@ int main (int argc, char **argv)
- if (cnt_list[0]->conf.setup_mode)
- MOTION_LOG(NTC, TYPE_ALL, NO_ERRNO, "%s: Motion running in setup mode.");
-
-- /*
-- * Create and a thread attribute for the threads we spawn later on.
-- * PTHREAD_CREATE_DETACHED means to create threads detached, i.e.
-- * their termination cannot be synchronized through 'pthread_join'.
-- */
-- pthread_attr_init(&thread_attr);
-- pthread_attr_setdetachstate(&thread_attr, PTHREAD_CREATE_DETACHED);
--
-- /* Create the TLS key for thread number. */
-- pthread_key_create(&tls_key_threadnr, NULL);
--
- do {
- if (restart) {
- /*
---- a/motion.h
-+++ b/motion.h
-@@ -84,7 +84,7 @@
- #endif
-
- /* strerror_r() XSI vs GNU */
--#if (defined(BSD)) || ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && ! _GNU_SOURCE)
-+#if (defined(BSD)) || ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && ! _GNU_SOURCE) || (!defined(__GLIBC__))
- #define XSI_STRERROR_R
- #endif
-
include $(TOPDIR)/rules.mk
PKG_NAME:=xupnpd
-PKG_REV:=7ff74b2d5288fbc35c4f6fcb94466d408b1f853c
-PKG_VERSION:=2017-10-31
+PKG_REV:=fe39cdc41c84d5b365e3da766167c7c9551e3b2f
+PKG_VERSION:=2018-09-24
PKG_RELEASE:=1
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=$(PKG_REV)
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_URL:=https://github.com/clark15b/xupnpd.git
-PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
-PKG_MIRROR_HASH:=bba5aae63bb5c70af831a0f2ecbed3b0e39aa814ae383929b8eaef4ca1a8f421
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/clark15b/xupnpd/tar.gz/$(PKG_REV)?
+PKG_HASH:=5ce2f3423b86e8de4dcd5c46da28a51707c21b234a4b356608902534c3160c84
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_REV)
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=LICENSE
--- /dev/null
+if PACKAGE_netopeer2-keystored
+
+config SSH_KEYS
+ bool "Generate default ssh keys"
+ default y
+
+endif
--- /dev/null
+#
+# Copyright (C) 2017 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+# Warning by default OpenWrt does not have a root password which is necessery for NETCONF server.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=Netopeer2
+PKG_VERSION:=0.6-r1
+
+PKG_LICENSE:=BSD-3-Clause
+PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/CESNET/Netopeer2/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=5f38db43f6021e389cf1f3c5c70e432586d8ba7f2d64ed5bd2bea8c7ea6b39e6
+
+CMAKE_INSTALL:=1
+
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/netopeer2-keystored/config
+ source "$(SOURCE)/Config_keystored.in"
+endef
+
+define Package/netopeer2-server
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=NETCONF server
+ URL:=$(PKG_SOURCE_URL)
+ DEPENDS:=+libpthread +libyang +libnetconf2 +netopeer2-keystored +libsysrepo +sysrepocfg +sysrepoctl +sysrepo
+ MENU:=1
+endef
+
+define Package/netopeer2-cli
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=Netopeer2 cli tool
+ URL:=$(PKG_SOURCE_URL)
+ DEPENDS:=+libpthread +libyang +libnetconf2 +libopenssl
+endef
+
+define Package/netopeer2-keystored
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=Netopeer2 key store management
+ URL:=$(PKG_SOURCE_URL)
+ DEPENDS:=+libopenssl +libsysrepo +sysrepo +sysrepocfg +sysrepoctl +SSH_KEYS:openssh-keygen
+ MENU:=1
+endef
+
+define Package/netopeer2/description
+ Netopeer2 is a set of tools implementing network configuration tools based on the NETCONF
+ Protocol. This is the second generation of the toolset, originally available as the Netopeer
+ project. Netopeer2 is based on the new generation of the NETCONF and YANG libraries -
+ libyang and libnetconf2. The Netopeer server uses sysrepo as a NETCONF datastore implementation.
+endef
+
+CMAKE_OPTIONS += \
+ -DCMAKE_INSTALL_PREFIX:PATH=/usr \
+ -DCMAKE_BUILD_TYPE:STRING=Release \
+ -DKEYSTORED_KEYS_DIR:STRING=/etc/keystored/keys \
+ -DENABLE_CONFIGURATION:BOOL=OFF \
+ -DMODEL_INSTALL:BOOL=OFF \
+ -DSSH_KEY_INSTALL:BOOL=OFF
+
+define Package/netopeer2-server/install
+ $(INSTALL_DIR) $(1)/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/server/netopeer2-server $(1)/bin/
+
+ $(INSTALL_DIR) $(1)/etc/sysrepo/yang
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-ssh-server.yang $(1)/etc/sysrepo/yang/ietf-ssh-server@2016-11-02.yang
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-tls-server.yang $(1)/etc/sysrepo/yang/ietf-tls-server@2016-11-02.yang
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/iana-crypt-hash.yang $(1)/etc/sysrepo/yang/iana-crypt-hash@2014-08-06.yang
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-x509-cert-to-name.yang $(1)/etc/sysrepo/yang/ietf-x509-cert-to-name@2014-12-10.yang
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-netconf-server.yang $(1)/etc/sysrepo/yang/ietf-netconf-server@2016-11-02.yang
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-netconf-monitoring.yang $(1)/etc/sysrepo/yang/ietf-netconf-monitoring@2010-10-04.yang
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-netconf-with-defaults.yang $(1)/etc/sysrepo/yang/ietf-netconf-with-defaults@2011-06-01.yang
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-system.yang $(1)/etc/sysrepo/yang/ietf-system@2014-08-06.yang
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-datastores.yang $(1)/etc/sysrepo/yang/ietf-datastores@2017-08-17.yang
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-yang-library.yang $(1)/etc/sysrepo/yang/ietf-yang-library@2018-01-17.yang
+
+ $(INSTALL_DIR) $(1)/etc/uci-defaults
+ $(INSTALL_BIN) ./files/netopeer2-server.default $(1)/etc/uci-defaults/98_netopeer2-server
+
+ $(INSTALL_DIR) $(1)/etc/init.d/
+ $(INSTALL_BIN) ./files/netopeer2-server.init $(1)/etc/init.d/netopeer2-server
+
+ $(INSTALL_DIR) $(1)/usr/share/netopeer2-server
+ $(INSTALL_DATA) ./files/stock_config.xml $(1)/usr/share/netopeer2-server
+endef
+
+define Package/netopeer2-cli/install
+ $(INSTALL_DIR) $(1)/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/cli/netopeer2-cli $(1)/bin/
+endef
+
+define Package/netopeer2-keystored/install
+ $(INSTALL_DIR) $(1)/usr/lib/sysrepo/plugins/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/keystored/libkeystored.so $(1)/usr/lib/sysrepo/plugins/
+
+ $(INSTALL_DIR) $(1)/etc/sysrepo/yang
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-keystore.yang $(1)/etc/sysrepo/yang/ietf-keystore@2016-10-31.yang
+
+ $(INSTALL_DIR) $(1)/etc/uci-defaults
+
+ $(INSTALL_DIR) $(1)/etc/keystored/keys
+ifeq ($(CONFIG_SSH_KEYS),y)
+ $(INSTALL_BIN) ./files/netopeer2-keystored-keygen.default $(1)/etc/uci-defaults/97_netopeer2-keystored
+else
+ $(INSTALL_BIN) ./files/netopeer2-keystored.default $(1)/etc/uci-defaults/97_netopeer2-keystored
+ #ssh key name is specified in ./files/stock_config.xml file, you will need to provide the ssh keys yourself.
+ $(INSTALL_DATA) ./files/ssh_host_rsa_key.pem $(1)/etc/keystored/keys
+ $(INSTALL_DATA) ./files/ssh_host_rsa_key.pub.pem $(1)/etc/keystored/keys
+endif
+
+ $(INSTALL_DIR) $(1)/usr/share/netopeer2-keystored
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/keystored/stock_key_config.xml $(1)/usr/share/netopeer2-keystored
+endef
+
+$(eval $(call BuildPackage,netopeer2-server))
+$(eval $(call BuildPackage,netopeer2-cli))
+$(eval $(call BuildPackage,netopeer2-keystored))
--- /dev/null
+#!/bin/sh
+
+# Warning, problems can occur if the device restarts in the middle of this uci-default script
+
+if [ -x /bin/sysrepoctl ]; then
+ match=$(sysrepoctl -l | grep "ietf-keystore ")
+ if [ ! "$match" ]; then
+ sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-keystore@2016-10-31.yang -o root:root -p 600
+ if [ -x /bin/sysrepocfg ]; then
+ sysrepocfg -f xml -d startup -i /usr/share/netopeer2-keystored/stock_key_config.xml ietf-keystore
+ rm /usr/share/netopeer2-keystored/stock_key_config.xml
+ fi
+
+ #generate ssh keys
+ if [ ! -f "/etc/keystored/keys/ssh_host_rsa_key.pem" ]; then
+ ssh-keygen -m pem -t rsa -q -N "" -f /etc/keystored/keys/ssh_host_rsa_key.pem
+ chmod go-rw /etc/keystored/keys/ssh_host_rsa_key.pem
+ fi
+ fi
+fi
+
+exit 0
--- /dev/null
+#!/bin/sh
+
+# Warning, problems can occur if the device restarts in the middle of this uci-default script
+
+if [ -x /bin/sysrepoctl ]; then
+ match=$(sysrepoctl -l | grep "ietf-keystore ")
+ if [ ! "$match" ]; then
+ sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-keystore@2016-10-31.yang -o root:root -p 600
+ if [ -x /bin/sysrepocfg ]; then
+ sysrepocfg -f xml -d startup -i /usr/share/netopeer2-keystored/stock_key_config.xml ietf-keystore
+ rm /usr/share/netopeer2-keystored/stock_key_config.xml
+ fi
+ fi
+fi
+
+exit 0
--- /dev/null
+#!/bin/sh
+
+# Warning, problems can occur if the device restarts in the middle of this uci-default script
+
+if [ -x /bin/sysrepoctl ]; then
+ match=$(sysrepoctl -l | grep "ietf-ssh-server ")
+ if [ ! "$match" ]; then
+ sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-ssh-server@2016-11-02.yang -p 600
+ fi
+
+ match=$(sysrepoctl -l | grep "ietf-tls-server ")
+ if [ ! "$match" ]; then
+ sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-tls-server@2016-11-02.yang -p 600
+ fi
+
+ match=$(sysrepoctl -l | grep "iana-crypt-hash ")
+ if [ ! "$match" ]; then
+ sysrepoctl --install --yang=/etc/sysrepo/yang/iana-crypt-hash@2014-08-06.yang -p 600
+ fi
+
+ match=$(sysrepoctl -l | grep "ietf-x509-cert-to-name ")
+ if [ ! "$match" ]; then
+ sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-x509-cert-to-name@2014-12-10.yang -p 600
+ fi
+
+ match=$(sysrepoctl -l | grep "ietf-netconf-server ")
+ if [ ! "$match" ]; then
+ sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-server@2016-11-02.yang -o root:root -p 600
+ sysrepoctl -m ietf-netconf-server -e listen
+ sysrepoctl -m ietf-netconf-server -e ssh-listen
+ if [ -x /bin/sysrepocfg ]; then
+ sysrepocfg -f xml -d startup -i /usr/share/netopeer2-server/stock_config.xml ietf-netconf-server
+ rm /usr/share/netopeer2-server/stock_config.xml
+ fi
+ fi
+
+ match=$(sysrepoctl -l | grep "ietf-netconf-monitoring ")
+ if [ ! "$match" ]; then
+ sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-monitoring@2010-10-04.yang -o root:root -p 600
+ fi
+
+ match=$(sysrepoctl -l | grep "ietf-netconf-with-defaults ")
+ if [ ! "$match" ]; then
+ sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-with-defaults@2011-06-01.yang -o root:root -p 600
+ fi
+
+ match=$(sysrepoctl -l | grep "ietf-system ")
+ if [ ! "$match" ]; then
+ sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-system@2014-08-06.yang -o root:root -p 600
+ sysrepoctl -m ietf-system -e authentication
+ sysrepoctl -m ietf-system -e local-users
+ fi
+
+ match=$(sysrepoctl -l | grep "ietf-datastores ")
+ if [ ! "$match" ]; then
+ sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-datastores@2017-08-17.yang -o root:root -p 600
+ fi
+
+ match=$(sysrepoctl -l | grep "ietf-yang-library ")
+ if [ ! "$match" ]; then
+ sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-yang-library@2018-01-17.yang -o root:root -p 600
+ fi
+fi
+
+exit 0
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=99
+STOP=11
+
+USE_PROCD=1
+PROG=/bin/netopeer2-server
+
+start_service() {
+ procd_open_instance
+ procd_set_param command $PROG
+ procd_append_param command -d -v 0
+ procd_set_param respawn
+ procd_close_instance
+}
+
+stop_service()
+{
+ service_stop ${PROG}
+ rm /var/run/netopeer2-server.pid
+}
--- /dev/null
+<netconf-server xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-server">
+ <listen>
+ <endpoint>
+ <name>test_ssh_listen_endpt</name>
+ <ssh>
+ <address>::</address>
+ <port>830</port>
+ <host-keys>
+ <host-key>
+ <name>test_ssh_listen_key</name>
+ <public-key>ssh_host_rsa_key</public-key>
+ </host-key>
+ </host-keys>
+ </ssh>
+ </endpoint>
+ </listen>
+</netconf-server>
--- /dev/null
+Index: Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/CMakeLists.txt
+===================================================================
+--- /dev/null
++++ Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/CMakeLists.txt
+@@ -0,0 +1,5 @@
++cmake_minimum_required(VERSION 2.6)
++
++add_subdirectory(server)
++add_subdirectory(cli)
++add_subdirectory(keystored)
+Index: Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/cli/CMakeLists.txt
+===================================================================
+--- Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d.orig/cli/CMakeLists.txt
++++ Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/cli/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ cmake_minimum_required(VERSION 2.6)
+
+ # include custom Modules
+-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../CMakeModules/")
++set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules/")
+
+ project(netopeer2-cli C)
+ include(GNUInstallDirs)
+@@ -83,7 +83,7 @@ endif()
+ install(FILES ${PROJECT_SOURCE_DIR}/doc/${PROJECT_NAME}.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
+
+ # clean cmake cache
+-add_custom_target(cleancache
++add_custom_target(cleancache_cli
+ COMMAND make clean
+ COMMAND find . -iname '*cmake*' -not -name CMakeLists.txt -exec rm -rf {} +
+ COMMAND rm -rf Makefile Doxyfile
+Index: Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/keystored/CMakeLists.txt
+===================================================================
+--- Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d.orig/keystored/CMakeLists.txt
++++ Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/keystored/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ cmake_minimum_required(VERSION 2.6)
+
+ # include custom Modules
+-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../CMakeModules/")
++set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules/")
+
+ project(keystored C)
+ include(GNUInstallDirs)
+@@ -140,7 +140,7 @@ if (SSH_KEY_INSTALL)
+ execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/scripts/ssh-key-import.sh)")
+ endif()
+
+-add_custom_target(install-scripts-ide
++add_custom_target(install-scripts-ide-keystored
+ scripts/model-install.sh
+ scripts/ssh-key-import.sh
+ )
+Index: Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/server/CMakeLists.txt
+===================================================================
+--- Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d.orig/server/CMakeLists.txt
++++ Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/server/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ cmake_minimum_required(VERSION 2.8.9)
+
+ # include custom Modules
+-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../CMakeModules/")
++set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules/")
+
+ project(netopeer2-server C)
+ include(GNUInstallDirs)
+@@ -176,7 +176,7 @@ if (ENABLE_CONFIGURATION)
+ execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/scripts/model-install.sh)")
+ endif()
+
+-add_custom_target(install-scripts-ide
++add_custom_target(install-scripts-ide-server
+ scripts/model-install.sh
--- /dev/null
+Index: Netopeer2-0.6-r1/keystored/CMakeLists.txt
+===================================================================
+--- Netopeer2-0.6-r1.orig/keystored/CMakeLists.txt
++++ Netopeer2-0.6-r1/keystored/CMakeLists.txt
+@@ -69,6 +69,8 @@ find_package(SYSREPO REQUIRED)
+ target_link_libraries(keystored ${SYSREPO_LIBRARIES})
+ include_directories(${SYSREPO_INCLUDE_DIRS})
+
++# skip step because of cross compiling
++if (FALSE)
+ # get sysrepo plugins directory
+ if (NOT SR_PLUGINS_DIR)
+ if (PKG_CONFIG_FOUND)
+@@ -154,3 +156,4 @@ add_custom_target(install-scripts-ide-ke
+
+ # plugins should be installed into sysrepo plugins dir
+ install(TARGETS keystored DESTINATION ${SR_PLUGINS_DIR})
++endif()
PKG_NAME:=acme
PKG_VERSION:=2.7.9
-PKG_RELEASE:=1
+PKG_RELEASE:=4
PKG_LICENSE:=GPLv3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
define Package/acme
SECTION:=net
CATEGORY:=Network
- DEPENDS:=+curl +ca-bundle +openssl-util +netcat
+ DEPENDS:=+curl +ca-bundle +openssl-util +socat
TITLE:=ACME (Letsencrypt) client
endef
SECTION:=luci
CATEGORY:=LuCI
TITLE:=ACME package - LuCI interface
- DEPENDS:= lua luci-base +acme luci-app-uhttpd
+ DEPENDS:= lua luci-base +acme
SUBMENU:=3. Applications
endef
]]--
+local ipkg = require "luci.model.ipkg"
+
+local nginx_presence = ipkg.installed("nginx-all-module") or ipkg.installed("nginx-ssl") or false
+
+local uhttpd_presence = ipkg.installed("uhttpd") or false
+
m = Map("acme", translate("ACME certificates"),
translate("This configures ACME (Letsencrypt) automatic certificate installation. " ..
"Simply fill out this to have the router configured with Letsencrypt-issued " ..
kl.rmempty = false
kl.datatype = "and(uinteger,min(2048))"
+if uhttpd_presence then
u = cs:option(Flag, "update_uhttpd", translate("Use for uhttpd"),
translate("Update the uhttpd config with this certificate once issued " ..
- "(only select this for one certificate)."))
+ "(only select this for one certificate)." ..
+ "Is also available luci-app-uhttpd to configure uhttpd form the LuCI interface."))
+u.rmempty = false
+end
+
+if nginx_presence then
+u = cs:option(Flag, "update_nginx", translate("Use for nginx"),
+ translate("Update the nginx config with this certificate once issued " ..
+ "(only select this for one certificate)." ..
+ "Nginx must support ssl, if not it won't start as it needs to be " ..
+ "compiled with ssl support to use cert options"))
u.rmempty = false
+end
wr = cs:option(Value, "webroot", translate("Webroot directory"),
translate("Webserver root directory. Set this to the webserver " ..
option use_staging 1
option keylength 2048
option update_uhttpd 1
+ option update_nginx 1
option webroot ""
list domains example.org
STATE_DIR='/etc/acme'
ACCOUNT_EMAIL=
DEBUG=0
+NGINX_WEBSERVER=0
+UPDATE_NGINX=0
+UPDATE_UHTTPD=0
. /lib/functions.sh
[ "$DEBUG" -eq "1" ] && logger -t acme -s -p daemon.debug "$@"
}
-get_listeners()
-{
- netstat -nptl 2>/dev/null | awk 'match($4, /:80$/){split($7, parts, "/"); print parts[2];}' | uniq | tr "\n" " "
+get_listeners() {
+ local proto rq sq listen remote state program
+ netstat -nptl 2>/dev/null | while read proto rq sq listen remote state program; do
+ case "$proto#$listen#$program" in
+ tcp#*:80#[0-9]*/*) echo -n "${program%% *} " ;;
+ esac
+ done
}
pre_checks()
log "Running pre checks for $main_domain."
listeners="$(get_listeners)"
- debug "port80 listens: $listeners"
-
- case "$listeners" in
- "uhttpd")
- debug "Found uhttpd listening on port 80; trying to disable."
- UHTTPD_LISTEN_HTTP=$(uci get uhttpd.main.listen_http)
-
- if [ -z "$UHTTPD_LISTEN_HTTP" ]; then
- err "$main_domain: Unable to find uhttpd listen config."
- err "Manually disable uhttpd or set webroot to continue."
- return 1
- fi
+ debug "port80 listens: $listeners"
- uci set uhttpd.main.listen_http=''
- uci commit uhttpd || return 1
- if ! /etc/init.d/uhttpd reload ; then
- uci set uhttpd.main.listen_http="$UHTTPD_LISTEN_HTTP"
- uci commit uhttpd
- return 1
- fi
+ for listener in $(get_listeners); do
+ pid="${listener%/*}"
+ cmd="${listener#*/}"
+
+ case "$cmd" in
+ uhttpd)
+ debug "Found uhttpd listening on port 80; trying to disable."
+
+ UHTTPD_LISTEN_HTTP=$(uci get uhttpd.main.listen_http)
+
+ if [ -z "$UHTTPD_LISTEN_HTTP" ]; then
+ err "$main_domain: Unable to find uhttpd listen config."
+ err "Manually disable uhttpd or set webroot to continue."
+ return 1
+ fi
+
+ uci set uhttpd.main.listen_http=''
+ uci commit uhttpd || return 1
+ if ! /etc/init.d/uhttpd reload ; then
+ uci set uhttpd.main.listen_http="$UHTTPD_LISTEN_HTTP"
+ uci commit uhttpd
+ return 1
+ fi
;;
- "")
- debug "Nothing listening on port 80."
+ nginx*)
+ debug "Found nginx listening on port 80; trying to disable."
+ NGINX_WEBSERVER=1
+ local tries=0
+ while grep -sq "$cmd" "/proc/$pid/cmdline" && kill -0 "$pid"; do
+ /etc/init.d/nginx stop
+ if [ $tries -gt 10 ]; then
+ debug "Can't stop nginx. Terminating script."
+ return 1
+ fi
+ debug "Waiting for nginx to stop..."
+ tries=$((tries + 1))
+ sleep 1
+ done
;;
- *)
- err "$main_domain: Cannot run in standalone mode; another daemon is listening on port 80."
- err "Disable other daemon or set webroot to continue."
- return 1
+ "")
+ debug "Nothing listening on port 80."
;;
- esac
+ *)
+ err "$main_domain: Cannot run in standalone mode; another daemon is listening on port 80."
+ err "Disable other daemon or set webroot to continue."
+ return 1
+ ;;
+ esac
+ done
iptables -I input_rule -p tcp --dport 80 -j ACCEPT -m comment --comment "ACME" || return 1
ip6tables -I input_rule -p tcp --dport 80 -j ACCEPT -m comment --comment "ACME" || return 1
iptables -D input_rule -p tcp --dport 80 -j ACCEPT -m comment --comment "ACME" 2>/dev/null
ip6tables -D input_rule -p tcp --dport 80 -j ACCEPT -m comment --comment "ACME" 2>/dev/null
- if [ -e /etc/init.d/uhttpd ] && [ -n "$UHTTPD_LISTEN_HTTP" ]; then
- uci set uhttpd.main.listen_http="$UHTTPD_LISTEN_HTTP"
- uci commit uhttpd
+ if [ -e /etc/init.d/uhttpd ] && ( [ -n "$UHTTPD_LISTEN_HTTP" ] || [ $UPDATE_UHTTPD -eq 1 ] ); then
+ if [ -n "$UHTTPD_LISTEN_HTTP" ]; then
+ uci set uhttpd.main.listen_http="$UHTTPD_LISTEN_HTTP"
+ uci commit uhttpd
+ UHTTPD_LISTEN_HTTP=
+ fi
/etc/init.d/uhttpd reload
- UHTTPD_LISTEN_HTTP=
+ fi
+
+ if [ -e /etc/init.d/nginx ] && ( [ "$NGINX_WEBSERVER" -eq 1 ] || [ $UPDATE_NGINX -eq 1 ] ); then
+ NGINX_WEBSERVER=0
+ /etc/init.d/nginx restart
fi
}
local enabled
local use_staging
local update_uhttpd
+ local update_nginx
local keylength
local domains
local main_domain
config_get_bool enabled "$section" enabled 0
config_get_bool use_staging "$section" use_staging
config_get_bool update_uhttpd "$section" update_uhttpd
+ config_get_bool update_nginx "$section" update_nginx
config_get domains "$section" domains
config_get keylength "$section" keylength
config_get webroot "$section" webroot
config_get dns "$section" dns
+ UPDATE_NGINX=$update_nginx
+ UPDATE_UHTTPD=$update_uhttpd
+
[ "$enabled" -eq "1" ] || return
[ "$DEBUG" -eq "1" ] && acme_args="$acme_args --debug"
acme_args="$acme_args --dns $dns"
elif [ -z "$webroot" ]; then
log "Using standalone mode"
- acme_args="$acme_args --standalone"
+ acme_args="$acme_args --standalone --listen-v6"
else
if [ ! -d "$webroot" ]; then
err "$main_domain: Webroot dir '$webroot' does not exist!"
err "Restoring staging certificate"
mv "$STATE_DIR/${main_domain}.staging" "$STATE_DIR/${main_domain}"
fi
+ post_checks
return 1
fi
- if [ "$update_uhttpd" -eq "1" ]; then
+ if [ -e /etc/init.d/uhttpd ] && [ "$update_uhttpd" -eq "1" ]; then
uci set uhttpd.main.key="$STATE_DIR/${main_domain}/${main_domain}.key"
uci set uhttpd.main.cert="$STATE_DIR/${main_domain}/fullchain.cer"
# commit and reload is in post_checks
fi
+ if [ -e /etc/init.d/nginx ] && [ "$update_nginx" -eq "1" ]; then
+ sed -i "s#ssl_certificate\ .*#ssl_certificate $STATE_DIR/${main_domain}/fullchain.cer;#g" /etc/nginx/nginx.conf
+ sed -i "s#ssl_certificate_key\ .*#ssl_certificate_key $STATE_DIR/${main_domain}/${main_domain}.key;#g" /etc/nginx/nginx.conf
+ # commit and reload is in post_checks
+ fi
+
post_checks
}
include $(TOPDIR)/rules.mk
PKG_NAME:=adblock
-PKG_VERSION:=3.5.4
-PKG_RELEASE:=2
+PKG_VERSION:=3.5.5
+PKG_RELEASE:=3
PKG_LICENSE:=GPL-3.0+
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
* => infrequent updates, approx. 15.000 entries
* [winspy](https://github.com/crazy-max/WindowsSpyBlocker)
* => infrequent updates, approx. 120 entries
+ * [youtube](https://api.hackertarget.com/hostsearch/?q=googlevideo.com)
+ * => dynamic request API to filter "random" youtube ad domains (experimental!), approx. 150 entries
* [yoyo](http://pgl.yoyo.org/adservers)
* => weekly updates, approx. 2.500 entries (enabled by default)
* [zeus tracker](https://zeustracker.abuse.ch)
* optional: add new adblock sources on your own, see example below
## Prerequisites
-* [OpenWrt](https://openwrt.org), tested with the stable release series (17.01.x) and with the latest OpenWrt snapshot
+* [OpenWrt](https://openwrt.org), tested with the stable release series (18.06) and with the latest snapshot
* a usual setup with an enabled dns backend at minimum - dump AP modes without a working dns backend are _not_ supported
* a download utility:
* to support all blocklist sources a full version (with ssl support) of 'wget', 'uclient-fetch' with one of the 'libustream-*' ssl libraries, 'aria2c' or 'curl' is required
* control the adblock service manually with _/etc/init.d/adblock_ start/stop/restart/reload/suspend/resume/status or use the LuCI frontend
## LuCI adblock companion package
-* for easy management of the various blocklist sources and all other adblock options you should use the provided LuCI frontend
+* for easy management of the various blocklist sources and adblock runtime options you should use the provided LuCI frontend
* install 'luci-app-adblock' (_opkg install luci-app-adblock_)
* the application is located in LuCI under 'Services' menu
* adb\_forcedns => force dns requests to local resolver (bool/default: '0', disabled)
* adb\_forcesrt => force overall sort on low memory devices with less than 64 MB RAM (bool/default: '0', disabled)
* adb\_backup_mode => do not automatically update blocklists during startup, use backups instead (bool/default: '0', disabled)
- * adb\maxqueue => size of the download queue to handle downloads & list processing in parallel (int/default: '4')
+ * adb\_maxqueue => size of the download queue to handle downloads & list processing in parallel (int/default: '4')
* adb\_jail => builds an additional 'Jail' list (/tmp/adb_list.jail) to block access to all domains except those listed in the whitelist file (bool/default: '0', disabled)
* adb\_dnsflush => flush DNS cache after adblock processing, i.e. enable the old restart behavior (bool/default: '0', disabled)
* adb\_notify => send notification emails in case of a processing error or if the overall domain count is ≤ 0 (bool/default: '0', disabled)
/etc/init.d/adblock status
::: adblock runtime information
+ adblock_status : enabled
- + adblock_version : 3.5.0
- + overall_domains : 102324 (normal mode)
- + fetch_utility : /usr/bin/wget (built-in)
- + dns_backend : kresd (/etc/kresd)
- + last_rundate : 30.01.2018 21:24:11
- + system_release : Turris Omnia, OpenWrt omnia 15.05/3.9.4
+ + adblock_version : 3.5.5
+ + overall_domains : 97199 (backup mode)
+ + fetch_utility : /bin/uclient-fetch (libustream-ssl)
+ + dns_backend : unbound (/var/lib/unbound)
+ + last_rundate : 01.09.2018 07:09:16
+ + system_release : PC Engines APU, OpenWrt SNAPSHOT r7986-dc9388ac55
</code></pre>
**cronjob for a regular block list update (/etc/crontabs/root):**
config source 'adaway'
option adb_src 'https://adaway.org/hosts.txt'
- option adb_src_rset '/^127\.0\.0\.1[[:space:]]+([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
+ option adb_src_rset '/^127\.0\.0\.1[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
option adb_src_desc 'focus on mobile ads, infrequent updates, approx. 400 entries'
option enabled '1'
config source 'adguard'
option adb_src 'https://filters.adtidy.org/windows/filters/15.txt'
- option adb_src_rset 'BEGIN{FS=\"[/|^|\r]\"}/^\|\|([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([\/\^\r]|$)/{print tolower(\$3)}'
+ option adb_src_rset 'BEGIN{FS=\"[/|^|\r]\"}/^\|\|([[:alnum:]_-]+\.)+[[:alpha:]]+[\/\^\r]+$/{print tolower(\$3)}'
option adb_src_desc 'combined adguard dns filter list, frequent updates, approx. 17.000 entries'
option enabled '0'
config source 'bitcoin'
option adb_src 'https://raw.githubusercontent.com/hoshsadiq/adblock-nocoin-list/master/hosts.txt'
- option adb_src_rset '/^0\.0\.0\.0[[:space:]]+([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
+ option adb_src_rset '/^0\.0\.0\.0[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
option adb_src_desc 'focus on malicious bitcoin mining sites, infrequent updates, approx. 80 entries'
option enabled '0'
config source 'blacklist'
option adb_src '/etc/adblock/adblock.blacklist'
- option adb_src_rset '/^([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
+ option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
option adb_src_desc 'static local domain blacklist, always deny these domains'
option enabled '1'
config source 'disconnect'
option adb_src 'https://s3.amazonaws.com/lists.disconnect.me/simple_malvertising.txt'
- option adb_src_rset '/^([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
+ option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
option adb_src_desc 'mozilla driven blocklist, numerous updates on the same day, approx. 4.700 entries'
option enabled '1'
config source 'dshield'
option adb_src 'https://www.dshield.org/feeds/suspiciousdomains_Low.txt'
- option adb_src_rset '/^([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
+ option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
option adb_src_desc 'generic blocklist, daily updates, approx. 3.500 entries'
option enabled '0'
config source 'feodo'
option adb_src 'https://feodotracker.abuse.ch/blocklist/?download=domainblocklist'
- option adb_src_rset '/^([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
+ option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
option adb_src_desc 'focus on feodo botnet, daily updates, approx. 0-10 entries'
option enabled '0'
config source 'hphosts'
option adb_src 'https://hosts-file.net/ad_servers.txt'
- option adb_src_rset '/^127\.0\.0\.1[[:space:]]+([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|\$)+/{print tolower(\$2)}'
+ option adb_src_rset '/^127\.0\.0\.1[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|\$)+/{print tolower(\$2)}'
option adb_src_desc 'broad blocklist, monthly updates, approx. 19.200 entries'
option enabled '0'
config source 'malware'
option adb_src 'https://mirror.espoch.edu.ec/malwaredomains/justdomains'
- option adb_src_rset '/^([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
+ option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
option adb_src_desc 'broad blocklist, daily updates, approx. 18.300 entries'
option enabled '0'
config source 'malwarelist'
option adb_src 'http://www.malwaredomainlist.com/hostslist/hosts.txt'
- option adb_src_rset '/^127\.0\.0\.1[[:space:]]+([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
+ option adb_src_rset '/^127\.0\.0\.1[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
option adb_src_desc 'focus on malware, daily updates, approx. 1.200 entries'
option enabled '0'
config source 'openphish'
option adb_src 'https://openphish.com/feed.txt'
- option adb_src_rset 'BEGIN{FS=\"/\"}/^http[s]?:\/\/([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+(\/|$)/{print tolower(\$3)}'
+ option adb_src_rset 'BEGIN{FS=\"/\"}/^http[s]?:\/\/([[:alnum:]_-]+\.)+[[:alpha:]]+(\/|$)/{print tolower(\$3)}'
option adb_src_desc 'focus on phishing, numerous updates on the same day, approx. 2.400 entries'
option enabled '0'
config source 'ransomware'
option adb_src 'https://ransomwaretracker.abuse.ch/downloads/RW_DOMBL.txt'
- option adb_src_rset '/^([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
+ option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
option adb_src_desc 'focus on ransomware by abuse.ch, numerous updates on the same day, approx. 1900 entries'
option enabled '0'
config source 'reg_cn'
option adb_src 'https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt'
- option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
+ option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([[:alnum:]_-]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
option adb_src_desc 'focus on chinese ads plus generic easylist additions, daily updates, approx. 11.700 entries'
option enabled '0'
config source 'reg_cz'
option adb_src 'https://raw.githubusercontent.com/qxstyles/turris-hole-czech-block-list/master/turris-hole-czech-block-list'
- option adb_src_rset '/^([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
+ option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
option adb_src_desc 'focus on czech ads maintained by Turris Omnia Users, infrequent updates, approx. 100 entries'
option enabled '0'
config source 'reg_de'
option adb_src 'https://easylist-downloads.adblockplus.org/easylistgermany+easylist.txt'
- option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
+ option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([[:alnum:]_-]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
option adb_src_desc 'focus on german ads plus generic easylist additions, daily updates, approx. 9.200 entries'
option enabled '0'
config source 'reg_id'
option adb_src 'https://easylist-downloads.adblockplus.org/abpindo+easylist.txt'
- option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
+ option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([[:alnum:]_-]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
option adb_src_desc 'focus on indonesian ads plus generic easylist additions, weekly updates, approx. 9.600 entries'
option enabled '0'
config source 'reg_nl'
option adb_src 'https://easylist-downloads.adblockplus.org/easylistdutch+easylist.txt'
- option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
+ option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([[:alnum:]_-]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
option adb_src_desc 'focus on dutch ads plus generic easylist additions, weekly updates, approx. 9.400 entries'
option enabled '0'
config source 'reg_pl'
option adb_src 'http://adblocklist.org/adblock-pxf-polish.txt'
- option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
+ option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([[:alnum:]_-]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
option adb_src_desc 'focus on polish ads, daily updates, approx. 90 entries'
option enabled '0'
config source 'reg_ro'
option adb_src 'https://easylist-downloads.adblockplus.org/rolist+easylist.txt'
- option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
+ option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([[:alnum:]_-]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
option adb_src_desc 'focus on romanian ads plus generic easylist additions, weekly updates, approx. 9.400 entries'
option enabled '0'
config source 'reg_ru'
option adb_src 'https://easylist-downloads.adblockplus.org/ruadlist+easylist.txt'
- option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
+ option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([[:alnum:]_-]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
option adb_src_desc 'focus on russian ads plus generic easylist additions, weekly updates, approx. 14.500 entries'
option enabled '0'
config source 'shalla'
option adb_src 'http://www.shallalist.de/Downloads/shallalist.tar.gz'
- option adb_src_rset '/^([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
+ option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
option adb_src_desc 'huge blocklist archive subdivided in different categories, daily updates. Check http://www.shallalist.de/categories.html for more categories'
list adb_src_cat 'adv'
list adb_src_cat 'costtraps'
config source 'spam404'
option adb_src 'https://raw.githubusercontent.com/Dawsey21/Lists/master/main-blacklist.txt'
- option adb_src_rset '/^([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)+/{print tolower(\$1)}'
+ option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)+/{print tolower(\$1)}'
option adb_src_desc 'generic blocklist, infrequent updates, approx. 6.000 entries'
option enabled '0'
config source 'sysctl'
option adb_src 'http://sysctl.org/cameleon/hosts'
- option adb_src_rset '/^127\.0\.0\.1[[:space:]]+([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
+ option adb_src_rset '/^127\.0\.0\.1[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
option adb_src_desc 'broad blocklist, weekly updates, approx. 16.500 entries'
option enabled '0'
config source 'urlhaus'
option adb_src 'https://urlhaus.abuse.ch/downloads/rpz'
- option adb_src_rset '/^([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)+/{print tolower(\$1)}'
+ option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)+/{print tolower(\$1)}'
option adb_src_desc 'urlhaus RPZ domains by abuse.ch, numerous updates on the same day, approx. 3.500 entries'
option enabled '0'
config source 'ut_capitole'
option adb_src 'https://dsi.ut-capitole.fr/blacklists/download/blacklists.tar.gz'
- option adb_src_rset '/^([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
+ option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
option adb_src_desc 'huge blocklist archive subdivided in different categories, daily updates. Check https://dsi.ut-capitole.fr/blacklists/index_en.php for more categories'
+ list adb_src_cat 'publicite'
list adb_src_cat 'cryptojacking'
list adb_src_cat 'ddos'
list adb_src_cat 'malware'
config source 'whocares'
option adb_src 'http://someonewhocares.org/hosts/hosts'
- option adb_src_rset '/^127\.0\.0\.1[[:space:]]+([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
+ option adb_src_rset '/^127\.0\.0\.1[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
option adb_src_desc 'broad blocklist, weekly updates, approx. 10.000 entries'
option enabled '0'
config source 'winspy'
option adb_src 'https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/spy.txt'
- option adb_src_rset '/^0\.0\.0\.0[[:space:]]+([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
+ option adb_src_rset '/^0\.0\.0\.0[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
option adb_src_desc 'focus on windows spy & telemetry domains, infrequent updates, approx. 300 entries'
option enabled '0'
config source 'winhelp'
option adb_src 'http://winhelp2002.mvps.org/hosts.txt'
- option adb_src_rset '/^0\.0\.0\.0[[:space:]]+([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
+ option adb_src_rset '/^0\.0\.0\.0[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
option adb_src_desc 'broad blocklist, infrequent updates, approx. 13.000 entries'
option enabled '0'
+config source 'youtube'
+ option adb_src 'https://api.hackertarget.com/hostsearch/?q=googlevideo.com'
+ option adb_src_rset 'BEGIN{FS=\",\"}/^(r[0-9]+\.){1,1}([[:alnum:]_-]+\.)+[[:alpha:]]+/{sub(/\./,\"---\");print tolower(\$1)}'
+ option adb_src_desc 'focus on youtube ad-related subdomains, dynamic request API, approx. 150 entries'
+ option enabled '0'
+
config source 'yoyo'
option adb_src 'https://pgl.yoyo.org/adservers/serverlist.php?hostformat=nohtml&showintro=0&mimetype=plaintext'
- option adb_src_rset '/^([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
+ option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
option adb_src_desc 'focus on ad related domains, weekly updates, approx. 2.400 entries'
option enabled '1'
config source 'zeus'
option adb_src 'https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist'
- option adb_src_rset '/^([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
+ option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
option adb_src_desc 'focus on zeus botnet by abuse.ch, daily updates, approx. 400 entries'
option enabled '0'
-
boot()
{
- adb_boot=1
- rc_procd start_service
+ adb_boot=1
+ rc_procd start_service
}
start_service()
{
- if [ $("${adb_init}" enabled; printf "%u" ${?}) -eq 0 ]
- then
- if [ -n "${adb_boot}" ]
- then
- local trigger="$(uci_get adblock global adb_trigger)"
- if [ "${trigger}" != "timed" ]
- then
- return 0
- fi
- fi
- local nice="$(uci_get adblock extra adb_nice)"
- procd_open_instance "adblock"
- procd_set_param command "${adb_script}" "${@}"
- procd_set_param pidfile "${adb_pidfile}"
- procd_set_param nice ${nice:-0}
- procd_set_param stdout 1
- procd_set_param stderr 1
- procd_close_instance
- fi
+ if [ $("${adb_init}" enabled; printf "%u" ${?}) -eq 0 ]
+ then
+ if [ -n "${adb_boot}" ]
+ then
+ local trigger="$(uci_get adblock global adb_trigger)"
+ if [ "${trigger}" != "timed" ]
+ then
+ return 0
+ fi
+ fi
+ local nice="$(uci_get adblock extra adb_nice)"
+ procd_open_instance "adblock"
+ procd_set_param command "${adb_script}" "${@}"
+ procd_set_param pidfile "${adb_pidfile}"
+ procd_set_param nice ${nice:-0}
+ procd_set_param stdout 1
+ procd_set_param stderr 1
+ procd_close_instance
+ fi
}
reload_service()
{
- rc_procd start_service reload
+ rc_procd start_service reload
}
stop_service()
{
- rc_procd "${adb_script}" stop
- rc_procd start_service
+ rc_procd "${adb_script}" stop
+ rc_procd start_service
}
restart()
{
- rc_procd start_service restart
+ rc_procd start_service restart
}
suspend()
{
- [ -s "${adb_pidfile}" ] && return 1
- rc_procd "${adb_script}" suspend
+ [ -s "${adb_pidfile}" ] && return 1
+ rc_procd "${adb_script}" suspend
}
resume()
{
- [ -s "${adb_pidfile}" ] && return 1
- rc_procd "${adb_script}" resume
+ [ -s "${adb_pidfile}" ] && return 1
+ rc_procd "${adb_script}" resume
}
query()
{
- [ -s "${adb_pidfile}" ] && return 1
- rc_procd "${adb_script}" query "${1}"
+ [ -s "${adb_pidfile}" ] && return 1
+ rc_procd "${adb_script}" query "${1}"
}
status()
{
- local key keylist value rtfile="$(uci_get adblock extra adb_rtfile)"
+ local key keylist value rtfile="$(uci_get adblock extra adb_rtfile)"
- rtfile="${rtfile:-"/tmp/adb_runtime.json"}"
- if [ -s "${rtfile}" ]
- then
- printf "%s\n" "::: adblock runtime information"
- json_load "$(cat "${rtfile}" 2>/dev/null)"
- json_select data
- json_get_keys keylist
- for key in ${keylist}
- do
- json_get_var value "${key}"
- printf " + %-15s : %s\n" "${key}" "${value}"
- done
- else
- printf "%s\n" "::: no adblock runtime information available"
- fi
+ rtfile="${rtfile:-"/tmp/adb_runtime.json"}"
+ if [ -s "${rtfile}" ]
+ then
+ printf "%s\n" "::: adblock runtime information"
+ json_load_file "${rtfile}"
+ json_select data
+ json_get_keys keylist
+ for key in ${keylist}
+ do
+ json_get_var value "${key}"
+ printf " + %-15s : %s\n" "${key}" "${value}"
+ done
+ else
+ printf "%s\n" "::: no adblock runtime information available"
+ fi
}
service_triggers()
{
- local trigger="$(uci_get adblock global adb_trigger)"
- local delay="$(uci_get adblock extra adb_triggerdelay)"
+ local trigger="$(uci_get adblock global adb_trigger)"
+ local delay="$(uci_get adblock extra adb_triggerdelay)"
- if [ "${trigger}" != "none" ] && [ "${trigger}" != "timed" ]
- then
- PROCD_RELOAD_DELAY=$((${delay:-2} * 1000))
- procd_add_interface_trigger "interface.*.up" "${trigger}" "${adb_init}" start
- fi
- procd_add_reload_trigger "adblock"
+ if [ "${trigger}" != "none" ] && [ "${trigger}" != "timed" ]
+ then
+ PROCD_RELOAD_DELAY=$((${delay:-2} * 1000))
+ procd_add_interface_trigger "interface.*.up" "${trigger}" "${adb_init}" start
+ fi
+ procd_add_reload_trigger "adblock"
}
LC_ALL=C
PATH="/usr/sbin:/usr/bin:/sbin:/bin"
-mail_ver="1.0.3"
+mail_ver="1.0.4"
mail_daemon="$(command -v msmtp)"
mail_profile="adb_notify"
#mail_debug="--debug"
# mail header & mail receiver check
#
+mail_receiver=""
mail_sender="no-reply@adblock"
-mail_receiver="!!!ChangeMe!!!"
mail_topic="${HOSTNAME}: adblock notification"
mail_head="From: ${mail_sender}\nTo: ${mail_receiver}\nSubject: ${mail_topic}\nReply-to: ${mail_sender}\nMime-Version: 1.0\nContent-Type: text/html\nContent-Disposition: inline\n\n"
-if [ "${mail_receiver}" = "!!!ChangeMe!!!" ]
+if [ -z "${mail_receiver}" ]
then
- logger -p "err" -t "adblock-notify-[${mail_ver}]" "please change the 'mail_receiver' in '/etc/adblock/adblock.notify'"
- exit ${mail_rc}
+ logger -p "err" -t "adblock-notify-${mail_ver}[${$}]" "please supply/customize the 'mail_receiver' in '/etc/adblock/adblock.notify'"
+ exit ${mail_rc}
fi
# mail daemon check
#
if [ ! -x "${mail_daemon}" ]
then
- mail_daemon="$(command -v sendmail)"
+ mail_daemon="$(command -v sendmail)"
fi
# info preparation
adb_info="$(/etc/init.d/adblock status 2>/dev/null)"
if [ -f "/var/log/messages" ]
then
- log_info="$(awk '/adblock-/{NR=1;max=79;if(length($0)>max+1)while($0){if(NR==1){print substr($0,1,max),"↵"} else {print " ",substr($0,1,max)}{$0=substr($0,max+1);NR=NR+1}}else print}' /var/log/messages)"
+ log_info="$(awk '/adblock-/{NR=1;max=79;if(length($0)>max+1)while($0){if(NR==1){print substr($0,1,max),"↵"} else {print " ",substr($0,1,max)}{$0=substr($0,max+1);NR=NR+1}}else print}' /var/log/messages)"
else
- log_info="$(logread -e "adblock-" | awk '{NR=1;max=79;if(length($0)>max+1)while($0){if(NR==1){print substr($0,1,max),"↵"} else {print " ",substr($0,1,max)}{$0=substr($0,max+1);NR=NR+1}}else print}')"
+ log_info="$(logread -e "adblock-" | awk '{NR=1;max=79;if(length($0)>max+1)while($0){if(NR==1){print substr($0,1,max),"↵"} else {print " ",substr($0,1,max)}{$0=substr($0,max+1);NR=NR+1}}else print}')"
fi
# mail body
#
if [ -x "${mail_daemon}" ]
then
- printf "%b" "${mail_head}${mail_text}" 2>/dev/null | "${mail_daemon}" ${mail_debug} -a "${mail_profile}" "${mail_receiver}" >/dev/null 2>&1
- mail_rc=${?}
- logger -p "info" -t "adblock-notify-[${mail_ver}]" "mail sent to '${mail_receiver}' with rc '${mail_rc}'"
+ printf "%b" "${mail_head}${mail_text}" 2>/dev/null | "${mail_daemon}" ${mail_debug} -a "${mail_profile}" "${mail_receiver}" >/dev/null 2>&1
+ mail_rc=${?}
+ logger -p "info" -t "adblock-notify-${mail_ver}[${$}]" "mail sent to '${mail_receiver}' with rc '${mail_rc}'"
else
- logger -p "err" -t "adblock-notify-[${mail_ver}]" "msmtp mail daemon not found"
+ logger -p "err" -t "adblock-notify-${mail_ver}[${$}]" "msmtp mail daemon not found"
fi
exit ${mail_rc}
#
LC_ALL=C
PATH="/usr/sbin:/usr/bin:/sbin:/bin"
-adb_ver="3.5.4-2"
+adb_ver="3.5.5-2"
adb_sysver="unknown"
adb_enabled=0
adb_debug=0
#
f_envload()
{
- local dns_up sys_call sys_desc sys_model sys_ver cnt=0
-
- # get system information
- #
- sys_call="$(ubus -S call system board 2>/dev/null)"
- if [ -n "${sys_call}" ]
- then
- sys_desc="$(printf '%s' "${sys_call}" | jsonfilter -e '@.release.description')"
- sys_model="$(printf '%s' "${sys_call}" | jsonfilter -e '@.model')"
- sys_ver="$(cat /etc/turris-version 2>/dev/null)"
- if [ -n "${sys_ver}" ]
- then
- sys_desc="${sys_desc}/${sys_ver}"
- fi
- adb_sysver="${sys_model}, ${sys_desc}"
- fi
-
- # check hash utility
- #
- if [ ! -x "${adb_hashutil}" ]
- then
- adb_hashutil="$(command -v md5sum)"
- fi
-
- # source in system libraries
- #
- if [ -r "/lib/functions.sh" ] && [ -r "/usr/share/libubox/jshn.sh" ]
- then
- . "/lib/functions.sh"
- . "/usr/share/libubox/jshn.sh"
- else
- f_log "err" "system libraries not found"
- fi
-
- # parse 'global' and 'extra' section by callback
- #
- config_cb()
- {
- local type="${1}"
- if [ "${type}" = "adblock" ]
- then
- option_cb()
- {
- local option="${1}"
- local value="${2}"
- eval "${option}=\"${value}\""
- }
- else
- reset_cb
- fi
- }
-
- # parse 'source' typed sections
- #
- parse_config()
- {
- local value opt section="${1}" options="enabled adb_src adb_src_rset adb_src_cat"
- eval "adb_sources=\"${adb_sources} ${section}\""
- for opt in ${options}
- do
- config_get value "${section}" "${opt}"
- if [ -n "${value}" ]
- then
- eval "${opt}_${section}=\"${value}\""
- fi
- done
- }
-
- # load adblock config
- #
- config_load adblock
- config_foreach parse_config source
-
- # check dns backend
- #
- case "${adb_dns}" in
- dnsmasq)
- adb_dnsinstance="${adb_dnsinstance:-"0"}"
- adb_dnsuser="${adb_dnsuser:-"dnsmasq"}"
- adb_dnsdir="${adb_dnsdir:-"/tmp"}"
- adb_dnsheader=""
- adb_dnsdeny="awk '{print \"server=/\"\$0\"/\"}'"
- adb_dnsallow="awk '{print \"server=/\"\$0\"/#\"}'"
- adb_dnshalt="server=/#/"
- ;;
- unbound)
- adb_dnsinstance="${adb_dnsinstance:-"0"}"
- adb_dnsuser="${adb_dnsuser:-"unbound"}"
- adb_dnsdir="${adb_dnsdir:-"/var/lib/unbound"}"
- adb_dnsheader=""
- adb_dnsdeny="awk '{print \"local-zone: \042\"\$0\"\042 static\"}'"
- adb_dnsallow="awk '{print \"local-zone: \042\"\$0\"\042 transparent\"}'"
- adb_dnshalt="local-zone: \".\" static"
- ;;
- named)
- adb_dnsinstance="${adb_dnsinstance:-"0"}"
- adb_dnsuser="${adb_dnsuser:-"bind"}"
- adb_dnsdir="${adb_dnsdir:-"/var/lib/bind"}"
- adb_dnsheader="\$TTL 2h"$'\n'"@ IN SOA localhost. root.localhost. (1 6h 1h 1w 2h)"$'\n'" IN NS localhost."
- adb_dnsdeny="awk '{print \"\"\$0\" CNAME .\n*.\"\$0\" CNAME .\"}'"
- adb_dnsallow="awk '{print \"\"\$0\" CNAME rpz-passthru.\n*.\"\$0\" CNAME rpz-passthru.\"}'"
- adb_dnshalt="* CNAME ."
- ;;
- kresd)
- adb_dnsinstance="${adb_dnsinstance:-"0"}"
- adb_dnsuser="${adb_dnsuser:-"root"}"
- adb_dnsdir="${adb_dnsdir:-"/etc/kresd"}"
- adb_dnsheader="\$TTL 2h"$'\n'"@ IN SOA localhost. root.localhost. (1 6h 1h 1w 2h)"$'\n'" IN NS localhost."
- adb_dnsdeny="awk '{print \"\"\$0\" CNAME .\n*.\"\$0\" CNAME .\"}'"
- adb_dnsallow="awk '{print \"\"\$0\" CNAME rpz-passthru.\n*.\"\$0\" CNAME rpz-passthru.\"}'"
- adb_dnshalt="* CNAME ."
- ;;
- dnscrypt-proxy)
- adb_dnsinstance="${adb_dnsinstance:-"0"}"
- adb_dnsuser="${adb_dnsuser:-"nobody"}"
- adb_dnsdir="${adb_dnsdir:-"/tmp"}"
- adb_dnsheader=""
- adb_dnsdeny="awk '{print \$0}'"
- adb_dnsallow=""
- adb_dnshalt=""
- ;;
- esac
-
- # check adblock status
- #
- if [ ${adb_enabled} -eq 0 ]
- then
- f_extconf
- f_temp
- f_rmdns
- f_jsnup
- f_log "info" "adblock is currently disabled, please set adb_enabled to '1' to use this service"
- exit 0
- fi
-
- if [ -d "${adb_dnsdir}" ] && [ ! -f "${adb_dnsdir}/${adb_dnsfile}" ]
- then
- printf '%s\n' "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}"
- fi
-
- if [ "${adb_action}" = "start" ] && [ "${adb_trigger}" = "timed" ]
- then
- sleep ${adb_triggerdelay}
- fi
-
- while [ ${cnt} -le 30 ]
- do
- dns_up="$(ubus -S call service list "{\"name\":\"${adb_dns}\"}" 2>/dev/null | jsonfilter -l1 -e "@[\"${adb_dns}\"].instances.*.running" 2>/dev/null)"
- if [ "${dns_up}" = "true" ]
- then
- break
- fi
- sleep 1
- cnt=$((cnt+1))
- done
-
- if [ "${dns_up}" != "true" ] || [ -z "${adb_dns}" ] || [ ! -x "$(command -v ${adb_dns})" ]
- then
- f_log "err" "'${adb_dns}' not running or not executable"
- elif [ ! -d "${adb_dnsdir}" ]
- then
- f_log "err" "'${adb_dnsdir}' backend directory not found"
- fi
+ local dns_up sys_call sys_desc sys_model sys_ver cnt=0
+
+ # get system information
+ #
+ sys_call="$(ubus -S call system board 2>/dev/null)"
+ if [ -n "${sys_call}" ]
+ then
+ sys_desc="$(printf '%s' "${sys_call}" | jsonfilter -e '@.release.description')"
+ sys_model="$(printf '%s' "${sys_call}" | jsonfilter -e '@.model')"
+ sys_ver="$(cat /etc/turris-version 2>/dev/null)"
+ if [ -n "${sys_ver}" ]
+ then
+ sys_desc="${sys_desc}/${sys_ver}"
+ fi
+ adb_sysver="${sys_model}, ${sys_desc}"
+ fi
+
+ # check hash utility
+ #
+ if [ ! -x "${adb_hashutil}" ]
+ then
+ adb_hashutil="$(command -v md5sum)"
+ fi
+
+ # parse 'global' and 'extra' section by callback
+ #
+ config_cb()
+ {
+ local type="${1}"
+ if [ "${type}" = "adblock" ]
+ then
+ option_cb()
+ {
+ local option="${1}"
+ local value="${2}"
+ eval "${option}=\"${value}\""
+ }
+ else
+ reset_cb
+ fi
+ }
+
+ # parse 'source' typed sections
+ #
+ parse_config()
+ {
+ local value opt section="${1}" options="enabled adb_src adb_src_rset adb_src_cat"
+ eval "adb_sources=\"${adb_sources} ${section}\""
+ for opt in ${options}
+ do
+ config_get value "${section}" "${opt}"
+ if [ -n "${value}" ]
+ then
+ eval "${opt}_${section}=\"${value}\""
+ fi
+ done
+ }
+
+ # load adblock config
+ #
+ config_load adblock
+ config_foreach parse_config source
+
+ # check dns backend
+ #
+ case "${adb_dns}" in
+ dnsmasq)
+ adb_dnsinstance="${adb_dnsinstance:-"0"}"
+ adb_dnsuser="${adb_dnsuser:-"dnsmasq"}"
+ adb_dnsdir="${adb_dnsdir:-"/tmp"}"
+ adb_dnsheader=""
+ adb_dnsdeny="awk '{print \"server=/\"\$0\"/\"}'"
+ adb_dnsallow="awk '{print \"server=/\"\$0\"/#\"}'"
+ adb_dnshalt="server=/#/"
+ ;;
+ unbound)
+ adb_dnsinstance="${adb_dnsinstance:-"0"}"
+ adb_dnsuser="${adb_dnsuser:-"unbound"}"
+ adb_dnsdir="${adb_dnsdir:-"/var/lib/unbound"}"
+ adb_dnsheader=""
+ adb_dnsdeny="awk '{print \"local-zone: \042\"\$0\"\042 static\"}'"
+ adb_dnsallow="awk '{print \"local-zone: \042\"\$0\"\042 transparent\"}'"
+ adb_dnshalt="local-zone: \".\" static"
+ ;;
+ named)
+ adb_dnsinstance="${adb_dnsinstance:-"0"}"
+ adb_dnsuser="${adb_dnsuser:-"bind"}"
+ adb_dnsdir="${adb_dnsdir:-"/var/lib/bind"}"
+ adb_dnsheader="\$TTL 2h"$'\n'"@ IN SOA localhost. root.localhost. (1 6h 1h 1w 2h)"$'\n'" IN NS localhost."
+ adb_dnsdeny="awk '{print \"\"\$0\" CNAME .\n*.\"\$0\" CNAME .\"}'"
+ adb_dnsallow="awk '{print \"\"\$0\" CNAME rpz-passthru.\n*.\"\$0\" CNAME rpz-passthru.\"}'"
+ adb_dnshalt="* CNAME ."
+ ;;
+ kresd)
+ adb_dnsinstance="${adb_dnsinstance:-"0"}"
+ adb_dnsuser="${adb_dnsuser:-"root"}"
+ adb_dnsdir="${adb_dnsdir:-"/etc/kresd"}"
+ adb_dnsheader="\$TTL 2h"$'\n'"@ IN SOA localhost. root.localhost. (1 6h 1h 1w 2h)"$'\n'" IN NS localhost."
+ adb_dnsdeny="awk '{print \"\"\$0\" CNAME .\n*.\"\$0\" CNAME .\"}'"
+ adb_dnsallow="awk '{print \"\"\$0\" CNAME rpz-passthru.\n*.\"\$0\" CNAME rpz-passthru.\"}'"
+ adb_dnshalt="* CNAME ."
+ ;;
+ dnscrypt-proxy)
+ adb_dnsinstance="${adb_dnsinstance:-"0"}"
+ adb_dnsuser="${adb_dnsuser:-"nobody"}"
+ adb_dnsdir="${adb_dnsdir:-"/tmp"}"
+ adb_dnsheader=""
+ adb_dnsdeny="awk '{print \$0}'"
+ adb_dnsallow=""
+ adb_dnshalt=""
+ ;;
+ esac
+
+ # check adblock status
+ #
+ if [ ${adb_enabled} -eq 0 ]
+ then
+ f_extconf
+ f_temp
+ f_rmdns
+ f_jsnup "disabled"
+ f_log "info" "adblock is currently disabled, please set adb_enabled to '1' to use this service"
+ exit 0
+ fi
+
+ if [ -d "${adb_dnsdir}" ] && [ ! -f "${adb_dnsdir}/${adb_dnsfile}" ]
+ then
+ printf '%s\n' "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}"
+ fi
+
+ if [ "${adb_action}" = "start" ] && [ "${adb_trigger}" = "timed" ]
+ then
+ sleep ${adb_triggerdelay}
+ fi
+
+ while [ ${cnt} -le 30 ]
+ do
+ dns_up="$(ubus -S call service list "{\"name\":\"${adb_dns}\"}" 2>/dev/null | jsonfilter -l1 -e "@[\"${adb_dns}\"].instances.*.running" 2>/dev/null)"
+ if [ "${dns_up}" = "true" ]
+ then
+ break
+ fi
+ sleep 1
+ cnt=$((cnt+1))
+ done
+
+ if [ "${dns_up}" != "true" ] || [ -z "${adb_dns}" ] || [ ! -x "$(command -v ${adb_dns})" ]
+ then
+ f_log "err" "'${adb_dns}' not running or not executable"
+ elif [ ! -d "${adb_dnsdir}" ]
+ then
+ f_log "err" "'${adb_dnsdir}' backend directory not found"
+ fi
}
# check environment
#
f_envcheck()
{
- local ssl_lib
-
- # check external uci config files
- #
- f_extconf
-
- # check fetch utility
- #
- case "${adb_fetchutil}" in
- uclient-fetch)
- if [ -f "/lib/libustream-ssl.so" ]
- then
- adb_fetchparm="${adb_fetchparm:-"--timeout=10 --no-check-certificate -O"}"
- ssl_lib="libustream-ssl"
- else
- adb_fetchparm="${adb_fetchparm:-"--timeout=10 -O"}"
- fi
- ;;
- wget)
- adb_fetchparm="${adb_fetchparm:-"--no-cache --no-cookies --max-redirect=0 --timeout=10 --no-check-certificate -O"}"
- ssl_lib="built-in"
- ;;
- wget-nossl)
- adb_fetchparm="${adb_fetchparm:-"--no-cache --no-cookies --max-redirect=0 --timeout=10 -O"}"
- ;;
- busybox)
- adb_fetchparm="${adb_fetchparm:-"-O"}"
- ;;
- curl)
- adb_fetchparm="${adb_fetchparm:-"--connect-timeout 10 --insecure -o"}"
- ssl_lib="built-in"
- ;;
- aria2c)
- adb_fetchparm="${adb_fetchparm:-"--timeout=10 --allow-overwrite=true --auto-file-renaming=false --check-certificate=false -o"}"
- ssl_lib="built-in"
- ;;
- esac
- adb_fetchutil="$(command -v "${adb_fetchutil}")"
-
- if [ ! -x "${adb_fetchutil}" ] || [ -z "${adb_fetchutil}" ] || [ -z "${adb_fetchparm}" ]
- then
- f_log "err" "download utility not found, please install 'uclient-fetch' with 'libustream-mbedtls' or the full 'wget' package"
- fi
- adb_fetchinfo="${adb_fetchutil} (${ssl_lib:-"-"})"
-
- f_temp
- f_jsnup "running"
- f_log "info" "start adblock processing (${adb_action})"
+ local ssl_lib
+
+ # startup message
+ #
+ f_log "info" "adblock instance started ::: action: ${adb_action}, priority: ${adb_nice:-"0"}, pid: ${$}"
+ f_jsnup "running"
+
+ # check external uci config files
+ #
+ f_extconf
+
+ # check fetch utility
+ #
+ case "${adb_fetchutil}" in
+ uclient-fetch)
+ if [ -f "/lib/libustream-ssl.so" ]
+ then
+ adb_fetchparm="${adb_fetchparm:-"--timeout=10 --no-check-certificate -O"}"
+ ssl_lib="libustream-ssl"
+ else
+ adb_fetchparm="${adb_fetchparm:-"--timeout=10 -O"}"
+ fi
+ ;;
+ wget)
+ adb_fetchparm="${adb_fetchparm:-"--no-cache --no-cookies --max-redirect=0 --timeout=10 --no-check-certificate -O"}"
+ ssl_lib="built-in"
+ ;;
+ wget-nossl)
+ adb_fetchparm="${adb_fetchparm:-"--no-cache --no-cookies --max-redirect=0 --timeout=10 -O"}"
+ ;;
+ busybox)
+ adb_fetchparm="${adb_fetchparm:-"-O"}"
+ ;;
+ curl)
+ adb_fetchparm="${adb_fetchparm:-"--connect-timeout 10 --insecure -o"}"
+ ssl_lib="built-in"
+ ;;
+ aria2c)
+ adb_fetchparm="${adb_fetchparm:-"--timeout=10 --allow-overwrite=true --auto-file-renaming=false --check-certificate=false -o"}"
+ ssl_lib="built-in"
+ ;;
+ esac
+ adb_fetchutil="$(command -v "${adb_fetchutil}")"
+
+ if [ ! -x "${adb_fetchutil}" ] || [ -z "${adb_fetchutil}" ] || [ -z "${adb_fetchparm}" ]
+ then
+ f_log "err" "download utility not found, please install 'uclient-fetch' with 'libustream-mbedtls' or the full 'wget' package"
+ fi
+ adb_fetchinfo="${adb_fetchutil} (${ssl_lib:-"-"})"
+ f_temp
}
# create temporary files and directories
#
f_temp()
{
- if [ -z "${adb_tmpdir}" ]
- then
- adb_tmpdir="$(mktemp -p /tmp -d)"
- adb_tmpload="$(mktemp -p ${adb_tmpdir} -tu)"
- adb_tmpfile="$(mktemp -p ${adb_tmpdir} -tu)"
- fi
- if [ ! -s "${adb_pidfile}" ]
- then
- printf '%s' "${$}" > "${adb_pidfile}"
- fi
+ if [ -z "${adb_tmpdir}" ]
+ then
+ adb_tmpdir="$(mktemp -p /tmp -d)"
+ adb_tmpload="$(mktemp -p ${adb_tmpdir} -tu)"
+ adb_tmpfile="$(mktemp -p ${adb_tmpdir} -tu)"
+ fi
+ if [ ! -s "${adb_pidfile}" ]
+ then
+ printf '%s' "${$}" > "${adb_pidfile}"
+ fi
}
# remove temporary files and directories
#
f_rmtemp()
{
- if [ -d "${adb_tmpdir}" ]
- then
- rm -rf "${adb_tmpdir}"
- fi
- > "${adb_pidfile}"
+ if [ -d "${adb_tmpdir}" ]
+ then
+ rm -rf "${adb_tmpdir}"
+ fi
+ > "${adb_pidfile}"
}
# remove dns related files and directories
#
f_rmdns()
{
- if [ -n "${adb_dns}" ]
- then
- f_hash
- printf '%s\n' "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}"
- > "${adb_dnsdir}/.${adb_dnsfile}"
- > "${adb_rtfile}"
- rm -f "${adb_backupdir}/${adb_dnsprefix}"*.gz
- f_hash
- if [ ${?} -eq 1 ]
- then
- f_dnsup
- fi
- f_rmtemp
- fi
- f_log "debug" "f_rmdns::: dns: ${adb_dns}, dns_dir: ${adb_dnsdir}, dns_prefix: ${adb_dnsprefix}, dns_file: ${adb_dnsfile}, rt_file: ${adb_rtfile}, backup_dir: ${adb_backupdir}"
+ if [ -n "${adb_dns}" ]
+ then
+ f_hash
+ printf '%s\n' "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}"
+ > "${adb_dnsdir}/.${adb_dnsfile}"
+ > "${adb_rtfile}"
+ rm -f "${adb_backupdir}/${adb_dnsprefix}"*.gz
+ f_hash
+ if [ ${?} -eq 1 ]
+ then
+ f_dnsup
+ fi
+ f_rmtemp
+ fi
+ f_log "debug" "f_rmdns::: dns: ${adb_dns}, dns_dir: ${adb_dnsdir}, dns_prefix: ${adb_dnsprefix}, dns_file: ${adb_dnsfile}, rt_file: ${adb_rtfile}, backup_dir: ${adb_backupdir}"
}
# commit uci changes
#
f_uci()
{
- local change config="${1}"
-
- if [ -n "${config}" ]
- then
- change="$(uci -q changes "${config}" | awk '{ORS=" "; print $0}')"
- if [ -n "${change}" ]
- then
- uci -q commit "${config}"
- case "${config}" in
- firewall)
- /etc/init.d/firewall reload >/dev/null 2>&1
- ;;
- *)
- /etc/init.d/"${adb_dns}" reload >/dev/null 2>&1
- ;;
- esac
- fi
- fi
- f_log "debug" "f_uci ::: config: ${config}, change: ${change}"
+ local change config="${1}"
+
+ if [ -n "${config}" ]
+ then
+ change="$(uci -q changes "${config}" | awk '{ORS=" "; print $0}')"
+ if [ -n "${change}" ]
+ then
+ uci_commit "${config}"
+ case "${config}" in
+ firewall)
+ /etc/init.d/firewall reload >/dev/null 2>&1
+ ;;
+ *)
+ /etc/init.d/"${adb_dns}" reload >/dev/null 2>&1
+ ;;
+ esac
+ fi
+ fi
+ f_log "debug" "f_uci ::: config: ${config}, change: ${change}"
}
# list/overall count
#
f_count()
{
- local mode="${1}"
-
- adb_cnt=0
- if [ -s "${adb_dnsdir}/${adb_dnsfile}" ] && ([ -z "${mode}" ] || [ "${mode}" = "final" ])
- then
- adb_cnt="$(( $(wc -l 2>/dev/null < "${adb_dnsdir}/${adb_dnsfile}") - $(wc -l 2>/dev/null < "${adb_tmpdir}/tmp.add_whitelist") ))"
- if [ "${adb_dns}" = "named" ] || [ "${adb_dns}" = "kresd" ]
- then
- adb_cnt="$(( (${adb_cnt} - $(printf '%s' "${adb_dnsheader}" | grep -c "^")) / 2 ))"
- fi
- elif [ -s "${adb_tmpfile}" ]
- then
- adb_cnt="$(wc -l 2>/dev/null < "${adb_tmpfile}")"
- fi
+ local mode="${1}"
+
+ adb_cnt=0
+ if [ -s "${adb_dnsdir}/${adb_dnsfile}" ] && ([ -z "${mode}" ] || [ "${mode}" = "final" ])
+ then
+ adb_cnt="$(( $(wc -l 2>/dev/null < "${adb_dnsdir}/${adb_dnsfile}") - $(wc -l 2>/dev/null < "${adb_tmpdir}/tmp.add_whitelist") ))"
+ if [ "${adb_dns}" = "named" ] || [ "${adb_dns}" = "kresd" ]
+ then
+ adb_cnt="$(( (${adb_cnt} - $(printf '%s' "${adb_dnsheader}" | grep -c "^")) / 2 ))"
+ fi
+ elif [ -s "${adb_tmpfile}" ]
+ then
+ adb_cnt="$(wc -l 2>/dev/null < "${adb_tmpfile}")"
+ fi
}
# set external config options
#
f_extconf()
{
- local uci_config port port_list="53 853 5353"
-
- case "${adb_dns}" in
- dnsmasq)
- uci_config="dhcp"
- if [ ${adb_enabled} -eq 1 ] && [ -z "$(uci -q get dhcp.@dnsmasq[${adb_dnsinstance}].serversfile | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" ]
- then
- uci -q set dhcp.@dnsmasq[${adb_dnsinstance}].serversfile="${adb_dnsdir}/${adb_dnsfile}"
- elif [ ${adb_enabled} -eq 0 ] && [ -n "$(uci -q get dhcp.@dnsmasq[${adb_dnsinstance}].serversfile | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" ]
- then
- uci -q delete dhcp.@dnsmasq[${adb_dnsinstance}].serversfile
- fi
- ;;
- kresd)
- uci_config="resolver"
- if [ ${adb_enabled} -eq 1 ] && [ -z "$(uci -q get resolver.kresd.rpz_file | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" ]
- then
- uci -q add_list resolver.kresd.rpz_file="${adb_dnsdir}/${adb_dnsfile}"
- elif [ ${adb_enabled} -eq 0 ] && [ -n "$(uci -q get resolver.kresd.rpz_file | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" ]
- then
- uci -q del_list resolver.kresd.rpz_file="${adb_dnsdir}/${adb_dnsfile}"
- fi
- if [ ${adb_enabled} -eq 1 ] && [ ${adb_dnsflush} -eq 0 ] && [ "$(uci -q get resolver.kresd.keep_cache)" != "1" ]
- then
- uci -q set resolver.kresd.keep_cache="1"
- elif [ ${adb_enabled} -eq 0 ] || ([ ${adb_dnsflush} -eq 1 ] && [ "$(uci -q get resolver.kresd.keep_cache)" = "1" ])
- then
- uci -q set resolver.kresd.keep_cache="0"
- fi
- ;;
- esac
- f_uci "${uci_config}"
-
- uci_config="firewall"
- if [ ${adb_enabled} -eq 1 ] && [ ${adb_forcedns} -eq 1 ] && \
- [ -z "$(uci -q get firewall.adblock_dns_53)" ] && [ $(/etc/init.d/firewall enabled; printf '%u' ${?}) -eq 0 ]
- then
- for port in ${port_list}
- do
- uci_add firewall "redirect" "adblock_dns_${port}"
- uci_set firewall "adblock_dns_${port}" "name" "Adblock DNS, port ${port}"
- uci_set firewall "adblock_dns_${port}" "src" "lan"
- uci_set firewall "adblock_dns_${port}" "proto" "tcp udp"
- uci_set firewall "adblock_dns_${port}" "src_dport" "${port}"
- uci_set firewall "adblock_dns_${port}" "dest_port" "${port}"
- uci_set firewall "adblock_dns_${port}" "target" "DNAT"
- done
- elif [ -n "$(uci -q get firewall.adblock_dns_53)" ] && ([ ${adb_enabled} -eq 0 ] || [ ${adb_forcedns} -eq 0 ])
- then
- for port in ${port_list}
- do
- uci_remove firewall "adblock_dns_${port}"
- done
- fi
- f_uci "${uci_config}"
+ local uci_config port port_list="53 853 5353"
+
+ case "${adb_dns}" in
+ dnsmasq)
+ uci_config="dhcp"
+ if [ ${adb_enabled} -eq 1 ] && [ -z "$(uci_get dhcp "@dnsmasq[${adb_dnsinstance}]" serversfile | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" ]
+ then
+ uci_set dhcp "@dnsmasq[${adb_dnsinstance}]" serversfile "${adb_dnsdir}/${adb_dnsfile}"
+ elif [ ${adb_enabled} -eq 0 ] && [ -n "$(uci_get dhcp "@dnsmasq[${adb_dnsinstance}]" serversfile | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" ]
+ then
+ uci_remove dhcp "@dnsmasq[${adb_dnsinstance}]" serversfile
+ fi
+ ;;
+ kresd)
+ uci_config="resolver"
+ if [ ${adb_enabled} -eq 1 ] && [ -z "$(uci_get resolver kresd rpz_file | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" ]
+ then
+ uci -q add_list resolver.kresd.rpz_file="${adb_dnsdir}/${adb_dnsfile}"
+ elif [ ${adb_enabled} -eq 0 ] && [ -n "$(uci_get resolver kresd rpz_file | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" ]
+ then
+ uci -q del_list resolver.kresd.rpz_file="${adb_dnsdir}/${adb_dnsfile}"
+ fi
+ if [ ${adb_enabled} -eq 1 ] && [ ${adb_dnsflush} -eq 0 ] && [ "$(uci_get resolver kresd keep_cache)" != "1" ]
+ then
+ uci_set resolver kresd keep_cache "1"
+ elif [ ${adb_enabled} -eq 0 ] || ([ ${adb_dnsflush} -eq 1 ] && [ "$(uci_get resolver kresd keep_cache)" = "1" ])
+ then
+ uci_set resolver kresd keep_cache "0"
+ fi
+ ;;
+ esac
+ f_uci "${uci_config}"
+
+ uci_config="firewall"
+ if [ ${adb_enabled} -eq 1 ] && [ ${adb_forcedns} -eq 1 ] && \
+ [ -z "$(uci_get firewall adblock_dns_53)" ] && [ $(/etc/init.d/firewall enabled; printf '%u' ${?}) -eq 0 ]
+ then
+ for port in ${port_list}
+ do
+ uci_add firewall "redirect" "adblock_dns_${port}"
+ uci_set firewall "adblock_dns_${port}" "name" "Adblock DNS, port ${port}"
+ uci_set firewall "adblock_dns_${port}" "src" "lan"
+ uci_set firewall "adblock_dns_${port}" "proto" "tcp udp"
+ uci_set firewall "adblock_dns_${port}" "src_dport" "${port}"
+ uci_set firewall "adblock_dns_${port}" "dest_port" "${port}"
+ uci_set firewall "adblock_dns_${port}" "target" "DNAT"
+ done
+ elif [ -n "$(uci_get firewall adblock_dns_53)" ] && ([ ${adb_enabled} -eq 0 ] || [ ${adb_forcedns} -eq 0 ])
+ then
+ for port in ${port_list}
+ do
+ uci_remove firewall "adblock_dns_${port}"
+ done
+ fi
+ f_uci "${uci_config}"
}
# restart of the dns backend
#
f_dnsup()
{
- local dns_up cache_util cache_rc cnt=0
-
- if [ ${adb_dnsflush} -eq 0 ] && [ ${adb_enabled} -eq 1 ] && [ "${adb_rc}" -eq 0 ]
- then
- case "${adb_dns}" in
- dnsmasq)
- killall -q -HUP "${adb_dns}"
- cache_rc=${?}
- ;;
- unbound)
- cache_util="$(command -v unbound-control)"
- if [ -x "${cache_util}" ] && [ -d "${adb_tmpdir}" ] && [ -f "${adb_dnsdir}"/unbound.conf ]
- then
- "${cache_util}" -c "${adb_dnsdir}"/unbound.conf dump_cache > "${adb_tmpdir}"/adb_cache.dump 2>/dev/null
- fi
- "/etc/init.d/${adb_dns}" restart >/dev/null 2>&1
- ;;
- kresd)
- cache_util="keep_cache"
- "/etc/init.d/${adb_dns}" restart >/dev/null 2>&1
- cache_rc=${?}
- ;;
- named)
- cache_util="$(command -v rndc)"
- if [ -x "${cache_util}" ] && [ -f /etc/bind/rndc.conf ]
- then
- "${cache_util}" -c /etc/bind/rndc.conf reload >/dev/null 2>&1
- cache_rc=${?}
- else
- "/etc/init.d/${adb_dns}" restart >/dev/null 2>&1
- fi
- ;;
- *)
- "/etc/init.d/${adb_dns}" restart >/dev/null 2>&1
- ;;
- esac
- else
- "/etc/init.d/${adb_dns}" restart >/dev/null 2>&1
- fi
-
- adb_rc=1
- while [ ${cnt} -le 10 ]
- do
- dns_up="$(ubus -S call service list "{\"name\":\"${adb_dns}\"}" | jsonfilter -l1 -e "@[\"${adb_dns}\"].instances.*.running")"
- if [ "${dns_up}" = "true" ]
- then
- case "${adb_dns}" in
- unbound)
- cache_util="$(command -v unbound-control)"
- if [ -x "${cache_util}" ] && [ -d "${adb_tmpdir}" ] && [ -s "${adb_tmpdir}"/adb_cache.dump ]
- then
- while [ ${cnt} -le 10 ]
- do
- "${cache_util}" -c "${adb_dnsdir}"/unbound.conf load_cache < "${adb_tmpdir}"/adb_cache.dump >/dev/null 2>&1
- cache_rc=${?}
- if [ ${cache_rc} -eq 0 ]
- then
- break
- fi
- cnt=$((cnt+1))
- sleep 1
- done
- fi
- ;;
- esac
- adb_rc=0
- break
- fi
- cnt=$((cnt+1))
- sleep 1
- done
- f_log "debug" "f_dnsup::: cache_util: ${cache_util:-"-"}, cache_rc: ${cache_rc:-"-"}, cache_flush: ${adb_dnsflush}, cache_cnt: ${cnt}, rc: ${adb_rc}"
- return ${adb_rc}
+ local dns_up cache_util cache_rc cnt=0
+
+ if [ ${adb_dnsflush} -eq 0 ] && [ ${adb_enabled} -eq 1 ] && [ "${adb_rc}" -eq 0 ]
+ then
+ case "${adb_dns}" in
+ dnsmasq)
+ killall -q -HUP "${adb_dns}"
+ cache_rc=${?}
+ ;;
+ unbound)
+ cache_util="$(command -v unbound-control)"
+ if [ -x "${cache_util}" ] && [ -d "${adb_tmpdir}" ] && [ -f "${adb_dnsdir}"/unbound.conf ]
+ then
+ "${cache_util}" -c "${adb_dnsdir}"/unbound.conf dump_cache > "${adb_tmpdir}"/adb_cache.dump 2>/dev/null
+ fi
+ "/etc/init.d/${adb_dns}" restart >/dev/null 2>&1
+ ;;
+ kresd)
+ cache_util="keep_cache"
+ "/etc/init.d/${adb_dns}" restart >/dev/null 2>&1
+ cache_rc=${?}
+ ;;
+ named)
+ cache_util="$(command -v rndc)"
+ if [ -x "${cache_util}" ] && [ -f /etc/bind/rndc.conf ]
+ then
+ "${cache_util}" -c /etc/bind/rndc.conf reload >/dev/null 2>&1
+ cache_rc=${?}
+ else
+ "/etc/init.d/${adb_dns}" restart >/dev/null 2>&1
+ fi
+ ;;
+ *)
+ "/etc/init.d/${adb_dns}" restart >/dev/null 2>&1
+ ;;
+ esac
+ else
+ "/etc/init.d/${adb_dns}" restart >/dev/null 2>&1
+ fi
+
+ adb_rc=1
+ while [ ${cnt} -le 10 ]
+ do
+ dns_up="$(ubus -S call service list "{\"name\":\"${adb_dns}\"}" | jsonfilter -l1 -e "@[\"${adb_dns}\"].instances.*.running")"
+ if [ "${dns_up}" = "true" ]
+ then
+ case "${adb_dns}" in
+ unbound)
+ cache_util="$(command -v unbound-control)"
+ if [ -x "${cache_util}" ] && [ -d "${adb_tmpdir}" ] && [ -s "${adb_tmpdir}"/adb_cache.dump ]
+ then
+ while [ ${cnt} -le 10 ]
+ do
+ "${cache_util}" -c "${adb_dnsdir}"/unbound.conf load_cache < "${adb_tmpdir}"/adb_cache.dump >/dev/null 2>&1
+ cache_rc=${?}
+ if [ ${cache_rc} -eq 0 ]
+ then
+ break
+ fi
+ cnt=$((cnt+1))
+ sleep 1
+ done
+ fi
+ ;;
+ esac
+ adb_rc=0
+ break
+ fi
+ cnt=$((cnt+1))
+ sleep 1
+ done
+ f_log "debug" "f_dnsup::: cache_util: ${cache_util:-"-"}, cache_rc: ${cache_rc:-"-"}, cache_flush: ${adb_dnsflush}, cache_cnt: ${cnt}, rc: ${adb_rc}"
+ return ${adb_rc}
}
# backup/restore/remove blocklists
#
f_list()
{
- local file mode="${1}" in_rc="${adb_rc}"
-
- case "${mode}" in
- backup)
- if [ -d "${adb_backupdir}" ]
- then
- gzip -cf "${adb_tmpfile}" 2>/dev/null > "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz"
- adb_rc=${?}
- fi
- ;;
- restore)
- if [ -d "${adb_backupdir}" ] && [ -f "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz" ]
- then
- gunzip -cf "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz" 2>/dev/null > "${adb_tmpfile}"
- adb_rc=${?}
- fi
- ;;
- remove)
- if [ -d "${adb_backupdir}" ]
- then
- rm -f "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz"
- fi
- adb_rc=${?}
- ;;
- merge)
- for file in "${adb_tmpfile}".*
- do
- cat "${file}" 2>/dev/null >> "${adb_tmpdir}/${adb_dnsfile}"
- if [ ${?} -ne 0 ]
- then
- adb_rc=${?}
- break
- fi
- rm -f "${file}"
- done
- adb_tmpfile="${adb_tmpdir}/${adb_dnsfile}"
- ;;
- final)
- > "${adb_dnsdir}/${adb_dnsfile}"
-
- if [ -s "${adb_tmpdir}/tmp.add_whitelist" ]
- then
- cat "${adb_tmpdir}/tmp.add_whitelist" >> "${adb_dnsdir}/${adb_dnsfile}"
- fi
-
- if [ -s "${adb_tmpdir}/tmp.rem_whitelist" ]
- then
- grep -vf "${adb_tmpdir}/tmp.rem_whitelist" "${adb_tmpdir}/${adb_dnsfile}" | eval "${adb_dnsdeny}" >> "${adb_dnsdir}/${adb_dnsfile}"
- else
- eval "${adb_dnsdeny}" "${adb_tmpdir}/${adb_dnsfile}" >> "${adb_dnsdir}/${adb_dnsfile}"
- fi
-
- if [ ${?} -eq 0 ] && [ -n "${adb_dnsheader}" ]
- then
- printf '%s\n' "${adb_dnsheader}" | cat - "${adb_dnsdir}/${adb_dnsfile}" > "${adb_tmpdir}/${adb_dnsfile}"
- cat "${adb_tmpdir}/${adb_dnsfile}" > "${adb_dnsdir}/${adb_dnsfile}"
- fi
- adb_rc=${?}
- ;;
- esac
- f_count "${mode}"
- f_log "debug" "f_list ::: name: ${src_name:-"-"}, mode: ${mode}, cnt: ${adb_cnt}, in_rc: ${in_rc}, out_rc: ${adb_rc}"
+ local file mode="${1}" in_rc="${adb_rc}"
+
+ case "${mode}" in
+ backup)
+ if [ -d "${adb_backupdir}" ]
+ then
+ gzip -cf "${adb_tmpfile}" 2>/dev/null > "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz"
+ adb_rc=${?}
+ fi
+ ;;
+ restore)
+ if [ -d "${adb_backupdir}" ] && [ -f "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz" ]
+ then
+ gunzip -cf "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz" 2>/dev/null > "${adb_tmpfile}"
+ adb_rc=${?}
+ fi
+ ;;
+ remove)
+ if [ -d "${adb_backupdir}" ]
+ then
+ rm -f "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz"
+ fi
+ adb_rc=${?}
+ ;;
+ merge)
+ for file in "${adb_tmpfile}".*
+ do
+ cat "${file}" 2>/dev/null >> "${adb_tmpdir}/${adb_dnsfile}"
+ if [ ${?} -ne 0 ]
+ then
+ adb_rc=${?}
+ break
+ fi
+ rm -f "${file}"
+ done
+ adb_tmpfile="${adb_tmpdir}/${adb_dnsfile}"
+ ;;
+ final)
+ > "${adb_dnsdir}/${adb_dnsfile}"
+
+ if [ -s "${adb_tmpdir}/tmp.add_whitelist" ]
+ then
+ cat "${adb_tmpdir}/tmp.add_whitelist" >> "${adb_dnsdir}/${adb_dnsfile}"
+ fi
+
+ if [ -s "${adb_tmpdir}/tmp.rem_whitelist" ]
+ then
+ grep -vf "${adb_tmpdir}/tmp.rem_whitelist" "${adb_tmpdir}/${adb_dnsfile}" | eval "${adb_dnsdeny}" >> "${adb_dnsdir}/${adb_dnsfile}"
+ else
+ eval "${adb_dnsdeny}" "${adb_tmpdir}/${adb_dnsfile}" >> "${adb_dnsdir}/${adb_dnsfile}"
+ fi
+
+ if [ ${?} -eq 0 ] && [ -n "${adb_dnsheader}" ]
+ then
+ printf '%s\n' "${adb_dnsheader}" | cat - "${adb_dnsdir}/${adb_dnsfile}" > "${adb_tmpdir}/${adb_dnsfile}"
+ mv -f "${adb_tmpdir}/${adb_dnsfile}" "${adb_dnsdir}/${adb_dnsfile}"
+ fi
+ adb_rc=${?}
+ ;;
+ esac
+ f_count "${mode}"
+ f_log "debug" "f_list ::: name: ${src_name:-"-"}, mode: ${mode}, cnt: ${adb_cnt}, in_rc: ${in_rc}, out_rc: ${adb_rc}"
}
# top level domain compression
#
f_tld()
{
- local cnt cnt_srt cnt_tld source="${1}" temp="${1}.tld"
-
- cnt="$(wc -l 2>/dev/null < "${source}")"
- sort -u "${source}" > "${temp}"
- if [ ${?} -eq 0 ]
- then
- cnt_srt="$(wc -l 2>/dev/null < "${temp}")"
- awk -F "." '{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' "${temp}" > "${source}"
- if [ ${?} -eq 0 ]
- then
- sort "${source}" > "${temp}"
- if [ ${?} -eq 0 ]
- then
- awk '{if(NR==1){tld=$NF};while(getline){if($NF!~tld"\\."){print tld;tld=$NF}}print tld}' "${temp}" > "${source}"
- if [ ${?} -eq 0 ]
- then
- awk -F "." '{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' "${source}" > "${temp}"
- if [ ${?} -eq 0 ]
- then
- sort "${temp}" > "${source}"
- if [ ${?} -eq 0 ]
- then
- cnt_tld="$(wc -l 2>/dev/null < "${source}")"
- else
- cat "${temp}" > "${source}"
- fi
- fi
- else
- cat "${temp}" > "${source}"
- fi
- fi
- else
- cat "${temp}" > "${source}"
- fi
- fi
- rm -f "${temp}"
- f_log "debug" "f_tld ::: source: ${source}, cnt: ${cnt:-"-"}, cnt_srt: ${cnt_srt:-"-"}, cnt_tld: ${cnt_tld:-"-"}"
+ local cnt cnt_srt cnt_tld source="${1}" temp="${1}.tld"
+
+ cnt="$(wc -l 2>/dev/null < "${source}")"
+ awk 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' "${source}" > "${temp}"
+ if [ ${?} -eq 0 ]
+ then
+ sort -u "${temp}" > "${source}"
+ if [ ${?} -eq 0 ]
+ then
+ cnt_srt="$(wc -l 2>/dev/null < "${source}")"
+ awk '{if(NR==1){tld=$NF};while(getline){if($NF!~tld"\\."){print tld;tld=$NF}}print tld}' "${source}" > "${temp}"
+ if [ ${?} -eq 0 ]
+ then
+ awk 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' "${temp}" > "${source}"
+ if [ ${?} -eq 0 ]
+ then
+ cnt_tld="$(wc -l 2>/dev/null < "${source}")"
+ else
+ mv -f "${temp}" > "${source}"
+ fi
+ fi
+ else
+ mv -f "${temp}" "${source}"
+ fi
+ fi
+ f_log "debug" "f_tld ::: source: ${source}, cnt: ${cnt:-"-"}, cnt_srt: ${cnt_srt:-"-"}, cnt_tld: ${cnt_tld:-"-"}"
}
# blocklist hash compare
#
f_hash()
{
- local hash hash_rc=1
-
- if [ -x "${adb_hashutil}" ] && [ -f "${adb_dnsdir}/${adb_dnsfile}" ]
- then
- hash="$(${adb_hashutil} "${adb_dnsdir}/${adb_dnsfile}" 2>/dev/null | awk '{print $1}')"
- if [ -z "${adb_hashold}" ] && [ -n "${hash}" ]
- then
- adb_hashold="${hash}"
- elif [ -z "${adb_hashnew}" ] && [ -n "${hash}" ]
- then
- adb_hashnew="${hash}"
- fi
- if [ -n "${adb_hashold}" ] && [ -n "${adb_hashnew}" ]
- then
- if [ "${adb_hashold}" = "${adb_hashnew}" ]
- then
- hash_rc=0
- fi
- adb_hashold=""
- adb_hashnew=""
- fi
- fi
- f_log "debug" "f_hash ::: hash_util: ${adb_hashutil}, hash: ${hash}, out_rc: ${hash_rc}"
- return ${hash_rc}
+ local hash hash_rc=1
+
+ if [ -x "${adb_hashutil}" ] && [ -f "${adb_dnsdir}/${adb_dnsfile}" ]
+ then
+ hash="$(${adb_hashutil} "${adb_dnsdir}/${adb_dnsfile}" 2>/dev/null | awk '{print $1}')"
+ if [ -z "${adb_hashold}" ] && [ -n "${hash}" ]
+ then
+ adb_hashold="${hash}"
+ elif [ -z "${adb_hashnew}" ] && [ -n "${hash}" ]
+ then
+ adb_hashnew="${hash}"
+ fi
+ if [ -n "${adb_hashold}" ] && [ -n "${adb_hashnew}" ]
+ then
+ if [ "${adb_hashold}" = "${adb_hashnew}" ]
+ then
+ hash_rc=0
+ fi
+ adb_hashold=""
+ adb_hashnew=""
+ fi
+ fi
+ f_log "debug" "f_hash ::: hash_util: ${adb_hashutil}, hash: ${hash}, out_rc: ${hash_rc}"
+ return ${hash_rc}
}
# suspend/resume adblock processing
#
f_switch()
{
- local mode="${1}"
-
- if [ ! -s "${adb_dnsdir}/.${adb_dnsfile}" ] && [ "${mode}" = "suspend" ]
- then
- f_hash
- cat "${adb_dnsdir}/${adb_dnsfile}" > "${adb_dnsdir}/.${adb_dnsfile}"
- printf '%s\n' "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}"
- f_hash
- elif [ -s "${adb_dnsdir}/.${adb_dnsfile}" ] && [ "${mode}" = "resume" ]
- then
- f_hash
- cat "${adb_dnsdir}/.${adb_dnsfile}" > "${adb_dnsdir}/${adb_dnsfile}"
- > "${adb_dnsdir}/.${adb_dnsfile}"
- f_hash
- fi
- if [ ${?} -eq 1 ]
- then
- f_temp
- f_dnsup
- f_jsnup "${mode}"
- f_log "info" "${mode} adblock processing"
- f_rmtemp
- exit 0
- fi
+ local mode="${1}"
+
+ if [ ! -s "${adb_dnsdir}/.${adb_dnsfile}" ] && [ "${mode}" = "suspend" ]
+ then
+ f_hash
+ cat "${adb_dnsdir}/${adb_dnsfile}" > "${adb_dnsdir}/.${adb_dnsfile}"
+ printf '%s\n' "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}"
+ f_hash
+ elif [ -s "${adb_dnsdir}/.${adb_dnsfile}" ] && [ "${mode}" = "resume" ]
+ then
+ f_hash
+ cat "${adb_dnsdir}/.${adb_dnsfile}" > "${adb_dnsdir}/${adb_dnsfile}"
+ > "${adb_dnsdir}/.${adb_dnsfile}"
+ f_hash
+ fi
+ if [ ${?} -eq 1 ]
+ then
+ f_temp
+ f_dnsup
+ f_jsnup "${mode}"
+ f_log "info" "${mode} adblock processing"
+ f_rmtemp
+ exit 0
+ fi
}
# query blocklist for certain (sub-)domains
#
f_query()
{
- local search result prefix suffix field domain="${1}" tld="${1#*.}"
-
- if [ -z "${domain}" ] || [ "${domain}" = "${tld}" ]
- then
- printf '%s\n' "::: invalid domain input, please submit a single domain, e.g. 'doubleclick.net'"
- else
- case "${adb_dns}" in
- dnsmasq)
- prefix=".*[\/\.]"
- suffix="(\/)"
- field=2
- ;;
- unbound)
- prefix=".*[\"\.]"
- suffix="(static)"
- field=3
- ;;
- named)
- prefix="[^\*].*[\.]"
- suffix="( \.)"
- field=1
- ;;
- kresd)
- prefix="[^\*].*[\.]"
- suffix="( \.)"
- field=1
- ;;
- dnscrypt-proxy)
- prefix=".*[\.]"
- suffix=""
- field=1
- ;;
- esac
- while [ "${domain}" != "${tld}" ]
- do
- search="${domain//./\.}"
- result="$(awk -F '/|\"| ' "/^($search|${prefix}+${search}.*${suffix}$)/{i++;{printf(\" + %s\n\",\$${field})};if(i>9){printf(\" + %s\n\",\"[...]\");exit}}" "${adb_dnsdir}/${adb_dnsfile}")"
- printf '%s\n' "::: results for domain '${domain}'"
- printf '%s\n' "${result:-" - no match"}"
- domain="${tld}"
- tld="${domain#*.}"
- done
- fi
+ local search result prefix suffix field domain="${1}" tld="${1#*.}"
+
+ if [ -z "${domain}" ] || [ "${domain}" = "${tld}" ]
+ then
+ printf '%s\n' "::: invalid domain input, please submit a single domain, e.g. 'doubleclick.net'"
+ else
+ case "${adb_dns}" in
+ dnsmasq)
+ prefix=".*[\/\.]"
+ suffix="(\/)"
+ field=2
+ ;;
+ unbound)
+ prefix=".*[\"\.]"
+ suffix="(static)"
+ field=3
+ ;;
+ named)
+ prefix="[^\*].*[\.]"
+ suffix="( \.)"
+ field=1
+ ;;
+ kresd)
+ prefix="[^\*].*[\.]"
+ suffix="( \.)"
+ field=1
+ ;;
+ dnscrypt-proxy)
+ prefix=".*[\.]"
+ suffix=""
+ field=1
+ ;;
+ esac
+ while [ "${domain}" != "${tld}" ]
+ do
+ search="${domain//./\.}"
+ result="$(awk -F '/|\"| ' "/^($search|${prefix}+${search}.*${suffix}$)/{i++;{printf(\" + %s\n\",\$${field})};if(i>9){printf(\" + %s\n\",\"[...]\");exit}}" "${adb_dnsdir}/${adb_dnsfile}")"
+ printf '%s\n' "::: results for domain '${domain}'"
+ printf '%s\n' "${result:-" - no match"}"
+ domain="${tld}"
+ tld="${domain#*.}"
+ done
+ fi
}
# update runtime information
#
f_jsnup()
{
- local bg_pid rundate status="${1:-"enabled"}" mode="normal mode" no_mail=0
-
- if [ ${adb_rc} -gt 0 ]
- then
- status="error"
- rundate="$(/bin/date "+%d.%m.%Y %H:%M:%S")"
- fi
- if [ ${adb_enabled} -eq 0 ]
- then
- status="disabled"
- fi
- if [ "${status}" = "enabled" ]
- then
- rundate="$(/bin/date "+%d.%m.%Y %H:%M:%S")"
- fi
- if [ "${status}" = "suspend" ]
- then
- status="paused"
- fi
- if [ "${status}" = "resume" ]
- then
- no_mail=1
- status="enabled"
- fi
- if [ ${adb_backup_mode} -eq 1 ]
- then
- mode="backup mode"
- fi
-
- if [ -s "${adb_rtfile}" ]
- then
- json_load "$(cat "${adb_rtfile}" 2>/dev/null)"
- json_select data
-
- if [ -z "${adb_fetchinfo}" ] && [ -s "${adb_rtfile}" ]
- then
- json_get_var adb_fetchinfo "fetch_utility"
- fi
- if [ -z "${rundate}" ]
- then
- json_get_var rundate "last_rundate"
- fi
- if [ -z "${adb_cnt}" ]
- then
- json_get_var adb_cnt "overall_domains"
- adb_cnt="${adb_cnt%% *}"
- fi
- fi
-
- json_init
- json_add_object "data"
- json_add_string "adblock_status" "${status}"
- json_add_string "adblock_version" "${adb_ver}"
- json_add_string "overall_domains" "${adb_cnt:-0} (${mode})"
- json_add_string "fetch_utility" "${adb_fetchinfo:-"-"}"
- json_add_string "dns_backend" "${adb_dns} (${adb_dnsdir})"
- json_add_string "last_rundate" "${rundate:-"-"}"
- json_add_string "system_release" "${adb_sysver}"
- json_close_object
- json_dump > "${adb_rtfile}"
-
- if [ ${adb_notify} -eq 1 ] && [ ${no_mail} -eq 0 ] && [ -x /etc/adblock/adblock.notify ] && \
- ([ "${status}" = "error" ] || ([ "${status}" = "enabled" ] && [ ${adb_cnt} -le ${adb_notifycnt} ]))
- then
- (/etc/adblock/adblock.notify >/dev/null 2>&1) &
- bg_pid=${!}
- fi
- f_log "debug" "f_jsnup::: status: ${status}, mode: ${mode}, cnt: ${adb_cnt}, notify: ${adb_notify}, notify_cnt: ${adb_notifycnt}, notify_pid: ${bg_pid:-"-"}"
+ local run_time bg_pid status="${1:-"enabled"}" mode="normal mode" no_mail=0
+
+ if [ ${adb_rc} -gt 0 ]
+ then
+ status="error"
+ run_time="$(/bin/date "+%d.%m.%Y %H:%M:%S")"
+ fi
+ if [ "${status}" = "enabled" ]
+ then
+ run_time="$(/bin/date "+%d.%m.%Y %H:%M:%S")"
+ fi
+ if [ "${status}" = "suspend" ]
+ then
+ status="paused"
+ fi
+ if [ "${status}" = "resume" ]
+ then
+ no_mail=1
+ status="enabled"
+ fi
+ if [ ${adb_backup_mode} -eq 1 ]
+ then
+ mode="backup mode"
+ fi
+
+ if [ -z "${adb_fetchinfo}" ]
+ then
+ json_get_var adb_fetchinfo "fetch_utility"
+ fi
+ if [ -z "${adb_cnt}" ]
+ then
+ json_get_var adb_cnt "overall_domains"
+ adb_cnt="${adb_cnt%% *}"
+ fi
+ if [ -z "${run_time}" ]
+ then
+ json_get_var run_time "last_rundate"
+ fi
+ json_add_string "adblock_status" "${status}"
+ json_add_string "adblock_version" "${adb_ver}"
+ json_add_string "overall_domains" "${adb_cnt:-0} (${mode})"
+ json_add_string "fetch_utility" "${adb_fetchinfo:-"-"}"
+ json_add_string "dns_backend" "${adb_dns} (${adb_dnsdir})"
+ json_add_string "last_rundate" "${run_time:-"-"}"
+ json_add_string "system_release" "${adb_sysver}"
+ json_dump > "${adb_rtfile}"
+
+ if [ ${adb_notify} -eq 1 ] && [ ${no_mail} -eq 0 ] && [ -x /etc/adblock/adblock.notify ] && \
+ ([ "${status}" = "error" ] || ([ "${status}" = "enabled" ] && [ ${adb_cnt} -le ${adb_notifycnt} ]))
+ then
+ (/etc/adblock/adblock.notify >/dev/null 2>&1) &
+ bg_pid=${!}
+ fi
+ f_log "debug" "f_jsnup::: status: ${status}, mode: ${mode}, cnt: ${adb_cnt}, notify: ${adb_notify}, notify_cnt: ${adb_notifycnt}, notify_pid: ${bg_pid:-"-"}"
}
# write to syslog
#
f_log()
{
- local class="${1}" log_msg="${2}"
-
- if [ -n "${log_msg}" ] && ([ "${class}" != "debug" ] || [ ${adb_debug} -eq 1 ])
- then
- logger -p "${class}" -t "adblock-[${adb_ver}]" "${log_msg}"
- if [ "${class}" = "err" ]
- then
- f_rmdns
- f_jsnup
- logger -p "${class}" -t "adblock-[${adb_ver}]" "Please also check 'https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md'"
- exit 1
- fi
- fi
+ local class="${1}" log_msg="${2}"
+
+ if [ -n "${log_msg}" ] && ([ "${class}" != "debug" ] || [ ${adb_debug} -eq 1 ])
+ then
+ logger -p "${class}" -t "adblock-${adb_ver}[${$}]" "${log_msg}"
+ if [ "${class}" = "err" ]
+ then
+ f_rmdns
+ f_jsnup
+ logger -p "${class}" -t "adblock-${adb_ver}[${$}]" "Please also check 'https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md'"
+ exit 1
+ fi
+ fi
}
# main function for blocklist processing
#
f_main()
{
- local tmp_load tmp_file src_name src_rset src_url src_log src_arc src_cat cat list entry suffix mem_total mem_free enabled cnt=1
-
- mem_total="$(awk '/^MemTotal/ {print int($2/1000)}' "/proc/meminfo" 2>/dev/null)"
- mem_free="$(awk '/^MemFree/ {print int($2/1000)}' "/proc/meminfo" 2>/dev/null)"
- tmp_load="${adb_tmpload}"
- tmp_file="${adb_tmpfile}"
- > "${adb_dnsdir}/.${adb_dnsfile}"
- > "${adb_tmpdir}/tmp.raw_whitelist"
- > "${adb_tmpdir}/tmp.add_whitelist"
- > "${adb_tmpdir}/tmp.rem_whitelist"
- f_log "debug" "f_main ::: dns: ${adb_dns}, fetch_util: ${adb_fetchinfo}, backup: ${adb_backup}, backup_mode: ${adb_backup_mode}, dns_jail: ${adb_jail}, force_srt: ${adb_forcesrt}, force_dns: ${adb_forcedns}, mem_total: ${mem_total:-0}, mem_free: ${mem_free:-0}, max_queue: ${adb_maxqueue}"
-
- # prepare whitelist entries
- #
- if [ -s "${adb_whitelist}" ]
- then
- adb_whitelist_rset="/^([^([:space:]|\#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}"
- awk "${adb_whitelist_rset}" "${adb_whitelist}" > "${adb_tmpdir}/tmp.raw_whitelist"
- f_tld "${adb_tmpdir}/tmp.raw_whitelist"
-
- adb_whitelist_rset="/^([^([:space:]|\#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{gsub(\"\\\.\",\"\\\.\",\$1);print tolower(\"^\"\$1\"\\\|\\\.\"\$1)}"
- awk "${adb_whitelist_rset}" "${adb_tmpdir}/tmp.raw_whitelist" > "${adb_tmpdir}/tmp.rem_whitelist"
-
- if [ -n "${adb_dnsallow}" ]
- then
- eval "${adb_dnsallow}" "${adb_tmpdir}/tmp.raw_whitelist" > "${adb_tmpdir}/tmp.add_whitelist"
- fi
- fi
-
- # build 'dnsjail' list
- #
- if [ ${adb_jail} -eq 1 ]
- then
- cat "${adb_tmpdir}/tmp.add_whitelist" > "/tmp/${adb_dnsjail}"
- printf '%s\n' "${adb_dnshalt}" >> "/tmp/${adb_dnsjail}"
- if [ -n "${adb_dnsheader}" ]
- then
- printf '%s\n' "${adb_dnsheader}" | cat - "/tmp/${adb_dnsjail}" > "${adb_tmpdir}/tmp.dnsjail"
- cat "${adb_tmpdir}/tmp.dnsjail" > "/tmp/${adb_dnsjail}"
- fi
- fi
-
- # main loop
- #
- for src_name in ${adb_sources}
- do
- enabled="$(eval printf '%s' \"\${enabled_${src_name}\}\")"
- src_url="$(eval printf '%s' \"\${adb_src_${src_name}\}\")"
- src_rset="$(eval printf '%s' \"\${adb_src_rset_${src_name}\}\")"
- src_cat="$(eval printf '%s' \"\${adb_src_cat_${src_name}\}\")"
- adb_tmpload="${tmp_load}.${src_name}"
- adb_tmpfile="${tmp_file}.${src_name}"
-
- # basic pre-checks
- #
- f_log "debug" "f_main ::: name: ${src_name}, enabled: ${enabled}"
- if [ "${enabled}" != "1" ] || [ -z "${src_url}" ] || [ -z "${src_rset}" ]
- then
- f_list remove
- continue
- fi
-
- # backup mode
- #
- if [ ${adb_backup_mode} -eq 1 ] && [ "${adb_action}" = "start" ] && [ "${src_name}" != "blacklist" ]
- then
- f_list restore
- if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpfile}" ]
- then
- if ([ ${mem_total} -lt 64 ] || [ ${mem_free} -lt 40 ]) && [ ${adb_forcesrt} -eq 0 ]
- then
- f_tld "${adb_tmpfile}"
- fi
- continue
- fi
- fi
-
- # download queue processing
- #
- if [ "${src_name}" = "blacklist" ]
- then
- if [ -s "${src_url}" ]
- then
- (
- src_log="$(cat "${src_url}" > "${adb_tmpload}" 2>&1)"
- adb_rc=${?}
- if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpload}" ]
- then
- awk "${src_rset}" "${adb_tmpload}" 2>/dev/null > "${adb_tmpfile}"
- adb_rc=${?}
- if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpfile}" ]
- then
- rm -f "${adb_tmpload}"
- f_list download
- if ([ ${mem_total} -lt 64 ] || [ ${mem_free} -lt 40 ]) && [ ${adb_forcesrt} -eq 0 ]
- then
- f_tld "${adb_tmpfile}"
- fi
- fi
- else
- src_log="$(printf '%s' "${src_log}" | awk '{ORS=" ";print $0}')"
- f_log "debug" "f_main ::: name: ${src_name}, url: ${src_url}, rc: ${adb_rc}, log: ${src_log:-"-"}"
- fi
- ) &
- else
- continue
- fi
- elif [ -n "${src_cat}" ]
- then
- (
- src_arc="${adb_tmpdir}/${src_url##*/}"
- src_log="$("${adb_fetchutil}" ${adb_fetchparm} "${src_arc}" "${src_url}" 2>&1)"
- adb_rc=${?}
- if [ ${adb_rc} -eq 0 ] && [ -s "${src_arc}" ]
- then
- list="$(tar -tzf "${src_arc}")"
- suffix="$(eval printf '%s' \"\${adb_src_suffix_${src_name}:-\"domains\"\}\")"
- for cat in ${src_cat}
- do
- entry="$(printf '%s' "${list}" | grep -E "[\^/]+${cat}/${suffix}")"
- if [ -n "${entry}" ]
- then
- tar -xOzf "${src_arc}" "${entry}" >> "${adb_tmpload}"
- adb_rc=${?}
- if [ ${adb_rc} -ne 0 ]
- then
- break
- fi
- fi
- done
- else
- src_log="$(printf '%s' "${src_log}" | awk '{ORS=" ";print $0}')"
- f_log "debug" "f_main ::: name: ${src_name}, url: ${src_url}, rc: ${adb_rc}, log: ${src_log:-"-"}"
- fi
- if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpload}" ]
- then
- rm -f "${src_arc}"
- awk "${src_rset}" "${adb_tmpload}" 2>/dev/null > "${adb_tmpfile}"
- adb_rc=${?}
- if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpfile}" ]
- then
- rm -f "${adb_tmpload}"
- f_list download
- if [ ${adb_backup} -eq 1 ]
- then
- f_list backup
- fi
- if ([ ${mem_total} -lt 64 ] || [ ${mem_free} -lt 40 ]) && [ ${adb_forcesrt} -eq 0 ]
- then
- f_tld "${adb_tmpfile}"
- fi
- elif [ ${adb_backup} -eq 1 ]
- then
- f_list restore
- fi
- elif [ ${adb_backup} -eq 1 ]
- then
- f_list restore
- fi
- ) &
- else
- (
- src_log="$("${adb_fetchutil}" ${adb_fetchparm} "${adb_tmpload}" "${src_url}" 2>&1)"
- adb_rc=${?}
- if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpload}" ]
- then
- awk "${src_rset}" "${adb_tmpload}" 2>/dev/null > "${adb_tmpfile}"
- adb_rc=${?}
- if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpfile}" ]
- then
- rm -f "${adb_tmpload}"
- f_list download
- if [ ${adb_backup} -eq 1 ]
- then
- f_list backup
- fi
- if ([ ${mem_total} -lt 64 ] || [ ${mem_free} -lt 40 ]) && [ ${adb_forcesrt} -eq 0 ]
- then
- f_tld "${adb_tmpfile}"
- fi
- elif [ ${adb_backup} -eq 1 ]
- then
- f_list restore
- fi
- else
- src_log="$(printf '%s' "${src_log}" | awk '{ORS=" ";print $0}')"
- f_log "debug" "f_main ::: name: ${src_name}, url: ${src_url}, rc: ${adb_rc}, log: ${src_log:-"-"}"
- if [ ${adb_backup} -eq 1 ]
- then
- f_list restore
- fi
- fi
- ) &
- fi
- hold=$(( cnt % adb_maxqueue ))
- if [ ${hold} -eq 0 ]
- then
- wait
- fi
- cnt=$(( cnt + 1 ))
- done
-
- # list merge
- #
- wait
- src_name="overall"
- adb_tmpfile="${tmp_file}"
- f_list merge
-
- # overall sort and conditional dns restart
- #
- f_hash
- if [ -s "${adb_tmpdir}/${adb_dnsfile}" ]
- then
- if ([ ${mem_total} -ge 64 ] && [ ${mem_free} -ge 40 ]) || [ ${adb_forcesrt} -eq 1 ]
- then
- f_tld "${adb_tmpdir}/${adb_dnsfile}"
- fi
- f_list final
- else
- > "${adb_dnsdir}/${adb_dnsfile}"
- fi
- chown "${adb_dnsuser}" "${adb_dnsdir}/${adb_dnsfile}" 2>/dev/null
- f_hash
- if [ ${?} -eq 1 ]
- then
- f_dnsup
- fi
- f_jsnup
- if [ ${?} -eq 0 ]
- then
- f_log "info" "blocklist with overall ${adb_cnt} domains loaded successfully (${adb_sysver})"
- else
- f_log "err" "dns backend restart with active blocklist failed"
- fi
- f_rmtemp
- exit ${adb_rc}
+ local tmp_load tmp_file src_name src_rset src_url src_log src_arc src_cat cat list entry suffix mem_total mem_free enabled cnt=1
+
+ mem_total="$(awk '/^MemTotal/ {print int($2/1000)}' "/proc/meminfo" 2>/dev/null)"
+ mem_free="$(awk '/^MemFree/ {print int($2/1000)}' "/proc/meminfo" 2>/dev/null)"
+ tmp_load="${adb_tmpload}"
+ tmp_file="${adb_tmpfile}"
+ > "${adb_dnsdir}/.${adb_dnsfile}"
+ > "${adb_tmpdir}/tmp.raw_whitelist"
+ > "${adb_tmpdir}/tmp.add_whitelist"
+ > "${adb_tmpdir}/tmp.rem_whitelist"
+ f_log "debug" "f_main ::: dns: ${adb_dns}, fetch_util: ${adb_fetchinfo}, backup: ${adb_backup}, backup_mode: ${adb_backup_mode}, dns_jail: ${adb_jail}, force_srt: ${adb_forcesrt}, force_dns: ${adb_forcedns}, mem_total: ${mem_total:-0}, mem_free: ${mem_free:-0}, max_queue: ${adb_maxqueue}"
+
+ # prepare whitelist entries
+ #
+ if [ -s "${adb_whitelist}" ]
+ then
+ adb_whitelist_rset="/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}"
+ awk "${adb_whitelist_rset}" "${adb_whitelist}" > "${adb_tmpdir}/tmp.raw_whitelist"
+ f_tld "${adb_tmpdir}/tmp.raw_whitelist"
+
+ adb_whitelist_rset="/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{gsub(\"\\\.\",\"\\\.\",\$1);print tolower(\"^\"\$1\"\\\|\\\.\"\$1)}"
+ awk "${adb_whitelist_rset}" "${adb_tmpdir}/tmp.raw_whitelist" > "${adb_tmpdir}/tmp.rem_whitelist"
+
+ if [ -n "${adb_dnsallow}" ]
+ then
+ eval "${adb_dnsallow}" "${adb_tmpdir}/tmp.raw_whitelist" > "${adb_tmpdir}/tmp.add_whitelist"
+ fi
+ fi
+
+ # build 'dnsjail' list
+ #
+ if [ ${adb_jail} -eq 1 ]
+ then
+ cat "${adb_tmpdir}/tmp.add_whitelist" > "/tmp/${adb_dnsjail}"
+ printf '%s\n' "${adb_dnshalt}" >> "/tmp/${adb_dnsjail}"
+ if [ -n "${adb_dnsheader}" ]
+ then
+ printf '%s\n' "${adb_dnsheader}" | cat - "/tmp/${adb_dnsjail}" > "${adb_tmpdir}/tmp.dnsjail"
+ cat "${adb_tmpdir}/tmp.dnsjail" > "/tmp/${adb_dnsjail}"
+ fi
+ fi
+
+ # main loop
+ #
+ for src_name in ${adb_sources}
+ do
+ enabled="$(eval printf '%s' \"\${enabled_${src_name}\}\")"
+ src_url="$(eval printf '%s' \"\${adb_src_${src_name}\}\")"
+ src_rset="$(eval printf '%s' \"\${adb_src_rset_${src_name}\}\")"
+ src_cat="$(eval printf '%s' \"\${adb_src_cat_${src_name}\}\")"
+ adb_tmpload="${tmp_load}.${src_name}"
+ adb_tmpfile="${tmp_file}.${src_name}"
+
+ # basic pre-checks
+ #
+ f_log "debug" "f_main ::: name: ${src_name}, enabled: ${enabled}"
+ if [ "${enabled}" != "1" ] || [ -z "${src_url}" ] || [ -z "${src_rset}" ]
+ then
+ f_list remove
+ continue
+ fi
+
+ # backup mode
+ #
+ if [ ${adb_backup_mode} -eq 1 ] && [ "${adb_action}" = "start" ] && [ "${src_name}" != "blacklist" ]
+ then
+ f_list restore
+ if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpfile}" ]
+ then
+ if ([ ${mem_total} -lt 64 ] || [ ${mem_free} -lt 40 ]) && [ ${adb_forcesrt} -eq 0 ]
+ then
+ f_tld "${adb_tmpfile}"
+ fi
+ continue
+ fi
+ fi
+
+ # download queue processing
+ #
+ if [ "${src_name}" = "blacklist" ]
+ then
+ if [ -s "${src_url}" ]
+ then
+ (
+ src_log="$(cat "${src_url}" > "${adb_tmpload}" 2>&1)"
+ adb_rc=${?}
+ if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpload}" ]
+ then
+ awk "${src_rset}" "${adb_tmpload}" 2>/dev/null > "${adb_tmpfile}"
+ adb_rc=${?}
+ if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpfile}" ]
+ then
+ rm -f "${adb_tmpload}"
+ f_list download
+ if ([ ${mem_total} -lt 64 ] || [ ${mem_free} -lt 40 ]) && [ ${adb_forcesrt} -eq 0 ]
+ then
+ f_tld "${adb_tmpfile}"
+ fi
+ fi
+ else
+ src_log="$(printf '%s' "${src_log}" | awk '{ORS=" ";print $0}')"
+ f_log "debug" "f_main ::: name: ${src_name}, url: ${src_url}, rc: ${adb_rc}, log: ${src_log:-"-"}"
+ fi
+ ) &
+ else
+ continue
+ fi
+ elif [ -n "${src_cat}" ]
+ then
+ (
+ src_arc="${adb_tmpdir}/${src_url##*/}"
+ src_log="$("${adb_fetchutil}" ${adb_fetchparm} "${src_arc}" "${src_url}" 2>&1)"
+ adb_rc=${?}
+ if [ ${adb_rc} -eq 0 ] && [ -s "${src_arc}" ]
+ then
+ list="$(tar -tzf "${src_arc}")"
+ suffix="$(eval printf '%s' \"\${adb_src_suffix_${src_name}:-\"domains\"\}\")"
+ for cat in ${src_cat}
+ do
+ entry="$(printf '%s' "${list}" | grep -E "[\^/]+${cat}/${suffix}")"
+ if [ -n "${entry}" ]
+ then
+ tar -xOzf "${src_arc}" "${entry}" >> "${adb_tmpload}"
+ adb_rc=${?}
+ if [ ${adb_rc} -ne 0 ]
+ then
+ break
+ fi
+ fi
+ done
+ else
+ src_log="$(printf '%s' "${src_log}" | awk '{ORS=" ";print $0}')"
+ f_log "debug" "f_main ::: name: ${src_name}, url: ${src_url}, rc: ${adb_rc}, log: ${src_log:-"-"}"
+ fi
+ if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpload}" ]
+ then
+ rm -f "${src_arc}"
+ awk "${src_rset}" "${adb_tmpload}" 2>/dev/null > "${adb_tmpfile}"
+ adb_rc=${?}
+ if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpfile}" ]
+ then
+ rm -f "${adb_tmpload}"
+ f_list download
+ if [ ${adb_backup} -eq 1 ]
+ then
+ f_list backup
+ fi
+ if ([ ${mem_total} -lt 64 ] || [ ${mem_free} -lt 40 ]) && [ ${adb_forcesrt} -eq 0 ]
+ then
+ f_tld "${adb_tmpfile}"
+ fi
+ elif [ ${adb_backup} -eq 1 ]
+ then
+ f_list restore
+ fi
+ elif [ ${adb_backup} -eq 1 ]
+ then
+ f_list restore
+ fi
+ ) &
+ else
+ (
+ src_log="$("${adb_fetchutil}" ${adb_fetchparm} "${adb_tmpload}" "${src_url}" 2>&1)"
+ adb_rc=${?}
+ if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpload}" ]
+ then
+ awk "${src_rset}" "${adb_tmpload}" 2>/dev/null > "${adb_tmpfile}"
+ adb_rc=${?}
+ if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpfile}" ]
+ then
+ rm -f "${adb_tmpload}"
+ f_list download
+ if [ ${adb_backup} -eq 1 ]
+ then
+ f_list backup
+ fi
+ if ([ ${mem_total} -lt 64 ] || [ ${mem_free} -lt 40 ]) && [ ${adb_forcesrt} -eq 0 ]
+ then
+ f_tld "${adb_tmpfile}"
+ fi
+ elif [ ${adb_backup} -eq 1 ]
+ then
+ f_list restore
+ fi
+ else
+ src_log="$(printf '%s' "${src_log}" | awk '{ORS=" ";print $0}')"
+ f_log "debug" "f_main ::: name: ${src_name}, url: ${src_url}, rc: ${adb_rc}, log: ${src_log:-"-"}"
+ if [ ${adb_backup} -eq 1 ]
+ then
+ f_list restore
+ fi
+ fi
+ ) &
+ fi
+ hold=$(( cnt % adb_maxqueue ))
+ if [ ${hold} -eq 0 ]
+ then
+ wait
+ fi
+ cnt=$(( cnt + 1 ))
+ done
+
+ # list merge
+ #
+ wait
+ src_name="overall"
+ adb_tmpfile="${tmp_file}"
+ f_list merge
+
+ # overall sort and conditional dns restart
+ #
+ f_hash
+ if [ -s "${adb_tmpdir}/${adb_dnsfile}" ]
+ then
+ if ([ ${mem_total} -ge 64 ] && [ ${mem_free} -ge 40 ]) || [ ${adb_forcesrt} -eq 1 ]
+ then
+ f_tld "${adb_tmpdir}/${adb_dnsfile}"
+ fi
+ f_list final
+ else
+ > "${adb_dnsdir}/${adb_dnsfile}"
+ fi
+ chown "${adb_dnsuser}" "${adb_dnsdir}/${adb_dnsfile}" 2>/dev/null
+ f_hash
+ if [ ${?} -eq 1 ]
+ then
+ f_dnsup
+ fi
+ f_jsnup
+ if [ ${?} -eq 0 ]
+ then
+ f_log "info" "blocklist with overall ${adb_cnt} domains loaded successfully (${adb_sysver})"
+ else
+ f_log "err" "dns backend restart with active blocklist failed"
+ fi
+ f_rmtemp
+ exit ${adb_rc}
}
+# source required system libraries
+#
+if [ -r "/lib/functions.sh" ] && [ -r "/usr/share/libubox/jshn.sh" ]
+then
+ . "/lib/functions.sh"
+ . "/usr/share/libubox/jshn.sh"
+else
+ f_log "err" "system libraries not found"
+fi
+
+# initialize json runtime file
+#
+json_load_file "${adb_rtfile}" >/dev/null 2>&1
+json_select data >/dev/null 2>&1
+if [ ${?} -ne 0 ]
+then
+ > "${adb_rtfile}"
+ json_init
+ json_add_object "data"
+fi
+
# handle different adblock actions
#
f_envload
case "${adb_action}" in
- stop)
- f_rmdns
- ;;
- restart)
- f_rmdns
- f_envcheck
- f_main
- ;;
- suspend)
- f_switch suspend
- ;;
- resume)
- f_switch resume
- ;;
- query)
- f_query "${2}"
- ;;
- start|reload)
- f_envcheck
- f_main
- ;;
+ stop)
+ f_rmdns
+ ;;
+ restart)
+ f_rmdns
+ f_envcheck
+ f_main
+ ;;
+ suspend)
+ f_switch suspend
+ ;;
+ resume)
+ f_switch resume
+ ;;
+ query)
+ f_query "${2}"
+ ;;
+ start|reload)
+ f_envcheck
+ f_main
+ ;;
esac
append_setting "rpc-secret=${rpc_secret}"
elif [ -n "$rpc_user" ]; then
append_setting "rpc-user=${rpc_user}"
- append_setting "rcp-passwd=${rcp-passwd}"
+ append_setting "rpc-passwd=${rpc_passwd}"
else
_info "It is recommand to set RPC secret."
fi
unset_auth_method
fi
elif [ "$rpc_auth_method" = "user_pass" ]; then
- if [ -n "$rcp_user" ]; then
+ if [ -n "$rpc_user" ]; then
append_setting "rpc-user=${rpc_user}"
- append_setting "rcp-passwd=${rcp-passwd}"
+ append_setting "rpc-passwd=${rpc_passwd}"
else
_info "Please set RPC user."
unset_auth_method
if [ ."$check_certificate" = ."true" ]; then
append_setting "check-certificate=true"
append_options "ca_certificate"
+ elif [ ."$check_certificate" = ."false" ]; then
+ append_setting "check-certificate=false"
fi
if [ ."$enable_dht" = ."true" ]; then
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/mayswind/AriaNg-DailyBuild
-PKG_SOURCE_DATE:=2018-05-21
-PKG_SOURCE_VERSION:=304500c3f042ac5387e4dd5d6ea159999d249314
-PKG_MIRROR_HASH:=f5bb5aad024f0916becc8d36832e5d864cd078553c5a719c715a00ecc72af90e
+PKG_SOURCE_DATE:=2018-08-11
+PKG_SOURCE_VERSION:=237335fd0e14d3614729052d0a44571c6340367e
+PKG_MIRROR_HASH:=263131aadc3dd784af1b9f3136910989ed6cb8ad99a89f82f45e41fa0b97db8d
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
$(1)/www/ariang
endef
-Package/ariang-nginx/install = $(Package/ariang/install)
+define Package/ariang-nginx/install
+ $(Package/ariang/install)
+ $(INSTALL_DIR) $(1)/etc/nginx
+ $(INSTALL_BIN) ./files/ariang.conf $(1)/etc/nginx/ariang.conf
+ $(INSTALL_DIR) $(1)/etc/uci-defaults
+ $(INSTALL_BIN) ./files/80_ariang-nginx-support $(1)/etc/uci-defaults/80_ariang-nginx-support
+endef
$(eval $(call BuildPackage,ariang))
$(eval $(call BuildPackage,ariang-nginx))
--- /dev/null
+#!/bin/sh
+
+
+if [ -f "/etc/nginx/nginx.conf" ] && [ -f "/etc/nginx/ariang.conf" ]; then
+ if [ "$( grep 'server_name localhost;' < /etc/nginx/nginx.conf)" ] &&
+ [ ! "$( grep 'include ariang.conf;' < /etc/nginx/nginx.conf)" ]; then
+ sed -i '/server_name localhost;/a \\t\tinclude ariang.conf;' /etc/nginx/nginx.conf
+ if [ -f /var/run/nginx.pid ]; then
+ /etc/init.d/nginx restart
+ fi
+ fi
+fi
+
+exit 0
+
--- /dev/null
+location /ariang {
+ index index.html;
+ alias /www/ariang/;
+}
\ No newline at end of file
include $(TOPDIR)/rules.mk
PKG_NAME:=arp-scan
-PKG_VERSION:=1.9-40-g69b2f70
+PKG_VERSION:=1.9.5
PKG_RELEASE:=1
-PKG_LICENSE:=GPL-3.0
-PKG_MAINTAINER:=Sergey Urushkin <urusha.v1.0@gmail.com>
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/royhills/arp-scan.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=69b2f70588565385f3a61d9b1f100f01747cd5e1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MIRROR_HASH:=1cfb670ddd1763dbf5c712aaefe4d6c4f825011969e36484e6c442794324f721
+PKG_SOURCE_URL:=https://codeload.github.com/royhills/arp-scan/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=aa9498af84158a315b7e0ea6c2cddfa746660ca3987cbe7e32c0c90f5382d9d2
+
+PKG_MAINTAINER:=Sergey Urushkin <urusha.v1.0@gmail.com>
+PKG_LICENSE:=GPL-3.0
PKG_FIXUP:=autoreconf
+++ /dev/null
---- a/acinclude.m4 2016-02-19 15:21:01.000000000 +0300
-+++ b/acinclude.m4 2016-02-19 17:18:50.480874343 +0300
-@@ -211,7 +211,6 @@
- LONG_LONG_INT_FORMAT=''
-
- case $pgac_cv_snprintf_long_long_int_format in
-- cross) AC_MSG_RESULT([cannot test (not on host machine)]);;
- ?*) AC_MSG_RESULT([$pgac_cv_snprintf_long_long_int_format])
- LONG_LONG_INT_FORMAT=$pgac_cv_snprintf_long_long_int_format;;
- *) AC_MSG_RESULT(none);;
include $(TOPDIR)/rules.mk
PKG_NAME:=bind
-PKG_VERSION:=9.11.3
-PKG_RELEASE:=2
+PKG_VERSION:=9.11.5
+PKG_RELEASE:=1
USERID:=bind=57:bind=57
PKG_MAINTAINER:=Noah Meyerhans <frodo@morgul.net>
PKG_SOURCE_URL:= \
http://www.mirrorservice.org/sites/ftp.isc.org/isc/bind9/$(PKG_VERSION) \
http://ftp.isc.org/isc/bind9/$(PKG_VERSION)
-PKG_HASH:=0d9dde14b2ec7f9cdc3b69f19540c7a2e4eee7b6c727965dfae48810965876f5
+PKG_HASH:=a4cae11dad954bdd4eb592178f875bfec09fcc7e29fe0f6b7a4e5b5c6bc61322
PKG_FIXUP:=autoreconf
PKG_REMOVE_FILES:=aclocal.m4 libtool.m4
define Package/bind-server
$(call Package/bind/Default)
TITLE+= DNS server
- DEPENDS+= +@OPENSSL_WITH_DEPRECATED
endef
define Package/bind-server/config
./files/bind/db.255 \
./files/bind/db.local \
./files/bind/db.root \
+ ./files/bind/bind.keys \
$(1)/etc/bind/
$(CP) ./files/bind/named.conf.example $(1)/etc/bind/named.conf
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/delv $(1)/usr/bin/
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-settime $(1)/usr/sbin/
--- /dev/null
+# The bind.keys file is used to override the built-in DNSSEC trust anchors
+# which are included as part of BIND 9. As of the current release, the only
+# trust anchors it contains are those for the DNS root zone ("."), and for
+# the ISC DNSSEC Lookaside Validation zone ("dlv.isc.org"). Trust anchors
+# for any other zones MUST be configured elsewhere; if they are configured
+# here, they will not be recognized or used by named.
+#
+# The built-in trust anchors are provided for convenience of configuration.
+# They are not activated within named.conf unless specifically switched on.
+# To use the built-in root key, set "dnssec-validation auto;" in
+# named.conf options. To use the built-in DLV key, set
+# "dnssec-lookaside auto;". Without these options being set,
+# the keys in this file are ignored.
+#
+# This file is NOT expected to be user-configured.
+#
+# These keys are current as of Feburary 2017. If any key fails to
+# initialize correctly, it may have expired. In that event you should
+# replace this file with a current version. The latest version of
+# bind.keys can always be obtained from ISC at https://www.isc.org/bind-keys.
+
+managed-keys {
+ # ISC DLV: See https://www.isc.org/solutions/dlv for details.
+ #
+ # NOTE: The ISC DLV zone is being phased out as of February 2017;
+ # the key will remain in place but the zone will be otherwise empty.
+ # Configuring "dnssec-lookaside auto;" to activate this key is
+ # harmless, but is no longer useful and is not recommended.
+ dlv.isc.org. initial-key 257 3 5 "BEAAAAPHMu/5onzrEE7z1egmhg/WPO0+juoZrW3euWEn4MxDCE1+lLy2
+ brhQv5rN32RKtMzX6Mj70jdzeND4XknW58dnJNPCxn8+jAGl2FZLK8t+
+ 1uq4W+nnA3qO2+DL+k6BD4mewMLbIYFwe0PG73Te9fZ2kJb56dhgMde5
+ ymX4BI/oQ+cAK50/xvJv00Frf8kw6ucMTwFlgPe+jnGxPPEmHAte/URk
+ Y62ZfkLoBAADLHQ9IrS2tryAe7mbBZVcOwIeU/Rw/mRx/vwwMCTgNboM
+ QKtUdvNXDrYJDSHZws3xiRXF1Rf+al9UmZfSav/4NWLKjHzpT59k/VSt
+ TDN0YUuWrBNh";
+
+ # ROOT KEYS: See https://data.iana.org/root-anchors/root-anchors.xml
+ # for current trust anchor information.
+ #
+ # These keys are activated by setting "dnssec-validation auto;"
+ # in named.conf.
+ #
+ # This key (19036) is to be phased out starting in 2017. It will
+ # remain in the root zone for some time after its successor key
+ # has been added. It will remain this file until it is removed from
+ # the root zone.
+ . initial-key 257 3 8 "AwEAAagAIKlVZrpC6Ia7gEzahOR+9W29euxhJhVVLOyQbSEW0O8gcCjF
+ FVQUTf6v58fLjwBd0YI0EzrAcQqBGCzh/RStIoO8g0NfnfL2MTJRkxoX
+ bfDaUeVPQuYEhg37NZWAJQ9VnMVDxP/VHL496M/QZxkjf5/Efucp2gaD
+ X6RS6CXpoY68LsvPVjR0ZSwzz1apAzvN9dlzEheX7ICJBBtuA6G3LQpz
+ W5hOA2hzCTMjJPJ8LbqF6dsV6DoBQzgul0sGIcGOYl7OyQdXfZ57relS
+ Qageu+ipAdTTJ25AsRTAoub8ONGcLmqrAmRLKBP1dfwhYB4N7knNnulq
+ QxA+Uk1ihz0=";
+
+ # This key (20326) is to be published in the root zone in 2017.
+ # Servers which were already using the old key (19036) should
+ # roll seamlessly to this new one via RFC 5011 rollover. Servers
+ # being set up for the first time can use the contents of this
+ # file as initializing keys; thereafter, the keys in the
+ # managed key database will be trusted and maintained
+ # automatically.
+ . initial-key 257 3 8 "AwEAAaz/tAm8yTn4Mfeh5eyI96WSVexTBAvkMgJzkKTOiW1vkIbzxeF3
+ +/4RgWOq7HrxRixHlFlExOLAJr5emLvN7SWXgnLh4+B5xQlNVz8Og8kv
+ ArMtNROxVQuCaSnIDdD5LKyWbRd2n9WGe2R8PzgCmr3EgVLrjyBxWezF
+ 0jLHwVN8efS3rCj/EWgvIWgb9tarpVUDK/b58Da+sqqls3eNbuv7pr+e
+ oZG+SrDK6nWeL3c6H5Apxz7LjVc1uTIdsIXxuOLYA4/ilBmSVIzuDWfd
+ RUfhHdY6+cn8HFRm+2hM8AnXGXws9555KrUB5qihylGa8subX2Nn6UwN
+ R1AkUTV74bU=";
+};
-Index: bind-9.10.4-P3/bin/Makefile.in
+Index: bind-9.11.5/bin/Makefile.in
===================================================================
---- bind-9.10.4-P3.orig/bin/Makefile.in
-+++ bind-9.10.4-P3/bin/Makefile.in
-@@ -10,7 +10,7 @@ srcdir = @srcdir@
- VPATH = @srcdir@
+--- bind-9.11.5.orig/bin/Makefile.in
++++ bind-9.11.5/bin/Makefile.in
+@@ -12,7 +12,7 @@ VPATH = @srcdir@
top_srcdir = @top_srcdir@
--SUBDIRS = named rndc dig delv dnssec tools tests nsupdate \
-+SUBDIRS = named rndc dig delv dnssec tools nsupdate \
- check confgen @NZD_TOOLS@ @PYTHON_TOOLS@ @PKCS11_TOOLS@
- TARGETS =
-
-Index: bind-9.10.4-P3/lib/Makefile.in
-===================================================================
---- bind-9.10.4-P3.orig/lib/Makefile.in
-+++ bind-9.10.4-P3/lib/Makefile.in
-@@ -14,7 +14,7 @@ top_srcdir = @top_srcdir@
- # Attempt to disable parallel processing.
- .NOTPARALLEL:
- .NO_PARALLEL:
--SUBDIRS = isc isccc dns isccfg bind9 lwres irs tests samples
-+SUBDIRS = isc isccc dns isccfg bind9 lwres irs samples
+ SUBDIRS = named rndc dig delv dnssec tools nsupdate check confgen \
+- @NZD_TOOLS@ @PYTHON_TOOLS@ @PKCS11_TOOLS@ tests
++ @NZD_TOOLS@ @PYTHON_TOOLS@ @PKCS11_TOOLS@
TARGETS =
@BIND9_MAKE_RULES@
-Index: bind-9.10.4-P3/configure.in
+Index: bind-9.11.5/configure.in
===================================================================
---- bind-9.10.4-P3.orig/configure.in
-+++ bind-9.10.4-P3/configure.in
-@@ -157,26 +157,11 @@ esac
+--- bind-9.11.5.orig/configure.in
++++ bind-9.11.5/configure.in
+@@ -181,26 +181,11 @@ esac
#
AC_CONFIG_FILES([make/rules make/includes])
include $(TOPDIR)/rules.mk
PKG_NAME:=chrony
-PKG_VERSION:=3.3
-PKG_RELEASE:=2
+PKG_VERSION:=3.4
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://download.tuxfamily.org/chrony/
-PKG_HASH:=0d1fb2d5875032f2d5a86f3770374c87ee4c941916f64171e81f7684f2a73128
+PKG_HASH:=af77e47c2610a7e55c8af5b89a8aeff52d9a867dd5983d848b52d374bc0e6b9f
PKG_MAINTAINER:=Miroslav Lichvar <mlichvar0@gmail.com>
PKG_LICENSE:=GPL-2.0
elif [ "$wan6_iface" = "$iface" ]; then
echo allow ::/0
else
- network_get_subnets subnets $iface || \
- network_get_subnets subnets6 $iface || continue
+ network_get_subnets subnets $iface
+ network_get_subnets6 subnets6 $iface
for subnet in $subnets $subnets6; do
echo allow $subnet
done
--- /dev/null
+--- a/hash_intmd5.c
++++ b/hash_intmd5.c
+@@ -29,6 +29,7 @@
+ #include "sysincl.h"
+ #include "hash.h"
+ #include "memory.h"
++#include "util.h"
+
+ #include "md5.c"
+
include $(TOPDIR)/rules.mk
PKG_NAME:=clamav
-PKG_VERSION:=0.100.1
+PKG_VERSION:=0.100.2
PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr> \
Lucian Cristian <lucian.cristian@gmail.com>
+PKG_CPE_ID:=cpe:/a:clamav:clamav
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.clamav.net/downloads/production/
-PKG_HASH:=84e026655152247de7237184ee13003701c40be030dd68e0316111049f58a59f
+PKG_HASH:=4a2e4f0cd41e62adb5a713b4a1857c49145cd09a69957e6d946ecad575206dd6
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
define Package/clamav/Default
SECTION:=net
- DEPENDS:=+libpthread +uclibcxx +zlib +libcurl +libjson-c +libopenssl +libltdl +libpcre2 +USE_MUSL:musl-fts
+ DEPENDS:=+libpthread +uclibcxx +zlib +libcurl +libjson-c +libmilter-sendmail +libopenssl +libltdl +libpcre2 +USE_MUSL:musl-fts
CATEGORY:=Network
SUBMENU:=Web Servers/Proxies
TITLE:=ClamAV
- URL:=http://www.clamav.net/
+ URL:=https://www.clamav.net/
endef
define Package/clamav
--sysconfdir=/etc/clamav/ \
--prefix=/usr/ \
--exec-prefix=/usr/ \
+ --enable-milter \
--disable-xml \
--disable-bzip2 \
--with-user nobody \
define Package/clamav/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/clamd $(1)/usr/sbin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/clamav-milter $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clamav-config $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clambc $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clamconf $(1)/usr/sbin/
include $(TOPDIR)/rules.mk
PKG_NAME:=coova-chilli
-PKG_VERSION:=1.3.0+20141128
+PKG_VERSION:=1.4
PKG_MAINTAINER:=Jaehoon You <teslamint@gmail.com>
PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=COPYING
-PKG_RELEASE:=6
+PKG_RELEASE:=7
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=git://github.com/coova/coova-chilli
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=b93de20a288c01c2ba28e96e31ad6da01627f45f
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MIRROR_HASH:=89c9b313881c658a0f6b91329a78bb1a0151878b19bc99b315976081c6355557
+PKG_SOURCE_URL:=https://codeload.github.com/coova/coova-chilli/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=987647a4c8efe7b1e2d7108d56068e3bd7830d326680f0eaa2c705e4c59c46d9
PKG_INSTALL:=1
CATEGORY:=Network
DEPENDS:=+kmod-tun +librt +COOVACHILLI_CYASSL:libcyassl +COOVACHILLI_OPENSSL:libopenssl
TITLE:=Wireless LAN HotSpot controller (Coova Chilli Version)
- URL:=http://www.coova.org/CoovaChilli
+ URL:=https://coova.github.io/
MENU:=1
endef
$(if $(CONFIG_COOVACHILLI_USERAGENT),--enable,--disable)-useragent \
$(if $(CONFIG_COOVACHILLI_LARGELIMITS),--enable,--disable)-largelimits \
$(if $(CONFIG_COOVACHILLI_UAMDOMAINFILE),--enable,--disable)-uamdomainfile \
+ $(if $(CONFIG_IPV6),--with,--without)-ipv6 \
$(if $(CONFIG_COOVACHILLI_CYASSL),--with,--without)-cyassl \
$(if $(CONFIG_COOVACHILLI_OPENSSL),--with,--without)-openssl \
$(if $(CONFIG_PACKAGE_kmod-ipt-coova),--with-nfcoova) \
+++ /dev/null
---- a/src/system.h
-+++ b/src/system.h
-@@ -83,10 +83,6 @@
- #include <linux/sysinfo.h>
- #endif
-
--#ifdef HAVE_SYS_SYSINFO_H
--#include <sys/sysinfo.h>
--#endif
--
- #ifdef HAVE_TIME_H
- #include <time.h>
- #endif
-@@ -139,6 +135,10 @@
- #include <linux/un.h>
- #endif
-
-+#ifdef HAVE_SYS_SYSINFO_H
-+#include <sys/sysinfo.h>
-+#endif
-+
- #elif defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__) || defined (__NetBSD__)
- #include <net/if.h>
- #include <net/bpf.h>
--- /dev/null
+--- a/src/linux/Makefile
++++ b/src/linux/Makefile
+@@ -25,8 +25,8 @@ lib%.o: lib%.c
+ $(CC) $(CFLAGS) -fPIC -O2 -Wall -D_INIT=lib$*_init -c -o $@ $<;
+
+ install: modules_install libxt_coova.so
+- mkdir -p $(DESTDIR)/lib/xtables/
+- cp libxt_coova.so $(DESTDIR)/lib/xtables/
++ mkdir -p $(DESTDIR)/usr/lib/iptables/
++ cp libxt_coova.so $(DESTDIR)/usr/lib/iptables/
+
+ distdir:
+
--- /dev/null
+--- a/src/system.h
++++ b/src/system.h
+@@ -112,6 +112,11 @@
+ #include <signal.h>
+ #endif
+
++#ifdef HAVE_SYS_SYSINFO_H
++#define _LINUX_SYSINFO_H
++#include <sys/sysinfo.h>
++#endif
++
+ #ifdef HAVE_INTTYPES_H
+ #define __STDC_FORMAT_MACROS
+ #include <inttypes.h>
+@@ -129,15 +134,6 @@
+ #include <linux/un.h>
+ #endif
+
+-#ifdef HAVE_SYS_SYSINFO_H
+-#include <sys/sysinfo.h>
+-#else
+-#ifdef HAVE_LINUX_SYSINFO_H
+-#define _LINUX_KERNEL_H
+-#include <linux/sysinfo.h>
+-#endif
+-#endif
+-
+ #elif defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__) || defined (__NetBSD__)
+ #include <net/if.h>
+ #include <net/bpf.h>
+++ /dev/null
---- a/src/linux/Makefile
-+++ b/src/linux/Makefile
-@@ -21,11 +21,11 @@ lib%.so: lib%.o
- $(CC) $(CFLAGS) -shared -o $@ $^;
-
- lib%.o: lib%.c
-- $(CC) $(CFLAGS) -fPIC -O2 -Wall -I${KERNEL_DIR}/include -D_INIT=lib$*_init -c -o $@ $<;
-+ $(CC) $(CFLAGS) -D_INIT=lib$*_init -c -o $@ $<;
-
- install: modules_install libxt_coova.so
-- mkdir -p $(DESTDIR)/lib/xtables/
-- cp libxt_coova.so $(DESTDIR)/lib/xtables/
-+ mkdir -p $(DESTDIR)/usr/lib/iptables/
-+ cp libxt_coova.so $(DESTDIR)/usr/lib/iptables/
-
- distdir:
-
+++ /dev/null
---- a/src/linux/xt_coova.c
-+++ b/src/linux/xt_coova.c
-@@ -292,6 +292,8 @@ static int coova_mt_check(const struct x
- struct coova_table *t;
- #ifdef CONFIG_PROC_FS
- struct proc_dir_entry *pde;
-+ kuid_t uid;
-+ kgid_t gid;
- #endif
- unsigned i;
- int ret = 0;
-@@ -330,8 +332,9 @@ static int coova_mt_check(const struct x
- ret = -ENOMEM;
- goto out;
- }
-- pde->uid = ip_list_uid;
-- pde->gid = ip_list_gid;
-+ uid = make_kuid(&init_user_ns, ip_list_uid);
-+ gid = make_kgid(&init_user_ns, ip_list_gid);
-+ proc_set_user(pde, uid, gid);
- #endif
- spin_lock_bh(&coova_lock);
- list_add_tail(&t->list, &tables);
-@@ -445,14 +448,13 @@ static const struct seq_operations coova
-
- static int coova_seq_open(struct inode *inode, struct file *file)
- {
-- struct proc_dir_entry *pde = PDE(inode);
- struct coova_iter_state *st;
-
- st = __seq_open_private(file, &coova_seq_ops, sizeof(*st));
- if (st == NULL)
- return -ENOMEM;
-
-- st->table = pde->data;
-+ st->table = PDE_DATA(inode);
- return 0;
- }
-
-@@ -460,8 +462,7 @@ static ssize_t
- coova_mt_proc_write(struct file *file, const char __user *input,
- size_t size, loff_t *loff)
- {
-- const struct proc_dir_entry *pde = PDE(file->f_path.dentry->d_inode);
-- struct coova_table *t = pde->data;
-+ struct coova_table *t = PDE_DATA(file->f_path.dentry->d_inode);
- struct coova_entry *e;
- char buf[sizeof("+b335:1d35:1e55:dead:c0de:1715:5afe:c0de")];
- const char *c = buf;
+++ /dev/null
---- a/src/md5.h
-+++ b/src/md5.h
-@@ -28,6 +28,14 @@
- #define MD5Update MD5_Update
- #define MD5Final MD5_Final
-
-+#elif HAVE_CYASSL
-+#include <cyassl/openssl/md5.h>
-+
-+#define MD5Init MD5_Init
-+#define MD5Update MD5_Update
-+#define MD5Final MD5_Final
-+
-+typedef struct CYASSL_MD5_CTX MD5_CTX;
- #else
-
- struct MD5Context {
---- a/src/md5.c
-+++ b/src/md5.c
-@@ -18,7 +18,7 @@
- #include <string.h> /* for memcpy() */
- #include "md5.h"
-
--#ifndef HAVE_OPENSSL
-+#if !defined(HAVE_OPENSSL) && !defined(HAVE_CYASSL)
-
- void byteReverse(unsigned char *buf, size_t longs);
-
+++ /dev/null
---- a/src/system.h
-+++ b/src/system.h
-@@ -78,11 +78,6 @@
- #include <sys/stat.h>
- #endif
-
--#ifdef HAVE_LINUX_SYSINFO_H
--#define _LINUX_KERNEL_H
--#include <linux/sysinfo.h>
--#endif
--
- #ifdef HAVE_TIME_H
- #include <time.h>
- #endif
-@@ -123,6 +118,11 @@
- #include <signal.h>
- #endif
-
-+#ifdef HAVE_SYS_SYSINFO_H
-+#define _LINUX_SYSINFO_H
-+#include <sys/sysinfo.h>
-+#endif
-+
- #if defined(__linux__)
- #include <asm/types.h>
- #include <linux/if.h>
-@@ -135,10 +135,6 @@
- #include <linux/un.h>
- #endif
-
--#ifdef HAVE_SYS_SYSINFO_H
--#include <sys/sysinfo.h>
--#endif
--
- #elif defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__) || defined (__NetBSD__)
- #include <net/if.h>
- #include <net/bpf.h>
-@@ -170,10 +166,6 @@
- #include <net/if_tun.h>
- #endif
-
--#ifdef HAVE_NET_ETHERNET_H
--#include <net/ethernet.h>
--#endif
--
- #ifdef HAVE_ASM_TYPES_H
- #include <asm/types.h>
- #endif
---- a/src/chilli_limits.h
-+++ b/src/chilli_limits.h
-@@ -18,8 +18,8 @@
- *
- */
-
--#ifndef _LIMITS_H
--#define _LIMITS_H
-+#ifndef _CHILLI_LIMITS_H
-+#define _CHILLI_LIMITS_H
-
- /*
- * extracted from various .h files, needs some cleanup.
+++ /dev/null
---- a/src/chilli.c
-+++ b/src/chilli.c
-@@ -4297,8 +4297,10 @@ static int chilliauth_cb(struct radius_t
- while (!differ && r1 > 0 && r2 > 0);
- }
-
-- if (newfd) safe_close(newfd); newfd=0;
-- if (oldfd) safe_close(oldfd); oldfd=0;
-+ if (newfd) safe_close(newfd);
-+ newfd=0;
-+ if (oldfd) safe_close(oldfd);
-+ oldfd=0;
-
- if (differ) {
- log_dbg("Writing out new hs.conf file with administraive-user settings");
---- a/src/redir.c
-+++ b/src/redir.c
-@@ -3176,9 +3176,11 @@ pid_t redir_fork(int in, int out) {
- }
-
- #if defined(F_DUPFD)
-- if (fcntl(in,F_GETFL,0) == -1) return -1; safe_close(0);
-+ if (fcntl(in,F_GETFL,0) == -1) return -1;
-+ safe_close(0);
- if (fcntl(in,F_DUPFD,0) == -1) return -1;
-- if (fcntl(out,F_GETFL,1) == -1) return -1; safe_close(1);
-+ if (fcntl(out,F_GETFL,1) == -1) return -1;
-+ safe_close(1);
- if (fcntl(out,F_DUPFD,1) == -1) return -1;
- #else
- if (dup2(in,0) == -1) return -1;
include $(TOPDIR)/rules.mk
PKG_NAME:=cshark
-PKG_VERSION=2015-11-24-$(PKG_SOURCE_VERSION)
-PKG_RELEASE=3
+PKG_VERSION=2018-08-20-$(PKG_SOURCE_VERSION)
+PKG_RELEASE=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/cloudshark/cshark.git
PKG_SOURCE_SUBDIR=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=e575ab3d35d75a6f70488001fcba45690ebe9b3e
+PKG_SOURCE_VERSION:=7a7cf7f35074b85c6fb0c52067e640d2433ef73b
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
-PKG_MIRROR_HASH:=280d2711308a5b051a43788519ae6857394690d3155fe954388c43cd9035ec84
+PKG_MIRROR_HASH:=bc448bb4e910e771a5a8a39af7cfa09a79b59c595f15cdcae9d0103ce09be019
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
#
-# Copyright (C) 2007-2016 OpenWrt.org
-#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
PKG_NAME:=darkstat
PKG_VERSION:=3.0.719
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_MAINTAINER:=Jean-Michel Lacroix <lacroix@lepine-lacroix.info>
define Package/darkstat
SECTION:=net
CATEGORY:=Network
- DEPENDS:=+libpcap +zlib +USE_GLIBC:libbsd
+ DEPENDS:=+libpcap +zlib
TITLE:=Network bandwidth monitor
URL:=http://unix4lyfe.org/darkstat/
endef
--disable-debug \
--with-chroot-dir=/var/empty
-TARGET_CFLAGS += -std=gnu99
+CONFIGURE_VARS += \
+ ac_cv_search_setproctitle=no \
+ ac_cv_search_strlcpy=no \
+ ac_cv_search_strlcat=no
define Build/Compile
$(HOSTCC) $(PKG_BUILD_DIR)/static/c-ify.c \
PKG_VERSION:=2.7.8
# Release == build
# increase on changes of services files or tld_names.dat
-PKG_RELEASE:=1
+PKG_RELEASE:=5
PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=
. /lib/functions/network.sh
# GLOBAL VARIABLES #
-VERSION="2.7.8-1"
+VERSION="2.7.8-5"
SECTION_ID="" # hold config's section name
VERBOSE=0 # default mode is log to console, but easily changed with parameter
MYPROG=$(basename $0) # my program call name
# IPv6 ( ( 0-9a-f 1-4char ":") min 1x) ( ( 0-9a-f 1-4char )optional) ( (":" 0-9a-f 1-4char ) min 1x)
IPV6_REGEX="\(\([0-9A-Fa-f]\{1,4\}:\)\{1,\}\)\(\([0-9A-Fa-f]\{1,4\}\)\{0,1\}\)\(\(:[0-9A-Fa-f]\{1,4\}\)\{1,\}\)"
+# characters that are dangerous to pass to a shell command line
+SHELL_ESCAPE="[\"\'\`\$\!();><{}?|\[\]\*\\\\]"
+
+# dns character set
+DNS_CHARSET="[@a-zA-Z0-9._-]"
+
# detect if called by ddns-lucihelper.sh script, disable retrys (empty variable == false)
LUCI_HELPER=$(printf %s "$MYPROG" | grep -i "luci")
WGET_SSL=$(which wget-ssl)
CURL=$(which curl)
-
+# CURL_SSL not empty then SSL support available
+CURL_SSL=$($CURL -V 2>/dev/null | grep -F "https")
# CURL_PROXY not empty then Proxy support available
CURL_PROXY=$(find /lib /usr/lib -name libcurl.so* -exec strings {} 2>/dev/null \; | grep -im1 "all_proxy")
[ $__LEVEL -eq 7 ] && return # no syslog for debug messages
__CMD=$(echo -e "$__CMD" | tr -d '\n' | tr '\t' ' ') # remove \n \t chars
[ $__EXIT -eq 1 ] && {
- $__CMD # force syslog before exit
+ eval "$__CMD" # force syslog before exit
exit 1
}
[ $use_syslog -eq 0 ] && return
- [ $((use_syslog + __LEVEL)) -le 7 ] && $__CMD
+ [ $((use_syslog + __LEVEL)) -le 7 ] && eval "$__CMD"
return
}
urlencode() {
# $1 Name of Variable to store encoded string to
# $2 string to encode
- local __STR __LEN __CHAR __OUT
- local __ENC=""
- local __POS=1
+ local __ENC
[ $# -ne 2 ] && write_log 12 "Error calling 'urlencode()' - wrong number of parameters"
- __STR="$2" # read string to encode
- __LEN=${#__STR} # get string length
-
- while [ $__POS -le $__LEN ]; do
- # read one chat of the string
- __CHAR=$(expr substr "$__STR" $__POS 1)
-
- case "$__CHAR" in
- [-_.~a-zA-Z0-9] )
- # standard char
- __OUT="${__CHAR}"
- ;;
- * )
- # special char get %hex code
- __OUT=$(printf '%%%02x' "'$__CHAR" )
- ;;
- esac
- __ENC="${__ENC}${__OUT}" # append to encoded string
- __POS=$(( $__POS + 1 )) # increment position
- done
+ __ENC="$(awk -v str="$2" 'BEGIN{ORS="";for(i=32;i<=127;i++)lookup[sprintf("%c",i)]=i
+ for(k=1;k<=length(str);++k){enc=substr(str,k,1);if(enc!~"[-_.~a-zA-Z0-9]")enc=sprintf("%%%02x", lookup[enc]);print enc}}')"
eval "$1=\"$__ENC\"" # transfer back to variable
return 0
return $status
}
+# sanitize a variable
+# $1 variable name
+# $2 allowed shell pattern
+# $3 disallowed shell pattern
+sanitize_variable() {
+ local __VAR=$1
+ eval __VALUE=\$$__VAR
+ local __ALLOWED=$2
+ local __REJECT=$3
+
+ # removing all allowed should give empty string
+ if [ -n "$__ALLOWED" ]; then
+ [ -z "${__VALUE//$__ALLOWED}" ] || write_log 12 "sanitize on $__VAR found characters outside allowed subset"
+ fi
+
+ # removing rejected pattern should give the same string as the input
+ if [ -n "$__REJECT" ]; then
+ [ "$__VALUE" = "${__VALUE//$__REJECT}" ] || write_log 12 "sanitize on $__VAR found rejected characters"
+ fi
+}
+
# verify given host and port is connectable
# $1 Host/IP to verify
# $2 Port to verify
# 2nd choice is cURL IPv4/IPv6/HTTPS
# libcurl might be compiled without Proxy or HTTPS Support
elif [ -n "$CURL" ]; then
- # CURL_SSL not empty then SSL support available
- CURL_SSL=$($(which curl) -V 2>/dev/null | grep "Protocols:" | grep -F "https")
__PROG="$CURL -RsS -o $DATFILE --stderr $ERRFILE"
# check HTTPS support
[ -z "$CURL_SSL" -a $use_https -eq 1 ] && \
write_log 7 "Detect local IP on '$ip_source'"
while : ; do
- if [ -n "$ip_network" ]; then
+ if [ -n "$ip_network" -a "$ip_source" = "network" ]; then
# set correct program
network_flush_cache # force re-read data from ubus
[ $use_ipv6 -eq 0 ] && __RUNPROG="network_get_ipaddr" \
eval "$__RUNPROG __DATA $ip_network" || \
write_log 13 "Can not detect local IP using $__RUNPROG '$ip_network' - Error: '$?'"
[ -n "$__DATA" ] && write_log 7 "Local IP '$__DATA' detected on network '$ip_network'"
- elif [ -n "$ip_interface" ]; then
+ elif [ -n "$ip_interface" -a "$ip_source" = "interface" ]; then
local __DATA4=""; local __DATA6=""
if [ -n "$(which ip)" ]; then # ip program installed
write_log 7 "#> ip -o addr show dev $ip_interface scope global >$DATFILE 2>$ERRFILE"
fi
[ $use_ipv6 -eq 0 ] && __DATA="$__DATA4" || __DATA="$__DATA6"
[ -n "$__DATA" ] && write_log 7 "Local IP '$__DATA' detected on interface '$ip_interface'"
- elif [ -n "$ip_script" ]; then
+ elif [ -n "$ip_script" -a "$ip_source" = "script" ]; then
write_log 7 "#> $ip_script >$DATFILE 2>$ERRFILE"
eval $ip_script >$DATFILE 2>$ERRFILE
__ERR=$?
write_log 3 "$ip_script Error: '$__ERR'"
write_log 7 "$(cat $ERRFILE)" # report error
fi
- elif [ -n "$ip_url" ]; then
+ elif [ -n "$ip_url" -a "$ip_source" = "web" ]; then
do_transfer "$ip_url"
# use correct regular expression
[ $use_ipv6 -eq 0 ] \
# without lookup host and possibly other required options we can do nothing for you
[ -z "$lookup_host" ] && write_log 14 "Service section not configured correctly! Missing 'lookup_host'"
+# verify validity of variables
+[ -n "$lookup_host" ] && sanitize_variable lookup_host "$DNS_CHARSET" ""
+[ -n "$dns_server" ] && sanitize_variable dns_server "$DNS_CHARSET" ""
+[ -n "$domain" ] && sanitize_variable domain "$DNS_CHARSET" ""
+
+# Filter shell escape characters, if these are required in the URL, they
+# can still be passed url encoded
+[ -n "$param_opt" ] && sanitize_variable param_opt "" "$SHELL_ESCAPE"
+
[ -n "$update_url" ] && {
# only check if update_url is given, update_scripts have to check themselves
[ -z "$domain" ] && $(echo "$update_url" | grep "\[DOMAIN\]" >/dev/null 2>&1) && \
#!/bin/sh
-#.Distributed under the terms of the GNU General Public License (GPL) version 2.0
-#.based on Yuval Adam's route53.sh found at https://github.com/yuvadm/route53-ddns/blob/master/route53.sh
-#.2017 Max Berger <max at berger dot name>
-[ -z "$CURL_SSL" ] && write_log 14 "Amazon AWS Route53 communication require cURL with SSL support. Please install"
-[ -z "$username" ] && write_log 14 "Service section not configured correctly! Missing key as 'username'"
-[ -z "$password" ] && write_log 14 "Service section not configured correctly! Missing secret as 'password'"
-[ -z "$domain" ] && write_log 14 "Service section not configured correctly! Missing zone id as 'domain'"
+# Distributed under the terms of the GNU General Public License (GPL) version 2.0
+# based on Yuval Adam's route53.sh found at https://github.com/yuvadm/route53-ddns/blob/master/route53.sh
+# 2017 Max Berger <max at berger dot name>
-set -euo pipefail
-IFS=$'\n\t'
+[ -z "${CURL_SSL}" ] && write_log 14 "Amazon AWS Route53 communication require cURL with SSL support. Please install"
+[ -z "{$username}" ] && write_log 14 "Service section not configured correctly! Missing key as 'username'"
+[ -z "${password}" ] && write_log 14 "Service section not configured correctly! Missing secret as 'password'"
+[ -z "${domain}" ] && write_log 14 "Service section not configured correctly! Missing zone id as 'domain'"
ENDPOINT="route53.amazonaws.com"
RECORD_TTL=300
-RECORD_NAME="$lookup_host".
-[ $use_ipv6 -eq 0 ] && RECORD_TYPE="A"
-[ $use_ipv6 -eq 1 ] && RECORD_TYPE="AAAA"
-RECORD_VALUE="$LOCAL_IP"
-HOSTED_ZONE_ID="$domain"
+RECORD_NAME="${lookup_host}."
+[ ${use_ipv6} -eq 0 ] && RECORD_TYPE="A"
+[ ${use_ipv6} -eq 1 ] && RECORD_TYPE="AAAA"
+RECORD_VALUE="${LOCAL_IP}"
+HOSTED_ZONE_ID="${domain}"
API_PATH="/2013-04-01/hostedzone/${HOSTED_ZONE_ID}/rrset/"
-AWS_ACCESS_KEY_ID="$username"
-AWS_SECRET_ACCESS_KEY="$password"
+AWS_ACCESS_KEY_ID="${username}"
+AWS_SECRET_ACCESS_KEY="${password}"
AWS_REGION='us-east-1'
AWS_SERVICE='route53'
hash() {
- msg=$1
- echo -en "$msg" | openssl dgst -sha256 | sed 's/^.* //'
+ msg="$1"
+ echo -en "${msg}" | openssl dgst -sha256 | sed 's/^.* //'
}
sign_plain() {
# Sign message using a plaintext key
- key=$1
- msg=$2
- echo -en "$msg" | openssl dgst -hex -sha256 -hmac "$key" | sed 's/^.* //'
+ key="$1"
+ msg="$2"
+ echo -en "${msg}" | openssl dgst -hex -sha256 -hmac "${key}" | sed 's/^.* //'
}
sign() {
# Sign message using a hex formatted key
- key=$1
- msg=$2
- echo -en "$msg" | openssl dgst -hex -sha256 -mac HMAC -macopt "hexkey:${key}" | sed 's/^.* //'
+ key="$1"
+ msg="$2"
+ echo -en "${msg}" | openssl dgst -hex -sha256 -mac HMAC -macopt "hexkey:${key}" | sed 's/^.* //'
}
request_body="<?xml version=\"1.0\" encoding=\"UTF-8\"?> \
</ChangeBatch> \
</ChangeResourceRecordSetsRequest>"
-fulldate=$(date --utc +%Y%m%dT%H%M%SZ)
-shortdate=$(date --utc +%Y%m%d)
+fulldate="$(date --utc +%Y%m%dT%H%M%SZ)"
+shortdate="$(date --utc +%Y%m%d)"
signed_headers="host;x-amz-date"
-request_hash=$(hash "$request_body")
+request_hash="$(hash "${request_body}")"
canonical_request="POST\n${API_PATH}\n\nhost:route53.amazonaws.com\nx-amz-date:${fulldate}\n\n${signed_headers}\n${request_hash}"
-date_key=$(sign_plain "AWS4${AWS_SECRET_ACCESS_KEY}" "${shortdate}")
-region_key=$(sign "$date_key" $AWS_REGION)
-service_key=$(sign "$region_key" $AWS_SERVICE)
-signing_key=$(sign "$service_key" aws4_request)
+date_key="$(sign_plain "AWS4${AWS_SECRET_ACCESS_KEY}" "${shortdate}")"
+region_key="$(sign "${date_key}" ${AWS_REGION})"
+service_key="$(sign "${region_key}" ${AWS_SERVICE})"
+signing_key="$(sign "${service_key}" aws4_request)"
credential="${shortdate}/${AWS_REGION}/${AWS_SERVICE}/aws4_request"
-sigmsg="AWS4-HMAC-SHA256\n${fulldate}\n${credential}\n$(hash "$canonical_request")"
+sigmsg="AWS4-HMAC-SHA256\n${fulldate}\n${credential}\n$(hash "${canonical_request}")"
-signature=$(sign "$signing_key" "$sigmsg")
+signature="$(sign "${signing_key}" "${sigmsg}")"
authorization="AWS4-HMAC-SHA256 Credential=${AWS_ACCESS_KEY_ID}/${credential}, SignedHeaders=${signed_headers}, Signature=${signature}"
-ANSWER=$(curl \
+ANSWER="$(curl \
-X "POST" \
-H "Host: route53.amazonaws.com" \
-H "X-Amz-Date: ${fulldate}" \
-H "Authorization: ${authorization}" \
-H "Content-Type: text/xml" \
-d "$request_body" \
- "https://${ENDPOINT}${API_PATH}")
+ "https://${ENDPOINT}${API_PATH}")"
write_log 7 "${ANSWER}"
-echo ${ANSWER} | grep Error >/dev/null && return 1
-echo ${ANSWER} | grep ChangeInfo >/dev/null && return 0
+echo "${ANSWER}" | grep -F "Error" >/dev/null && return 1
+echo "${ANSWER}" | grep -F "ChangeInfo" >/dev/null && return 0
return 2
include $(TOPDIR)/rules.mk
PKG_NAME:=dhcpcd
-PKG_VERSION:=7.0.5
+PKG_VERSION:=7.0.8
PKG_RELEASE:=1
PKG_SOURCE_URL:=ftp://roy.marples.name/pub/dhcpcd \
http://roy.marples.name/downloads/dhcpcd
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_HASH:=aa43fdb990be7c413fa92bdbcfb3775e4cdbff725cbcb68cd2a714ed4f58879d
+PKG_HASH:=96968e883369ab4afd11eba9dfd9bb109f5dfff65b2814ce6c432f36362dc9b5
PKG_LICENSE:=BSD-2c
PKG_LICENSE_FILES:=
include $(TOPDIR)/rules.mk
PKG_NAME:=dmapd
-PKG_VERSION:=0.0.75
+PKG_VERSION:=0.0.77
PKG_RELEASE:=1
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.flyn.org/projects/dmapd
-PKG_HASH:=f296a5ba02eae36a41381d19d5d08f2b9b7657091db9674f82121cd26c2893a1
+PKG_HASH:=2ffadffaba3bf680ade3ab851132a1b0d596f7a9dd9cdc7fc8bfbabacc7fab8d
PKG_FIXUP:=autoreconf
PKG_INSTALL:=2
#
-# Copyright (C) 2015-2016 Thomas Weißschuh
+# Copyright (C) 2015-2018 Thomas Weißschuh
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=esniper
-PKG_VERSION:=2.33.0
+PKG_VERSION:=2.35.0
PKG_RELEASE:=1
PKG_LICENSE:=BSD-2-Clause
PKG_LICENSE_FILES:=COPYING
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(VERSION_TRANSFORMED)
PKG_SOURCE:=$(PKG_NAME)-$(VERSION_TRANSFORMED).tgz
PKG_SOURCE_URL:=@SF/$(PKG_NAME)
-PKG_HASH:=c9b8b10aefe5c397d7dee4c569f87f227c6710de528b1dc402379e5b4f1793dd
+PKG_HASH:=a93d4533e31640554f2e430ac76b43e73a50ed6d721511066020712ac8923c12
PKG_BUILD_PARALLEL:=1
include $(TOPDIR)/rules.mk
PKG_NAME:=fping
-PKG_VERSION:=4.0
-PKG_RELEASE:=2
+PKG_VERSION:=4.1
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://fping.org/dist/
-PKG_HASH:=67eb4152b98ad34f99d2eec4e1098a0bb52caf13c0c89cd147349d08190fe8ce
+PKG_HASH:=2733e2a18cc2b5b935c4e3b5b84ccf2080c38043f1864d7c43326e8048ddab73
PKG_MAINTAINER:=Nikil Mehta <nikil.mehta@gmail.com>
PKG_LICENSE:=BSD-4-Clause
--enable-ipv4 \
--enable-ipv6
-TARGET_CFLAGS += -std=gnu99
-
define Package/fping/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fping $(1)/usr/bin/
PKG_NAME:=freeradius3
PKG_VERSION:=release_3_0_17
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/FreeRADIUS/freeradius-server/archive
+freeradius3-mod-eap-peap \
+freeradius3-mod-eap-tls \
+freeradius3-mod-eap-ttls \
++freeradius3-mod-eap-pwd \
+freeradius3-mod-exec \
+freeradius3-mod-expiration \
+freeradius3-mod-expr \
TITLE:=EAP/TTLS module
endef
+define Package/freeradius3-mod-eap-pwd
+ $(call Package/freeradius3/Default)
+ DEPENDS:=freeradius3-mod-eap @FREERADIUS3_OPENSSL
+ TITLE:=EAP/PWD module
+endef
+
define Package/freeradius3-mod-exec
$(call Package/freeradius3/Default)
DEPENDS:=freeradius3
--without-rlm_couchbase \
--without-rlm_counter \
--without-rlm_eap_ikev2 \
- --without-rlm_eap_pwd \
--without-rlm_eap_sim \
--without-rlm_eap_tnc \
--without-rlm_example \
CONFIGURE_ARGS+= --without-rlm_eap_ttls
endif
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-eap-pwd),)
+ CONFIGURE_ARGS+= \
+ --with-rlm_eap_pwd \
+ --with-rlm_eap_pwd-include-dir="$(STAGING_DIR)/usr/include" \
+ --with-rlm_eap_pwd-lib-dir="$(STAGING_DIR)/usr/lib"
+ CONFIGURE_LIBS+= -lcrypto -lssl
+else
+ CONFIGURE_ARGS+= --without-rlm_eap_pwd
+endif
+
ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-radutmp),)
CONFIGURE_ARGS+= --with-rlm_radutmp
else
$(eval $(call BuildPlugin,freeradius3-mod-eap,rlm_eap,))
$(eval $(call BuildPlugin,freeradius3-mod-eap-tls,rlm_eap_tls,))
$(eval $(call BuildPlugin,freeradius3-mod-eap-ttls,rlm_eap_ttls,))
+$(eval $(call BuildPlugin,freeradius3-mod-eap-pwd,rlm_eap_pwd,))
$(eval $(call BuildPlugin,freeradius3-mod-exec,rlm_exec,))
$(eval $(call BuildPlugin,freeradius3-mod-expiration,rlm_expiration,))
$(eval $(call BuildPlugin,freeradius3-mod-expr,rlm_expr,))
include $(TOPDIR)/rules.mk
PKG_NAME:=fwknop
-PKG_VERSION:=2.6.9
-PKG_RELEASE:=5
+PKG_VERSION:=2.6.10
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=http://www.cipherdyne.org/fwknop/download
-PKG_HASH:=5bf47fe1fd30e862d29464f762c0b8bf89b5e298665c37624d6707826da956d4
+PKG_SOURCE_URL:=https://www.cipherdyne.org/fwknop/download
+PKG_HASH:=f6c09bec97ed8e474a98ae14f9f53e1bcdda33393f20667b6af3fb6bb894ca77
PKG_MAINTAINER:=Jonathan Bennett <JBennett@incomsystems.biz>
-PKG_LICENSE:=GPLv2
+PKG_LICENSE:=GPLv2+
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
define Package/fwknop/Default
TITLE:=FireWall KNock OPerator
- URL:=http://www.cipherdyne.org/fwknop/
+ URL:=https://www.cipherdyne.org/fwknop/
endef
define Package/fwknop/Default/description
PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
PKG_NAME:=go-ethereum
-PKG_VERSION:=1.8.12
+PKG_VERSION:=1.8.15
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/ethereum/go-ethereum/tar.gz/v${PKG_VERSION}?
-PKG_HASH:=53cfd6ff2f82f7a42fa5175e2a795aada4425a22353e5d46008cd566bfb5e239
+PKG_HASH:=5081f21ab53f7eb9b84dbed32c4b58bb1c59a61163a6efaa0e4a8de764177c62
PKG_BUILD_DEPENDS:=golang/host
PKG_BUILD_PARALLEL:=1
include $(TOPDIR)/rules.mk
PKG_NAME:=git
-PKG_VERSION:=2.18.0
+PKG_VERSION:=2.19.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/software/scm/git/
-PKG_HASH:=8b40be383a603147ae29337136c00d1c634bdfdc169a30924a024596a7e30e92
+PKG_HASH:=345056aa9b8084280b1b9fe1374d232dec05a34e8849028a20bfdb56e920dbb5
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
define Package/git-http
$(call Package/git/Default)
- DEPENDS+= +git +libcurl +ca-certificates
+ DEPENDS+= +git +libcurl
TITLE:=Git HTTP commands
endef
endef
define Package/git/install
- $(INSTALL_DIR) $(1)/usr/bin
- $(CP) $(PKG_INSTALL_DIR)/usr/bin/git $(1)/usr/bin
$(RM) $(PKG_INSTALL_DIR)/usr/bin/git-cvsserver
+ $(RM) $(PKG_INSTALL_DIR)/usr/bin/git-shell
+ $(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/git-* $(1)/usr/bin
$(INSTALL_DIR) $(1)/usr/lib/git-core
- ln $(1)/usr/bin/git $(1)/usr/lib/git-core/git
- ln $(1)/usr/bin/git-shell $(1)/usr/lib/git-core/git-shell
- ln $(1)/usr/bin/git-upload-pack $(1)/usr/lib/git-core/git-upload-pack
$(INSTALL_DIR) $(1)/usr/share/git-core/templates
( cd $(PKG_INSTALL_DIR); $(TAR) \
--exclude=usr/lib/git-core/git-http-backend \
--exclude=usr/lib/git-core/git-remote-ftps \
--exclude=usr/lib/git-core/git-remote-http \
--exclude=usr/lib/git-core/git-remote-https \
- --exclude=usr/lib/git-core/git \
- --exclude=usr/lib/git-core/git-shell \
- --exclude=usr/lib/git-core/git-upload-pack \
-cf - \
usr/lib/git-core \
usr/share/git-core/templates \
) | ( cd $(1); $(TAR) -xf - )
+ ln $(1)/usr/lib/git-core/git $(1)/usr/bin/git
+ ln $(1)/usr/lib/git-core/git-shell $(1)/usr/bin/git-shell
endef
define Package/git-http/install
--- a/Makefile
+++ b/Makefile
-@@ -1297,7 +1297,7 @@ else
+@@ -1312,7 +1312,7 @@ else
endif
curl_check := $(shell (echo 072200; $(CURL_CONFIG) --vernum | sed -e '/^70[BC]/s/^/0/') 2>/dev/null | sort -r | sed -ne 2p)
ifeq "$(curl_check)" "072200"
include $(TOPDIR)/rules.mk
PKG_NAME:=gitolite
-PKG_VERSION:=3.6.6
+PKG_VERSION:=3.6.8
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.xz
-PKG_MIRROR_HASH:=b2d96c36682391f45c63b21a91fbe77a969a7b362417c851dd0091a06fcc74d9
+PKG_MIRROR_HASH:=652d3b3f8ed93b8ef56153337465cc7260974e5cd2653e949da1bb97a8421ea0
+
PKG_SOURCE_URL:=https://github.com/sitaramc/gitolite.git
-PKG_SOURCE_VERSION:=908f8c6f3b8ef5b95829be7155be2557e71f4579
+PKG_SOURCE_VERSION:=e126e97a4d5575821f89ae80dac402b017db94aa
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
Gitolite is a system for managing access to git repositories. Note you will need to make
sure dropbear does not interfere with OpenSSH as gitolite depends on feature not in
dropbear (to my knowledge).
+ See https://openwrt.org/docs/guide-user/services/gitolite for a guide on installation.
endef
define Package/gitolite/postinst
sed -i -e 's,/var/run/git,/srv/git,' $${IPKG_INSTROOT}/etc/passwd
sed -i -e 's,git:\(.*\):/bin/false,git:\1:/bin/ash,' $${IPKG_INSTROOT}/etc/passwd
+sed -i -e 's,git:x:0:\(.*\)$$,git:x:99999:\1,' $${IPKG_INSTROOT}/etc/shadow
endef
define Build/Configure
+++ /dev/null
-From d0409ae1164030913801d37ce5425ed93529c69d Mon Sep 17 00:00:00 2001
-From: Daniel Dickinson <gitolite@daniel.thecshore.com>
-Date: Fri, 1 Jul 2016 00:37:23 -0400
-Subject: [PATCH] Conf::Store: Fix missing hooks dir for symlink
-
-At least when doing 'gitolite setup -pk user.pub', the
-symlinking of hooks fails because the hooks directory
-does not exist. Make sure we create it if it's missing.
----
- src/lib/Gitolite/Conf/Store.pm | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/lib/Gitolite/Conf/Store.pm b/src/lib/Gitolite/Conf/Store.pm
-index 5568b3f..aac90d4 100644
---- a/src/lib/Gitolite/Conf/Store.pm
-+++ b/src/lib/Gitolite/Conf/Store.pm
-@@ -363,6 +363,7 @@ sub store_common {
- chmod 0755, "$rc{GL_ADMIN_BASE}/hooks/gitolite-admin/post-update";
- $hook_reset++;
- }
-+ _mkdir("$repo.git/hooks");
-
- # propagate user-defined (custom) hooks to all repos
- ln_sf( "$rc{LOCAL_CODE}/hooks/common", "*", "$repo.git/hooks" ) if $rc{LOCAL_CODE};
---
-2.7.4
-
include $(TOPDIR)/rules.mk
PKG_NAME:=gnunet
-PKG_SOURCE_VERSION:=2b99bddcb6961cfda34087138acdda4b8b9ccb9f
-PKG_MIRROR_HASH:=7b1567d4d4b316ed4b70372bbcfc2039a93d6a7bbf24c2b3036b2c7f3bccc9b4
+PKG_SOURCE_VERSION:=e0785bb1b2af91a38d161bda7a4075338579441a
+PKG_MIRROR_HASH:=4cbb9cf48f18fa87aa7c81bcff2372fc9c04c3688fb8dd4b2b57da258050179b
-PKG_VERSION:=0.10.2-git-20180607-$(PKG_SOURCE_VERSION)
-PKG_RELEASE:=3
+PKG_VERSION:=0.10.2-git-20181021-$(PKG_SOURCE_VERSION)
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
$(INSTALL_DIR) $(1)/usr/share/gnunet/config.d $(1)/usr/share/gnunet/hellos
( for bin in arm ats cadet core config ecc identity nat nat-auto nat-server nse \
- peerinfo revocation scalarproduct statistics transport uri; do \
+ peerinfo revocation scalarproduct scrypt statistics transport uri; do \
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gnunet-$$$$bin $(1)/usr/bin/ ; \
done )
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnunet$$$$lib.so* $(1)/usr/lib/ ; \
done )
- ( for plug in ats_proportional block_dht block_regex block_revocation \
- transport_tcp transport_udp transport_unix; do \
+ ( for plug in ats_proportional block_dht block_regex block_revocation transport_unix; do \
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_$$$$plug*.so $(1)/usr/lib/gnunet ; \
done )
BIN_dht-cli:=dht-get dht-put dht-monitor
PLUGIN_dht-cli:=block_test
-DEPENDS_hostlist:=+libmicrohttpd +libgnurl +ca-certificates
+DEPENDS_curl:=+libgnurl +jansson
+LIB_curl:=curl
+
+DEPENDS_hostlist:=+libmicrohttpd +gnunet-curl +ca-certificates
LIBEXEC_hostlist:=daemon-hostlist
CONF_hostlist:=hostlist
-DEPENDS_transport-http_client:=+libgnurl +ca-certificates
+DEPENDS_transport-bluetooth:=+bluez-libs
+PLUGIN_transport-bluetooth:=transport_bluetooth
+LIBEXEC_transport-bluetooth:=helper-transport-bluetooth
+
+DEPENDS_transport-http_client:=+gnunet-curl +ca-certificates
PLUGIN_transport-http_client:=transport_http_client transport_https_client
DEPENDS_transport-http_server:=+libmicrohttpd
PLUGIN_transport-http_server:=transport_http_server transport_https_server
+PLUGIN_transport-tcp:=transport_tcp
+
+PLUGIN_transport-udp:=transport_udp
+
PLUGIN_transport-wlan:=transport_wlan
LIBEXEC_transport-wlan:=helper-transport-wlan
+PLUGIN_transport-xt:=transport_xt
+
+PLUGIN_transport-xu:=transport_xu
+
DEPENDS_experiments:=+libglpk
PLUGIN_experiments:=ats_mlp ats_ril
DEPENDS_gns:=+gnunet-vpn +iptables-mod-extra
USERID_gns:=gnunet=958:gnunetdns=452
-BIN_gns:=gns gns-import.sh namecache namestore resolver
+BIN_gns:=gns gns-import.sh namecache namestore resolver zoneimport
LIB_gns:=gns gnsrecord namecache namestore
PLUGIN_gns:=block_dns block_gns gnsrecord_conversation gnsrecord_dns gnsrecord_gns
LIBEXEC_gns:=dns2gns helper-dns service-dns service-gns service-namecache service-namestore service-resolver service-zonemaster
DEPENDS_namestore-fcfsd:=+gnunet-gns +libmicrohttpd
LIBEXEC_namestore-fcfsd:=namestore-fcfsd
-DEPENDS_gns-proxy:=+gnunet-gns +libgnurl +libmicrohttpd
+DEPENDS_gns-proxy:=+gnunet-gns +gnunet-curl +libmicrohttpd
LIBEXEC_gns-proxy:=gns-proxy
DEPENDS_datastore:=+gnunet-gns
CONF_peerstore:=peerstore
DEPENDS_rest:=+gnunet-gns +gnunet-social +libmicrohttpd +jansson
-LIB_rest:=rest json jsonapi jsonapiutils
-PLUGIN_rest:=rest_gns rest_identity rest_identity_provider rest_namestore
+LIB_rest:=rest json
+PLUGIN_rest:=rest_copying rest_gns rest_identity rest_namestore rest_peerinfo rest_openid_connect rest_reclaim
LIBEXEC_rest:=rest-server
CONF_rest:=rest
LIBEXEC_rps:=service-rps
CONF_rps:=rps
-DEPENDS_social:=+gnunet-gns +libmicrohttpd +jansson
-BIN_social:=identity-token multicast social
-LIB_social:=consensus identityprovider multicast psyc psycstore psycutil secretsharing social
-LIBEXEC_social:=service-consensus service-evil-consensus service-identity-provider service-multicast service-psyc service-psycstore service-secretsharing service-social
-CONF_social:=consensus multicast psyc psycstore secretsharing social
-PLUGINS_social:=block_consensus
+DEPENDS_social:=+gnunet-gns +libmicrohttpd +jansson +libpbc +libgabe
+BIN_social:=credential identity-token multicast reclaim social
+LIB_social:=abe consensus credential identityprovider multicast psyc psycstore psycutil reclaim reclaimattribute secretsharing social
+LIBEXEC_social:=service-consensus service-credential service-evil-consensus service-identity-provider service-multicast service-psyc service-psycstore service-reclaim service-secretsharing service-social
+CONF_social:=consensus credential multicast psyc psycstore reclaim secretsharing social
+PLUGIN_social:=block_consensus gnsrecord_credential gnsrecord_reclaim reclaim_attribute_gnuid
PLUGIN_dhtcache-heap:=datacache_heap
CONFLICTS_dhtcache-heap:=gnunet-dhtcache-pgsql gnunet-dhtcache-sqlite
DEPENDS_gns-flat:=+gnunet-gns
-PLUGIN_gns-flat:=namecache_flat namestore_flat
+PLUGIN_gns-flat:=namecache_flat namestore_heap
DEPENDS_peerstore-flat:=+gnunet-peerstore
PLUGIN_peerstore-flat:=peerstore_flat
DEPENDS_fs-sqlite:=+gnunet-datastore +gnunet-sqlite
PLUGIN_fs-sqlite:=datastore_sqlite
-DEPENDS_social-sqlite:=+gnunet-social +gnunet-sqlite
-PLUGIN_social-sqlite:=psycstore_sqlite
+DEPENDS_social-sqlite:=+gnunet-social +gnunet-sqlite
+PLUGIN_social-sqlite:=psycstore_sqlite reclaim_sqlite
-DEPENDS_transport-bluetooth:=+bluez-libs
-PLUGIN_transport-bluetooth:=transport_bluetooth
-LIBEXEC_transport-bluetooth:=helper-transport-bluetooth
DEPENDS_utils:=+certtool +openssl-util
BIN_utils:=gns-proxy-setup-ca transport-certificate-creation
$(eval $(call BuildPackage,gnunet))
$(eval $(call BuildComponent,conversation,conversation component,))
+$(eval $(call BuildComponent,curl,cURL wrapper component,))
$(eval $(call BuildComponent,datastore,data storage components,))
$(eval $(call BuildComponent,dht-cli,DHT command line clients,))
# $(eval $(call BuildComponent,dv,distance-vector routing component,y))
$(eval $(call BuildComponent,transport-bluetooth,bluetooth transport,))
$(eval $(call BuildComponent,transport-http_client,HTTP/HTTPS client transport,y))
$(eval $(call BuildComponent,transport-http_server,HTTP/HTTPS server transport,))
+$(eval $(call BuildComponent,transport-tcp,TCP transport,y))
+$(eval $(call BuildComponent,transport-udp,UDP transport,y))
$(eval $(call BuildComponent,transport-wlan,WLAN transport,y))
+$(eval $(call BuildComponent,transport-xt,xt transport,))
+$(eval $(call BuildComponent,transport-xu,xu transport,))
$(eval $(call BuildComponent,utils,administration utililties,))
$(eval $(call BuildComponent,vpn,vpn components,y))
uci -q get gnunet.namecache || uci set gnunet.namecache=gnunet-config
uci -q batch <<EOF
- del gnunet.namestore_flat
- set gnunet.namestore_flat=gnunet-config
- set gnunet.namestore_flat.FILENAME=/etc/gnunet/namestore.flat
- set gnunet.namestore.DATABASE=flat
+ del gnunet.namestore_heap
+ set gnunet.namestore_heap=gnunet-config
+ set gnunet.namestore_heap.FILENAME=/etc/gnunet/namestore.flat
+ set gnunet.namestore.DATABASE=heap
del gnunet.namecache_flat
set gnunet.namecache_flat=gnunet-config
set gnunet.namecache_flat.FILENAME=/var/run/gnunet/namecache.flat
include $(TOPDIR)/rules.mk
PKG_NAME:=gnurl
-PKG_VERSION:=7.57.0
+PKG_VERSION:=7.61.1
PKG_RELEASE:=2
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=https://gnunet.org/sites/default/files
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=git://git.taler.net/gnurl
+PKG_SOURCE_VERSION:=64adbb00957f178bb7b9b1dbf0d0de1f5c45949d
-PKG_HASH:=2ccd2a641a9815df924b6a79ee47d12a27ee43bd05a3c6ba958108564580d3b7
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_MIRROR_HASH:=6f6c993a13fe30989cb918c987604ca96c178f4bb682c298ab345257e4aab284
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=COPYING
--enable-shared \
--enable-static \
--without-axtls \
+ --without-brotli \
--without-libssh2 \
--without-libmetalink \
--without-winidn \
--without-nghttp2 \
--without-nss \
--without-cyassl \
+ --without-libpsl \
--without-polarssl \
--without-ssl \
--without-winssl \
--without-darwinssl \
--disable-ares \
--disable-sspi \
+ --disable-crypto-auth \
--disable-ntlm-wb \
+ --disable-tls-srp \
--disable-ldap \
--disable-ldaps \
--disable-rtsp \
#
# Copyright (C) 2010-2016 OpenWrt.org
# Copyright (C) 2009-2016 Thomas Heil <heil@terminal-consulting.de>
+# Copyright (C) 2018 Christian Lachner <gladiac@gmail.com>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=haproxy
-PKG_VERSION:=1.8.12
-PKG_RELEASE:=00
+PKG_VERSION:=1.8.14
+PKG_RELEASE:=4
PKG_SOURCE:=haproxy-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.haproxy.org/download/1.8/src/
-PKG_HASH:=f438a98e657935fa8fad48b98d9029a399e0ad9105cf0e7e8e54365f93d83e9b
+PKG_HASH:=b17e402578be85e58af7a3eac99b1f675953bea9f67af2e964cf8bdbd1bd3fdf
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=GPL-2.0
-MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
-
-ifneq ($(PKG_RELEASE),00)
- BUILD_VERSION:=-patch$(PKG_RELEASE)
-endif
+MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>, \
+ Christian Lachner <gladiac@gmail.com>
include $(INCLUDE_DIR)/package.mk
URL:=https://www.haproxy.org/
endef
-define Download/lua534
- FILE:=lua-5.3.4.tar.gz
+define Download/lua535
+ FILE:=lua-5.3.5.tar.gz
URL:=https://www.lua.org/ftp/
- HASH:=f681aa518233bc407e23acf0f5887c884f17436f000d453b2491a9f11a52400c
+ HASH:=0c2eed3f960446e1a3e4b9a1ca2f3ff893b6ce41942cf54d5dd59ab4b3b058ac
endef
define Build/Prepare
$(call Build/Prepare/Default)
ifeq ($(ENABLE_LUA),y)
- tar -zxvf $(DL_DIR)/lua-5.3.4.tar.gz -C $(PKG_BUILD_DIR)
- ln -s $(PKG_BUILD_DIR)/lua-5.3.4 $(PKG_BUILD_DIR)/lua
+ tar -zxvf $(DL_DIR)/lua-5.3.5.tar.gz -C $(PKG_BUILD_DIR)
+ ln -s $(PKG_BUILD_DIR)/lua-5.3.5 $(PKG_BUILD_DIR)/lua
endif
endef
endef
define Package/haproxy
- DEPENDS+= +libpcre +libltdl +zlib +libpthread +libopenssl +libncursesw +libreadline +libatomic +@OPENSSL_WITH_DEPRECATED +@OPENSSL_WITH_EC +@OPENSSL_WITH_EC2M +@OPENSSL_WITH_DTLS +@OPENSSL_WITH_COMPRESSION +@OPENSSL_WITH_NPN +@OPENSSL_WITH_PSK +@OPENSSL_WITH_SRP +@OPENSSL_ENGINE_DIGEST +@OPENSSL_ENGINE_CRYPTO
-
+ DEPENDS+= +libpcre +libltdl +zlib +libpthread +libopenssl +libncursesw +libreadline +libatomic
TITLE+= (with SSL support)
VARIANT:=ssl
$(call Package/haproxy/Default)
ENABLE_REGPARM:=y
endif
-ifeq ($(CONFIG_avr32),y)
- LINUX_TARGET:=linux26
-else
- LINUX_TARGET:=linux2628
-endif
+LINUX_TARGET:=linux2628
ifeq ($(BUILD_VARIANT),ssl)
ADDON+=USE_OPENSSL=1
ifeq ($(ENABLE_LUA),y)
ADDON+=USE_LUA=1
- ADDON+=LUA_LIB_NAME="lua534"
- ADDON+=LUA_INC="$(STAGING_DIR)/lua-5.3.4/include"
- ADDON+=LUA_LIB="$(STAGING_DIR)/lua-5.3.4/lib"
+ ADDON+=LUA_LIB_NAME="lua535"
+ ADDON+=LUA_INC="$(STAGING_DIR)/lua-5.3.5/include"
+ ADDON+=LUA_LIB="$(STAGING_DIR)/lua-5.3.5/lib"
endif
ifeq ($(ENABLE_REGPARM),y)
ifeq ($(ENABLE_LUA),y)
define Build/Compile/lua
$(MAKE) TARGET=$(LINUX_TARGET) -C $(PKG_BUILD_DIR)/lua \
- INSTALL_TOP="$(STAGING_DIR)/lua-5.3.4/" \
+ INSTALL_TOP="$(STAGING_DIR)/lua-5.3.5/" \
CC="$(TARGET_CC)" \
CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS) -lncurses -lreadline" \
LD="$(TARGET_LD)" \
linux install
- mv $(STAGING_DIR)/lua-5.3.4/lib/liblua.a $(STAGING_DIR)/lua-5.3.4/lib/liblua534.a
+ mv $(STAGING_DIR)/lua-5.3.5/lib/liblua.a $(STAGING_DIR)/lua-5.3.5/lib/liblua535.a
endef
endif
SMALL_OPTS="-DBUFSIZE=16384 -DMAXREWRITE=1030 -DSYSTEM_MAXCONN=165530 " \
USE_LINUX_TPROXY=1 USE_LINUX_SPLICE=1 USE_TFO=1 \
USE_ZLIB=yes USE_PCRE=1 USE_PCRE_JIT=1 USE_GETADDRINFO=1 \
- VERSION="$(PKG_VERSION)$(BUILD_VERSION)" \
+ VERSION="$(PKG_VERSION)-$(PKG_RELEASE)" \
$(ADDON) \
CFLAGS="$(TARGET_CFLAGS)" \
LD="$(TARGET_CC)" \
DESTDIR="$(PKG_INSTALL_DIR)" \
$(MAKE_FLAGS) \
ADDLIB="-lcrypto" \
- VERSION="$(PKG_VERSION)-patch$(PKG_RELEASE)" \
+ VERSION="$(PKG_VERSION)-$(PKG_RELEASE)" \
halog
endef
$(INSTALL_BIN) $(PKG_BUILD_DIR)/contrib/halog/halog $(1)/usr/bin/
endef
-$(eval $(call Download,lua534))
+$(eval $(call Download,lua535))
$(eval $(call BuildPackage,haproxy))
$(eval $(call BuildPackage,halog))
$(eval $(call BuildPackage,haproxy-nossl))
#!/bin/bash
CLONEURL=http://git.haproxy.org/git/haproxy-1.8.git
-BASE_TAG=v1.8.12
+BASE_TAG=v1.8.14
TMP_REPODIR=tmprepo
PATCHESDIR=patches
--- /dev/null
+commit 14844e448b637fea2770bcb03a43a010c4c8176d
+Author: Olivier Houchard <ohouchard@haproxy.com>
+Date: Thu Sep 27 14:55:34 2018 +0200
+
+ MINOR: threads: Make sure threads_sync_pipe is initialized before using it.
+
+ thread_want_sync() might be called before thread_sync_init() was called,
+ at least when reading the server state file, as apply_server_state() is called
+ before thread_sync_init(). So make sure the threads_sync_pipe was initialized
+ before writing to it, if it was not, there's no thread, so no need to sync
+ anything anyway, and if we don't check it we'll end up writing a 'S' on
+ stdin.
+
+ this only applies to 1.8.
+
+diff --git a/src/hathreads.c b/src/hathreads.c
+index 97ed31c5..9dba4356 100644
+--- a/src/hathreads.c
++++ b/src/hathreads.c
+@@ -28,7 +28,7 @@ void thread_sync_io_handler(int fd)
+ #ifdef USE_THREAD
+
+ static HA_SPINLOCK_T sync_lock;
+-static int threads_sync_pipe[2];
++static int threads_sync_pipe[2] = {-1, -1};
+ static unsigned long threads_want_sync = 0;
+ volatile unsigned long threads_want_rdv_mask = 0;
+ volatile unsigned long threads_harmless_mask = 0;
+@@ -76,7 +76,8 @@ void thread_want_sync()
+ if (all_threads_mask & (all_threads_mask - 1)) {
+ if (threads_want_sync & tid_bit)
+ return;
+- if (HA_ATOMIC_OR(&threads_want_sync, tid_bit) == tid_bit)
++ if (HA_ATOMIC_OR(&threads_want_sync, tid_bit) == tid_bit &&
++ threads_sync_pipe[1] != -1)
+ shut_your_big_mouth_gcc(write(threads_sync_pipe[1], "S", 1));
+ }
+ else {
--- /dev/null
+commit 18aff2297ce844362f28ea5317c289ba154bd33d
+Author: Lukas Tribus <lukas@ltri.eu>
+Date: Mon Oct 1 02:00:16 2018 +0200
+
+ DOC: clarify force-private-cache is an option
+
+ "boolean" may confuse users into thinking they need to provide
+ additional arguments, like false or true. This is a simple option
+ like many others, so lets not confuse the users with internals.
+
+ Also fixes an additional typo.
+
+ Should be backported to 1.8 and 1.7.
+
+ (cherry picked from commit 2793578eaf934bbf28f742a35f3a1ae656280324)
+ Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+
+diff --git a/doc/configuration.txt b/doc/configuration.txt
+index c69033b1..580194ec 100644
+--- a/doc/configuration.txt
++++ b/doc/configuration.txt
+@@ -1651,7 +1651,7 @@ tune.ssl.cachesize <number>
+ this value to 0 disables the SSL session cache.
+
+ tune.ssl.force-private-cache
+- This boolean disables SSL session cache sharing between all processes. It
++ This option disables SSL session cache sharing between all processes. It
+ should normally not be used since it will force many renegotiations due to
+ clients hitting a random process. But it may be required on some operating
+ systems where none of the SSL cache synchronization method may be used. In
+@@ -6535,7 +6535,7 @@ option smtpchk <hello> <domain>
+ yes | no | yes | yes
+ Arguments :
+ <hello> is an optional argument. It is the "hello" command to use. It can
+- be either "HELO" (for SMTP) or "EHLO" (for ESTMP). All other
++ be either "HELO" (for SMTP) or "EHLO" (for ESMTP). All other
+ values will be turned into the default command ("HELO").
+
+ <domain> is the domain name to present to the server. It may only be
--- /dev/null
+commit f6d20e718131aa2b468ff0a6c42e20c0b900e58b
+Author: Ilya Shipitsin <chipitsine@gmail.com>
+Date: Sat Sep 15 00:50:05 2018 +0500
+
+ BUG/MINOR: connection: avoid null pointer dereference in send-proxy-v2
+
+ found by coverity.
+
+ [wt: this bug was introduced by commit 404d978 ("MINOR: add ALPN
+ information to send-proxy-v2"). It might be triggered by a health
+ check on a server using ppv2 or by an applet making use of such a
+ server, if at all configurable].
+
+ This needs to be backported to 1.8.
+
+ (cherry picked from commit ca56fce8bd271928b18d38b439bd35bd273fe8d4)
+ Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+
+diff --git a/src/connection.c b/src/connection.c
+index 8c5af156..7403e8ae 100644
+--- a/src/connection.c
++++ b/src/connection.c
+@@ -874,6 +874,7 @@ int conn_recv_netscaler_cip(struct connection *conn, int flag)
+ return 0;
+ }
+
++/* Note: <remote> is explicitly allowed to be NULL */
+ int make_proxy_line(char *buf, int buf_len, struct server *srv, struct connection *remote)
+ {
+ int ret = 0;
+@@ -985,6 +986,7 @@ static int make_tlv(char *dest, int dest_len, char type, uint16_t length, const
+ return length + sizeof(*tlv);
+ }
+
++/* Note: <remote> is explicitly allowed to be NULL */
+ int make_proxy_line_v2(char *buf, int buf_len, struct server *srv, struct connection *remote)
+ {
+ const char pp2_signature[] = PP2_SIGNATURE;
+@@ -1060,7 +1062,7 @@ int make_proxy_line_v2(char *buf, int buf_len, struct server *srv, struct connec
+ }
+ }
+
+- if (conn_get_alpn(remote, &value, &value_len)) {
++ if (remote && conn_get_alpn(remote, &value, &value_len)) {
+ if ((buf_len - ret) < sizeof(struct tlv))
+ return 0;
+ ret += make_tlv(&buf[ret], (buf_len - ret), PP2_TYPE_ALPN, value_len, value);
--- /dev/null
+commit e725a7f9bfd8b7fe2e74c62c7c6bf2b9ebf83772
+Author: Willy Tarreau <w@1wt.eu>
+Date: Wed Oct 3 10:20:19 2018 +0200
+
+ BUG/MINOR: backend: check that the mux installed properly
+
+ The return value from conn_install_mux() was not checked, so if an
+ inconsistency happens in the code, or a memory allocation fails while
+ initializing the mux, we can crash while using an uninitialized mux.
+ In practice the code inconsistency does not really happen since we
+ cannot configure such a situation, except during development, but
+ the out of memory condition could definitely happen.
+
+ This should be backported to 1.8 (the code is a bit different there,
+ there are two calls to conn_install_mux()).
+
+ (cherry picked from commit 33dd4ef81245bb868b22f99b9be45d0791131eec)
+ Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+
+diff --git a/src/backend.c b/src/backend.c
+index 2b6167dc..fc1eac0d 100644
+--- a/src/backend.c
++++ b/src/backend.c
+@@ -1163,7 +1163,8 @@ int connect_server(struct stream *s)
+ if (srv) {
+ conn_prepare(srv_conn, protocol_by_family(srv_conn->addr.to.ss_family), srv->xprt);
+ /* XXX: Pick the right mux, when we finally have one */
+- conn_install_mux(srv_conn, &mux_pt_ops, srv_cs);
++ if (conn_install_mux(srv_conn, &mux_pt_ops, srv_cs) < 0)
++ return SF_ERR_INTERNAL;
+ }
+ else if (obj_type(s->target) == OBJ_TYPE_PROXY) {
+ /* proxies exclusively run on raw_sock right now */
+@@ -1171,7 +1172,8 @@ int connect_server(struct stream *s)
+ if (!objt_cs(s->si[1].end) || !objt_cs(s->si[1].end)->conn->ctrl)
+ return SF_ERR_INTERNAL;
+ /* XXX: Pick the right mux, when we finally have one */
+- conn_install_mux(srv_conn, &mux_pt_ops, srv_cs);
++ if (conn_install_mux(srv_conn, &mux_pt_ops, srv_cs) < 0)
++ return SF_ERR_INTERNAL;
+ }
+ else
+ return SF_ERR_INTERNAL; /* how did we get there ? */
--- /dev/null
+commit 45e9f3c660c872e93588cf1c0b74c192f2c8c3d5
+Author: Olivier Houchard <ohouchard@haproxy.com>
+Date: Wed Sep 26 15:09:58 2018 +0200
+
+ BUG/MEDIUM: buffers: Make sure we don't wrap in buffer_insert_line2/replace2.
+
+ In buffer_insert_line2() and buffer_replace2(), we can't afford to wrap,
+ so don't use b_tail to check if we do, directly use b->p + b->i instead.
+
+ This should be backported to previous versions.
+
+ (cherry picked from commit 363c745569b6ffd8f095d2b7758131d08aa27219)
+ Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+
+ [cf: This patch was adapted and its commit message too. Because of the
+ refactoring of the buffer's API in 1.9, the original patch fixes same bug in
+ ci_insert_line2/b_rep_blk.]
+
+diff --git a/src/buffer.c b/src/buffer.c
+index 167b75ae..6ad38a02 100644
+--- a/src/buffer.c
++++ b/src/buffer.c
+@@ -107,7 +107,7 @@ int buffer_replace2(struct buffer *b, char *pos, char *end, const char *str, int
+
+ delta = len - (end - pos);
+
+- if (bi_end(b) + delta > b->data + b->size)
++ if (b->p + b->i + delta > b->data + b->size)
+ return 0; /* no space left */
+
+ if (buffer_not_empty(b) &&
+@@ -146,7 +146,7 @@ int buffer_insert_line2(struct buffer *b, char *pos, const char *str, int len)
+
+ delta = len + 2;
+
+- if (bi_end(b) + delta >= b->data + b->size)
++ if (b->p + b->i + delta >= b->data + b->size)
+ return 0; /* no space left */
+
+ if (buffer_not_empty(b) &&
--- /dev/null
+commit 4be76416751aa22992a44f2f5cfdba506809fd89
+Author: Dirkjan Bussink <d.bussink@gmail.com>
+Date: Fri Sep 14 11:14:21 2018 +0200
+
+ MEDIUM: ssl: add support for ciphersuites option for TLSv1.3
+
+ OpenSSL released support for TLSv1.3. It also added a separate function
+ SSL_CTX_set_ciphersuites that is used to set the ciphers used in the
+ TLS 1.3 handshake. This change adds support for that new configuration
+ option by adding a ciphersuites configuration variable that works
+ essentially the same as the existing ciphers setting.
+
+ Note that it should likely be backported to 1.8 in order to ease usage
+ of the now released openssl-1.1.1.
+
+ (cherry picked from commit 415150f7640b06740fa832363d186c5c6565338e)
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+
+diff --git a/doc/configuration.txt b/doc/configuration.txt
+index 580194ec..7a268386 100644
+--- a/doc/configuration.txt
++++ b/doc/configuration.txt
+@@ -580,8 +580,10 @@ The following keywords are supported in the "global" section :
+ - setenv
+ - stats
+ - ssl-default-bind-ciphers
++ - ssl-default-bind-ciphersuites
+ - ssl-default-bind-options
+ - ssl-default-server-ciphers
++ - ssl-default-server-ciphersuites
+ - ssl-default-server-options
+ - ssl-dh-param-file
+ - ssl-server-verify
+@@ -984,11 +986,25 @@ setenv <name> <value>
+ ssl-default-bind-ciphers <ciphers>
+ This setting is only available when support for OpenSSL was built in. It sets
+ the default string describing the list of cipher algorithms ("cipher suite")
+- that are negotiated during the SSL/TLS handshake for all "bind" lines which
+- do not explicitly define theirs. The format of the string is defined in
+- "man 1 ciphers" from OpenSSL man pages, and can be for instance a string such
+- as "AES:ALL:!aNULL:!eNULL:+RC4:@STRENGTH" (without quotes). Please check the
+- "bind" keyword for more information.
++ that are negotiated during the SSL/TLS handshake except for TLSv1.3 for all
++ "bind" lines which do not explicitly define theirs. The format of the string
++ is defined in "man 1 ciphers" from OpenSSL man pages, and can be for instance
++ a string such as "AES:ALL:!aNULL:!eNULL:+RC4:@STRENGTH" (without quotes). For
++ TLSv1.3 cipher configuration, please check the "ssl-default-bind-ciphersuites"
++ keyword. Please check the "bind" keyword for more information.
++
++ssl-default-bind-ciphersuites <ciphersuites>
++ This setting is only available when support for OpenSSL was built in and
++ OpenSSL 1.1.1 or later was used to build HAProxy. It sets the default string
++ describing the list of cipher algorithms ("cipher suite") that are negotiated
++ during the TLSv1.3 handshake for all "bind" lines which do not explicitly define
++ theirs. The format of the string is defined in
++ "man 1 ciphers" from OpenSSL man pages under the section "ciphersuites", and can
++ be for instance a string such as
++ "TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256"
++ (without quotes). For cipher configuration for TLSv1.2 and earlier, please check
++ the "ssl-default-bind-ciphers" keyword. Please check the "bind" keyword for more
++ information.
+
+ ssl-default-bind-options [<option>]...
+ This setting is only available when support for OpenSSL was built in. It sets
+@@ -1002,10 +1018,21 @@ ssl-default-bind-options [<option>]...
+ ssl-default-server-ciphers <ciphers>
+ This setting is only available when support for OpenSSL was built in. It
+ sets the default string describing the list of cipher algorithms that are
+- negotiated during the SSL/TLS handshake with the server, for all "server"
+- lines which do not explicitly define theirs. The format of the string is
+- defined in "man 1 ciphers". Please check the "server" keyword for more
+- information.
++ negotiated during the SSL/TLS handshake except for TLSv1.3 with the server,
++ for all "server" lines which do not explicitly define theirs. The format of
++ the string is defined in "man 1 ciphers". For TLSv1.3 cipher configuration,
++ please check the "ssl-default-server-ciphersuites" keyword. Please check the
++ "server" keyword for more information.
++
++ssl-default-server-ciphersuites <ciphersuites>
++ This setting is only available when support for OpenSSL was built in and
++ OpenSSL 1.1.1 or later was used to build HAProxy. It sets the default
++ string describing the list of cipher algorithms that are negotiated during
++ the TLSv1.3 handshake with the server, for all "server" lines which do not
++ explicitly define theirs. The format of the string is defined in
++ "man 1 ciphers" under the "ciphersuites" section. For cipher configuration for
++ TLSv1.2 and earlier, please check the "ssl-default-server-ciphers" keyword.
++ Please check the "server" keyword for more information.
+
+ ssl-default-server-options [<option>]...
+ This setting is only available when support for OpenSSL was built in. It sets
+@@ -10510,13 +10537,26 @@ ca-sign-pass <passphrase>
+ ciphers <ciphers>
+ This setting is only available when support for OpenSSL was built in. It sets
+ the string describing the list of cipher algorithms ("cipher suite") that are
+- negotiated during the SSL/TLS handshake. The format of the string is defined
+- in "man 1 ciphers" from OpenSSL man pages, and can be for instance a string
+- such as "AES:ALL:!aNULL:!eNULL:+RC4:@STRENGTH" (without quotes).
+- Depending on the compatibility and security requirements, the list of suitable
+- ciphers depends on a variety of variables. For background information and
+- recommendations see e. g. (https://wiki.mozilla.org/Security/Server_Side_TLS)
+- and (https://mozilla.github.io/server-side-tls/ssl-config-generator/).
++ negotiated during the SSL/TLS handshake except for TLSv1.3. The format of the
++ string is defined in "man 1 ciphers" from OpenSSL man pages, and can be for
++ instance a string such as "AES:ALL:!aNULL:!eNULL:+RC4:@STRENGTH" (without
++ quotes). Depending on the compatibility and security requirements, the list
++ of suitable ciphers depends on a variety of variables. For background
++ information and recommendations see e.g.
++ (https://wiki.mozilla.org/Security/Server_Side_TLS) and
++ (https://mozilla.github.io/server-side-tls/ssl-config-generator/). For TLSv1.3
++ cipher configuration, please check the "ciphersuites" keyword.
++
++ciphersuites <ciphersuites>
++ This setting is only available when support for OpenSSL was built in and
++ OpenSSL 1.1.1 or later was used to build HAProxy. It sets the string describing
++ the list of cipher algorithms ("cipher suite") that are negotiated during the
++ TLSv1.3 handshake. The format of the string is defined in "man 1 ciphers" from
++ OpenSSL man pages under the "ciphersuites" section, and can be for instance a
++ string such as
++ "TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256"
++ (without quotes). For cipher configuration for TLSv1.2 and earlier, please check
++ the "ciphers" keyword.
+
+ crl-file <crlfile>
+ This setting is only available when support for OpenSSL was built in. It
+@@ -11226,8 +11266,9 @@ check-ssl
+ this option.
+
+ ciphers <ciphers>
+- This option sets the string describing the list of cipher algorithms that is
+- is negotiated during the SSL/TLS handshake with the server. The format of the
++ This setting is only available when support for OpenSSL was built in. This
++ option sets the string describing the list of cipher algorithms that is
++ negotiated during the SSL/TLS handshake with the server. The format of the
+ string is defined in "man 1 ciphers". When SSL is used to communicate with
+ servers on the local network, it is common to see a weaker set of algorithms
+ than what is used over the internet. Doing so reduces CPU usage on both the
+@@ -11235,6 +11276,13 @@ ciphers <ciphers>
+ Some algorithms such as RC4-SHA1 are reasonably cheap. If no security at all
+ is needed and just connectivity, using DES can be appropriate.
+
++ciphersuites <ciphersuites>
++ This setting is only available when support for OpenSSL was built in and
++ OpenSSL 1.1.1 or later was used to build HAProxy. This option sets the string
++ describing the list of cipher algorithms that is negotiated during the TLS
++ 1.3 handshake with the server. The format of the string is defined in
++ "man 1 ciphers" under the "ciphersuites" section.
++
+ cookie <value>
+ The "cookie" parameter sets the cookie value assigned to the server to
+ <value>. This value will be checked in incoming requests, and the first
+diff --git a/include/common/defaults.h b/include/common/defaults.h
+index f53c611e..a45ab0da 100644
+--- a/include/common/defaults.h
++++ b/include/common/defaults.h
+@@ -234,11 +234,21 @@
+ #define CONNECT_DEFAULT_CIPHERS NULL
+ #endif
+
++/* ciphers used as defaults on TLS 1.3 connect */
++#ifndef CONNECT_DEFAULT_CIPHERSUITES
++#define CONNECT_DEFAULT_CIPHERSUITES NULL
++#endif
++
+ /* ciphers used as defaults on listeners */
+ #ifndef LISTEN_DEFAULT_CIPHERS
+ #define LISTEN_DEFAULT_CIPHERS NULL
+ #endif
+
++/* cipher suites used as defaults on TLS 1.3 listeners */
++#ifndef LISTEN_DEFAULT_CIPHERSUITES
++#define LISTEN_DEFAULT_CIPHERSUITES NULL
++#endif
++
+ /* named curve used as defaults for ECDHE ciphers */
+ #ifndef ECDHE_DEFAULT_CURVE
+ #define ECDHE_DEFAULT_CURVE "prime256v1"
+diff --git a/include/types/listener.h b/include/types/listener.h
+index c55569cd..ea2eadb5 100644
+--- a/include/types/listener.h
++++ b/include/types/listener.h
+@@ -128,6 +128,9 @@ struct ssl_bind_conf {
+ char *ca_file; /* CAfile to use on verify */
+ char *crl_file; /* CRLfile to use on verify */
+ char *ciphers; /* cipher suite to use if non-null */
++#if (OPENSSL_VERSION_NUMBER >= 0x10101000L && !defined OPENSSL_IS_BORINGSSL && !defined LIBRESSL_VERSION_NUMBER)
++ char *ciphersuites; /* TLS 1.3 cipher suite to use if non-null */
++#endif
+ char *curves; /* curves suite to use for ECDHE */
+ char *ecdhe; /* named curve to use for ECDHE */
+ struct tls_version_filter ssl_methods; /* ssl methods */
+diff --git a/include/types/server.h b/include/types/server.h
+index fd3c8bad..79ae7b72 100644
+--- a/include/types/server.h
++++ b/include/types/server.h
+@@ -281,6 +281,9 @@ struct server {
+ int allocated_size;
+ } * reused_sess;
+ char *ciphers; /* cipher suite to use if non-null */
++#if (OPENSSL_VERSION_NUMBER >= 0x10101000L && !defined OPENSSL_IS_BORINGSSL && !defined LIBRESSL_VERSION_NUMBER)
++ char *ciphersuites; /* TLS 1.3 cipher suite to use if non-null */
++#endif
+ int options; /* ssl options */
+ int verify; /* verify method (set of SSL_VERIFY_* flags) */
+ struct tls_version_filter methods; /* ssl methods */
+diff --git a/src/server.c b/src/server.c
+index 842e4149..4941bd03 100644
+--- a/src/server.c
++++ b/src/server.c
+@@ -1380,6 +1380,10 @@ static void srv_ssl_settings_cpy(struct server *srv, struct server *src)
+ srv->ssl_ctx.verify_host = strdup(src->ssl_ctx.verify_host);
+ if (src->ssl_ctx.ciphers != NULL)
+ srv->ssl_ctx.ciphers = strdup(src->ssl_ctx.ciphers);
++#if (OPENSSL_VERSION_NUMBER >= 0x10101000L && !defined OPENSSL_IS_BORINGSSL && !defined LIBRESSL_VERSION_NUMBER)
++ if (src->ssl_ctx.ciphersuites != NULL)
++ srv->ssl_ctx.ciphersuites = strdup(src->ssl_ctx.ciphersuites);
++#endif
+ if (src->sni_expr != NULL)
+ srv->sni_expr = strdup(src->sni_expr);
+ }
+diff --git a/src/ssl_sock.c b/src/ssl_sock.c
+index 08fdffab..2da0df68 100644
+--- a/src/ssl_sock.c
++++ b/src/ssl_sock.c
+@@ -169,6 +169,10 @@ static struct {
+
+ char *listen_default_ciphers;
+ char *connect_default_ciphers;
++#if (OPENSSL_VERSION_NUMBER >= 0x10101000L && !defined OPENSSL_IS_BORINGSSL && !defined LIBRESSL_VERSION_NUMBER)
++ char *listen_default_ciphersuites;
++ char *connect_default_ciphersuites;
++#endif
+ int listen_default_ssloptions;
+ int connect_default_ssloptions;
+ struct tls_version_filter listen_default_sslmethods;
+@@ -186,6 +190,14 @@ static struct {
+ #endif
+ #ifdef CONNECT_DEFAULT_CIPHERS
+ .connect_default_ciphers = CONNECT_DEFAULT_CIPHERS,
++#endif
++#if (OPENSSL_VERSION_NUMBER >= 0x10101000L && !defined OPENSSL_IS_BORINGSSL && !defined LIBRESSL_VERSION_NUMBER)
++#ifdef LISTEN_DEFAULT_CIPHERSUITES
++ .listen_default_ciphersuites = LISTEN_DEFAULT_CIPHERSUITES,
++#endif
++#ifdef CONNECT_DEFAULT_CIPHERSUITES
++ .connect_default_ciphersuites = CONNECT_DEFAULT_CIPHERSUITES,
++#endif
+ #endif
+ .listen_default_ssloptions = BC_SSL_O_NONE,
+ .connect_default_ssloptions = SRV_SSL_O_NONE,
+@@ -3528,6 +3540,10 @@ void ssl_sock_free_ssl_conf(struct ssl_bind_conf *conf)
+ conf->crl_file = NULL;
+ free(conf->ciphers);
+ conf->ciphers = NULL;
++#if (OPENSSL_VERSION_NUMBER >= 0x10101000L && !defined OPENSSL_IS_BORINGSSL && !defined LIBRESSL_VERSION_NUMBER)
++ free(conf->ciphersuites);
++ conf->ciphersuites = NULL;
++#endif
+ free(conf->curves);
+ conf->curves = NULL;
+ free(conf->ecdhe);
+@@ -4061,6 +4077,9 @@ int ssl_sock_prepare_ctx(struct bind_conf *bind_conf, struct ssl_bind_conf *ssl_
+ int verify = SSL_VERIFY_NONE;
+ struct ssl_bind_conf __maybe_unused *ssl_conf_cur;
+ const char *conf_ciphers;
++#if (OPENSSL_VERSION_NUMBER >= 0x10101000L && !defined OPENSSL_IS_BORINGSSL && !defined LIBRESSL_VERSION_NUMBER)
++ const char *conf_ciphersuites;
++#endif
+ const char *conf_curves = NULL;
+
+ if (ssl_conf) {
+@@ -4160,6 +4179,16 @@ int ssl_sock_prepare_ctx(struct bind_conf *bind_conf, struct ssl_bind_conf *ssl_
+ cfgerr++;
+ }
+
++#if (OPENSSL_VERSION_NUMBER >= 0x10101000L && !defined OPENSSL_IS_BORINGSSL && !defined LIBRESSL_VERSION_NUMBER)
++ conf_ciphersuites = (ssl_conf && ssl_conf->ciphersuites) ? ssl_conf->ciphersuites : bind_conf->ssl_conf.ciphersuites;
++ if (conf_ciphersuites &&
++ !SSL_CTX_set_ciphersuites(ctx, conf_ciphersuites)) {
++ ha_alert("Proxy '%s': unable to set TLS 1.3 cipher suites to '%s' for bind '%s' at [%s:%d].\n",
++ curproxy->id, conf_ciphersuites, bind_conf->arg, bind_conf->file, bind_conf->line);
++ cfgerr++;
++ }
++#endif
++
+ #ifndef OPENSSL_NO_DH
+ /* If tune.ssl.default-dh-param has not been set,
+ neither has ssl-default-dh-file and no static DH
+@@ -4642,6 +4671,16 @@ int ssl_sock_prepare_srv_ctx(struct server *srv)
+ cfgerr++;
+ }
+
++#if (OPENSSL_VERSION_NUMBER >= 0x10101000L && !defined OPENSSL_IS_BORINGSSL && !defined LIBRESSL_VERSION_NUMBER)
++ if (srv->ssl_ctx.ciphersuites &&
++ !SSL_CTX_set_cipher_list(srv->ssl_ctx.ctx, srv->ssl_ctx.ciphersuites)) {
++ ha_alert("Proxy '%s', server '%s' [%s:%d] : unable to set TLS 1.3 cipher suites to '%s'.\n",
++ curproxy->id, srv->id,
++ srv->conf.file, srv->conf.line, srv->ssl_ctx.ciphersuites);
++ cfgerr++;
++ }
++#endif
++
+ return cfgerr;
+ }
+
+@@ -7101,6 +7140,26 @@ static int bind_parse_ciphers(char **args, int cur_arg, struct proxy *px, struct
+ {
+ return ssl_bind_parse_ciphers(args, cur_arg, px, &conf->ssl_conf, err);
+ }
++
++#if (OPENSSL_VERSION_NUMBER >= 0x10101000L && !defined OPENSSL_IS_BORINGSSL && !defined LIBRESSL_VERSION_NUMBER)
++/* parse the "ciphersuites" bind keyword */
++static int ssl_bind_parse_ciphersuites(char **args, int cur_arg, struct proxy *px, struct ssl_bind_conf *conf, char **err)
++{
++ if (!*args[cur_arg + 1]) {
++ memprintf(err, "'%s' : missing cipher suite", args[cur_arg]);
++ return ERR_ALERT | ERR_FATAL;
++ }
++
++ free(conf->ciphersuites);
++ conf->ciphersuites = strdup(args[cur_arg + 1]);
++ return 0;
++}
++static int bind_parse_ciphersuites(char **args, int cur_arg, struct proxy *px, struct bind_conf *conf, char **err)
++{
++ return ssl_bind_parse_ciphersuites(args, cur_arg, px, &conf->ssl_conf, err);
++}
++#endif
++
+ /* parse the "crt" bind keyword */
+ static int bind_parse_crt(char **args, int cur_arg, struct proxy *px, struct bind_conf *conf, char **err)
+ {
+@@ -7492,6 +7551,10 @@ static int bind_parse_ssl(char **args, int cur_arg, struct proxy *px, struct bin
+
+ if (global_ssl.listen_default_ciphers && !conf->ssl_conf.ciphers)
+ conf->ssl_conf.ciphers = strdup(global_ssl.listen_default_ciphers);
++#if (OPENSSL_VERSION_NUMBER >= 0x10101000L && !defined OPENSSL_IS_BORINGSSL && !defined LIBRESSL_VERSION_NUMBER)
++ if (global_ssl.listen_default_ciphersuites && !conf->ssl_conf.ciphersuites)
++ conf->ssl_conf.ciphersuites = strdup(global_ssl.listen_default_ciphersuites);
++#endif
+ conf->ssl_options |= global_ssl.listen_default_ssloptions;
+ conf->ssl_conf.ssl_methods.flags |= global_ssl.listen_default_sslmethods.flags;
+ if (!conf->ssl_conf.ssl_methods.min)
+@@ -7689,6 +7752,10 @@ static int srv_parse_check_ssl(char **args, int *cur_arg, struct proxy *px, stru
+ newsrv->check.use_ssl = 1;
+ if (global_ssl.connect_default_ciphers && !newsrv->ssl_ctx.ciphers)
+ newsrv->ssl_ctx.ciphers = strdup(global_ssl.connect_default_ciphers);
++#if (OPENSSL_VERSION_NUMBER >= 0x10101000L && !defined OPENSSL_IS_BORINGSSL && !defined LIBRESSL_VERSION_NUMBER)
++ if (global_ssl.connect_default_ciphersuites && !newsrv->ssl_ctx.ciphersuites)
++ newsrv->ssl_ctx.ciphersuites = strdup(global_ssl.connect_default_ciphersuites);
++#endif
+ newsrv->ssl_ctx.options |= global_ssl.connect_default_ssloptions;
+ newsrv->ssl_ctx.methods.flags |= global_ssl.connect_default_sslmethods.flags;
+ if (!newsrv->ssl_ctx.methods.min)
+@@ -7712,6 +7779,21 @@ static int srv_parse_ciphers(char **args, int *cur_arg, struct proxy *px, struct
+ return 0;
+ }
+
++#if (OPENSSL_VERSION_NUMBER >= 0x10101000L && !defined OPENSSL_IS_BORINGSSL && !defined LIBRESSL_VERSION_NUMBER)
++/* parse the "ciphersuites" server keyword */
++static int srv_parse_ciphersuites(char **args, int *cur_arg, struct proxy *px, struct server *newsrv, char **err)
++{
++ if (!*args[*cur_arg + 1]) {
++ memprintf(err, "'%s' : missing cipher suite", args[*cur_arg]);
++ return ERR_ALERT | ERR_FATAL;
++ }
++
++ free(newsrv->ssl_ctx.ciphersuites);
++ newsrv->ssl_ctx.ciphersuites = strdup(args[*cur_arg + 1]);
++ return 0;
++}
++#endif
++
+ /* parse the "crl-file" server keyword */
+ static int srv_parse_crl_file(char **args, int *cur_arg, struct proxy *px, struct server *newsrv, char **err)
+ {
+@@ -7853,6 +7935,10 @@ static int srv_parse_ssl(char **args, int *cur_arg, struct proxy *px, struct ser
+ newsrv->use_ssl = 1;
+ if (global_ssl.connect_default_ciphers && !newsrv->ssl_ctx.ciphers)
+ newsrv->ssl_ctx.ciphers = strdup(global_ssl.connect_default_ciphers);
++#if (OPENSSL_VERSION_NUMBER >= 0x10101000L && !defined OPENSSL_IS_BORINGSSL && !defined LIBRESSL_VERSION_NUMBER)
++ if (global_ssl.connect_default_ciphersuites && !newsrv->ssl_ctx.ciphersuites)
++ newsrv->ssl_ctx.ciphersuites = strdup(global_ssl.connect_default_ciphersuites);
++#endif
+ return 0;
+ }
+
+@@ -8092,6 +8178,32 @@ static int ssl_parse_global_ciphers(char **args, int section_type, struct proxy
+ return 0;
+ }
+
++#if (OPENSSL_VERSION_NUMBER >= 0x10101000L && !defined OPENSSL_IS_BORINGSSL && !defined LIBRESSL_VERSION_NUMBER)
++/* parse the "ssl-default-bind-ciphersuites" / "ssl-default-server-ciphersuites" keywords
++ * in global section. Returns <0 on alert, >0 on warning, 0 on success.
++ */
++static int ssl_parse_global_ciphersuites(char **args, int section_type, struct proxy *curpx,
++ struct proxy *defpx, const char *file, int line,
++ char **err)
++{
++ char **target;
++
++ target = (args[0][12] == 'b') ? &global_ssl.listen_default_ciphersuites : &global_ssl.connect_default_ciphersuites;
++
++ if (too_many_args(1, args, err, NULL))
++ return -1;
++
++ if (*(args[1]) == 0) {
++ memprintf(err, "global statement '%s' expects a cipher suite as an argument.", args[0]);
++ return -1;
++ }
++
++ free(*target);
++ *target = strdup(args[1]);
++ return 0;
++}
++#endif
++
+ /* parse various global tune.ssl settings consisting in positive integers.
+ * Returns <0 on alert, >0 on warning, 0 on success.
+ */
+@@ -8599,6 +8711,9 @@ static struct ssl_bind_kw ssl_bind_kws[] = {
+ { "alpn", ssl_bind_parse_alpn, 1 }, /* set ALPN supported protocols */
+ { "ca-file", ssl_bind_parse_ca_file, 1 }, /* set CAfile to process verify on client cert */
+ { "ciphers", ssl_bind_parse_ciphers, 1 }, /* set SSL cipher suite */
++#if (OPENSSL_VERSION_NUMBER >= 0x10101000L && !defined OPENSSL_IS_BORINGSSL && !defined LIBRESSL_VERSION_NUMBER)
++ { "ciphersuites", ssl_bind_parse_ciphersuites, 1 }, /* set TLS 1.3 cipher suite */
++#endif
+ { "crl-file", ssl_bind_parse_crl_file, 1 }, /* set certificat revocation list file use on client cert verify */
+ { "curves", ssl_bind_parse_curves, 1 }, /* set SSL curve suite */
+ { "ecdhe", ssl_bind_parse_ecdhe, 1 }, /* defines named curve for elliptic curve Diffie-Hellman */
+@@ -8618,6 +8733,9 @@ static struct bind_kw_list bind_kws = { "SSL", { }, {
+ { "ca-sign-file", bind_parse_ca_sign_file, 1 }, /* set CAFile used to generate and sign server certs */
+ { "ca-sign-pass", bind_parse_ca_sign_pass, 1 }, /* set CAKey passphrase */
+ { "ciphers", bind_parse_ciphers, 1 }, /* set SSL cipher suite */
++#if (OPENSSL_VERSION_NUMBER >= 0x10101000L && !defined OPENSSL_IS_BORINGSSL && !defined LIBRESSL_VERSION_NUMBER)
++ { "ciphersuites", bind_parse_ciphersuites, 1 }, /* set TLS 1.3 cipher suite */
++#endif
+ { "crl-file", bind_parse_crl_file, 1 }, /* set certificat revocation list file use on client cert verify */
+ { "crt", bind_parse_crt, 1 }, /* load SSL certificates from this location */
+ { "crt-ignore-err", bind_parse_ignore_err, 1 }, /* set error IDs to ingore on verify depth == 0 */
+@@ -8661,6 +8779,9 @@ static struct srv_kw_list srv_kws = { "SSL", { }, {
+ { "check-sni", srv_parse_check_sni, 1, 1 }, /* set SNI */
+ { "check-ssl", srv_parse_check_ssl, 0, 1 }, /* enable SSL for health checks */
+ { "ciphers", srv_parse_ciphers, 1, 1 }, /* select the cipher suite */
++#if (OPENSSL_VERSION_NUMBER >= 0x10101000L && !defined OPENSSL_IS_BORINGSSL && !defined LIBRESSL_VERSION_NUMBER)
++ { "ciphersuites", srv_parse_ciphersuites, 1, 1 }, /* select the cipher suite */
++#endif
+ { "crl-file", srv_parse_crl_file, 1, 1 }, /* set certificate revocation list file use on server cert verify */
+ { "crt", srv_parse_crt, 1, 1 }, /* set client certificate */
+ { "force-sslv3", srv_parse_tls_method_options, 0, 1 }, /* force SSLv3 */
+@@ -8716,6 +8837,10 @@ static struct cfg_kw_list cfg_kws = {ILH, {
+ { CFG_GLOBAL, "tune.ssl.capture-cipherlist-size", ssl_parse_global_capture_cipherlist },
+ { CFG_GLOBAL, "ssl-default-bind-ciphers", ssl_parse_global_ciphers },
+ { CFG_GLOBAL, "ssl-default-server-ciphers", ssl_parse_global_ciphers },
++#if (OPENSSL_VERSION_NUMBER >= 0x10101000L && !defined OPENSSL_IS_BORINGSSL && !defined LIBRESSL_VERSION_NUMBER)
++ { CFG_GLOBAL, "ssl-default-bind-ciphersuites", ssl_parse_global_ciphersuites },
++ { CFG_GLOBAL, "ssl-default-server-ciphersuites", ssl_parse_global_ciphersuites },
++#endif
+ { 0, NULL, NULL },
+ }};
+
+@@ -8793,6 +8918,12 @@ static void __ssl_sock_init(void)
+ global_ssl.listen_default_ciphers = strdup(global_ssl.listen_default_ciphers);
+ if (global_ssl.connect_default_ciphers)
+ global_ssl.connect_default_ciphers = strdup(global_ssl.connect_default_ciphers);
++#if (OPENSSL_VERSION_NUMBER >= 0x10101000L && !defined OPENSSL_IS_BORINGSSL && !defined LIBRESSL_VERSION_NUMBER)
++ if (global_ssl.listen_default_ciphersuites)
++ global_ssl.listen_default_ciphersuites = strdup(global_ssl.listen_default_ciphersuites);
++ if (global_ssl.connect_default_ciphersuites)
++ global_ssl.connect_default_ciphersuites = strdup(global_ssl.connect_default_ciphersuites);
++#endif
+
+ xprt_register(XPRT_SSL, &ssl_sock);
+ SSL_library_init();
--- /dev/null
+commit 30ba96df349ace825749a57490defeb50001a550
+Author: Emeric Brun <ebrun@haproxy.com>
+Date: Wed Oct 10 14:51:02 2018 +0200
+
+ BUG/MEDIUM: Cur/CumSslConns counters not threadsafe.
+
+ CurSslConns inc/dec operations are not threadsafe. The unsigned CurSslConns
+ counter can wrap to a negative value. So we could notice connection rejects
+ because of MaxSslConns limit artificially exceeded.
+
+ CumSslConns inc operation are also not threadsafe so we could miss
+ some connections and show inconsistenties values compared to CumConns.
+
+ This fix should be backported to v1.8.
+
+ (cherry picked from commit 7ad43e7928c9a61b40332e4d5e9a7ccc33e6b65b)
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+
+diff --git a/src/ssl_sock.c b/src/ssl_sock.c
+index 2da0df68..6eed8022 100644
+--- a/src/ssl_sock.c
++++ b/src/ssl_sock.c
+@@ -491,7 +491,7 @@ static void ssl_async_fd_free(int fd)
+
+ /* Now we can safely call SSL_free, no more pending job in engines */
+ SSL_free(ssl);
+- sslconns--;
++ HA_ATOMIC_SUB(&sslconns, 1);
+ HA_ATOMIC_SUB(&jobs, 1);
+ }
+ /*
+@@ -5011,8 +5011,8 @@ static int ssl_sock_init(struct connection *conn)
+ /* leave init state and start handshake */
+ conn->flags |= CO_FL_SSL_WAIT_HS | CO_FL_WAIT_L6_CONN;
+
+- sslconns++;
+- totalsslconns++;
++ HA_ATOMIC_ADD(&sslconns, 1);
++ HA_ATOMIC_ADD(&totalsslconns, 1);
+ return 0;
+ }
+ else if (objt_listener(conn->target)) {
+@@ -5062,8 +5062,8 @@ static int ssl_sock_init(struct connection *conn)
+ conn->flags |= CO_FL_EARLY_SSL_HS;
+ #endif
+
+- sslconns++;
+- totalsslconns++;
++ HA_ATOMIC_ADD(&sslconns, 1);
++ HA_ATOMIC_ADD(&totalsslconns, 1);
+ return 0;
+ }
+ /* don't know how to handle such a target */
+@@ -5713,7 +5713,7 @@ static void ssl_sock_close(struct connection *conn) {
+ #endif
+ SSL_free(conn->xprt_ctx);
+ conn->xprt_ctx = NULL;
+- sslconns--;
++ HA_ATOMIC_SUB(&sslconns, 1);
+ }
+ }
+
--- /dev/null
+commit 8a6c4ff3f407b916bc08da4e76ed7813768ac937
+Author: mildis <me@mildis.org>
+Date: Tue Oct 2 16:46:34 2018 +0200
+
+ BUG/MINOR: checks: queues null-deref
+
+ queues can be null if calloc() failed.
+ Bypass free* calls when calloc did fail.
+
+ (cherry picked from commit 5ab01cb01114065a3573570a48e84815e751bf14)
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+
+diff --git a/src/checks.c b/src/checks.c
+index 098ddecf..74958b2d 100644
+--- a/src/checks.c
++++ b/src/checks.c
+@@ -3182,7 +3182,7 @@ int init_email_alert(struct mailers *mls, struct proxy *p, char **err)
+
+ if ((queues = calloc(mls->count, sizeof(*queues))) == NULL) {
+ memprintf(err, "out of memory while allocating mailer alerts queues");
+- goto error;
++ goto fail_no_queue;
+ }
+
+ for (mailer = mls->mailer_list; mailer; i++, mailer = mailer->next) {
+@@ -3239,6 +3239,7 @@ int init_email_alert(struct mailers *mls, struct proxy *p, char **err)
+ free_check(check);
+ }
+ free(queues);
++ fail_no_queue:
+ return 1;
+ }
+
--- /dev/null
+commit df4822ea169adc5c7c987fa077438f0ded1ac39b
+Author: Emeric Brun <ebrun@haproxy.com>
+Date: Thu Oct 11 15:27:07 2018 +0200
+
+ BUG/MEDIUM: mworker: segfault receiving SIGUSR1 followed by SIGTERM.
+
+ This bug appeared only if nbthread > 1. Handling the pipe with the
+ master, multiple threads of the same worker could process the deinit().
+
+ In addition, deinit() was called while some other threads were still
+ performing some tasks.
+
+ This patch assign the handler of the pipe with master to only the first
+ thread and removes the call to deinit() before exiting with an error.
+
+ This patch should be backported in v1.8.
+
+ (cherry picked from commit c8c0ed91cb4436491efd2ce2c4b4b1694aeeccca)
+ [wt: adjusted context]
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+
+diff --git a/src/haproxy.c b/src/haproxy.c
+index e0186ff9..1959dd0f 100644
+--- a/src/haproxy.c
++++ b/src/haproxy.c
+@@ -2349,7 +2349,13 @@ void mworker_pipe_handler(int fd)
+ break;
+ }
+
+- deinit();
++ /* At this step the master is down before
++ * this worker perform a 'normal' exit.
++ * So we want to exit with an error but
++ * other threads could currently process
++ * some stuff so we can't perform a clean
++ * deinit().
++ */
+ exit(EXIT_FAILURE);
+ return;
+ }
+@@ -2364,7 +2370,10 @@ void mworker_pipe_register()
+ fcntl(mworker_pipe[0], F_SETFL, O_NONBLOCK);
+ fdtab[mworker_pipe[0]].owner = mworker_pipe;
+ fdtab[mworker_pipe[0]].iocb = mworker_pipe_handler;
+- fd_insert(mworker_pipe[0], MAX_THREADS_MASK);
++ /* In multi-tread, we need only one thread to process
++ * events on the pipe with master
++ */
++ fd_insert(mworker_pipe[0], 1);
+ fd_want_recv(mworker_pipe[0]);
+ }
+
--- /dev/null
+commit 4bf6d76a22b9b601fd57df4aa0f4fba62733cb07
+Author: Willy Tarreau <w@1wt.eu>
+Date: Mon Oct 15 11:08:55 2018 +0200
+
+ BUG/MEDIUM: stream: don't crash on out-of-memory
+
+ In case pool_alloc() fails in stream_new(), we try to detach the stream
+ from the list before it has been added, dereferencing a NULL. In order
+ to fix it, simply move the LIST_DEL call upwards.
+
+ This must be backported to 1.8.
+
+ (cherry picked from commit e5f229e6392fd54aaba7fe58f457723c16b9d15f)
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+
+diff --git a/src/stream.c b/src/stream.c
+index 11c9dbf3..ef7cff5c 100644
+--- a/src/stream.c
++++ b/src/stream.c
+@@ -282,8 +282,8 @@ struct stream *stream_new(struct session *sess, enum obj_type *origin)
+ out_fail_accept:
+ flt_stream_release(s, 0);
+ task_free(t);
+- out_fail_alloc:
+ LIST_DEL(&s->list);
++ out_fail_alloc:
+ pool_free(pool_head_stream, s);
+ return NULL;
+ }
--- /dev/null
+commit d332b12b262ad7df1c8bdda52dad100f40399d24
+Author: Willy Tarreau <w@1wt.eu>
+Date: Mon Oct 15 11:01:59 2018 +0200
+
+ BUILD: ssl: fix null-deref warning in ssl_fc_cipherlist_str sample fetch
+
+ Gcc 6.4 detects a potential null-deref warning in smp_fetch_ssl_fc_cl_str().
+ This one is not real since already addressed a few lines above. Let's use
+ __objt_conn() instead of objt_conn() to avoid the extra test that confuses
+ it.
+
+ This could be backported to 1.8.
+
+ (cherry picked from commit b729077710b14c75936909409e27a4fa0badcb54)
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+
+diff --git a/src/ssl_sock.c b/src/ssl_sock.c
+index 6eed8022..4577fef4 100644
+--- a/src/ssl_sock.c
++++ b/src/ssl_sock.c
+@@ -6929,7 +6929,7 @@ smp_fetch_ssl_fc_cl_str(const struct arg *args, struct sample *smp, const char *
+ #if defined(OPENSSL_IS_BORINGSSL)
+ cipher = SSL_get_cipher_by_value(id);
+ #else
+- struct connection *conn = objt_conn(smp->sess->origin);
++ struct connection *conn = __objt_conn(smp->sess->origin);
+ cipher = SSL_CIPHER_find(conn->xprt_ctx, bin);
+ #endif
+ str = SSL_CIPHER_get_name(cipher);
--- /dev/null
+commit 892c21240adb9ac230d4bd27cc8be4767b4902aa
+Author: Willy Tarreau <w@1wt.eu>
+Date: Mon Oct 15 13:20:07 2018 +0200
+
+ BUILD: ssl: fix another null-deref warning in ssl_sock_switchctx_cbk()
+
+ This null-deref cannot happen either as there necesarily is a listener
+ where this function is called. Let's use __objt_listener() to address
+ this.
+
+ This may be backported to 1.8.
+
+ (cherry picked from commit a8825520b785d592467c45e183ad8213cb7bf891)
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+
+diff --git a/src/ssl_sock.c b/src/ssl_sock.c
+index 4577fef4..cfbc38b7 100644
+--- a/src/ssl_sock.c
++++ b/src/ssl_sock.c
+@@ -2113,7 +2113,7 @@ static int ssl_sock_switchctx_cbk(SSL *ssl, int *al, void *arg)
+ int i;
+
+ conn = SSL_get_ex_data(ssl, ssl_app_data_index);
+- s = objt_listener(conn->target)->bind_conf;
++ s = __objt_listener(conn->target)->bind_conf;
+
+ if (s->ssl_conf.early_data)
+ allow_early = 1;
--- /dev/null
+commit eb72c1faedc39c68fb1246ea8a97d1f96831756c
+Author: Willy Tarreau <w@1wt.eu>
+Date: Mon Oct 15 11:12:15 2018 +0200
+
+ BUILD: stick-table: make sure not to fail on task_new() during initialization
+
+ Gcc reports a potential null-deref error in the stick-table init code.
+ While not critical there, it's trivial to fix. This check has been
+ missing since 1.4 so this fix can be backported to all supported versions.
+
+ (cherry picked from commit 848522f05df9e60eea9274e11f1e9fcd19594a5c)
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+
+diff --git a/src/stick_table.c b/src/stick_table.c
+index 5a2f1295..653a1ffb 100644
+--- a/src/stick_table.c
++++ b/src/stick_table.c
+@@ -602,6 +602,8 @@ int stktable_init(struct stktable *t)
+ t->exp_next = TICK_ETERNITY;
+ if ( t->expire ) {
+ t->exp_task = task_new(MAX_THREADS_MASK);
++ if (!t->exp_task)
++ return 0;
+ t->exp_task->process = process_table_expire;
+ t->exp_task->context = (void *)t;
+ }
--- /dev/null
+commit d28afe3631e20a9fcca47efde031d62e501eff48
+Author: Willy Tarreau <w@1wt.eu>
+Date: Mon Oct 15 11:18:03 2018 +0200
+
+ BUILD: peers: check allocation error during peers_init_sync()
+
+ peers_init_sync() doesn't check task_new()'s return value and doesn't
+ return any result to indicate success or failure. Let's make it return
+ an int and check it from the caller.
+
+ This can be backported as far as 1.6.
+
+ (cherry picked from commit d944344f01d9ea914d94c45f6ac7c224c6143fc9)
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+
+diff --git a/include/proto/peers.h b/include/proto/peers.h
+index 782b66e4..9d4aaff2 100644
+--- a/include/proto/peers.h
++++ b/include/proto/peers.h
+@@ -28,7 +28,7 @@
+ #include <types/stream.h>
+ #include <types/peers.h>
+
+-void peers_init_sync(struct peers *peers);
++int peers_init_sync(struct peers *peers);
+ void peers_register_table(struct peers *, struct stktable *table);
+ void peers_setup_frontend(struct proxy *fe);
+
+diff --git a/src/cfgparse.c b/src/cfgparse.c
+index d1474d4b..7414b60d 100644
+--- a/src/cfgparse.c
++++ b/src/cfgparse.c
+@@ -9111,7 +9111,12 @@ out_uri_auth_compat:
+ curpeers->peers_fe = NULL;
+ }
+ else {
+- peers_init_sync(curpeers);
++ if (!peers_init_sync(curpeers)) {
++ ha_alert("Peers section '%s': out of memory, giving up on peers.\n",
++ curpeers->id);
++ cfgerr++;
++ break;
++ }
+ last = &curpeers->next;
+ continue;
+ }
+diff --git a/src/peers.c b/src/peers.c
+index c56ed3af..0cd56da3 100644
+--- a/src/peers.c
++++ b/src/peers.c
+@@ -2159,9 +2159,9 @@ static struct task *process_peer_sync(struct task * task)
+
+
+ /*
+- *
++ * returns 0 in case of error.
+ */
+-void peers_init_sync(struct peers *peers)
++int peers_init_sync(struct peers *peers)
+ {
+ struct peer * curpeer;
+ struct listener *listener;
+@@ -2173,10 +2173,14 @@ void peers_init_sync(struct peers *peers)
+ list_for_each_entry(listener, &peers->peers_fe->conf.listeners, by_fe)
+ listener->maxconn = peers->peers_fe->maxconn;
+ peers->sync_task = task_new(MAX_THREADS_MASK);
++ if (!peers->sync_task)
++ return 0;
++
+ peers->sync_task->process = process_peer_sync;
+ peers->sync_task->context = (void *)peers;
+ peers->sighandler = signal_register_task(0, peers->sync_task, 0);
+ task_wakeup(peers->sync_task, TASK_WOKEN_INIT);
++ return 1;
+ }
+
+
--- /dev/null
+commit c6eb147201c1d05afaadc5fd248b17be91f97331
+Author: Bertrand Jacquin <bertrand@jacquin.bzh>
+Date: Sat Oct 13 16:06:18 2018 +0100
+
+ DOC: Fix a few typos
+
+ these are mostly spelling mistakes, some of them might be candidate for
+ backporting as well.
+
+ (cherry picked from commit d5e4de8e5f99108e31dc7a23a0e91c4231e37974)
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+
+diff --git a/CONTRIBUTING b/CONTRIBUTING
+index b2c2b493..cd97e69b 100644
+--- a/CONTRIBUTING
++++ b/CONTRIBUTING
+@@ -309,7 +309,7 @@ do not think about them anymore after a few patches.
+ A good rule of thumb is that if your identifiers start to contain more than
+ 3 words or more than 15 characters, they can become confusing. For function
+ names it's less important especially if these functions are rarely used or
+- are used in a complex context where it is important to differenciate between
++ are used in a complex context where it is important to differentiate between
+ their multiple variants.
+
+ 9) Unified diff only
+@@ -318,7 +318,7 @@ do not think about them anymore after a few patches.
+ that you have committed your patch to a local branch, with an appropriate
+ subject line and a useful commit message explaining what the patch attempts
+ to do. It is not strictly required to use git, but what is strictly required
+- is to have all these elements in the same mail, easily distinguishible, and
++ is to have all these elements in the same mail, easily distinguishable, and
+ a patch in "diff -up" format (which is also the format used by Git). This
+ means the "unified" diff format must be used exclusively, and with the
+ function name printed in the diff header of each block. That significantly
+@@ -761,7 +761,7 @@ sent to the mailing list : haproxy@formilux.org and CCed to relevant subsystem
+ maintainers or authors of the modified files if their address appears at the
+ top of the file.
+
+-Please don't send pull-requests, they are really unconvenient. First, a pull
++Please don't send pull-requests, they are really inconvenient. First, a pull
+ implies a merge operation and the code doesn't move fast enough to justify the
+ use of merges. Second, pull requests are not easily commented on by the
+ project's participants, contrary to e-mails where anyone is allowed to have an
+diff --git a/include/types/connection.h b/include/types/connection.h
+index 5e8af3e7..b9e46048 100644
+--- a/include/types/connection.h
++++ b/include/types/connection.h
+@@ -45,7 +45,7 @@ struct server;
+ struct pipe;
+
+
+-/* A connection handle is how we differenciate two connections on the lower
++/* A connection handle is how we differentiate two connections on the lower
+ * layers. It usually is a file descriptor but can be a connection id.
+ */
+ union conn_handle {
--- /dev/null
+commit 75795017480da0f0a1157e945043249fe625f92f
+Author: Willy Tarreau <w@1wt.eu>
+Date: Tue Oct 16 16:11:56 2018 +0200
+
+ BUG/MEDIUM: threads: fix thread_release() at the end of the rendez-vous point
+
+ There is a bug in this function used to release other threads. It leaves
+ the current thread marked as harmless. If after this another thread does
+ a thread_isolate(), but before the first one reaches poll(), the second
+ thread will believe it's alone while it's not.
+
+ This must be backported to 1.8 since the rendez-vous point was merged
+ into 1.8.14.
+
+ (cherry picked from commit a9c0252b2e8ff7bb728b84d977ac6e9581ea12f8)
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+
+diff --git a/src/hathreads.c b/src/hathreads.c
+index 9dba4356..0a7c12f7 100644
+--- a/src/hathreads.c
++++ b/src/hathreads.c
+@@ -221,12 +221,8 @@ void thread_isolate()
+ */
+ void thread_release()
+ {
+- while (1) {
+- HA_ATOMIC_AND(&threads_want_rdv_mask, ~tid_bit);
+- if (!(threads_want_rdv_mask & all_threads_mask))
+- break;
+- thread_harmless_till_end();
+- }
++ HA_ATOMIC_AND(&threads_want_rdv_mask, ~tid_bit);
++ thread_harmless_end();
+ }
+
+ __attribute__((constructor))
--- /dev/null
+commit 4805c249aabc45cd59386694f962e19ab50e8ca9
+Author: Willy Tarreau <w@1wt.eu>
+Date: Tue Oct 16 16:57:40 2018 +0200
+
+ BUG/MEDIUM: threads: make sure threads_want_sync is marked volatile
+
+ The threads_want_sync variable is not volatile, which allows the compiler
+ to cache old copies of it for long parts of code and possibly optimize
+ some tests away. This could result in deadlocks when using heavy queue
+ activity or health check state changes.
+
+ There is no upstream commit for this fix because the sync point was
+ completely removed from 1.9. This fix is exclusively for 1.8.
+
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+
+diff --git a/src/hathreads.c b/src/hathreads.c
+index 0a7c12f7..730ebee4 100644
+--- a/src/hathreads.c
++++ b/src/hathreads.c
+@@ -29,7 +29,7 @@ void thread_sync_io_handler(int fd)
+
+ static HA_SPINLOCK_T sync_lock;
+ static int threads_sync_pipe[2] = {-1, -1};
+-static unsigned long threads_want_sync = 0;
++volatile static unsigned long threads_want_sync = 0;
+ volatile unsigned long threads_want_rdv_mask = 0;
+ volatile unsigned long threads_harmless_mask = 0;
+ volatile unsigned long all_threads_mask = 1; // nbthread 1 assumed by default
--- /dev/null
+commit d26a40412197ba61a72368c71e8a8582d686d28c
+Author: Willy Tarreau <w@1wt.eu>
+Date: Mon Oct 15 11:53:34 2018 +0200
+
+ BUILD: compiler: add a new statement "__unreachable()"
+
+ This statement is used as a hint for the compiler so that it knows that
+ the location where it's placed cannot be reached. It will mostly be used
+ after longjmp() or equivalent statements that deal with error processing
+ and that the compiler doesn't know will not return on certain conditions,
+ so that it doesn't complain about null dereferences on error paths.
+
+ (cherry picked from commit 8d26f02e693121764bfa0cb48c9a7ab31e17225d)
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+
+diff --git a/include/common/compiler.h b/include/common/compiler.h
+index a13aad5c..6f4f5a67 100644
+--- a/include/common/compiler.h
++++ b/include/common/compiler.h
+@@ -82,6 +82,18 @@
+ */
+ #define __maybe_unused __attribute__((unused))
+
++/* This allows gcc to know that some locations are never reached, for example
++ * after a longjmp() in the Lua code, hence that some errors caught by such
++ * methods cannot propagate further. This is important with gcc versions 6 and
++ * above which can more aggressively detect null dereferences. The builtin
++ * below was introduced in gcc 4.5, and before it we didn't care.
++ */
++#if __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
++#define __unreachable() __builtin_unreachable()
++#else
++#define __unreachable()
++#endif
++
+ /*
+ * Gcc >= 3 provides the ability for the programme to give hints to the
+ * compiler about what branch of an if is most likely to be taken. This
--- /dev/null
+commit 330e08dfc588dc9b0ad42203123fab6c191ca2f8
+Author: Willy Tarreau <w@1wt.eu>
+Date: Tue Oct 16 17:52:55 2018 +0200
+
+ MINOR: lua: all functions calling lua_yieldk() may return
+
+ There was a mistake when tagging functions which always use longjmp and
+ those which may use it in that all those supposed to call lua_yieldk()
+ may return without calling longjmp. Thus they must not use WILL_LJMP()
+ but MAY_LJMP(). It has zero impact on the code emitted as such, but
+ prevents other fixes from being properly implemented : this was the
+ cause of the previous failure with the __unreachable() calls.
+
+ This may be backported to older versions. It may or may not apply
+ well depending on the context, though the change simply consists in
+ replacing "WILL_LJMP(hlua_yieldk" with "MAY_LJMP(hlua_yieldk", and
+ same with the single call to lua_yieldk() in hlua_yieldk().
+
+ (cherry picked from commit 9635e03c41e95dff38731f67cc9d8b00e3731d2a)
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+
+diff --git a/src/hlua.c b/src/hlua.c
+index 60ba94ea..64102e8a 100644
+--- a/src/hlua.c
++++ b/src/hlua.c
+@@ -852,7 +852,7 @@ __LJMP void hlua_yieldk(lua_State *L, int nresults, int ctx,
+ hlua->flags |= flags;
+
+ /* Process the yield. */
+- WILL_LJMP(lua_yieldk(L, nresults, ctx, k));
++ MAY_LJMP(lua_yieldk(L, nresults, ctx, k));
+ }
+
+ /* This function initialises the Lua environment stored in the stream.
+@@ -1003,7 +1003,7 @@ void hlua_hook(lua_State *L, lua_Debug *ar)
+ * If the state is not yieldable, trying yield causes an error.
+ */
+ if (lua_isyieldable(L))
+- WILL_LJMP(hlua_yieldk(L, 0, 0, NULL, TICK_ETERNITY, HLUA_CTRLYIELD));
++ MAY_LJMP(hlua_yieldk(L, 0, 0, NULL, TICK_ETERNITY, HLUA_CTRLYIELD));
+
+ /* If we cannot yield, update the clock and check the timeout. */
+ tv_update_date(0, 1);
+@@ -1883,7 +1883,7 @@ connection_empty:
+ WILL_LJMP(luaL_error(L, "out of memory"));
+ }
+ xref_unlock(&socket->xref, peer);
+- WILL_LJMP(hlua_yieldk(L, 0, 0, hlua_socket_receive_yield, TICK_ETERNITY, 0));
++ MAY_LJMP(hlua_yieldk(L, 0, 0, hlua_socket_receive_yield, TICK_ETERNITY, 0));
+ return 0;
+ }
+
+@@ -2082,7 +2082,7 @@ hlua_socket_write_yield_return:
+ WILL_LJMP(luaL_error(L, "out of memory"));
+ }
+ xref_unlock(&socket->xref, peer);
+- WILL_LJMP(hlua_yieldk(L, 0, 0, hlua_socket_write_yield, TICK_ETERNITY, 0));
++ MAY_LJMP(hlua_yieldk(L, 0, 0, hlua_socket_write_yield, TICK_ETERNITY, 0));
+ return 0;
+ }
+
+@@ -2375,7 +2375,7 @@ __LJMP static int hlua_socket_connect_yield(struct lua_State *L, int status, lua
+ WILL_LJMP(luaL_error(L, "out of memory error"));
+ }
+ xref_unlock(&socket->xref, peer);
+- WILL_LJMP(hlua_yieldk(L, 0, 0, hlua_socket_connect_yield, TICK_ETERNITY, 0));
++ MAY_LJMP(hlua_yieldk(L, 0, 0, hlua_socket_connect_yield, TICK_ETERNITY, 0));
+ return 0;
+ }
+
+@@ -2493,7 +2493,7 @@ __LJMP static int hlua_socket_connect(struct lua_State *L)
+ task_wakeup(s->task, TASK_WOKEN_INIT);
+ /* Return yield waiting for connection. */
+
+- WILL_LJMP(hlua_yieldk(L, 0, 0, hlua_socket_connect_yield, TICK_ETERNITY, 0));
++ MAY_LJMP(hlua_yieldk(L, 0, 0, hlua_socket_connect_yield, TICK_ETERNITY, 0));
+
+ return 0;
+ }
+@@ -2819,7 +2819,7 @@ __LJMP static int hlua_channel_dup_yield(lua_State *L, int status, lua_KContext
+ chn = MAY_LJMP(hlua_checkchannel(L, 1));
+
+ if (_hlua_channel_dup(chn, L) == 0)
+- WILL_LJMP(hlua_yieldk(L, 0, 0, hlua_channel_dup_yield, TICK_ETERNITY, 0));
++ MAY_LJMP(hlua_yieldk(L, 0, 0, hlua_channel_dup_yield, TICK_ETERNITY, 0));
+ return 1;
+ }
+
+@@ -2845,7 +2845,7 @@ __LJMP static int hlua_channel_get_yield(lua_State *L, int status, lua_KContext
+
+ ret = _hlua_channel_dup(chn, L);
+ if (unlikely(ret == 0))
+- WILL_LJMP(hlua_yieldk(L, 0, 0, hlua_channel_get_yield, TICK_ETERNITY, 0));
++ MAY_LJMP(hlua_yieldk(L, 0, 0, hlua_channel_get_yield, TICK_ETERNITY, 0));
+
+ if (unlikely(ret == -1))
+ return 1;
+@@ -2883,7 +2883,7 @@ __LJMP static int hlua_channel_getline_yield(lua_State *L, int status, lua_KCont
+
+ ret = ci_getline_nc(chn, &blk1, &len1, &blk2, &len2);
+ if (ret == 0)
+- WILL_LJMP(hlua_yieldk(L, 0, 0, hlua_channel_getline_yield, TICK_ETERNITY, 0));
++ MAY_LJMP(hlua_yieldk(L, 0, 0, hlua_channel_getline_yield, TICK_ETERNITY, 0));
+
+ if (ret == -1) {
+ lua_pushnil(L);
+@@ -2932,7 +2932,7 @@ __LJMP static int hlua_channel_append_yield(lua_State *L, int status, lua_KConte
+ */
+ if (chn->buf->size == 0) {
+ si_applet_cant_put(chn_prod(chn));
+- WILL_LJMP(hlua_yieldk(L, 0, 0, hlua_channel_append_yield, TICK_ETERNITY, 0));
++ MAY_LJMP(hlua_yieldk(L, 0, 0, hlua_channel_append_yield, TICK_ETERNITY, 0));
+ }
+
+ max = channel_recv_limit(chn) - buffer_len(chn->buf);
+@@ -2946,7 +2946,7 @@ __LJMP static int hlua_channel_append_yield(lua_State *L, int status, lua_KConte
+ }
+ if (ret == -1) {
+ chn->flags |= CF_WAKE_WRITE;
+- WILL_LJMP(hlua_yieldk(L, 0, 0, hlua_channel_append_yield, TICK_ETERNITY, 0));
++ MAY_LJMP(hlua_yieldk(L, 0, 0, hlua_channel_append_yield, TICK_ETERNITY, 0));
+ }
+ l += ret;
+ lua_pop(L, 1);
+@@ -2962,7 +2962,7 @@ __LJMP static int hlua_channel_append_yield(lua_State *L, int status, lua_KConte
+ return 1;
+ }
+ if (l < len)
+- WILL_LJMP(hlua_yieldk(L, 0, 0, hlua_channel_append_yield, TICK_ETERNITY, 0));
++ MAY_LJMP(hlua_yieldk(L, 0, 0, hlua_channel_append_yield, TICK_ETERNITY, 0));
+ return 1;
+ }
+
+@@ -3026,7 +3026,7 @@ __LJMP static int hlua_channel_send_yield(lua_State *L, int status, lua_KContext
+ */
+ if (chn->buf->size == 0) {
+ si_applet_cant_put(chn_prod(chn));
+- WILL_LJMP(hlua_yieldk(L, 0, 0, hlua_channel_send_yield, TICK_ETERNITY, 0));
++ MAY_LJMP(hlua_yieldk(L, 0, 0, hlua_channel_send_yield, TICK_ETERNITY, 0));
+ }
+
+ /* the writed data will be immediatly sent, so we can check
+@@ -3082,7 +3082,7 @@ __LJMP static int hlua_channel_send_yield(lua_State *L, int status, lua_KContext
+ HLUA_SET_WAKERESWR(hlua);
+ else
+ HLUA_SET_WAKEREQWR(hlua);
+- WILL_LJMP(hlua_yieldk(L, 0, 0, hlua_channel_send_yield, TICK_ETERNITY, 0));
++ MAY_LJMP(hlua_yieldk(L, 0, 0, hlua_channel_send_yield, TICK_ETERNITY, 0));
+ }
+
+ return 1;
+@@ -3146,7 +3146,7 @@ __LJMP static int hlua_channel_forward_yield(lua_State *L, int status, lua_KCont
+ HLUA_SET_WAKEREQWR(hlua);
+
+ /* Otherwise, we can yield waiting for new data in the inpout side. */
+- WILL_LJMP(hlua_yieldk(L, 0, 0, hlua_channel_forward_yield, TICK_ETERNITY, 0));
++ MAY_LJMP(hlua_yieldk(L, 0, 0, hlua_channel_forward_yield, TICK_ETERNITY, 0));
+ }
+
+ return 1;
+@@ -3654,7 +3654,7 @@ __LJMP static int hlua_applet_tcp_getline_yield(lua_State *L, int status, lua_KC
+ /* Data not yet avalaible. return yield. */
+ if (ret == 0) {
+ si_applet_cant_get(si);
+- WILL_LJMP(hlua_yieldk(L, 0, 0, hlua_applet_tcp_getline_yield, TICK_ETERNITY, 0));
++ MAY_LJMP(hlua_yieldk(L, 0, 0, hlua_applet_tcp_getline_yield, TICK_ETERNITY, 0));
+ }
+
+ /* End of data: commit the total strings and return. */
+@@ -3709,7 +3709,7 @@ __LJMP static int hlua_applet_tcp_recv_yield(lua_State *L, int status, lua_KCont
+ /* Data not yet avalaible. return yield. */
+ if (ret == 0) {
+ si_applet_cant_get(si);
+- WILL_LJMP(hlua_yieldk(L, 0, 0, hlua_applet_tcp_recv_yield, TICK_ETERNITY, 0));
++ MAY_LJMP(hlua_yieldk(L, 0, 0, hlua_applet_tcp_recv_yield, TICK_ETERNITY, 0));
+ }
+
+ /* End of data: commit the total strings and return. */
+@@ -3732,7 +3732,7 @@ __LJMP static int hlua_applet_tcp_recv_yield(lua_State *L, int status, lua_KCont
+ luaL_addlstring(&appctx->b, blk2, len2);
+ co_skip(si_oc(si), len1 + len2);
+ si_applet_cant_get(si);
+- WILL_LJMP(hlua_yieldk(L, 0, 0, hlua_applet_tcp_recv_yield, TICK_ETERNITY, 0));
++ MAY_LJMP(hlua_yieldk(L, 0, 0, hlua_applet_tcp_recv_yield, TICK_ETERNITY, 0));
+
+ } else {
+
+@@ -3756,7 +3756,7 @@ __LJMP static int hlua_applet_tcp_recv_yield(lua_State *L, int status, lua_KCont
+ lua_pushinteger(L, len);
+ lua_replace(L, 2);
+ si_applet_cant_get(si);
+- WILL_LJMP(hlua_yieldk(L, 0, 0, hlua_applet_tcp_recv_yield, TICK_ETERNITY, 0));
++ MAY_LJMP(hlua_yieldk(L, 0, 0, hlua_applet_tcp_recv_yield, TICK_ETERNITY, 0));
+ }
+
+ /* return the result. */
+@@ -3825,7 +3825,7 @@ __LJMP static int hlua_applet_tcp_send_yield(lua_State *L, int status, lua_KCont
+ */
+ if (l < len) {
+ si_applet_cant_put(si);
+- WILL_LJMP(hlua_yieldk(L, 0, 0, hlua_applet_tcp_send_yield, TICK_ETERNITY, 0));
++ MAY_LJMP(hlua_yieldk(L, 0, 0, hlua_applet_tcp_send_yield, TICK_ETERNITY, 0));
+ }
+
+ return 1;
+@@ -4122,7 +4122,7 @@ __LJMP static int hlua_applet_http_getline_yield(lua_State *L, int status, lua_K
+ */
+ if (ret == -1) {
+ si_applet_cant_put(si);
+- WILL_LJMP(hlua_yieldk(L, 0, 0, hlua_applet_http_getline_yield, TICK_ETERNITY, 0));
++ MAY_LJMP(hlua_yieldk(L, 0, 0, hlua_applet_http_getline_yield, TICK_ETERNITY, 0));
+ }
+ appctx->appctx->ctx.hlua_apphttp.flags &= ~APPLET_100C;
+ }
+@@ -4139,7 +4139,7 @@ __LJMP static int hlua_applet_http_getline_yield(lua_State *L, int status, lua_K
+ /* Data not yet avalaible. return yield. */
+ if (ret == 0) {
+ si_applet_cant_get(si);
+- WILL_LJMP(hlua_yieldk(L, 0, 0, hlua_applet_http_getline_yield, TICK_ETERNITY, 0));
++ MAY_LJMP(hlua_yieldk(L, 0, 0, hlua_applet_http_getline_yield, TICK_ETERNITY, 0));
+ }
+
+ /* End of data: commit the total strings and return. */
+@@ -4208,7 +4208,7 @@ __LJMP static int hlua_applet_http_recv_yield(lua_State *L, int status, lua_KCon
+ */
+ if (ret == -1) {
+ si_applet_cant_put(si);
+- WILL_LJMP(hlua_yieldk(L, 0, 0, hlua_applet_http_recv_yield, TICK_ETERNITY, 0));
++ MAY_LJMP(hlua_yieldk(L, 0, 0, hlua_applet_http_recv_yield, TICK_ETERNITY, 0));
+ }
+ appctx->appctx->ctx.hlua_apphttp.flags &= ~APPLET_100C;
+ }
+@@ -4219,7 +4219,7 @@ __LJMP static int hlua_applet_http_recv_yield(lua_State *L, int status, lua_KCon
+ /* Data not yet avalaible. return yield. */
+ if (ret == 0) {
+ si_applet_cant_get(si);
+- WILL_LJMP(hlua_yieldk(L, 0, 0, hlua_applet_http_recv_yield, TICK_ETERNITY, 0));
++ MAY_LJMP(hlua_yieldk(L, 0, 0, hlua_applet_http_recv_yield, TICK_ETERNITY, 0));
+ }
+
+ /* End of data: commit the total strings and return. */
+@@ -4254,7 +4254,7 @@ __LJMP static int hlua_applet_http_recv_yield(lua_State *L, int status, lua_KCon
+ lua_pushinteger(L, len);
+ lua_replace(L, 2);
+ si_applet_cant_get(si);
+- WILL_LJMP(hlua_yieldk(L, 0, 0, hlua_applet_http_recv_yield, TICK_ETERNITY, 0));
++ MAY_LJMP(hlua_yieldk(L, 0, 0, hlua_applet_http_recv_yield, TICK_ETERNITY, 0));
+ }
+
+ /* return the result. */
+@@ -4320,7 +4320,7 @@ __LJMP static int hlua_applet_http_send_yield(lua_State *L, int status, lua_KCon
+ */
+ if (l < len) {
+ si_applet_cant_put(si);
+- WILL_LJMP(hlua_yieldk(L, 0, 0, hlua_applet_http_send_yield, TICK_ETERNITY, 0));
++ MAY_LJMP(hlua_yieldk(L, 0, 0, hlua_applet_http_send_yield, TICK_ETERNITY, 0));
+ }
+
+ return 1;
+@@ -4460,7 +4460,7 @@ __LJMP static int hlua_applet_http_start_response_yield(lua_State *L, int status
+ /* If ret is -1, we dont have room in the buffer, so we yield. */
+ if (ret == -1) {
+ si_applet_cant_put(si);
+- WILL_LJMP(hlua_yieldk(L, 0, 0, hlua_applet_http_start_response_yield, TICK_ETERNITY, 0));
++ MAY_LJMP(hlua_yieldk(L, 0, 0, hlua_applet_http_start_response_yield, TICK_ETERNITY, 0));
+ }
+
+ /* Headers sent, set the flag. */
+@@ -5510,7 +5510,7 @@ __LJMP static int hlua_sleep_yield(lua_State *L, int status, lua_KContext ctx)
+ {
+ int wakeup_ms = lua_tointeger(L, -1);
+ if (now_ms < wakeup_ms)
+- WILL_LJMP(hlua_yieldk(L, 0, 0, hlua_sleep_yield, wakeup_ms, 0));
++ MAY_LJMP(hlua_yieldk(L, 0, 0, hlua_sleep_yield, wakeup_ms, 0));
+ return 0;
+ }
+
+@@ -5525,7 +5525,7 @@ __LJMP static int hlua_sleep(lua_State *L)
+ wakeup_ms = tick_add(now_ms, delay);
+ lua_pushinteger(L, wakeup_ms);
+
+- WILL_LJMP(hlua_yieldk(L, 0, 0, hlua_sleep_yield, wakeup_ms, 0));
++ MAY_LJMP(hlua_yieldk(L, 0, 0, hlua_sleep_yield, wakeup_ms, 0));
+ return 0;
+ }
+
+@@ -5540,7 +5540,7 @@ __LJMP static int hlua_msleep(lua_State *L)
+ wakeup_ms = tick_add(now_ms, delay);
+ lua_pushinteger(L, wakeup_ms);
+
+- WILL_LJMP(hlua_yieldk(L, 0, 0, hlua_sleep_yield, wakeup_ms, 0));
++ MAY_LJMP(hlua_yieldk(L, 0, 0, hlua_sleep_yield, wakeup_ms, 0));
+ return 0;
+ }
+
+@@ -5555,7 +5555,7 @@ __LJMP static int hlua_yield_yield(lua_State *L, int status, lua_KContext ctx)
+
+ __LJMP static int hlua_yield(lua_State *L)
+ {
+- WILL_LJMP(hlua_yieldk(L, 0, 0, hlua_yield_yield, TICK_ETERNITY, HLUA_CTRLYIELD));
++ MAY_LJMP(hlua_yieldk(L, 0, 0, hlua_yield_yield, TICK_ETERNITY, HLUA_CTRLYIELD));
+ return 0;
+ }
+
--- /dev/null
+commit 8019e88dd1ac73a3baa71e9acfbc1b7a3fbc7442
+Author: Willy Tarreau <w@1wt.eu>
+Date: Tue Oct 16 17:37:12 2018 +0200
+
+ BUILD: lua: silence some compiler warnings about potential null derefs (#2)
+
+ Here we make sure that appctx is always taken from the unchecked value
+ since we know it's an appctx, which explains why it's immediately
+ dereferenced. A missing test was added to ensure that task_new() does
+ not return a NULL.
+
+ This may be backported to 1.8.
+
+ (cherry picked from commit e09101e8d92b0c0ef8674fbc791e309112ab7f1c)
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+
+diff --git a/src/hlua.c b/src/hlua.c
+index 64102e8a..ad9238ef 100644
+--- a/src/hlua.c
++++ b/src/hlua.c
+@@ -2361,7 +2361,7 @@ __LJMP static int hlua_socket_connect_yield(struct lua_State *L, int status, lua
+ return 2;
+ }
+
+- appctx = objt_appctx(s->si[0].end);
++ appctx = __objt_appctx(s->si[0].end);
+
+ /* Check for connection established. */
+ if (appctx->ctx.hlua_cosocket.connected) {
+@@ -2473,7 +2473,7 @@ __LJMP static int hlua_socket_connect(struct lua_State *L)
+ }
+
+ hlua = hlua_gethlua(L);
+- appctx = objt_appctx(s->si[0].end);
++ appctx = __objt_appctx(s->si[0].end);
+
+ /* inform the stream that we want to be notified whenever the
+ * connection completes.
+@@ -5693,6 +5693,9 @@ static int hlua_register_task(lua_State *L)
+ WILL_LJMP(luaL_error(L, "lua out of memory error."));
+
+ task = task_new(MAX_THREADS_MASK);
++ if (!task)
++ WILL_LJMP(luaL_error(L, "Lua out of memory error."));
++
+ task->context = hlua;
+ task->process = hlua_process_task;
+
--- /dev/null
+commit 3f39e1d4b5ca37e57247034421c69bc301d996b2
+Author: Willy Tarreau <w@1wt.eu>
+Date: Tue Oct 16 17:57:36 2018 +0200
+
+ BUILD: lua: silence some compiler warnings after WILL_LJMP
+
+ These ones are on error paths that are properly handled by luaL_error()
+ which does a longjmp() but the compiler cannot know it. By adding an
+ __unreachable() statement in WILL_LJMP(), there is no ambiguity anymore.
+
+ This may be backported to 1.8 but these previous patches are needed first :
+ - BUILD: compiler: add a new statement "__unreachable()"
+ - MINOR: lua: all functions calling lua_yieldk() may return
+ - BUILD: lua: silence some compiler warnings about potential null derefs (#2)
+
+ (cherry picked from commit b059b894cdf795f134b6e53ff95ea7f907feb846)
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+
+diff --git a/src/hlua.c b/src/hlua.c
+index ad9238ef..c3bb269a 100644
+--- a/src/hlua.c
++++ b/src/hlua.c
+@@ -24,6 +24,7 @@
+ #include <ebpttree.h>
+
+ #include <common/cfgparse.h>
++#include <common/compiler.h>
+ #include <common/xref.h>
+ #include <common/hathreads.h>
+
+@@ -63,7 +64,7 @@
+ * MAY_LJMP() marks an lua function that may use longjmp.
+ */
+ #define __LJMP
+-#define WILL_LJMP(func) func
++#define WILL_LJMP(func) do { func; __unreachable(); } while(0)
+ #define MAY_LJMP(func) func
+
+ /* This couple of function executes securely some Lua calls outside of
--- /dev/null
+commit b884ba5222a765b395e8ac93971639a0452d6422
+Author: Dirkjan Bussink <d.bussink@gmail.com>
+Date: Fri Sep 14 14:31:22 2018 +0200
+
+ CLEANUP: stick-tables: Remove unneeded double (()) around conditional clause
+
+ In the past this conditional had multiple conditionals which is why the
+ additional parentheses were needed. The conditional was simplified but
+ the duplicate parentheses were not cleaned up.
+
+ (cherry picked from commit ff57f1bbcf8af1e6389520aa845df5aa97ef55b6)
+ [wt: fixes build warnings with clang]
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+
+diff --git a/src/stick_table.c b/src/stick_table.c
+index 653a1ffb..f1442603 100644
+--- a/src/stick_table.c
++++ b/src/stick_table.c
+@@ -1860,7 +1860,7 @@ smp_fetch_sc_tracked(const struct arg *args, struct sample *smp, const char *kw,
+ smp->data.u.sint = !!stkctr;
+
+ /* release the ref count */
+- if ((stkctr == &tmpstkctr))
++ if (stkctr == &tmpstkctr)
+ stktable_release(stkctr->table, stkctr_entry(stkctr));
+
+ return 1;
--- /dev/null
+commit 0820ab24974cd2bad84c8ec5a90f7ce0e1681cf0
+Author: Willy Tarreau <w@1wt.eu>
+Date: Wed Oct 3 09:40:22 2018 +0200
+
+ BUILD: Makefile: add a "make opts" target to simply show the build options
+
+ We're often missing an easy way to map input variables to output ones.
+ The "opts" build target will simply show the input variables and the ones
+ passed to the compiler and linker. This way it's easier to quickly see
+ what a given build script or package will use, or the detected warnings
+ supported by the compiler.
+
+ (cherry picked from commit a8b12c6bb73b924f6429c3ae4d20b96992e92c2e)
+ [wt: this is not needed but significantly helps for packaging]
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+
+diff --git a/Makefile b/Makefile
+index 5d170041..d3615060 100644
+--- a/Makefile
++++ b/Makefile
+@@ -996,3 +996,20 @@ update-version:
+ echo "$(VERSION)" > VERSION
+ echo "$(SUBVERS)" > SUBVERS
+ echo "$(VERDATE)" > VERDATE
++
++# just display the build options
++opts:
++ @echo -n 'Using: '
++ @echo -n 'TARGET="$(strip $(TARGET))" '
++ @echo -n 'ARCH="$(strip $(ARCH))" '
++ @echo -n 'CPU="$(strip $(CPU))" '
++ @echo -n 'CC="$(strip $(CC))" '
++ @echo -n 'ARCH_FLAGS="$(strip $(ARCH_FLAGS))" '
++ @echo -n 'CPU_CFLAGS="$(strip $(CPU_CFLAGS))" '
++ @echo -n 'DEBUG_CFLAGS="$(strip $(DEBUG_CFLAGS))" '
++ @echo "$(strip $(BUILD_OPTIONS))"
++ @echo 'COPTS="$(strip $(COPTS))"'
++ @echo 'LDFLAGS="$(strip $(LDFLAGS))"'
++ @echo 'LDOPTS="$(strip $(LDOPTS))"'
++ @echo 'OPTIONS_OBJS="$(strip $(OPTIONS_OBJS))"'
++ @echo 'OBJS="$(strip $(OBJS))"'
--- /dev/null
+commit 5df1480da4c4e58830d108f4f0f3347598c55ab3
+Author: Willy Tarreau <w@1wt.eu>
+Date: Wed Oct 3 09:52:51 2018 +0200
+
+ BUILD: Makefile: speed up compiler options detection
+
+ Commits b78016649 and d3a7f4035 brought the ability to detect the build
+ options and warnings that the compiler supports. However, they're detected
+ using "$(CC) -c", which is 50% slower than "$(CC) -E" for the same result,
+ just because it starts the assembler at the end. Given that we're starting
+ to check for a number of warnings, this detection alone starts to become
+ visible, taking a bit more than 300 ms on the build time. Let's switch to
+ -E instead to shrink this incompressible time by roughly 100 ms.
+
+ (cherry picked from commit f11ca5e7a43c772637018ec2ad981a9fd7d3816f)
+ [wt: only backported for context and consistency with next patch]
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+
+diff --git a/Makefile b/Makefile
+index d3615060..1a971f92 100644
+--- a/Makefile
++++ b/Makefile
+@@ -96,13 +96,13 @@
+ # Usage: CFLAGS += $(call cc-opt,option). Eg: $(call cc-opt,-fwrapv)
+ # Note: ensure the referencing variable is assigned using ":=" and not "=" to
+ # call it only once.
+-cc-opt = $(shell set -e; if $(CC) $(1) -c -xc - -o /dev/null </dev/null >&0 2>&0; then echo "$(1)"; fi;)
++cc-opt = $(shell set -e; if $(CC) $(1) -E -xc - -o /dev/null </dev/null >&0 2>&0; then echo "$(1)"; fi;)
+
+ # Disable a warning when supported by the compiler. Don't put spaces around the
+ # warning! And don't use cc-opt which doesn't always report an error until
+ # another one is also returned.
+ # Usage: CFLAGS += $(call cc-nowarn,warning). Eg: $(call cc-opt,format-truncation)
+-cc-nowarn = $(shell set -e; if $(CC) -W$(1) -c -xc - -o /dev/null </dev/null >&0 2>&0; then echo "-Wno-$(1)"; fi;)
++cc-nowarn = $(shell set -e; if $(CC) -W$(1) -E -xc - -o /dev/null </dev/null >&0 2>&0; then echo "-Wno-$(1)"; fi;)
+
+ #### Installation options.
+ DESTDIR =
--- /dev/null
+commit a7e9853db925b12b1d040be8b04bafc11d84d685
+Author: Willy Tarreau <w@1wt.eu>
+Date: Tue Oct 16 18:11:34 2018 +0200
+
+ BUILD: Makefile: silence an option conflict warning with clang
+
+ clang complains that -fno-strict-overflow is not used when -fwrapv is
+ used, which breaks the build when -Werror is used. Let's introduce a
+ cc-opt-alt function to emit the former only then the latter is not
+ supported (since it implies the former).
+
+ (cherry picked from commit 0d7a2ae4f5199ec37ead6914fa24d40ec0989a4d)
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+
+diff --git a/Makefile b/Makefile
+index 1a971f92..6ffc1b06 100644
+--- a/Makefile
++++ b/Makefile
+@@ -98,6 +98,9 @@
+ # call it only once.
+ cc-opt = $(shell set -e; if $(CC) $(1) -E -xc - -o /dev/null </dev/null >&0 2>&0; then echo "$(1)"; fi;)
+
++# same but emits $2 if $1 is not supported
++cc-opt-alt = $(shell set -e; if $(CC) $(1) -E -xc - -o /dev/null </dev/null >&0 2>&0; then echo "$(1)"; else echo "$(2)"; fi;)
++
+ # Disable a warning when supported by the compiler. Don't put spaces around the
+ # warning! And don't use cc-opt which doesn't always report an error until
+ # another one is also returned.
+@@ -147,8 +150,7 @@ DEBUG_CFLAGS = -g
+ # can do whatever it wants since it's an undefined behavior, so use -fwrapv
+ # to be sure we get the intended behavior.
+ SPEC_CFLAGS := -fno-strict-aliasing -Wdeclaration-after-statement
+-SPEC_CFLAGS += $(call cc-opt,-fwrapv)
+-SPEC_CFLAGS += $(call cc-opt,-fno-strict-overflow)
++SPEC_CFLAGS += $(call cc-opt-alt,-fwrapv,$(call cc-opt,-fno-strict-overflow))
+ SPEC_CFLAGS += $(call cc-nowarn,format-truncation)
+ SPEC_CFLAGS += $(call cc-nowarn,address-of-packed-member)
+ SPEC_CFLAGS += $(call cc-nowarn,null-dereference)
--- /dev/null
+commit 541e3b40b394fb6bde563ff8ce4c882dafca4eb1
+Author: Olivier Houchard <ohouchard@haproxy.com>
+Date: Tue Oct 16 18:35:01 2018 +0200
+
+ MINOR: server: Use memcpy() instead of strncpy().
+
+ Use memcpy instead of strncpy, strncpy buys us nothing, and gcc is being
+ annoying.
+
+ (cherry picked from commit 17f8b90736d811ac9a04af198a3aee34e9935cec)
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+
+diff --git a/src/server.c b/src/server.c
+index 4941bd03..208f21da 100644
+--- a/src/server.c
++++ b/src/server.c
+@@ -3078,7 +3078,7 @@ void apply_server_state(void)
+ globalfilepathlen = 0;
+ goto globalfileerror;
+ }
+- strncpy(globalfilepath, global.server_state_base, len);
++ memcpy(globalfilepath, global.server_state_base, len);
+ globalfilepath[globalfilepathlen] = 0;
+
+ /* append a slash if needed */
+@@ -3147,7 +3147,7 @@ void apply_server_state(void)
+ localfilepathlen = 0;
+ goto localfileerror;
+ }
+- strncpy(localfilepath, global.server_state_base, len);
++ memcpy(localfilepath, global.server_state_base, len);
+ localfilepath[localfilepathlen] = 0;
+
+ /* append a slash if needed */
--- /dev/null
+commit 1993e23d59e37ee7befbc64bf1535640a16354bc
+Author: Olivier Houchard <ohouchard@haproxy.com>
+Date: Tue Oct 16 18:39:38 2018 +0200
+
+ MINOR: cfgparse: Write 130 as 128 as 0x82 and 0x80.
+
+ Write 130 and 128 as 8x82 and 0x80, to avoid warnings about casting from
+ int to size. "check_req" should probably be unsigned, but it's hard to do so.
+
+ (cherry picked from commit 3332090a2d3e9e84bac67af79fb03be111359429)
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+
+diff --git a/src/cfgparse.c b/src/cfgparse.c
+index 7414b60d..87a4d803 100644
+--- a/src/cfgparse.c
++++ b/src/cfgparse.c
+@@ -5082,7 +5082,7 @@ stats_error_parsing:
+ ((unsigned char) (packetlen >> 16) & 0xff));
+
+ curproxy->check_req[3] = 1;
+- curproxy->check_req[5] = 130;
++ curproxy->check_req[5] = 0x82; // 130
+ curproxy->check_req[11] = 1;
+ curproxy->check_req[12] = 33;
+ memcpy(&curproxy->check_req[36], mysqluser, userlen);
+@@ -5108,7 +5108,7 @@ stats_error_parsing:
+ ((unsigned char) (packetlen >> 16) & 0xff));
+
+ curproxy->check_req[3] = 1;
+- curproxy->check_req[5] = 128;
++ curproxy->check_req[5] = 0x80;
+ curproxy->check_req[8] = 1;
+ memcpy(&curproxy->check_req[9], mysqluser, userlen);
+ curproxy->check_req[9 + userlen + 1 + 1] = 1;
--- /dev/null
+commit 0d31b8e1dae2bd0ad73c90748a03f9cfeed837d8
+Author: Olivier Houchard <ohouchard@haproxy.com>
+Date: Tue Oct 16 18:49:26 2018 +0200
+
+ MINOR: peers: use defines instead of enums to appease clang.
+
+ Clang (rightfully) warns that we're trying to set chars to values >= 128.
+ Use defines with hex values instead of an enum to address this.
+
+ (cherry picked from commit 33992267aac00d7e8ae67e0703bf7fffc9cf9b54)
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+
+diff --git a/src/peers.c b/src/peers.c
+index 0cd56da3..465ffe85 100644
+--- a/src/peers.c
++++ b/src/peers.c
+@@ -122,15 +122,13 @@ enum {
+ /* Note: ids >= 128 contains */
+ /* id message cotains data */
+ /*******************************/
+-enum {
+- PEER_MSG_STKT_UPDATE = 128,
+- PEER_MSG_STKT_INCUPDATE,
+- PEER_MSG_STKT_DEFINE,
+- PEER_MSG_STKT_SWITCH,
+- PEER_MSG_STKT_ACK,
+- PEER_MSG_STKT_UPDATE_TIMED,
+- PEER_MSG_STKT_INCUPDATE_TIMED,
+-};
++#define PEER_MSG_STKT_UPDATE 0x80
++#define PEER_MSG_STKT_INCUPDATE 0x81
++#define PEER_MSG_STKT_DEFINE 0x82
++#define PEER_MSG_STKT_SWITCH 0x83
++#define PEER_MSG_STKT_ACK 0x84
++#define PEER_MSG_STKT_UPDATE_TIMED 0x85
++#define PEER_MSG_STKT_INCUPDATE_TIMED 0x86
+
+ /**********************************/
+ /* Peer Session IO handler states */
--- /dev/null
+commit c1ef9f5389e5debb132b7e2ab40f178ed413a978
+Author: Lukas Tribus <lukas@ltri.eu>
+Date: Wed Oct 17 01:40:11 2018 +0200
+
+ DOC: fix reference to map files in MAINTAINERS
+
+ s/maps/map
+
+ (cherry picked from commit b75e828b298c958beb10c830a1ccb3df0840c30c)
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+
+diff --git a/MAINTAINERS b/MAINTAINERS
+index 3a9e435a..df7cc336 100644
+--- a/MAINTAINERS
++++ b/MAINTAINERS
+@@ -24,7 +24,7 @@ Files: src/hlua.c, include/*/hlua.h
+
+ Maps and pattern matching
+ Maintainer: Thierry Fournier <tfournier@arpalert.org>
+-Files: src/maps.c, src/pattern.c, include/*/maps.h, include/*/pattern.h
++Files: src/map.c, src/pattern.c, include/*/map.h, include/*/pattern.h
+
+ DNS
+ Maintainer: Baptiste Assmann <bedis9@gmail.com>
--- /dev/null
+commit 9011ff6c9fb5128dd50b4210e05199ea6337b82b
+Author: Willy Tarreau <w@1wt.eu>
+Date: Sat Oct 20 17:45:48 2018 +0200
+
+ BUILD: compiler: rename __unreachable() to my_unreachable()
+
+ Olivier reported that on FreeBSD __unreachable is already defined
+ and causes build warnings. Let's rename it then.
+
+ (cherry picked from commit 4e7cc3381b27e3971b02b73a113ecc13916e1f20)
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+
+diff --git a/include/common/compiler.h b/include/common/compiler.h
+index 6f4f5a67..60549307 100644
+--- a/include/common/compiler.h
++++ b/include/common/compiler.h
+@@ -89,9 +89,9 @@
+ * below was introduced in gcc 4.5, and before it we didn't care.
+ */
+ #if __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
+-#define __unreachable() __builtin_unreachable()
++#define my_unreachable() __builtin_unreachable()
+ #else
+-#define __unreachable()
++#define my_unreachable()
+ #endif
+
+ /*
+diff --git a/src/hlua.c b/src/hlua.c
+index c3bb269a..085544dc 100644
+--- a/src/hlua.c
++++ b/src/hlua.c
+@@ -64,7 +64,7 @@
+ * MAY_LJMP() marks an lua function that may use longjmp.
+ */
+ #define __LJMP
+-#define WILL_LJMP(func) do { func; __unreachable(); } while(0)
++#define WILL_LJMP(func) do { func; my_unreachable(); } while(0)
+ #define MAY_LJMP(func) func
+
+ /* This couple of function executes securely some Lua calls outside of
--- /dev/null
+commit 7e751a3c24a7021075fb298025c4a1ce98a5b049
+Author: Olivier Houchard <cognet@ci0.org>
+Date: Sun Oct 21 01:33:11 2018 +0200
+
+ BUG/MEDIUM: pools: Fix the usage of mmap()) with DEBUG_UAF.
+
+ When mapping memory with mmap(), we should use a fd of -1, not 0. 0 may
+ work on linux, but it doesn't work on FreeBSD, and probably other OSes.
+
+ It would be nice to backport this to 1.8 to help debugging there.
+
+ (cherry picked from commit 62975a7740cba4bdaf1c096dd246feba854d2410)
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+
+diff --git a/include/common/memory.h b/include/common/memory.h
+index a2237da5..da0641de 100644
+--- a/include/common/memory.h
++++ b/include/common/memory.h
+@@ -186,12 +186,13 @@ static inline void pool_free_area(void *area, size_t __maybe_unused size)
+ * some padding is added, the area's start address is copied at the end of the
+ * padding to help detect underflows.
+ */
++#include <errno.h>
+ static inline void *pool_alloc_area(size_t size)
+ {
+ size_t pad = (4096 - size) & 0xFF0;
+ void *ret;
+
+- ret = mmap(NULL, (size + 4095) & -4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0);
++ ret = mmap(NULL, (size + 4095) & -4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
+ if (ret == MAP_FAILED)
+ return NULL;
+ if (pad >= sizeof(void *))
--- /dev/null
+commit 105abe2f7a2e518afda9eb3bda5cceb60f6fd1b2
+Author: Olivier Houchard <cognet@ci0.org>
+Date: Sun Oct 21 03:01:20 2018 +0200
+
+ BUG/MEDIUM: h2: Close connection if no stream is left an GOAWAY was sent.
+
+ When we're closing a stream, is there's no stream left and a goaway was sent,
+ close the connection, there's no reason to keep it open.
+
+ [wt: it's likely that this is needed in 1.8 as well, though it's unclear
+ how to trigger this issue, some tests are needed]
+
+ (cherry picked from commit 52b946686c28891a4359e9361676dc62af4fffad)
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+
+diff --git a/src/mux_h2.c b/src/mux_h2.c
+index b1b039fe..6881302b 100644
+--- a/src/mux_h2.c
++++ b/src/mux_h2.c
+@@ -2540,7 +2540,7 @@ static void h2_detach(struct conn_stream *cs)
+ if (eb_is_empty(&h2c->streams_by_id) && /* don't close if streams exist */
+ ((h2c->conn->flags & CO_FL_ERROR) || /* errors close immediately */
+ (h2c->st0 >= H2_CS_ERROR && !h2c->task) || /* a timeout stroke earlier */
+- (h2c->flags & H2_CF_GOAWAY_FAILED) ||
++ (h2c->flags & (H2_CF_GOAWAY_FAILED | H2_CF_GOAWAY_SENT)) ||
+ (!h2c->mbuf->o && /* mux buffer empty, also process clean events below */
+ (conn_xprt_read0_pending(h2c->conn) ||
+ (h2c->last_sid >= 0 && h2c->max_id >= h2c->last_sid))))) {
--- /dev/null
+commit e1b3aa5613a5edbb52a44d69b3e6007d9d631981
+Author: Willy Tarreau <w@1wt.eu>
+Date: Mon Oct 22 06:22:46 2018 +0200
+
+ BUILD: Makefile: add the new ERR variable to force -Werror
+
+ Instead of having to fiddle with the CFLAGS, let's have ERR=1 to enable
+ -Werror.
+
+ (cherry picked from commit 23cd43e2d6fa2b6892a786a1a720c5f24e657f10)
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+
+diff --git a/Makefile b/Makefile
+index 6ffc1b06..94e04738 100644
+--- a/Makefile
++++ b/Makefile
+@@ -57,6 +57,7 @@
+ # DEP may be cleared to ignore changes to include files during development
+ # SMALL_OPTS may be used to specify some options to shrink memory usage.
+ # DEBUG may be used to set some internal debugging options.
++# ERR may be set to non-empty to pass -Werror to the compiler
+ # ADDINC may be used to complete the include path in the form -Ipath.
+ # ADDLIB may be used to complete the library list in the form -Lpath -llib.
+ # DEFINE may be used to specify any additional define, which will be reported
+@@ -143,6 +144,9 @@ LD = $(CC)
+ # Those flags only feed CFLAGS so it is not mandatory to use this form.
+ DEBUG_CFLAGS = -g
+
++#### Add -Werror when set to non-empty
++ERR =
++
+ #### Compiler-specific flags that may be used to disable some negative over-
+ # optimization or to silence some warnings. -fno-strict-aliasing is needed with
+ # gcc >= 4.4.
+@@ -807,6 +811,11 @@ EBTREE_DIR := ebtree
+ #### Global compile options
+ VERBOSE_CFLAGS = $(CFLAGS) $(TARGET_CFLAGS) $(SMALL_OPTS) $(DEFINE)
+ COPTS = -Iinclude -I$(EBTREE_DIR) -Wall
++
++ifneq ($(ERR),)
++COPTS += -Werror
++endif
++
+ COPTS += $(CFLAGS) $(TARGET_CFLAGS) $(SMALL_OPTS) $(DEFINE) $(SILENT_DEFINE)
+ COPTS += $(DEBUG) $(OPTIONS_CFLAGS) $(ADDINC)
+
--- /dev/null
+commit bf7b382e528ab62a9f695b07e659d2f77545e93d
+Author: Frédéric Lécaille <flecaille@haproxy.com>
+Date: Thu Oct 25 20:17:45 2018 +0200
+
+ BUG/MINOR: cache: Crashes with "total-max-size" > 2047(MB).
+
+ With this patch we support cache size larger than 2047 (MB) and prevent haproxy from crashing when "total-max-size" is parsed as negative values by atoi().
+
+ The limit at parsing time is 4095 MB (UINT_MAX >> 20).
+
+ May be backported to 1.8.
+
+ (cherry picked from commit b9b8b6b6beb84b6b942d24eda56bfbe3812cc294)
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+
+diff --git a/src/cache.c b/src/cache.c
+index 39e0bad4..df3649ea 100644
+--- a/src/cache.c
++++ b/src/cache.c
+@@ -770,17 +770,32 @@ int cfg_parse_cache(const char *file, int linenum, char **args, int kwm)
+ tmp_cache_config->maxblocks = 0;
+ }
+ } else if (strcmp(args[0], "total-max-size") == 0) {
+- int maxsize;
++ unsigned long int maxsize;
++ char *err;
+
+ if (alertif_too_many_args(1, file, linenum, args, &err_code)) {
+ err_code |= ERR_ABORT;
+ goto out;
+ }
+
++ maxsize = strtoul(args[1], &err, 10);
++ if (err == args[1] || *err != '\0') {
++ ha_warning("parsing [%s:%d]: total-max-size wrong value '%s'\n",
++ file, linenum, args[1]);
++ err_code |= ERR_ABORT;
++ goto out;
++ }
++
++ if (maxsize > (UINT_MAX >> 20)) {
++ ha_warning("parsing [%s:%d]: \"total-max-size\" (%s) must not be greater than %u\n",
++ file, linenum, args[1], UINT_MAX >> 20);
++ err_code |= ERR_ABORT;
++ goto out;
++ }
++
+ /* size in megabytes */
+- maxsize = atoi(args[1]) * 1024 * 1024 / CACHE_BLOCKSIZE;
++ maxsize *= 1024 * 1024 / CACHE_BLOCKSIZE;
+ tmp_cache_config->maxblocks = maxsize;
+-
+ } else if (strcmp(args[0], "max-age") == 0) {
+ if (alertif_too_many_args(1, file, linenum, args, &err_code)) {
+ err_code |= ERR_ABORT;
--- /dev/null
+commit 68c23dedaaae8f29d26c4791b30d138ed1411548
+Author: Frédéric Lécaille <flecaille@haproxy.com>
+Date: Thu Oct 25 20:18:59 2018 +0200
+
+ BUG/MINOR: cache: Wrong usage of shctx_init().
+
+ With this patch we check that shctx_init() does not returns 0.
+ This is possible if the maxblocks argument, which is passed as an
+ int, is negative due to an implicit conversion.
+
+ Must be backported to 1.8.
+
+ (cherry picked from commit bc584494e625983f16f35982aa6dd6889e8dd222)
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+
+diff --git a/src/cache.c b/src/cache.c
+index df3649ea..667cede3 100644
+--- a/src/cache.c
++++ b/src/cache.c
+@@ -837,7 +837,7 @@ int cfg_post_parse_section_cache()
+
+ ret_shctx = shctx_init(&shctx, tmp_cache_config->maxblocks, CACHE_BLOCKSIZE, sizeof(struct cache), 1);
+
+- if (ret_shctx < 0) {
++ if (ret_shctx <= 0) {
+ if (ret_shctx == SHCTX_E_INIT_LOCK)
+ ha_alert("Unable to initialize the lock for the cache.\n");
+ else
--- /dev/null
+commit 49f82640bf3c9a9c808568344bfa94d279c95b7e
+Author: Frédéric Lécaille <flecaille@haproxy.com>
+Date: Thu Oct 25 20:22:46 2018 +0200
+
+ BUG/MINOR: ssl: Wrong usage of shctx_init().
+
+ With this patch we check that shctx_init() does not return 0.
+
+ Must be backported to 1.8.
+
+ (cherry picked from commit 4c8aa117f9bda3b5253f03ad5a7135a9165060f5)
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+
+diff --git a/src/ssl_sock.c b/src/ssl_sock.c
+index cfbc38b7..19e41743 100644
+--- a/src/ssl_sock.c
++++ b/src/ssl_sock.c
+@@ -4768,7 +4768,7 @@ int ssl_sock_prepare_bind_conf(struct bind_conf *bind_conf)
+ sizeof(struct sh_ssl_sess_hdr) + SHSESS_BLOCK_MIN_SIZE,
+ sizeof(*sh_ssl_sess_tree),
+ ((global.nbthread > 1) || (!global_ssl.private_cache && (global.nbproc > 1))) ? 1 : 0);
+- if (alloc_ctx < 0) {
++ if (alloc_ctx <= 0) {
+ if (alloc_ctx == SHCTX_E_INIT_LOCK)
+ ha_alert("Unable to initialize the lock for the shared SSL session cache. You can retry using the global statement 'tune.ssl.force-private-cache' but it could increase CPU usage due to renegotiations if nbproc > 1.\n");
+ else
--- /dev/null
+commit 9c416cf3cc449fd46880d5a7c3fdd1bb98447b68
+Author: Frédéric Lécaille <flecaille@haproxy.com>
+Date: Thu Oct 25 10:46:40 2018 +0200
+
+ DOC: cache: Missing information about "total-max-size"
+
+ (cherry picked from commit e3c83d80e3aadb7b2641b861725c9d1dd7dc6713)
+ [wt: this only retrieves from the original patch the part related to
+ the max configurable size for total-max-size]
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+
+diff --git a/doc/configuration.txt b/doc/configuration.txt
+index 7a268386..09980248 100644
+--- a/doc/configuration.txt
++++ b/doc/configuration.txt
+@@ -17132,7 +17132,7 @@ cache <name>
+
+ total-max-size <megabytes>
+ Define the size in RAM of the cache in megabytes. This size is split in
+- blocks of 1kB which are used by the cache entries.
++ blocks of 1kB which are used by the cache entries. Its maximum value is 4095.
+
+ max-age <seconds>
+ Define the maximum expiration duration. The expiration is set has the lowest
--- /dev/null
+commit 7b728d616e417f0a8cd25375f70b8a332ad23a71
+Author: Lukas Tribus <lukas@ltri.eu>
+Date: Sat Oct 27 20:06:59 2018 +0200
+
+ BUG/MINOR: only mark connections private if NTLM is detected
+
+ Instead of marking all connections that see a 401/407 response private
+ (for connection reuse), this patch detects a RFC4559/NTLM authentication
+ scheme and restricts the private setting to those connections.
+
+ This is so we can reuse connections with 401/407 responses with
+ deterministic load balancing algorithms later (which requires another fix).
+
+ This fixes the problem reported here by Elliot Barlas :
+
+ https://discourse.haproxy.org/t/unable-to-configure-load-balancing-per-request-over-persistent-connection/3144
+
+ Should be backported to 1.8.
+
+ (cherry picked from commit fd9b68c48ecdba5e7971899f4eec315c8e3a3cfe)
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+
+diff --git a/doc/configuration.txt b/doc/configuration.txt
+index 09980248..43b1b822 100644
+--- a/doc/configuration.txt
++++ b/doc/configuration.txt
+@@ -4798,10 +4798,8 @@ http-reuse { never | safe | aggressive | always }
+ - connections sent to a server with a TLS SNI extension are marked private
+ and are never shared;
+
+- - connections receiving a status code 401 or 407 expect some authentication
+- to be sent in return. Due to certain bogus authentication schemes (such
+- as NTLM) relying on the connection, these connections are marked private
+- and are never shared;
++ - connections with certain bogus authentication schemes (relying on the
++ connection) like NTLM are detected, marked private and are never shared;
+
+ No connection pool is involved, once a session dies, the last idle connection
+ it was attached to is deleted at the same time. This ensures that connections
+diff --git a/src/proto_http.c b/src/proto_http.c
+index 8f86422d..cde2dbf7 100644
+--- a/src/proto_http.c
++++ b/src/proto_http.c
+@@ -4388,8 +4388,6 @@ void http_end_txn_clean_session(struct stream *s)
+ * it's better to do it (at least it helps with debugging).
+ */
+ s->txn->flags |= TX_PREFER_LAST;
+- if (srv_conn)
+- srv_conn->flags |= CO_FL_PRIVATE;
+ }
+
+ /* Never ever allow to reuse a connection from a non-reuse backend */
+@@ -5053,10 +5051,13 @@ int http_wait_for_response(struct stream *s, struct channel *rep, int an_bit)
+ struct http_txn *txn = s->txn;
+ struct http_msg *msg = &txn->rsp;
+ struct hdr_ctx ctx;
++ struct connection *srv_conn;
+ int use_close_only;
+ int cur_idx;
+ int n;
+
++ srv_conn = cs_conn(objt_cs(s->si[1].end));
++
+ DPRINTF(stderr,"[%u] %s: stream=%p b=%p, exp(r,w)=%u,%u bf=%08x bh=%d analysers=%02x\n",
+ now_ms, __FUNCTION__,
+ s,
+@@ -5588,6 +5589,27 @@ int http_wait_for_response(struct stream *s, struct channel *rep, int an_bit)
+ msg->body_len = msg->chunk_len = cl;
+ }
+
++ /* check for NTML authentication headers in 401 (WWW-Authenticate) and
++ * 407 (Proxy-Authenticate) responses and set the connection to private
++ */
++ if (srv_conn && txn->status == 401) {
++ /* check for Negotiate/NTLM WWW-Authenticate headers */
++ ctx.idx = 0;
++ while (http_find_header2("WWW-Authenticate", 16, rep->buf->p, &txn->hdr_idx, &ctx)) {
++ if ((ctx.vlen >= 9 && word_match(ctx.line + ctx.val, ctx.vlen, "Negotiate", 9)) ||
++ (ctx.vlen >= 4 && word_match(ctx.line + ctx.val, ctx.vlen, "NTLM", 4)))
++ srv_conn->flags |= CO_FL_PRIVATE;
++ }
++ } else if (srv_conn && txn->status == 407) {
++ /* check for Negotiate/NTLM Proxy-Authenticate headers */
++ ctx.idx = 0;
++ while (http_find_header2("Proxy-Authenticate", 18, rep->buf->p, &txn->hdr_idx, &ctx)) {
++ if ((ctx.vlen >= 9 && word_match(ctx.line + ctx.val, ctx.vlen, "Negotiate", 9)) ||
++ (ctx.vlen >= 4 && word_match(ctx.line + ctx.val, ctx.vlen, "NTLM", 4)))
++ srv_conn->flags |= CO_FL_PRIVATE;
++ }
++ }
++
+ skip_content_length:
+ /* Now we have to check if we need to modify the Connection header.
+ * This is more difficult on the response than it is on the request,
--- /dev/null
+commit a100980f50f92e588c2b60f20571e84bf749f3e3
+Author: Lukas Tribus <lukas@ltri.eu>
+Date: Sat Oct 27 20:07:40 2018 +0200
+
+ BUG/MINOR: only auto-prefer last server if lb-alg is non-deterministic
+
+ While "option prefer-last-server" only applies to non-deterministic load
+ balancing algorithms, 401/407 responses actually caused haproxy to prefer
+ the last server unconditionally.
+
+ As this breaks deterministic load balancing algorithms like uri, this
+ patch applies the same condition here.
+
+ Should be backported to 1.8 (together with "BUG/MINOR: only mark
+ connections private if NTLM is detected").
+
+ (cherry picked from commit 80512b186fd7f4ef3bc7d9c92b281c549d72aa8a)
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+
+diff --git a/doc/configuration.txt b/doc/configuration.txt
+index 43b1b822..f0558d5e 100644
+--- a/doc/configuration.txt
++++ b/doc/configuration.txt
+@@ -2498,6 +2498,11 @@ balance url_param <param> [check_post]
+ algorithm, mode nor option have been set. The algorithm may only be set once
+ for each backend.
+
++ With authentication schemes that require the same connection like NTLM, URI
++ based alghoritms must not be used, as they would cause subsequent requests
++ to be routed to different backend servers, breaking the invalid assumptions
++ NTLM relies on.
++
+ Examples :
+ balance roundrobin
+ balance url_param userid
+@@ -6486,8 +6491,9 @@ no option prefer-last-server
+ close of the connection. This can make sense for static file servers. It does
+ not make much sense to use this in combination with hashing algorithms. Note,
+ haproxy already automatically tries to stick to a server which sends a 401 or
+- to a proxy which sends a 407 (authentication required). This is mandatory for
+- use with the broken NTLM authentication challenge, and significantly helps in
++ to a proxy which sends a 407 (authentication required), when the load
++ balancing algorithm is not deterministic. This is mandatory for use with the
++ broken NTLM authentication challenge, and significantly helps in
+ troubleshooting some faulty applications. Option prefer-last-server might be
+ desirable in these environments as well, to avoid redistributing the traffic
+ after every other response.
+diff --git a/src/backend.c b/src/backend.c
+index fc1eac0d..b3fd6c67 100644
+--- a/src/backend.c
++++ b/src/backend.c
+@@ -572,9 +572,9 @@ int assign_server(struct stream *s)
+ if (conn &&
+ (conn->flags & CO_FL_CONNECTED) &&
+ objt_server(conn->target) && __objt_server(conn->target)->proxy == s->be &&
++ (s->be->lbprm.algo & BE_LB_KIND) != BE_LB_KIND_HI &&
+ ((s->txn && s->txn->flags & TX_PREFER_LAST) ||
+ ((s->be->options & PR_O_PREF_LAST) &&
+- (s->be->lbprm.algo & BE_LB_KIND) != BE_LB_KIND_HI &&
+ (!s->be->max_ka_queue ||
+ server_has_room(__objt_server(conn->target)) ||
+ (__objt_server(conn->target)->nbpend + 1) < s->be->max_ka_queue))) &&
+diff --git a/src/proto_http.c b/src/proto_http.c
+index cde2dbf7..a48c4fdb 100644
+--- a/src/proto_http.c
++++ b/src/proto_http.c
+@@ -4385,7 +4385,8 @@ void http_end_txn_clean_session(struct stream *s)
+ * server over the same connection. This is required by some
+ * broken protocols such as NTLM, and anyway whenever there is
+ * an opportunity for sending the challenge to the proper place,
+- * it's better to do it (at least it helps with debugging).
++ * it's better to do it (at least it helps with debugging), at
++ * least for non-deterministic load balancing algorithms.
+ */
+ s->txn->flags |= TX_PREFER_LAST;
+ }
--- /dev/null
+commit 69d4ddf919fc4bc6d296a743baeccdd44fb89be6
+Author: Willy Tarreau <w@1wt.eu>
+Date: Sun Oct 28 20:13:12 2018 +0100
+
+ BUG/MAJOR: http: http_txn_get_path() may deference an inexisting buffer
+
+ When the "path" sample fetch function is called without any path, the
+ function doesn't check that the request buffer is allocated. While this
+ doesn't happen with the request during processing, it can definitely
+ happen when mistakenly trying to reference a path from the response
+ since the request channel is not allocated anymore.
+
+ It's certain that this bug was emphasized by the buffer changes that
+ went in 1.9 and the HTTP refactoring, but at first glance, 1.8 doesn't
+ seem 100% safe either so it's possible that older version are affected
+ as well.
+
+ Thanks to PiBa-NL for reporting this bug with a reproducer.
+
+ (cherry picked from commit 9d9ccdbf8b1178fefa2843c83bc6612733f9eca6)
+ [wt: minor adaptation to older buffer API. There are some call places
+ which don't look structurally safe though in their context the
+ buffer always ought to be there]
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+
+diff --git a/src/proto_http.c b/src/proto_http.c
+index a48c4fdb..fb18357b 100644
+--- a/src/proto_http.c
++++ b/src/proto_http.c
+@@ -985,6 +985,9 @@ char *http_get_path(struct http_txn *txn)
+ {
+ char *ptr, *end;
+
++ if (!txn->req.chn->buf->size)
++ return NULL;
++
+ ptr = txn->req.chn->buf->p + txn->req.sl.rq.u;
+ end = ptr + txn->req.sl.rq.u_l;
+
--- /dev/null
+commit a873c161d251abd025008034c0ddef8cd7f39511
+Author: Willy Tarreau <w@1wt.eu>
+Date: Mon Oct 29 18:02:54 2018 +0100
+
+ BUG/MEDIUM: auth/threads: use of crypt() is not thread-safe
+
+ It was reported here that authentication may fail when threads are
+ enabled :
+
+ https://bugzilla.redhat.com/show_bug.cgi?id=1643941
+
+ While I couldn't reproduce the issue, it's obvious that there is a
+ problem with the use of the non-reentrant crypt() function there.
+ On Linux systems there's crypt_r() but not on the vast majority of
+ other ones. Thus a first approach consists in placing a lock around
+ this crypt() call. Another patch may relax it when crypt_r() is
+ available.
+
+ This fix must be backported to 1.8. Thanks to Ryan O'Hara for the
+ quick notification.
+
+ (cherry picked from commit 34d4b525a129baa6f52a930ae629ddb1ba4255c2)
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+
+diff --git a/include/common/hathreads.h b/include/common/hathreads.h
+index 44bd66d1..24fb1d1a 100644
+--- a/include/common/hathreads.h
++++ b/include/common/hathreads.h
+@@ -373,6 +373,7 @@ enum lock_label {
+ START_LOCK,
+ TLSKEYS_REF_LOCK,
+ PENDCONN_LOCK,
++ AUTH_LOCK,
+ LOCK_LABELS
+ };
+ struct lock_stat {
+@@ -495,6 +496,7 @@ static inline const char *lock_label(enum lock_label label)
+ case START_LOCK: return "START";
+ case TLSKEYS_REF_LOCK: return "TLSKEYS_REF";
+ case PENDCONN_LOCK: return "PENDCONN";
++ case AUTH_LOCK: return "AUTH";
+ case LOCK_LABELS: break; /* keep compiler happy */
+ };
+ /* only way to come here is consecutive to an internal bug */
+diff --git a/src/auth.c b/src/auth.c
+index a2c689f7..e0fb1352 100644
+--- a/src/auth.c
++++ b/src/auth.c
+@@ -28,6 +28,7 @@
+ #include <types/global.h>
+ #include <common/config.h>
+ #include <common/errors.h>
++#include <common/hathreads.h>
+
+ #include <proto/acl.h>
+ #include <proto/log.h>
+@@ -37,6 +38,10 @@
+
+ struct userlist *userlist = NULL; /* list of all existing userlists */
+
++#ifdef CONFIG_HAP_CRYPT
++__decl_hathreads(static HA_SPINLOCK_T auth_lock);
++#endif
++
+ /* find targets for selected gropus. The function returns pointer to
+ * the userlist struct ot NULL if name is NULL/empty or unresolvable.
+ */
+@@ -245,7 +250,9 @@ check_user(struct userlist *ul, const char *user, const char *pass)
+
+ if (!(u->flags & AU_O_INSECURE)) {
+ #ifdef CONFIG_HAP_CRYPT
++ HA_SPIN_LOCK(AUTH_LOCK, &auth_lock);
+ ep = crypt(pass, u->pass);
++ HA_SPIN_UNLOCK(AUTH_LOCK, &auth_lock);
+ #else
+ return 0;
+ #endif
--- /dev/null
+diff --git a/src/ssl_sock.c b/src/ssl_sock.c
+index cfbc38b..025a144 100644
+--- a/src/ssl_sock.c
++++ b/src/ssl_sock.c
+@@ -39,6 +39,7 @@
+ #include <netdb.h>
+ #include <netinet/tcp.h>
+
++#include <openssl/bn.h>
+ #include <openssl/crypto.h>
+ #include <openssl/ssl.h>
+ #include <openssl/x509.h>
+@@ -229,6 +230,7 @@ unsigned long ssl_id_function(void)
+
+ void ssl_locking_function(int mode, int n, const char * file, int line)
+ {
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ if (mode & CRYPTO_LOCK) {
+ if (mode & CRYPTO_READ)
+ HA_RWLOCK_RDLOCK(SSL_LOCK, &ssl_rwlocks[n]);
+@@ -241,10 +243,12 @@ void ssl_locking_function(int mode, int n, const char * file, int line)
+ else
+ HA_RWLOCK_WRUNLOCK(SSL_LOCK, &ssl_rwlocks[n]);
+ }
++#endif
+ }
+
+ static int ssl_locking_init(void)
+ {
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ int i;
+
+ ssl_rwlocks = malloc(sizeof(HA_RWLOCK_T)*CRYPTO_num_locks());
+@@ -256,7 +260,7 @@ static int ssl_locking_init(void)
+
+ CRYPTO_set_id_callback(ssl_id_function);
+ CRYPTO_set_locking_callback(ssl_locking_function);
+-
++#endif
+ return 0;
+ }
+
+@@ -1702,8 +1706,13 @@ ssl_sock_do_create_cert(const char *servername, struct bind_conf *bind_conf, SSL
+ ASN1_INTEGER_set(X509_get_serialNumber(newcrt), HA_ATOMIC_ADD(&ssl_ctx_serial, 1));
+
+ /* Set duration for the certificate */
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ if (!X509_gmtime_adj(X509_get_notBefore(newcrt), (long)-60*60*24) ||
+ !X509_gmtime_adj(X509_get_notAfter(newcrt),(long)60*60*24*365))
++#else
++ if (!X509_gmtime_adj(X509_getm_notBefore(newcrt), (long)-60*60*24) ||
++ !X509_gmtime_adj(X509_getm_notAfter(newcrt),(long)60*60*24*365))
++#endif
+ goto mkcert_error;
+
+ /* set public key in the certificate */
+@@ -6276,7 +6285,11 @@ smp_fetch_ssl_x_notafter(const struct arg *args, struct sample *smp, const char
+ goto out;
+
+ smp_trash = get_trash_chunk();
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ if (ssl_sock_get_time(X509_get_notAfter(crt), smp_trash) <= 0)
++#else
++ if (ssl_sock_get_time(X509_getm_notAfter(crt), smp_trash) <= 0)
++#endif
+ goto out;
+
+ smp->data.u.str = *smp_trash;
+@@ -6376,7 +6389,11 @@ smp_fetch_ssl_x_notbefore(const struct arg *args, struct sample *smp, const char
+ goto out;
+
+ smp_trash = get_trash_chunk();
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ if (ssl_sock_get_time(X509_get_notBefore(crt), smp_trash) <= 0)
++#else
++ if (ssl_sock_get_time(X509_getm_notBefore(crt), smp_trash) <= 0)
++#endif
+ goto out;
+
+ smp->data.u.str = *smp_trash;
+@@ -8926,7 +8943,11 @@ static void __ssl_sock_init(void)
+ #endif
+
+ xprt_register(XPRT_SSL, &ssl_sock);
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ SSL_library_init();
++#else
++ OPENSSL_init_ssl(0, NULL);
++#endif
+ cm = SSL_COMP_get_compression_methods();
+ sk_SSL_COMP_zero(cm);
+ #ifdef USE_THREAD
+@@ -8958,8 +8979,13 @@ static void __ssl_sock_init(void)
+ #else /* OPENSSL_IS_BORINGSSL */
+ OPENSSL_VERSION_TEXT
+ "\nRunning on OpenSSL version : %s%s",
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ SSLeay_version(SSLEAY_VERSION),
+ ((OPENSSL_VERSION_NUMBER ^ SSLeay()) >> 8) ? " (VERSIONS DIFFER!)" : "");
++#else
++ OpenSSL_version(OPENSSL_VERSION),
++ ((OPENSSL_VERSION_NUMBER ^ OpenSSL_version_num()) >> 8) ? " (VERSIONS DIFFER!)" : "");
++#endif
+ #endif
+ memprintf(&ptr, "%s\nOpenSSL library supports TLS extensions : "
+ #if OPENSSL_VERSION_NUMBER < 0x00907000L
+@@ -9051,11 +9077,14 @@ static void __ssl_sock_deinit(void)
+ #endif
+
+ ERR_remove_state(0);
++
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ ERR_free_strings();
+
+ EVP_cleanup();
++#endif
+
+-#if OPENSSL_VERSION_NUMBER >= 0x00907000L
++#if OPENSSL_VERSION_NUMBER >= 0x00907000L && OPENSSL_VERSION_NUMBER < 0x10100000L
+ CRYPTO_cleanup_all_ex_data();
+ #endif
+ }
PKG_NAME:=https_dns_proxy
PKG_VERSION:=2018-04-23
-PKG_RELEASE=1
+PKG_RELEASE=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_MIRROR_HASH:=24b7e4238c37e646f33eee3a374f6b7beb5c167b9c5008cc13b51e5f1f3a44ea
config https_dns_proxy
option listen_addr '127.0.0.1'
option listen_port '5053'
+ option bootstrap_dns '8.8.8.8,8.8.4.4'
+ option url_prefix 'https://dns.google.com/resolve?'
+ option user 'nobody'
+ option group 'nogroup'
+ option subnet_addr ''
+ option proxy_server ''
+
+config https_dns_proxy
+ option listen_addr '127.0.0.1'
+ option listen_port '5054'
+ option bootstrap_dns '1.1.1.1,1.0.0.1'
+ option url_prefix 'https://cloudflare-dns.com/dns-query?ct=application/dns-json&'
option user 'nobody'
option group 'nogroup'
option subnet_addr ''
option proxy_server ''
- option url_prefix 'https://dns.google.com/resolve?'
#!/bin/sh /etc/rc.common
START=80
-
USE_PROCD=1
-PROG=/usr/sbin/https_dns_proxy
-
-start_instance() {
- local cfg="$1"
- local listen_addr listen_port user group
- config_get listen_addr "$cfg" listen_addr
- config_get listen_port "$cfg" listen_port
- config_get user "$cfg" user
- config_get group "$cfg" group
- config_get subnet_addr "$cfg" subnet_addr
- config_get proxy_server "$cfg" proxy_server
- config_get url_prefix "$cfg" url_prefix
+PROG=/usr/sbin/https_dns_proxy
- if [ -n "$subnet_addr" ]; then
- subnet_param="-e $subnet_addr"
- fi
+xappend() { param="$param $1"; }
+
+append_parm() {
+ local section="$1"
+ local option="$2"
+ local switch="$3"
+ local default="$4"
+ local _loctmp
+ config_get _loctmp "$section" "$option" "$default"
+ [ -z "$_loctmp" ] && return 0
+ xappend "$switch $_loctmp"
+}
- if [ -n "$proxy_server" ]; then
- proxy_param="-t $proxy_server"
- fi
+start_instance() {
+ local cfg="$1" param
- if [ -z "$url_prefix" ]; then
- url_prefix="https://dns.google.com/resolve?"
- fi
+ append_parm "$cfg" 'listen_addr' '-a' '127.0.0.1'
+ append_parm "$cfg" 'listen_port' '-p' '5053'
+ append_parm "$cfg" 'bootstrap_dns' '-b'
+ append_parm "$cfg" 'url_prefix' '-r'
+ append_parm "$cfg" 'user' '-u' 'nobody'
+ append_parm "$cfg" 'group' '-g' 'nogroup'
+ append_parm "$cfg" 'subnet_addr' '-e'
+ append_parm "$cfg" 'proxy_server' '-t'
procd_open_instance
- procd_set_param command ${PROG} \
- -a "$listen_addr" -p "$listen_port" \
- -u "$user" -g "$group" $subnet_param $proxy_param \
- -r "$url_prefix"
+ procd_set_param command ${PROG} ${param}
procd_set_param respawn
procd_close_instance
}
include $(TOPDIR)/rules.mk
PKG_NAME:=i2pd
-PKG_VERSION:=2.19.0
+PKG_VERSION:=2.21.0
PKG_RELEASE:=1
PKG_BUILD_PARALLEL:=1
PKG_SOURCE_URL:=https://codeload.github.com/PurpleI2P/i2pd/tar.gz/$(PKG_VERSION)?
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=7202497ffc3db632d0f7fed93eafaf39aa75efea199705dae7d022249b069eb9
+PKG_HASH:=96c15cf7b51feacd5bb3f7032c7d961961325102574a1a4d6cb8dd794e906e5b
PKG_LICENSE:=BSD-3-clause
include $(INCLUDE_DIR)/package.mk
--- /dev/null
+#
+# Copyright (C) 2016-2017 Mauro Mozzarelli
+#
+# This is free software, licensed under the GNU General Public License
+# See /LICENSE for more information.
+#
+# AUTHOR: Mauro Mozzarelli <mauro@ezplanet.org>
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=ipvsadm
+PKG_VERSION:=1.29
+PKG_MAINTAINER:=Mauro Mozzarelli <mauro@ezplanet.org>, \
+ Florian Eckert <fe@dev.tdt.de>
+PKG_LICENSE:=GPL-2.0+
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=https://www.kernel.org/pub/linux/utils/kernel/ipvsadm/
+PKG_HASH:=c3de4a21d90a02c621f0c72ee36a7aa27374b6f29fd4178f33fbf71b4c66c149
+
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/ipvsadm
+ SECTION:=net
+ CATEGORY:=Network
+ TITLE:=IP Virtual Server Configuration Manager
+ URL:=http://www.linuxvirtualserver.org
+ DEPENDS:= +kmod-nf-ipvs +libnl-tiny +libpopt
+endef
+
+define Package/ipvsadm/description
+ IPVS (IP Virtual Server) implements transport-layer load balancing
+ inside the Linux kernel, so called Layer-4 switching. The command line tool
+ ipvsadm is used to set up, maintain or inspect the virtual server table
+ in the Linux kernel. The Linux Virtual Server can be used to build scalable
+ network services based on a cluster of two or more nodes.
+endef
+
+TARGET_CFLAGS += \
+ -D_GNU_SOURCE \
+ -I$(STAGING_DIR)/usr/include/libnl-tiny
+
+define Build/Compile
+ CFLAGS="$(TARGET_CFLAGS)" \
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ CC="$(TARGET_CC)" \
+ LIBS="$(TARGET_LDFLAGS) -lnl-tiny -lpopt"
+endef
+
+define Package/ipvsadm/install
+ $(INSTALL_DIR) $(1)/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/ipvsadm $(1)/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/ipvsadm-save $(1)/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/ipvsadm-restore $(1)/sbin/
+endef
+
+$(eval $(call BuildPackage,ipvsadm))
--- /dev/null
+--- a/Makefile
++++ b/Makefile
+@@ -35,7 +35,7 @@ ARCH = $(shell uname -m)
+ RPMSOURCEDIR = $(shell rpm --eval '%_sourcedir')
+ RPMSPECDIR = $(shell rpm --eval '%_specdir')
+
+-CC = gcc
++BUILD_ROOT = $(DESTDIR)
+ INCLUDE =
+ SBIN = $(BUILD_ROOT)/sbin
+ MANDIR = usr/man
+@@ -46,9 +46,9 @@ INSTALL = install
+ STATIC_LIBS = libipvs/libipvs.a
+
+ ifeq "${ARCH}" "sparc64"
+- CFLAGS = -Wall -Wunused -Wstrict-prototypes -g -m64 -pipe -mcpu=ultrasparc -mcmodel=medlow
++ CFLAGS += -Wall -Wunused -Wstrict-prototypes -g -m64 -pipe -mcpu=ultrasparc -mcmodel=medlow
+ else
+- CFLAGS = -Wall -Wunused -Wstrict-prototypes -g
++ CFLAGS += -Wall -Wunused -Wstrict-prototypes -g
+ endif
+
+
+@@ -83,8 +83,9 @@ DEFINES += $(shell if [ ! -f ../ip_vs.h
+
+ all: libs ipvsadm
+
++$(STATIC_LIBS): libs
+ libs:
+- make -C libipvs
++ $(MAKE) -C libipvs
+
+ ipvsadm: $(OBJS) $(STATIC_LIBS)
+ $(CC) $(CFLAGS) -o $@ $^ $(LIBS)
+@@ -106,7 +107,7 @@ clean:
+ rm -rf debian/tmp
+ find . -name '*.[ao]' -o -name "*~" -o -name "*.orig" \
+ -o -name "*.rej" -o -name core | xargs rm -f
+- make -C libipvs clean
++ $(MAKE) -C libipvs clean
+
+ distclean: clean
+
+--- a/libipvs/Makefile
++++ b/libipvs/Makefile
+@@ -1,7 +1,6 @@
+ # Makefile for libipvs
+
+-CC = gcc
+-CFLAGS = -Wall -Wunused -Wstrict-prototypes -g -fPIC
++CFLAGS += -Wall -Wunused -Wstrict-prototypes -g -fPIC
+ ifneq (0,$(HAVE_NL))
+ CFLAGS += -DLIBIPVS_USE_NL
+ CFLAGS += $(shell \
--- /dev/null
+--- a/ipvsadm-restore
++++ b/ipvsadm-restore
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ # ipvsadm-restore - Restore IPVS rules
+ #
+ # A very simple wrapper to restore IPVS rules
+@@ -11,6 +11,8 @@
+ # This file:
+ #
+ # ChangeLog
++# M. Mozzarelli : Amended to use /bin/sh for compatibility
++# : with embedded systems using busybox
+ # Horms : Clear IPVS rules before adding from STDIN
+ # Horms : Filter out "^#"
+ #
+--- a/ipvsadm-save
++++ b/ipvsadm-save
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ # ipvsadm-save - Save IPVS rules
+ #
+ # A very simple wrapper to save IPVS rules
+@@ -12,6 +12,8 @@
+ #
+ # ChangeLog
+ #
++# M. Mozzarelli : Amended to use /bin/sh for compatibility
++# : with embedded systems using busybox
+ # Wensong Zhang : Added the "-n" option and the help()
+ #
+
PKG_NAME:=isc-dhcp
UPSTREAM_NAME:=dhcp
PKG_VERSION:=4.4.1
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dhcrelay $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc/config
- $(INSTALL_DATA) ./files/dhcrelay.conf $(1)/etc/config
+ $(INSTALL_DATA) ./files/dhcrelay.conf $(1)/etc/config/dhcrelay
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/dhcrelay4.init $(1)/etc/init.d/dhcrelay4
endef
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=jool
-PKG_VERSION:=2018.01.17
+PKG_VERSION:=3.5.7
PKG_RELEASE:=2
-PKG_LICENSE:=GPL-3.0
-PKG_LICENSE_FILES:=COPYING
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/NICMx/Jool/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=b8e95d1526cd2434dedbae292afd2d17f0780ac2dca2be21264712b41eb76a3d
+PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/Jool-$(PKG_VERSION)
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/NICMx/Jool.git
-PKG_SOURCE_VERSION:=9dfaf22e49f7905d94af9b73f9bee22c26d7dd4a
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.xz
-PKG_MIRROR_HASH:=79b558561f06f3df01a541b1d39b7d3d88f91d0ee6b8ce3abf91ebbed737225a
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=COPYING
-PKG_BUILD_DIR=$(KERNEL_BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
PKG_BUILD_PARALLEL:=1
PKG_BUILD_DEPENDS:=USE_UCLIBC:argp-standalone USE_MUSL:argp-standalone
PKG_FIXUP:=autoreconf
-include $(INCLUDE_DIR)/kernel.mk
include $(INCLUDE_DIR)/package.mk
MAKE_PATH:=usr
SECTION:=net
CATEGORY:=Network
URL:=https://www.jool.mx
- MAINTAINER:=Dan Luedtke <mail@danrl.com>
endef
define Package/jool/Default/description
--- /dev/null
+From 831486ea6c7d7adfbdc453587a65bcba247d698b Mon Sep 17 00:00:00 2001
+From: Alberto Leiva Popper <ydahhrk@gmail.com>
+Date: Fri, 6 Jul 2018 13:19:21 -0500
+Subject: [PATCH 1/2] Add support for kernel 4.17
+
+Fixes #266.
+---
+ mod/common/hash_table.c | 14 +++-----------
+ mod/stateful/fragment_db.c | 4 +---
+ 2 files changed, 4 insertions(+), 14 deletions(-)
+
+diff --git a/mod/common/hash_table.c b/mod/common/hash_table.c
+index 25ddd7a6..4e9272f8 100644
+--- a/mod/common/hash_table.c
++++ b/mod/common/hash_table.c
+@@ -23,8 +23,7 @@
+ * @macro HTABLE_NAME name of the hash table structure to generate. Optional; Default: hash_table.
+ * @macro KEY_TYPE data type of the table's keys.
+ * @macro VALUE_TYPE data type of the table's values.
+- * @macro HASH_TABLE_SIZE The size of the internal array, in slots. Optional;
+- * Default = Max = 64k - 1.
++ * @macro HASH_TABLE_SIZE The size of the internal array, in slots. MUST be a power of 2.
+ * @macro GENERATE_PRINT just define it if you want the print function; otherwise it will not be
+ * generated.
+ * @macro GENERATE_FOR_EACH just define it if you want the for_each function; otherwise it will not
+@@ -44,13 +43,6 @@
+ #define HTABLE_NAME hash_table
+ #endif
+
+-#ifndef HASH_TABLE_SIZE
+-/**
+- * This number should not exceed unsigned int's maximum.
+- */
+-#define HASH_TABLE_SIZE (64 * 1024 - 1)
+-#endif
+-
+ /** Creates a token name by concatenating prefix and suffix. */
+ #define CONCAT_AUX(prefix, suffix) prefix ## suffix
+ /** Seems useless, but if not present, the compiler won't expand the HTABLE_NAME macro... */
+@@ -131,7 +123,7 @@ static struct KEY_VALUE_PAIR *GET_AUX(struct HTABLE_NAME *table, const KEY_TYPE
+ if (WARN(!table, "The table is NULL."))
+ return NULL;
+
+- hash_code = table->hash_function(key) % HASH_TABLE_SIZE;
++ hash_code = table->hash_function(key) & (HASH_TABLE_SIZE - 1);
+ hlist_for_each(current_node, &table->table[hash_code]) {
+ current_pair = hlist_entry(current_node, struct KEY_VALUE_PAIR, hlist_hook);
+ if (table->equals_function(key, ¤t_pair->key))
+@@ -210,7 +202,7 @@ static int PUT(struct HTABLE_NAME *table, KEY_TYPE *key, VALUE_TYPE *value)
+ key_value->value = value;
+
+ /* Insert the key-value to the table. */
+- hash_code = table->hash_function(key) % HASH_TABLE_SIZE;
++ hash_code = table->hash_function(key) & (HASH_TABLE_SIZE - 1);
+ hlist_add_head(&key_value->hlist_hook, &table->table[hash_code]);
+ list_add_tail(&key_value->list_hook, &table->list);
+
+diff --git a/mod/stateful/fragment_db.c b/mod/stateful/fragment_db.c
+index 44f966aa..ef0b1f5a 100644
+--- a/mod/stateful/fragment_db.c
++++ b/mod/stateful/fragment_db.c
+@@ -90,10 +90,8 @@ static bool equals_function(const struct packet *k1, const struct packet *k2)
+ static unsigned int inet6_hash_frag(__be32 id, const struct in6_addr *saddr,
+ const struct in6_addr *daddr, u32 rnd)
+ {
+- u32 c;
+- c = jhash_3words(ipv6_addr_hash(saddr), ipv6_addr_hash(daddr),
++ return jhash_3words(ipv6_addr_hash(saddr), ipv6_addr_hash(daddr),
+ (__force u32)id, rnd);
+- return c & (INETFRAGS_HASHSZ - 1);
+ }
+ #endif
+
+--
+2.19.1
+
--- /dev/null
+From f9e62248f252accb0609243958fb51f0f99a5bf3 Mon Sep 17 00:00:00 2001
+From: Ricardo Salveti <ricardo@foundries.io>
+Date: Mon, 1 Oct 2018 22:45:17 -0300
+Subject: [PATCH 2/2] packet: rename offset_to_ptr to skb_offset_to_ptr to
+ avoid conflicts with newer kernel
+
+Rename offset_to_ptr to skb_offset_to_ptr to avoid definition conflict
+when building jool against linux >= 4.19.
+
+Fixes:
+| mod/stateful/../common/packet.c:73:14: error: conflicting types for 'offset_to_ptr'
+| static void *offset_to_ptr(struct sk_buff *skb, unsigned int offset)
+| ^~~~~~~~~~~~~
+| In file included from kernel-source/include/linux/export.h:45,
+| from kernel-source/include/linux/linkage.h:7,
+| from kernel-source/include/linux/kernel.h:7,
+| from kernel-source/include/linux/skbuff.h:17,
+| from mod/stateful/../../include/nat64/mod/common/packet.h:81,
+| from mod/stateful/../common/packet.c:1:
+| kernel-source/include/linux/compiler.h:297:21: note: previous definition of 'offset_to_ptr' was here
+| static inline void *offset_to_ptr(const int *off)
+| ^~~~~~~~~~~~~
+
+Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
+---
+ mod/common/packet.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/mod/common/packet.c b/mod/common/packet.c
+index 9b4fbcd6..1b094fcc 100644
+--- a/mod/common/packet.c
++++ b/mod/common/packet.c
+@@ -70,7 +70,7 @@ static int inhdr4(struct sk_buff *skb, const char *msg)
+ return -EINVAL;
+ }
+
+-static void *offset_to_ptr(struct sk_buff *skb, unsigned int offset)
++static void *skb_offset_to_ptr(struct sk_buff *skb, unsigned int offset)
+ {
+ return ((void *) skb->data) + offset;
+ }
+@@ -368,9 +368,9 @@ int pkt_init_ipv6(struct packet *pkt, struct sk_buff *skb)
+ pkt->l4_proto = meta.l4_proto;
+ pkt->is_inner = 0;
+ pkt->is_hairpin = false;
+- pkt->hdr_frag = meta.has_frag_hdr ? offset_to_ptr(skb, meta.frag_offset) : NULL;
++ pkt->hdr_frag = meta.has_frag_hdr ? skb_offset_to_ptr(skb, meta.frag_offset) : NULL;
+ skb_set_transport_header(skb, meta.l4_offset);
+- pkt->payload = offset_to_ptr(skb, meta.payload_offset);
++ pkt->payload = skb_offset_to_ptr(skb, meta.payload_offset);
+ pkt->original_pkt = pkt;
+
+ return 0;
+@@ -530,7 +530,7 @@ int pkt_init_ipv4(struct packet *pkt, struct sk_buff *skb)
+ pkt->is_hairpin = false;
+ pkt->hdr_frag = NULL;
+ skb_set_transport_header(skb, meta.l4_offset);
+- pkt->payload = offset_to_ptr(skb, meta.payload_offset);
++ pkt->payload = skb_offset_to_ptr(skb, meta.payload_offset);
+ pkt->original_pkt = pkt;
+
+ return 0;
+--
+2.19.1
+
PKG_NAME:=kadnode
-PKG_VERSION:=2.2.3
+PKG_VERSION:=2.2.5
PKG_RELEASE:=1
PKG_LICENSE:=MIT
PKG_SOURCE_URL:=https://codeload.github.com/mwarning/KadNode/tar.gz/v$(PKG_VERSION)?
PKG_SOURCE:=kadnode-$(PKG_VERSION).tar.gz
-PKG_HASH:=1f5538a4b904fd2a624a2046f9320f72357af619190188f14bfdb15b5e5f8488
+PKG_HASH:=a72dc54d1869e47e374935cf44aa888a9b13c9dc017ae22e29cf13ead38a506b
PKG_BUILD_DIR:=$(BUILD_DIR)/KadNode-$(PKG_VERSION)
include $(TOPDIR)/rules.mk
PKG_NAME:=keepalived
-PKG_VERSION:=1.4.4
+PKG_VERSION:=2.0.7
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.keepalived.org/software
-PKG_HASH:=147c2b3b782223128551fd0a1564eaa30ed84a94b68c50ec5087747941314704
+PKG_HASH:=bce45d6d5cf3620bfd88472ec839a75b5a14a54fda12d09e890670244873b8ab
PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=COPYING
TITLE:=Failover and monitoring daemon for LVS clusters
URL:=http://www.keepalived.org/
DEPENDS:= \
- +PACKAGE_libnl-genl:libnl-genl \
+libopenssl \
+libip4tc \
+IPV6:libip6tc \
+libxtables \
- +kmod-macvlan
+ +kmod-macvlan \
+ +libmagic \
+ +libnl-route \
+ +libnfnetlink \
+ +kmod-nf-ipvs
endef
define Package/keepalived/description
endef
CONFIGURE_ARGS+= \
+ --disable-libnl \
--enable-sha1 \
- --disable-lvs \
- --disable-lvs-syncd \
--disable-snmp \
--with-kernel-dir="$(LINUX_DIR)/$(LINUX_UAPI_DIR)"
--- /dev/null
+From 6c7a281473083f7ac47b426b2127a8c8e76caca5 Mon Sep 17 00:00:00 2001
+From: Quentin Armitage <quentin@armitage.org.uk>
+Date: Sat, 25 Aug 2018 11:36:11 +0100
+Subject: [PATCH] Include stdbool.h in process.c
+
+Signed-off-by: Quentin Armitage <quentin@armitage.org.uk>
+---
+ keepalived/core/process.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/keepalived/core/process.c b/keepalived/core/process.c
+index f11c32a3..22bcf254 100644
+--- a/keepalived/core/process.c
++++ b/keepalived/core/process.c
+@@ -30,6 +30,7 @@
+ #ifdef _HAVE_SCHED_RT_
+ #include <sched.h>
+ #endif
++#include <stdbool.h>
+
+ #include "process.h"
+ #include "logger.h"
+--
+2.11.0
+
include $(TOPDIR)/rules.mk
PKG_NAME:=knot
-PKG_VERSION:=2.6.8
+PKG_VERSION:=2.7.3
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://secure.nic.cz/files/knot-dns/
-PKG_HASH:=0daee8efd6262f10c54ee6f5fb99ca4d0f72e275513ec0902032af594cac1b15
+PKG_HASH:=8717c0f34e441e96bc32bc93b48333ea9c094c5075f91575e40ac30fcf6692df
PKG_MAINTAINER:=Daniel Salzman <daniel.salzman@nic.cz>
-PKG_LICENSE:=GPL-3.0 LGPL-2.0 0BSD MIT OLDAP-2.8
+PKG_LICENSE:=GPL-3.0 LGPL-2.0 0BSD BSD-3-Clause OLDAP-2.8
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_FIXUP:=autoreconf
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR)
- $(MAKE) -C $(PKG_BUILD_DIR)/libtap check
- $(MAKE) -C $(PKG_BUILD_DIR)/src/dnssec/tests check-compile
$(MAKE) -C $(PKG_BUILD_DIR)/tests check-compile
- $(MAKE) -C $(PKG_BUILD_DIR)/src/zscanner check-compile
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/libknot
$(CP) $(PKG_INSTALL_DIR)/usr/include/libknot/* $(1)/usr/include/libknot/
- $(INSTALL_DIR) $(1)/usr/include/dnssec
- $(CP) $(PKG_INSTALL_DIR)/usr/include/dnssec/* $(1)/usr/include/dnssec/
+ $(INSTALL_DIR) $(1)/usr/include/libdnssec
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/libdnssec/* $(1)/usr/include/libdnssec/
- $(INSTALL_DIR) $(1)/usr/include/zscanner
- $(CP) $(PKG_INSTALL_DIR)/usr/include/zscanner/* $(1)/usr/include/zscanner/
+ $(INSTALL_DIR) $(1)/usr/include/libzscanner
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/libzscanner/* $(1)/usr/include/libzscanner/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig/
$(INSTALL_BIN) ./files/runtests.sh $(1)/usr/share/knot/
$(INSTALL_DIR) $(1)/usr/share/knot/tap
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/libtap/runtests $(1)/usr/share/knot/tap/
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/libtap/tap/libtap.sh $(1)/usr/share/knot/tap/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/tests/tap/runtests $(1)/usr/share/knot/tap/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/tests/tap/libtap.sh $(1)/usr/share/knot/tap/
$(INSTALL_DIR) $(1)/usr/share/knot/tests
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/zscanner/tests/.libs/zscanner-tool $(1)/usr/share/knot/tests/
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/zscanner/tests/unittests $(1)/usr/share/knot/tests/test_zscanner
- $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/zscanner/tests/TESTS $(1)/usr/share/knot/tests/
- cp -a $(PKG_BUILD_DIR)/src/zscanner/tests/data $(1)/usr/share/knot/tests/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/tests/libzscanner/.libs/zscanner-tool $(1)/usr/share/knot/tests/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/tests/libzscanner/test_zscanner $(1)/usr/share/knot/tests/
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/tests/libzscanner/TESTS $(1)/usr/share/knot/tests/
+ cp -a $(PKG_BUILD_DIR)/tests/libzscanner/data $(1)/usr/share/knot/tests/
- find $(PKG_BUILD_DIR)/src/dnssec/tests -maxdepth 1 -executable -type f | \
- xargs -I{} basename {} | \
- xargs -I{} $(INSTALL_BIN) -T $(PKG_BUILD_DIR)/src/dnssec/tests/{} $(1)/usr/share/knot/tests/dnssec_test_{}
-
- find $(PKG_BUILD_DIR)/tests/.libs -maxdepth 1 -executable -type f | \
- xargs -I{} basename {} | \
- xargs -I{} $(INSTALL_BIN) -T $(PKG_BUILD_DIR)/tests/.libs/{} $(1)/usr/share/knot/tests/{}
-
- for module in contrib libknot modules utils; do \
+ for module in contrib knot libdnssec libknot modules utils; do \
find $(PKG_BUILD_DIR)/tests/$$$${module}/.libs -maxdepth 1 -executable -type f | \
xargs -I{} basename {} | \
xargs -I{} $(INSTALL_BIN) -T $(PKG_BUILD_DIR)/tests/$$$${module}/.libs/{} \
-diff --git a/src/zscanner/tests/unittests.in b/src/zscanner/tests/unittests.in
-index 9a4af53..f9b45bf 100644
---- a/src/zscanner/tests/unittests.in
-+++ b/src/zscanner/tests/unittests.in
+diff --git a/tests/libzscanner/test_zscanner.in b/tests/libzscanner/test_zscanner.in
+index 2c0c27526..72b2124c7 100644
+--- a/tests/libzscanner/test_zscanner.in
++++ b/tests/libzscanner/test_zscanner.in
@@ -1,15 +1,14 @@
#!/bin/sh
--SOURCE=@top_srcdir@/src/zscanner/tests
--BUILD=@top_builddir@/src/zscanner/tests
+-SOURCE=@top_srcdir@/tests/libzscanner
+-BUILD=@top_builddir@/tests/libzscanner
+SOURCE="."
+BUILD="/tmp/knot-test"
+mkdir -p "$BUILD"
--. @top_srcdir@/libtap/tap/libtap.sh
+-. @top_srcdir@/tests/tap/libtap.sh
-
-cd "$BUILD"
+. ../tap/libtap.sh
TMPDIR=$(test_tmpdir)
TESTS_DIR="$SOURCE"/data
-ZSCANNER_TOOL="$BUILD"/zscanner-tool
-+ZSCANNER_TOOL=./zscanner-tool
++ZSCANNER_TOOL="$SOURCE"/zscanner-tool
- plan 71
+ plan 80
diff --git a/samples/knot.sample.conf.in b/samples/knot.sample.conf.in
-index e07c8a7..8e057b0 100644
+index 10302f958..75082f537 100644
--- a/samples/knot.sample.conf.in
+++ b/samples/knot.sample.conf.in
-@@ -9,7 +9,7 @@ server:
- # Listen on all configured IPv6 interfaces.
- listen: ::@53
- # User for running the server.
-- # user: knot:knot
-+ user: knot:knot
-
- log:
- # Log info and more serious events to syslog.
-@@ -33,7 +33,9 @@ acl:
- # action: notify
-
- template:
--# - id: default
-+ - id: default
-+ max-journal-db-size: 20M
-+ max-timer-db-size: 5M
- # storage: "@storage_dir@"
+@@ -30,6 +30,8 @@ template:
+ - id: default
+ storage: "@storage_dir@"
+ file: "%s.zone"
++ max-journal-db-size: 20M
++ max-timer-db-size: 5M
zone:
+ # # Master zone
PKG_NAME:=krb5
PKG_VERSION:=1.16.1
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
ac_cv_func_regcomp=yes \
ac_cv_printf_positional=yes \
ac_cv_file__etc_environment=no \
- ac_cv_file__etc_TIMEZONE=no
+ ac_cv_file__etc_TIMEZONE=no \
+ ac_cv_header_keyutils_h=no
CONFIGURE_ARGS += \
--localstatedir=/etc \
include $(TOPDIR)/rules.mk
PKG_NAME:=linuxptp
-PKG_VERSION:=1.9.2
+PKG_VERSION:=2.0
PKG_RELEASE:=1
PKG_MAINTAINER:=Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
PKG_SOURCE_URL:=@SF/$(PKG_NAME)/v$(PKG_VERSION)
-PKG_HASH:=7f662e65c66c37ff211dc525476626875c2b74162ded05c8a25d036fb963b8d0
+PKG_HASH:=0a24d9401e87d4af023d201e234d91127d82c350daad93432106284aa9459c7d
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
+++ /dev/null
-#
-# Copyright (C) 2012-2014 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=lispmob
-PKG_REV:=180aa39d338a00bb532e421de7f8513492cf2e8b
-PKG_VERSION:=0.4
-PKG_RELEASE:=2
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_MIRROR_HASH:=584300e1a59cc976f3599213487ea8425f94300887a51c9804f0292cf2f0c8cc
-PKG_SOURCE_URL:=git://github.com/LISPmob/lispmob.git
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=$(PKG_REV)
-
-PKG_LICENSE:=GPLv2
-PKG_LICENSE_FILES:=LICENSE
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/lispd/default
- MAINTAINER:=Vasileios Lakafosis <lakafv@gmail.com>
- URL:=http://lisp.cisco.com/
-endef
-
-define Package/lispd
- SECTION:=net
- CATEGORY:=Network
- TITLE:=Locator/ID separation protocol (using TUN)
- URL:=https://github.com/LISPmob
- DEPENDS:= +librt +libopenssl +confuse +kmod-tun +uci @IPV6
- $(call Package/lispd/default)
-endef
-
-define Package/lispd/description
- This packet provides support for the Locator-ID Separation Protocol.
-endef
-
-MAKE_FLAGS += \
- platform=openwrt
-
-define Package/lispd/install
- $(INSTALL_DIR) $(1)/usr/sbin
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/lispd/lispd $(1)/usr/sbin/
- $(INSTALL_DIR) $(1)/etc/config
- $(INSTALL_CONF) $(PKG_BUILD_DIR)/openWRT/lispd.uci.example $(1)/etc/config/lispd
- $(INSTALL_DIR) $(1)/etc/init.d
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/openWRT/openwrt.init.script $(1)/etc/init.d/lisp
-endef
-
-$(eval $(call BuildPackage,lispd))
+++ /dev/null
---- a/lispd/lispd_output.c
-+++ b/lispd/lispd_output.c
-@@ -26,6 +26,7 @@
- * Alberto Rodriguez Natal <arnatal@ac.upc.edu>
- */
-
-+#define _GNU_SOURCE 1
-
-
- #include <assert.h>
---- a/lispd/lispd_input.c
-+++ b/lispd/lispd_input.c
-@@ -26,6 +26,7 @@
- * Alberto Rodriguez Natal <arnatal@ac.upc.edu>
- */
-
-+#define _GNU_SOURCE 1
-
- #include "lispd_input.h"
- #include "lispd_map_notify.h"
---- a/lispd/lispd_pkt_lib.c
-+++ b/lispd/lispd_pkt_lib.c
-@@ -28,6 +28,8 @@
- *
- */
-
-+#define _GNU_SOURCE 1
-+
- #include "lispd_afi.h"
- #include "lispd_pkt_lib.h"
- #include "lispd_lib.h"
include $(TOPDIR)/rules.mk
PKG_NAME:=mDNSResponder
-PKG_VERSION:=576.30.4
-PKG_RELEASE:=2
+PKG_VERSION:=878.70.2
+PKG_RELEASE:=1
PKG_SOURCE:=mDNSResponder-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://opensource.apple.com/tarballs/mDNSResponder/
-PKG_HASH:=4737cb51378377e11d0edb7bcdd1bec79cbdaa7b27ea09c13e3006e58f8d92c0
-PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
+PKG_HASH:=cdd03171ca05f16ea987bba1f8b0c4847d3035283ea0f5fa0ade75f64ec83ed5
+PKG_MAINTAINER:=
PKG_LICENSE:=Apache-2.0
PKG_BUILD_DIR:=$(BUILD_DIR)/mDNSResponder-$(PKG_VERSION)
LINKOPTS = -lsocket -lnsl -lresolv
JAVACFLAGS_OS += -I$(JDK)/include/solaris
ifneq ($(DEBUG),1)
-@@ -148,7 +149,8 @@ CFLAGS_OS = -DHAVE_IPV6 -no-cpp-precomp
- -D__MAC_OS_X_VERSION_MIN_REQUIRED=__MAC_OS_X_VERSION_10_4 \
+@@ -149,7 +150,8 @@ -D__MAC_OS_X_VERSION_MIN_REQUIRED=__MAC_OS_X_VERSION_10_4 \
+ -DHAVE_STRLCPY=1 \
-D__APPLE_USE_RFC_2292 #-Wunreachable-code
CC = gcc
-LD = $(CC) -dynamiclib
LINKOPTS = -lSystem
LDSUFFIX = dylib
JDK = /System/Library/Frameworks/JavaVM.framework/Home
-@@ -170,8 +172,9 @@ NSSLIBFILE := $(NSSLIBNAME)-$(NSSVERSIO
+@@ -172,8 +174,9 @@ NSSLIBFILE := $(NSSLIBNAME)-$(NSSVERSIO
NSSLINKNAME := $(NSSLIBNAME).so.2
NSSINSTPATH := /lib
INSTBASE?=/usr
STARTUPSCRIPTNAME?=mdns
-@@ -257,7 +260,7 @@ libdns_sd: setup $(BUILDDIR)/libdns_sd.$
+@@ -259,7 +262,7 @@ libdns_sd: setup $(BUILDDIR)/libdns_sd.$
CLIENTLIBOBJS = $(OBJDIR)/dnssd_clientlib.c.so.o $(OBJDIR)/dnssd_clientstub.c.so.o $(OBJDIR)/dnssd_ipc.c.so.o
$(BUILDDIR)/libdns_sd.$(LDSUFFIX): $(CLIENTLIBOBJS)
@$(STRIP) $@
Clients: setup libdns_sd ../Clients/build/dns-sd
-@@ -292,7 +295,7 @@ InstalledManPages: $(MANPATH)/man8/mdnsd
+@@ -294,7 +297,7 @@ InstalledManPages: $(MANPATH)/man8/mdnsd
InstalledClients: $(INSTBASE)/bin/dns-sd
@echo $+ " installed"
+ -[ -f $(ETCBASE)/nsswitch.conf ] && sed -e '/mdns/!s/^\(hosts:.*\)dns\(.*\)/\1mdns dns\2/' $(ETCBASE)/nsswitch.conf.pre-mdns > $(ETCBASE)/nsswitch.conf
#############################################################################
-
---- /dev/null
-+++ b/.gitignore
-@@ -0,0 +1,4 @@
-+Clients/build
-+mDNSPosix/build
-+mDNSPosix/objects
-+
+diff --git a/Clients/Makefile b/Clients/Makefile
+index 383af31..925c20e 100755
--- a/Clients/Makefile
+++ b/Clients/Makefile
@@ -36,7 +36,7 @@ TARGETS = build/dns-sd build/dns-sd64
endif
all: $(TARGETS)
+diff --git a/mDNSPosix/PosixDaemon.c b/mDNSPosix/PosixDaemon.c
+index 88b3292..e86a6c7 100644
--- a/mDNSPosix/PosixDaemon.c
+++ b/mDNSPosix/PosixDaemon.c
@@ -37,6 +37,11 @@
if (mStatus_NoError == err)
err = MainLoop(&mDNSStorage);
---- a/mDNSPosix/Responder.c
-+++ b/mDNSPosix/Responder.c
-@@ -603,7 +603,8 @@ static mStatus RegisterServicesInFile(co
- status = mStatus_UnknownErr;
- }
-
-- assert(0 == fclose(fp));
-+ int rv = fclose(fp);
-+ assert(0 == rv);
-
- return status;
- }
+diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c
+index 6effa12..7c1d6eb 100755
--- a/mDNSPosix/mDNSPosix.c
+++ b/mDNSPosix/mDNSPosix.c
-@@ -138,7 +138,7 @@ mDNSlocal void SockAddrTomDNSAddr(const
-
- // mDNS core calls this routine when it needs to send a packet.
- mDNSexport mStatus mDNSPlatformSendUDP(const mDNS *const m, const void *const msg, const mDNSu8 *const end,
-- mDNSInterfaceID InterfaceID, UDPSocket *src, const mDNSAddr *dst,
-+ mDNSInterfaceID InterfaceID, UDPSocket *src, const mDNSAddr *dst,
- mDNSIPPort dstPort, mDNSBool useBackgroundTrafficClass)
- {
- int err = 0;
-@@ -583,9 +583,17 @@ mDNSlocal void FreePosixNetworkInterface
- {
- assert(intf != NULL);
- if (intf->intfName != NULL) free((void *)intf->intfName);
-- if (intf->multicastSocket4 != -1) assert(close(intf->multicastSocket4) == 0);
-+ if (intf->multicastSocket4 != -1)
-+ {
-+ int rv = close(intf->multicastSocket4);
-+ assert(rv == 0);
-+ }
- #if HAVE_IPV6
-- if (intf->multicastSocket6 != -1) assert(close(intf->multicastSocket6) == 0);
-+ if (intf->multicastSocket6 != -1)
-+ {
-+ int rv = close(intf->multicastSocket6);
-+ assert(rv == 0);
-+ }
- #endif
-
- // Move interface to the RecentInterfaces list for a minute
-@@ -724,6 +732,29 @@ mDNSlocal int SetupSocket(struct sockadd
+@@ -733,6 +741,29 @@ mDNSlocal int SetupSocket(struct sockaddr *intfAddr, mDNSIPPort port, int interf
if (err < 0) { err = errno; perror("setsockopt - IP_MULTICAST_TTL"); }
}
// And start listening for packets
if (err == 0)
{
-@@ -805,6 +836,29 @@ mDNSlocal int SetupSocket(struct sockadd
+@@ -814,6 +845,29 @@ mDNSlocal int SetupSocket(struct sockaddr *intfAddr, mDNSIPPort port, int interf
if (err < 0) { err = errno; perror("setsockopt - IPV6_MULTICAST_HOPS"); }
}
// And start listening for packets
if (err == 0)
{
-@@ -836,7 +890,12 @@ mDNSlocal int SetupSocket(struct sockadd
- }
-
- // Clean up
-- if (err != 0 && *sktPtr != -1) { assert(close(*sktPtr) == 0); *sktPtr = -1; }
-+ if (err != 0 && *sktPtr != -1)
-+ {
-+ int rv = close(*sktPtr);
-+ assert(rv == 0);
-+ *sktPtr = -1;
-+ }
- assert((err == 0) == (*sktPtr != -1));
- return err;
- }
-@@ -942,19 +1001,14 @@ mDNSlocal int SetupInterfaceList(mDNS *c
+@@ -958,19 +1017,14 @@ mDNSlocal int SetupInterfaceList(mDNS *const m)
int err = 0;
struct ifi_info *intfList = get_ifi_info(AF_INET, mDNStrue);
struct ifi_info *firstLoopback = NULL;
#endif
if (err == 0)
-@@ -1030,7 +1084,7 @@ mDNSlocal mStatus OpenIfNotifySocket(int
+@@ -1046,7 +1100,7 @@ mDNSlocal mStatus OpenIfNotifySocket(int *pFD)
/* Subscribe the socket to Link & IP addr notifications. */
mDNSPlatformMemZero(&snl, sizeof snl);
snl.nl_family = AF_NETLINK;
ret = bind(sock, (struct sockaddr *) &snl, sizeof snl);
if (0 == ret)
*pFD = sock;
-@@ -1108,11 +1162,18 @@ mDNSlocal mDNSu32 ProcessRoutingNo
+@@ -1124,11 +1178,18 @@ mDNSlocal mDNSu32 ProcessRoutingNotification(int sd)
PrintNetLinkMsg(pNLMsg);
#endif
// Advance pNLMsg to the next message in the buffer
if ((pNLMsg->nlmsg_flags & NLM_F_MULTI) != 0 && pNLMsg->nlmsg_type != NLMSG_DONE)
-@@ -1283,8 +1344,12 @@ mDNSexport mStatus mDNSPlatformInit(mDNS
+@@ -1299,8 +1360,12 @@ mDNSexport mStatus mDNSPlatformInit(mDNS *const m)
if (err == mStatus_NoError) err = SetupSocket(&sa, zeroIPPort, 0, &m->p->unicastSocket6);
#endif
// Tell mDNS core about DNS Servers
mDNS_Lock(m);
-@@ -1317,9 +1382,17 @@ mDNSexport void mDNSPlatformClose(mDNS *
- {
- assert(m != NULL);
- ClearInterfaceList(m);
-- if (m->p->unicastSocket4 != -1) assert(close(m->p->unicastSocket4) == 0);
-+ if (m->p->unicastSocket4 != -1)
-+ {
-+ int rv = close(m->p->unicastSocket4);
-+ assert(rv == 0);
-+ }
- #if HAVE_IPV6
-- if (m->p->unicastSocket6 != -1) assert(close(m->p->unicastSocket6) == 0);
-+ if (m->p->unicastSocket6 != -1)
-+ {
-+ int rv = close(m->p->unicastSocket6);
-+ assert(rv == 0);
-+ }
- #endif
- }
-
-@@ -1575,14 +1648,14 @@ mDNSexport mStatus mDNSPlatformClearS
- mDNSexport mDNSu16 mDNSPlatformGetUDPPort(UDPSocket *sock)
- {
- (void) sock; // unused
--
-+
- return (mDNSu16)-1;
- }
-
- mDNSexport mDNSBool mDNSPlatformInterfaceIsD2D(mDNSInterfaceID InterfaceID)
- {
- (void) InterfaceID; // unused
--
-+
- return mDNSfalse;
- }
-
+diff --git a/mDNSPosix/mDNSUNP.c b/mDNSPosix/mDNSUNP.c
+index b392fc7..f551ad5 100755
--- a/mDNSPosix/mDNSUNP.c
+++ b/mDNSPosix/mDNSUNP.c
@@ -63,6 +63,7 @@
/* Converts a prefix length to IPv6 network mask */
void plen_to_mask(int plen, char *addr) {
-@@ -86,7 +87,7 @@ struct ifi_info *get_ifi_info_linuxv6(in
- FILE *fp;
+@@ -86,7 +87,7 @@ struct ifi_info *get_ifi_info_linuxv6(int family, int doaliases)
+ FILE *fp = NULL;
char addr[8][5];
int flags, myflags, index, plen, scope;
- char ifname[9], lastname[IFNAMSIZ];
+ char ifname[IFNAMSIZ], lastname[IFNAMSIZ];
char addr6[32+7+1]; /* don't forget the seven ':' */
struct addrinfo hints, *res0;
- struct sockaddr_in6 *sin6;
-@@ -94,7 +95,8 @@ struct ifi_info *get_ifi_info_linuxv6(in
+ int err;
+@@ -92,7 +93,8 @@ struct ifi_info *get_ifi_info_linuxv6(int family, int doaliases)
int err;
int sockfd = -1;
struct ifreq ifr;
res0=NULL;
ifihead = NULL;
ifipnext = &ifihead;
-@@ -106,11 +108,12 @@ struct ifi_info *get_ifi_info_linuxv6(in
+@@ -104,11 +106,12 @@ struct ifi_info *get_ifi_info_linuxv6(int family, int doaliases)
goto gotError;
}
while (fscanf(fp,
myflags = 0;
if (strncmp(lastname, ifname, IFNAMSIZ) == 0) {
if (doaliases == 0)
-@@ -204,8 +207,11 @@ gotError:
- res0=NULL;
- }
- done:
-+ if (fp)
-+ fclose(fp);
- if (sockfd != -1) {
-- assert(close(sockfd) == 0);
-+ int rv = close(sockfd);
-+ assert(rv == 0);
- }
- return(ifihead); /* pointer to first structure in linked list */
- }
+diff --git a/mDNSShared/dnsextd_parser.y b/mDNSShared/dnsextd_parser.y
+index 18c5990..d4b63ce 100644
--- a/mDNSShared/dnsextd_parser.y
+++ b/mDNSShared/dnsextd_parser.y
@@ -15,6 +15,8 @@
int yylex(void);
-@@ -378,7 +380,7 @@ int yywrap(void);
+@@ -409,7 +419,7 @@ int yywrap(void);
extern int yylineno;
+++ /dev/null
---- a/mDNSPosix/mDNSPosix.c
-+++ b/mDNSPosix/mDNSPosix.c
-@@ -1673,7 +1673,7 @@ mDNSexport mDNSs32 mDNSPlatformGetServic
- return -1;
- }
-
--mDNSexport void mDNSPlatformSetDelegatePID(UDPSocket *src, const mDNSAddr *dst, DNSQuestion *q)
-+mDNSexport void mDNSPlatformSetuDNSSocktOpt(UDPSocket *src, const mDNSAddr *dst, DNSQuestion *q)
- {
- (void) src;
- (void) dst;
--- a/Clients/dns-sd.c
+++ b/Clients/dns-sd.c
-@@ -1811,7 +1811,7 @@ Fail:
+@@ -2288,7 +2288,7 @@ Fail:
// NOT static -- otherwise the compiler may optimize it out
// The "@(#) " pattern is a special prefix the "what" command looks for
// If the process crashes, then this string will be magically included in the automatically-generated crash log
--- a/mDNSPosix/PosixDaemon.c
+++ b/mDNSPosix/PosixDaemon.c
-@@ -289,9 +289,9 @@ asm (".desc ___crashreporter_info__, 0x1
+@@ -290,9 +290,9 @@ asm (".desc ___crashreporter_info__, 0x1
// For convenience when using the "strings" command, this is the last thing in the file
#if mDNSResponderVersion > 1
+const char VersionString_SCCS[] = "@(#) libjdns_sd " STRINGIFY(mDNSResponderVersion);
--- a/mDNSShared/dnsextd.c
+++ b/mDNSShared/dnsextd.c
-@@ -3141,7 +3141,7 @@ mDNS mDNSStorage;
+@@ -3136,7 +3136,7 @@ mDNS mDNSStorage;
// For convenience when using the "strings" command, this is the last thing in the file
// The "@(#) " pattern is a special prefix the "what" command looks for
include $(TOPDIR)/rules.mk
PKG_NAME:=miniupnpc
-PKG_VERSION:=2.0.20170509
+PKG_VERSION:=2.1
PKG_RELEASE:=1
-PKG_SOURCE_URL:=http://miniupnp.free.fr/files
+PKG_SOURCE_URL:=https://miniupnp.tuxfamily.org/files
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=d3c368627f5cdfb66d3ebd64ca39ba54d6ff14a61966dbecb8dd296b7039f16a
+PKG_HASH:=e19fb5e01ea5a707e2a8cb96f537fbd9f3a913d53d804a3265e3aeab3d2064c6
PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
PKG_INSTALL:=1
define Package/miniupnpc/Default
TITLE:=Lightweight UPnP
- URL:=http://miniupnp.tuxfamily.org/
+ URL:=https://miniupnp.tuxfamily.org
endef
define Package/miniupnpc
--- a/Makefile
+++ b/Makefile
-@@ -187,8 +187,8 @@ installpythonmodule3: pythonmodule3
- python3 setup.py install
+@@ -186,8 +186,8 @@ installpythonmodule3: pythonmodule3
+ MAKE=$(MAKE) python3 setup.py install
validateminixml: minixmlvalid
- @echo "minixml validation test"
--- a/upnpcommands.c
+++ b/upnpcommands.c
-@@ -370,7 +370,7 @@ UPNP_AddPortMapping(const char * control
+@@ -371,7 +371,7 @@ UPNP_AddPortMapping(const char * control
AddPortMappingArgs[5].elt = "NewEnabled";
AddPortMappingArgs[5].val = "1";
AddPortMappingArgs[6].elt = "NewPortMappingDescription";
include $(TOPDIR)/rules.mk
PKG_NAME:=miniupnpd
-PKG_VERSION:=2.1
-PKG_RELEASE:=2
+PKG_VERSION:=2.1.20180706
+PKG_RELEASE:=1
-PKG_SOURCE_URL:=http://miniupnp.free.fr/files
+PKG_SOURCE_URL:=https://miniupnp.tuxfamily.org/files
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=950894779661197fe093855fda29a728f434b5756eb4fa6cb5f7b9bff7ffe0c1
+PKG_HASH:=fc2d2fd044d8c3f8d02b63d70489bb35ece836a4fc1b6386865ac8fbe8d8b006
PKG_LICENSE:=BSD-3-Clause
DEPENDS:=+iptables +libip4tc +IPV6:libip6tc +IPV6:ip6tables +libuuid
TITLE:=Lightweight UPnP IGD, NAT-PMP & PCP daemon
SUBMENU:=Firewall
- URL:=http://miniupnp.free.fr/
+ URL:=https://miniupnp.tuxfamily.org/
endef
define Package/miniupnpd/conffiles
echo "$(VERSION_NUMBER)" | tr '() ' '_' >$(PKG_BUILD_DIR)/os.openwrt
endef
-TARGET_CFLAGS += -flto -ffunction-sections -fdata-sections
+TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS))
+TARGET_CFLAGS += -flto -ffunction-sections -fdata-sections -O2
TARGET_LDFLAGS += $(FPIC) -flto -Wl,--gc-sections
MAKE_FLAGS += \
TARGET_OPENWRT=1 TEST=0 LIBS="" \
if [ -z "$V6SOCKETS_ARE_V6ONLY" ] ; then
--- a/Makefile.linux
+++ b/Makefile.linux
-@@ -73,7 +73,10 @@ CPPFLAGS += -DIPTABLES_143
+@@ -74,7 +74,10 @@ CPPFLAGS += -DIPTABLES_143
endif
CFLAGS += $(shell $(PKG_CONFIG) --cflags libiptc)
LDFLAGS += $(shell $(PKG_CONFIG) --libs-only-L libiptc)
LDFLAGS += $(shell $(PKG_CONFIG) --libs-only-other libiptc)
else
-@@ -153,6 +156,8 @@ LDLIBS += $(shell $(PKG_CONFIG) --static
+@@ -154,6 +157,8 @@ LDLIBS += $(shell $(PKG_CONFIG) --static
LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l libnetfilter_conntrack)
endif # ($(TEST),1)
LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l libssl)
TEST := $(shell $(PKG_CONFIG) --exists uuid && echo 1)
-@@ -161,6 +166,7 @@ LDLIBS += $(shell $(PKG_CONFIG) --static
+@@ -162,6 +167,7 @@ LDLIBS += $(shell $(PKG_CONFIG) --static
else
$(info please install uuid-dev package / libuuid)
endif # ($(TEST),1)
include $(TOPDIR)/rules.mk
PKG_NAME:=mosquitto
-PKG_VERSION:=1.5
-PKG_RELEASE:=3
+PKG_VERSION:=1.5.4
+PKG_RELEASE:=1
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE.txt
+PKG_CPE_ID:=cpe:/a:eclipse:mosquitto
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://mosquitto.org/files/source/
-PKG_HASH:=80c9606a906c736fe582b67bdfb650ee45239fea058fe34927f81277d3486e21
+PKG_SOURCE_URL:=https://mosquitto.org/files/source/
+PKG_HASH:=5fd7f3454fd6d286645d032bc07f44a1c8583cec02ef2422c9eb32e0a89a9b2f
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
$(CP) $(PKG_BUILD_DIR)/lib/cpp/libmosquittopp.so.1 $(1)/usr/lib/
$(LN) libmosquitto.so.1 $(1)/usr/lib/libmosquitto.so
$(LN) libmosquittopp.so.1 $(1)/usr/lib/libmosquittopp.so
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_BUILD_DIR)/libmosquitto.pc.in $(1)/usr/lib/pkgconfig/libmosquitto.pc
+ sed -i -e "s#@CMAKE_INSTALL_PREFIX@#/usr#" \
+ -e "s#@VERSION@#$(PKG_VERSION)#" \
+ $(1)/usr/lib/pkgconfig/libmosquitto.pc
+ $(CP) $(PKG_BUILD_DIR)/libmosquittopp.pc.in $(1)/usr/lib/pkgconfig/libmosquittopp.pc
+ sed -i -e "s#@CMAKE_INSTALL_PREFIX@#/usr#" \
+ -e "s#@VERSION@#$(PKG_VERSION)#" \
+ $(1)/usr/lib/pkgconfig/libmosquittopp.pc
endef
# This installs files on the target. Compare with Build/InstallDev
PKG_NAME:=mtr
PKG_VERSION:=0.92
-PKG_RELEASE:=1
-
-PKG_MAINTAINER:=Jonathan McCrohan <jmccrohan@gmail.com>
+PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://codeload.github.com/traviscross/mtr/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=568a52911a8933496e60c88ac6fea12379469d7943feb9223f4337903e4bc164
+PKG_SOURCE_URL:=https://www.bitwizard.nl/mtr/files
+PKG_HASH:=f2979db9e2f41aa8e6574e7771767c9afe111d9213814eb47f5e1e71876e4382
+PKG_MAINTAINER:=Jonathan McCrohan <jmccrohan@gmail.com>
PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=COPYING
CATEGORY:=Network
DEPENDS:=+libncurses
TITLE:=Full screen ncurses traceroute tool
- URL:=http://www.bitwizard.nl/mtr/
+ URL:=https://www.bitwizard.nl/mtr/
endef
define Package/mtr/description
CONFIGURE_ARGS += \
--without-gtk \
- --without-glib \
$(call autoconf_bool,CONFIG_IPV6,ipv6)
-define Build/Configure
- (cd $(PKG_BUILD_DIR); touch \
- configure.in \
- aclocal.m4 \
- Makefile.in \
- img/Makefile.in \
- stamp-h.in \
- config.h.in \
- configure \
- );
- $(call Build/Configure/Default)
-endef
+CONFIGURE_VARS += ac_cv_lib_cap_cap_set_proc=no
define Package/mtr/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mtr $(1)/usr/sbin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mtr-packet $(1)/usr/sbin/
endef
$(eval $(call BuildPackage,mtr))
include $(TOPDIR)/rules.mk
PKG_NAME:=mwan3
-PKG_VERSION:=2.6.18
+PKG_VERSION:=2.7.5
PKG_RELEASE:=1
PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de>
PKG_LICENSE:=GPLv2
config globals 'globals'
option mmx_mask '0x3F00'
- option local_source 'lan'
+ option local_source 'none'
+ option rtmon_interval '5'
config interface 'wan'
option enabled '1'
--- /dev/null
+#!/bin/sh
+
+. /lib/functions.sh
+. /lib/functions/network.sh
+. /lib/mwan3/mwan3.sh
+
+LOG="logger -t mwan3[$$] -p"
+
+[ "$ACTION" = "connected" -o "$ACTION" = "disconnected" ] || exit 1
+[ -n "$INTERFACE" ] || exit 2
+
+if [ "$ACTION" = "connected" ]; then
+ [ -n "$DEVICE" ] || exit 3
+fi
+
+config_load mwan3
+config_get_bool enabled globals 'enabled' '0'
+config_get local_source globals 'local_source' 'none'
+[ ${enabled} = "1" ] || exit 0
+[ ${local_source} = "none" ] || exit 0
+
+config_get enabled $INTERFACE enabled 0
+config_get online_metric $INTERFACE online_metric 0
+[ "$enabled" == "1" ] || exit 0
+
+if [ "$online_metric" = 0 ]; then
+ $LOG notice "No online metric for interface "$INTERFACE" found"
+ exit 0
+fi
+
+mwan3_add_failover_metric() {
+ local iface="$1"
+ local device="$2"
+ local metric="$3"
+
+ local route_args
+
+ config_get family $iface family ipv4
+
+ if [ "$family" == "ipv4" ]; then
+ if ubus call network.interface.${iface}_4 status 1>/dev/null 2>&1; then
+ network_get_gateway route_args ${iface}_4
+ else
+ network_get_gateway route_args $iface
+ fi
+
+ if [ -n "$route_args" -a "$route_args" != "0.0.0.0" ]; then
+ route_args="via $route_args"
+ else
+ route_args=""
+ fi
+
+ $IP4 route add default $route_args dev $device proto static metric $metric 1>/dev/null 2>&1
+ fi
+
+ if [ "$family" == "ipv6" ]; then
+ if ubus call network.interface.${iface}_6 status 1>/dev/null 2>&1; then
+ network_get_gateway6 route_args ${iface}_6
+ else
+ network_get_gateway6 route_args $iface
+ fi
+
+ if [ -n "$route_args" -a "$route_args" != "::" ]; then
+ route_args="via $route_args"
+ else
+ route_args=""
+ fi
+
+ $IP6 route add default $route_args dev $device proto static metric $metric 1>/dev/null 2>&1
+ fi
+}
+
+mwan3_del_failover_metric() {
+ local iface="$1"
+ local device="$2"
+ local metric="$3"
+
+ config_get family $iface family ipv4
+
+ if [ "$family" == "ipv4" ]; then
+ $IP4 route del default dev $device proto static metric $metric 1>/dev/null 2>&1
+ fi
+
+ if [ "$family" == "ipv6" ]; then
+ $IP6 route del default dev $device proto static metric $metric 1>/dev/null 2>&1
+ fi
+}
+
+case "$ACTION" in
+ connected)
+ mwan3_add_failover_metric "$INTERFACE" "$DEVICE" "$online_metric"
+ ;;
+ disconnected)
+ mwan3_del_failover_metric "$INTERFACE" "$DEVICE" "$online_metric"
+ ;;
+esac
+
+exit 0
mwan3_lock
mwan3_init
mwan3_set_connected_iptables
+mwan3_set_custom_ipset
mwan3_unlock
config_get enabled $INTERFACE enabled 0
--- /dev/null
+#!/bin/sh
+
+. /lib/functions.sh
+. /lib/functions/network.sh
+. /lib/mwan3/mwan3.sh
+
+config_load mwan3
+config_get_bool enabled globals 'enabled' '0'
+[ ${enabled} -gt 0 ] || exit 0
+
+if [ "$ACTION" == "ifup" ]; then
+ mwan3_lock
+ mwan3_rtmon
+ mwan3_unlock
+fi
+
+exit 0
START=19
reload() {
- local enabled
-
- config_load mwan3
- config_get_bool enabled globals 'enabled' 0
- [ ${enabled} -gt 0 ] || {
- echo "Warning: mwan3 is global disabled. Usage: /etc/init.d/mwan3 start"
- exit 0
- }
- mwan3 restart
+ /usr/sbin/mwan3 restart
}
boot() {
}
start() {
- . /lib/config/uci.sh
- uci_toggle_state mwan3 globals enabled "1"
- mwan3 start
+ /usr/sbin/mwan3 start
}
stop() {
- . /lib/config/uci.sh
- uci_toggle_state mwan3 globals enabled "0"
- mwan3 stop
+ /usr/sbin/mwan3 stop
}
IPT6="ip6tables -t mangle -w"
LOG="logger -t mwan3[$$] -p"
CONNTRACK_FILE="/proc/net/nf_conntrack"
+IPv6_REGEX="([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|"
+IPv6_REGEX="${IPv6_REGEX}([0-9a-fA-F]{1,4}:){1,7}:|"
+IPv6_REGEX="${IPv6_REGEX}([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|"
+IPv6_REGEX="${IPv6_REGEX}([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|"
+IPv6_REGEX="${IPv6_REGEX}([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|"
+IPv6_REGEX="${IPv6_REGEX}([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|"
+IPv6_REGEX="${IPv6_REGEX}([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|"
+IPv6_REGEX="${IPv6_REGEX}[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|"
+IPv6_REGEX="${IPv6_REGEX}:((:[0-9a-fA-F]{1,4}){1,7}|:)|"
+IPv6_REGEX="${IPv6_REGEX}fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|"
+IPv6_REGEX="${IPv6_REGEX}::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|"
+IPv6_REGEX="${IPv6_REGEX}([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])"
MWAN3_STATUS_DIR="/var/run/mwan3"
MWAN3TRACK_STATUS_DIR="/var/run/mwan3track"
MMX_UNREACHABLE=""
MM_UNREACHABLE=""
+mwan3_rtmon_ipv4()
+{
+ local tid=1
+ local idx=0
+ local ret=1
+ mkdir -p /tmp/mwan3rtmon
+ ($IP4 route list table main | grep -v "^default\|linkdown" | sort -n; echo empty fixup) >/tmp/mwan3rtmon/ipv4.main
+ while uci get mwan3.@interface[$idx] >/dev/null 2>&1 ; do
+ idx=$((idx+1))
+ tid=$idx
+ [ "$(uci get mwan3.@interface[$((idx-1))].family)" = "ipv4" ] && {
+ if $IP4 route list table $tid | grep -q ^default; then
+ ($IP4 route list table $tid | grep -v "^default\|linkdown" | sort -n; echo empty fixup) >/tmp/mwan3rtmon/ipv4.$tid
+ cat /tmp/mwan3rtmon/ipv4.$tid | grep -v -x -F -f /tmp/mwan3rtmon/ipv4.main | while read line; do
+ $IP4 route del table $tid $line
+ done
+ cat /tmp/mwan3rtmon/ipv4.main | grep -v -x -F -f /tmp/mwan3rtmon/ipv4.$tid | while read line; do
+ $IP4 route add table $tid $line
+ done
+ fi
+ }
+ if [ "$(uci get mwan3.@interface[$((idx-1))].enabled)" = "1" ]; then
+ ret=0
+ fi
+ done
+ rm -f /tmp/mwan3rtmon/ipv4.*
+ return $ret
+}
+
+mwan3_rtmon_ipv6()
+{
+ local tid=1
+ local idx=0
+ local ret=1
+ mkdir -p /tmp/mwan3rtmon
+ ($IP6 route list table main | grep -v "^default\|^::/0\|^unreachable" | sort -n; echo empty fixup) >/tmp/mwan3rtmon/ipv6.main
+ while uci get mwan3.@interface[$idx] >/dev/null 2>&1 ; do
+ idx=$((idx+1))
+ tid=$idx
+ [ "$(uci get mwan3.@interface[$((idx-1))].family)" = "ipv6" ] && {
+ if $IP6 route list table $tid | grep -q "^default\|^::/0"; then
+ ($IP6 route list table $tid | grep -v "^default\|^::/0\|^unreachable" | sort -n; echo empty fixup) >/tmp/mwan3rtmon/ipv6.$tid
+ cat /tmp/mwan3rtmon/ipv6.$tid | grep -v -x -F -f /tmp/mwan3rtmon/ipv6.main | while read line; do
+ $IP6 route del table $tid $line
+ done
+ cat /tmp/mwan3rtmon/ipv6.main | grep -v -x -F -f /tmp/mwan3rtmon/ipv6.$tid | while read line; do
+ $IP6 route add table $tid $line
+ done
+ fi
+ }
+ if [ "$(uci get mwan3.@interface[$((idx-1))].enabled)" = "1" ]; then
+ ret=0
+ fi
+ done
+ rm -f /tmp/mwan3rtmon/ipv6.*
+ return $ret
+}
# counts how many bits are set to 1
# n&(n-1) clears the lowest bit set to 1
export "$1=$_tmp"
}
+mwan3_set_custom_ipset_v4()
+{
+ local custom_network_v4
+
+ for custom_network_v4 in $($IP4 route list table "$1" | awk '{print $1}' | egrep '[0-9]{1,3}(\.[0-9]{1,3}){3}'); do
+ $LOG notice "Adding network $custom_network_v4 from table $1 to mwan3_custom_v4 ipset"
+ $IPS -! add mwan3_custom_v4_temp $custom_network_v4
+ done
+}
+
+mwan3_set_custom_ipset_v6()
+{
+ local custom_network_v6
+
+ for custom_network_v6 in $($IP6 route list table "$1" | awk '{print $1}' | egrep "$IPv6_REGEX"); do
+ $LOG notice "Adding network $custom_network_v6 from table $1 to mwan3_custom_v6 ipset"
+ $IPS -! add mwan3_custom_v6_temp $custom_network_v6
+ done
+}
+
+mwan3_set_custom_ipset()
+{
+ $IPS -! create mwan3_custom_v4 hash:net
+ $IPS create mwan3_custom_v4_temp hash:net
+ config_list_foreach "globals" "rt_table_lookup" mwan3_set_custom_ipset_v4
+ $IPS swap mwan3_custom_v4_temp mwan3_custom_v4
+ $IPS destroy mwan3_custom_v4_temp
+
+
+ $IPS -! create mwan3_custom_v6 hash:net family inet6
+ $IPS create mwan3_custom_v6_temp hash:net family inet6
+ config_list_foreach "globals" "rt_table_lookup" mwan3_set_custom_ipset_v6
+ $IPS swap mwan3_custom_v6_temp mwan3_custom_v6
+ $IPS destroy mwan3_custom_v6_temp
+
+ $IPS -! create mwan3_connected list:set
+ $IPS -! add mwan3_connected mwan3_custom_v4
+ $IPS -! add mwan3_connected mwan3_custom_v6
+}
+
mwan3_set_connected_iptables()
{
local connected_network_v4 connected_network_v6
$IPS -! create mwan3_connected_v6 hash:net family inet6
$IPS create mwan3_connected_v6_temp hash:net family inet6
- for connected_network_v6 in $($IP6 route | awk '{print $1}' | egrep '([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])'); do
+ for connected_network_v6 in $($IP6 route | awk '{print $1}' | egrep "$IPv6_REGEX"); do
$IPS -! add mwan3_connected_v6_temp $connected_network_v6
done
$IPS -! create mwan3_connected list:set
$IPS -! add mwan3_connected mwan3_connected_v4
$IPS -! add mwan3_connected mwan3_connected_v6
+
+ $IPS -! create mwan3_dynamic_v4 hash:net
+ $IPS -! add mwan3_connected mwan3_dynamic_v4
+
+ $IPS -! create mwan3_dynamic_v6 hash:net family inet6
+ $IPS -! add mwan3_connected mwan3_dynamic_v6
}
mwan3_set_general_rules()
if ! $IPT -S mwan3_connected &> /dev/null; then
$IPT -N mwan3_connected
$IPS -! create mwan3_connected list:set
- $IPT -A mwan3_connected -m set --match-set mwan3_connected dst -j MARK --set-xmark $MMX_DEFAULT/$MMX_MASK
- fi
-
- if ! $IPT -S mwan3_ifaces_out &> /dev/null; then
- $IPT -N mwan3_ifaces_out
+ $IPT -A mwan3_connected \
+ -m set --match-set mwan3_connected dst \
+ -j MARK --set-xmark $MMX_DEFAULT/$MMX_MASK
fi
if ! $IPT -S mwan3_rules &> /dev/null; then
$IPT -N mwan3_hook
# do not mangle ipv6 ra service
if [ "$IPT" = "$IPT6" ]; then
- $IPT6 -A mwan3_hook -p ipv6-icmp -m icmp6 --icmpv6-type 133 -j RETURN
- $IPT6 -A mwan3_hook -p ipv6-icmp -m icmp6 --icmpv6-type 134 -j RETURN
- $IPT6 -A mwan3_hook -p ipv6-icmp -m icmp6 --icmpv6-type 135 -j RETURN
- $IPT6 -A mwan3_hook -p ipv6-icmp -m icmp6 --icmpv6-type 136 -j RETURN
- $IPT6 -A mwan3_hook -p ipv6-icmp -m icmp6 --icmpv6-type 137 -j RETURN
+ $IPT6 -A mwan3_hook \
+ -p ipv6-icmp \
+ -m icmp6 --icmpv6-type 133 \
+ -j RETURN
+ $IPT6 -A mwan3_hook \
+ -p ipv6-icmp \
+ -m icmp6 --icmpv6-type 134 \
+ -j RETURN
+ $IPT6 -A mwan3_hook \
+ -p ipv6-icmp \
+ -m icmp6 --icmpv6-type 135 \
+ -j RETURN
+ $IPT6 -A mwan3_hook \
+ -p ipv6-icmp \
+ -m icmp6 --icmpv6-type 136 \
+ -j RETURN
+ $IPT6 -A mwan3_hook \
+ -p ipv6-icmp \
+ -m icmp6 --icmpv6-type 137 \
+ -j RETURN
fi
- $IPT -A mwan3_hook -j CONNMARK --restore-mark --nfmask $MMX_MASK --ctmask $MMX_MASK
- $IPT -A mwan3_hook -m mark --mark 0x0/$MMX_MASK -j mwan3_ifaces_in
- $IPT -A mwan3_hook -m mark --mark 0x0/$MMX_MASK -j mwan3_connected
- $IPT -A mwan3_hook -m mark --mark 0x0/$MMX_MASK -j mwan3_ifaces_out
- $IPT -A mwan3_hook -m mark --mark 0x0/$MMX_MASK -j mwan3_rules
- $IPT -A mwan3_hook -j CONNMARK --save-mark --nfmask $MMX_MASK --ctmask $MMX_MASK
- $IPT -A mwan3_hook -m mark ! --mark $MMX_DEFAULT/$MMX_MASK -j mwan3_connected
+ $IPT -A mwan3_hook \
+ -j CONNMARK --restore-mark --nfmask $MMX_MASK --ctmask $MMX_MASK
+ $IPT -A mwan3_hook \
+ -m mark --mark 0x0/$MMX_MASK \
+ -j mwan3_ifaces_in
+ $IPT -A mwan3_hook \
+ -m mark --mark 0x0/$MMX_MASK \
+ -j mwan3_connected
+ $IPT -A mwan3_hook \
+ -m mark --mark 0x0/$MMX_MASK \
+ -j mwan3_rules
+ $IPT -A mwan3_hook \
+ -j CONNMARK --save-mark --nfmask $MMX_MASK --ctmask $MMX_MASK
+ $IPT -A mwan3_hook \
+ -m mark ! --mark $MMX_DEFAULT/$MMX_MASK \
+ -j mwan3_connected
fi
if ! $IPT -S PREROUTING | grep mwan3_hook &> /dev/null; then
$IPT4 -N mwan3_ifaces_in
fi
- if ! $IPT4 -S mwan3_ifaces_out &> /dev/null; then
- $IPT4 -N mwan3_ifaces_out
- fi
-
if ! $IPT4 -S mwan3_iface_in_$1 &> /dev/null; then
$IPT4 -N mwan3_iface_in_$1
fi
- if ! $IPT4 -S mwan3_iface_out_$1 &> /dev/null; then
- $IPT4 -N mwan3_iface_out_$1
- fi
-
$IPT4 -F mwan3_iface_in_$1
- $IPT4 -A mwan3_iface_in_$1 -i $2 -m set --match-set mwan3_connected src -m mark --mark 0x0/$MMX_MASK -m comment --comment "default" -j MARK --set-xmark $MMX_DEFAULT/$MMX_MASK
- $IPT4 -A mwan3_iface_in_$1 -i $2 -m mark --mark 0x0/$MMX_MASK -m comment --comment "$1" -j MARK --set-xmark $(mwan3_id2mask id MMX_MASK)/$MMX_MASK
-
- $IPT4 -D mwan3_ifaces_in -m mark --mark 0x0/$MMX_MASK -j mwan3_iface_in_$1 &> /dev/null
- $IPT4 -A mwan3_ifaces_in -m mark --mark 0x0/$MMX_MASK -j mwan3_iface_in_$1
-
- $IPT4 -F mwan3_iface_out_$1
- $IPT4 -A mwan3_iface_out_$1 -o $2 -m mark --mark 0x0/$MMX_MASK -m comment --comment "$1" -j MARK --set-xmark $(mwan3_id2mask id MMX_MASK)/$MMX_MASK
-
- $IPT4 -D mwan3_ifaces_out -m mark --mark 0x0/$MMX_MASK -j mwan3_iface_out_$1 &> /dev/null
- $IPT4 -A mwan3_ifaces_out -m mark --mark 0x0/$MMX_MASK -j mwan3_iface_out_$1
+ $IPT4 -A mwan3_iface_in_$1 \
+ -i $2 \
+ -m set --match-set mwan3_connected src \
+ -m mark --mark 0x0/$MMX_MASK \
+ -m comment --comment "default" \
+ -j MARK --set-xmark $MMX_DEFAULT/$MMX_MASK
+ $IPT4 -A mwan3_iface_in_$1 \
+ -i $2 \
+ -m mark --mark 0x0/$MMX_MASK \
+ -m comment --comment "$1" \
+ -j MARK --set-xmark $(mwan3_id2mask id MMX_MASK)/$MMX_MASK
+
+ $IPT4 -D mwan3_ifaces_in \
+ -m mark --mark 0x0/$MMX_MASK \
+ -j mwan3_iface_in_$1 &> /dev/null
+ $IPT4 -A mwan3_ifaces_in \
+ -m mark --mark 0x0/$MMX_MASK \
+ -j mwan3_iface_in_$1
fi
if [ "$family" == "ipv6" ]; then
$IPT6 -N mwan3_ifaces_in
fi
- if ! $IPT6 -S mwan3_ifaces_out &> /dev/null; then
- $IPT6 -N mwan3_ifaces_out
- fi
-
if ! $IPT6 -S mwan3_iface_in_$1 &> /dev/null; then
$IPT6 -N mwan3_iface_in_$1
fi
- if ! $IPT6 -S mwan3_iface_out_$1 &> /dev/null; then
- $IPT6 -N mwan3_iface_out_$1
- fi
-
$IPT6 -F mwan3_iface_in_$1
- $IPT6 -A mwan3_iface_in_$1 -i $2 -m set --match-set mwan3_connected_v6 src -m mark --mark 0x0/$MMX_MASK -m comment --comment "default" -j MARK --set-xmark $MMX_DEFAULT/$MMX_MASK
- $IPT6 -A mwan3_iface_in_$1 -i $2 -m mark --mark 0x0/$MMX_MASK -m comment --comment "$1" -j MARK --set-xmark $(mwan3_id2mask id MMX_MASK)/$MMX_MASK
-
- $IPT6 -D mwan3_ifaces_in -m mark --mark 0x0/$MMX_MASK -j mwan3_iface_in_$1 &> /dev/null
- $IPT6 -A mwan3_ifaces_in -m mark --mark 0x0/$MMX_MASK -j mwan3_iface_in_$1
-
- $IPT6 -F mwan3_iface_out_$1
- $IPT6 -A mwan3_iface_out_$1 -o $2 -m mark --mark 0x0/$MMX_MASK -m comment --comment "$1" -j MARK --set-xmark $(mwan3_id2mask id MMX_MASK)/$MMX_MASK
-
- $IPT6 -D mwan3_ifaces_out -m mark --mark 0x0/$MMX_MASK -j mwan3_iface_out_$1 &> /dev/null
- $IPT6 -A mwan3_ifaces_out -m mark --mark 0x0/$MMX_MASK -j mwan3_iface_out_$1
+ $IPT6 -A mwan3_iface_in_$1 -i $2 \
+ -m set --match-set mwan3_connected_v6 src \
+ -m mark --mark 0x0/$MMX_MASK \
+ -m comment --comment "default" \
+ -j MARK --set-xmark $MMX_DEFAULT/$MMX_MASK
+ $IPT6 -A mwan3_iface_in_$1 -i $2 -m mark --mark 0x0/$MMX_MASK \
+ -m comment --comment "$1" \
+ -j MARK --set-xmark $(mwan3_id2mask id MMX_MASK)/$MMX_MASK
+
+ $IPT6 -D mwan3_ifaces_in \
+ -m mark --mark 0x0/$MMX_MASK \
+ -j mwan3_iface_in_$1 &> /dev/null
+ $IPT6 -A mwan3_ifaces_in \
+ -m mark --mark 0x0/$MMX_MASK \
+ -j mwan3_iface_in_$1
fi
}
if [ "$family" == "ipv4" ]; then
- $IPT4 -D mwan3_ifaces_in -m mark --mark 0x0/$MMX_MASK -j mwan3_iface_in_$1 &> /dev/null
+ $IPT4 -D mwan3_ifaces_in \
+ -m mark --mark 0x0/$MMX_MASK \
+ -j mwan3_iface_in_$1 &> /dev/null
$IPT4 -F mwan3_iface_in_$1 &> /dev/null
$IPT4 -X mwan3_iface_in_$1 &> /dev/null
-
- $IPT4 -D mwan3_ifaces_out -m mark --mark 0x0/$MMX_MASK -j mwan3_iface_out_$1 &> /dev/null
- $IPT4 -F mwan3_iface_out_$1 &> /dev/null
- $IPT4 -X mwan3_iface_out_$1 &> /dev/null
fi
if [ "$family" == "ipv6" ]; then
- $IPT6 -D mwan3_ifaces_in -m mark --mark 0x0/$MMX_MASK -j mwan3_iface_in_$1 &> /dev/null
+ $IPT6 -D mwan3_ifaces_in \
+ -m mark --mark 0x0/$MMX_MASK \
+ -j mwan3_iface_in_$1 &> /dev/null
$IPT6 -F mwan3_iface_in_$1 &> /dev/null
$IPT6 -X mwan3_iface_in_$1 &> /dev/null
-
- $IPT6 -D mwan3_ifaces_out -m mark --mark 0x0/$MMX_MASK -j mwan3_iface_out_$1 &> /dev/null
- $IPT6 -F mwan3_iface_out_$1 &> /dev/null
- $IPT6 -X mwan3_iface_out_$1 &> /dev/null
fi
}
mwan3_create_iface_route()
{
- local id route_args
+ local id route_args metric
config_get family $1 family ipv4
mwan3_get_iface_id id $1
route_args=""
fi
+ network_get_metric metric $1
+ if [ -n "$metric" -a "$metric" != "0" ]; then
+ route_args="$route_args metric $metric"
+ fi
+
$IP4 route flush table $id
$IP4 route add table $id default $route_args dev $2
+ mwan3_rtmon_ipv4
fi
if [ "$family" == "ipv6" ]; then
route_args=""
fi
+ network_get_metric metric $1
+ if [ -n "$metric" -a "$metric" != "0" ]; then
+ route_args="$route_args metric $metric"
+ fi
+
$IP6 route flush table $id
$IP6 route add table $id default $route_args dev $2
+ mwan3_rtmon_ipv6
fi
}
$IP4 rule del pref $(($id+2000))
done
- $IP4 rule add pref $(($id+1000)) iif $2 lookup main
+ $IP4 rule add pref $(($id+1000)) iif $2 lookup $id
$IP4 rule add pref $(($id+2000)) fwmark $(mwan3_id2mask id MMX_MASK)/$MMX_MASK lookup $id
fi
$IP6 rule del pref $(($id+2000))
done
- $IP6 rule add pref $(($id+1000)) iif $2 lookup main
+ $IP6 rule add pref $(($id+1000)) iif $2 lookup $id
$IP6 rule add pref $(($id+2000)) fwmark $(mwan3_id2mask id MMX_MASK)/$MMX_MASK lookup $id
fi
}
done
}
+mwan3_rtmon()
+{
+ pid="$(pgrep -f mwan3rtmon)"
+ if [ "${pid}" != "" ]; then
+ kill -USR1 "${pid}"
+ else
+ [ -x /usr/sbin/mwan3rtmon ] && /usr/sbin/mwan3rtmon &
+ fi
+}
+
mwan3_track()
{
local track_ip track_ips pid
mwan3_set_policy()
{
- local iface_count id iface family metric probability weight
+ local iface_count id iface family metric probability weight device
config_get iface $1 interface
config_get metric $1 metric 1
config_get weight $1 weight 1
[ -n "$iface" ] || return 0
+ network_get_device device $iface
[ "$metric" -gt $DEFAULT_LOWEST_METRIC ] && $LOG warn "Member interface $iface has >$DEFAULT_LOWEST_METRIC metric. Not appending to policy" && return 0
mwan3_get_iface_id id $iface
total_weight_v4=$weight
$IPT4 -F mwan3_policy_$policy
- $IPT4 -A mwan3_policy_$policy -m mark --mark 0x0/$MMX_MASK -m comment --comment "$iface $weight $weight" -j MARK --set-xmark $(mwan3_id2mask id MMX_MASK)/$MMX_MASK
+ $IPT4 -A mwan3_policy_$policy \
+ -m mark --mark 0x0/$MMX_MASK \
+ -m comment --comment "$iface $weight $weight" \
+ -j MARK --set-xmark $(mwan3_id2mask id MMX_MASK)/$MMX_MASK
lowest_metric_v4=$metric
probability="-m statistic --mode random --probability $probability"
- $IPT4 -I mwan3_policy_$policy -m mark --mark 0x0/$MMX_MASK $probability -m comment --comment "$iface $weight $total_weight_v4" -j MARK --set-xmark $(mwan3_id2mask id MMX_MASK)/$MMX_MASK
+ $IPT4 -I mwan3_policy_$policy \
+ -m mark --mark 0x0/$MMX_MASK $probability \
+ -m comment --comment "$iface $weight $total_weight_v4" \
+ -j MARK --set-xmark $(mwan3_id2mask id MMX_MASK)/$MMX_MASK
fi
+ else
+ [ -n "$device" ] && {
+ $IPT4 -S mwan3_policy_$policy | grep -q '.*--comment ".* [0-9]* [0-9]*"' || \
+ $IPT4 -I mwan3_policy_$policy \
+ -o $device \
+ -m mark --mark 0x0/$MMX_MASK \
+ -m comment --comment "out $iface $device" \
+ -j MARK --set-xmark $MMX_DEFAULT/$MMX_MASK
+ }
fi
fi
total_weight_v6=$weight
$IPT6 -F mwan3_policy_$policy
- $IPT6 -A mwan3_policy_$policy -m mark --mark 0x0/$MMX_MASK -m comment --comment "$iface $weight $weight" -j MARK --set-xmark $(mwan3_id2mask id MMX_MASK)/$MMX_MASK
+ $IPT6 -A mwan3_policy_$policy \
+ -m mark --mark 0x0/$MMX_MASK \
+ -m comment --comment "$iface $weight $weight" \
+ -j MARK --set-xmark $(mwan3_id2mask id MMX_MASK)/$MMX_MASK
lowest_metric_v6=$metric
probability="-m statistic --mode random --probability $probability"
- $IPT6 -I mwan3_policy_$policy -m mark --mark 0x0/$MMX_MASK $probability -m comment --comment "$iface $weight $total_weight_v6" -j MARK --set-xmark $(mwan3_id2mask id MMX_MASK)/$MMX_MASK
+ $IPT6 -I mwan3_policy_$policy \
+ -m mark --mark 0x0/$MMX_MASK \
+ $probability \
+ -m comment --comment "$iface $weight $total_weight_v6" \
+ -j MARK --set-xmark $(mwan3_id2mask id MMX_MASK)/$MMX_MASK
fi
+ else
+ [ -n "$device" ] && {
+ $IPT6 -S mwan3_policy_$policy | grep -q '.*--comment ".* [0-9]* [0-9]*"' || \
+ $IPT6 -I mwan3_policy_$policy \
+ -o $device \
+ -m mark --mark 0x0/$MMX_MASK \
+ -m comment --comment "out $iface $device" \
+ -j MARK --set-xmark $MMX_DEFAULT/$MMX_MASK
+ }
fi
fi
}
case "$last_resort" in
blackhole)
- $IPT -A mwan3_policy_$1 -m mark --mark 0x0/$MMX_MASK -m comment --comment "blackhole" -j MARK --set-xmark $MMX_BLACKHOLE/$MMX_MASK
+ $IPT -A mwan3_policy_$1 \
+ -m mark --mark 0x0/$MMX_MASK \
+ -m comment --comment "blackhole" \
+ -j MARK --set-xmark $MMX_BLACKHOLE/$MMX_MASK
;;
default)
- $IPT -A mwan3_policy_$1 -m mark --mark 0x0/$MMX_MASK -m comment --comment "default" -j MARK --set-xmark $MMX_DEFAULT/$MMX_MASK
+ $IPT -A mwan3_policy_$1 \
+ -m mark --mark 0x0/$MMX_MASK \
+ -m comment --comment "default" \
+ -j MARK --set-xmark $MMX_DEFAULT/$MMX_MASK
;;
*)
- $IPT -A mwan3_policy_$1 -m mark --mark 0x0/$MMX_MASK -m comment --comment "unreachable" -j MARK --set-xmark $MMX_UNREACHABLE/$MMX_MASK
+ $IPT -A mwan3_policy_$1 \
+ -m mark --mark 0x0/$MMX_MASK \
+ -m comment --comment "unreachable" \
+ -j MARK --set-xmark $MMX_UNREACHABLE/$MMX_MASK
;;
esac
done
[ -n "$id" ] || return 0
for IPT in "$IPT4" "$IPT6"; do
- if [ -n "$($IPT -S mwan3_iface_in_$1 2> /dev/null)" -a -n "$($IPT -S mwan3_iface_out_$1 2> /dev/null)" ]; then
- $IPT -I mwan3_rule_$rule -m mark --mark $(mwan3_id2mask id MMX_MASK)/$MMX_MASK -m set ! --match-set mwan3_sticky_$rule src,src -j MARK --set-xmark 0x0/$MMX_MASK
- $IPT -I mwan3_rule_$rule -m mark --mark 0/$MMX_MASK -j MARK --set-xmark $(mwan3_id2mask id MMX_MASK)/$MMX_MASK
+ if [ -n "$($IPT -S mwan3_iface_in_$1 2> /dev/null)" ]; then
+ $IPT -I mwan3_rule_$rule \
+ -m mark --mark $(mwan3_id2mask id MMX_MASK)/$MMX_MASK \
+ -m set ! --match-set mwan3_sticky_$rule src,src \
+ -j MARK --set-xmark 0x0/$MMX_MASK
+ $IPT -I mwan3_rule_$rule \
+ -m mark --mark 0/$MMX_MASK \
+ -j MARK --set-xmark $(mwan3_id2mask id MMX_MASK)/$MMX_MASK
fi
done
fi
$IPT -F mwan3_rule_$1
done
- $IPS -! create mwan3_sticky_v4_$rule hash:ip,mark markmask $MMX_MASK timeout $timeout
- $IPS -! create mwan3_sticky_v6_$rule hash:ip,mark markmask $MMX_MASK timeout $timeout family inet6
+ $IPS -! create mwan3_sticky_v4_$rule \
+ hash:ip,mark markmask $MMX_MASK \
+ timeout $timeout
+ $IPS -! create mwan3_sticky_v6_$rule \
+ hash:ip,mark markmask $MMX_MASK \
+ timeout $timeout family inet6
$IPS -! create mwan3_sticky_$rule list:set
$IPS -! add mwan3_sticky_$rule mwan3_sticky_v4_$rule
$IPS -! add mwan3_sticky_$rule mwan3_sticky_v6_$rule
config_foreach mwan3_set_sticky_iptables interface
for IPT in "$IPT4" "$IPT6"; do
- $IPT -A mwan3_rule_$1 -m mark --mark 0/$MMX_MASK -j $policy
- $IPT -A mwan3_rule_$1 -m mark ! --mark 0xfc00/0xfc00 -j SET --del-set mwan3_sticky_$rule src,src
- $IPT -A mwan3_rule_$1 -m mark ! --mark 0xfc00/0xfc00 -j SET --add-set mwan3_sticky_$rule src,src
+ $IPT -A mwan3_rule_$1 \
+ -m mark --mark 0/$MMX_MASK \
+ -j $policy
+ $IPT -A mwan3_rule_$1 \
+ -m mark ! --mark 0xfc00/0xfc00 \
+ -j SET --del-set mwan3_sticky_$rule src,src
+ $IPT -A mwan3_rule_$1 \
+ -m mark ! --mark 0xfc00/0xfc00 \
+ -j SET --add-set mwan3_sticky_$rule src,src
done
policy="mwan3_rule_$1"
for IPT in "$IPT4" "$IPT6"; do
case $proto in
tcp|udp)
- $IPT -A mwan3_rules -p $proto -s $src_ip -d $dest_ip $ipset -m multiport --sports $src_port -m multiport --dports $dest_port -m mark --mark 0/$MMX_MASK -m comment --comment "$1" -j $policy &> /dev/null
+ $IPT -A mwan3_rules \
+ -p $proto \
+ -s $src_ip \
+ -d $dest_ip $ipset \
+ -m multiport --sports $src_port \
+ -m multiport --dports $dest_port \
+ -m mark --mark 0/$MMX_MASK \
+ -m comment --comment "$1" \
+ -j $policy &> /dev/null
;;
*)
- $IPT -A mwan3_rules -p $proto -s $src_ip -d $dest_ip $ipset -m mark --mark 0/$MMX_MASK -m comment --comment "$1" -j $policy &> /dev/null
+ $IPT -A mwan3_rules \
+ -p $proto \
+ -s $src_ip \
+ -d $dest_ip $ipset \
+ -m mark --mark 0/$MMX_MASK \
+ -m comment --comment "$1" \
+ -j $policy &> /dev/null
;;
esac
done
case $proto in
tcp|udp)
- $IPT4 -A mwan3_rules -p $proto -s $src_ip -d $dest_ip $ipset -m multiport --sports $src_port -m multiport --dports $dest_port -m mark --mark 0/$MMX_MASK -m comment --comment "$1" -j $policy &> /dev/null
+ $IPT4 -A mwan3_rules \
+ -p $proto \
+ -s $src_ip \
+ -d $dest_ip $ipset \
+ -m multiport --sports $src_port \
+ -m multiport --dports $dest_port \
+ -m mark --mark 0/$MMX_MASK \
+ -m comment --comment "$1" \
+ -j $policy &> /dev/null
;;
*)
- $IPT4 -A mwan3_rules -p $proto -s $src_ip -d $dest_ip $ipset -m mark --mark 0/$MMX_MASK -m comment --comment "$1" -j $policy &> /dev/null
+ $IPT4 -A mwan3_rules \
+ -p $proto \
+ -s $src_ip \
+ -d $dest_ip $ipset \
+ -m mark --mark 0/$MMX_MASK \
+ -m comment --comment "$1" \
+ -j $policy &> /dev/null
;;
esac
case $proto in
tcp|udp)
- $IPT6 -A mwan3_rules -p $proto -s $src_ip -d $dest_ip $ipset -m multiport --sports $src_port -m multiport --dports $dest_port -m mark --mark 0/$MMX_MASK -m comment --comment "$1" -j $policy &> /dev/null
+ $IPT6 -A mwan3_rules \
+ -p $proto \
+ -s $src_ip \
+ -d $dest_ip $ipset \
+ -m multiport --sports $src_port \
+ -m multiport --dports $dest_port \
+ -m mark --mark 0/$MMX_MASK \
+ -m comment --comment "$1" \
+ -j $policy &> /dev/null
;;
*)
- $IPT6 -A mwan3_rules -p $proto -s $src_ip -d $dest_ip $ipset -m mark --mark 0/$MMX_MASK -m comment --comment "$1" -j $policy &> /dev/null
+ $IPT6 -A mwan3_rules \
+ -p $proto \
+ -s $src_ip \
+ -d $dest_ip $ipset \
+ -m mark --mark 0/$MMX_MASK \
+ -m comment --comment "$1" \
+ -j $policy &> /dev/null
;;
esac
fi
if [ -z "$id" -o -z "$device" ]; then
result="unknown"
- elif [ -n "$($IP rule | awk '$1 == "'$(($id+1000)):'"')" -a -n "$($IP rule | awk '$1 == "'$(($id+2000)):'"')" -a -n "$($IPT -S mwan3_iface_in_$1 2> /dev/null)" -a -n "$($IPT -S mwan3_iface_out_$1 2> /dev/null)" -a -n "$($IP route list table $id default dev $device 2> /dev/null)" ]; then
+ elif [ -n "$($IP rule | awk '$1 == "'$(($id+1000)):'"')" ] && \
+ [ -n "$($IP rule | awk '$1 == "'$(($id+2000)):'"')" ] && \
+ [ -n "$($IPT -S mwan3_iface_in_$1 2> /dev/null)" ] && \
+ [ -n "$($IP route list table $id default dev $device 2> /dev/null)" ]; then
result="$(mwan3_get_iface_hotplug_state $1)"
- elif [ -n "$($IP rule | awk '$1 == "'$(($id+1000)):'"')" -o -n "$($IP rule | awk '$1 == "'$(($id+2000)):'"')" -o -n "$($IPT -S mwan3_iface_in_$1 2> /dev/null)" -o -n "$($IPT -S mwan3_iface_out_$1 2> /dev/null)" -o -n "$($IP route list table $id default dev $device 2> /dev/null)" ]; then
+ elif [ -n "$($IP rule | awk '$1 == "'$(($id+1000)):'"')" ] || \
+ [ -n "$($IP rule | awk '$1 == "'$(($id+2000)):'"')" ] || \
+ [ -n "$($IPT -S mwan3_iface_in_$1 2> /dev/null)" ] || \
+ [ -n "$($IP route list table $id default dev $device 2> /dev/null)" ]; then
result="error"
elif [ "$enabled" == "1" ]; then
result="offline"
echo " interface $1 is $result and tracking is $tracking"
}
-mwan3_report_policies_v4()
+mwan3_report_policies()
{
- local percent policy share total_weight weight iface
+ local ipt="$1"
+ local policy="$2"
- for policy in $($IPT4 -S | awk '{print $2}' | grep mwan3_policy_ | sort -u); do
- echo "$policy:" | sed 's/mwan3_policy_//'
+ local percent total_weight weight iface
- [ -n "$total_weight" ] || total_weight=$($IPT4 -S $policy | cut -s -d'"' -f2 | head -1 | awk '{print $3}')
+ total_weight=$($ipt -S $policy | grep -v '.*--comment "out .*" .*$' | cut -s -d'"' -f2 | head -1 | awk '{print $3}')
- if [ ! -z "${total_weight##*[!0-9]*}" ]; then
- for iface in $($IPT4 -S $policy | cut -s -d'"' -f2 | awk '{print $1}'); do
- weight=$($IPT4 -S $policy | cut -s -d'"' -f2 | awk '$1 == "'$iface'"' | awk '{print $2}')
- percent=$(($weight*100/$total_weight))
- echo " $iface ($percent%)"
- done
- else
- echo " $($IPT4 -S $policy | sed '/.*--comment \([^ ]*\) .*$/!d;s//\1/;q')"
- fi
+ if [ ! -z "${total_weight##*[!0-9]*}" ]; then
+ for iface in $($ipt -S $policy | grep -v '.*--comment "out .*" .*$' | cut -s -d'"' -f2 | awk '{print $1}'); do
+ weight=$($ipt -S $policy | grep -v '.*--comment "out .*" .*$' | cut -s -d'"' -f2 | awk '$1 == "'$iface'"' | awk '{print $2}')
+ percent=$(($weight*100/$total_weight))
+ echo " $iface ($percent%)"
+ done
+ else
+ echo " $($ipt -S $policy | grep -v '.*--comment "out .*" .*$' | sed '/.*--comment \([^ ]*\) .*$/!d;s//\1/;q')"
+ fi
+}
- unset total_weight
+mwan3_report_policies_v4()
+{
+ local policy
- echo -e
+ for policy in $($IPT4 -S | awk '{print $2}' | grep mwan3_policy_ | sort -u); do
+ echo "$policy:" | sed 's/mwan3_policy_//'
+ mwan3_report_policies "$IPT4" "$policy"
done
}
mwan3_report_policies_v6()
{
- local percent policy share total_weight weight iface
+ local policy
for policy in $($IPT6 -S | awk '{print $2}' | grep mwan3_policy_ | sort -u); do
echo "$policy:" | sed 's/mwan3_policy_//'
-
- [ -n "$total_weight" ] || total_weight=$($IPT6 -S $policy | cut -s -d'"' -f2 | head -1 | awk '{print $3}')
-
- if [ ! -z "${total_weight##*[!0-9]*}" ]; then
- for iface in $($IPT6 -S $policy | cut -s -d'"' -f2 | awk '{print $1}'); do
- weight=$($IPT6 -S $policy | cut -s -d'"' -f2 | awk '$1 == "'$iface'"' | awk '{print $2}')
- percent=$(($weight*100/$total_weight))
- echo " $iface ($percent%)"
- done
- else
- echo " $($IPT6 -S $policy | sed '/.*--comment \([^ ]*\) .*$/!d;s//\1/;q')"
- fi
-
- unset total_weight
-
- echo -e
+ mwan3_report_policies "$IPT6" "$policy"
done
}
local address
if [ -n "$($IPT4 -S mwan3_connected 2> /dev/null)" ]; then
- for address in $($IPS list mwan3_connected_v4 | egrep '[0-9]{1,3}(\.[0-9]{1,3}){3}'); do
- echo " $address"
- done
+ $IPS -o save list mwan3_connected_v4 | grep add | cut -d " " -f 3
fi
}
local address
if [ -n "$($IPT6 -S mwan3_connected 2> /dev/null)" ]; then
- for address in $($IPS list mwan3_connected_v6 | egrep '([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])'); do
- echo " $address"
- done
+ $IPS -o save list mwan3_connected_v6 | grep add | cut -d " " -f 3
fi
}
fi
}
}
+
+mwan3_online_metric_clean() {
+ local iface="$1"
+
+ local online_metric ifname
+
+ config_get family $iface family ipv4
+ config_get online_metric $iface online_metric ""
+ ifname=$(uci_get_state network $iface ifname)
+
+ if [ "$family" == "ipv4" ] \
+ && [ "$online_metric" != "" ] \
+ && [ "$ifname" != "" ]; then
+ $IP4 route del default dev $ifname proto static metric $online_metric 1>/dev/null 2>&1
+ fi
+
+ if [ "$family" == "ipv6" ] \
+ && [ "$online_metric" != "" ] \
+ && [ "$ifname" != "" ]; then
+ $IP6 route del default dev $ifname proto static metric $online_metric 1>/dev/null 2>&1
+ fi
+}
local address
if [ -n "$($IPT4 -S mwan3_connected 2> /dev/null)" ]; then
- for address in $($IPS list mwan3_connected_v4 | tail -n +8); do
+ for address in $($IPS -o save list mwan3_connected_v4 | grep add | cut -d " " -f 3); do
json_add_string "" "${address}"
done
fi
local address
if [ -n "$($IPT6 -S mwan3_connected 2> /dev/null)" ]; then
- for address in $($IPS list mwan3_connected_v6 | tail -n +8); do
+ for address in $($IPS -o save list mwan3_connected_v6 | grep add | cut -d " " -f 3); do
json_add_string "" "${address}"
done
fi
local iface_select="${2}"
local running="0"
local age=0
- local pid device time_p time_n
+ local uptime=0
+ local downtime=0
+ local pid device time_p time_n time_u time_d
network_get_device device $1
let age=time_n-time_p
}
+ time_u="$(cat "$MWAN3TRACK_STATUS_DIR/${iface}/UPTIME")"
+ [ -z "${time_u}" ] || [ "${time_u}" = "0" ] || {
+ time_n="$(get_uptime)"
+ let uptime=time_n-time_u
+ }
+
+ time_d="$(cat "$MWAN3TRACK_STATUS_DIR/${iface}/DOWNTIME")"
+ [ -z "${time_d}" ] || [ "${time_d}" = "0" ] || {
+ time_n="$(get_uptime)"
+ let downtime=time_n-time_d
+ }
+
json_add_object "${iface}"
json_add_int age "$age"
+ json_add_int uptime "${uptime}"
+ json_add_int downtime "${downtime}"
json_add_int "score" "$(cat "$MWAN3TRACK_STATUS_DIR/${iface}/SCORE")"
json_add_int "lost" "$(cat "$MWAN3TRACK_STATUS_DIR/${iface}/LOST")"
json_add_int "turn" "$(cat "$MWAN3TRACK_STATUS_DIR/${iface}/TURN")"
ifup()
{
- local device enabled up l3_device
+ local device enabled up l3_device status
config_load mwan3
+ config_get_bool enabled globals 'enabled' 0
+ [ ${enabled} -gt 0 ] || {
+ echo "The service mwan3 is global disabled."
+ echo "Please execute \"/etc/init.d/mwan3 start\" first."
+ exit 1
+ }
if [ -z "$1" ]; then
echo "Expecting interface. Usage: mwan3 ifup <interface>" && exit 0
exit 0
}
- json_load $(ubus -S call network.interface.$1 status)
- json_get_vars up l3_device
+ status=$(ubus -S call network.interface.$1 status)
+ [ -n "$status" ] && {
+ json_load $status
+ json_get_vars up l3_device
+ }
+
config_get enabled "$1" enabled 0
- if [ "$up" -eq 1 ] \
+
+ if [ "$up" = "1" ] \
&& [ -n "$l3_device" ] \
- && [ "$enabled" -eq 1 ]; then
+ && [ "$enabled" = "1" ]; then
ACTION=ifup INTERFACE=$1 DEVICE=$l3_device /sbin/hotplug-call iface
fi
}
{
local enabled src_ip local_source
- config_load mwan3
- config_get_bool enabled globals 'enabled' 0
- [ ${enabled} -gt 0 ] || {
- echo "Warning: mwan3 is global disabled. Usage: /etc/init.d/mwan3 start"
- exit 0
- }
+ uci_toggle_state mwan3 globals enabled "1"
config_get local_source globals local_source 'none'
[ "${local_source}" = "none" ] || {
{
local ipset route rule table IP IPT pid src_ip
+ for pid in $(pgrep -f "mwan3rtmon"); do
+ kill -TERM "$pid" > /dev/null 2>&1
+ sleep 1
+ kill -KILL "$pid" > /dev/null 2>&1
+ done
+
for pid in $(pgrep -f "mwan3track"); do
kill -TERM "$pid" > /dev/null 2>&1
sleep 1
config_load mwan3
config_foreach mwan3_track_clean interface
+ config_foreach mwan3_online_metric_clean interface
for IP in "$IP4" "$IP6"; do
ip route del default via "${src_ip}" dev lo 1>/dev/null 2>&1
ip addr del "${src_ip}/32" dev lo 1>/dev/null 2>&1
}
+
+ uci_toggle_state mwan3 globals enabled "0"
}
restart() {
--- /dev/null
+#!/bin/sh
+
+. /lib/functions.sh
+. /lib/mwan3/mwan3.sh
+
+LOG="logger -t $(basename "$0")[$$] -p"
+
+clean_up() {
+ $LOG notice "Stopping mwan3rtmon..."
+ exit 0
+}
+
+rtchange() {
+ $LOG info "Detect rtchange event."
+}
+
+main() {
+ local rtmon_interval
+ trap clean_up TERM
+ trap rtchange USR1
+
+ config_load mwan3
+ config_get rtmon_interval globals rtmon_interval '5'
+
+ sleep 3
+ while mwan3_rtmon_ipv4 || mwan3_rtmon_ipv6; do
+ [ "$rtmon_interval" = "0" ] && break
+ sleep $rtmon_interval
+ done
+}
+
+main "$@"
local recovery_interval down up size
local keep_failure_interval check_quality failure_latency
local recovery_latency failure_loss recovery_loss
+ local max_ttl
[ -z "$5" ] && echo "Error: should not be started manually" && exit 0
config_get down $1 down 5
config_get up $1 up 5
config_get size $1 size 56
+ config_get max_ttl $1 max_ttl 60
config_get failure_interval $1 failure_interval $interval
config_get_bool keep_failure_interval $1 keep_failure_interval 0
config_get recovery_interval $1 recovery_interval $interval
if [ "$STATUS" = "unknown" ]; then
echo "unknown" > /var/run/mwan3track/$1/STATUS
+ echo "0" > /var/run/mwan3track/$1/UPTIME
+ echo "$(get_uptime)" > /var/run/mwan3track/$1/DOWNTIME
score=0
else
echo "online" > /var/run/mwan3track/$1/STATUS
+ echo "0" > /var/run/mwan3track/$1/DOWNTIME
+ echo "$(get_uptime)" > /var/run/mwan3track/$1/UPTIME
env -i ACTION="connected" INTERFACE="$1" DEVICE="$2" /sbin/hotplug-call iface
fi
while true; do
case "$track_method" in
ping)
if [ $check_quality -eq 0 ]; then
- ping -I $DEVICE -c $count -W $timeout -s $size -q $track_ip &> /dev/null
+ ping -I $DEVICE -c $count -W $timeout -s $size -t $max_ttl -q $track_ip &> /dev/null
result=$?
else
- ping_result="$(ping -I $DEVICE -c $count -W $timeout -s $size -q $track_ip | tail -2)"
+ ping_result="$(ping -I $DEVICE -c $count -W $timeout -s $size -t $max_ttl -q $track_ip | tail -2)"
loss="$(echo "$ping_result" | grep "packet loss" | cut -d "," -f3 | awk '{print $1}' | sed -e 's/%//')"
if [ "$loss" -eq 100 ]; then
latency=999999
if [ $score -eq $up ]; then
echo "offline" > /var/run/mwan3track/$1/STATUS
+ echo "0" > /var/run/mwan3track/$1/UPTIME
+ echo "$(get_uptime)" > /var/run/mwan3track/$1/DOWNTIME
$LOG notice "Interface $1 ($2) is offline"
env -i ACTION=ifdown INTERFACE=$1 DEVICE=$2 /sbin/hotplug-call iface
env -i ACTION="disconnected" INTERFACE="$1" DEVICE="$2" /sbin/hotplug-call iface
wait
if [ "${IFDOWN_EVENT}" -eq 1 ]; then
- score=0
echo "offline" > /var/run/mwan3track/$1/STATUS
+ echo "$(get_uptime)" > /var/run/mwan3track/$1/DOWNTIME
+ echo "0" > /var/run/mwan3track/$1/UPTIME
+ $LOG notice "Interface $1 ($2) is offline"
+ env -i ACTION="disconnected" INTERFACE="$1" DEVICE="$2" /sbin/hotplug-call iface
+ score=0
IFDOWN_EVENT=0
fi
done
include $(TOPDIR)/rules.mk
PKG_NAME:=net-snmp
-PKG_VERSION:=5.7.3
-PKG_RELEASE:=10
+PKG_VERSION:=5.8
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/net-snmp
-PKG_HASH:=12ef89613c7707dc96d13335f153c1921efc9d61d3708ef09f3fc4a7014fb4f0
+PKG_HASH:=b2fc3500840ebe532734c4786b0da4ef0a5f67e51ef4c86b3345d697e4976adf
PKG_MAINTAINER:=Stijn Tintel <stijn@linux-ipv6.be>
PKG_LICENSE:=MIT BSD-3-Clause-Clear
CONFIGURE_VARS += \
ac_cv_header_netlink_netlink_h=yes \
+ ac_cv_header_pcre_h=no \
netsnmp_cv_func_nl_connect_LIBS=-lnl-tiny \
ifeq ($(CONFIG_IPV6),y)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
--- a/configure.d/config_os_libs2
+++ b/configure.d/config_os_libs2
-@@ -226,14 +226,22 @@ if test "x$with_nl" != "xno"; then
- case $target_os in
- linux*) # Check for libnl (linux)
+@@ -254,14 +254,22 @@ if test "x$with_nl" != "xno"; then
+ )
+
netsnmp_save_CPPFLAGS="$CPPFLAGS"
-- CPPFLAGS="-I/usr/include/libnl3 $CPPFLAGS"
+- CPPFLAGS="${LIBNL3_CFLAGS} $CPPFLAGS"
- NETSNMP_SEARCH_LIBS(nl_connect, nl-3,
- [AC_CHECK_HEADERS(netlink/netlink.h)
-- EXTERNAL_MIBGROUP_INCLUDES="$EXTERNAL_MIBGROUP_INCLUDES -I/usr/include/libnl3"],
+- EXTERNAL_MIBGROUP_INCLUDES="$EXTERNAL_MIBGROUP_INCLUDES ${LIBNL3_CFLAGS}"],
- [CPPFLAGS="$netsnmp_save_CPPFLAGS"], [], [], [LMIBLIBS])
+ netsnmp_netlink_include_flags=""
if test "x$ac_cv_header_netlink_netlink_h" != xyes; then
--- a/agent/mibgroup/mibII/interfaces.c
+++ b/agent/mibgroup/mibII/interfaces.c
-@@ -1590,6 +1590,10 @@ Interface_Scan_Init(void)
+@@ -1588,6 +1588,10 @@ Interface_Scan_Init(void)
struct ifnet *nnew;
char *stats, *ifstart = line;
if (line[strlen(line) - 1] == '\n')
line[strlen(line) - 1] = '\0';
-@@ -1622,7 +1622,7 @@ Interface_Scan_Init(void)
+@@ -1620,7 +1624,7 @@ Interface_Scan_Init(void)
&coll) != 5)) {
if ((scan_line_to_use == scan_line_2_2)
&& !strstr(line, "No statistics available"))
diff -uNr a/local/Makefile.in b/local/Makefile.in
--- a/local/Makefile.in 2014-02-20 08:36:42.000000000 +0800
+++ b/local/Makefile.in 2014-05-27 13:21:34.245223503 +0800
-@@ -103,7 +103,7 @@
+@@ -101,7 +101,7 @@
mib2c.made: $(srcdir)/mib2c
if test "x$(PERL)" != "x" ; then \
diff -uNr a/Makefile.top b/Makefile.top
--- a/Makefile.top 2014-02-20 08:36:42.000000000 +0800
+++ b/Makefile.top 2014-05-27 13:26:53.023737120 +0800
-@@ -27,6 +27,7 @@
+@@ -28,6 +28,7 @@
snmplibdir = $(datadir)/snmp
mibdir = $(snmplibdir)/mibs
persistentdir = @PERSISTENT_DIRECTORY@
diff -uNr a/mibs/Makefile.in b/mibs/Makefile.in
--- a/mibs/Makefile.in 2014-02-20 08:36:42.000000000 +0800
+++ b/mibs/Makefile.in 2014-05-27 13:25:07.151988585 +0800
-@@ -49,11 +49,15 @@
+@@ -47,11 +47,15 @@
UCDMIBS = UCD-SNMP-MIB.txt UCD-DEMO-MIB.txt UCD-IPFWACC-MIB.txt \
UCD-DLMOD-MIB.txt UCD-DISKIO-MIB.txt
--- a/configure
+++ b/configure
-@@ -14197,7 +14197,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+@@ -15097,7 +15097,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu)
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
--- a/Makefile.top
+++ b/Makefile.top
-@@ -85,7 +85,7 @@ LIBCURRENT = 30
+@@ -87,7 +87,7 @@ LIBCURRENT = 30
LIBAGE = 0
- LIBREVISION = 3
+ LIBREVISION = 0
-LIB_LD_CMD = $(LIBTOOL) --mode=link $(LINKCC) $(CFLAGS) -rpath $(libdir) -version-info $(LIBCURRENT):$(LIBREVISION):$(LIBAGE) -o
+LIB_LD_CMD = $(LIBTOOL) --mode=link $(LINKCC) $(CFLAGS) -rpath $(libdir) $(LDFLAGS) -version-info $(LIBCURRENT):$(LIBREVISION):$(LIBAGE) -o
PKG_NAME:=netatalk
PKG_VERSION:=3.1.11
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/netatalk
SECTION:=net
CATEGORY:=Network
SUBMENU:=Filesystem
- DEPENDS:=+libattr +libdb47 +libgcrypt +libopenssl $(LIBRPC_DEPENDS)
+ DEPENDS:=+libattr +libdb47 +libgcrypt +libopenssl
TITLE:=netatalk
URL:=http://netatalk.sourceforge.net
MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
endef
TARGET_CFLAGS += -std=gnu99
-TARGET_LDFLAGS += $(LIBRPC)
CONFIGURE_ARGS += \
--disable-afs \
+++ /dev/null
-if PACKAGE_netopeer2-keystored
-
-config SSH_KEYS
- bool "Generate default ssh keys"
- default y
-
-endif
+++ /dev/null
-#
-# Copyright (C) 2017 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-# Warning by default OpenWrt does not have a root password which is necessery for NETCONF server.
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=netopeer2
-
-PKG_LICENSE:=BSD-3-Clause
-PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
-
-PKG_VERSION:=0.5.26
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=3b99e99c9d507ddc89d21d7f1cbded494e6aa72e
-PKG_MIRROR_HASH:=d29b501d56bf9a2480759cc55368c842f69b07722afb3a0a70f05d6088f72574
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
-PKG_SOURCE_URL:=https://github.com/CESNET/Netopeer2.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)
-
-PKG_BUILD_ROOT:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
-PKG_BUILD_DIR:=$(PKG_BUILD_ROOT)
-
-PKG_BUILD_PARALLEL:=1
-PKG_INSTALL:=1
-
-CMAKE_INSTALL:=1
-
-include $(INCLUDE_DIR)/package.mk
-include $(INCLUDE_DIR)/cmake.mk
-
-define Package/netopeer2-keystored/config
- source "$(SOURCE)/Config_keystored.in"
-endef
-
-define Package/netopeer2-server
- SECTION:=utils
- CATEGORY:=Utilities
- TITLE:=NETCONF server
- URL:=$(PKG_SOURCE_URL)
- DEPENDS:=+libpthread +libyang +libnetconf2 +netopeer2-keystored +libsysrepo +sysrepocfg +sysrepoctl +sysrepo
- MENU:=1
-endef
-
-define Package/netopeer2-cli
- SECTION:=utils
- CATEGORY:=Utilities
- TITLE:=Netopeer2 cli tool
- URL:=$(PKG_SOURCE_URL)
- DEPENDS:=+libpthread +libyang +libnetconf2 +libopenssl
-endef
-
-define Package/netopeer2-keystored
- SECTION:=utils
- CATEGORY:=Utilities
- TITLE:=Netopeer2 key store management
- URL:=$(PKG_SOURCE_URL)
- DEPENDS:=+libopenssl +libsysrepo +sysrepo +sysrepocfg +sysrepoctl +SSH_KEYS:openssh-keygen +SSH_KEYS:openssl-util
- MENU:=1
-endef
-
-define Package/netopeer2/description
- Netopeer2 is a set of tools implementing network configuration tools based on the NETCONF
- Protocol. This is the second generation of the toolset, originally available as the Netopeer
- project. Netopeer2 is based on the new generation of the NETCONF and YANG libraries -
- libyang and libnetconf2. The Netopeer server uses sysrepo as a NETCONF datastore implementation.
-endef
-
-CMAKE_OPTIONS += \
- -DCMAKE_INSTALL_PREFIX:PATH=/usr \
- -DCMAKE_BUILD_TYPE:STRING=Release \
- -DKEYSTORED_KEYS_DIR:STRING=/etc/keystored/keys
-
-define Package/netopeer2-server/install
- $(INSTALL_DIR) $(1)/bin
- $(INSTALL_BIN) $(PKG_BUILD_ROOT)/server/netopeer2-server $(1)/bin/
-
- $(INSTALL_DIR) $(1)/etc/sysrepo/yang
- $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-ssh-server.yang $(1)/etc/sysrepo/yang/ietf-ssh-server@2016-11-02.yang
- $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-tls-server.yang $(1)/etc/sysrepo/yang/ietf-tls-server@2016-11-02.yang
- $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/iana-crypt-hash.yang $(1)/etc/sysrepo/yang/iana-crypt-hash@2014-08-06.yang
- $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-x509-cert-to-name.yang $(1)/etc/sysrepo/yang/ietf-x509-cert-to-name@2014-12-10.yang
- $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-netconf-server.yang $(1)/etc/sysrepo/yang/ietf-netconf-server@2016-11-02.yang
- $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-netconf-monitoring.yang $(1)/etc/sysrepo/yang/ietf-netconf-monitoring@2010-10-04.yang
- $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-netconf-with-defaults.yang $(1)/etc/sysrepo/yang/ietf-netconf-with-defaults@2011-06-01.yang
- $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-system.yang $(1)/etc/sysrepo/yang/ietf-system@2014-08-06.yang
-
- $(INSTALL_DIR) $(1)/etc/uci-defaults
- $(INSTALL_BIN) ./files/netopeer2-server.default $(1)/etc/uci-defaults/99_netopeer2-server
-
- $(INSTALL_DIR) $(1)/etc/init.d/
- $(INSTALL_BIN) ./files/netopeer2-server.init $(1)/etc/init.d/netopeer2-server
-
- $(INSTALL_DIR) $(1)/usr/share/netopeer2-server
- $(INSTALL_DATA) ./files/stock_config.xml $(1)/usr/share/netopeer2-server
-endef
-
-define Package/netopeer2-cli/install
- $(INSTALL_DIR) $(1)/bin
- $(INSTALL_BIN) $(PKG_BUILD_ROOT)/cli/netopeer2-cli $(1)/bin/
-endef
-
-define Package/netopeer2-keystored/install
- $(INSTALL_DIR) $(1)/usr/lib/sysrepo/plugins/
- $(INSTALL_BIN) $(PKG_BUILD_ROOT)/keystored/libkeystored.so $(1)/usr/lib/sysrepo/plugins/
-
- $(INSTALL_DIR) $(1)/etc/sysrepo/yang
- $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-keystore.yang $(1)/etc/sysrepo/yang/ietf-keystore@2016-10-31.yang
-
- $(INSTALL_DIR) $(1)/etc/uci-defaults
-
- $(INSTALL_DIR) $(1)/etc/keystored/keys
-ifeq ($(CONFIG_SSH_KEYS),y)
- $(INSTALL_BIN) ./files/netopeer2-keystored-keygen.default $(1)/etc/uci-defaults/97_netopeer2-keystored
-else
- $(INSTALL_BIN) ./files/netopeer2-keystored.default $(1)/etc/uci-defaults/97_netopeer2-keystored
- #ssh key name is specified in ./files/stock_config.xml file, you will need to provide the ssh keys yourself.
- $(INSTALL_DATA) ./files/ssh_host_rsa_key.pem $(1)/etc/keystored/keys
- $(INSTALL_DATA) ./files/ssh_host_rsa_key.pub.pem $(1)/etc/keystored/keys
-endif
-
- $(INSTALL_DIR) $(1)/usr/share/netopeer2-keystored
- $(INSTALL_DATA) $(PKG_BUILD_ROOT)/keystored/stock_key_config.xml $(1)/usr/share/netopeer2-keystored
-endef
-
-$(eval $(call BuildPackage,netopeer2-server))
-$(eval $(call BuildPackage,netopeer2-cli))
-$(eval $(call BuildPackage,netopeer2-keystored))
+++ /dev/null
-#!/bin/sh
-
-# Warning, problems can occur if the device restarts in the middle of this uci-default script
-
-if [ -x /bin/sysrepoctl ]; then
- match=$(sysrepoctl -l | grep "ietf-keystore ")
- if [ ! "$match" ]; then
- sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-keystore@2016-10-31.yang -o root:root -p 600
- if [ -x /bin/sysrepocfg ]; then
- sysrepocfg -d startup -i /usr/share/netopeer2-keystored/stock_key_config.xml ietf-keystore
- rm /usr/share/netopeer2-keystored/stock_key_config.xml
- fi
-
- #generate ssh keys
- ssh-keygen -t rsa -f /tmp/ssh_host_rsa_key -N ""
- openssl rsa -in /tmp/ssh_host_rsa_key -outform pem > /etc/keystored/keys/ssh_host_rsa_key.pem
- openssl rsa -pubout -in /etc/keystored/keys/ssh_host_rsa_key.pem -out /etc/keystored/keys/ssh_host_rsa_key.pub.pem
- rm /tmp/ssh_host_rsa_key
- fi
-fi
-
-exit 0
+++ /dev/null
-#!/bin/sh
-
-# Warning, problems can occur if the device restarts in the middle of this uci-default script
-
-if [ -x /bin/sysrepoctl ]; then
- match=$(sysrepoctl -l | grep "ietf-keystore ")
- if [ ! "$match" ]; then
- sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-keystore@2016-10-31.yang -o root:root -p 600
- if [ -x /bin/sysrepocfg ]; then
- sysrepocfg -d startup -i /usr/share/netopeer2-keystored/stock_key_config.xml ietf-keystore
- rm /usr/share/netopeer2-keystored/stock_key_config.xml
- fi
- fi
-fi
-
-exit 0
+++ /dev/null
-#!/bin/sh
-
-# Warning, problems can occur if the device restarts in the middle of this uci-default script
-
-if [ -x /bin/sysrepoctl ]; then
- match=$(sysrepoctl -l | grep "ietf-ssh-server ")
- if [ ! "$match" ]; then
- sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-ssh-server@2016-11-02.yang -p 600
- fi
-
- match=$(sysrepoctl -l | grep "ietf-tls-server ")
- if [ ! "$match" ]; then
- sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-tls-server@2016-11-02.yang -p 600
- fi
-
- match=$(sysrepoctl -l | grep "iana-crypt-hash ")
- if [ ! "$match" ]; then
- sysrepoctl --install --yang=/etc/sysrepo/yang/iana-crypt-hash@2014-08-06.yang -p 600
- fi
-
- match=$(sysrepoctl -l | grep "ietf-x509-cert-to-name ")
- if [ ! "$match" ]; then
- sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-x509-cert-to-name@2014-12-10.yang -p 600
- fi
-
- match=$(sysrepoctl -l | grep "ietf-netconf-server ")
- if [ ! "$match" ]; then
- sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-server@2016-11-02.yang -o root:root -p 600
- sysrepoctl -m ietf-netconf-server -e listen
- sysrepoctl -m ietf-netconf-server -e ssh-listen
- if [ -x /bin/sysrepocfg ]; then
- sysrepocfg -d startup -i /usr/share/netopeer2-server/stock_config.xml ietf-netconf-server
- rm /usr/share/netopeer2-server/stock_config.xml
- fi
- fi
-
- match=$(sysrepoctl -l | grep "ietf-netconf-monitoring ")
- if [ ! "$match" ]; then
- sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-monitoring@2010-10-04.yang -o root:root -p 600
- fi
-
- match=$(sysrepoctl -l | grep "ietf-netconf-with-defaults ")
- if [ ! "$match" ]; then
- sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-with-defaults@2011-06-01.yang -o root:root -p 600
- fi
-
- match=$(sysrepoctl -l | grep "ietf-system ")
- if [ ! "$match" ]; then
- sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-system@2014-08-06.yang -o root:root -p 600
- sysrepoctl -m ietf-system -e authentication
- sysrepoctl -m ietf-system -e local-users
- fi
-fi
-
-exit 0
+++ /dev/null
-#!/bin/sh /etc/rc.common
-
-START=99
-STOP=11
-
-USE_PROCD=1
-PROG=/bin/netopeer2-server
-
-start_service() {
-
- PERSIST_FILE=/etc/sysrepo/data/ietf-keystore.persist
-
- while [ ! -f $PERSIST_FILE ]
- do
- echo "no persist file yet"
- sleep 3
- done
-
- RETRY_CNT=5
- LAST_LINE=$(tail -n1 $PERSIST_FILE)
-
- while [[ -f $PERSIST_FILE && $LAST_LINE != "</module>" ]]
- do
- sleep 1
-
- echo "$RETRY_CNT: $LAST_LINE"
- LAST_LINE=$(tail -n1 $PERSIST_FILE)
- RETRY_CNT=$(($RETRY_CNT-1))
-
- if [ $RETRY_CNT -le 0 ];
- then
- rm $PERSIST_FILE
- RETRY_CNT=5
- fi
- done
-
- procd_open_instance
- procd_set_param command $PROG
- procd_append_param command -d -v 0
- procd_set_param respawn
- procd_close_instance
-}
-
-stop_service()
-{
- service_stop ${PROG}
-}
+++ /dev/null
-<netconf-server xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-server">
- <listen>
- <endpoint>
- <name>test_ssh_listen_endpt</name>
- <ssh>
- <address>::</address>
- <port>830</port>
- <host-keys>
- <host-key>
- <name>test_ssh_listen_key</name>
- <public-key>ssh_host_rsa_key</public-key>
- </host-key>
- </host-keys>
- </ssh>
- </endpoint>
- </listen>
-</netconf-server>
+++ /dev/null
-Index: netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/CMakeLists.txt
-===================================================================
---- /dev/null
-+++ netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/CMakeLists.txt
-@@ -0,0 +1,5 @@
-+cmake_minimum_required(VERSION 2.6)
-+
-+add_subdirectory(server)
-+add_subdirectory(cli)
-+add_subdirectory(keystored)
-Index: netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/cli/CMakeLists.txt
-===================================================================
---- netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d.orig/cli/CMakeLists.txt
-+++ netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/cli/CMakeLists.txt
-@@ -1,7 +1,7 @@
- cmake_minimum_required(VERSION 2.6)
-
- # include custom Modules
--set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../CMakeModules/")
-+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules/")
-
- project(netopeer2-cli C)
- include(GNUInstallDirs)
-@@ -83,7 +83,7 @@ endif()
- install(FILES ${PROJECT_SOURCE_DIR}/doc/${PROJECT_NAME}.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
-
- # clean cmake cache
--add_custom_target(cleancache
-+add_custom_target(cleancache_cli
- COMMAND make clean
- COMMAND find . -iname '*cmake*' -not -name CMakeLists.txt -exec rm -rf {} +
- COMMAND rm -rf Makefile Doxyfile
-Index: netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/keystored/CMakeLists.txt
-===================================================================
---- netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d.orig/keystored/CMakeLists.txt
-+++ netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/keystored/CMakeLists.txt
-@@ -1,7 +1,7 @@
- cmake_minimum_required(VERSION 2.6)
-
- # include custom Modules
--set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../CMakeModules/")
-+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules/")
-
- project(keystored C)
- include(GNUInstallDirs)
-@@ -140,7 +140,7 @@ if (SSH_KEY_INSTALL)
- execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/scripts/ssh-key-import.sh)")
- endif()
-
--add_custom_target(install-scripts-ide
-+add_custom_target(install-scripts-ide-keystored
- scripts/model-install.sh
- scripts/ssh-key-import.sh
- )
-Index: netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/server/CMakeLists.txt
-===================================================================
---- netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d.orig/server/CMakeLists.txt
-+++ netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/server/CMakeLists.txt
-@@ -1,7 +1,7 @@
- cmake_minimum_required(VERSION 2.8.9)
-
- # include custom Modules
--set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../CMakeModules/")
-+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules/")
-
- project(netopeer2-server C)
- include(GNUInstallDirs)
-@@ -176,7 +176,7 @@ if (ENABLE_CONFIGURATION)
- execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/scripts/model-install.sh)")
- endif()
-
--add_custom_target(install-scripts-ide
-+add_custom_target(install-scripts-ide-server
- scripts/model-install.sh
--- /dev/null
+menu "Select nfs-kernel-server configuration options"
+ depends on PACKAGE_nfs-kernel-server
+
+config NFS_KERNEL_SERVER_V4
+ bool "Include support for NFSv4"
+ default y
+
+endmenu
include $(TOPDIR)/rules.mk
PKG_NAME:=nfs-kernel-server
-PKG_VERSION:=2.3.2
-PKG_RELEASE:=1
-PKG_HASH:=1748a046e452ceb2285cc07b61ec0f85af7c92ac443e111a6c8a1061254ca717
+PKG_VERSION:=2.3.3
+PKG_RELEASE:=2
+PKG_HASH:=3c8c63611c7e78b7a3b2f8a28b9928a5b5e66d5e9ad09a1e54681508884320a4
PKG_SOURCE_URL:=@SF/nfs
-PKG_SOURCE:=nfs-utils-$(PKG_VERSION).tar.bz2
+PKG_SOURCE:=nfs-utils-$(PKG_VERSION).tar.xz
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/nfs-utils-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/nfs-utils-$(PKG_VERSION)
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_BUILD_DEPENDS:=$(PKG_NAME)/host
+HOST_BUILD_DEPENDS:=libtirpc/host
+
+PKG_CONFIG_DEPENDS:= \
+ CONFIG_IPV6 \
+ CONFIG_NFS_KERNEL_SERVER_V4
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk
SECTION:=net
CATEGORY:=Network
SUBMENU:=Filesystem
- DEPENDS:=+libwrap +libblkid +libuuid $(LIBRPC_DEPENDS)
+ DEPENDS:=+libwrap +libblkid +libuuid +libtirpc
URL:=http://nfs.sourceforge.net/
MAINTAINER:=Peter Wagner <tripolar@gmx.at>
endef
define Package/nfs-kernel-server
$(call Package/nfs-kernel-server/Default)
TITLE:=Kernel NFS server support
- DEPENDS+= +kmod-fs-nfsd +kmod-fs-nfs +portmap
+ DEPENDS+= +kmod-fs-nfsd +kmod-fs-nfs +NFS_KERNEL_SERVER_V4:kmod-fs-nfs-v4 +rpcbind +NFS_KERNEL_SERVER_V4:nfs-utils-libs +NFS_KERNEL_SERVER_V4:libkeyutils +NFS_KERNEL_SERVER_V4:libdevmapper
endef
define Package/nfs-kernel-server/description
Kernel NFS server support
endef
+define Package/nfs-kernel-server/config
+ source "$(SOURCE)/Config.in"
+endef
+
define Package/nfs-kernel-server-utils
$(call Package/nfs-kernel-server/Default)
TITLE:=NFS server utils
/etc/exports
endef
-define Package/nfs-utils
+define Package/nfs-utils/Default
$(call Package/nfs-kernel-server/Default)
SECTION:=utils
CATEGORY:=Utilities
- DEPENDS+= +libevent2 +USE_UCLIBC:librpc
+ DEPENDS+= +libevent2 +NFS_KERNEL_SERVER_V4:libkeyutils +NFS_KERNEL_SERVER_V4:libdevmapper
+ URL:=http://nfs.sourceforge.net/
+ MAINTAINER:=Peter Wagner <tripolar@gmx.at>
+endef
+
+define Package/nfs-utils
+ $(call Package/nfs-utils/Default)
TITLE:=updated mount utility (includes nfs4)
endef
Updated mount.nfs command - allows mounting nfs4 volumes
endef
+define Package/nfs-utils-libs
+ $(call Package/nfs-utils/Default)
+ TITLE:=libraries provided by nfs-utils
+endef
+
+define Package/nfs-utils-libs/description
+ Libraries provided by nfs-utils
+endef
+
TARGET_CFLAGS += -Wno-error=implicit-function-declaration \
-Wno-error=strict-prototypes \
-Wno-error=incompatible-pointer-types \
-Wno-error=format-security \
- -Wno-error=undef
+ -Wno-error=undef \
+ -Wno-error=missing-include-dirs
-TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib $(LIBRPC) \
+TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
-L$(STAGING_DIR)/usr/lib/libevent
CONFIGURE_ARGS += \
+ --disable-caps \
--disable-gss \
- --disable-nfsv4 \
- --disable-nfsv41 \
- --disable-ipv6 \
- --enable-static \
+ --disable-nfsdcld \
+ --disable-nfsdcltrack \
--enable-shared \
- --disable-caps \
- --disable-tirpc
+ --enable-static \
+ $(if $(CONFIG_NFS_KERNEL_SERVER_V4),--enable,--disable)-nfsv4 \
+ $(if $(CONFIG_NFS_KERNEL_SERVER_V4),--enable,--disable)-nfsv41
+
+ifeq ($(CONFIG_IPV6),n)
+CONFIGURE_ARGS += --disable-ipv6
+endif
CONFIGURE_VARS += \
libblkid_cv_is_recent=yes \
ac_cv_lib_resolv___res_querydomain=yes \
+ ac_cv_lib_bsd_daemon=no \
CONFIG_SQLITE3_TRUE="\#" \
CONFIG_NFSDCLD_TRUE="\#"
RPCGEN_PATH=$(STAGING_DIR_HOSTPKG)/bin/rpcgen \
RPCGEN=$(STAGING_DIR_HOSTPKG)/bin/rpcgen
-HOST_CFLAGS += -Dlinux
+HOST_CFLAGS += -Dlinux \
+ -Wno-error=missing-include-dirs
HOST_CONFIGURE_ARGS += \
--disable-gss \
--disable-nfsv4 \
--disable-nfsv41 \
- --disable-ipv6 \
- --disable-tirpc \
--without-tcp-wrappers
HOST_CONFIGURE_VARS += \
ac_cv_header_event_h=yes \
ac_cv_header_nfsidmap_h=yes \
ac_cv_header_blkid_blkid_h=yes \
+ ac_cv_lib_resolv___res_querydomain=yes \
GSSGLUE_CFLAGS=" " \
GSSGLUE_LIBS=" " \
RPCSECGSS_CFLAGS=" " \
$(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/nfsstat/nfsstat $(1)/usr/sbin
endef
+define Package/nfs-utils/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/nfsidmap.h $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnfsidmap.{a,la,so*} $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnfsidmap.pc $(1)/usr/lib/pkgconfig/
+endef
+
define Package/nfs-utils/install
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/mount.nfs $(1)/sbin/
(cd $(1)/sbin; ln -sf mount.nfs mount.nfs4; ln -sf mount.nfs umount.nfs; ln -sf mount.nfs umount.nfs4)
endef
+define Package/nfs-utils-libs/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnfsidmap.so* $(1)/usr/lib/
+endef
+
$(eval $(call HostBuild))
+$(eval $(call BuildPackage,nfs-utils))
+$(eval $(call BuildPackage,nfs-utils-libs))
$(eval $(call BuildPackage,nfs-kernel-server))
$(eval $(call BuildPackage,nfs-kernel-server-utils))
-$(eval $(call BuildPackage,nfs-utils))
USE_PROCD=1
NFS_D=/var/lib/nfs
+RECOVERY_D=$NFS_D/v4recovery
LOCK_D=/var/lib/nfs/sm
start_service() {
grep -q /proc/fs/nfsd /proc/mounts || \
mount -t nfsd nfsd /proc/fs/nfsd
mkdir -p $NFS_D
+ mkdir -p $RECOVERY_D
mkdir -p $LOCK_D
touch $NFS_D/rmtab
--- /dev/null
+#
+# Copyright (C) 2018 rosysong@rosinson.com
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=nft-qos
+PKG_VERSION:=1.0.1
+PKG_RELEASE:=1
+PKG_LICENSE:=GPL-2.0
+
+PKG_MAINTAINER:=Rosy Song <rosysong@rosinson.com>
+
+PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/nft-qos
+ SECTION:=utils
+ CATEGORY:=Base system
+ DEPENDS:=+nftables +kmod-nft-netdev +kmod-nft-bridge
+ TITLE:=QoS scripts over nftables
+endef
+
+define Package/nft-qos/description
+ This package provides implementation for qos over nftables.
+ Currently, static/dynamic qos and traffic shaping are supported.
+endef
+
+define Package/nft-qos/conffiles
+/etc/config/nft-qos
+endef
+
+define Build/Prepare
+endef
+
+define Build/Configure
+endef
+
+define Build/Compile
+endef
+
+define Package/nft-qos/install
+ $(INSTALL_DIR) $(1)/lib/nft-qos
+ $(INSTALL_DATA) ./files/lib/* $(1)/lib/nft-qos/
+ $(INSTALL_DIR) $(1)/etc/config
+ $(INSTALL_CONF) ./files/nft-qos.config $(1)/etc/config/nft-qos
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/nft-qos.init $(1)/etc/init.d/nft-qos
+ $(INSTALL_DIR) $(1)/etc/hotplug.d/dhcp
+ $(INSTALL_BIN) ./files/nft-qos-monitor.hotplug $(1)/etc/hotplug.d/dhcp/00-nft-qos-monitor
+ $(INSTALL_BIN) ./files/nft-qos-dynamic.hotplug $(1)/etc/hotplug.d/dhcp/01-nft-qos-dynamic
+endef
+
+$(eval $(call BuildPackage,nft-qos))
--- /dev/null
+#!/bin/sh
+#
+# Copyright (C) 2018 rosysong@rosinson.com
+#
+
+# for uci_validate_section()
+. /lib/functions/procd.sh
+
+NFT_QOS_HAS_BRIDGE=
+NFT_QOS_INET_FAMILY=ip
+NFT_QOS_SCRIPT_TEXT=
+NFT_QOS_SCRIPT_FILE=/tmp/qos.nft
+
+qosdef_appendx() { # <string to be appended>
+ NFT_QOS_SCRIPT_TEXT="$NFT_QOS_SCRIPT_TEXT""$1"
+}
+
+qosdef_append_chain_def() { # <type> <hook> <priority> <policy>
+ qosdef_appendx "\t\ttype $1 hook $2 priority $3; policy $4;\n"
+}
+
+qosdef_append_chain_ingress() { # <type> <device> <priority> <policy>
+ qosdef_appendx "\t\ttype $1 hook ingress device $2 priority $3; policy $4;\n"
+}
+
+# qosdef_append_rule_{MATCH}_{STATEMENT}
+qosdef_append_rule_ip_limit() { # <ipaddr> <operator> <unit> <rate>
+ local ipaddr=$1
+ local operator=$2
+ local unit=$3
+ local rate=$4
+
+ qosdef_appendx \
+ "\t\tip $operator $ipaddr limit rate over $rate $unit/second drop\n"
+}
+
+# qosdef_append_rule_{MATCH}_{POLICY}
+qosdef_append_rule_ip_policy() { # <operator> <ipaddr> <policy>
+ qosdef_appendx "\t\tip $1 $2 $3\n"
+}
+
+_handle_limit_whitelist() { # <value> <chain>
+ local ipaddr=$1
+ local operator
+
+ [ -z "$ipaddr" ] && return
+
+ case "$2" in
+ download) operator="daddr";;
+ upload) operator="saddr";;
+ esac
+
+ qosdef_append_rule_ip_policy $operator $ipaddr accept
+}
+
+qosdef_append_rule_limit_whitelist() { # <chain>
+ config_list_foreach default limit_whitelist _handle_limit_whitelist $1
+}
+
+qosdef_flush_table() { # <family> <table>
+ nft flush table $1 $2 2>/dev/null
+}
+
+qosdef_remove_table() { # <family> <table>
+ nft delete table $1 $2 2>/dev/null
+}
+
+qosdef_init_header() { # add header for nft script
+ qosdef_appendx "#!/usr/sbin/nft -f\n"
+ qosdef_appendx "# Copyright (C) 2018 rosysong@rosinson.com\n"
+ qosdef_appendx "#\n\n"
+}
+
+qosdef_init_env() {
+ # check interface type of lan
+ local lt="$(uci_get "network.lan.type")"
+ [ "$lt" = "bridge" ] && export NFT_QOS_HAS_BRIDGE="y"
+
+ # check if ipv6 support
+ [ -e /proc/sys/net/ipv6 ] && export NFT_QOS_INET_FAMILY="inet"
+}
+
+qosdef_clean_cache() {
+ rm -f $NFT_QOS_SCRIPT_FILE
+}
+
+qosdef_init_done() {
+ echo -e $NFT_QOS_SCRIPT_TEXT > $NFT_QOS_SCRIPT_FILE 2>/dev/null
+}
+
+qosdef_start() {
+ nft -f $NFT_QOS_SCRIPT_FILE 2>/dev/null
+}
--- /dev/null
+#!/bin/sh
+#
+# Copyright (C) 2018 rosysong@rosinson.com
+#
+
+. /lib/nft-qos/core.sh
+
+# return average rate for dhcp leases
+qosdef_dynamic_rate() { # <bandwidth>
+ local c=0 c6=0
+
+ [ ! -e /tmp/dhcp.leases -a \
+ ! -e /var/dhcp6.leases ] && return
+
+ [ -e /tmp/dhcp.leases ] && \
+ c=$(wc -l < /tmp/dhcp.leases 2>/dev/null)
+ [ -e /var/dhcp6.leases ] && \
+ c6=$(wc -l < /var/dhcp6.leases 2>/dev/null)
+ [ $c -eq 0 -a $c6 -eq 0 ] && \
+ { echo 12500; return; }
+
+ echo $(($1 / ($c + $c6)))
+}
+
+qosdef_append_chain_dym() { # <hook> <name> <bandwidth>
+ local cidr cidr6
+ local operator rate
+ local hook=$1 name=$2 bandwidth=$3
+
+ config_get cidr default 'dynamic_cidr'
+ config_get cidr6 default 'dynamic_cidr6'
+
+ [ -z "$cidr" -a -z "$cidr6" ] && return
+
+ case "$2" in
+ download) operator=daddr;;
+ upload) operator=saddr;;
+ esac
+
+ rate=$(qosdef_dynamic_rate $bandwidth)
+
+ qosdef_appendx "\tchain $name {\n"
+ qosdef_append_chain_def filter $hook 0 accept
+ qosdef_append_rule_limit_whitelist $name
+ [ -n "$cidr" ] && \
+ qosdef_append_rule_ip_limit $cidr $operator kbytes $rate
+ [ -n "$cidr6" ] && \
+ qosdef_append_rule_ip_limit $cidr6 $operator kbytes $rate
+ qosdef_appendx "\t}\n"
+}
+
+qosdef_flush_dynamic() {
+ qosdef_flush_table "$NFT_QOS_INET_FAMILY" nft-qos-dynamic
+}
+
+# init dynamic qos
+qosdef_init_dynamic() {
+ local dynamic_bw_up dynamic_bw_down limit_enable limit_type
+ local hook_ul="input" hook_dl="postrouting"
+
+ uci_validate_section nft-qos default default \
+ 'limit_enable:bool:0' \
+ 'limit_type:maxlength(8)' \
+ 'dynamic_bw_up:uinteger:100' \
+ 'dynamic_bw_down:uinteger:100'
+
+ [ $? -ne 0 ] && {
+ logger -t nft-qos-dynamic "validation failed"
+ return 1
+ }
+
+ [ $limit_enable -eq 0 -o \
+ "$limit_type" = "static" ] && return 1
+
+ # Transfer mbits/s to mbytes/s
+ # e.g. 100,000 kbits == 12,500 kbytes
+ dynamic_bw_up=$(($dynamic_bw_up * 1000 / 8))
+ dynamic_bw_down=$(($dynamic_bw_down * 1000 / 8))
+
+ [ -z "$NFT_QOS_HAS_BRIDGE" ] && {
+ hook_ul="postrouting"
+ hook_dl="input"
+ }
+
+ qosdef_appendx "table $NFT_QOS_INET_FAMILY nft-qos-dynamic {\n"
+ qosdef_append_chain_dym $hook_ul upload $dynamic_bw_up
+ qosdef_append_chain_dym $hook_dl download $dynamic_bw_down
+ qosdef_appendx "}\n"
+}
--- /dev/null
+#!/bin/sh
+#
+# Copyright (C) 2018 rosysong@rosinson.com
+#
+
+. /lib/nft-qos/core.sh
+
+qosdef_monitor_get_ip_handle() { # <family> <chain> <ip>
+ echo $(nft list chain $1 nft-qos-monitor $2 -a 2>/dev/null | grep $3 | awk '{print $11}')
+}
+
+qosdef_monitor_add() { # <mac> <ip> <hostname>
+ handle_dl=$(qosdef_monitor_get_ip_handle $NFT_QOS_INET_FAMILY download $2)
+ [ -z "$handle_dl" ] && nft add rule $NFT_QOS_INET_FAMILY nft-qos-monitor download ip daddr $2 counter
+ handle_ul=$(qosdef_monitor_get_ip_handle $NFT_QOS_INET_FAMILY upload $2)
+ [ -z "$handle_ul" ] && nft add rule $NFT_QOS_INET_FAMILY nft-qos-monitor upload ip saddr $2 counter
+}
+
+qosdef_monitor_del() { # <mac> <ip> <hostname>
+ local handle_dl handle_ul
+ handle_dl=$(qosdef_monitor_get_ip_handle $NFT_QOS_INET_FAMILY download $2)
+ handle_ul=$(qosdef_monitor_get_ip_handle $NFT_QOS_INET_FAMILY upload $2)
+ [ -n "$handle_dl" ] && nft delete handle $handle_dl
+ [ -n "$handle_ul" ] && nft delete handle $handle_ul
+}
+
+# init qos monitor
+qosdef_init_monitor() {
+ local hook_ul="input" hook_dl="postrouting"
+
+ [ -z "$NFT_QOS_HAS_BRIDGE" ] && {
+ hook_ul="postrouting"
+ hook_dl="input"
+ }
+
+ nft add table $NFT_QOS_INET_FAMILY nft-qos-monitor
+ nft add chain $NFT_QOS_INET_FAMILY nft-qos-monitor upload { type filter hook $hook_ul priority 0\; }
+ nft add chain $NFT_QOS_INET_FAMILY nft-qos-monitor download { type filter hook $hook_dl priority 0\; }
+}
--- /dev/null
+#!/bin/sh
+#
+# Copyright (C) 2018 rosysong@rosinson.com
+#
+
+. /lib/functions/network.sh
+. /lib/nft-qos/core.sh
+
+P1=""; P2=""; P3=""; P4=""; P5=""; P6="";
+P7=""; P8=""; P9=""; P10=""; P11="";
+
+_qosdef_handle_protox() { # <priority> <rule>
+ case "$1" in
+ -400) P1="$P1""$2";;
+ -300) P2="$P2""$2";;
+ -225) P3="$P3""$2";;
+ -200) P4="$P4""$2";;
+ -150) P5="$P5""$2";;
+ -100) P6="$P6""$2";;
+ 0) P7="$P7""$2";;
+ 50) P8="$P8""$2";;
+ 100) P9="$P9""$2";;
+ 225) P10="$P10""$2";;
+ 300) P11="$P11""$2";;
+ esac
+}
+
+qosdef_handle_protox() { # <section>
+ local proto prio srv
+
+ config_get proto $1 'protocol'
+ config_get prio $1 'priority'
+ config_get srv $1 'service'
+
+ [ -z "$proto" -o \
+ -z "$prio" -o \
+ -z "$srv" ] && return
+
+ _qosdef_handle_protox $prio \
+ "\t\t$proto dport { $srv } accept\n"
+}
+
+qosdef_append_rule_protox() { # <section>
+ config_foreach qosdef_handle_protox $1
+ qosdef_appendx \
+ "${P1}${P2}${P3}${P4}${P5}${P6}${P7}${P8}${P9}${P10}${P11}"
+}
+
+qosdef_append_chain_priority() { # <name> <section> <device>
+ local name=$1 device=$3
+
+ qosdef_appendx "\tchain $name {\n"
+ qosdef_append_chain_ingress filter $device 0 accept
+ qosdef_append_rule_protox $2
+ qosdef_appendx "\t}\n"
+}
+
+qosdef_remove_priority() {
+ qosdef_remove_table netdev nft-qos-priority
+}
+
+# init traffic priority
+qosdef_init_priority() {
+ local priority_enable priority_netdev ifname="br-lan"
+
+ uci_validate_section nft-qos default default \
+ 'priority_enable:bool:0' \
+ 'priority_netdev:maxlength(8)'
+
+ [ $? -ne 0 ] && {
+ logger -t nft-qos-priority "validation failed"
+ return 1
+ }
+
+ [ $priority_enable -eq 0 ] && return 1
+
+ case "$priority_netdev" in
+ lan) [ "$(uci_get network.lan.type)" != "bridge" ] && {
+ network_get_device ifname "$priority_netdev" || \
+ ifname="$(uci_get network.lan.ifname)"
+ }
+ ;;
+ wan*) network_get_device ifname "$priority_netdev" || \
+ ifname="$(uci_get network.$priority_netdev.ifname)"
+ esac
+
+ qosdef_appendx "table netdev nft-qos-priority {\n"
+ qosdef_append_chain_priority filter priority $ifname
+ qosdef_appendx "}\n"
+}
--- /dev/null
+#!/bin/sh
+#
+# Copyright (C) 2018 rosysong@rosinson.com
+#
+
+. /lib/nft-qos/core.sh
+
+# append rule for static qos
+qosdef_append_rule_sta() { # <section> <operator> <default-unit> <default-rate>
+ local ipaddr unit rate
+ local operator=$2
+
+ config_get ipaddr $1 ipaddr
+ config_get unit $1 unit $3
+ config_get rate $1 rate $4
+
+ [ -z "$ipaddr" ] && return
+
+ qosdef_append_rule_ip_limit $ipaddr $operator $unit $rate
+}
+
+# append chain for static qos
+qosdef_append_chain_sta() { # <hook> <name> <section> <unit> <rate>
+ local hook=$1 name=$2
+ local config=$3 operator
+
+ case "$name" in
+ download) operator="daddr";;
+ upload) operator="saddr";;
+ esac
+
+ qosdef_appendx "\tchain $name {\n"
+ qosdef_append_chain_def filter $hook 0 accept
+ qosdef_append_rule_limit_whitelist $name
+ config_foreach qosdef_append_rule_sta $config $operator $4 $5
+ qosdef_appendx "\t}\n"
+}
+
+qosdef_flush_static() {
+ qosdef_flush_table "$NFT_QOS_INET_FAMILY" nft-qos-static
+}
+
+# static limit rate init
+qosdef_init_static() {
+ local unit_dl unit_ul rate_dl rate_ul
+ local limit_enable limit_type hook_ul="prerouting" hook_dl="postrouting"
+
+ uci_validate_section nft-qos default default \
+ 'limit_enable:bool:0' \
+ 'limit_type:maxlength(8)' \
+ 'static_unit_dl:string:kbytes' \
+ 'static_unit_ul:string:kbytes' \
+ 'static_rate_dl:uinteger:50' \
+ 'static_rate_ul:uinteger:50'
+
+ [ $? -ne 0 ] && {
+ logger -t nft-qos-static "validation failed"
+ return 1
+ }
+
+ [ $limit_enable -eq 0 -o \
+ $limit_type = "dynamic" ] && return 1
+
+ [ -z "$NFT_QOS_HAS_BRIDGE" ] && {
+ hook_ul="postrouting"
+ hook_dl="prerouting"
+ }
+
+ qosdef_appendx "table $NFT_QOS_INET_FAMILY nft-qos-static {\n"
+ qosdef_append_chain_sta $hook_ul upload upload $unit_ul $rate_ul
+ qosdef_append_chain_sta $hook_dl download download $unit_dl $rate_dl
+ qosdef_appendx "}\n"
+}
--- /dev/null
+#!/bin/sh
+#
+# Copyright 2018 rosysong@rosinson.com
+#
+
+. /lib/functions.sh
+. /lib/nft-qos/core.sh
+. /lib/nft-qos/dynamic.sh
+
+NFT_QOS_DYNAMIC_ON=
+
+qosdef_validate_section_dynamic() {
+ local limit_enable limit_type
+
+ uci_validate_section nft-qos default default \
+ 'limit_enable:bool:0' \
+ 'limit_type:maxlength(8)'
+
+ [ $limit_enable -eq 1 -a \
+ "$limit_type" = "dynamic" ] && \
+ NFT_QOS_DYNAMIC_ON="y"
+}
+
+
+logger -t nft-qos-dynamic "ACTION=$ACTION, MACADDR=$MACADDR, IPADDR=$IPADDR, HOSTNAME=$HOSTNAME"
+
+case "$ACTION" in
+ add | update | remove)
+ qosdef_validate_section_dynamic
+ [ -z "$NFT_QOS_DYNAMIC_ON" ] && return
+
+ qosdef_init_env
+ qosdef_flush_dynamic
+
+ qosdef_init_header
+ qosdef_init_dynamic
+ qosdef_init_done
+ qosdef_start
+ ;;
+esac
--- /dev/null
+#!/bin/sh
+#
+# Copyright 2018 rosysong@rosinson.com
+#
+
+. /lib/nft-qos/monitor.sh
+
+logger -t nft-qos-monitor "ACTION=$ACTION, MACADDR=$MACADDR, IPADDR=$IPADDR, HOSTNAME=$HOSTNAME"
+
+case "$ACTION" in
+ add | update) qosdef_init_env && qosdef_monitor_add $MACADDR $IPADDR $HOSTNAME;;
+ remove) qosdef_init_env && qosdef_monitor_del $MACADDR $IPADDR $HOSTNAME;;
+esac
--- /dev/null
+#
+# Copyright (C) 2018 rosysong@rosinson.com
+#
+# This is the sample for nft-qos configuration file,
+# which will generate a nftables script in /tmp/qos.nft
+#
+
+# Getting Started
+# Official site :
+# https://netfilter.org/projects/nftables/index.html
+# What is nftables :
+# https://wiki.nftables.org/wiki-nftables/index.php/Main_Page
+#
+
+# Basic Operations
+# Configuring Tables :
+# https://wiki.nftables.org/wiki-nftables/index.php/Configuring_tables
+# Configuring Chains :
+# https://wiki.nftables.org/wiki-nftables/index.php/Configuring_chains
+# Configuring Rules :
+# https://wiki.nftables.org/wiki-nftables/index.php/Simple_rule_management
+# Quick Reference (recommended) :
+# https://wiki.nftables.org/wiki-nftables/index.php/Quick_reference-nftables_in_10_minutes
+# https://netfilter.org/projects/nftables/manpage.html
+#
+
+config default default
+ # Enable Flag for limit rate
+ option limit_enable '1'
+
+ # Options for enable Static QoS (rate limit)
+ option limit_type 'static'
+ # Options for Static QoS (rate limit)
+ option static_unit_dl 'kbytes'
+ option static_unit_ul 'kbytes'
+ option static_rate_dl '50'
+ option static_rate_ul '50'
+
+ # Options for enable Dynamic QoS
+ # This option can not compatible with Static QoS
+ # option limit_type 'dynamic'
+
+ # For Dynamic QoS Samples (unit of bandwidth is Mbps):
+ option dynamic_cidr '192.168.1.0/24'
+ option dynamic_cidr6 'AAAA:BBBB::1/64'
+ option dynamic_bw_up '100'
+ option dynamic_bw_down '100'
+
+ # White list for static/dynamic limit
+ # list limit_whitelist '192.168.1.225'
+ # list limit_whitelist '192.168.1.0/24'
+ # list limit_whitelist 'ABCD:CDEF::1/64'
+
+ # Options for Traffic Priority
+ option priority_enable '0'
+ option priority_netdev 'lan'
+
+
+#
+# For Static QoS Rate Limit Samples :
+#
+# For Download :
+#config download
+# option hostname 'My PC'
+# option unit 'kbytes'
+# option ipaddr '192.168.1.224'
+# option rate '128'
+#
+# For Upload :
+#config upload
+# option hostname 'office-pc'
+# option unit 'mbytes'
+# option ipaddr 'ABCD:FFED::1/64'
+# option rate '1024'
+#
+#
+# Traffic Priority Samples :
+#
+# protocol : tcp, udp, udplite, sctp, dccp, tcp is default
+# priority : integer between 1-11, 1 is default
+# service : you can input a integer or service name, e.g. '22', '11-22', 'telnet', 'ssh, http, ftp', etc
+#
+#config priority
+# option protocol 'tcp'
+# option priority '-400'
+# option service '23'
+# option comment '?'
+#
+#config priority
+# option protocol 'udp'
+# option priority '-400'
+# option service 'https'
+# option comment '?'
+#
+#config priority
+# option protocol 'dccp'
+# option priority '0'
+# option service '22-35'
+# option comment '?'
+#
+#config priority
+# option protocol 'dccp'
+# option priority '300'
+# option service 'ftp,ssh,http'
+# option comment '?'
+#
--- /dev/null
+#!/bin/sh /etc/rc.common
+#
+# Copyright (C) 2018 rosysong@rosinson.com
+#
+
+. /lib/nft-qos/core.sh
+. /lib/nft-qos/monitor.sh
+. /lib/nft-qos/dynamic.sh
+. /lib/nft-qos/static.sh
+. /lib/nft-qos/priority.sh
+
+START=99
+USE_PROCD=1
+
+service_triggers() {
+ procd_add_reload_trigger nft-qos
+}
+
+start_service() {
+ config_load nft-qos
+
+ qosdef_init_env
+ qosdef_flush_static
+ qosdef_flush_dynamic
+ qosdef_remove_priority
+
+ qosdef_init_header
+ qosdef_init_monitor
+ qosdef_init_dynamic
+ qosdef_init_static
+ qosdef_init_priority
+ qosdef_init_done
+ qosdef_start
+}
+
+stop_service() {
+ qosdef_flush_dynamic
+ qosdef_flush_static
+ qosdef_remove_priority
+ qosdef_clean_cache
+}
depends on NGINX_SSL
help
Add support for NGINX-based Media Streaming Server module.
+ DASH enhanced - https://github.com/ut0mt8/nginx-rtmp-module
default n
config NGINX_TS_MODULE
prompt "Enable RTMP module"
help
Add support for NGINX-based Media Streaming Server module.
+ DASH enhanced - https://github.com/ut0mt8/nginx-rtmp-module
default n
config NGINX_TS_MODULE
include $(TOPDIR)/rules.mk
PKG_NAME:=nginx
-PKG_VERSION:=1.15.2
-PKG_RELEASE:=1
+PKG_VERSION:=1.15.5
+PKG_RELEASE:=2
PKG_SOURCE:=nginx-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://nginx.org/download/
-PKG_HASH:=eeba09aecfbe8277ac33a5a2486ec2d6731739f3c1c701b42a0c3784af67ad90
+PKG_HASH:=1a3a889a8f14998286de3b14cc1dd5b2747178e012d6d480a18aa413985dae6f
PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de> \
Ansuel Smith <ansuelsmth@gmail.com>
TITLE:=Nginx web server
URL:=http://nginx.org/
DEPENDS:=+NGINX_PCRE:libpcre +(NGINX_SSL||NGINX_HTTP_CACHE||NGINX_HTTP_AUTH_BASIC):libopenssl \
- +NGINX_HTTP_GZIP:zlib +NGINX_LUA:liblua +libpthread
+ +NGINX_HTTP_GZIP:zlib +NGINX_LUA:liblua +libpthread +NGINX_DAV:libexpat
endef
define Package/nginx/description
define Package/nginx-all-module
$(Package/nginx/default)
TITLE += with ALL module selected
- DEPENDS:=+libpcre +libopenssl +zlib +liblua +libpthread
+ DEPENDS:=+libpcre +libopenssl +zlib +liblua +libpthread +libexpat
VARIANT:=all-module
PROVIDES:=nginx
endef
ADDITIONAL_MODULES += --with-http_flv_module
endif
ifeq ($(CONFIG_NGINX_DAV),y)
- ADDITIONAL_MODULES += --with-http_dav_module
+ ADDITIONAL_MODULES += --with-http_dav_module --add-module=$(PKG_BUILD_DIR)/nginx-dav-ext-module
endif
ifeq ($(CONFIG_NGINX_HTTP_AUTH_REQUEST),y)
ADDITIONAL_MODULES += --with-http_auth_request_module
CONFIG_NGINX_TS_MODULE:=y
CONFIG_NGINX_NAXSI:=y
CONFIG_NGINX_LUA:=y
+ CONFIG_NGINX_DAV:=y
ADDITIONAL_MODULES += --with-http_ssl_module --add-module=$(PKG_BUILD_DIR)/nginx-naxsi/naxsi_src \
--add-module=$(PKG_BUILD_DIR)/lua-nginx --with-ipv6 --with-http_stub_status_module --with-http_flv_module \
- --with-http_dav_module --with-http_auth_request_module --with-http_v2_module --with-http_realip_module \
+ --with-http_dav_module --add-module=$(PKG_BUILD_DIR)/nginx-dav-ext-module \
+ --with-http_auth_request_module --with-http_v2_module --with-http_realip_module \
--with-http_secure_link_module --with-http_sub_module --add-module=$(PKG_BUILD_DIR)/nginx-headers-more \
--add-module=$(PKG_BUILD_DIR)/nginx-brotli --add-module=$(PKG_BUILD_DIR)/nginx-rtmp \
--add-module=$(PKG_BUILD_DIR)/nginx-ts
$(Prepare/nginx-headers-more)
$(Prepare/nginx-rtmp)
$(Prepare/nginx-ts)
+ $(Prepare/nginx-dav-ext-module)
endef
ifeq ($(CONFIG_NGINX_RTMP_MODULE),y)
define Download/nginx-rtmp
- VERSION:=791b6136f02bc9613daf178723ac09f4df5a3bbf
+ VERSION:=c0e7c000ed860ef547a59ecf31f775db63f92b56
SUBDIR:=nginx-rtmp
FILE:=ngx-rtmp-module-$(PKG_VERSION)-$$(VERSION).tar.gz
- URL:=https://github.com/arut/nginx-rtmp-module.git
- MIRROR_HASH:=8db3f7b545ce98f47415e0436e12dfb55ae787afd3cd9515b5642c7b9dc0ef00
+ URL:=https://github.com/ut0mt8/nginx-rtmp-module.git
+ MIRROR_HASH:=ceb8264d920f3ce2fe96af97af824d6800095e3b3ff00e61f088bef9873f421e
PROTO:=git
endef
$(eval $(call Download,nginx-rtmp))
define Prepare/nginx-rtmp
- $(eval $(call Download,nginx-rtmp))
+ $(eval $(Download/nginx-rtmp))
gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
endef
endif
$(eval $(call Download,nginx-ts))
define Prepare/nginx-ts
- $(eval $(call Download,nginx-ts))
+ $(eval $(Download/nginx-ts))
gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
endef
endif
endef
endif
+
+ifeq ($(CONFIG_NGINX_DAV),y)
+ define Download/nginx-dav-ext-module
+ VERSION:=430fd774fe838a04f1a5defbf1dd571d42300cf9
+ SUBDIR:=nginx-dav-ext-module
+ FILE:=nginx-dav-ext-module-$(PKG_VERSION)-$$(VERSION).tar.gz
+ URL:=https://github.com/arut/nginx-dav-ext-module.git
+ MIRROR_HASH:=0566053a8756423ecab455fd9d218cec1e017598fcbb3d6415a06f816851611e
+ PROTO:=git
+ endef
+ $(eval $(call Download,nginx-dav-ext-module))
+
+ define Prepare/nginx-dav-ext-module
+ $(eval $(Download/nginx-dav-ext-module))
+ gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
+ endef
+endif
+
$(eval $(call BuildPackage,nginx))
$(eval $(call BuildPackage,nginx-ssl))
$(eval $(call BuildPackage,nginx-all-module))
expires 365d;
}
- location / {
- index index.html;
- include luci_uwsgi.conf;
- }
-
- location /luci-static {
-
- }
+ include luci_uwsgi.conf;
+
}
}
\ No newline at end of file
expires 365d;
}
- location / {
- index index.html;
- include luci_uwsgi.conf;
- }
-
- location /luci-static {
-
- }
+ include luci_uwsgi.conf;
+
}
}
\ No newline at end of file
-uwsgi_param QUERY_STRING $query_string;
-uwsgi_param REQUEST_METHOD $request_method;
-uwsgi_param CONTENT_TYPE $content_type;
-uwsgi_param CONTENT_LENGTH $content_length if_not_empty;
-uwsgi_param REQUEST_URI $request_uri;
-uwsgi_param PATH_INFO $document_uri;
-uwsgi_param SERVER_PROTOCOL $server_protocol;
-uwsgi_param REMOTE_ADDR $remote_addr;
-uwsgi_param REMOTE_PORT $remote_port;
-uwsgi_param SERVER_ADDR $server_addr;
-uwsgi_param SERVER_PORT $server_port;
-uwsgi_param SERVER_NAME $server_name;
-uwsgi_modifier1 9;
-uwsgi_pass unix:////var/run/uwsgi.sock;
\ No newline at end of file
+location /cgi-bin/luci {
+ index index.html;
+ uwsgi_param QUERY_STRING $query_string;
+ uwsgi_param REQUEST_METHOD $request_method;
+ uwsgi_param CONTENT_TYPE $content_type;
+ uwsgi_param CONTENT_LENGTH $content_length if_not_empty;
+ uwsgi_param REQUEST_URI $request_uri;
+ uwsgi_param PATH_INFO $document_uri;
+ uwsgi_param SERVER_PROTOCOL $server_protocol;
+ uwsgi_param REMOTE_ADDR $remote_addr;
+ uwsgi_param REMOTE_PORT $remote_port;
+ uwsgi_param SERVER_ADDR $server_addr;
+ uwsgi_param SERVER_PORT $server_port;
+ uwsgi_param SERVER_NAME $server_name;
+ uwsgi_modifier1 9;
+ uwsgi_pass unix:////var/run/uwsgi.sock;
+}
+
+location /luci-static {
+}
\ No newline at end of file
include $(TOPDIR)/rules.mk
PKG_NAME:=nlbwmon
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/jow-/nlbwmon.git
USE_PROCD=1
NAME=nlbwmon
PROG=/usr/sbin/nlbwmon
+NICEPRIO=19
add_subnet() {
local network="$1"
procd_open_instance
procd_set_param stderr 1
procd_set_param command "$PROG"
+ procd_set_param nice "$NICEPRIO"
config_load nlbwmon
config_foreach parse_config nlbwmon
procd_close_instance
}
+add_interface_trigger() {
+ local interface ignore
+
+ config_get interface "$1" interface
+ config_get_bool ignore "$1" ignore 0
+
+ [ -n "$interface" -a $ignore -eq 0 ] && procd_add_interface_trigger "interface.*" "$interface" /etc/init.d/nlbwmon reload
+}
+
+service_triggers() {
+ procd_add_reload_trigger "dhcp" "system"
+
+ config_load dhcp
+ config_foreach add_interface_trigger dhcp
+}
+
include $(TOPDIR)/rules.mk
PKG_NAME:=ntpclient
-PKG_VERSION:=2010_365
+PKG_VERSION:=2015_365
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://doolittle.icarus.com/ntpclient/
-PKG_HASH:=9ad9b028385082fb804167f464e2db0a0b3d33780acd399327e64898b8fcfddd
+PKG_SOURCE_URL:=http://doolittle.icarus.com/ntpclient
+PKG_HASH:=95c3646919a9a2278fa384aa8e37117b250577ff8b09b8c93ba53e04e729b54b
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
PKG_LICENSE:=GPL-2.0
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-2010
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-2015
include $(INCLUDE_DIR)/package.mk
--- a/ntpclient.c
+++ b/ntpclient.c
-@@ -611,7 +611,7 @@ int main(int argc, char *argv[]) {
+@@ -608,7 +608,7 @@ int main(int argc, char *argv[]) {
ntpc.cross_check=1;
for (;;) {
if (c == EOF) break;
switch (c) {
case 'c':
-@@ -660,6 +660,10 @@ int main(int argc, char *argv[]) {
- (ntpc.cross_check)=0;
+@@ -657,6 +657,10 @@ int main(int argc, char *argv[]) {
+ ntpc.cross_check = 0;
break;
+ case 'D':
include $(TOPDIR)/rules.mk
PKG_NAME:=ntp
-PKG_VERSION:=4.2.8p11
+PKG_VERSION:=4.2.8p12
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/
-PKG_HASH:=f14a39f753688252d683ff907035ffff106ba8d3db21309b742e09b5c3cd278e
+PKG_HASH:=709b222b5013d77d26bfff532b5ea470a8039497ef29d09363931c036cb30454
PKG_LICENSE:=Unique
PKG_LICENSE_FILES:=COPYRIGHT html/copyright.html
PKG_FIXUP:=autoreconf
PKG_LIBTOOL_PATHS:=. sntp
PKG_CHECK_FORMAT_SECURITY:=0
+PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
PKG_NAME:=ntripcaster
PKG_VERSION:=0.1.5
+PKG_RELEASE:=2
-PKG_RELEASE=$(PKG_SOURCE_VERSION)
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/nunojpg/ntripcaster.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=03878920195cf854b38a1ea424f1cae57353fa87
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=264656e5f9f9583c477208f005371124bfcbb7ba548f418eb5f1215059d1294b
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/nunojpg/ntripcaster/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=2184af9821cf73bac1df229f1e61ca1d3e288c9de6087bee1ae218b54c588452
PKG_LICENSE:=GPL-2.0+
CATEGORY:=Network
SUBMENU:=NTRIP
TITLE:=Standard Ntrip Broadcaster
- URL:=http://igs.bkg.bund.de/ntrip/download
+ URL:=https://igs.bkg.bund.de/ntrip
DEPENDS:=+libpthread
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=ntripclient
-PKG_VERSION:=1.5.0
+PKG_VERSION:=1.51
+PKG_RELEASE:=1
-PKG_RELEASE=$(PKG_SOURCE_VERSION)
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/nunojpg/ntripclient.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=dcfb2cb3e6f31b7291a94e7f86379c78ffc0d44e
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=8d16f2bd0295a2e77fe8651e5f973c3ca4cf0d62fc4d671ebb54cfa8dc7debd0
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/nunojpg/ntripclient/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=d668e87b2260ef262e2066ac0ed217ec77478170deaf76ff48f2116a23c48ae5
PKG_LICENSE:=GPL-2.0+
include $(TOPDIR)/rules.mk
PKG_NAME:=ntripserver
-PKG_VERSION:=1.5.1
+PKG_VERSION:=1.51
+PKG_RELEASE:=1
-PKG_RELEASE=$(PKG_SOURCE_VERSION)
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/nunojpg/ntripserver.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=c3034ab575e8442222eb8c2ee9e224cac99cfa6d
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=71f168c4b41c9e1063280fc8aa21d8794c064708fbfa4929093ef5a139e2e736
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/nunojpg/ntripserver/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=3878c13d1b56e14085ce995565a2113aa592e3aa0b0eacfc65b6e3f5bdfc07e7
PKG_LICENSE:=GPL-2.0+
PKG_NAME:=nut
PKG_VERSION:=2.7.4
-PKG_RELEASE:=7
+PKG_RELEASE:=8
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.networkupstools.org/source/2.7/
PKG_HASH:=980e82918c52d364605c0703a5dcf01f74ad2ef06e3d365949e43b7d406d25a7
PKG_MAINTAINER:=Daniel Dickinson <cshored@thecshore.com>
-PKG_LICENSE:=GPL-2.0
-PKG_LICENSE_FILES:=LICENSE-GPL2
+PKG_LICENSE:=GPL-2.0+ GPL-3.0+ GPL-1.0+ Artistic-1.0-Perl
+PKG_LICENSE_FILES:=LICENSE-GPL2 LICENSE-GPL3 COPYING
PKG_FIXUP:=autoreconf
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
endef
define Package/nut-server/install
+ # Server portion
$(INSTALL_DIR) $(1)/etc/nut
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/usr/share/nut
- $(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/nut-server.init $(1)/etc/init.d/nut-server
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/upsd $(1)/usr/sbin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/upsdrvctl $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/nut/cmdvartab $(1)/usr/share/nut/
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/nut/driver.list $(1)/usr/share/nut/
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/nut_server $(1)/etc/config/nut_server
- ln -sf /var/etc/nut/nut.conf $(1)/etc/nut/nut.conf
- ln -sf /var/etc/nut/ups.conf $(1)/etc/nut/ups.conf
ln -sf /var/etc/nut/upsd.users $(1)/etc/nut/upsd.users
ln -sf /var/etc/nut/upsd.conf $(1)/etc/nut/upsd.conf
+ # Driver common portion
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/upsdrvctl $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/nut/driver.list $(1)/usr/share/nut/
+ ln -sf /var/etc/nut/ups.conf $(1)/etc/nut/ups.conf
+ # Mangle libhid.usermap into a format (hotplug shell script) useful for OpenWrt
+ $(INSTALL_DIR) $(1)/etc/hotplug.d/usb
+ $(INSTALL_BIN) ./files/30-libhid-ups.head $(1)/etc/hotplug.d/usb/30-libhid-ups
+ $(CP) $(PKG_INSTALL_DIR)/etc/hotplug/usb/libhid.usermap $(PKG_BUILD_DIR)/30-libhid-ups.middle
+ $(SED) '/^$$$$/d' \
+ -e '/^#/d' \
+ -E -e 's:^[^ ][^ ]* *0x0003 *0x0{0,3}([^ ][^ ]*) *0x{0,3}*([^ ][^ ]*).*:\1/\2/* | \\:' \
+ $(PKG_BUILD_DIR)/30-libhid-ups.middle
+ tail -n+2 $(PKG_BUILD_DIR)/30-libhid-ups.middle >>$(1)/etc/hotplug.d/usb/30-libhid-ups
+ cat ./files/30-libhid-ups.tail >>$(1)/etc/hotplug.d/usb/30-libhid-ups
endef
define Package/nut-common
DEPENDS:= nut \
+NUT_DRIVER_SNMP:libnetsnmp \
+NUT_DRIVER_USB:libusb-compat \
- +NUT_SSL:libopenssl \
- +PACKAGE_libwrap:libwrap
+ +NUT_SSL:libopenssl
endef
define Package/nut-common/description
This package contains the common files.
endef
+define Package/nut-common/conffiles
+/etc/nut/nut.conf
+endef
+
define Package/nut-common/install
$(INSTALL_DIR) $(1)/etc/nut
$(INSTALL_DIR) $(1)/usr/lib
$(call Package/nut/Default)
TITLE+= (server)
DEPENDS:=nut +nut-common
+ USERID:=nut=113:nut=113
endef
define Package/nut-server/description
define Package/nut-server/conffiles
/etc/config/nut_server
+/etc/nut/upsd.conf
+/etc/nut/upsd.users
+/etc/nut/ups.conf
endef
define Package/nut-upsmon
$(call Package/nut/Default)
TITLE+= (monitor)
DEPENDS:=nut +nut-common
- USERID:=nut=113:nut=113
+ USERID:=nutmon=114:nutmon=114
endef
define Package/nut-upsmon/description
define Package/nut-upsmon/conffiles
/etc/config/nut_monitor
+/etc/nut/upsmon.conf
endef
define Package/nut-upsmon/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/nut-monitor.init $(1)/etc/init.d/nut-monitor
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/upsmon $(1)/usr/sbin/
+ $(INSTALL_BIN) ./files/nutshutdown $(1)/usr/sbin/nutshutdown
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/nut_monitor $(1)/etc/config/nut_monitor
ln -sf /var/etc/nut/upsmon.conf $(1)/etc/nut/upsmon.conf
$(call Package/nut/description/Default)
upsc is provided as a quick way to poll the status of a UPS server. It
can be used inside shell scripts and other programs that need UPS data
-but don not want to include the full interface.
+but do not want to include the full interface.
endef
define Package/nut-upsc/install
$(INSTALL_CONF) ./files/add_nut_httpd_conf $(1)/etc/uci-defaults/add_nut_httpd_conf
$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/nut/upsstats.html.sample $(1)/etc/nut/upsstats.html
$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/nut/upsstats-single.html.sample $(1)/etc/nut/upsstats-single.html
- $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/nut/upsset.conf.sample $(1)/etc/nut/upsset.conf
+ $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/nut/upsset.conf.sample $(1)/etc/nut/upsset.conf.disable
+ $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/nut/upsset.conf.sample $(1)/etc/nut/upsset.conf.enable
+ $(SED) 's/### \?//' $(1)/etc/nut/upsset.conf.enable
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/nut_cgi $(1)/etc/config/nut_cgi
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/nut-cgi.init $(1)/etc/init.d/nut-cgi
ln -sf /var/etc/nut/hosts.conf $(1)/etc/nut/hosts.conf
+ ln -sf /var/etc/nut/upsset.conf $(1)/etc/nut/upsset.conf
endef
define Package/nut-avahi-service
define Package/nut-driver-$(2)
$(call Package/nut/Default)
TITLE:=$(2) (NUT $(1) driver)
- DEPENDS:=nut +nut-common
+ DEPENDS:=nut +nut-server
$(if $(filter $(1),snmp),DEPENDS+= @NUT_DRIVER_SNMP)
$(if $(filter $(1),usb),DEPENDS+= @NUT_DRIVER_USB)
$(if $(filter $(1),serial),DEPENDS+= @NUT_DRIVER_SERIAL)
--without-avahi \
--$(if $(CONFIG_NUT_DRIVER_SNMP),with,without)-snmp \
--$(if $(CONFIG_NUT_DRIVER_SERIAL),with,without)-serial \
+ --without-doc \
--without-neon \
--without-powerman \
--without-wrap \
+ --with-hotplug-dir=/etc/hotplug \
--with-cgi \
--without-ipmi \
--without-freeipmi \
--- /dev/null
+#!/bin/sh
+
+. /lib/functions.sh
+
+nut_driver_config() {
+ local cfg="$1"
+ local nomatch="$2"
+
+ config_get runas "$cfg" runas "nut"
+ config_get vendorid "$cfg" vendorid
+ config_get productid "$cfg" productid
+
+ [ "$ACTION" = "add" ] &&[ -n "$DEVNAME" ] && {
+ chmod 0660 /dev/"$DEVNAME"
+ chown ${runas:-root}:$(id -gn "${runas:-root}") /dev/"$DEVNAME"
+ }
+
+ if [ "$(printf "%04x" 0x"$pvendid")" = "$vendorid" ] && \
+ [ "$(printf "%04x" 0x"$pprodid")" = "$productid" ]; then
+ [ "$ACTION" = "add" ] && {
+ /etc/init.d/nut-server start "$cfg"
+ }
+ [ "$ACTION" = "remove" ] && {
+ /etc/init.d/nut-server stop "$cfg"
+ }
+ found=1
+ elif [ "$nomatch" = "1" ]; then
+ [ "$ACTION" = "add" ] && {
+ /etc/init.d/nut-server start "$cfg"
+ }
+ [ "$ACTION" = "remove" ] && {
+ /etc/init.d/nut-server stop "$cfg"
+ }
+ fi
+}
+
+perform_libhid_action() {
+ local vendorid productid runas
+ local pvendid pprodid found
+
+ pvendid=${PRODUCT%/*}
+ pvendid=${pvendid%/*}
+ pprodid=${PRODUCT%/*}
+ pprodid=${pprodid##*/}
+
+ config_load nut_server
+ config_foreach nut_driver_config driver 0
+ [ "$found" != "1" ] && config_foreach nut_driver_config driver 1
+}
+
+[ -n "$PRODUCT" ] && case "$PRODUCT" in
--- /dev/null
+"")
+ [ -d /var/run/nut ] && [ ! -f /var/run/nut/disable-hotplug ] && \
+ /etc/init.d/nut-server enabled && perform_libhid_action
+ ;;
+esac
# See /LICENSE for more information.
#
START=51
+USE_PROCD=1
DEFAULT=/etc/default/nut
UPSCGI_C=/var/etc/nut/hosts.conf
+UPSCGI_S=/var/etc/nut/upsset.conf
+
+nut_upscgi_upsset() {
+ local cfg="$1"
+ local enable
+
+ config_get_bool enable "$cfg" enable 0
+
+ [ $enable -eq 1 ] && {
+ ln -sf /etc/nut/upsset.conf.enable "$UPSCGI_S"
+ } || {
+ ln -sf /etc/nut/upsset.conf.disable "$UPSCGI_S"
+ }
+}
nut_upscgi_add() {
local cfg="$1"
system="$system:$port";
fi
config_get displayname "$cfg" displayname
- echo "MONITOR $system \"$displayname\"" >> $UPSCGI_C
+ echo "MONITOR $system \"$displayname\"" >> "$UPSCGI_C"
}
-start() {
- rm -f $UPSCGI_C
+service_reload() {
+ mkdir -m 0755 -p "$(dirname "$UPSCGI_C")"
+ rm -f "$UPSCGI_C"
+ rm -f "$UPSCGI_S"
config_load nut_cgi
config_foreach nut_upscgi_add host
+ config_foreach nut_upscgi_upsset upsset
chmod 640 /var/etc/nut/hosts.conf
}
-stop() {
- rm -f $UPSCGI_C
+start_service() {
+ service_reload
+}
+
+stop_service() {
+ rm -f "$UPSCGI_C"
+ rm -f "$UPSCGI_S"
+ ln -sf /etc/nut/upsset.conf.disable "$UPSCGI_S"
}
+service_triggers() {
+ procd_add_reload_trigger "nut_cgi"
+}
nut_upsmon_conf() {
local cfg="$1"
+ local RUNAS val optval
- echo "# Config file automatically generated from UCI config" > $UPSMON_C
+ echo "# Config file automatically generated from UCI config" > "$UPSMON_C"
- config_get runas "$cfg" runas "nut"
- [ -n "$runas" ] && echo "RUN_AS_USER $runas" >> $UPSMON_C
+ config_get RUNAS "$cfg" runas "nutmon"
+ [ -n "$RUNAS" ] && echo "RUN_AS_USER $RUNAS" >> "$UPSMON_C"
+ runas=$RUNAS
config_get val "$cfg" minsupplies 1
- echo "MINSUPPLIES $val" >> $UPSMON_C
+ echo "MINSUPPLIES $val" >> "$UPSMON_C"
- config_get val "$cfg" shutdowncmd "/sbin/halt"
- echo "SHUTDOWNCMD \"$val\"" >> $UPSMON_C
+ config_get val "$cfg" shutdowncmd "/usr/sbin/nutshutdown"
+ echo "SHUTDOWNCMD \"$val\"" >> "$UPSMON_C"
config_get val "$cfg" notifycmd
- [ -n "$val" ] && echo "NOTIFYCMD \"$val\"" >> $UPSMON_C
+ [ -n "$val" ] && echo "NOTIFYCMD \"$val\"" >> "$UPSMON_C"
config_get val "$cfg" pollfreq 5
- echo "POLLFREQ $val" >> $UPSMON_C
+ echo "POLLFREQ $val" >> "$UPSMON_C"
config_get val "$cfg" pollfreqalert 5
- echo "POLLFREQALERT $val" >> $UPSMON_C
+ echo "POLLFREQALERT $val" >> "$UPSMON_C"
config_get val "$cfg" hostsync 15
- echo "HOSTSYNC $val" >> $UPSMON_C
+ echo "HOSTSYNC $val" >> "$UPSMON_C"
config_get val "$cfg" deadtime 15
- echo "DEADTIME $val" >> $UPSMON_C
+ echo "DEADTIME $val" >> "$UPSMON_C"
- config_get val "$cfg" powerdownflag /var/run/killpower
- echo "POWERDOWNFLAG $val" >> $UPSMON_C
+ echo "POWERDOWNFLAG /var/run/killpower" >> "$UPSMON_C"
config_get val "$cfg" onlinemsg
- [ -n "$val" ] && echo "NOTIFYMSG ONLINE \"$val\"" >> $UPSMON_C
+ [ -n "$val" ] && echo "NOTIFYMSG ONLINE \"$val\"" >> "$UPSMON_C"
config_get val "$cfg" onbattmsg
- [ -n "$val" ] && echo "NOTIFYMSG ONBATT \"$val\"" >> $UPSMON_C
+ [ -n "$val" ] && echo "NOTIFYMSG ONBATT \"$val\"" >> "$UPSMON_C"
config_get val "$cfg" lowbattmsg
- [ -n "$val" ] && echo "NOTIFYMSG LOWBATT \"$val\"" >> $UPSMON_C
+ [ -n "$val" ] && echo "NOTIFYMSG LOWBATT \"$val\"" >> "$UPSMON_C"
config_get val "$cfg" fsdmsg
- [ -n "$val" ] && echo "NOTIFYMSG FSD \"$val\"" >> $UPSMON_C
+ [ -n "$val" ] && echo "NOTIFYMSG FSD \"$val\"" >> "$UPSMON_C"
config_get val "$cfg" commokmsg
- [ -n "$val" ] && echo "NOTIFYMSG COMMOK \"$val\"" >> $UPSMON_C
+ [ -n "$val" ] && echo "NOTIFYMSG COMMOK \"$val\"" >> "$UPSMON_C"
config_get val "$cfg" commbadmsg
- [ -n "$val" ] && echo "NOTIFYMSG COMMBAD \"$val\"" >> $UPSMON_C
+ [ -n "$val" ] && echo "NOTIFYMSG COMMBAD \"$val\"" >> "$UPSMON_C"
config_get val "$cfg" shutdownmsg
- [ -n "$val" ] && echo "NOTIFYMSG SHUTDOWN \"$val\"" >> $UPSMON_C
+ [ -n "$val" ] && echo "NOTIFYMSG SHUTDOWN \"$val\"" >> "$UPSMON_C"
config_get val "$cfg" replbattmsg
- [ -n "$val" ] && echo "NOTIFYMSG REPLBATT \"$val\"" >> $UPSMON_C
+ [ -n "$val" ] && echo "NOTIFYMSG REPLBATT \"$val\"" >> "$UPSMON_C"
config_get val "$cfg" nocommmsg
- [ -n "$val" ] && echo "NOTIFYMSG NOCOMM \"$val\"" >> $UPSMON_C
+ [ -n "$val" ] && echo "NOTIFYMSG NOCOMM \"$val\"" >> "$UPSMON_C"
config_get val "$cfg" noparentmsg
- [ -n "$val" ] && echo "NOTIFYMSG NOPARENT \"$val\"" >> $UPSMON_C
+ [ -n "$val" ] && echo "NOTIFYMSG NOPARENT \"$val\"" >> "$UPSMON_C"
notifylist() {
local value="$1"
val=""
config_list_foreach "$cfg" defaultnotify notifylist
default="$optval"
- echo "NOTIFYFLAG ONLINE $(setnotify "$cfg" onlinenotify)" >> $UPSMON_C
- echo "NOTIFYFLAG ONBATT $(setnotify "$cfg" onbattnotify)" >> $UPSMON_C
- echo "NOTIFYFLAG LOWBATT $(setnotify "$cfg" lowbatnotify)" >> $UPSMON_C
- echo "NOTIFYFLAG FSD $(setnotify "$cfg" fsdnotify)" >> $UPSMON_C
- echo "NOTIFYFLAG COMMOK $(setnotify "$cfg" commoknotify)" >> $UPSMON_C
- echo "NOTIFYFLAG COMMBAD $(setnotify "$cfg" commbadnotify)" >> $UPSMON_C
- echo "NOTIFYFLAG SHUTDOWN $(setnotify "$cfg" shutdownnotify)" >> $UPSMON_C
- echo "NOTIFYFLAG REPLBATT $(setnotify "$cfg" repolbattnotify)" >> $UPSMON_C
- echo "NOTIFYFLAG NOCOMM $(setnotify "$cfg" nocommnotify)" >> $UPSMON_C
- echo "NOTIFYFLAG NOPARENT $(setnotify "$cfg" noparentnotify)" >> $UPSMON_C
+ echo "NOTIFYFLAG ONLINE $(setnotify "$cfg" onlinenotify)" >> "$UPSMON_C"
+ echo "NOTIFYFLAG ONBATT $(setnotify "$cfg" onbattnotify)" >> "$UPSMON_C"
+ echo "NOTIFYFLAG LOWBATT $(setnotify "$cfg" lowbatnotify)" >> "$UPSMON_C"
+ echo "NOTIFYFLAG FSD $(setnotify "$cfg" fsdnotify)" >> "$UPSMON_C"
+ echo "NOTIFYFLAG COMMOK $(setnotify "$cfg" commoknotify)" >> "$UPSMON_C"
+ echo "NOTIFYFLAG COMMBAD $(setnotify "$cfg" commbadnotify)" >> "$UPSMON_C"
+ echo "NOTIFYFLAG SHUTDOWN $(setnotify "$cfg" shutdownnotify)" >> "$UPSMON_C"
+ echo "NOTIFYFLAG REPLBATT $(setnotify "$cfg" repolbattnotify)" >> "$UPSMON_C"
+ echo "NOTIFYFLAG NOCOMM $(setnotify "$cfg" nocommnotify)" >> "$UPSMON_C"
+ echo "NOTIFYFLAG NOPARENT $(setnotify "$cfg" noparentnotify)" >> "$UPSMON_C"
config_get val "$cfg" rbwarntime 43200
- echo "RBWARNTIME $val" >> $UPSMON_C
+ echo "RBWARNTIME $val" >> "$UPSMON_C"
config_get val "$cfg" nocommwarntime 300
- echo "NOCOMMWARNTIME $val" >> $UPSMON_C
+ echo "NOCOMMWARNTIME $val" >> "$UPSMON_C"
config_get val "$cfg" finaldelay 5
- echo "FINALDELAY $val" >> $UPSMON_C
+ echo "FINALDELAY $val" >> "$UPSMON_C"
config_get val "$cfg" certpath
- if [ -n "$val" ]; then echo "CERTPATH $val" >> $UPSMON_C; fi
+ if [ -n "$val" ]; then echo "CERTPATH $val" >> "$UPSMON_C"; fi
config_get_bool val "$cfg" certverify 0
- if [ -n "$val" ]; then echo "CERTVERIFY $val" >> $UPSMON_C; fi
+ if [ -n "$val" ]; then echo "CERTVERIFY $val" >> "$UPSMON_C"; fi
config_get_bool val "$cfg" forcessl 0
- if [ -n "$val" ]; then echo "FORCESSL $val" >> $UPSMON_C; fi
+ if [ -n "$val" ]; then echo "FORCESSL $val" >> "$UPSMON_C"; fi
}
nut_upsmon_add() {
local password
local system
- # if UPSMON_C is a symlink we're only doing generated config
- [ -L $UPSMON_C ] && {
- rm -f $UPSMON_C
- nut_upsmon_conf ""
- }
-
config_get upsname "$cfg" upsname
config_get hostname "$cfg" hostname localhost
config_get port "$cfg" port
if [ -n "$port" ]; then
system="$system:$port";
fi
- echo "MONITOR $system $powervalue $username $password $type" >> $UPSMON_C
+ echo "MONITOR $system $powervalue $username $password $type" >> "$UPSMON_C"
}
-start_service() {
- mkdir -p "$(dirname "$UPSMON_C")"
- chmod 750 "$(dirname "$UPSMON_C")"
+build_config() {
+ local runas
+ mkdir -m 0750 -p "$(dirname "$UPSMON_C")"
config_load nut_monitor
-
config_foreach nut_upsmon_conf upsmon
config_foreach nut_upsmon_add master master
config_foreach nut_upsmon_add slave slave
- [ -z "$(cat /var/etc/nut/nut.conf)" ] && echo "MODE=netclient" >>/var/etc/nut/nut.conf
-
- chmod 640 $UPSMON_C
- chmod 640 /var/etc/nut/nut.conf
-
- chown ${runas:-root}:$(id -gn ${runas:-root}) /var/etc/nut
- chown ${runas:-root}:$(id -gn ${runas:-root}) /var/etc/nut/nut.conf
- chown ${runas:-root}:$(id -gn ${runas:-root}) $UPSMON_C
-
- [ -d /var/run/nut ] || {
- mkdir -m 0750 -p /var/run/nut
- chown ${runas:-root}:$(id -gn ${runas:-root}) /var/run/nut
+ [ -z "$(cat /var/etc/nut/nut.conf)" ] && {
+ echo "MODE=netclient" >>/var/etc/nut/nut.conf
+ chmod 640 /var/etc/nut/nut.conf
+ chgrp $(id -gn ${runas:-root}) /var/etc/nut/nut.conf
}
- exec $DEBUG /usr/sbin/upsmon $UPSMON_OPTIONS
+ chmod 640 "$UPSMON_C"
+ chgrp $(id -gn ${runas:-root}) "$UPSMON_C"
}
-stop_service() {
- exec /usr/sbin/upsmon -c stop
+start_service() {
+ build_config
+ procd_open_instance
+ procd_set_param respawn
+ procd_set_param stderr 0
+ procd_set_param stdout 1
+ procd_set_param command /usr/sbin/upsmon -D
+ procd_close_instance
}
reload_service() {
- exec /usr/sbin/upsmon -c reload
+ if pgrep upsmon >/dev/null 2>/dev/null; then
+ build_config
+ upsmon -c reload
+ else
+ stop
+ sleep 1
+ start
+ fi
+}
+
+service_triggers() {
+ procd_add_reload_trigger nut_monitor
}
#
START=50
-RUN_D=/var/run
-PID_F=$RUN_D/upsd.pid
-UPS_C=/var/etc/nut/ups.conf
USERS_C=/var/etc/nut/upsd.users
UPSD_C=/var/etc/nut/upsd.conf
+UPS_C=/var/etc/nut/ups.conf
USE_PROCD=1
-listen_address() {
- local cfg="$1"
+get_write_driver_config() {
+ local cfg="$1"
+ local var="$2"
+ local def="$3"
+ local flag="$4"
+ local val
- config_get address "$cfg" address "::1"
- config_get port "$cfg" port
- echo "LISTEN $address $port" >>$UPSD_C
+ [ -z "$flag" ] && {
+ config_get val "$cfg" "$var" "$def"
+ [ -n "$val" ] && [ "$val" != "0" ] && echo "$var = $val" >>"$UPS_C"
+ }
+
+ [ -n "$flag" ] && {
+ config_get_bool val "$cfg" "$var" "$def"
+ [ "$val" = 1 ] && echo "$var" >>"$UPS_C"
+ }
}
upsd_statepath() {
+ local cfg="$1"
+ local statepath
+
+ config_get statepath "$cfg" statepath "/var/run/nut"
+ STATEPATH="$statepath"
+}
+
+listen_address() {
local cfg="$1"
- config_get statepath "$cfg" statepath
+
+ config_get address "$cfg" address "::1"
+ config_get port "$cfg" port
+ echo "LISTEN $address $port" >>"$UPSD_C"
}
upsd_config() {
local cfg="$1"
- local maxage maxconn certfile
+ local maxage maxconn certfile runas statepath
# Note runas support requires you make sure USB device file is readable by
# the runas user
- config_get runas "$cfg" runas
+ config_get runas "$cfg" runas "nut"
+ RUNAS="$runas"
+
+ config_get statepath "$cfg" statepath "/var/run/nut"
+ STATEPATH="$statepath"
config_get maxage "$cfg" maxage
- [ -n "$maxage" ] && echo "MAXAGE $maxage" >>$UPSD_C
+ [ -n "$maxage" ] && echo "MAXAGE $maxage" >>"$UPSD_C"
config_get statepath "$cfg" statepath
- [ -n "$statepath" ] && echo "STATEPATH $statepath" >>$UPSD_C
+ [ -n "$statepath" ] && echo "STATEPATH $statepath" >>"$UPSD_C"
config_get maxconn "$cfg" maxconn
- [ -n "$maxconn" ] && echo "MAXCONN $maxconn" >>$UPSD_C
+ [ -n "$maxconn" ] && echo "MAXCONN $maxconn" >>"$UPSD_C"
#NOTE: certs only apply to SSL-enabled version
config_get certfile "$cfg" certfile
- [ -n "$certfile" ] && echo "CERTFILE $certfile" >>$UPSD_C
+ [ -n "$certfile" ] && echo "CERTFILE $certfile" >>"$UPSD_C"
}
nut_user_add() {
local val
config_get val "$cfg" username "$1"
- echo "[$val]" >> $USERS_C
+ echo "[$val]" >> "$USERS_C"
config_get val "$cfg" password
- echo " password = $val" >> $USERS_C
+ echo " password = $val" >> "$USERS_C"
config_get val "$cfg" actions
for a in $val; do
- echo " actions = $a" >> $USERS_C
+ echo " actions = $a" >> "$USERS_C"
done
instcmd() {
local val="$1"
- echo " instcmds = $val" >> $USERS_C
+ echo " instcmds = $val" >> "$USERS_C"
}
config_list_foreach "$cfg" instcmd instcmd
config_get val "$cfg" upsmon
if [ -n "$val" ]; then
- echo " upsmon $val" >> $USERS_C
+ echo " upsmon $val" >> "$USERS_C"
fi
}
-start_service() {
- local runas statepath
-
- mkdir -p /var/etc/nut
- chmod -R 750 /var/etc/nut
-
- rm -f $UPSD_C
- rm -f $USERS_C
- rm -f $UPSD_C
+build_server_config() {
+ mkdir -m 0755 -p "$(dirname "$UPSD_C")"
+ rm -f "$USERS_C"
+ rm -f "$UPSD_C"
rm -f /var/etc/nut/nut.conf
- echo "# Config file automatically generated from UCI config" > $UPS_C
- echo "# Config file automatically generated from UCI config" > $USERS_C
- echo "# Config file automatically generated from UCI config" > $UPSD_C
-
- local in_driver have_drivers
- config_cb() {
- if [ "$1" != "driver" ]; then
- in_driver=
- else
- echo "[$2]" >> $UPS_C
- in_driver=true
- have_drivers=true
- fi
- }
- option_cb() {
- if [ "$in_driver" = "true" ]; then
- echo " $1 = $2" >> $UPS_C
- fi
- }
-
- config_load nut_server
+ echo "# Config file automatically generated from UCI config" > "$USERS_C"
+ echo "# Config file automatically generated from UCI config" > "$UPSD_C"
config_foreach nut_user_add user
- config_foreach upsd_config upsd
config_foreach listen_address listen_address
-
+ config_foreach upsd_config upsd
echo "MODE=netserver" >>/var/etc/nut/nut.conf
- chmod 0640 $USERS_C
- chmod 0640 $UPS_C
- chmod 0640 $UPSD_C
+ chmod 0640 "$USERS_C"
+ chmod 0640 "$UPSD_C"
chmod 0640 /var/etc/nut/nut.conf
- [ -d "${statepath:-/var/run/nut}" ] || {
- mkdir -m 0750 -p "${statepath:-/var/run/nut}"
- chown $runas:$(id -gn $runas) "${statepath:-/var/run/nut}"
+
+ [ -d "${STATEPATH}" ] || {
+ mkdir -m 0750 -p "${STATEPATH}"
}
- if [ -n "$runas" ]; then
- chown -R $runas:$(id -gn $runas) /var/etc/nut
+ if [ -n "$RUNAS" ]; then
+ chown $RUNAS:$(id -gn $RUNAS) "${STATEPATH}"
+ chgrp $(id -gn $RUNAS) "$USERS_C"
+ chgrp $(id -gn $RUNAS) "$UPSD_C"
fi
+}
- if [ "$have_drivers" = "true" ]; then
- $DEBUG /usr/sbin/upsd ${runas:+-u $runas} $OPTIONS
- $DEBUG /usr/sbin/upsdrvctl ${runas:+-u $runas} start
- fi
+build_driver_config() {
+ local cfg="$1"
+ local runas
+
+ echo "[$cfg]" >>"$UPS_C"
+
+ config_get runas "$cfg" runas "nut"
+ RUNAS="$runas"
+
+ get_write_driver_config "$cfg" driver "usbhid-ups"
+ get_write_driver_config "$cfg" port "auto"
+ get_write_driver_config "$cfg" mfr
+ get_write_driver_config "$cfg" model
+ get_write_driver_config "$cfg" serial
+ get_write_driver_config "$cfg" sdtime
+ get_write_driver_config "$cfg" offdelay 20
+ get_write_driver_config "$cfg" ondelay 30
+ get_write_driver_config "$cfg" pollfreq 30
+ get_write_driver_config "$cfg" vendor
+ get_write_driver_config "$cfg" product
+ get_write_driver_config "$cfg" bus
+ get_write_driver_config "$cfg" interruptonly 0 1
+ get_write_driver_config "$cfg" interruptsize 0
+ get_write_driver_config "$cfg" maxreport
+ get_write_driver_config "$cfg" vendorid
+ get_write_driver_config "$cfg" productid
+ get_write_driver_config "$cfg" community
+ get_write_driver_config "$cfg" snmp_version
+ get_write_driver_config "$cfg" snmp_retries 0
+ get_write_driver_config "$cfg" snmp_timeout 0
+ get_write_driver_config "$cfg" notransferoids 0 1
+ get_write_driver_config "$cfg" other
+ echo "" >>$UPS_C
}
+build_config() {
+ mkdir -m 0755 -p "$(dirname "$UPS_C")"
+ rm -f "$UPS_C"
+ echo "# Config file automatically generated from UCI config" > "$UPS_C"
+ chmod 0640 "$UPS_C"
+
+ config_load nut_server
+ config_foreach build_driver_config driver
+ [ -n "$RUNAS" ] && chgrp $(id -gn $RUNAS) "$UPS_C"
-nut_driver_stop() {
+ build_server_config
+}
+
+start_driver_instance() {
local cfg="$1"
+ local requested="$2"
+ local RUNAS=nut
local driver
- config_get driver "$cfg" driver
+ # If wanting a specific instance, only start it
+ [ "$requested" != "$cfg" ] && [ x"$requested" != x"" ] && return 0
+
+ mkdir -m 0755 -p "$(dirname "$UPS_C")"
+
+ [ ! -s "$UPS_C" ] && build_config
+
- [ -r ${statepath:-/var/run/nut}/$driver-$cfg ] && /usr/sbin/upsdrvctl stop $cfg
+ # Avoid hotplug inadvertenly restarting driver during
+ # forced shutdown
+ [ -f /var/run/killpower ] && return 0
+ [ -d /var/run/nut ] && [ -f /var/run/nut/disable-hotplug ] && return 0
+
+
+ if [ -n "$RUNAS" ]; then
+ chown $RUNAS:$(id -gn $RUNAS) "${STATEPATH}"
+ chown $RUNAS:$(id -gn $RUNAS) "$(dirname "$UPS_C")"
+ fi
+
+ config_get driver "$cfg" driver "usbhid-ups"
+ procd_open_instance "$cfg"
+ procd_set_param respawn
+ procd_set_param stderr 0
+ procd_set_param stdout 1
+ procd_set_param command /lib/nut/${driver} -D -a "$cfg" ${RUNAS:+-u $RUNAS}
+ procd_close_instance
+}
+
+start_server_instance() {
+ local RUNAS STATEPATH
+ build_config
+
+ procd_open_instance "upsd"
+ procd_set_param respawn
+ procd_set_param stderr 0
+ procd_set_param stdout 1
+ procd_set_param command /usr/sbin/upsd -D ${RUNAS:+-u $RUNAS}
+ procd_close_instance
}
-stop_service() {
- [ -r $PID_F ] && /usr/sbin/upsd -c stop
- config_load ups
+start_service() {
+ local STATEPATH=/var/run/nut
+
+ # Avoid hotplug inadvertenly restarting driver during
+ # forced shutdown
+ [ -f /var/run/killpower ] && return 0
+ [ -d /var/run/nut ] && [ -f /var/run/nut/disable-hotplug ] && return 0
+
+ config_load nut_server
config_foreach upsd_statepath upsd
- config_foreach nut_driver_stop driver
+
+ [ -d "${STATEPATH}" ] || {
+ mkdir -m 0750 -p "${STATEPATH}"
+ }
+
+ build_config
+ config_foreach start_driver_instance driver "$@"
+
+ [ "$1" != "upsd" ] && [ x"$1" != x"" ] && return 0
+ start_server_instance "upsd"
}
reload_service() {
- upsd -c reload
+ stop
+ sleep 2
+ start
+}
+
+service_triggers() {
+ procd_add_reload_trigger "nut_server"
}
# option port # optional port number
# option displayname "Display Name"
+config upsset
+ option enable 0
#config upsmon 'upsmon'
-# option runas run-as-user
+# option runas nutmon
# option minsupplies 1
-# option shutdowncmd /sbin/halt
+# option shutdowncmd '/usr/sbin/nutshutdown'
# option notifycmd /path/to/cmd
# list defaultnotify SYSLOG
# option pollfreq 5
# option pollfreqalert 5
# option hostsync 15
# option deadtime 15
-# option powerdownflags /var/run/killpower
# option onlinemsg "online message"
# option onbattmsg "on battery message"
# option lowbattmsg "low battery message"
# option powervalue 1
# option username upsuser
# option password upspassword
-
# option maxage 15
# option statepath /var/run/nut
# option maxconn 1024
+# option runas nut
# NB: certificates only apply to SSL-enabled version
# option certfile /usr/local/etc/upsd.pem
--- /dev/null
+#!/bin/sh
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+. /lib/functions.sh
+
+mount -o remount,ro /overlay /overlay
+mount -o remount,ro / /
+
+stop_instance() {
+ /etc/init.d/nut-server stop "$1"
+}
+
+shutdown_instance() {
+ local cfg="$1"
+ config_get driver "$cfg" driver "usbhid-ups"
+ /lib/nut/${driver} -a "$cfg" -k
+}
+
+[ -f /var/run/killpower ] && {
+ [ -f /etc/config/nut_server ] && {
+ config_load nut_server
+
+ # Can't FSD unless drivers are stopped
+ config_foreach stop_instance driver
+ # Driver will wait 'offdelay' before shutting down
+ config_foreach shutdown_instance driver
+ # So this can happen
+ poweroff
+ # And just in case
+ sleep 120
+ # Uh-oh failed to poweroff UPS
+ reboot -f
+ } || {
+ poweroff
+ }
+} || {
+ poweroff
+}
--- /dev/null
+#
+# Copyright (C) 2018 Jeffery To
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=obfs4proxy
+PKG_VERSION:=0.0.7
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://git.torproject.org/pluggable-transports/obfs4.git
+PKG_SOURCE_VERSION:=8256fac93c2cf79742725e3aaced5bbe3380fd32
+PKG_SOURCE_DATE:=20161115
+PKG_MIRROR_HASH:=9c504337f7a2b46310083224cf0998fc7645f8af5d50657cf74358d39916eddc
+
+PKG_LICENSE:=BSD-2-Clause
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+PKG_BUILD_DEPENDS:=golang/host
+PKG_BUILD_PARALLEL:=1
+PKG_USE_MIPS16:=0
+
+GO_PKG:=git.torproject.org/pluggable-transports/obfs4.git
+
+include $(INCLUDE_DIR)/package.mk
+include ../../lang/golang/golang-package.mk
+
+define Package/obfs4proxy/Default
+ TITLE:=A Tor pluggable transport proxy, implementing obfs4
+ URL:=https://gitweb.torproject.org/pluggable-transports/obfs4.git/
+ DEPENDS:=$(GO_ARCH_DEPENDS)
+endef
+
+define Package/obfs4proxy
+$(call Package/obfs4proxy/Default)
+ SECTION:=net
+ CATEGORY:=Network
+endef
+
+define Package/golang-torproject-pluggable-transports-obfs4-dev
+$(call Package/obfs4proxy/Default)
+$(call GoPackage/GoSubMenu)
+ TITLE+= (source files)
+ DEPENDS+= \
+ +golang-github-agl-ed25519-dev \
+ +golang-github-dchest-siphash-dev \
+ +golang-golang-x-crypto-dev \
+ +golang-golang-x-net-dev \
+ +golang-torproject-pluggable-transports-goptlib-dev
+ PKGARCH:=all
+endef
+
+define Package/obfs4proxy/Default/description
+obfs4proxy is a tool that attempts to circumvent censorship by
+transforming the Tor traffic between the client and the bridge. This way
+censors, who usually monitor traffic between the client and the bridge,
+will see innocent-looking transformed traffic instead of the actual Tor
+traffic.
+
+obfs4proxy implements the obfsucation protocols obfs2, obfs3, and obfs4.
+
+It is written in Go and is compliant with the Tor pluggable transports
+specification, and its modular architecture allows it to support
+multiple pluggable transports.
+endef
+
+define Package/obfs4proxy/description
+$(call Package/obfs4proxy/Default/description)
+
+This package contains both the client and the bridge in a single
+program.
+endef
+
+define Package/golang-torproject-pluggable-transports-obfs4-dev/description
+$(call Package/obfs4proxy/Default/description)
+
+This package provides the source files for the client/bridge program.
+endef
+
+$(eval $(call GoBinPackage,obfs4proxy))
+$(eval $(call BuildPackage,obfs4proxy))
+
+$(eval $(call GoSrcPackage,golang-torproject-pluggable-transports-obfs4-dev))
+$(eval $(call BuildPackage,golang-torproject-pluggable-transports-obfs4-dev))
--- /dev/null
+From af4824cb0b2c36a0eba4bc1590eb0737302e992e Mon Sep 17 00:00:00 2001
+From: Yawning Angel <yawning@schwanenlied.me>
+Date: Wed, 10 Jan 2018 15:11:44 +0000
+Subject: Bug 24793: Send the correct authorization HTTP header for basic auth.
+
+Apparently I didn't test the "connect via HTTP(s)" proxy with
+authentication at all when I added that functionality, so it has been
+broken for years.
+
+This should fix it now.
+---
+ obfs4proxy/proxy_http.go | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/obfs4proxy/proxy_http.go b/obfs4proxy/proxy_http.go
+index 6f11790..a5c2100 100644
+--- a/obfs4proxy/proxy_http.go
++++ b/obfs4proxy/proxy_http.go
+@@ -29,6 +29,7 @@ package main
+
+ import (
+ "bufio"
++ "encoding/base64"
+ "fmt"
+ "net"
+ "net/http"
+@@ -90,7 +91,9 @@ func (s *httpProxy) Dial(network, addr string) (net.Conn, error) {
+ }
+ req.Close = false
+ if s.haveAuth {
+- req.SetBasicAuth(s.username, s.password)
++ // SetBasicAuth doesn't quite do what is appropriate, because
++ // the correct header is `Proxy-Authorization`.
++ req.Header.Set("Proxy-Authorization", base64.StdEncoding.EncodeToString([]byte(s.username + ":" + s.password)))
+ }
+ req.Header.Set("User-Agent", "")
+
+--
+cgit v1.1
+
include $(TOPDIR)/rules.mk
PKG_NAME:=ola
-PKG_VERSION:=0.10.6
-PKG_RELEASE:=3
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/OpenLightingProject/ola.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=6e57342c414a72cdd721e8df5bc7967e17459647
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=c1f36eaedcd9711e42fd362ff84d8e66eb40bc6af97de77129a5074d05fb9936
+PKG_VERSION:=0.10.7
+PKG_RELEASE:=2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/OpenLightingProject/ola/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=95b5e99775f700a9cdf6e2219eccfc8c037fa8841f87cb00344359c4b8c7bf26
+
PKG_LICENSE:=LGPL-2.1+
PKG_FIXUP:=libtool
-PKG_INSTALL:=1
+PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
TITLE:=Open Lighting Architecture Daemon
URL:=https://www.openlighting.org/
MAINTAINER:=Christian Beier <dontmind@freeshell.org>
- DEPENDS:=+protobuf +libusb-1.0 +libuuid +libstdcpp +libpthread +librt +zlib +libncurses +liblo +libmicrohttpd
+ DEPENDS:=+protobuf +libftdi1 +libusb-1.0 +libuuid +libstdcpp +libpthread +librt +zlib +libncurses +liblo +libmicrohttpd
endef
define Package/ola/description
--disable-osc \
--disable-uart \
--disable-libusb \
- --disable-libftdi \
--disable-http \
--disable-examples \
--disable-unittests \
index 22647be..7dcf0de 100644
--- a/Makefile.am
+++ b/Makefile.am
-@@ -32,7 +32,7 @@ AM_DISTCHECK_CONFIGURE_FLAGS = --enable-python-libs
+@@ -45,7 +45,7 @@ AM_DISTCHECK_CONFIGURE_FLAGS = --enable-python-libs
COMMON_CXXFLAGS_ONLY_WARNINGS = \
-I$(top_srcdir)/include \
-I$(top_builddir)/include \
--- /dev/null
+# Copyright (C) 2011, 2015 Cisco Systems, Inc.
+# Copyright (C) 2015 CBA research group, Technical University of Catalonia.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=oor
+PKG_VERSION:=1.2.2
+PKG_RELEASE:=1
+
+
+PKG_SOURCE_URL=https://github.com/OpenOverlayRouter/oor/releases/download/$(PKG_VERSION)/
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_MD5SUM:=6702348fa314c2691f28c7e71337bb84
+
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Albert Lopez <alopez@ac.upc.edu>
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
+
+MAKE_FLAGS += platform=openwrt
+
+define Package/oor
+ SECTION:=net
+ CATEGORY:=Network
+ TITLE:=Open Overlay Router
+ URL:=https://github.com/OpenOverlayRouter
+ DEPENDS:= +librt +confuse +kmod-tun +uci @IPV6
+endef
+
+define Package/oor/description
+ This packet provides support for the Locator-ID Separation Protocol, VXLAN-GPE.
+endef
+
+define Package/oor/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/oor/oor $(1)/usr/sbin/
+ $(INSTALL_DIR) $(1)/etc/config
+ $(INSTALL_CONF) $(PKG_BUILD_DIR)/openWRT/oor.uci.example $(1)/etc/config/oor
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/openWRT/openwrt.init.script $(1)/etc/init.d/oor
+endef
+
+$(eval $(call BuildPackage,oor))
\ No newline at end of file
include $(TOPDIR)/rules.mk
PKG_NAME:=openssh
-PKG_VERSION:=7.7p1
+PKG_VERSION:=7.9p1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \
https://ftp.spline.de/pub/OpenBSD/OpenSSH/portable/ \
https://anorien.csc.warwick.ac.uk/pub/OpenBSD/OpenSSH/portable/
-PKG_HASH:=d73be7e684e99efcd024be15a30bffcbe41b012b2f7b3c9084aed621775e6b8f
+PKG_HASH:=6b4b3ba2253d84ed3771c8050728d597c91cfce898713beb7b64a305b6f11aad
PKG_LICENSE:=BSD ISC
PKG_LICENSE_FILES:=LICENCE
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_REMOVE_FILES:=
include $(INCLUDE_DIR)/package.mk
--- /dev/null
+From 91b777c7064d9d91a1433a42b0bb31592388d1b4 Mon Sep 17 00:00:00 2001
+From: Eneas U de Queiroz <cote2004-github@yahoo.com>
+Date: Tue, 9 Oct 2018 16:17:42 -0300
+Subject: [PATCH] fix compilation with openssl built without ECC
+
+ECDSA code in openssh-compat.h and libressl-api-compat.c needs to be
+guarded by OPENSSL_HAS_ECC
+
+Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
+
+diff --git a/openbsd-compat/libressl-api-compat.c b/openbsd-compat/libressl-api-compat.c
+index de3e64a6..ae00ff59 100644
+--- a/openbsd-compat/libressl-api-compat.c
++++ b/openbsd-compat/libressl-api-compat.c
+@@ -152,7 +152,9 @@
+ #include <openssl/dsa.h>
+ #include <openssl/rsa.h>
+ #include <openssl/evp.h>
++#ifdef OPENSSL_HAS_ECC
+ #include <openssl/ecdsa.h>
++#endif
+ #include <openssl/dh.h>
+
+ #ifndef HAVE_DSA_GET0_PQG
+@@ -417,6 +419,7 @@ DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s)
+ }
+ #endif /* HAVE_DSA_SIG_SET0 */
+
++#ifdef OPENSSL_HAS_ECC
+ #ifndef HAVE_ECDSA_SIG_GET0
+ void
+ ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps)
+@@ -442,6 +445,7 @@ ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s)
+ return 1;
+ }
+ #endif /* HAVE_ECDSA_SIG_SET0 */
++#endif /* OPENSSL_HAS_ECC */
+
+ #ifndef HAVE_DH_GET0_PQG
+ void
+diff --git a/openbsd-compat/openssl-compat.h b/openbsd-compat/openssl-compat.h
+index 9e0264c0..6a525f28 100644
+--- a/openbsd-compat/openssl-compat.h
++++ b/openbsd-compat/openssl-compat.h
+@@ -24,7 +24,9 @@
+ #include <openssl/evp.h>
+ #include <openssl/rsa.h>
+ #include <openssl/dsa.h>
++#ifdef OPENSSL_HAS_ECC
+ #include <openssl/ecdsa.h>
++#endif
+ #include <openssl/dh.h>
+
+ int ssh_compatible_openssl(long, long);
+@@ -161,6 +163,7 @@ void DSA_SIG_get0(const DSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps);
+ int DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s);
+ #endif /* DSA_SIG_SET0 */
+
++#ifdef OPENSSL_HAS_ECC
+ #ifndef HAVE_ECDSA_SIG_GET0
+ void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps);
+ #endif /* HAVE_ECDSA_SIG_GET0 */
+@@ -168,6 +171,7 @@ void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps);
+ #ifndef HAVE_ECDSA_SIG_SET0
+ int ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s);
+ #endif /* HAVE_ECDSA_SIG_SET0 */
++#endif /* OPENSSL_HAS_ECC */
+
+ #ifndef HAVE_DH_GET0_PQG
+ void DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q,
--- /dev/null
+From edfc2e18ef069ba600c8f4632ce1e3dc94a0669a Mon Sep 17 00:00:00 2001
+From: Eneas U de Queiroz <cote2004-github@yahoo.com>
+Date: Fri, 19 Oct 2018 10:04:24 -0300
+Subject: [PATCH 2/2] Fix OPENSSL_init_crypto call for openssl < 1.1
+
+Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
+
+diff --git a/openbsd-compat/openssl-compat.c b/openbsd-compat/openssl-compat.c
+index 8b4a3627..590b66d1 100644
+--- a/openbsd-compat/openssl-compat.c
++++ b/openbsd-compat/openssl-compat.c
+@@ -76,7 +76,7 @@ ssh_OpenSSL_add_all_algorithms(void)
+ ENGINE_load_builtin_engines();
+ ENGINE_register_all_complete();
+
+-#if OPENSSL_VERSION_NUMBER < 0x10001000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ OPENSSL_config(NULL);
+ #else
+ OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS |
+++ /dev/null
---- a/ssh_config
-+++ b/ssh_config
-@@ -44,3 +44,6 @@
- # VisualHostKey no
- # ProxyCommand ssh -q -W %h:%p gateway.example.com
- # RekeyLimit 1G 1h
-+
-+# enable DSCP QoS values (per RFC-4594)
-+#IPQoS AF21 AF11
---- a/sshd_config
-+++ b/sshd_config
-@@ -106,6 +106,9 @@ AuthorizedKeysFile .ssh/authorized_keys
- # no default banner path
- #Banner none
-
-+# enable DSCP QoS values (per RFC-4594)
-+#IPQoS AF21 AF11
-+
- # override default of no subsystems
- Subsystem sftp /usr/libexec/sftp-server
-
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
+# Checklist on version bump
+#
+# - Check acinclude.m4 for range of supported kernel versions: "but version newer than .* is not supported"
+# - Check and update kmod dependencies when necessary (runtime module load check in the least)
+#
PKG_NAME:=openvswitch
-PKG_VERSION:=2.9.2
-PKG_RELEASE:=2
+PKG_VERSION:=2.10.1
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.openvswitch.org/releases/
-PKG_HASH:=90f084dc282fdb588a2cfff351fea359492f69600f1e4a1286e24e44901de113
+PKG_HASH:=4f93c764295952848a924271250d7c6a6a53747d0019ef6ff880aa8ea6897c80
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE
include ../../lang/python/python-package.mk
-CONFIGURE_ARGS+= \
- --enable-ndebug \
- --enable-shared \
- --disable-libcapng \
+ovs_kmod_packages:=
+ovs_kmod_intree_kernel_patchver_min:=3.10
+ovs_kmod_intree_kernel_patchver_max:=4.15
+ovs_kmod_intree_not_supported:=$(strip $(call kernel_patchver_lt,$(ovs_kmod_intree_kernel_patchver_min))$(call kernel_patchver_gt,$(ovs_kmod_intree_kernel_patchver_max)))
+ovs_kmod_intree_dir:=$(PKG_BUILD_DIR)/datapath/linux
+ovs_kmod_upstream_dir:=$(LINUX_DIR)/net/openvswitch
+ovs_kmod_package_name=$(if $(filter openvswitch,$(1)),openvswitch,$(1))
+ovs_kmod_is_intree=$(filter %-intree,$(1))
+ovs_kmod_upstream_name=kmod-$(call ovs_kmod_package_name,$(patsubst %-intree,%,$(1)))
+ovs_kmod_package_provides=$(call ovs_kmod_upstream_name,$(1))
+define OvsKmodPackageTemplate
+ define KernelPackage/$(call ovs_kmod_package_name,$(1))
+ SECTION:=kernel
+ CATEGORY:=Kernel modules
+ SUBMENU:=Network Support
+ TITLE:=$(ovs_kmod_$(1)_title)
+ DEPENDS:=$(ovs_kmod_$(1)_depends) $(if $(call ovs_kmod_is_intree,$(1)),@DEVEL $(if $(ovs_kmod_intree_not_supported),@BROKEN))
+ PROVIDES:=$(call ovs_kmod_package_provides,$(1))
+ KCONFIG:=$(ovs_kmod_$(1)_kconfig)
+ FILES:=$(ovs_kmod_$(1)_files)
+ AUTOLOAD:=$(call AutoProbe,$(foreach m,$(ovs_kmod_$(1)_files),$(patsubst %.ko,%,$(basename $(m)))))
+ endef
-CONFIGURE_VARS += \
- ovs_cv_flake8=no \
- ovs_cv_python3=no \
- ovs_cv_sphinx=no \
- ovs_cv_python=$(PYTHON) \
- ovs_cv_python_host=$(HOST_PYTHON_BIN) \
+ ovs_kmod_packages+=$(call ovs_kmod_package_name,$(1))
+endef
-TARGET_CFLAGS += -flto -std=gnu99
-MAKE_VARS += PYTHONPATH="$(HOST_PYTHONPATH)"
+ovs_kmod_openvswitch_title:=Open vSwitch kernel datapath (upstream)
+ovs_kmod_openvswitch_kconfig:=CONFIG_OPENVSWITCH
+ovs_kmod_openvswitch_depends:=\
+ +kmod-lib-crc32c +kmod-mpls \
+ +kmod-nf-nat +IPV6:kmod-nf-nat6 \
+ +kmod-nf-conntrack +IPV6:kmod-nf-conntrack6
+ovs_kmod_openvswitch_files:=$(ovs_kmod_upstream_dir)/openvswitch.ko
+$(eval $(call OvsKmodPackageTemplate,openvswitch))
+
+ovs_kmod_openvswitch-gre_title:=Open vSwitch GRE tunneling support (upstream)
+ovs_kmod_openvswitch-gre_kconfig:= CONFIG_OPENVSWITCH_GRE
+ovs_kmod_openvswitch-gre_depends:= +kmod-openvswitch +kmod-gre
+ovs_kmod_openvswitch-gre_files:= $(ovs_kmod_upstream_dir)/vport-gre.ko
+$(eval $(call OvsKmodPackageTemplate,openvswitch-gre))
+
+ovs_kmod_openvswitch-vxlan_title:=Open vSwitch VXLAN tunneling support (upstream)
+ovs_kmod_openvswitch-vxlan_kconfig:= CONFIG_OPENVSWITCH_VXLAN
+ovs_kmod_openvswitch-vxlan_depends:= +kmod-openvswitch +kmod-vxlan
+ovs_kmod_openvswitch-vxlan_files:= $(ovs_kmod_upstream_dir)/vport-vxlan.ko
+$(eval $(call OvsKmodPackageTemplate,openvswitch-vxlan))
+
+ovs_kmod_openvswitch-geneve_title:=Open vSwitch Geneve tunneling support (upstream)
+ovs_kmod_openvswitch-geneve_kconfig:= CONFIG_OPENVSWITCH_GENEVE
+ovs_kmod_openvswitch-geneve_depends:= +kmod-openvswitch +kmod-geneve
+ovs_kmod_openvswitch-geneve_files:= $(ovs_kmod_upstream_dir)/vport-geneve.ko
+$(eval $(call OvsKmodPackageTemplate,openvswitch-geneve))
+
+# NOTE depends
+#
+# - kmod-gre: with linux-4.14, ovs-2.10, when ovs decides to not
+# USE_UPSTREAM_TUNNEL, it requires kmod-gre to be enabled so that
+# CONFIG_NET_IPGRE_DEMUX is enabled and ovs will have rpl_gre_init()
+# compiled in.
+#
+# - kmod-gre6: with linux-4.14, ovs-2.10, when ovs decides to not
+# USE_UPSTREAM_TUNNEL, it requires xfrm6_tunnel_register() from
+# net/ipv6/tunnel6.ko, which will be pulled in by kmod-ip6-tunnel, which
+# will be pulled in by kmod-gre6. NOTE that tunnel6.ko itself cannot be
+# enabled and selected on its own
+#
+ovs_kmod_openvswitch-intree_title:=Open vSwitch kernel datapath (in tree)
+ovs_kmod_openvswitch-intree_depends:=$(ovs_kmod_openvswitch_depends) +kmod-gre +IPV6:kmod-gre6
+ovs_kmod_openvswitch-intree_files:= $(ovs_kmod_intree_dir)/openvswitch.ko
+$(eval $(call OvsKmodPackageTemplate,openvswitch-intree))
+ovs_kmod_openvswitch-gre-intree_title:=Open vSwitch GRE tunneling support (in tree)
+ovs_kmod_openvswitch-gre-intree_depends:= +kmod-openvswitch-intree +kmod-gre
+ovs_kmod_openvswitch-gre-intree_files:= $(ovs_kmod_intree_dir)/vport-gre.ko
+$(eval $(call OvsKmodPackageTemplate,openvswitch-gre-intree))
-define KernelPackage/openvswitch
- SECTION:=kernel
- CATEGORY:=Kernel modules
- SUBMENU:=Network Support
- TITLE:=Open vSwitch kernel datapath
- KCONFIG:=CONFIG_OPENVSWITCH
- DEPENDS:= \
- +kmod-lib-crc32c +kmod-mpls \
- +kmod-nf-nat +IPV6:kmod-nf-nat6
- FILES:= $(LINUX_DIR)/net/openvswitch/openvswitch.ko
- AUTOLOAD:=$(call AutoProbe,openvswitch)
-endef
+ovs_kmod_openvswitch-vxlan-intree_title:=Open vSwitch VXLAN tunneling support (in tree)
+ovs_kmod_openvswitch-vxlan-intree_depends:= +kmod-openvswitch-intree +kmod-vxlan
+ovs_kmod_openvswitch-vxlan-intree_files:= $(ovs_kmod_intree_dir)/vport-vxlan.ko
+$(eval $(call OvsKmodPackageTemplate,openvswitch-vxlan-intree))
-define KernelPackage/openvswitch-gre
- SECTION:=kernel
- CATEGORY:=Kernel modules
- SUBMENU:=Network Support
- TITLE:=Open vSwitch GRE tunneling support
- KCONFIG:= CONFIG_OPENVSWITCH_GRE
- DEPENDS:= +kmod-openvswitch +kmod-gre
- FILES:= $(LINUX_DIR)/net/openvswitch/vport-gre.ko
- AUTOLOAD:=$(call AutoProbe,vport-gre)
-endef
+ovs_kmod_openvswitch-geneve-intree_title:=Open vSwitch Geneve tunneling support (in tree)
+ovs_kmod_openvswitch-geneve-intree_depends:= +kmod-openvswitch-intree +kmod-geneve
+ovs_kmod_openvswitch-geneve-intree_files:= $(ovs_kmod_intree_dir)/vport-geneve.ko
+$(eval $(call OvsKmodPackageTemplate,openvswitch-geneve-intree))
-define KernelPackage/openvswitch-vxlan
- SECTION:=kernel
- CATEGORY:=Kernel modules
- SUBMENU:=Network Support
- TITLE:=Open vSwitch VXLAN tunneling support
- KCONFIG:= CONFIG_OPENVSWITCH_VXLAN
- DEPENDS:= +kmod-openvswitch +kmod-vxlan
- FILES:= $(LINUX_DIR)/net/openvswitch/vport-vxlan.ko
- AUTOLOAD:=$(call AutoProbe,vport-vxlan)
-endef
+ovs_kmod_openvswitch-stt-intree_title:=Open vSwitch STT tunneling support (in tree)
+ovs_kmod_openvswitch-stt-intree_depends:= +kmod-openvswitch-intree
+ovs_kmod_openvswitch-stt-intree_files:= $(ovs_kmod_intree_dir)/vport-stt.ko
+$(eval $(call OvsKmodPackageTemplate,openvswitch-stt-intree))
-define KernelPackage/openvswitch-geneve
- SECTION:=kernel
- CATEGORY:=Kernel modules
- SUBMENU:=Network Support
- TITLE:=Open vSwitch Geneve tunneling support
- KCONFIG:= CONFIG_OPENVSWITCH_GENEVE
- DEPENDS:= +kmod-openvswitch +kmod-geneve
- FILES:= $(LINUX_DIR)/net/openvswitch/vport-geneve.ko
- AUTOLOAD:=$(call AutoProbe,vport-geneve)
-endef
+ovs_kmod_openvswitch-lisp-intree_title:=Open vSwitch LISP tunneling support (in tree)
+ovs_kmod_openvswitch-lisp-intree_depends:= +kmod-openvswitch-intree
+ovs_kmod_openvswitch-lisp-intree_files:= $(ovs_kmod_intree_dir)/vport-lisp.ko
+$(eval $(call OvsKmodPackageTemplate,openvswitch-lisp-intree))
ovs_packages:=
URL:=https://www.openvswitch.org
TITLE:=$(ovs_$(1)_title)
HIDDEN:=$(ovs_$(1)_hidden)
- DEPENDS:=$(ovs_$(1)_depends)
+ DEPENDS:=$(ovs_$(1)_depends) +libunbound
endef
define Package/$(call ovs_package_name,$(1))/install
ovs_common_files:= \
usr/share/openvswitch/scripts/ovs-lib \
usr/share/openvswitch/scripts/ovs-ctl \
+ usr/share/openvswitch/scripts/ovs-kmod-ctl \
usr/share/openvswitch/scripts/ovs-save \
$(foreach b,ovs-appctl ovs-dpctl ovs-ofctl ovs-vsctl ovsdb-client ovsdb-tool,usr/bin/$(b))
define ovs_common_install
$$(INSTALL_DIR) $$(1)/usr/share/openvswitch/scripts
$$(INSTALL_BIN) ./files/ovs-ctl-wrapper $$(1)/usr/share/openvswitch/scripts/
$$(LN) /usr/share/openvswitch/scripts/ovs-ctl-wrapper $$(1)/usr/bin/ovs-ctl
+ $$(LN) /usr/share/openvswitch/scripts/ovs-ctl-wrapper $$(1)/usr/bin/ovs-kmod-ctl
endef
define Package/openvswitch-common/conffiles
/etc/openvswitch
$(eval $(call OvsPackageTemplate,python))
+CONFIGURE_ARGS+= \
+ --enable-ndebug \
+ --enable-shared \
+ --disable-libcapng \
+
+CONFIGURE_VARS += \
+ ovs_cv_flake8=no \
+ ovs_cv_python3=no \
+ ovs_cv_sphinx=no \
+ ovs_cv_python=$(PYTHON) \
+ ovs_cv_python_host=$(HOST_PYTHON_BIN) \
+ KARCH=$(LINUX_KARCH) \
+
+ovs_intree_kmod_configs:=CONFIG_PACKAGE_kmod-openvswitch-intree
+ovs_intree_kmod_enabled:=$(strip $(foreach c,$(ovs_intree_kmod_configs),$($(c))))
+PKG_CONFIG_DEPENDS+=$(ovs_intree_kmod_configs)
+ifneq ($(ovs_intree_kmod_enabled),)
+ CONFIGURE_ARGS += --with-linux=$(LINUX_DIR)
+endif
+
+TARGET_CFLAGS += -flto -std=gnu99
+MAKE_VARS += PYTHONPATH="$(HOST_PYTHONPATH)"
+
+$(foreach p,$(ovs_kmod_packages),\
+ $(eval $(call KernelPackage,$(p)))\
+)
$(foreach p,$(ovs_packages),\
$(eval $(call BuildPackage,$(p)))\
)
-
-$(eval $(call KernelPackage,openvswitch))
-$(eval $(call KernelPackage,openvswitch-gre))
-$(eval $(call KernelPackage,openvswitch-vxlan))
-$(eval $(call KernelPackage,openvswitch-geneve))
/etc/init.d/openvswitch status
Use `ovs-ctl` and `ovn-ctl` directly for more functionalities
+
+# Open vSwitch in-tree Linux datapath modules
+
+The Open vSwitch build system uses regexp and conditional-compilation
+heuristics to support building the shipped kernel module source code against a
+wide range of kernels, as of openvswitch-2.10, the list is supposed to include
+vanilla linux 3.10 to 4.15, plus a few distro kernels.
+
+It may NOT work
+
+ - Sometimes the code does not compile
+ - Sometimes the code compiles but insmod will fail
+ - Sometimes modules are loaded okay but actually does not function right
+
+For these reasons, the in-tree datapath modules are NOT visible/enabled by
+default.
+
+Building and using in-tree datapath modules requires some level of devel
+abilities to proceed. You are expected to configure build options and build
+the code on your own
+
+E.g. pair openvswitch userspace with in-tree datapath module
+
+ CONFIG_DEVEL=y
+ CONFIG_PACKAGE_openvswitch=y
+ # CONFIG_PACKAGE_kmod-openvswitch is not set
+ CONFIG_PACKAGE_kmod-openvswitch-intree=y
+
+E.g. replace in-tree datapath module with upstream version
+
+ opkg remove --force-depends kmod-openvswitch-intree
+ opkg install kmod-openvswitch
+ ovs-ctl force-reload-kmod
START=15
ovs_script_dir=/usr/share/openvswitch/scripts
-ovs_ctl="$ovs_script_dir/ovs-ctl"
-ovn_ctl="$ovs_script_dir/ovn-ctl"
+ovs_ctl="$ovs_script_dir/ovs-ctl"; [ -x "$ovs_ctl" ] || ovs_ctl=:
+ovn_ctl="$ovs_script_dir/ovn-ctl"; [ -x "$ovn_ctl" ] || ovn_ctl=:
EXTRA_COMMANDS=status
s=/usr/share/openvswitch/scripts
case "$0" in
*ovs-ctl) "$s/ovs-ctl" "$@" ;;
+ *ovs-kmod-ctl) "$s/ovs-kmod-ctl" "$@" ;;
*ovn-ctl) "$s/ovn-ctl" "$@" ;;
*) exit 1;;
esac
-From c27232c954cdbe0207252ad88fddad4fd6ac0fbc Mon Sep 17 00:00:00 2001
+From e4ac9741a99866976322c21605b312bc27633c92 Mon Sep 17 00:00:00 2001
From: Helmut Schaa <helmut.schaa@googlemail.com>
Date: Wed, 8 Jan 2014 13:48:33 +0100
-Subject: [PATCH 100/104] netdev-linux: Use unsigned int for ifi_flags
+Subject: [PATCH 100/107] netdev-linux: Use unsigned int for ifi_flags
ifi_flags is unsigned, the local equivalents should do the same.
lib/netdev-linux.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
+diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
+index e16ea58a0..5ada9a21f 100644
--- a/lib/netdev-linux.c
+++ b/lib/netdev-linux.c
-@@ -2810,7 +2810,7 @@ update_flags(struct netdev_linux *netdev
+@@ -3115,7 +3115,7 @@ update_flags(struct netdev_linux *netdev, enum netdev_flags off,
enum netdev_flags on, enum netdev_flags *old_flagsp)
OVS_REQUIRES(netdev->mutex)
{
-From a6df8dd455c8be7c0c2ba79f35cf5390e892b39e Mon Sep 17 00:00:00 2001
+From 9f4775d9a2541e8128ea99f3b02925cc1ee05374 Mon Sep 17 00:00:00 2001
From: Helmut Schaa <helmut.schaa@googlemail.com>
Date: Wed, 8 Jan 2014 13:48:49 +0100
-Subject: [PATCH 101/104] netdev-linux: Let interface flag survive internal
+Subject: [PATCH 101/107] netdev-linux: Let interface flag survive internal
port setup
Due to a race condition when bringing up an internal port on Linux
lib/netdev-linux.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
+diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
+index 5ada9a21f..bb8275cfa 100644
--- a/lib/netdev-linux.c
+++ b/lib/netdev-linux.c
-@@ -2813,7 +2813,13 @@ update_flags(struct netdev_linux *netdev
+@@ -3118,7 +3118,13 @@ update_flags(struct netdev_linux *netdev, enum netdev_flags off,
unsigned int old_flags, new_flags;
int error = 0;
-From b3cc748d502f7f87aeb103b3f69573b0e640e2ba Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Wed, 28 Feb 2018 13:42:44 +0800
-Subject: [PATCH 102/104] python: separate host/target python for cross-compile
+From e451d74788c73e8679e6a2268185a08901ac7f8c Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <zhouyousong@yunionyun.com>
+Date: Tue, 21 Aug 2018 12:21:05 +0000
+Subject: [PATCH 102/107] python: separate host/target python for cross-compile
At the moment, python-six is a requirement for openvswitch python
library on target machine.
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
---
- Makefile.am | 2 +-
- m4/openvswitch.m4 | 12 ++++--------
- 2 files changed, 5 insertions(+), 9 deletions(-)
+ Makefile.am | 2 +-
+ m4/openvswitch.m4 | 2 ++
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+diff --git a/Makefile.am b/Makefile.am
+index 788972804..cd90cc176 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -60,7 +60,7 @@ endif
ALL_LOCAL =
BUILT_SOURCES =
+diff --git a/m4/openvswitch.m4 b/m4/openvswitch.m4
+index 5743f83ce..acb6b140e 100644
--- a/m4/openvswitch.m4
+++ b/m4/openvswitch.m4
-@@ -351,20 +351,16 @@ else:
- if test $ovs_cv_python = no; then
- AC_MSG_ERROR([cannot find python 2.7 or higher.])
- fi
-- AM_MISSING_PROG([PYTHON], [python])
-+ AC_SUBST([PYTHON])
- PYTHON=$ovs_cv_python
-+ AM_MISSING_PROG([PYTHON_HOST], [python])
-+ PYTHON_HOST=$ovs_cv_python_host
+@@ -449,7 +449,9 @@ AC_DEFUN([OVS_CHECK_PYTHON],
+ fi])
+ AC_SUBST([PYTHON])
+ PYTHON=$ovs_cv_python
++ PYTHON_HOST=$ovs_cv_python_host
+ AC_SUBST([HAVE_PYTHON])
++ AM_MISSING_PROG([PYTHON_HOST], [python])
+ HAVE_PYTHON=yes
+ AM_CONDITIONAL([HAVE_PYTHON], [test "$HAVE_PYTHON" = yes])])
- # HAVE_PYTHON is always true. (Python has not always been a build
- # requirement, so this variable is now obsolete.)
- AC_SUBST([HAVE_PYTHON])
- HAVE_PYTHON=yes
-- AM_CONDITIONAL([HAVE_PYTHON], [test "$HAVE_PYTHON" = yes])
--
-- AC_MSG_CHECKING([whether $PYTHON has six library])
-- if ! $PYTHON -c 'import six ; six.moves.range' >&AS_MESSAGE_LOG_FD 2>&1; then
-- AC_MSG_ERROR([Missing Python six library or version too old.])
-- fi
-- AC_MSG_RESULT([yes])])
-+ AM_CONDITIONAL([HAVE_PYTHON], [test "$HAVE_PYTHON" = yes])])
-
- dnl Checks for Python 3.x, x >= 4.
- AC_DEFUN([OVS_CHECK_PYTHON3],
-From 05a6fa94778f9d6c54ca676de80708d03d6c365a Mon Sep 17 00:00:00 2001
+From 6b9732c8851c5466f2a363d88b5acae320801efe Mon Sep 17 00:00:00 2001
From: Yousong Zhou <yszhou4tech@gmail.com>
Date: Wed, 14 Mar 2018 16:40:01 +0800
-Subject: [PATCH 103/104] ovs-ctl: fix setting hostname
+Subject: [PATCH 103/107] ovs-ctl: fix setting hostname
The command "hostname" is not available in OpenWrt by default.
utilities/ovs-ctl.in | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
+diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in
+index 43c8f32b7..6203ecff5 100755
--- a/utilities/ovs-ctl.in
+++ b/utilities/ovs-ctl.in
-@@ -64,9 +64,7 @@ insert_mod_if_required () {
+@@ -36,9 +36,7 @@ insert_mod_if_required () {
}
set_hostname () {
-From 43b855e201bd25a015ba6444cabce12b8cc181ec Mon Sep 17 00:00:00 2001
+From 940441e2982cb35765830060e8203e5dd1a0f967 Mon Sep 17 00:00:00 2001
From: Yousong Zhou <yszhou4tech@gmail.com>
Date: Wed, 14 Mar 2018 16:44:13 +0800
-Subject: [PATCH 104/104] ovs-lib: fix install_dir()
+Subject: [PATCH 104/107] ovs-lib: fix install_dir()
The command "install" is not available in OpenWrt by default
utilities/ovs-lib.in | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
+diff --git a/utilities/ovs-lib.in b/utilities/ovs-lib.in
+index 090a14434..f2a30e065 100644
--- a/utilities/ovs-lib.in
+++ b/utilities/ovs-lib.in
-@@ -157,7 +157,10 @@ install_dir () {
+@@ -159,7 +159,10 @@ install_dir () {
[ "${OVS_USER##*:}" != "" ] && INSTALL_GROUP="${OVS_USER##*:}"
if test ! -d "$DIR"; then
--- /dev/null
+From d0cad5ac122aca722dc2013c1f53fda44c477cf2 Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <zhouyousong@yunionyun.com>
+Date: Tue, 21 Aug 2018 13:02:21 +0000
+Subject: [PATCH 105/107] build: disable building tests
+
+Signed-off-by: Yousong Zhou <zhouyousong@yunionyun.com>
+---
+ Makefile.am | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index cd90cc176..2e9e50f3a 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -477,7 +477,6 @@ include m4/automake.mk
+ include lib/automake.mk
+ include ofproto/automake.mk
+ include utilities/automake.mk
+-include tests/automake.mk
+ include include/automake.mk
+ include third-party/automake.mk
+ include debian/automake.mk
+++ /dev/null
-From bca4ff53aef16d38aeb1569edaaca6ac4feac6e8 Mon Sep 17 00:00:00 2001
-From: Eneas U de Queiroz <cote2004-github@yahoo.com>
-Date: Tue, 5 Jun 2018 10:36:51 -0300
-Subject: [PATCH] Removed calls to AP deprecated in openssl 1.1
-
-In openssl 1.1, there is no need to initialize the library. It is
-automatically done when first used. This allows to compile openvswitch
-with openssl 1.1.0 with deprecated API disabled.
-
-Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
-Signed-off-by: Ben Pfaff <blp@ovn.org>
----
- lib/stream-ssl.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/lib/stream-ssl.c b/lib/stream-ssl.c
-index ebb6f3a6c8..c7443470f5 100644
---- a/lib/stream-ssl.c
-+++ b/lib/stream-ssl.c
-@@ -947,12 +947,14 @@ do_ssl_init(void)
- {
- SSL_METHOD *method;
-
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER)
- #ifdef _WIN32
- /* The following call is needed if we "#include <openssl/applink.c>". */
- CRYPTO_malloc_init();
- #endif
- SSL_library_init();
- SSL_load_error_strings();
-+#endif
-
- if (!RAND_status()) {
- /* We occasionally see OpenSSL fail to seed its random number generator
+++ /dev/null
-From a513cb5fed8c4f63d60b6da12ae9f63a258a9e44 Mon Sep 17 00:00:00 2001
-From: Eneas U de Queiroz <cote2004-github@yahoo.com>
-Date: Wed, 6 Jun 2018 08:20:35 -0300
-Subject: [PATCH] dhparams: Add pregenerated .c file to the repository.
-
-The version of dhparams.c generated by any given version of OpenSSL or
-LibreSSL might work only with that version of the library. This can be
-inconvenient for cross-compiling if the "openssl" program on the build
-machine has a different version from the library on the host where OVS will
-run, since it could generate code that won't compile.
-
-This commit fixes the problem by generating dhparams.c that works on the
-currently important versions of OpenSSL and LibreSSL.
-
-Submitted-at: https://github.com/openvswitch/ovs/pull/235
-Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
-Signed-off-by: Ben Pfaff <blp@ovn.org>
----
- build-aux/automake.mk | 1 +
- build-aux/generate-dhparams-c | 31 +++++++
- lib/automake.mk | 17 ++--
- lib/dhparams.c | 192 ++++++++++++++++++++++++++++++++++++++++++
- 5 files changed, 233 insertions(+), 9 deletions(-)
- create mode 100755 build-aux/generate-dhparams-c
- create mode 100644 lib/dhparams.c
-
-diff --git a/build-aux/automake.mk b/build-aux/automake.mk
-index a1f2f856f..3a3b31ce1 100644
---- a/build-aux/automake.mk
-+++ b/build-aux/automake.mk
-@@ -4,6 +4,7 @@ EXTRA_DIST += \
- build-aux/cksum-schema-check \
- build-aux/dist-docs \
- build-aux/dpdkstrip.py \
-+ build-aux/generate-dhparams-c \
- build-aux/sodepends.py \
- build-aux/soexpand.py \
- build-aux/text2c \
-diff --git a/build-aux/generate-dhparams-c b/build-aux/generate-dhparams-c
-new file mode 100755
-index 000000000..a75e1d5a7
---- /dev/null
-+++ b/build-aux/generate-dhparams-c
-@@ -0,0 +1,31 @@
-+#! /bin/sh -e
-+
-+cat <<'EOF'
-+/* Generated automatically; do not modify! -*- buffer-read-only: t -*-
-+ *
-+ * If you do need to regenerate this file, run "make generate-dhparams-c". */
-+
-+#include <config.h>
-+#include "lib/dhparams.h"
-+#include "openvswitch/util.h"
-+
-+static int
-+my_DH_set0_pqg(DH *dh, BIGNUM *p, const BIGNUM **q OVS_UNUSED, BIGNUM *g)
-+{
-+ ovs_assert(q == NULL);
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER)
-+ dh->p = p;
-+ dh->g = g;
-+ return 1;
-+#else
-+ return DH_set0_pqg(dh, p, NULL, g);
-+#endif
-+}
-+EOF
-+(openssl dhparam -C -in lib/dh1024.pem -noout &&
-+openssl dhparam -C -in lib/dh2048.pem -noout &&
-+openssl dhparam -C -in lib/dh4096.pem -noout) | sed '
-+ s/\(get_dh[0-9]*\)()/\1(void)/
-+ s/\(DH_set0_pqg\)/my_\1/
-+ s/[ ]*$//
-+'
-diff --git a/lib/automake.mk b/lib/automake.mk
-index fb781e847..3bec3fd56 100644
---- a/lib/automake.mk
-+++ b/lib/automake.mk
-@@ -450,15 +450,16 @@ lib_libopenvswitch_la_SOURCES += \
- lib/route-table-bsd.c
- endif
-
-+.PHONY: generate-dhparams-c
- if HAVE_OPENSSL
--lib_libopenvswitch_la_SOURCES += lib/stream-ssl.c
--nodist_lib_libopenvswitch_la_SOURCES += lib/dhparams.c
--lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
-- $(AM_V_GEN)(echo '#include "lib/dhparams.h"' && \
-- openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout && \
-- openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout && \
-- openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \
-- | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp && \
-+lib_libopenvswitch_la_SOURCES += lib/stream-ssl.c lib/dhparams.c
-+
-+# Manually regenerates lib/dhparams.c. Not normally necessary since
-+# lib/dhparams.c is part of the repository and doesn't normally need
-+# updates.
-+generate-dhparams-c:
-+ $(AM_V_GEN)cd $(srcdir) && \
-+ build-aux/generate-dhparams-c > lib/dhparams.c.tmp && \
- mv lib/dhparams.c.tmp lib/dhparams.c
- else
- lib_libopenvswitch_la_SOURCES += lib/stream-nossl.c
-diff --git a/lib/dhparams.c b/lib/dhparams.c
-new file mode 100644
-index 000000000..c9c338bf1
---- /dev/null
-+++ b/lib/dhparams.c
-@@ -0,0 +1,192 @@
-+/* Generated automatically; do not modify! -*- buffer-read-only: t -*-
-+ *
-+ * If you do need to regenerate this file, run "make generate-dhparams-c". */
-+
-+#include <config.h>
-+#include "lib/dhparams.h"
-+#include "openvswitch/util.h"
-+
-+static int
-+my_DH_set0_pqg(DH *dh, BIGNUM *p, const BIGNUM **q OVS_UNUSED, BIGNUM *g)
-+{
-+ ovs_assert(q == NULL);
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER)
-+ dh->p = p;
-+ dh->g = g;
-+ return 1;
-+#else
-+ return DH_set0_pqg(dh, p, NULL, g);
-+#endif
-+}
-+#ifndef HEADER_DH_H
-+# include <openssl/dh.h>
-+#endif
-+
-+DH *get_dh1024(void)
-+{
-+ static unsigned char dhp_1024[] = {
-+ 0xF4, 0x88, 0xFD, 0x58, 0x4E, 0x49, 0xDB, 0xCD, 0x20, 0xB4,
-+ 0x9D, 0xE4, 0x91, 0x07, 0x36, 0x6B, 0x33, 0x6C, 0x38, 0x0D,
-+ 0x45, 0x1D, 0x0F, 0x7C, 0x88, 0xB3, 0x1C, 0x7C, 0x5B, 0x2D,
-+ 0x8E, 0xF6, 0xF3, 0xC9, 0x23, 0xC0, 0x43, 0xF0, 0xA5, 0x5B,
-+ 0x18, 0x8D, 0x8E, 0xBB, 0x55, 0x8C, 0xB8, 0x5D, 0x38, 0xD3,
-+ 0x34, 0xFD, 0x7C, 0x17, 0x57, 0x43, 0xA3, 0x1D, 0x18, 0x6C,
-+ 0xDE, 0x33, 0x21, 0x2C, 0xB5, 0x2A, 0xFF, 0x3C, 0xE1, 0xB1,
-+ 0x29, 0x40, 0x18, 0x11, 0x8D, 0x7C, 0x84, 0xA7, 0x0A, 0x72,
-+ 0xD6, 0x86, 0xC4, 0x03, 0x19, 0xC8, 0x07, 0x29, 0x7A, 0xCA,
-+ 0x95, 0x0C, 0xD9, 0x96, 0x9F, 0xAB, 0xD0, 0x0A, 0x50, 0x9B,
-+ 0x02, 0x46, 0xD3, 0x08, 0x3D, 0x66, 0xA4, 0x5D, 0x41, 0x9F,
-+ 0x9C, 0x7C, 0xBD, 0x89, 0x4B, 0x22, 0x19, 0x26, 0xBA, 0xAB,
-+ 0xA2, 0x5E, 0xC3, 0x55, 0xE9, 0x2F, 0x78, 0xC7
-+ };
-+ static unsigned char dhg_1024[] = {
-+ 0x02
-+ };
-+ DH *dh = DH_new();
-+ BIGNUM *dhp_bn, *dhg_bn;
-+
-+ if (dh == NULL)
-+ return NULL;
-+ dhp_bn = BN_bin2bn(dhp_1024, sizeof (dhp_1024), NULL);
-+ dhg_bn = BN_bin2bn(dhg_1024, sizeof (dhg_1024), NULL);
-+ if (dhp_bn == NULL || dhg_bn == NULL
-+ || !my_DH_set0_pqg(dh, dhp_bn, NULL, dhg_bn)) {
-+ DH_free(dh);
-+ BN_free(dhp_bn);
-+ BN_free(dhg_bn);
-+ return NULL;
-+ }
-+ return dh;
-+}
-+#ifndef HEADER_DH_H
-+# include <openssl/dh.h>
-+#endif
-+
-+DH *get_dh2048(void)
-+{
-+ static unsigned char dhp_2048[] = {
-+ 0xF6, 0x42, 0x57, 0xB7, 0x08, 0x7F, 0x08, 0x17, 0x72, 0xA2,
-+ 0xBA, 0xD6, 0xA9, 0x42, 0xF3, 0x05, 0xE8, 0xF9, 0x53, 0x11,
-+ 0x39, 0x4F, 0xB6, 0xF1, 0x6E, 0xB9, 0x4B, 0x38, 0x20, 0xDA,
-+ 0x01, 0xA7, 0x56, 0xA3, 0x14, 0xE9, 0x8F, 0x40, 0x55, 0xF3,
-+ 0xD0, 0x07, 0xC6, 0xCB, 0x43, 0xA9, 0x94, 0xAD, 0xF7, 0x4C,
-+ 0x64, 0x86, 0x49, 0xF8, 0x0C, 0x83, 0xBD, 0x65, 0xE9, 0x17,
-+ 0xD4, 0xA1, 0xD3, 0x50, 0xF8, 0xF5, 0x59, 0x5F, 0xDC, 0x76,
-+ 0x52, 0x4F, 0x3D, 0x3D, 0x8D, 0xDB, 0xCE, 0x99, 0xE1, 0x57,
-+ 0x92, 0x59, 0xCD, 0xFD, 0xB8, 0xAE, 0x74, 0x4F, 0xC5, 0xFC,
-+ 0x76, 0xBC, 0x83, 0xC5, 0x47, 0x30, 0x61, 0xCE, 0x7C, 0xC9,
-+ 0x66, 0xFF, 0x15, 0xF9, 0xBB, 0xFD, 0x91, 0x5E, 0xC7, 0x01,
-+ 0xAA, 0xD3, 0x5B, 0x9E, 0x8D, 0xA0, 0xA5, 0x72, 0x3A, 0xD4,
-+ 0x1A, 0xF0, 0xBF, 0x46, 0x00, 0x58, 0x2B, 0xE5, 0xF4, 0x88,
-+ 0xFD, 0x58, 0x4E, 0x49, 0xDB, 0xCD, 0x20, 0xB4, 0x9D, 0xE4,
-+ 0x91, 0x07, 0x36, 0x6B, 0x33, 0x6C, 0x38, 0x0D, 0x45, 0x1D,
-+ 0x0F, 0x7C, 0x88, 0xB3, 0x1C, 0x7C, 0x5B, 0x2D, 0x8E, 0xF6,
-+ 0xF3, 0xC9, 0x23, 0xC0, 0x43, 0xF0, 0xA5, 0x5B, 0x18, 0x8D,
-+ 0x8E, 0xBB, 0x55, 0x8C, 0xB8, 0x5D, 0x38, 0xD3, 0x34, 0xFD,
-+ 0x7C, 0x17, 0x57, 0x43, 0xA3, 0x1D, 0x18, 0x6C, 0xDE, 0x33,
-+ 0x21, 0x2C, 0xB5, 0x2A, 0xFF, 0x3C, 0xE1, 0xB1, 0x29, 0x40,
-+ 0x18, 0x11, 0x8D, 0x7C, 0x84, 0xA7, 0x0A, 0x72, 0xD6, 0x86,
-+ 0xC4, 0x03, 0x19, 0xC8, 0x07, 0x29, 0x7A, 0xCA, 0x95, 0x0C,
-+ 0xD9, 0x96, 0x9F, 0xAB, 0xD0, 0x0A, 0x50, 0x9B, 0x02, 0x46,
-+ 0xD3, 0x08, 0x3D, 0x66, 0xA4, 0x5D, 0x41, 0x9F, 0x9C, 0x7C,
-+ 0xBD, 0x89, 0x4B, 0x22, 0x19, 0x26, 0xBA, 0xAB, 0xA2, 0x5E,
-+ 0xC3, 0x55, 0xE9, 0x32, 0x0B, 0x3B
-+ };
-+ static unsigned char dhg_2048[] = {
-+ 0x02
-+ };
-+ DH *dh = DH_new();
-+ BIGNUM *dhp_bn, *dhg_bn;
-+
-+ if (dh == NULL)
-+ return NULL;
-+ dhp_bn = BN_bin2bn(dhp_2048, sizeof (dhp_2048), NULL);
-+ dhg_bn = BN_bin2bn(dhg_2048, sizeof (dhg_2048), NULL);
-+ if (dhp_bn == NULL || dhg_bn == NULL
-+ || !my_DH_set0_pqg(dh, dhp_bn, NULL, dhg_bn)) {
-+ DH_free(dh);
-+ BN_free(dhp_bn);
-+ BN_free(dhg_bn);
-+ return NULL;
-+ }
-+ return dh;
-+}
-+#ifndef HEADER_DH_H
-+# include <openssl/dh.h>
-+#endif
-+
-+DH *get_dh4096(void)
-+{
-+ static unsigned char dhp_4096[] = {
-+ 0xFA, 0x14, 0x72, 0x52, 0xC1, 0x4D, 0xE1, 0x5A, 0x49, 0xD4,
-+ 0xEF, 0x09, 0x2D, 0xC0, 0xA8, 0xFD, 0x55, 0xAB, 0xD7, 0xD9,
-+ 0x37, 0x04, 0x28, 0x09, 0xE2, 0xE9, 0x3E, 0x77, 0xE2, 0xA1,
-+ 0x7A, 0x18, 0xDD, 0x46, 0xA3, 0x43, 0x37, 0x23, 0x90, 0x97,
-+ 0xF3, 0x0E, 0xC9, 0x03, 0x50, 0x7D, 0x65, 0xCF, 0x78, 0x62,
-+ 0xA6, 0x3A, 0x62, 0x22, 0x83, 0xA1, 0x2F, 0xFE, 0x79, 0xBA,
-+ 0x35, 0xFF, 0x59, 0xD8, 0x1D, 0x61, 0xDD, 0x1E, 0x21, 0x13,
-+ 0x17, 0xFE, 0xCD, 0x38, 0x87, 0x9E, 0xF5, 0x4F, 0x79, 0x10,
-+ 0x61, 0x8D, 0xD4, 0x22, 0xF3, 0x5A, 0xED, 0x5D, 0xEA, 0x21,
-+ 0xE9, 0x33, 0x6B, 0x48, 0x12, 0x0A, 0x20, 0x77, 0xD4, 0x25,
-+ 0x60, 0x61, 0xDE, 0xF6, 0xB4, 0x4F, 0x1C, 0x63, 0x40, 0x8B,
-+ 0x3A, 0x21, 0x93, 0x8B, 0x79, 0x53, 0x51, 0x2C, 0xCA, 0xB3,
-+ 0x7B, 0x29, 0x56, 0xA8, 0xC7, 0xF8, 0xF4, 0x7B, 0x08, 0x5E,
-+ 0xA6, 0xDC, 0xA2, 0x45, 0x12, 0x56, 0xDD, 0x41, 0x92, 0xF2,
-+ 0xDD, 0x5B, 0x8F, 0x23, 0xF0, 0xF3, 0xEF, 0xE4, 0x3B, 0x0A,
-+ 0x44, 0xDD, 0xED, 0x96, 0x84, 0xF1, 0xA8, 0x32, 0x46, 0xA3,
-+ 0xDB, 0x4A, 0xBE, 0x3D, 0x45, 0xBA, 0x4E, 0xF8, 0x03, 0xE5,
-+ 0xDD, 0x6B, 0x59, 0x0D, 0x84, 0x1E, 0xCA, 0x16, 0x5A, 0x8C,
-+ 0xC8, 0xDF, 0x7C, 0x54, 0x44, 0xC4, 0x27, 0xA7, 0x3B, 0x2A,
-+ 0x97, 0xCE, 0xA3, 0x7D, 0x26, 0x9C, 0xAD, 0xF4, 0xC2, 0xAC,
-+ 0x37, 0x4B, 0xC3, 0xAD, 0x68, 0x84, 0x7F, 0x99, 0xA6, 0x17,
-+ 0xEF, 0x6B, 0x46, 0x3A, 0x7A, 0x36, 0x7A, 0x11, 0x43, 0x92,
-+ 0xAD, 0xE9, 0x9C, 0xFB, 0x44, 0x6C, 0x3D, 0x82, 0x49, 0xCC,
-+ 0x5C, 0x6A, 0x52, 0x42, 0xF8, 0x42, 0xFB, 0x44, 0xF9, 0x39,
-+ 0x73, 0xFB, 0x60, 0x79, 0x3B, 0xC2, 0x9E, 0x0B, 0xDC, 0xD4,
-+ 0xA6, 0x67, 0xF7, 0x66, 0x3F, 0xFC, 0x42, 0x3B, 0x1B, 0xDB,
-+ 0x4F, 0x66, 0xDC, 0xA5, 0x8F, 0x66, 0xF9, 0xEA, 0xC1, 0xED,
-+ 0x31, 0xFB, 0x48, 0xA1, 0x82, 0x7D, 0xF8, 0xE0, 0xCC, 0xB1,
-+ 0xC7, 0x03, 0xE4, 0xF8, 0xB3, 0xFE, 0xB7, 0xA3, 0x13, 0x73,
-+ 0xA6, 0x7B, 0xC1, 0x0E, 0x39, 0xC7, 0x94, 0x48, 0x26, 0x00,
-+ 0x85, 0x79, 0xFC, 0x6F, 0x7A, 0xAF, 0xC5, 0x52, 0x35, 0x75,
-+ 0xD7, 0x75, 0xA4, 0x40, 0xFA, 0x14, 0x74, 0x61, 0x16, 0xF2,
-+ 0xEB, 0x67, 0x11, 0x6F, 0x04, 0x43, 0x3D, 0x11, 0x14, 0x4C,
-+ 0xA7, 0x94, 0x2A, 0x39, 0xA1, 0xC9, 0x90, 0xCF, 0x83, 0xC6,
-+ 0xFF, 0x02, 0x8F, 0xA3, 0x2A, 0xAC, 0x26, 0xDF, 0x0B, 0x8B,
-+ 0xBE, 0x64, 0x4A, 0xF1, 0xA1, 0xDC, 0xEE, 0xBA, 0xC8, 0x03,
-+ 0x82, 0xF6, 0x62, 0x2C, 0x5D, 0xB6, 0xBB, 0x13, 0x19, 0x6E,
-+ 0x86, 0xC5, 0x5B, 0x2B, 0x5E, 0x3A, 0xF3, 0xB3, 0x28, 0x6B,
-+ 0x70, 0x71, 0x3A, 0x8E, 0xFF, 0x5C, 0x15, 0xE6, 0x02, 0xA4,
-+ 0xCE, 0xED, 0x59, 0x56, 0xCC, 0x15, 0x51, 0x07, 0x79, 0x1A,
-+ 0x0F, 0x25, 0x26, 0x27, 0x30, 0xA9, 0x15, 0xB2, 0xC8, 0xD4,
-+ 0x5C, 0xCC, 0x30, 0xE8, 0x1B, 0xD8, 0xD5, 0x0F, 0x19, 0xA8,
-+ 0x80, 0xA4, 0xC7, 0x01, 0xAA, 0x8B, 0xBA, 0x53, 0xBB, 0x47,
-+ 0xC2, 0x1F, 0x6B, 0x54, 0xB0, 0x17, 0x60, 0xED, 0x79, 0x21,
-+ 0x95, 0xB6, 0x05, 0x84, 0x37, 0xC8, 0x03, 0xA4, 0xDD, 0xD1,
-+ 0x06, 0x69, 0x8F, 0x4C, 0x39, 0xE0, 0xC8, 0x5D, 0x83, 0x1D,
-+ 0xBE, 0x6A, 0x9A, 0x99, 0xF3, 0x9F, 0x0B, 0x45, 0x29, 0xD4,
-+ 0xCB, 0x29, 0x66, 0xEE, 0x1E, 0x7E, 0x3D, 0xD7, 0x13, 0x4E,
-+ 0xDB, 0x90, 0x90, 0x58, 0xCB, 0x5E, 0x9B, 0xCD, 0x2E, 0x2B,
-+ 0x0F, 0xA9, 0x4E, 0x78, 0xAC, 0x05, 0x11, 0x7F, 0xE3, 0x9E,
-+ 0x27, 0xD4, 0x99, 0xE1, 0xB9, 0xBD, 0x78, 0xE1, 0x84, 0x41,
-+ 0xA0, 0xDF
-+ };
-+ static unsigned char dhg_4096[] = {
-+ 0x02
-+ };
-+ DH *dh = DH_new();
-+ BIGNUM *dhp_bn, *dhg_bn;
-+
-+ if (dh == NULL)
-+ return NULL;
-+ dhp_bn = BN_bin2bn(dhp_4096, sizeof (dhp_4096), NULL);
-+ dhg_bn = BN_bin2bn(dhg_4096, sizeof (dhg_4096), NULL);
-+ if (dhp_bn == NULL || dhg_bn == NULL
-+ || !my_DH_set0_pqg(dh, dhp_bn, NULL, dhg_bn)) {
-+ DH_free(dh);
-+ BN_free(dhp_bn);
-+ BN_free(dhg_bn);
-+ return NULL;
-+ }
-+ return dh;
-+}
---
-2.16.4
-
--- /dev/null
+From 2a59f2b60e8a22dc93d48c511b5c4255b429ff66 Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <zhouyousong@yunionyun.com>
+Date: Wed, 5 Sep 2018 12:32:54 +0000
+Subject: [PATCH 106/107] ovs-save: compatible with busybox ip command
+
+Busybox ip command will have exit code 1 for `ip -V` or `ip help` etc.,
+use `ip rule list` to cover both iproute2 and busybox ip command
+
+Signed-off-by: Yousong Zhou <zhouyousong@yunionyun.com>
+---
+ utilities/ovs-save | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/utilities/ovs-save b/utilities/ovs-save
+index ea8fb6a45..72d460df4 100755
+--- a/utilities/ovs-save
++++ b/utilities/ovs-save
+@@ -38,7 +38,7 @@ EOF
+ }
+
+ save_interfaces () {
+- if (ip -V) > /dev/null 2>&1; then :; else
++ if (ip rule list) > /dev/null 2>&1; then :; else
+ echo "$0: ip not found in $PATH" >&2
+ exit 1
+ fi
--- /dev/null
+From 1e859f407b94a0f549fc41fceec11ca12653878b Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <zhouyousong@yunionyun.com>
+Date: Thu, 6 Sep 2018 11:48:20 +0000
+Subject: [PATCH 107/107] datapath: use KARCH when building linux datapath
+ modules
+
+Signed-off-by: Yousong Zhou <zhouyousong@yunionyun.com>
+---
+ datapath/linux/Makefile.main.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/datapath/linux/Makefile.main.in b/datapath/linux/Makefile.main.in
+index 7d18253be..039485d16 100644
+--- a/datapath/linux/Makefile.main.in
++++ b/datapath/linux/Makefile.main.in
+@@ -68,10 +68,10 @@ ifeq (,$(wildcard $(CONFIG_FILE)))
+ endif
+
+ default:
+- $(MAKE) -C $(KSRC) M=$(builddir) modules
++ $(MAKE) -C $(KSRC) $(if @KARCH@,ARCH=@KARCH@) M=$(builddir) modules
+
+ modules_install:
+- $(MAKE) -C $(KSRC) M=$(builddir) modules_install
++ $(MAKE) -C $(KSRC) $(if @KARCH@,ARCH=@KARCH@) M=$(builddir) modules_install
+ depmod `sed -n 's/#define UTS_RELEASE "\([^"]*\)"/\1/p' $(KSRC)/include/generated/utsrelease.h`
+ endif
+
+++ /dev/null
-#
-# Copyright (C) 2006-2011 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=portmap
-PKG_VERSION:=6.0
-PKG_RELEASE:=4
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
-PKG_SOURCE_URL:=http://neil.brown.name/portmap/
-PKG_HASH:=02c820d39f3e6e729d1bea3287a2d8a6c684f1006fb9612f97dcad4a281d41de
-
-PKG_LICENSE:=BSD-4c
-PKG_LICENSE_FILES:=portmap.man
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION)
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/portmap
- SECTION:=net
- CATEGORY:=Network
- DEPENDS:=+libwrap $(LIBRPC_DEPENDS)
- TITLE:=The RPC Portmapper
- URL:=http://neil.brown.name/portmap/
- MAINTAINER:=Peter Wagner <tripolar@gmx.at>
- USERID:=rpc=65533:rpc=65533
-endef
-
-define Package/portmap/description
- Portmap is a server that converts RPC (Remote Procedure Call) program
- numbers into DARPA protocol port numbers.
-endef
-
-MAKE_FLAGS += \
- CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -DHOSTS_ACCESS -DFACILITY=LOG_DAEMON -DIGNORE_SIGCHLD" \
- RPCUSER="rpc" \
- LDLIBS="$(TARGET_LDFLAGS) -lwrap $(LIBRPC)" \
- all
-
-define Package/portmap/install
- $(INSTALL_DIR) $(1)/usr/sbin
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/portmap $(1)/usr/sbin/
- $(INSTALL_DIR) $(1)/etc/init.d
- $(INSTALL_BIN) ./files/portmap.init $(1)/etc/init.d/portmap
-endef
-
-$(eval $(call BuildPackage,portmap))
+++ /dev/null
-#!/bin/sh /etc/rc.common
-# Copyright (C) 2006-2011 OpenWrt.org
-
-START=19
-STOP=19
-
-USE_PROCD=1
-
-start_service() {
- procd_open_instance
- procd_set_param command /usr/sbin/portmap -f
- procd_close_instance
-}
+++ /dev/null
-diff -ur portmap_6.0.org/Makefile portmap_6.0/Makefile
---- portmap_6.0.org/Makefile 2008-04-19 22:44:35.000000000 +0200
-+++ portmap_6.0/Makefile 2008-04-19 00:02:01.000000000 +0200
-@@ -127,7 +127,7 @@
- CPPFLAGS += $(HOSTS_ACCESS)
- portmap: CFLAGS += -fpie
- portmap: LDLIBS += $(WRAP_LIB)
--portmap: LDFLAGS += -pie
-+#portmap: LDFLAGS += -pie
- portmap: portmap.o pmap_check.o from_local.o
-
- from_local: CPPFLAGS += -DTEST
PKG_NAME:=radicale
PKG_VERSION:=1.1.6
-PKG_RELEASE:=1
-PKG_MAINTAINER:=Christian Schoenebeck <christian.schoenebeck@gmail.com>
+PKG_RELEASE:=2
+PKG_MAINTAINER:=
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=COPYING
START=80
STOP=10
+EXTRA_COMMANDS="export_storage"
+EXTRA_HELP=" export_storage <PATH>
+ - export the storage into the specified folder
+ - <PATH> can be directly used with the default storage backend of Radicale 2.x.x."
+
CFGDIR=/var/etc/radicale
SYSCFG=$CFGDIR/config
LOGCFG=$CFGDIR/logging
chgrp -R radicale $DATADIR
}
+export_storage() {
+ # if already running do nothing
+ local _PID=$(eval "$PGREP")
+ kill -1 $_PID 2>/dev/null && {
+ echo "Export failed !!! - Service running !" >&2
+ logger -p user.error -t "radicale[$_PID]" "Export failed !!! - Service running !"
+ return 1
+ }
+
+ [ $# -ne 1 ] || [ ! -d $1 ] && {
+ echo "Export failed !!! Directory not given or does not exist !" >&2
+ logger -p user.error -t "radicale[----]" "Export failed !!! Directory not given or does not exist !"
+ return 1
+ }
+
+ _uci2radicale
+ _set_permission
+
+ chmod 775 $1
+ chgrp radicale $1
+
+ radicale --config=$SYSCFG --export-storage $1/export
+}
+
boot() {
# wait a given time (default 10 seconds) before startup
# to wait for interfaces to come up / not using hotplug events during boot
include $(TOPDIR)/rules.mk
PKG_NAME:=radsecproxy
-PKG_VERSION:=1.7.1
+PKG_VERSION:=1.7.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/radsecproxy/radsecproxy/releases/download/$(PKG_VERSION)/
-PKG_HASH:=49fd644684c6ea502d896d31e29f1acf2ae9b61b02b231a8ffd0cec11857dd07
+PKG_HASH:=2cf23e618ab9275221350acf5a97bce4ff18aee472045f8a3b4c7673491079d2
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=BSD-3-CLAUSE
PKG_LICENSE_FILES:=LICENSE
PKG_FIXUP:=autoreconf
+++ /dev/null
---- a/debug.c
-+++ b/debug.c
-@@ -153,7 +153,7 @@ void debug_logit(uint8_t level, const ch
-
- if (debug_tid) {
- tidbuf = malloc((3*sizeof(pthread_t)+5)+strlen(format));
-- sprintf(tidbuf, "(%ld) %s", pthread_self(), format);
-+ sprintf(tidbuf, "(%ld) %s", (long int)pthread_self(), format);
- format = tidbuf;
- } else
- tidbuf = NULL;
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=rpcbind
+PKG_VERSION:=1.2.5
+PKG_RELEASE:=1
+
+PKG_SOURCE_URL:=@SF/rpcbind
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_HASH:=2ce360683963b35c19c43f0ee2c7f18aa5b81ef41c3fdbd15ffcb00b8bffda7a
+
+PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
+PKG_LICENSE:=BSD-3-Clause
+
+PKG_FIXUP:=autoreconf
+PKG_REMOVE_FILES:=autogen.sh aclocal.m4
+PKG_INSTALL:=1
+
+PKG_CONFIG_DEPENDS:= \
+ CONFIG_RPCBIND_LIBWRAP \
+ CONFIG_RPCBIND_WARMSTARTS
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/rpcbind
+ SECTION:=net
+ CATEGORY:=Network
+ DEPENDS:=+libtirpc +RPCBIND_LIBWRAP:libwrap
+ TITLE:=Universal addresses to RPC mapper
+ URL:=http://rpcbind.sourceforge.net/
+ USERID:=rpc=65533:rpc=65533
+endef
+
+define Package/rpcbind/description
+ The rpcbind utility is a server that converts RPC program numbers into universal addresses.
+ It must be running on the host to be able to make RPC calls on a server on that machine.
+
+ Rpcbind replaces portmap for NFS v2/v3. It has more features, like ipv6 support.
+ Note: Nfs4 only configurations can run without it.
+endef
+
+define Package/rpcbind/config
+if PACKAGE_rpcbind
+ config RPCBIND_LIBWRAP
+ bool "Enable libwrap (TCP wrappers) support."
+ default y
+
+ config RPCBIND_WARMSTARTS
+ bool "Enable warmstarts support"
+ default y
+ help
+ The warmstart feature saves RPC registrations on termination.
+endif
+endef
+
+CONFIGURE_ARGS += \
+ --with-rpcuser=rpc \
+ --without-systemdsystemunitdir
+
+ifeq ($(CONFIG_RPCBIND_LIBWRAP),y)
+ CONFIGURE_ARGS += --enable-libwrap
+else
+ CONFIGURE_ARGS += --disable-libwrap
+endif
+ifeq ($(CONFIG_RPCBIND_WARMSTARTS),y)
+ CONFIGURE_ARGS += --enable-warmstarts
+endif
+
+define Package/rpcbind/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rpcinfo $(1)/usr/bin/
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rpcbind $(1)/usr/sbin/
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/rpcbind.init $(1)/etc/init.d/rpcbind
+endef
+
+$(eval $(call BuildPackage,rpcbind))
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=19
+STOP=19
+
+USE_PROCD=1
+
+start_service() {
+ procd_open_instance
+ procd_set_param command /usr/sbin/rpcbind -f -w
+ procd_set_param respawn
+ procd_close_instance
+}
include $(TOPDIR)/rules.mk
PKG_NAME:=rsyslog
-PKG_VERSION:=8.18.0
+PKG_VERSION:=8.38.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.rsyslog.com/files/download/rsyslog/
-PKG_HASH:=94346237ecfa22c9f78cebc3f18d59056f5d9846eb906c75beaa7e486f02c695
+PKG_SOURCE_URL:=https://www.rsyslog.com/files/download/rsyslog/
+PKG_HASH:=4d328ed3bcae784e15401c6c20ada2a9be380798ff6bf0da3fe2095915bba22c
-PKG_MAINTAINER:=Dov Murik <dmurik@us.ibm.com>
+PKG_MAINTAINER:=
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=COPYING
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
-PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk
SECTION:=net
CATEGORY:=Network
TITLE:=Enhanced system logging and kernel message trapping daemons
- URL:=http://www.rsyslog.com/
+ URL:=https://www.rsyslog.com/
DEPENDS:=+libestr +libfastjson +libuuid +zlib +USE_UCLIBC:libpthread +USE_UCLIBC:librt
endef
CONFIGURE_ARGS+= \
--disable-libgcrypt \
- --disable-liblogging-stdlog
-
-TARGET_CFLAGS += \
- -std=c99
+ --disable-fmhttp \
+ --disable-default-tests \
+ --disable-libsystemd
define Package/rsyslog/install
$(INSTALL_DIR) $(1)/usr/sbin
--- /dev/null
+#
+# Copyright (c) 2018 Gregory L. Dietsche <Gregory.Dietsche@cuw.edu>
+# This is free software, licensed under the MIT License
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=safe-search
+PKG_VERSION:=1.0.0
+PKG_RELEASE:=1
+PKG_LICENSE:=MIT
+PKG_MAINTAINER:=Gregory L. Dietsche <Gregory.Dietsche@cuw.edu>
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/safe-search
+ SECTION:=net
+ CATEGORY:=Network
+ TITLE:=Safe Search
+ PKGARCH:=all
+endef
+
+define Package/safe-search/description
+This package prevents adult content from appearing in search results by
+configuring dnsmasq to force all devices on your network to use Google and
+Bing's Safe Search IP addresses. This is designed to be approperiate for most
+businesses and families. The default filtering rules do not interfere with
+normal web browsing.
+endef
+
+define Package/safe-search/conffiles
+/etc/config/safe-search
+endef
+
+define Build/Compile
+endef
+
+define Package/safe-search/install
+ $(INSTALL_DIR) $(1)/etc/uci-defaults
+ $(CP) ./files/safe-search.defaults $(1)/etc/uci-defaults/safe-search
+
+ $(INSTALL_DIR) $(1)/etc/config
+ $(INSTALL_CONF) ./files/safe-search.conf $(1)/etc/config/safe-search
+
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) ./files/safe-search-update $(1)/usr/sbin/safe-search-update
+
+ $(INSTALL_DIR) $(1)/etc/safe-search/enabled
+ $(INSTALL_DIR) $(1)/etc/safe-search/available
+ $(INSTALL_DATA) ./files/hosts/* $(1)/etc/safe-search/available/
+endef
+
+define Package/safe-search/prerm
+#!/bin/sh
+if [ -z "$${IPGK_INSTROOT}" ]; then
+ uci del_list dhcp.@dnsmasq[0].addnhosts=/etc/safe-search/enabled
+ uci commit dhcp
+ /etc/init.d/dnsmasq reload
+fi
+exit 0
+endef
+
+define Package/safe-search/postrm
+#!/bin/sh
+if [ -z "$${IPGK_INSTROOT}" ]; then
+ rm -rf /etc/safe-search/enabled
+ rmdir /etc/safe-search/available
+ rmdir /etc/safe-search/
+fi
+exit 0
+endef
+
+$(eval $(call BuildPackage,safe-search))
--- /dev/null
+# Package: net/safe-search
+
+This package prevents adult content from appearing in search results by
+configuring dnsmasq to force all devices on your network to use Google and
+Bing's Safe Search IP addresses. This is designed to be approperiate for most
+businesses and families. The default filtering rules do not interfere with
+normal web browsing.
+
+Currently supported:
+- Google Safe Search - enabled by default
+ - https://support.google.com/websearch/answer/186669
+- Bing Safe Search - enabled by default
+ - https://help.bing.microsoft.com/#apex/18/en-US/10003/0
+- youtube Safe Search
+ - https://support.google.com/a/answer/6214622
+ - https://support.google.com/a/answer/6212415
+ - https://www.youtube.com/check_content_restrictions
+ - Not enabled by default because it is designed for children.
+ - Enable by editing /etc/config/safe-search and then run safe-search-update
--- /dev/null
+#
+# Copyright (c) 2018 Gregory L. Dietsche <Gregory.Dietsche@cuw.edu>
+# This is free software, licensed under the MIT License
+#
+
+#
+# IMPORTANT: if this file is not working, make sure that dnsmasq is able to READ it!
+#
+
+#204.79.197.220 strict.bing.com
+#::FFFF:CC4F:C5DC strict.bing.com
+
+204.79.197.220 bing.com www.bing.com
+::FFFF:CC4F:C5DC bing.com www.bing.com
--- /dev/null
+#
+# Copyright (c) 2018 Gregory L. Dietsche <Gregory.Dietsche@cuw.edu>
+# This is free software, licensed under the MIT License
+#
+# IMPORTANT: if this file is not working, make sure that dnsmasq is able to READ it!
+#
+# Google Safe Search Host List
+# Generated on Wed Oct 10 10:18:34 CDT 2018
+# From: https://www.google.com/supported_domains
+
+#2001:4860:4802:32::78 forcesafesearch.google.com
+#216.239.38.120 forcesafesearch.google.com
+
+2001:4860:4802:32::78 google.com
+2001:4860:4802:32::78 google.ad
+2001:4860:4802:32::78 google.ae
+2001:4860:4802:32::78 google.com.af
+2001:4860:4802:32::78 google.com.ag
+2001:4860:4802:32::78 google.com.ai
+2001:4860:4802:32::78 google.al
+2001:4860:4802:32::78 google.am
+2001:4860:4802:32::78 google.co.ao
+2001:4860:4802:32::78 google.com.ar
+2001:4860:4802:32::78 google.as
+2001:4860:4802:32::78 google.at
+2001:4860:4802:32::78 google.com.au
+2001:4860:4802:32::78 google.az
+2001:4860:4802:32::78 google.ba
+2001:4860:4802:32::78 google.com.bd
+2001:4860:4802:32::78 google.be
+2001:4860:4802:32::78 google.bf
+2001:4860:4802:32::78 google.bg
+2001:4860:4802:32::78 google.com.bh
+2001:4860:4802:32::78 google.bi
+2001:4860:4802:32::78 google.bj
+2001:4860:4802:32::78 google.com.bn
+2001:4860:4802:32::78 google.com.bo
+2001:4860:4802:32::78 google.com.br
+2001:4860:4802:32::78 google.bs
+2001:4860:4802:32::78 google.bt
+2001:4860:4802:32::78 google.co.bw
+2001:4860:4802:32::78 google.by
+2001:4860:4802:32::78 google.com.bz
+2001:4860:4802:32::78 google.ca
+2001:4860:4802:32::78 google.cd
+2001:4860:4802:32::78 google.cf
+2001:4860:4802:32::78 google.cg
+2001:4860:4802:32::78 google.ch
+2001:4860:4802:32::78 google.ci
+2001:4860:4802:32::78 google.co.ck
+2001:4860:4802:32::78 google.cl
+2001:4860:4802:32::78 google.cm
+2001:4860:4802:32::78 google.cn
+2001:4860:4802:32::78 google.com.co
+2001:4860:4802:32::78 google.co.cr
+2001:4860:4802:32::78 google.com.cu
+2001:4860:4802:32::78 google.cv
+2001:4860:4802:32::78 google.com.cy
+2001:4860:4802:32::78 google.cz
+2001:4860:4802:32::78 google.de
+2001:4860:4802:32::78 google.dj
+2001:4860:4802:32::78 google.dk
+2001:4860:4802:32::78 google.dm
+2001:4860:4802:32::78 google.com.do
+2001:4860:4802:32::78 google.dz
+2001:4860:4802:32::78 google.com.ec
+2001:4860:4802:32::78 google.ee
+2001:4860:4802:32::78 google.com.eg
+2001:4860:4802:32::78 google.es
+2001:4860:4802:32::78 google.com.et
+2001:4860:4802:32::78 google.fi
+2001:4860:4802:32::78 google.com.fj
+2001:4860:4802:32::78 google.fm
+2001:4860:4802:32::78 google.fr
+2001:4860:4802:32::78 google.ga
+2001:4860:4802:32::78 google.ge
+2001:4860:4802:32::78 google.gg
+2001:4860:4802:32::78 google.com.gh
+2001:4860:4802:32::78 google.com.gi
+2001:4860:4802:32::78 google.gl
+2001:4860:4802:32::78 google.gm
+2001:4860:4802:32::78 google.gp
+2001:4860:4802:32::78 google.gr
+2001:4860:4802:32::78 google.com.gt
+2001:4860:4802:32::78 google.gy
+2001:4860:4802:32::78 google.com.hk
+2001:4860:4802:32::78 google.hn
+2001:4860:4802:32::78 google.hr
+2001:4860:4802:32::78 google.ht
+2001:4860:4802:32::78 google.hu
+2001:4860:4802:32::78 google.co.id
+2001:4860:4802:32::78 google.ie
+2001:4860:4802:32::78 google.co.il
+2001:4860:4802:32::78 google.im
+2001:4860:4802:32::78 google.co.in
+2001:4860:4802:32::78 google.iq
+2001:4860:4802:32::78 google.is
+2001:4860:4802:32::78 google.it
+2001:4860:4802:32::78 google.je
+2001:4860:4802:32::78 google.com.jm
+2001:4860:4802:32::78 google.jo
+2001:4860:4802:32::78 google.co.jp
+2001:4860:4802:32::78 google.co.ke
+2001:4860:4802:32::78 google.com.kh
+2001:4860:4802:32::78 google.ki
+2001:4860:4802:32::78 google.kg
+2001:4860:4802:32::78 google.co.kr
+2001:4860:4802:32::78 google.com.kw
+2001:4860:4802:32::78 google.kz
+2001:4860:4802:32::78 google.la
+2001:4860:4802:32::78 google.com.lb
+2001:4860:4802:32::78 google.li
+2001:4860:4802:32::78 google.lk
+2001:4860:4802:32::78 google.co.ls
+2001:4860:4802:32::78 google.lt
+2001:4860:4802:32::78 google.lu
+2001:4860:4802:32::78 google.lv
+2001:4860:4802:32::78 google.com.ly
+2001:4860:4802:32::78 google.co.ma
+2001:4860:4802:32::78 google.md
+2001:4860:4802:32::78 google.me
+2001:4860:4802:32::78 google.mg
+2001:4860:4802:32::78 google.mk
+2001:4860:4802:32::78 google.ml
+2001:4860:4802:32::78 google.com.mm
+2001:4860:4802:32::78 google.mn
+2001:4860:4802:32::78 google.ms
+2001:4860:4802:32::78 google.com.mt
+2001:4860:4802:32::78 google.mu
+2001:4860:4802:32::78 google.mv
+2001:4860:4802:32::78 google.mw
+2001:4860:4802:32::78 google.com.mx
+2001:4860:4802:32::78 google.com.my
+2001:4860:4802:32::78 google.co.mz
+2001:4860:4802:32::78 google.com.na
+2001:4860:4802:32::78 google.com.nf
+2001:4860:4802:32::78 google.com.ng
+2001:4860:4802:32::78 google.com.ni
+2001:4860:4802:32::78 google.ne
+2001:4860:4802:32::78 google.nl
+2001:4860:4802:32::78 google.no
+2001:4860:4802:32::78 google.com.np
+2001:4860:4802:32::78 google.nr
+2001:4860:4802:32::78 google.nu
+2001:4860:4802:32::78 google.co.nz
+2001:4860:4802:32::78 google.com.om
+2001:4860:4802:32::78 google.com.pa
+2001:4860:4802:32::78 google.com.pe
+2001:4860:4802:32::78 google.com.pg
+2001:4860:4802:32::78 google.com.ph
+2001:4860:4802:32::78 google.com.pk
+2001:4860:4802:32::78 google.pl
+2001:4860:4802:32::78 google.pn
+2001:4860:4802:32::78 google.com.pr
+2001:4860:4802:32::78 google.ps
+2001:4860:4802:32::78 google.pt
+2001:4860:4802:32::78 google.com.py
+2001:4860:4802:32::78 google.com.qa
+2001:4860:4802:32::78 google.ro
+2001:4860:4802:32::78 google.ru
+2001:4860:4802:32::78 google.rw
+2001:4860:4802:32::78 google.com.sa
+2001:4860:4802:32::78 google.com.sb
+2001:4860:4802:32::78 google.sc
+2001:4860:4802:32::78 google.se
+2001:4860:4802:32::78 google.com.sg
+2001:4860:4802:32::78 google.sh
+2001:4860:4802:32::78 google.si
+2001:4860:4802:32::78 google.sk
+2001:4860:4802:32::78 google.com.sl
+2001:4860:4802:32::78 google.sn
+2001:4860:4802:32::78 google.so
+2001:4860:4802:32::78 google.sm
+2001:4860:4802:32::78 google.sr
+2001:4860:4802:32::78 google.st
+2001:4860:4802:32::78 google.com.sv
+2001:4860:4802:32::78 google.td
+2001:4860:4802:32::78 google.tg
+2001:4860:4802:32::78 google.co.th
+2001:4860:4802:32::78 google.com.tj
+2001:4860:4802:32::78 google.tk
+2001:4860:4802:32::78 google.tl
+2001:4860:4802:32::78 google.tm
+2001:4860:4802:32::78 google.tn
+2001:4860:4802:32::78 google.to
+2001:4860:4802:32::78 google.com.tr
+2001:4860:4802:32::78 google.tt
+2001:4860:4802:32::78 google.com.tw
+2001:4860:4802:32::78 google.co.tz
+2001:4860:4802:32::78 google.com.ua
+2001:4860:4802:32::78 google.co.ug
+2001:4860:4802:32::78 google.co.uk
+2001:4860:4802:32::78 google.com.uy
+2001:4860:4802:32::78 google.co.uz
+2001:4860:4802:32::78 google.com.vc
+2001:4860:4802:32::78 google.co.ve
+2001:4860:4802:32::78 google.vg
+2001:4860:4802:32::78 google.co.vi
+2001:4860:4802:32::78 google.com.vn
+2001:4860:4802:32::78 google.vu
+2001:4860:4802:32::78 google.ws
+2001:4860:4802:32::78 google.rs
+2001:4860:4802:32::78 google.co.za
+2001:4860:4802:32::78 google.co.zm
+2001:4860:4802:32::78 google.co.zw
+2001:4860:4802:32::78 google.cat
+2001:4860:4802:32::78 www.google.com
+2001:4860:4802:32::78 www.google.ad
+2001:4860:4802:32::78 www.google.ae
+2001:4860:4802:32::78 www.google.com.af
+2001:4860:4802:32::78 www.google.com.ag
+2001:4860:4802:32::78 www.google.com.ai
+2001:4860:4802:32::78 www.google.al
+2001:4860:4802:32::78 www.google.am
+2001:4860:4802:32::78 www.google.co.ao
+2001:4860:4802:32::78 www.google.com.ar
+2001:4860:4802:32::78 www.google.as
+2001:4860:4802:32::78 www.google.at
+2001:4860:4802:32::78 www.google.com.au
+2001:4860:4802:32::78 www.google.az
+2001:4860:4802:32::78 www.google.ba
+2001:4860:4802:32::78 www.google.com.bd
+2001:4860:4802:32::78 www.google.be
+2001:4860:4802:32::78 www.google.bf
+2001:4860:4802:32::78 www.google.bg
+2001:4860:4802:32::78 www.google.com.bh
+2001:4860:4802:32::78 www.google.bi
+2001:4860:4802:32::78 www.google.bj
+2001:4860:4802:32::78 www.google.com.bn
+2001:4860:4802:32::78 www.google.com.bo
+2001:4860:4802:32::78 www.google.com.br
+2001:4860:4802:32::78 www.google.bs
+2001:4860:4802:32::78 www.google.bt
+2001:4860:4802:32::78 www.google.co.bw
+2001:4860:4802:32::78 www.google.by
+2001:4860:4802:32::78 www.google.com.bz
+2001:4860:4802:32::78 www.google.ca
+2001:4860:4802:32::78 www.google.cd
+2001:4860:4802:32::78 www.google.cf
+2001:4860:4802:32::78 www.google.cg
+2001:4860:4802:32::78 www.google.ch
+2001:4860:4802:32::78 www.google.ci
+2001:4860:4802:32::78 www.google.co.ck
+2001:4860:4802:32::78 www.google.cl
+2001:4860:4802:32::78 www.google.cm
+2001:4860:4802:32::78 www.google.cn
+2001:4860:4802:32::78 www.google.com.co
+2001:4860:4802:32::78 www.google.co.cr
+2001:4860:4802:32::78 www.google.com.cu
+2001:4860:4802:32::78 www.google.cv
+2001:4860:4802:32::78 www.google.com.cy
+2001:4860:4802:32::78 www.google.cz
+2001:4860:4802:32::78 www.google.de
+2001:4860:4802:32::78 www.google.dj
+2001:4860:4802:32::78 www.google.dk
+2001:4860:4802:32::78 www.google.dm
+2001:4860:4802:32::78 www.google.com.do
+2001:4860:4802:32::78 www.google.dz
+2001:4860:4802:32::78 www.google.com.ec
+2001:4860:4802:32::78 www.google.ee
+2001:4860:4802:32::78 www.google.com.eg
+2001:4860:4802:32::78 www.google.es
+2001:4860:4802:32::78 www.google.com.et
+2001:4860:4802:32::78 www.google.fi
+2001:4860:4802:32::78 www.google.com.fj
+2001:4860:4802:32::78 www.google.fm
+2001:4860:4802:32::78 www.google.fr
+2001:4860:4802:32::78 www.google.ga
+2001:4860:4802:32::78 www.google.ge
+2001:4860:4802:32::78 www.google.gg
+2001:4860:4802:32::78 www.google.com.gh
+2001:4860:4802:32::78 www.google.com.gi
+2001:4860:4802:32::78 www.google.gl
+2001:4860:4802:32::78 www.google.gm
+2001:4860:4802:32::78 www.google.gp
+2001:4860:4802:32::78 www.google.gr
+2001:4860:4802:32::78 www.google.com.gt
+2001:4860:4802:32::78 www.google.gy
+2001:4860:4802:32::78 www.google.com.hk
+2001:4860:4802:32::78 www.google.hn
+2001:4860:4802:32::78 www.google.hr
+2001:4860:4802:32::78 www.google.ht
+2001:4860:4802:32::78 www.google.hu
+2001:4860:4802:32::78 www.google.co.id
+2001:4860:4802:32::78 www.google.ie
+2001:4860:4802:32::78 www.google.co.il
+2001:4860:4802:32::78 www.google.im
+2001:4860:4802:32::78 www.google.co.in
+2001:4860:4802:32::78 www.google.iq
+2001:4860:4802:32::78 www.google.is
+2001:4860:4802:32::78 www.google.it
+2001:4860:4802:32::78 www.google.je
+2001:4860:4802:32::78 www.google.com.jm
+2001:4860:4802:32::78 www.google.jo
+2001:4860:4802:32::78 www.google.co.jp
+2001:4860:4802:32::78 www.google.co.ke
+2001:4860:4802:32::78 www.google.com.kh
+2001:4860:4802:32::78 www.google.ki
+2001:4860:4802:32::78 www.google.kg
+2001:4860:4802:32::78 www.google.co.kr
+2001:4860:4802:32::78 www.google.com.kw
+2001:4860:4802:32::78 www.google.kz
+2001:4860:4802:32::78 www.google.la
+2001:4860:4802:32::78 www.google.com.lb
+2001:4860:4802:32::78 www.google.li
+2001:4860:4802:32::78 www.google.lk
+2001:4860:4802:32::78 www.google.co.ls
+2001:4860:4802:32::78 www.google.lt
+2001:4860:4802:32::78 www.google.lu
+2001:4860:4802:32::78 www.google.lv
+2001:4860:4802:32::78 www.google.com.ly
+2001:4860:4802:32::78 www.google.co.ma
+2001:4860:4802:32::78 www.google.md
+2001:4860:4802:32::78 www.google.me
+2001:4860:4802:32::78 www.google.mg
+2001:4860:4802:32::78 www.google.mk
+2001:4860:4802:32::78 www.google.ml
+2001:4860:4802:32::78 www.google.com.mm
+2001:4860:4802:32::78 www.google.mn
+2001:4860:4802:32::78 www.google.ms
+2001:4860:4802:32::78 www.google.com.mt
+2001:4860:4802:32::78 www.google.mu
+2001:4860:4802:32::78 www.google.mv
+2001:4860:4802:32::78 www.google.mw
+2001:4860:4802:32::78 www.google.com.mx
+2001:4860:4802:32::78 www.google.com.my
+2001:4860:4802:32::78 www.google.co.mz
+2001:4860:4802:32::78 www.google.com.na
+2001:4860:4802:32::78 www.google.com.nf
+2001:4860:4802:32::78 www.google.com.ng
+2001:4860:4802:32::78 www.google.com.ni
+2001:4860:4802:32::78 www.google.ne
+2001:4860:4802:32::78 www.google.nl
+2001:4860:4802:32::78 www.google.no
+2001:4860:4802:32::78 www.google.com.np
+2001:4860:4802:32::78 www.google.nr
+2001:4860:4802:32::78 www.google.nu
+2001:4860:4802:32::78 www.google.co.nz
+2001:4860:4802:32::78 www.google.com.om
+2001:4860:4802:32::78 www.google.com.pa
+2001:4860:4802:32::78 www.google.com.pe
+2001:4860:4802:32::78 www.google.com.pg
+2001:4860:4802:32::78 www.google.com.ph
+2001:4860:4802:32::78 www.google.com.pk
+2001:4860:4802:32::78 www.google.pl
+2001:4860:4802:32::78 www.google.pn
+2001:4860:4802:32::78 www.google.com.pr
+2001:4860:4802:32::78 www.google.ps
+2001:4860:4802:32::78 www.google.pt
+2001:4860:4802:32::78 www.google.com.py
+2001:4860:4802:32::78 www.google.com.qa
+2001:4860:4802:32::78 www.google.ro
+2001:4860:4802:32::78 www.google.ru
+2001:4860:4802:32::78 www.google.rw
+2001:4860:4802:32::78 www.google.com.sa
+2001:4860:4802:32::78 www.google.com.sb
+2001:4860:4802:32::78 www.google.sc
+2001:4860:4802:32::78 www.google.se
+2001:4860:4802:32::78 www.google.com.sg
+2001:4860:4802:32::78 www.google.sh
+2001:4860:4802:32::78 www.google.si
+2001:4860:4802:32::78 www.google.sk
+2001:4860:4802:32::78 www.google.com.sl
+2001:4860:4802:32::78 www.google.sn
+2001:4860:4802:32::78 www.google.so
+2001:4860:4802:32::78 www.google.sm
+2001:4860:4802:32::78 www.google.sr
+2001:4860:4802:32::78 www.google.st
+2001:4860:4802:32::78 www.google.com.sv
+2001:4860:4802:32::78 www.google.td
+2001:4860:4802:32::78 www.google.tg
+2001:4860:4802:32::78 www.google.co.th
+2001:4860:4802:32::78 www.google.com.tj
+2001:4860:4802:32::78 www.google.tk
+2001:4860:4802:32::78 www.google.tl
+2001:4860:4802:32::78 www.google.tm
+2001:4860:4802:32::78 www.google.tn
+2001:4860:4802:32::78 www.google.to
+2001:4860:4802:32::78 www.google.com.tr
+2001:4860:4802:32::78 www.google.tt
+2001:4860:4802:32::78 www.google.com.tw
+2001:4860:4802:32::78 www.google.co.tz
+2001:4860:4802:32::78 www.google.com.ua
+2001:4860:4802:32::78 www.google.co.ug
+2001:4860:4802:32::78 www.google.co.uk
+2001:4860:4802:32::78 www.google.com.uy
+2001:4860:4802:32::78 www.google.co.uz
+2001:4860:4802:32::78 www.google.com.vc
+2001:4860:4802:32::78 www.google.co.ve
+2001:4860:4802:32::78 www.google.vg
+2001:4860:4802:32::78 www.google.co.vi
+2001:4860:4802:32::78 www.google.com.vn
+2001:4860:4802:32::78 www.google.vu
+2001:4860:4802:32::78 www.google.ws
+2001:4860:4802:32::78 www.google.rs
+2001:4860:4802:32::78 www.google.co.za
+2001:4860:4802:32::78 www.google.co.zm
+2001:4860:4802:32::78 www.google.co.zw
+2001:4860:4802:32::78 www.google.cat
+216.239.38.120 google.com
+216.239.38.120 google.ad
+216.239.38.120 google.ae
+216.239.38.120 google.com.af
+216.239.38.120 google.com.ag
+216.239.38.120 google.com.ai
+216.239.38.120 google.al
+216.239.38.120 google.am
+216.239.38.120 google.co.ao
+216.239.38.120 google.com.ar
+216.239.38.120 google.as
+216.239.38.120 google.at
+216.239.38.120 google.com.au
+216.239.38.120 google.az
+216.239.38.120 google.ba
+216.239.38.120 google.com.bd
+216.239.38.120 google.be
+216.239.38.120 google.bf
+216.239.38.120 google.bg
+216.239.38.120 google.com.bh
+216.239.38.120 google.bi
+216.239.38.120 google.bj
+216.239.38.120 google.com.bn
+216.239.38.120 google.com.bo
+216.239.38.120 google.com.br
+216.239.38.120 google.bs
+216.239.38.120 google.bt
+216.239.38.120 google.co.bw
+216.239.38.120 google.by
+216.239.38.120 google.com.bz
+216.239.38.120 google.ca
+216.239.38.120 google.cd
+216.239.38.120 google.cf
+216.239.38.120 google.cg
+216.239.38.120 google.ch
+216.239.38.120 google.ci
+216.239.38.120 google.co.ck
+216.239.38.120 google.cl
+216.239.38.120 google.cm
+216.239.38.120 google.cn
+216.239.38.120 google.com.co
+216.239.38.120 google.co.cr
+216.239.38.120 google.com.cu
+216.239.38.120 google.cv
+216.239.38.120 google.com.cy
+216.239.38.120 google.cz
+216.239.38.120 google.de
+216.239.38.120 google.dj
+216.239.38.120 google.dk
+216.239.38.120 google.dm
+216.239.38.120 google.com.do
+216.239.38.120 google.dz
+216.239.38.120 google.com.ec
+216.239.38.120 google.ee
+216.239.38.120 google.com.eg
+216.239.38.120 google.es
+216.239.38.120 google.com.et
+216.239.38.120 google.fi
+216.239.38.120 google.com.fj
+216.239.38.120 google.fm
+216.239.38.120 google.fr
+216.239.38.120 google.ga
+216.239.38.120 google.ge
+216.239.38.120 google.gg
+216.239.38.120 google.com.gh
+216.239.38.120 google.com.gi
+216.239.38.120 google.gl
+216.239.38.120 google.gm
+216.239.38.120 google.gp
+216.239.38.120 google.gr
+216.239.38.120 google.com.gt
+216.239.38.120 google.gy
+216.239.38.120 google.com.hk
+216.239.38.120 google.hn
+216.239.38.120 google.hr
+216.239.38.120 google.ht
+216.239.38.120 google.hu
+216.239.38.120 google.co.id
+216.239.38.120 google.ie
+216.239.38.120 google.co.il
+216.239.38.120 google.im
+216.239.38.120 google.co.in
+216.239.38.120 google.iq
+216.239.38.120 google.is
+216.239.38.120 google.it
+216.239.38.120 google.je
+216.239.38.120 google.com.jm
+216.239.38.120 google.jo
+216.239.38.120 google.co.jp
+216.239.38.120 google.co.ke
+216.239.38.120 google.com.kh
+216.239.38.120 google.ki
+216.239.38.120 google.kg
+216.239.38.120 google.co.kr
+216.239.38.120 google.com.kw
+216.239.38.120 google.kz
+216.239.38.120 google.la
+216.239.38.120 google.com.lb
+216.239.38.120 google.li
+216.239.38.120 google.lk
+216.239.38.120 google.co.ls
+216.239.38.120 google.lt
+216.239.38.120 google.lu
+216.239.38.120 google.lv
+216.239.38.120 google.com.ly
+216.239.38.120 google.co.ma
+216.239.38.120 google.md
+216.239.38.120 google.me
+216.239.38.120 google.mg
+216.239.38.120 google.mk
+216.239.38.120 google.ml
+216.239.38.120 google.com.mm
+216.239.38.120 google.mn
+216.239.38.120 google.ms
+216.239.38.120 google.com.mt
+216.239.38.120 google.mu
+216.239.38.120 google.mv
+216.239.38.120 google.mw
+216.239.38.120 google.com.mx
+216.239.38.120 google.com.my
+216.239.38.120 google.co.mz
+216.239.38.120 google.com.na
+216.239.38.120 google.com.nf
+216.239.38.120 google.com.ng
+216.239.38.120 google.com.ni
+216.239.38.120 google.ne
+216.239.38.120 google.nl
+216.239.38.120 google.no
+216.239.38.120 google.com.np
+216.239.38.120 google.nr
+216.239.38.120 google.nu
+216.239.38.120 google.co.nz
+216.239.38.120 google.com.om
+216.239.38.120 google.com.pa
+216.239.38.120 google.com.pe
+216.239.38.120 google.com.pg
+216.239.38.120 google.com.ph
+216.239.38.120 google.com.pk
+216.239.38.120 google.pl
+216.239.38.120 google.pn
+216.239.38.120 google.com.pr
+216.239.38.120 google.ps
+216.239.38.120 google.pt
+216.239.38.120 google.com.py
+216.239.38.120 google.com.qa
+216.239.38.120 google.ro
+216.239.38.120 google.ru
+216.239.38.120 google.rw
+216.239.38.120 google.com.sa
+216.239.38.120 google.com.sb
+216.239.38.120 google.sc
+216.239.38.120 google.se
+216.239.38.120 google.com.sg
+216.239.38.120 google.sh
+216.239.38.120 google.si
+216.239.38.120 google.sk
+216.239.38.120 google.com.sl
+216.239.38.120 google.sn
+216.239.38.120 google.so
+216.239.38.120 google.sm
+216.239.38.120 google.sr
+216.239.38.120 google.st
+216.239.38.120 google.com.sv
+216.239.38.120 google.td
+216.239.38.120 google.tg
+216.239.38.120 google.co.th
+216.239.38.120 google.com.tj
+216.239.38.120 google.tk
+216.239.38.120 google.tl
+216.239.38.120 google.tm
+216.239.38.120 google.tn
+216.239.38.120 google.to
+216.239.38.120 google.com.tr
+216.239.38.120 google.tt
+216.239.38.120 google.com.tw
+216.239.38.120 google.co.tz
+216.239.38.120 google.com.ua
+216.239.38.120 google.co.ug
+216.239.38.120 google.co.uk
+216.239.38.120 google.com.uy
+216.239.38.120 google.co.uz
+216.239.38.120 google.com.vc
+216.239.38.120 google.co.ve
+216.239.38.120 google.vg
+216.239.38.120 google.co.vi
+216.239.38.120 google.com.vn
+216.239.38.120 google.vu
+216.239.38.120 google.ws
+216.239.38.120 google.rs
+216.239.38.120 google.co.za
+216.239.38.120 google.co.zm
+216.239.38.120 google.co.zw
+216.239.38.120 google.cat
+216.239.38.120 www.google.com
+216.239.38.120 www.google.ad
+216.239.38.120 www.google.ae
+216.239.38.120 www.google.com.af
+216.239.38.120 www.google.com.ag
+216.239.38.120 www.google.com.ai
+216.239.38.120 www.google.al
+216.239.38.120 www.google.am
+216.239.38.120 www.google.co.ao
+216.239.38.120 www.google.com.ar
+216.239.38.120 www.google.as
+216.239.38.120 www.google.at
+216.239.38.120 www.google.com.au
+216.239.38.120 www.google.az
+216.239.38.120 www.google.ba
+216.239.38.120 www.google.com.bd
+216.239.38.120 www.google.be
+216.239.38.120 www.google.bf
+216.239.38.120 www.google.bg
+216.239.38.120 www.google.com.bh
+216.239.38.120 www.google.bi
+216.239.38.120 www.google.bj
+216.239.38.120 www.google.com.bn
+216.239.38.120 www.google.com.bo
+216.239.38.120 www.google.com.br
+216.239.38.120 www.google.bs
+216.239.38.120 www.google.bt
+216.239.38.120 www.google.co.bw
+216.239.38.120 www.google.by
+216.239.38.120 www.google.com.bz
+216.239.38.120 www.google.ca
+216.239.38.120 www.google.cd
+216.239.38.120 www.google.cf
+216.239.38.120 www.google.cg
+216.239.38.120 www.google.ch
+216.239.38.120 www.google.ci
+216.239.38.120 www.google.co.ck
+216.239.38.120 www.google.cl
+216.239.38.120 www.google.cm
+216.239.38.120 www.google.cn
+216.239.38.120 www.google.com.co
+216.239.38.120 www.google.co.cr
+216.239.38.120 www.google.com.cu
+216.239.38.120 www.google.cv
+216.239.38.120 www.google.com.cy
+216.239.38.120 www.google.cz
+216.239.38.120 www.google.de
+216.239.38.120 www.google.dj
+216.239.38.120 www.google.dk
+216.239.38.120 www.google.dm
+216.239.38.120 www.google.com.do
+216.239.38.120 www.google.dz
+216.239.38.120 www.google.com.ec
+216.239.38.120 www.google.ee
+216.239.38.120 www.google.com.eg
+216.239.38.120 www.google.es
+216.239.38.120 www.google.com.et
+216.239.38.120 www.google.fi
+216.239.38.120 www.google.com.fj
+216.239.38.120 www.google.fm
+216.239.38.120 www.google.fr
+216.239.38.120 www.google.ga
+216.239.38.120 www.google.ge
+216.239.38.120 www.google.gg
+216.239.38.120 www.google.com.gh
+216.239.38.120 www.google.com.gi
+216.239.38.120 www.google.gl
+216.239.38.120 www.google.gm
+216.239.38.120 www.google.gp
+216.239.38.120 www.google.gr
+216.239.38.120 www.google.com.gt
+216.239.38.120 www.google.gy
+216.239.38.120 www.google.com.hk
+216.239.38.120 www.google.hn
+216.239.38.120 www.google.hr
+216.239.38.120 www.google.ht
+216.239.38.120 www.google.hu
+216.239.38.120 www.google.co.id
+216.239.38.120 www.google.ie
+216.239.38.120 www.google.co.il
+216.239.38.120 www.google.im
+216.239.38.120 www.google.co.in
+216.239.38.120 www.google.iq
+216.239.38.120 www.google.is
+216.239.38.120 www.google.it
+216.239.38.120 www.google.je
+216.239.38.120 www.google.com.jm
+216.239.38.120 www.google.jo
+216.239.38.120 www.google.co.jp
+216.239.38.120 www.google.co.ke
+216.239.38.120 www.google.com.kh
+216.239.38.120 www.google.ki
+216.239.38.120 www.google.kg
+216.239.38.120 www.google.co.kr
+216.239.38.120 www.google.com.kw
+216.239.38.120 www.google.kz
+216.239.38.120 www.google.la
+216.239.38.120 www.google.com.lb
+216.239.38.120 www.google.li
+216.239.38.120 www.google.lk
+216.239.38.120 www.google.co.ls
+216.239.38.120 www.google.lt
+216.239.38.120 www.google.lu
+216.239.38.120 www.google.lv
+216.239.38.120 www.google.com.ly
+216.239.38.120 www.google.co.ma
+216.239.38.120 www.google.md
+216.239.38.120 www.google.me
+216.239.38.120 www.google.mg
+216.239.38.120 www.google.mk
+216.239.38.120 www.google.ml
+216.239.38.120 www.google.com.mm
+216.239.38.120 www.google.mn
+216.239.38.120 www.google.ms
+216.239.38.120 www.google.com.mt
+216.239.38.120 www.google.mu
+216.239.38.120 www.google.mv
+216.239.38.120 www.google.mw
+216.239.38.120 www.google.com.mx
+216.239.38.120 www.google.com.my
+216.239.38.120 www.google.co.mz
+216.239.38.120 www.google.com.na
+216.239.38.120 www.google.com.nf
+216.239.38.120 www.google.com.ng
+216.239.38.120 www.google.com.ni
+216.239.38.120 www.google.ne
+216.239.38.120 www.google.nl
+216.239.38.120 www.google.no
+216.239.38.120 www.google.com.np
+216.239.38.120 www.google.nr
+216.239.38.120 www.google.nu
+216.239.38.120 www.google.co.nz
+216.239.38.120 www.google.com.om
+216.239.38.120 www.google.com.pa
+216.239.38.120 www.google.com.pe
+216.239.38.120 www.google.com.pg
+216.239.38.120 www.google.com.ph
+216.239.38.120 www.google.com.pk
+216.239.38.120 www.google.pl
+216.239.38.120 www.google.pn
+216.239.38.120 www.google.com.pr
+216.239.38.120 www.google.ps
+216.239.38.120 www.google.pt
+216.239.38.120 www.google.com.py
+216.239.38.120 www.google.com.qa
+216.239.38.120 www.google.ro
+216.239.38.120 www.google.ru
+216.239.38.120 www.google.rw
+216.239.38.120 www.google.com.sa
+216.239.38.120 www.google.com.sb
+216.239.38.120 www.google.sc
+216.239.38.120 www.google.se
+216.239.38.120 www.google.com.sg
+216.239.38.120 www.google.sh
+216.239.38.120 www.google.si
+216.239.38.120 www.google.sk
+216.239.38.120 www.google.com.sl
+216.239.38.120 www.google.sn
+216.239.38.120 www.google.so
+216.239.38.120 www.google.sm
+216.239.38.120 www.google.sr
+216.239.38.120 www.google.st
+216.239.38.120 www.google.com.sv
+216.239.38.120 www.google.td
+216.239.38.120 www.google.tg
+216.239.38.120 www.google.co.th
+216.239.38.120 www.google.com.tj
+216.239.38.120 www.google.tk
+216.239.38.120 www.google.tl
+216.239.38.120 www.google.tm
+216.239.38.120 www.google.tn
+216.239.38.120 www.google.to
+216.239.38.120 www.google.com.tr
+216.239.38.120 www.google.tt
+216.239.38.120 www.google.com.tw
+216.239.38.120 www.google.co.tz
+216.239.38.120 www.google.com.ua
+216.239.38.120 www.google.co.ug
+216.239.38.120 www.google.co.uk
+216.239.38.120 www.google.com.uy
+216.239.38.120 www.google.co.uz
+216.239.38.120 www.google.com.vc
+216.239.38.120 www.google.co.ve
+216.239.38.120 www.google.vg
+216.239.38.120 www.google.co.vi
+216.239.38.120 www.google.com.vn
+216.239.38.120 www.google.vu
+216.239.38.120 www.google.ws
+216.239.38.120 www.google.rs
+216.239.38.120 www.google.co.za
+216.239.38.120 www.google.co.zm
+216.239.38.120 www.google.co.zw
+216.239.38.120 www.google.cat
--- /dev/null
+#
+# Copyright (c) 2018 Gregory L. Dietsche <Gregory.Dietsche@cuw.edu>
+# This is free software, licensed under the MIT License
+#
+
+#
+# IMPORTANT: if this file is not working, make sure that dnsmasq is able to READ it!
+#
+
+#216.239.38.120 restrict.youtube.com
+#2001:4860:4802:32::78 restrict.youtube.com
+
+#IPv6
+2001:4860:4802:32::78 www.youtube.com
+2001:4860:4802:32::78 m.youtube.com
+2001:4860:4802:32::78 youtubei.googleapis.com
+2001:4860:4802:32::78 youtube.googleapis.com
+2001:4860:4802:32::78 www.youtube-nocookie.com
+
+#IPv4
+216.239.38.120 www.youtube.com
+216.239.38.120 m.youtube.com
+216.239.38.120 youtubei.googleapis.com
+216.239.38.120 youtube.googleapis.com
+216.239.38.120 www.youtube-nocookie.com
--- /dev/null
+#
+# Copyright (c) 2018 Gregory L. Dietsche <Gregory.Dietsche@cuw.edu>
+# This is free software, licensed under the MIT License
+#
+
+#
+# IMPORTANT: if this file is not working, make sure that dnsmasq is able to READ it!
+#
+
+#216.239.38.119 restrictmoderate.youtube.com
+#2001:4860:4802:32::77 restrictmoderate.youtube.com
+
+#IPv6
+2001:4860:4802:32::77 www.youtube.com
+2001:4860:4802:32::77 m.youtube.com
+2001:4860:4802:32::77 youtubei.googleapis.com
+2001:4860:4802:32::77 youtube.googleapis.com
+2001:4860:4802:32::77 www.youtube-nocookie.com
+
+#IPv4
+216.239.38.119 www.youtube.com
+216.239.38.119 m.youtube.com
+216.239.38.119 youtubei.googleapis.com
+216.239.38.119 youtube.googleapis.com
+216.239.38.119 www.youtube-nocookie.com
--- /dev/null
+#!/bin/sh
+#
+# Copyright (c) 2018 Gregory L. Dietsche <Gregory.Dietsche@cuw.edu>
+# This is free software, licensed under the MIT License
+#
+. /lib/functions.sh
+
+update() {
+ config_get_bool enabled $1 enabled 0
+ config_get mode $1 mode default
+ if [ ! -f /etc/safe-search/available/$1.$mode ]; then
+ echo Error: /etc/safe-search/available/$1.$mode does not exist. Please check your configuration in /etc/config/safe-search
+ else
+ if [ "$enabled" -eq 1 ]; then
+ ln -s /etc/safe-search/available/$1.$mode /etc/safe-search/enabled/
+ fi
+ fi
+}
+
+rm -f /etc/safe-search/enabled/*
+config_load 'safe-search'
+config_foreach update safe-search
+/etc/init.d/dnsmasq reload
--- /dev/null
+#
+# Copyright (c) 2018 Gregory L. Dietsche <Gregory.Dietsche@cuw.edu>
+# This is free software, licensed under the MIT License
+#
+# run safe-search-update after making configuration changes.
+#
+
+config safe-search 'bing'
+ option enabled 1
+
+config safe-search 'google'
+ option enabled 1
+
+# Valid modes for youtube are restrict and restrictmoderate
+config safe-search 'youtube'
+ option enabled 0
+ option mode 'restrict'
--- /dev/null
+#!/bin/sh
+#
+# Copyright (c) 2018 Gregory L. Dietsche <Gregory.Dietsche@cuw.edu>
+# This is free software, licensed under the MIT License
+#
+uci add_list dhcp.@dnsmasq[0].addnhosts=/etc/safe-search/enabled
+uci commit dhcp
+
+#/etc/init.d/dnsmasq reload #safe-search-update does this for us.
+/usr/sbin/safe-search-update
+
+exit 0
config SAMBA4_SERVER_AVAHI
bool "Avahi support"
depends on PACKAGE_samba4-server
+ select SAMBA4_SERVER_VFS
select PACKAGE_libavahi-client
help
- Announce Samba resources via DNS/DNS-SD using the Avahi daemon
- default n
+ Announce Samba resources via DNS/DNS-SD using the Avahi daemon, for Linux/Mac clients.
+ default y
config SAMBA4_SERVER_VFS
bool "Common VFS modules"
depends on PACKAGE_samba4-server
help
installs:
- modules: (vfs_btrfs) vfs_fruit vfs_shadow_copy2 vfs_recycle vfs_fake_perms vfs_readonly vfs_cap vfs_offline vfs_crossrename
+ modules: (vfs_btrfs) vfs_fruit vfs_shadow_copy2 vfs_recycle vfs_fake_perms vfs_readonly vfs_cap vfs_offline vfs_crossrename vfs_catia vfs_streams_xattr
Commonly used VFS modules, vfs_btrfs requires kmod-fs-btrfs to be selected separately
default y
depends on PACKAGE_samba4-server
help
installs:
- modules: vfs_virusfilter vfs_shell_snap vfs_commit vfs_worm vfs_xattr_tdb vfs_streams_xattr vfs_aio_fork vfs_aio_pthread (vfs_linux_xfs_sgid) vfs_netatalk vfs_dirsort vfs_fileid vfs_catia
+ modules: vfs_virusfilter vfs_shell_snap vfs_commit vfs_worm vfs_xattr_tdb vfs_aio_fork vfs_aio_pthread (vfs_linux_xfs_sgid) vfs_netatalk vfs_dirsort vfs_fileid
Additional VFS modules that aren't commonly used, vfs_linux_xfs_sgid requires kmod-fs-xfs to be selected separately
default n
include $(TOPDIR)/rules.mk
PKG_NAME:=samba
-PKG_VERSION:=4.8.3
-PKG_RELEASE:=2
+PKG_VERSION:=4.9.1
+PKG_RELEASE:=4
PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
PKG_LICENSE:=GPL-3.0-only
PKG_SOURCE_URL:=https://download.samba.org/pub/samba/stable/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=e0569a8a605d5dfb49f1fdd11db796f4d36fe0351c4a7f21387ef253010b82ed
+PKG_HASH:=33118cbe83a87be085eba1aae6e597878b02d6ac9b2da67454ed33cf3e9853f2
# Buildroot bug? Can't add target deps via '+SAMBA4_SERVER_AD_DC:python-crypto' (as work-around we select via config.in)
-PKG_BUILD_DEPENDS:=perl/host python/host qemu-userspace/host SAMBA4_SERVER_AD_DC:python-crypto
+PKG_BUILD_DEPENDS:=SAMBA4_SERVER_AD_DC:python-crypto nfs-kernel-server/host
PKG_CONFIG_DEPENDS:= \
CONFIG_SAMBA4_SERVER_NETBIOS \
CONFIG_PACKAGE_kmod-fs-xfs
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/kernel.mk
+include $(INCLUDE_DIR)/version.mk
define Package/samba4/Default
SECTION:=net
$(call Package/samba4/Default)
TITLE+= libs
DEPENDS:= +zlib +libtirpc +krb5-libs +libpopt \
- +PACKAGE_libcap:libcap +PACKAGE_jansson:jansson +PACKAGE_libpthread:libpthread +PACKAGE_libnettle:libnettle \
- +PACKAGE_libarchive:libarchive +PACKAGE_libgcrypt:libgcrypt +PACKAGE_libpam:libpam \
+ +PACKAGE_libcap:libcap +PACKAGE_libpthread:libpthread +PACKAGE_libnettle:libnettle \
+ +PACKAGE_libgcrypt:libgcrypt +PACKAGE_libpam:libpam +PACKAGE_dbus:dbus +PACKAGE_libavahi-client:libavahi-client \
+ +SAMBA4_SERVER_VFS:attr \
+SAMBA4_SERVER_ACL:acl +SAMBA4_SERVER_ACL:attr \
+SAMBA4_SERVER_AVAHI:libavahi-client \
- +SAMBA4_SERVER_AD_DC:python-base +SAMBA4_SERVER_AD_DC:libopenssl +SAMBA4_SERVER_AD_DC:libgnutls +SAMBA4_SERVER_AD_DC:libopenldap
+ +SAMBA4_SERVER_AD_DC:python-base +SAMBA4_SERVER_AD_DC:libopenssl +SAMBA4_SERVER_AD_DC:libgnutls +SAMBA4_SERVER_AD_DC:libopenldap +SAMBA4_SERVER_AD_DC:jansson +SAMBA4_SERVER_AD_DC:libarchive
endef
define Package/samba4-server
CONFIGURE_ARGS += \
--hostcc="$(HOSTCC)" \
--cross-compile \
- --cross-execute="qemu-$(ARCH) -L $(STAGING_DIR_ROOT)" \
+ --cross-answers=cross-answers.txt \
--disable-cups \
--disable-iprint \
--disable-cephfs \
# Optional AES-NI support - https://lists.samba.org/archive/samba-technical/2017-September/122738.html
# Support for Nettle wasn't comitted
-CONFIGURE_ARGS += --accel-aes=none
+ifdef CONFIG_TARGET_x86_64
+ CONFIGURE_ARGS += --accel-aes=intelaesni
+else
+ CONFIGURE_ARGS += --accel-aes=none
+endif
CONFIGURE_ARGS += \
--with-lockdir=/var/lock \
CONFIGURE_ARGS += --enable-gnutls --with-dnsupdate --with-ads --with-ldap
TARGET_CFLAGS := -I$(STAGING_DIR)/usr/include/python2.7 $(TARGET_CFLAGS)
else
- CONFIGURE_ARGS += --without-ad-dc --disable-python --nopyc --nopyo --disable-gnutls --without-dnsupdate --without-ads --without-ldap
+ CONFIGURE_ARGS += --without-ad-dc --without-json-audit --without-libarchive --disable-python --nopyc --nopyo --disable-gnutls --without-dnsupdate --without-ads --without-ldap
CONFIGURE_VARS += \
python_LDFLAGS="" \
python_LIBDIR=""
SAMBA4_AUTH_MODULES :=auth_builtin,auth_sam,auth_unix,auth_script,
SAMBA4_VFS_MODULES :=vfs_default,
ifeq ($(CONFIG_SAMBA4_SERVER_VFS),y)
- SAMBA4_VFS_MODULES :=$(SAMBA4_VFS_MODULES)vfs_fruit,vfs_shadow_copy2,vfs_recycle,vfs_fake_perms,vfs_readonly,vfs_cap,vfs_offline,vfs_crossrename,
+ SAMBA4_VFS_MODULES :=$(SAMBA4_VFS_MODULES)vfs_fruit,vfs_shadow_copy2,vfs_recycle,vfs_fake_perms,vfs_readonly,vfs_cap,vfs_offline,vfs_crossrename,vfs_catia,vfs_streams_xattr,vfs_xattr_tdb,
ifeq ($(CONFIG_PACKAGE_kmod-fs-btrfs),y)
SAMBA4_VFS_MODULES :=$(SAMBA4_VFS_MODULES)vfs_btrfs,
endif
endif
ifeq ($(CONFIG_SAMBA4_SERVER_VFSX),y)
- SAMBA4_VFS_MODULES :=$(SAMBA4_VFS_MODULES)vfs_virusfilter,vfs_shell_snap,vfs_commit,vfs_worm,vfs_xattr_tdb,vfs_streams_xattr,vfs_aio_fork,vfs_aio_pthread,vfs_netatalk,vfs_dirsort,vfs_fileid,vfs_catia,
+ SAMBA4_VFS_MODULES :=$(SAMBA4_VFS_MODULES)vfs_virusfilter,vfs_shell_snap,vfs_commit,vfs_worm,vfs_aio_fork,vfs_aio_pthread,vfs_netatalk,vfs_dirsort,vfs_fileid,
ifeq ($(CONFIG_PACKAGE_kmod-fs-xfs),y)
SAMBA4_VFS_MODULES :=$(SAMBA4_VFS_MODULES)vfs_linux_xfs_sgid,
endif
ifeq ($(CONFIG_SAMBA4_SERVER_AD_DC),y)
SAMBA4_PDB_MODULES :=$(SAMBA4_PDB_MODULES)pdb_samba_dsdb,
SAMBA4_AUTH_MODULES :=$(SAMBA4_AUTH_MODULES)auth_samba4,
+ SAMBA4_VFS_MODULES :=$(SAMBA4_VFS_MODULES)vfs_audit,vfs_extd_audit,vfs_full_audit,
endif
ifeq ($(CONFIG_SAMBA4_SERVER_WINBIND),y)
SAMBA4_IDMAP_MODULES :=$(SAMBA4_IDMAP_MODULES)idmap_passdb,idmap_nss,idmap_tdb,idmap_tdb2,idmap_script,nss_info_template,
BUILD_TARGETS_UTILS :=smbstatus,smbtree,smbget,mvxattr,nmblookup
# lib bundling
-# NOTE: Compile some unique libs into related bins, so we end-up with a unified samba4-libs base, mainly to allow package separation (server, client, admin, utils)
-CONFIGURE_ARGS += --builtin-libraries=smbclient,netapi,samba-passdb,ads,auth,cli-spoolss,libcli-lsa3,gpext,talloc,tevent,texpect,tdb,ldb,tdr,cmocka,replace
-#CONFIGURE_ARGS += --nonshared-binary=$(BUILD_TARGETS_SERVER)
# NOTE: bundle + make private, we want to avoid version configuration (build, link) conflicts
+CONFIGURE_ARGS += --builtin-libraries=talloc,tevent,texpect,tdb,ldb,tdr,cmocka,replace
+#CONFIGURE_ARGS += --nonshared-binary=$(BUILD_TARGETS_SERVER)
ifeq ($(CONFIG_SAMBA4_SERVER_AD_DC),y)
CONFIGURE_ARGS += --bundled-libraries=talloc,tevent,texpect,tdb,ldb,tdr,cmocka,replace,pytalloc-util,pyldb-util,NONE
else
endef
define Build/Configure
+ $(CP) ./waf-cross-answers/$(ARCH).txt $(PKG_BUILD_DIR)/cross-answers.txt
+ echo 'Checking uname machine type: "$(ARCH)"' >> $(PKG_BUILD_DIR)/cross-answers.txt
+ echo 'Checking uname release type: "$(LINUX_VERSION)"' >> $(PKG_BUILD_DIR)/cross-answers.txt
+ echo 'Checking uname version type: "$(VERSION_DIST) Linux-$(LINUX_VERSION) $(shell date +%Y-%m-%d)"' >> $(PKG_BUILD_DIR)/cross-answers.txt
+ # NOTE: For some unknown reason this answer is not needed on some hosts/distros, yet needed on others?
+ echo 'Checking whether POSIX capabilities are available: OK' >> $(PKG_BUILD_DIR)/cross-answers.txt
$(call Build/Configure/Default,configure)
endef
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/smbd $(1)/usr/sbin/
ifeq ($(CONFIG_SAMBA4_SERVER_AD_DC),y)
$(CP) $(PKG_INSTALL_DIR)/usr/lib/python2.7 $(1)/usr/lib/
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{samba-tool,ntlm_auth} $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{samba,samba_gpoupdate,samba_dnsupdate,samba_kcc,samba_spnupdate,samba_upgradedns} $(1)/usr/sbin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{samba-tool,ntlm_auth,smbtar} $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{samba,samba-gpupdate,samba_dnsupdate,samba_kcc,samba_spnupdate,samba_upgradedns} $(1)/usr/sbin/
endif
ifeq ($(CONFIG_SAMBA4_SERVER_NETBIOS),y)
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/nmbd $(1)/usr/sbin/
config samba
- option 'name' 'OpenWrt-SMB'
option 'workgroup' 'WORKGROUP'
option 'description' 'Samba on OpenWrt'
option 'charset' 'UTF-8'
#!/bin/sh /etc/rc.common
-START=99
+START=98
USE_PROCD=1
smb_header() {
done
)
- local name workgroup description charset
- local hostname="$(uci_get system.@system[0].hostname)"
-
- config_get name $1 name "${hostname:-OpenWrt}"
- config_get workgroup $1 workgroup "${hostname:-WORKGROUP}"
- config_get description $1 description "Samba on ${hostname:-OpenWrt}"
- config_get charset $1 charset "UTF-8"
+ local workgroup description charset
+ # we dont use netbios anymore as default and wsd/avahi is dns based
+ local hostname="$(cat /proc/sys/kernel/hostname)"
+ config_get workgroup $1 workgroup "WORKGROUP"
+ config_get description $1 description "Samba on OpenWrt"
+ config_get charset $1 charset "UTF-8"
+
+ config_get_bool MACOS $1 macos 0
config_get_bool DISABLE_NETBIOS $1 disable_netbios 0
config_get_bool DISABLE_AD_DC $1 disable_ad_dc 0
config_get_bool DISABLE_WINBIND $1 disable_winbind 0
mkdir -p /var/etc
- sed -e "s#|NAME|#$name#g" \
+ sed -e "s#|NAME|#$hostname#g" \
-e "s#|WORKGROUP|#$workgroup#g" \
-e "s#|DESCRIPTION|#$description#g" \
-e "s#|INTERFACES|#$interfaces#g" \
local name
local path
local users
- local public
- local writable
- local printable
local create_mask
-
+ local dir_mask
local browseable
local read_only
local guest_ok
local guest_only
local inherit_owner
local vfs_objects
+ local timemachine
+ local timemachine_maxsize
+ local force_root
config_get name $1 name
config_get path $1 path
config_get users $1 users
- config_get public $1 public
- config_get writable $1 writable
- config_get printable $1 printable
config_get create_mask $1 create_mask
config_get dir_mask $1 dir_mask
-
-
config_get browseable $1 browseable
config_get read_only $1 read_only
config_get guest_ok $1 guest_ok
config_get guest_only $1 guest_only
config_get inherit_owner $1 inherit_owner
config_get vfs_objects $1 vfs_objects
-
+ config_get_bool timemachine $1 timemachine 0
+ config_get timemachine_maxsize $1 timemachine_maxsize
+ config_get_bool force_root $1 force_root 0
[ -z "$name" -o -z "$path" ] && return
echo -e "\n[$name]\n\tpath = $path" >> /var/etc/smb.conf
- [ -n "$users" ] && echo -e "\tvalid users = $users" >> /var/etc/smb.conf
- [ -n "$public" ] && echo -e "\tpublic = $public" >> /var/etc/smb.conf
- [ -n "$writable" ] && echo -e "\twritable = $writable" >> /var/etc/smb.conf
- [ -n "$printable" ] && echo -e "\tprintable = $printable" >> /var/etc/smb.conf
+
+ if [ "$force_root" -eq 1 ]; then
+ echo -e "\tforce user = root" >> /var/etc/smb.conf
+ echo -e "\tforce group = root" >> /var/etc/smb.conf
+ else
+ [ -n "$users" ] && echo -e "\tvalid users = $users" >> /var/etc/smb.conf
+ fi
+
[ -n "$create_mask" ] && echo -e "\tcreate mask = $create_mask" >> /var/etc/smb.conf
[ -n "$dir_mask" ] && echo -e "\tdirectory mask = $dir_mask" >> /var/etc/smb.conf
[ -n "$guest_ok" ] && echo -e "\tguest ok = $guest_ok" >> /var/etc/smb.conf
[ -n "$guest_only" ] && echo -e "\tguest only = $guest_only" >> /var/etc/smb.conf
[ -n "$inherit_owner" ] && echo -e "\tinherit owner = $inherit_owner" >> /var/etc/smb.conf
+
+ if [ "$MACOS" -eq 1 ]; then
+ vfs_objects="catia fruit streams_xattr $vfs_objects"
+ echo -e "\tfruit:encoding = native" >> /var/etc/smb.conf
+ echo -e "\tfruit:metadata = stream" >> /var/etc/smb.conf
+ echo -e "\tfruit:veto_appledouble = no" >> /var/etc/smb.conf
+ # avoid mixed shares order for aapl
+ if [ "$timemachine" -eq 1 ]; then
+ echo -e "\tfruit:time machine = yes" >> /var/etc/smb.conf
+ [ -n "$timemachine_maxsize" ] && echo -e "\tfruit:time machine max size = ${timemachine_maxsize}G" >> /var/etc/smb.conf
+ fi
+ fi
+
[ -n "$vfs_objects" ] && echo -e "\tvfs objects = $vfs_objects" >> /var/etc/smb.conf
}
config_foreach smb_add_share sambashare
}
-reload_service() {
- init_config
-
- killall -HUP samba
- killall -HUP smbd
- killall -HUP nmbd
- killall -HUP winbindd
-}
-
service_triggers() {
- procd_add_reload_trigger samba4
-
+ PROCD_RELOAD_DELAY=2000
+
+ procd_add_reload_trigger "dhcp" "system" "samba4"
+
local i
for i in $samba_iface; do
procd_add_reload_interface_trigger $i
start_service() {
init_config
- # start main AC-DC daemon, will spawn (smbd,nmbd,winbindd) as needed/configured.
+ # start main AD-DC daemon, will spawn (smbd,nmbd,winbindd) as needed/configured.
if [ "$DISABLE_AD_DC" -ne 1 ] && [ -x /usr/sbin/samba ]; then
procd_open_instance
procd_set_param command /usr/sbin/samba -F
## disable loading of all printcap printers by default (iprint, cups, lpstat)
load printers = No
printcap name = /dev/null
+
+ ## Enabling this parameter will disable Samba's support for the SPOOLSS set of MS-RPC's.
+ disable spoolss = yes
+
+ ## This parameters controls how printer status information is interpreted on your system.
+ ## (BSD, AIX, LPRNG, PLP, SYSV, HPUX, QNX, SOFTQ)
+ printing = bsd
## Disable that nmbd is acting as a WINS server for unknow netbios names
#dns proxy = No
## Allows the server name that is advertised through MDNS to be set to the hostname rather than the Samba NETBIOS name.
## This allows an administrator to make Samba registered MDNS records match the case of the hostname rather than being in all capitals.
## (netbios, mdns)
- #mdns name = mdns
+ mdns name = mdns
## Clients that only support netbios won't be able to see your samba server when netbios support is disabled.
#disable netbios = Yes
--- /dev/null
+--- a/lib/crypto/wscript_configure 2018-07-26
++++ b/lib/crypto/wscript_configure 2018-08-27
+@@ -2,11 +2,11 @@
+ import Options
+ import Utils
+
+-if not conf.CHECK_FUNCS_IN('MD5Init', 'bsd', headers='bsd/md5.h',
+- checklibc=True):
+- conf.CHECK_FUNCS_IN('MD5Init', 'md5', headers='sys/md5.h',
+- checklibc=True)
+- conf.CHECK_FUNCS_IN('MD5Init', 'md', headers='sys/md5.h',
++# if not conf.CHECK_FUNCS_IN('MD5Init', 'bsd', headers='bsd/md5.h',
++ # checklibc=True):
++conf.CHECK_FUNCS_IN('MD5Init', 'md5', headers='sys/md5.h',
++ checklibc=True)
++conf.CHECK_FUNCS_IN('MD5Init', 'md', headers='sys/md5.h',
+ checklibc=True)
+ conf.CHECK_FUNCS_IN('CC_MD5_Init', '', headers='CommonCrypto/CommonDigest.h',
+ checklibc=True)
+--- a/lib/replace/wscript
++++ b/lib/replace/wscript
+@@ -302,22 +302,13 @@ def configure(conf):
+
+ conf.CHECK_FUNCS('prctl dirname basename')
+
+- strlcpy_in_bsd = False
+-
+- # libbsd on some platforms provides strlcpy and strlcat
+- if not conf.CHECK_FUNCS('strlcpy strlcat'):
+- if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
+- checklibc=True):
+- strlcpy_in_bsd = True
+- if not conf.CHECK_FUNCS('getpeereid'):
+- conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
+- if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
+- conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
+- if not conf.CHECK_FUNCS('setproctitle_init'):
+- conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
+-
+- if not conf.CHECK_FUNCS('closefrom'):
+- conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
++ # Not checking for libbsd
++ conf.CHECK_FUNCS('strlcpy strlcat')
++ conf.CHECK_FUNCS('getpeereid')
++ conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h')
++ conf.CHECK_FUNCS('setproctitle_init')
++
++ conf.CHECK_FUNCS('closefrom')
+
+ conf.CHECK_CODE('''
+ struct ucred cred;
+@@ -667,9 +658,6 @@ removeea setea
+
+ # look for a method of finding the list of network interfaces
+ for method in ['HAVE_IFACE_GETIFADDRS', 'HAVE_IFACE_AIX', 'HAVE_IFACE_IFCONF', 'HAVE_IFACE_IFREQ']:
+- bsd_for_strlcpy = ''
+- if strlcpy_in_bsd:
+- bsd_for_strlcpy = ' bsd'
+ if conf.CHECK_CODE('''
+ #define %s 1
+ #define NO_CONFIG_H 1
+@@ -682,7 +670,7 @@ removeea setea
+ #include "test/getifaddrs.c"
+ ''' % method,
+ method,
+- lib='nsl socket' + bsd_for_strlcpy,
++ lib='nsl socket',
+ addmain=False,
+ execute=True):
+ break
+@@ -730,7 +718,6 @@ def build(bld):
+ break
+
+ extra_libs = ''
+- if bld.CONFIG_SET('HAVE_LIBBSD'): extra_libs += ' bsd'
+
+ bld.SAMBA_SUBSYSTEM('LIBREPLACE_HOSTCC',
+ REPLACE_HOSTCC_SOURCE,
--- /dev/null
+Checking uname sysname type: "Linux"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking for large file support without additional flags: OK
+Checking correct behavior of strtoll: OK
+Checking for working strptime: NO
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: OK
+Checking value of NSIG: "65"
+Checking value of _NSIG: "65"
+Checking value of SIGRTMAX: "64"
+Checking value of SIGRTMIN: "35"
+Checking for a 64-bit host to support lmdb: NO
+Checking whether the WRFILE -keytab is supported: OK
+Checking errno of iconv for illegal multibyte sequence: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials: "OK"
+Checking whether fcntl locking is available: OK
+Checking whether fcntl lock supports open file description locks: NO
+Checking for the maximum value of the 'time_t' type: OK
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
--- /dev/null
+Checking uname sysname type: "Linux"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking for large file support without additional flags: OK
+Checking correct behavior of strtoll: OK
+Checking for working strptime: NO
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: OK
+Checking value of NSIG: "65"
+Checking value of _NSIG: "65"
+Checking value of SIGRTMAX: "64"
+Checking value of SIGRTMIN: "35"
+Checking for a 64-bit host to support lmdb: NO
+Checking whether the WRFILE -keytab is supported: OK
+Checking errno of iconv for illegal multibyte sequence: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials: "OK"
+Checking whether fcntl locking is available: OK
+Checking whether fcntl lock supports open file description locks: NO
+Checking for the maximum value of the 'time_t' type: NO
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
+Checking whether setreuid is available: NO
+Checking whether setresuid is available: NO
+Checking whether seteuid is available: NO
--- /dev/null
+Checking uname sysname type: "Linux"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking for large file support without additional flags: OK
+Checking correct behavior of strtoll: OK
+Checking for working strptime: NO
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: OK
+Checking value of NSIG: "65"
+Checking value of _NSIG: "65"
+Checking value of SIGRTMAX: "64"
+Checking value of SIGRTMIN: "35"
+Checking for a 64-bit host to support lmdb: NO
+Checking whether the WRFILE -keytab is supported: OK
+Checking errno of iconv for illegal multibyte sequence: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials with 32-bit system calls: "OK"
+Checking whether fcntl locking is available: OK
+Checking whether fcntl lock supports open file description locks: NO
+Checking for the maximum value of the 'time_t' type: NO
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
--- /dev/null
+Checking uname sysname type: "Linux"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking for large file support without additional flags: OK
+Checking correct behavior of strtoll: OK
+Checking for working strptime: NO
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: OK
+Checking value of NSIG: "65"
+Checking value of _NSIG: "65"
+Checking value of SIGRTMAX: "64"
+Checking value of SIGRTMIN: "35"
+Checking for a 64-bit host to support lmdb: NO
+Checking whether the WRFILE -keytab is supported: OK
+Checking errno of iconv for illegal multibyte sequence: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials with 32-bit system calls: "OK"
+Checking whether fcntl locking is available: OK
+Checking whether fcntl lock supports open file description locks: NO
+Checking for the maximum value of the 'time_t' type: NO
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
--- /dev/null
+Checking uname sysname type: "Linux"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking for large file support without additional flags: OK
+Checking correct behavior of strtoll: OK
+Checking for working strptime: NO
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: OK
+Checking value of NSIG: "65"
+Checking value of _NSIG: "65"
+Checking value of SIGRTMAX: "64"
+Checking value of SIGRTMIN: "35"
+Checking for a 64-bit host to support lmdb: NO
+Checking whether the WRFILE -keytab is supported: OK
+Checking errno of iconv for illegal multibyte sequence: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials with 32-bit system calls: "OK"
+Checking whether fcntl locking is available: OK
+Checking whether fcntl lock supports open file description locks: NO
+Checking for the maximum value of the 'time_t' type: NO
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
--- /dev/null
+Checking uname sysname type: "Linux"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking for large file support without additional flags: OK
+Checking correct behavior of strtoll: OK
+Checking for working strptime: NO
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: OK
+Checking value of NSIG: "128"
+Checking value of _NSIG: "128"
+Checking value of SIGRTMAX: "127"
+Checking value of SIGRTMIN: "35"
+Checking for a 64-bit host to support lmdb: NO
+Checking whether the WRFILE -keytab is supported: OK
+Checking errno of iconv for illegal multibyte sequence: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials: "OK"
+Checking whether fcntl locking is available: OK
+Checking whether fcntl lock supports open file description locks: NO
+Checking for the maximum value of the 'time_t' type: NO
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
--- /dev/null
+Checking uname sysname type: "Linux"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking for large file support without additional flags: OK
+Checking correct behavior of strtoll: OK
+Checking for working strptime: NO
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: OK
+Checking value of NSIG: "128"
+Checking value of _NSIG: "128"
+Checking value of SIGRTMAX: "127"
+Checking value of SIGRTMIN: "35"
+Checking for a 64-bit host to support lmdb: NO
+Checking whether the WRFILE -keytab is supported: OK
+Checking errno of iconv for illegal multibyte sequence: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials: "OK"
+Checking whether fcntl locking is available: OK
+Checking whether fcntl lock supports open file description locks: NO
+Checking for the maximum value of the 'time_t' type: OK
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
--- /dev/null
+Checking uname sysname type: "Linux"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking for large file support without additional flags: OK
+Checking correct behavior of strtoll: OK
+Checking for working strptime: NO
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: OK
+Checking value of NSIG: "128"
+Checking value of _NSIG: "128"
+Checking value of SIGRTMAX: "127"
+Checking value of SIGRTMIN: "35"
+Checking for a 64-bit host to support lmdb: NO
+Checking whether the WRFILE -keytab is supported: OK
+Checking errno of iconv for illegal multibyte sequence: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials: "OK"
+Checking whether fcntl locking is available: OK
+Checking whether fcntl lock supports open file description locks: NO
+Checking for the maximum value of the 'time_t' type: OK
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
--- /dev/null
+Checking uname sysname type: "Linux"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking for large file support without additional flags: OK
+Checking correct behavior of strtoll: OK
+Checking for working strptime: NO
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: OK
+Checking value of NSIG: "128"
+Checking value of _NSIG: "128"
+Checking value of SIGRTMAX: "127"
+Checking value of SIGRTMIN: "35"
+Checking for a 64-bit host to support lmdb: NO
+Checking whether the WRFILE -keytab is supported: OK
+Checking errno of iconv for illegal multibyte sequence: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials: "OK"
+Checking whether fcntl locking is available: OK
+Checking whether fcntl lock supports open file description locks: NO
+Checking for the maximum value of the 'time_t' type: NO
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
--- /dev/null
+Checking uname sysname type: "Linux"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking for large file support without additional flags: OK
+Checking correct behavior of strtoll: OK
+Checking for working strptime: NO
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: OK
+Checking value of NSIG: "65"
+Checking value of _NSIG: "65"
+Checking value of SIGRTMAX: "64"
+Checking value of SIGRTMIN: "35"
+Checking for a 64-bit host to support lmdb: NO
+Checking whether the WRFILE -keytab is supported: OK
+Checking errno of iconv for illegal multibyte sequence: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials: "OK"
+Checking whether fcntl locking is available: OK
+Checking whether fcntl lock supports open file description locks: NO
+Checking for the maximum value of the 'time_t' type: NO
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
--- /dev/null
+Checking uname sysname type: "Linux"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking for large file support without additional flags: OK
+Checking correct behavior of strtoll: OK
+Checking for working strptime: NO
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: OK
+Checking value of NSIG: "65"
+Checking value of _NSIG: "65"
+Checking value of SIGRTMAX: "64"
+Checking value of SIGRTMIN: "35"
+Checking for a 64-bit host to support lmdb: NO
+Checking whether the WRFILE -keytab is supported: OK
+Checking errno of iconv for illegal multibyte sequence: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials: "OK"
+Checking whether fcntl locking is available: OK
+Checking whether fcntl lock supports open file description locks: NO
+Checking for the maximum value of the 'time_t' type: OK
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
include $(TOPDIR)/rules.mk
PKG_NAME:=scapy
-PKG_VERSION:=2.3.1
+PKG_VERSION:=2.4.0
PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=PKG-INFO
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
-PKG_SOURCE_URL:=https://bitbucket.org/secdev/scapy/downloads/
-PKG_HASH:=8972c02e39a826a10c02c2bdd5025f7251dce9589c57befd9bb55c65f02e4934
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/secdev/scapy/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=3836c62c33dd3f7c1ae30f5c2c1ab8078e4e32f5bf9c8be758dbaafe1c6a580e
include $(INCLUDE_DIR)/package.mk
include ../../lang/python/python-package.mk
CATEGORY:=Network
TITLE:=Interactive packet manipulation tool and network scanner
MAINTAINER:=W. Michael Petullo <mike@flyn.org>
- URL:=http://www.secdev.org/projects/scapy/
+ URL:=https://scapy.net/
DEPENDS:=+python
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=seafile-ccnet
-PKG_VERSION:=6.3.0
-PKG_RELEASE=$(PKG_SOURCE_VERSION)-1
+PKG_VERSION:=6.3.4
+PKG_RELEASE:=1
PKG_LICENSE:=GPL-3.0
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/haiwen/ccnet-server.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=614926b161623b267b4fb77fa1861718da406103
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=843660e05809e6a6e076cf4d5ea3a6aad65b9b03aa1eaa3b4d980a314e7aed61
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/haiwen/ccnet-server/tar.gz/v$(PKG_VERSION)-server?
+PKG_HASH:=ab3d5bda728f87c71929a6247c9f74c5209b9b8e44bafa77db91e8de590ec6ef
+PKG_BUILD_DIR:=$(BUILD_DIR)/ccnet-server-$(PKG_VERSION)-server
+
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
DEPENDS:=+libsearpc +libevent2 +libopenssl \
+glib2 +python +libzdb +libuuid \
+libpthread +libsqlite3 +jansson $(ICONV_DEPENDS)
- EXTRA_DEPENDS:=libsearpc (=3.0.8-12a01268825e9c7e17794c58c367e3b4db912ad9-1)
endef
define Package/seafile-ccnet/description
-diff -rupN seafile-ccnet-5.1.1.orig/lib/Makefile.am seafile-ccnet-5.1.1/lib/Makefile.am
---- seafile-ccnet-5.1.1.orig/lib/Makefile.am 2016-04-21 11:04:46.000000000 +0200
-+++ seafile-ccnet-5.1.1/lib/Makefile.am 2016-04-22 10:02:52.583732050 +0200
+--- a/lib/Makefile.am
++++ b/lib/Makefile.am
@@ -1,3 +1,4 @@
+include $(TOPDIR)/rules.mk
searpc_gen = searpc-signature.h searpc-marshal.h
-@@ -86,7 +87,7 @@ rpc_table.stamp: ${top_srcdir}/lib/rpc_t
+@@ -86,7 +87,7 @@ rpc_table.stamp: ${top_srcdir}/lib/rpc_table.py
@rm -f rpc_table.tmp
@touch rpc_table.tmp
@echo "[libsearpc]: generating rpc header files"
-From afeb62f01ad6e610cd19dcde0ceffc018b3247ec Mon Sep 17 00:00:00 2001
+From 6c825349e1994a991f287e398cf0ead5f790a01b Mon Sep 17 00:00:00 2001
From: Eneas U de Queiroz <cote2004-github@yahoo.com>
Date: Wed, 6 Jun 2018 18:05:33 -0300
Subject: [PATCH] Remove API deprecated in openssl 1.1
Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
---
- lib/rsa.c | 19 ++++++++++++++-----
+ lib/rsa.c | 15 ++++++++++++---
net/common/processors/keepalive-proc.c | 4 ++--
net/common/processors/keepalive2-proc.c | 2 +-
net/common/processors/sendsessionkey-proc.c | 2 +-
net/common/processors/sendsessionkey-v2-proc.c | 2 +-
net/server/user-mgr.c | 4 ++++
tools/ccnet-init.c | 2 ++
- 7 files changed, 25 insertions(+), 10 deletions(-)
+ 7 files changed, 23 insertions(+), 8 deletions(-)
diff --git a/lib/rsa.c b/lib/rsa.c
-index 7cca150..23abb82 100644
+index 7cca150..d969a62 100644
--- a/lib/rsa.c
+++ b/lib/rsa.c
@@ -4,6 +4,7 @@
-
- private = RSA_generate_key(bits, 35, NULL, NULL);
- if (private == NULL)
-- g_error ("rsa_generate_private_key: key generation failed.");
-- return private;
+ BIGNUM *e = NULL;
+
+ private = RSA_new();
+ !RSA_generate_key_ex(private, bits, e, NULL)) {
+ RSA_free(private);
+ BN_free(e);
-+ g_error ("rsa_generate_private_key: key generation failed.");
+ g_error ("rsa_generate_private_key: key generation failed.");
+ return NULL;
+ }
+ BN_free(e);
-+ return private;
+ return private;
}
diff --git a/net/common/processors/keepalive-proc.c b/net/common/processors/keepalive-proc.c
index 609d102..42a0c23 100644
SHA1_Init (&s);
SHA1_Update (&s, random_buf, sizeof(random_buf));
diff --git a/net/server/user-mgr.c b/net/server/user-mgr.c
-index 0973959..3f0c3b3 100644
+index 8a356f0..7a3f5cb 100644
--- a/net/server/user-mgr.c
+++ b/net/server/user-mgr.c
-@@ -811,9 +811,13 @@ hash_password_pbkdf2_sha256 (const char *passwd,
+@@ -816,9 +816,13 @@ hash_password_pbkdf2_sha256 (const char *passwd,
char salt_str[SHA256_DIGEST_LENGTH*2+1];
if (!RAND_bytes (salt, sizeof(salt))) {
if (RAND_status() != 1) { /* it should be seeded automatically */
fprintf(stderr, "PRNG is not seeded\n");
--
-2.16.4
+2.19.1
DEPENDS:=+libarchive +libopenssl +glib2 +libsearpc +seafile-ccnet +seafile-seahub +sqlite3-cli +python-mysql +python-urllib3 \
+jansson +libevent2 +libevent2-openssl +zlib +libzdb +libsqlite3 +libmysqlclient \
+libpthread +libuuid +bash +procps-ng +procps-ng-pkill +SEAFILE_FUSE_SUPPORT:libfuse $(ICONV_DEPENDS)
- EXTRA_DEPENDS:=seafile-ccnet (=6.3.0-614926b161623b267b4fb77fa1861718da406103-1), seafile-seahub (=6.3.0-d1ab146a936a6ea1e1581bf3f194e86742f0d3cd-1)
+ EXTRA_DEPENDS:=seafile-seahub (=6.3.0-d1ab146a936a6ea1e1581bf3f194e86742f0d3cd-1)
MENU:=1
endef
socks5 ss plain
--------> tcp:local_address:local_port ----> ss server -------> dest
-`ss-redir`. The REDIRECT and TPROXY part are to be provided by `ss-rules` script. REDIRECT only works for tcp traffic (see also darkk/redsocks). TPROXY is used to proxy udp messages, but it's only available in the PREROUTING chain and as such cannot proxy local out traffic.
+`ss-redir`. The REDIRECT and TPROXY part are to be provided by `ss-rules` script. REDIRECT is for tcp traffic (`SO_ORIGINAL_DST` only supports TCP). TPROXY is for udp messages, but it's only available in the PREROUTING chain and as such cannot proxy local out traffic.
plain plain ss plain
---------> REDIRECT ------> tcp:local_address:local_port ----> ss server -----> original dest
PKG_NAME:=shorewall-core
PKG_MAJOR_MINOR_VERSION:=5.2
-PKG_BUGFIX_MAJOR_VERSION:=0
-PKG_BUGFIX_MINOR_VERSION:=.4
+PKG_BUGFIX_MAJOR_VERSION:=1
+PKG_BUGFIX_MINOR_VERSION:=.1
PKG_VERSION:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)$(PKG_BUGFIX_MINOR_VERSION)
PKG_DIRECTORY:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)
PKG_RELEASE:=1
http://shorewall.de/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
http://www.shorewall.com.au/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=6716c95df96083b0c04e8244fe6669b8e5a4fca808220e9c0c0418813e8289a3
+PKG_HASH:=7c3c3bbed2adacfda91c9eb1b226be8fb9cd32dc8231153ef1ea944528338a36
PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
PKG_LICENSE:=GPL-2.0+
PKG_NAME:=shorewall-lite
PKG_MAJOR_MINOR_VERSION:=5.2
-PKG_BUGFIX_MAJOR_VERSION:=0
-PKG_BUGFIX_MINOR_VERSION:=.4
+PKG_BUGFIX_MAJOR_VERSION:=1
+PKG_BUGFIX_MINOR_VERSION:=.1
PKG_VERSION:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)$(PKG_BUGFIX_MINOR_VERSION)
PKG_DIRECTORY:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)
PKG_RELEASE:=1
http://shorewall.de/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
http://www.shorewall.com.au/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=5e0993a54c71eb7d5a012c804e969eec63b23f7781ea1308eff24d890fdeebc7
+PKG_HASH:=101f9dc52abecd616a9e7d7e3b6e4b5a96545c153680e34e51ed2a2baf9af548
PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
PKG_LICENSE:=GPL-2.0+
PKG_NAME:=shorewall
PKG_MAJOR_MINOR_VERSION:=5.2
-PKG_BUGFIX_MAJOR_VERSION:=0
-PKG_BUGFIX_MINOR_VERSION:=.4
+PKG_BUGFIX_MAJOR_VERSION:=1
+PKG_BUGFIX_MINOR_VERSION:=.1
PKG_VERSION:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)$(PKG_BUGFIX_MINOR_VERSION)
PKG_DIRECTORY:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)
PKG_RELEASE:=1
http://shorewall.de/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
http://www.shorewall.com.au/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=90c6a7e3d8e3abaf0d71636b85622d3bb5059d785eb11b9bd7301060908cf82d
+PKG_HASH:=6ce8c126155ab2615ffe97d0164cd12db7b523f8a83c182ee50c7b0494f161de
PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
PKG_LICENSE:=GPL-2.0+
PKG_NAME:=shorewall6-lite
PKG_MAJOR_MINOR_VERSION:=5.2
-PKG_BUGFIX_MAJOR_VERSION:=0
-PKG_BUGFIX_MINOR_VERSION:=.4
+PKG_BUGFIX_MAJOR_VERSION:=1
+PKG_BUGFIX_MINOR_VERSION:=.1
PKG_VERSION:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)$(PKG_BUGFIX_MINOR_VERSION)
PKG_DIRECTORY:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)
PKG_RELEASE:=1
http://shorewall.de/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
http://www.shorewall.com.au/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=3bdeafd3dbb5e6c75ab521ea5a3e371ff534b2d9cc0912ba218526f9618e3382
+PKG_HASH:=4594cbd7e631a9c266d0be2ff05976851a5fde30e5c407daa4bf7ed22e998277
PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
PKG_LICENSE:=GPL-2.0+
PKG_NAME:=shorewall6
PKG_MAJOR_MINOR_VERSION:=5.2
-PKG_BUGFIX_MAJOR_VERSION:=0
-PKG_BUGFIX_MINOR_VERSION:=.4
+PKG_BUGFIX_MAJOR_VERSION:=1
+PKG_BUGFIX_MINOR_VERSION:=.1
PKG_VERSION:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)$(PKG_BUGFIX_MINOR_VERSION)
PKG_DIRECTORY:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)
PKG_RELEASE:=1
http://shorewall.de/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
http://www.shorewall.com.au/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=ebf91809ba4342806fb8a148a402663c69ba168546e8a440be3542f04e89f2aa
+PKG_HASH:=019bcb0f2fe2c10cb7b35e0e165abd61dd7214ea07d0d49a29f7b998a4fa99d8
PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
PKG_LICENSE:=GPL-2.0+
PKG_NAME:=snort
PKG_VERSION:=2.9.11.1
-PKG_RELEASE:=5
+PKG_RELEASE:=6
PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
@SF/$(PKG_NAME)
PKG_HASH:=9f6b3aeac5a109f55504bd370564ac431cb1773507929dc461626898f33f46cd
-PKG_BUILD_DEPENDS:=librpc
+PKG_BUILD_DEPENDS:=libtirpc
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(PKG_NAME)-$(PKG_VERSION)
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
MAKE_FLAGS += \
extra_incl=""
+
+TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/tirpc
define Build/InstallDev
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/snort/dynamic_preproc
#
-# Copyright (C) 2006-2015 OpenWrt.org
-#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
PKG_NAME:=socat
PKG_VERSION:=1.7.3.2
-PKG_RELEASE:=2
+PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://www.dest-unreach.org/socat/download
CONFIGURE_ARGS+= --disable-openssl
endif
+# PowerPC has different TERMIOS bits
+ifneq ($(findstring powerpc,$(CONFIG_ARCH)),)
+ CONFIGURE_VARS += \
+ sc_cv_sys_crdly_shift=12 \
+ sc_cv_sys_tabdly_shift=10 \
+ sc_cv_sys_csize_shift=8
+else
+ CONFIGURE_VARS += \
+ sc_cv_sys_crdly_shift=9 \
+ sc_cv_sys_tabdly_shift=11 \
+ sc_cv_sys_csize_shift=4
+endif
+
CONFIGURE_VARS += \
sc_cv_termios_ispeed="no" \
- sc_cv_sys_crdly_shift=9 \
- sc_cv_sys_tabdly_shift=11 \
- sc_cv_sys_csize_shift=4 \
+ ac_cv_header_bsd_libutil_h=no \
+ ac_cv_lib_bsd_openpty=no \
BUILD_DATE=$(SOURCE_DATE_EPOCH)
define Package/socat/install
--- /dev/null
+diff --git a/xio-openssl.c b/xio-openssl.c
+index e931983..84ec100 100644
+--- a/xio-openssl.c
++++ b/xio-openssl.c
+@@ -8,6 +8,8 @@
+ #if WITH_OPENSSL /* make this address configure dependend */
+ #include <openssl/conf.h>
+ #include <openssl/x509v3.h>
++#include <openssl/dh.h>
++#include <openssl/bn.h>
+
+ #include "xioopen.h"
+
--- /dev/null
+#
+# Copyright (C) 2018 The Regents of the University of California
+#
+# This is free software, licensed under the GNU General Public License v3.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=spoofer
+PKG_VERSION:=1.4.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://www.caida.org/projects/spoofer/downloads
+PKG_HASH:=cab261f00fdc4a7d9f98b199205764947d5c2081aa8192e4e17020cf0e2fe434
+
+PKG_LICENSE:=GPL-3.0
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_USE_MIPS16:=0
+HOST_BUILD_DEPENDS:=protobuf/host
+
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/package.mk
+
+$(eval $(call HostBuild))
+
+define Package/spoofer
+ SECTION:=net
+ CATEGORY:=Network
+ TITLE:=Measure your ISP's resistance to spoofed IP packets
+ URL:=https://spoofer.caida.org/
+ MAINTAINER:=Ken Keys <spoofer-info@caida.org>
+ DEPENDS:=+protobuf-lite +libpcap +libpthread +libopenssl
+endef
+
+define Package/spoofer/description
+The spoofer client is part of a system to measure the Internet's
+resistance to packets with a spoofed (forged) source IP address.
+
+This package comes bundled with a small certificate file that allows
+secure communication with the spoofer server without depending on
+the large ca-certificates package. But if the server's private
+certificate ever changes, it will be necessary to either install the
+ca-certificates package or install an updated version of this package
+that has a newer bundled certificate.
+
+endef
+
+CONFIGURE_ARGS += \
+ --enable-prober \
+ --disable-manager
+
+CONFIGURE_VARS += \
+ PROTOC=$(STAGING_DIR_HOSTPKG)/bin/protoc
+
+EXTRA_CXXFLAGS += -std=gnu++14
+
+SPOOFER_SRC=$(PKG_BUILD_DIR)
+
+define Package/spoofer/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/prober/spoofer-prober $(1)/usr/bin
+ $(INSTALL_BIN) $(SPOOFER_SRC)/openwrt-files/spoofer $(1)/usr/bin
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) $(SPOOFER_SRC)/openwrt-files/initscript $(1)/etc/init.d/spoofer
+ $(INSTALL_DIR) $(1)/usr/share/spoofer
+ $(INSTALL_DATA) $(SPOOFER_SRC)/gd_bundle.crt $(1)/usr/share/spoofer
+ $(INSTALL_DATA) $(SPOOFER_SRC)/openwrt-files/spoofer-lib.sh $(1)/usr/share/spoofer
+endef
+
+$(eval $(call BuildPackage,spoofer))
include $(TOPDIR)/rules.mk
PKG_NAME:=sqm-scripts
-PKG_SOURCE_VERSION:=a94318a2ecd709403fb8c0d622063d9ce1859615
-PKG_VERSION:=1.2.3
+PKG_SOURCE_VERSION:=d0ac824ec0c5d0fc3593ce90d83a007da505856e
+PKG_VERSION:=1.2.4
PKG_RELEASE:=1
PKG_LICENSE:=GPLv2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE).tar.xz
-PKG_MIRROR_HASH:=0cabeaf9c9d7ff260d8ed7b4ed518c67ff4640d82a8583e2fb4d695befb79c54
+PKG_MIRROR_HASH:=2882aeae9f8b7827655bae8b0ecae60c405795a2a51aec8d3f2ae5fccecd76b9
PKG_SOURCE_URL:=https://github.com/tohojo/sqm-scripts.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)
TITLE:=SQM Scripts - LuCI interface
MAINTAINER:=Toke Høiland-Jørgensen <toke@toke.dk>
PKGARCH:=all
- DEPENDS:= lua luci-base +sqm-scripts
+ DEPENDS:= +lua +luci-base +sqm-scripts
SUBMENU:=3. Applications
endef
comment "Optional packages"
- config SQUID_use-gnutls
- bool "Use GnuTLS instead of OpenSSL"
- default n
+ choice
+ prompt "Choose SSL Library"
+ default SQUID_use-openssl
+
+ config SQUID_use-openssl
+ bool "Use OpenSSL (default)"
+
+ config SQUID_use-gnutls
+ bool "Use GnuTLS (experimental, see help)"
+ help
+ Use GnuTLS in place of OpenSSL for the core features of receiving
+ TLS connections from clients and making TLS connections to servers.
+ The GnuTLS support is still very much experimental and should be
+ tested before use.
+
+ SSL-Bump and certificate generation features are not yet supported
+ by GnuTLS builds. Nor are many other less commonly used Squid
+ TLS/SSL features.
+
+ squid.conf directives and configuration options which have undergone
+ name changes from 'ssl' to 'tls' prefix in Squid-4 have GnuTLS
+ support, unless explicitly stated otherwise.
+
+ Advanced configuration with specific selection of ciphers and
+ similar settings should still work, but needs the GnuTLS Priority
+ Strings instead of the OpenSSL options when using GnuTLS.
+ endchoice
config SQUID_with-libcap
bool "Use libcap - Linux capabilities library"
include $(TOPDIR)/rules.mk
PKG_NAME:=squid
-PKG_VERSION:=4.0.24
+PKG_VERSION:=4.4
PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0
PKG_SOURCE_URL:=http://www3.us.squid-cache.org/Versions/v4/ \
http://www2.pl.squid-cache.org/Versions/v4/ \
http://www.squid-cache.org/Versions/v4/
-PKG_HASH:=091da0d763307dcc0f5c784ab07ea0c5a093f6dfac60f17ff26e2a6d50f76a07
+PKG_HASH:=4905e6da7f5574d2583ba36f398bb062a12d51e70d67035078b6e85b09e9ee82
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
+PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk
$(call Package/squid/Default)
MENU:=1
DEPENDS:=+libpthread +librt +libltdl +libstdcpp +libatomic +USE_GLIBC:libbsd
- DEPENDS+= +SQUID_use-gnutls:libgnutls +!SQUID_use-gnutls:libopenssl
+ DEPENDS+= +SQUID_use-gnutls:libgnutls +SQUID_use-openssl:libopenssl
DEPENDS+= +SQUID_with-libcap:libcap
DEPENDS+= +SQUID_with-nettle:libnettle
DEPENDS+= +SQUID_with-expat:libexpat
endef
CONFIGURE_ARGS += \
+ BUILDCXX=$(HOSTCXX) \
+ BUILDCXXFLAGS=$(if $(HOST_CXXFLAGS),$(HOST_CXXFLAGS),-O2) \
--config-cache \
--datadir=/usr/share/squid \
--libexecdir=/usr/lib/squid \
src/Makefile.in | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
-Index: squid-4.0.21/src/Makefile.in
-===================================================================
---- squid-4.0.21.orig/src/Makefile.in
-+++ squid-4.0.21/src/Makefile.in
-@@ -7642,7 +7642,8 @@ cache_cf.o: cf_parser.cci
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -8383,7 +8383,8 @@
# cf_gen builds the configuration files.
cf_gen$(EXEEXT): $(cf_gen_SOURCES) $(cf_gen_DEPENDENCIES) cf_gen_defines.cci
---- squid-4.0.21.orig/src/tools.cc
-+++ squid-4.0.21/src/tools.cc
-@@ -581,7 +581,8 @@
+--- a/src/tools.cc
++++ b/src/tools.cc
+@@ -582,7 +582,8 @@
}
#else
include $(TOPDIR)/rules.mk
PKG_NAME:=strongswan
-PKG_VERSION:=5.6.3
-PKG_RELEASE:=2
+PKG_VERSION:=5.7.1
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=c3c7dc8201f40625bba92ffd32eb602a8909210d8b3fac4d214c737ce079bf24
PKG_SOURCE_URL:=http://download.strongswan.org/ http://download2.strongswan.org/
+PKG_HASH:=006f9c9126e2a2f4e7a874b5e1bd2abec1bbbb193c8b3b3a4c6ccd8c2d454bec
PKG_LICENSE:=GPL-2.0+
PKG_MAINTAINER:=Stijn Tintel <stijn@linux-ipv6.be>
+#undef encrypt
--- a/src/libcharon/plugins/kernel_netlink/kernel_netlink_ipsec.c
+++ b/src/libcharon/plugins/kernel_netlink/kernel_netlink_ipsec.c
-@@ -19,6 +19,7 @@
+@@ -40,6 +40,7 @@
*/
#define _GNU_SOURCE
+#include <musl.h>
#include <sys/types.h>
#include <sys/socket.h>
- #include <stdint.h>
+ #include <sys/ioctl.h>
--- a/src/libcharon/plugins/kernel_netlink/kernel_netlink_net.c
+++ b/src/libcharon/plugins/kernel_netlink/kernel_netlink_net.c
@@ -37,6 +37,8 @@
+# This files/scripts are executed by the openwrt hotplug functionality on
+# ipsec events.
+
-+exec /sbin/hotplug-call ipsec "$1"
++/sbin/hotplug-call ipsec "$1"
+
# PLUTO_VERSION
# indicates what version of this interface is being
--- a/configure.ac
+++ b/configure.ac
-@@ -135,6 +135,7 @@ ARG_DISBL_SET([fips-prf], [disable
+@@ -136,6 +136,7 @@ ARG_DISBL_SET([fips-prf], [disable
ARG_ENABL_SET([gcm], [enables the GCM AEAD wrapper crypto plugin.])
ARG_ENABL_SET([gcrypt], [enables the libgcrypt plugin.])
ARG_DISBL_SET([gmp], [disable GNU MP (libgmp) based crypto implementation plugin.])
ARG_DISBL_SET([curve25519], [disable Curve25519 Diffie-Hellman plugin.])
ARG_DISBL_SET([hmac], [disable HMAC crypto implementation plugin.])
ARG_ENABL_SET([md4], [enable MD4 software implementation plugin.])
-@@ -1379,6 +1380,7 @@ ADD_PLUGIN([gcrypt], [s ch
+@@ -1410,6 +1411,7 @@ ADD_PLUGIN([botan], [s ch
ADD_PLUGIN([af-alg], [s charon scepclient pki scripts medsrv attest nm cmd aikgen])
ADD_PLUGIN([fips-prf], [s charon nm cmd])
ADD_PLUGIN([gmp], [s charon scepclient pki scripts manager medsrv attest nm cmd aikgen fuzz])
ADD_PLUGIN([curve25519], [s charon pki scripts nm cmd])
ADD_PLUGIN([agent], [s charon nm cmd])
ADD_PLUGIN([keychain], [s charon cmd])
-@@ -1516,6 +1518,7 @@ AM_CONDITIONAL(USE_SHA3, test x$sha3 = x
+@@ -1550,6 +1552,7 @@ AM_CONDITIONAL(USE_SHA3, test x$sha3 = x
AM_CONDITIONAL(USE_MGF1, test x$mgf1 = xtrue)
AM_CONDITIONAL(USE_FIPS_PRF, test x$fips_prf = xtrue)
AM_CONDITIONAL(USE_GMP, test x$gmp = xtrue)
AM_CONDITIONAL(USE_CURVE25519, test x$curve25519 = xtrue)
AM_CONDITIONAL(USE_RDRAND, test x$rdrand = xtrue)
AM_CONDITIONAL(USE_AESNI, test x$aesni = xtrue)
-@@ -1783,6 +1786,7 @@ AC_CONFIG_FILES([
+@@ -1824,6 +1827,7 @@ AC_CONFIG_FILES([
src/libstrongswan/plugins/mgf1/Makefile
src/libstrongswan/plugins/fips_prf/Makefile
src/libstrongswan/plugins/gmp/Makefile
src/libstrongswan/plugins/aesni/Makefile
--- a/src/libstrongswan/Makefile.am
+++ b/src/libstrongswan/Makefile.am
-@@ -323,6 +323,13 @@ if MONOLITHIC
+@@ -341,6 +341,13 @@ if MONOLITHIC
endif
endif
PKG_NAME:=stubby
PKG_VERSION:=0.2.3
-PKG_RELEASE:=1
+PKG_RELEASE:=3
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=David Mora <iamperson347+public@gmail.com>
+PKG_MAINTAINER:=David Mora <iamperson347+public@gmail.com>, Jonathan Underwood <jonathan.underwood@gmail.com>
PKG_SOURCE_PROTO:=git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
URL:=https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Daemon+-+Stubby
endef
-define Package/stubby/description
- This package contains the Stubby daemon (which utilizes the getdns library).
-
- See https://github.com/openwrt/packages/blob/master/net/stubby/files/README.md for more details.
-endef
-
define Package/stubby
$(call Package/stubby/Default)
SECTION:=net
SUBMENU:=IP Addresses and Names
TITLE+= - (daemon that uses getdns)
USERID:=stubby=410:stubby=410
- DEPENDS:= +libyaml +getdns
+ DEPENDS:= +libyaml +getdns +ca-certificates
+endef
+
+define Package/stubby/description
+ This package contains the Stubby daemon (which utilizes the getdns library).
+
+ See https://github.com/openwrt/packages/blob/master/net/stubby/files/README.md for more details.
+endef
+
+define Package/stubby/conffiles
+/etc/stubby/stubby.yml
endef
define Package/stubby/install
$(INSTALL_DIR) $(1)/etc/stubby
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/stubby/stubby.yml $(1)/etc/stubby/stubby.yml.default
$(INSTALL_DATA) ./files/stubby.yml $(1)/etc/stubby/stubby.yml
+ $(INSTALL_DIR) $(1)/etc/config
+ $(INSTALL_DATA) ./files/stubby.conf $(1)/etc/config/stubby
endef
define Package/stubby/conffiles
/etc/stubby/stubby.yml
+ /etc/config/stubby
endef
$(eval $(call BuildPackage,stubby))
+
# Stubby for OpenWRT
## Stubby Description
-[Stubby](https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Daemon+-+Stubby) is an application that acts as a local DNS Privacy stub resolver (using DNS-over-TLS). Stubby encrypts DNS queries sent from a client machine (desktop or laptop) to a DNS Privacy resolver increasing end user privacy.
+
+[Stubby](https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Daemon+-+Stubby) is
+an application that acts as a local DNS Privacy stub resolver (using
+DNS-over-TLS). Stubby encrypts DNS queries sent from a client machine to a DNS
+Privacy resolver increasing end user privacy.
+
+Stubby is useful on an OpenWRT device, because it can sit between the usual DNS
+resolver (dnsmasq by default) and the upstream DNS resolver and be used to
+ensure that DNS traffic is encrypted between the OpenWRT device and the
+resolver.
Stubby is developed by the [getdns](http://getdnsapi.net/) project.
-For more background and FAQ see our [About Stubby](https://dnsprivacy.org/wiki/display/DP/About+Stubby) page. Stubby is in the early stages of development but is suitable for technical/advanced users. A more generally user-friendly version is on the way!
+For more background and FAQ see the [About
+Stubby](https://dnsprivacy.org/wiki/display/DP/About+Stubby) page.
+
+
+## Installation
+
+Installation of this package can be achieved at the command line using `opkg
+install stubby`, or via the LUCI Web Interface. Installing the stubby package
+will also install the required dependency packages, including the
+`ca-certificates` package.
+
+## Configuration
+
+The default configuration of the package has been chosen to ensure that stubby
+should work after installation.
+
+By default, configuration of stubby is integrated with the OpenWRT UCI system
+using the file `/etc/config/stubby`. The configuration options available are
+also documented in that file. If for some reason you wish to configure stubby
+using the `/etc/stubby/stubby.yml` file, then you simply need to set `option
+manual '1'` in `/etc/config/stubby` and all other settings in
+`/etc/config/stubby` will be ignored.
+
+### Stubby port and addresses
+
+The default configuration ensures that stubby listens on port 5453 on the
+loopback interfaces for IPv4 and IPv6. As such, by default, stubby will respond
+only to lookups from the OpenWRT device itself.
+
+By setting the listening ports to non-standard values, this allows users to keep
+the main name server daemon in place (dnsmasq/unbound/etc.) and have that name
+server forward to stubby.
+
+### Upstream resolvers
+
+The default package configuration uses the CloudFlare resolvers, configured for
+both IPv4 and IPv6.
+
+CloudFlare have not published SPKI pinsets, and even though they are available,
+they have made no commitment to maintaining them. Using the currently known SPKI
+pinsets for CloudFlare brings the risk that in the future they may be changed by
+CloudFlare, and DNS would stop working. The default configuration has those SPKI
+entries commented out for this reason.
+
+[CloudFlare's privacy
+statement](https://developers.cloudflare.com/1.1.1.1/commitment-to-privacy/)
+details how they treat data from DNS requests.
+
+More resolvers are available in the [upstream stubby example
+configuration](https://github.com/getdnsapi/stubby/blob/develop/stubby.yml.example)
+and the [DNS Privacy
+list](https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Test+Servers).
+
+## Integration of stubby with dnsmasq
+
+The recommended way to use stubby on an OpenWRT device is to integrate it with a
+caching resolver. The default caching resolver in OpenWRT is dnsmasq.
+
+### Set dnsmasq to send DNS requests to stubby
+
+Since dnsmasq responds to LAN DNS requests on port 53 of the OpenWRT device by
+default, all that is required is to have dnsmasq forward those requests to
+stubby which is listening on port 5453 of the OpenWRT device. To achieve this,
+we need to set the `server` option in the dnsmasq configuration in the
+`/etc/config/dhcp` file to `'127.0.0.1#5453'`. We also need to tell dnsmasq not
+to use resolvers found in `/etc/resolv.conf` by setting the dnsmasq option
+`noresolv` to `1` in the same file. This can be achieved by editing the
+`/etc/config/dhcp` file directly or executing the following commands at the
+command line:
+
+ uci add_list dhcp.@dnsmasq[-1].server='127.0.0.1#5453'
+ uci dhcp.@dnsmasq[-1].noresolv=1
+ uci commit && reload_config
+
+The same outcome can be achieved in the LUCI web interface as follows:
+
+1. Select the Network->DHCP and DNS menu entry.
+2. In the "General Settings" tab, enter the address `127.0.0.1#5453` as the only
+ entry in the "DNS Forwardings" dialogue.
+3. In the "Resolv and Host files" tab tick the "Ignore resolve file" checkbox.
+
+### Disable sending DNS requests to ISP provided DNS servers
+
+The configuration changes in the previous section ensure that DNS queries are
+sent over TLS encrypted connections *once dnsmasq and stubby are started*. When
+the OpenWRT device is first brought up, there is a possibility that DNS queries
+can go to ISP provided DNS servers ahead of dnsmasq and stubby being active. In
+order to mitigate this leakage, it's necessary to ensure that upstream resolvers
+aren't available, and the only DNS resolver used by the system is
+dnsmasq+stubby.
+
+This requires setting the option `peerdns` to `0` and the option `dns` to the
+loopback address for both the `wan` and `wan6` interfaces in the
+`/etc/config/network` file. This can be achieved by editing the
+`/etc/config/network` file directly, or by executing the following commands:
+
+ uci set network.wan.peerdns='0'
+ uci set network.wan.dns='127.0.0.1'
+ uci set network.wan6.peerdns='0'
+ uci set network.wan6.dns='0::1'
+ uci commit && reload_config
+
+The same outcome can also be achieved using the LUCI web interface as follows:
+
+1. Select the Network->Interfaces menu entry.
+2. Click on Edit for the WAN interfaces.
+3. Choose the Advanced Settings tab.
+4. Unselect the "Use DNS servers advertised by peer" checkbox
+5. Enter `127.0.0.1` in the "Use custom DNS servers" dialogue box.
+6. Repeat the above steps for the WAN6 interface, but use the address `0::1`
+ instead of `127.0.0.1`.
+
+### Enabling DNSSEC
+
+The configuration described above ensures that DNS queries are executed over TLS
+encrypted links. However, the responses themselves are not validated; DNSSEC
+provides the ability to validate returned DNS responses, and mitigate against
+DNS poisoning risks.
+
+With the combination of stubby+dnsmasq there are two possible ways to enable
+DNSSEC:
+
+1. Configure stubby to perform DNSSEC validation, and configure dnsmasq to proxy
+ the DNSSEC data to clients.
+2. Configure stubby not to perform DNSSEC validation and configure dnsmasq to
+ require DNSSEC validation.
+
+Either option achieves the same outcome, and there appears to be little reason
+for choosing one over the other other than that the second option is easier to
+configure in the LUCI web interface. Both options are detailed below, and both
+require that the `dnsmasq` package on the OpenWRT device is replaced with the
+`dnsmasq-full` package. That can be achieved by running the following command:
+
+ opkg install dnsmasq-full --download-only && opkg remove dnsmasq && opkg install dnsmasq-full --cache . && rm *.ipk
+
+#### DNSSEC by stubby
+
+Configuring stubby to perform DNSSEC validation requires setting the stubby
+configuration option `dnssec_return_status` to `'1'` in `/etc/config/stubby`,
+which can be done by editing the file directly or by executing the commands:
+
+ uci set stubby.global.dnssec_return_status=1
+ uci commit && reload_config
+
+With stubby performing DNSSEC validation, dnsmasq needs to be configured to
+proxy the DNSSEC data to clients. This requires setting the option `proxydnssec`
+to 1 in the dnsmasq configuration in `/etc/config/dhcp`. That can be achieved by
+the following commands:
+
+ uci set dhcp.@dnsmasq[-1].proxydnssec=1
+ uci commit && reload_config
+
+#### DNSSEC by dnsmasq
+
+Configuring dnsmasq to perform DNSSEC validation requires setting the dnsmasq
+option `dnssec` to `1` in the `/etc/config/dhcp` file. In addition, it is
+advisable to also set the dnsmasq option `dnsseccheckunsigned` to `1`. this can
+be achieved by editing the file `/etc/config/dhcp` or by executing the following
+commands:
+
+ uci set dhcp.@dnsmasq[-1].dnssec=1
+ uci set dhcp.@dnsmasq[-1].dnsseccheckunsigned=1
+ uci commit && reload_config
+
+The same options can be set in the LUCI web interface as follows:
+
+1. Select the "Network->DHCP and DNS" menu entry.
+2. Select the "Advanced Settings" tab.
+3. Ensure both the "DNSSEC" and "DNSSEC check unsigned" check boxes are ticked.
+
+#### Validating DNSSEC operation
+
+Having configured DNSSEC validation using one of the two approaches above, it's
+important to check it's actually working. The following command can be used:
+
+ dig dnssectest.sidn.nl +dnssec +multi @192.168.1.1
+
+This command should return output like the following:
+
+ ; <<>> DiG 9.11.4-P1-RedHat-9.11.4-5.P1.fc28 <<>> dnssectest.sidn.nl +dnssec +multi @192.168.1.1
+ ;; global options: +cmd
+ ;; Got answer:
+ ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26579
+ ;; flags: qr rd ra ad; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
+
+ ;; OPT PSEUDOSECTION:
+ ; EDNS: version: 0, flags: do; udp: 512
+ ;; QUESTION SECTION:
+ ;dnssectest.sidn.nl. IN A
+
+ ;; ANSWER SECTION:
+ dnssectest.sidn.nl. 14399 IN A 213.136.9.12
+ dnssectest.sidn.nl. 14399 IN RRSIG A 8 3 14400 (
+ 20181104071058 20181005071058 42033 sidn.nl.
+ YAQl3tef36M9EQUOmCneHKCCkxox3csLpfUOql5i/6ND
+ zPrQFsNr3g32HPoxOsi+hD2BE5+bEsnARayDSVLyx0qU
+ 6Hpi2rzQ0zGNZZkCJhCsdp3wnM1BWlMgPrCD0iIsJDok
+ +DH5zu+yYufVUdSLQrMqA3MZDFUIqDUqSZuYDF4= )
+
+ ;; Query time: 77 msec
+ ;; SERVER: 192.168.1.1#53(192.168.1.1)
+ ;; WHEN: Sat Oct 06 20:36:25 BST 2018
+ ;; MSG SIZE rcvd: 230
+
+The key thing to note is the `flags: qr rd ra ad` part - the `ad` flag signifies
+that DNSSEC validation is working. If that flag is absent DNSSEC validation is
+not working.
+
+## Appendix: stubby configuration options
+
+This section details the options available for use in the `/etc/config/stubby`
+file. The `global` configuration section specifies the configuration parameters
+for the stubby daemon. One or more `resolver` sections are used to configure
+upstream resolvers for the stubby daemon to use.
+
+### `global` section options
+
+#### `option manual`
+
+Specify whether to use this file to configure the stubby service. If this is set
+to `'1'` stubby will be configured using the file `/etc/stubby/stubby.yml`. If this
+is set to `'0'`, configuration options will be taken from this file, and the service
+will be managed through UCI.
+
+#### `option trigger`
+
+This specifies an interface to trigger stubby start up on; stubby startup will
+be triggered by a procd signal associated with this interface being ready. If
+this interface is restarted, stubby will also be restarted.
+
+This option can also be set to `'timed'`, in which case a time, specified by the
+option `triggerdelay`, will be waited before starting stubby.
+
+
+#### `option triggerdelay`
+
+If the `trigger` option specifies an interface, this option sets the time that
+is waited after the procd signal is received before starting stubby.
+
+If `trigger` is set to `'timed'` then this is the delay before starting stubby.
+This option is specified in seconds and defaults to the value `'2'`.
+
+#### `list dns_transport`
+
+The `dns_transport` list specifies the allowed transports. Allowed values are:
+`GETDNS_TRANSPORT_UDP`, `GETDNS_TRANSPORT_TCP` and `GETDNS_TRANSPORT_TLS`. The
+transports are tried in the order listed.
+
+#### `option tls_authentication`
+
+This option specifies whether TLS authentication is mandatory. A value of `'1'`
+mandates TLS authentication, and is the default.
+
+If this is set to `'0'`, and `GETDNS_TRANSPORT_TCP` or `GETDNS_TRANSPORT_UDP`
+appears in the `dns_transport` list, stubby is allowed to fall back to non-TLS
+authenticated lookups. You probably don't want this though.
+
+#### `option tls_query_padding_blocksize`
+
+This option specifies the block size to pad DNS queries to. You shouldn't need
+to set this to anything but `'128'` (the default), as recommended by
+https://tools.ietf.org/html/draft-ietf-dprive-padding-policy-03
+
+#### `option tls_connection_retries`
+
+This option specifies the number of connection failures stubby permits before
+Stubby backs-off from using an individual upstream resolver. You shouldn't need
+to change this from the default value of `'2'`.
+
+#### `option tls_backoff_time`
+
+This option specifies the maximum time in seconds Stubby will back-off from
+using an individual upstream after failures. You shouldn't need to change this
+from the default value of `'3600'`.
+
+#### `option timeout`
+
+This option specifies the timeout on getting a response to an individual
+request. This is specified in milliseconds. You shouldn't need to change this
+from the default value of ` '5000'`.
+
+#### `option dnssec_return_status`
+
+This option specifies whether stubby should require DNSSEC validation. Specify
+to `'1'` to turn on validation, and `'0'` to turn it off. By default it is off.
+
+#### `option appdata_dir`
+
+This option specifies the location for storing stubby runtime data. In
+particular, if DNSSEC is turned on, stubby will store its automatically
+retrieved trust anchor data here. The default value is `'/var/lib/stubby'`.
+
+#### `option dnssec_trust_anchors`
+
+This option sets the location of the file containing the trust anchor data used
+for DNSSEC validation. If this is not specified, stubby will automatically
+retrieve a trust anchor at startup. It's unlikely you'll want to manage the
+trust anchor data manually, so in most cases this is not needed. By default,
+this is unset.
+
+#### `option edns_client_subnet_private`
+
+This option specifies whether to enforce ECS client privacy. The default is
+`'1'`. Set to `'0'` to disable client privacy.
+
+For more details see Section 7.1.2 [here](https://tools.ietf.org/html/rfc7871).
+
+#### `option idle_timeout`
+
+This option specifies the time (in milliseconds) to hold TLS connections open to
+avoid the overhead of opening a new connection for every query. You should not
+normally need to change this from the default value (currently `'10000'`).
+
+See [here](https://tools.ietf.org/html/rfc7828) for more details.
+
+#### `option round_robin_upstreams`
-## Prerequisites
+This option specifies how stubby will use the upstream DNS resolvers. Set to
+`'1'` (the default) to instruct stubby to distribute queries across all
+available name servers - this will use multiple simultaneous connections which
+can give better performance in most (but not all) cases. Set to `'0'` to treat
+the upstream resolvers as an ordered list and use a single upstream resolver
+until it becomes unavailable, then use the next one.
-You must have a ca cert bundle installed on your device for stubby to make the TLS enabled connections.
+#### `list listen_address`
-- You can install this by running the following: opkg install ca-certificates
-- You can also install this through the LUCI web interface
+This list sets the addresses and ports for the stubby daemon to listen for
+requests on. the default configuration configures stubby to listen on port 5453
+on the loopback interface for both IPv4 and IPv6.
-## Package Overview
-This package has some modifications that makes it differ from the default upstream configuration. They are outlined below.
+#### `option log_level`
-### General Cleanup
-Comments are removed, etc.
+If set, this option specifies the level of logging from the stubby
+daemon. By default, this option is not set.
-### EDNS Client-Subnet Option Changed to 0
-The value of "edns_client_subnet_private" is '1' in the upstream default config. This informs the upstream resolver to NOT forward your connection's IP to any other upstream servers. This is good for privacy, but could result in sub-optimal routing to CDNs, etc.
+The possible levels are:
-To give a more "comparable" DNS experience similar to google/opendns, this package disables this option.
+ '0': EMERG - System is unusable
+ '1': ALERT - Action must be taken immediately
+ '2': CRIT - Critical conditions
+ '3': ERROR - Error conditions
+ '4': WARN - Warning conditions
+ '5': NOTICE - Normal, but significant, condition
+ '6': INFO - Informational message
+ '7': DEBUG - Debug-level message
-### Default Listening Ports Changed
-The value of "listen_addresses" in the default config does not list port numbers, which will cause stubby to default to port 53. However, Openwrt defaults to dnsmasq as the main name server daemon, which runs on port 53. By setting the listening ports to non-standard values, this allows users to keep the main name server daemon in place (dnsmasq/unbound/etc.) and have that name server forward to stubby.
+#### `option command_line_arguments`
-Additionally, due to the slight overhead involved with DNS-over-TLS, it is recommended to have a caching name server on the network.
+This option specifies additional command line arguments for
+stubby daemon. By default, this is an empty string.
+
+### `resolver` section options
-### Round Robin Upstream Setting Changed
+#### `option address`
-The default stubby config list multiple upstream resolvers, and because of this, it makes sense to "load balance" between them. However, in this package's default stubby config, the only upstream service listed is Cloudflare. One entry is for ipv6 and one for ipv4.
+This option specifies the resolver IP address, and can either be an IPv4 or an
+IPv6 address.
-By setting the "round_robin_upstreams" value to 0, we are simply forcing stubby to try and use ipv6 connectivity to Cloudflare first, and if not available, simply use the ipv4 service.
+#### `option tls_auth_name`
-Cloudflare is an Anycast DNS service. This should take care of any needed "failover" in the event that one of Cloudflare's nodes goes down.
+This option specifies the upstream domain name used for TLS authentication with
+the supplied server certificate
-### Upstream Resolvers Changed
+#### `list spki`
-Most of the default resolvers for stubby are in Europe. To provide a better experience for a larger number of users, this package defaults to using Cloudflare's DNS service. Cloudflare's DNS service has been ranked number one in speed against many other top resolvers.
+This list specifies the SPKI pinset which is verified against the keys in the
+server cerrtificate. The values takes the form `'<digest type>/value>'`, where
+the `digest type` is the hashing algorithm used, and the value is the Base64
+encoded hash of the public key. At present, only `sha256` is
+supported for the digest type.
-https://developers.Cloudflare.com/1.1.1.1/commitment-to-privacy/
-https://www.dnsperf.com/dns-resolver/1-1-1-1
\ No newline at end of file
+This should ONLY be used if the upstream resolver has committed to maintaining
+the pinset. CloudFlare have made no such commitment, and so we do not specify
+the SPKI values in the default configuration, even though they are available.
--- /dev/null
+config stubby 'global'
+ option manual '0'
+ option trigger 'wan'
+ # option triggerdelay '2'
+ list dns_transport 'GETDNS_TRANSPORT_TLS'
+ option tls_authentication '1'
+ option tls_query_padding_blocksize '128'
+ # option tls_connection_retries '2'
+ # option tls_backoff_time '3600'
+ # option timeout '5000'
+ # option dnssec_return_status '0'
+ option appdata_dir '/var/lib/stubby'
+ # option dnssec_trust_anchors '/var/lib/stubby/getdns-root.key'
+ option edns_client_subnet_private '1'
+ option idle_timeout '10000'
+ option round_robin_upstreams '1'
+ list listen_address '127.0.0.1@5453'
+ list listen_address '0::1@5453'
+ # option log_level '7'
+ # option command_line_arguments ''
+
+# Upstream resolvers are specified using 'resolver' sections.
+config resolver
+ option address '2606:4700:4700::1111'
+ option tls_auth_name 'cloudflare-dns.com'
+ # list spki 'sha256/yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc='
+
+config resolver
+ option address '2606:4700:4700::1001'
+ option tls_auth_name 'cloudflare-dns.com'
+ # list spki 'sha256/yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc='
+
+config resolver
+ option address '1.1.1.1'
+ option tls_auth_name 'cloudflare-dns.com'
+ # list spki 'sha256/yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc='
+
+config resolver
+ option address '1.0.0.1'
+ option tls_auth_name 'cloudflare-dns.com'
+ # list spki 'sha256/yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc='
START=50
STOP=51
-PROG=/usr/sbin/stubby
+PROG="/usr/sbin/stubby"
+
+stubby="/usr/sbin/stubby"
+stubby_init="/etc/init.d/stubby"
+stubby_config_dir="/var/etc/stubby"
+stubby_config="$stubby_config_dir/stubby.yml"
+stubby_pid_file="/var/run/stubby.pid"
+stubby_manual_config="/etc/stubby/stubby.yml"
+
+boot()
+{
+ stubby_boot=1
+ rc_procd start_service
+}
+
+generate_config()
+{
+ local config_file="$1"
+ local round_robin
+ local tls_authentication
+ local tls_query_padding_blocksize
+ local edns_client_subnet_private
+ local idle_timeout
+ local appdata_dir
+ local tls_connection_retries
+ local tls_backoff_time
+ local timeout
+ local dnssec_return_status
+ local dnssec_trust_anchors
+ local listen_addresses_section=0
+ local dns_transport_list_section=0
+ local upstream_recursive_servers_section=0
+ local stubby_args
+ local command_line_arguments
+ local log_level
+
+ # Generate configuration. See: https://github.com/getdnsapi/stubby/blob/develop/stubby.yml.example
+ echo "# Autogenerated configuration from uci data" > "$config_file"
+ echo "resolution_type: GETDNS_RESOLUTION_STUB" >> "$config_file"
+
+ config_get round_robin "global" round_robin_upstreams "1"
+ echo "round_robin_upstreams: $round_robin" >> "$config_file"
+
+ config_get appdata_dir "global" appdata_dir "/var/lib/stubby"
+ echo "appdata_dir: \"$appdata_dir\"" >> "$config_file"
+
+ config_get tls_connection_retries "global" tls_connection_retries ""
+ if [ -n "$tls_connection_retries" ]; then
+ echo "tls_connection_retries: $tls_connection_retries" >> "$config_file"
+ fi
+
+ config_get tls_backoff_time "global" tls_backoff_time ""
+ if [ -n "$tls_backoff_time" ]; then
+ echo "tls_backoff_time: $tls_backoff_time" >> "$config_file"
+ fi
+
+ config_get timeout "global" timeout ""
+ if [ -n "$timeout" ]; then
+ echo "timeout: $timeout" >> "$config_file"
+ fi
+
+ config_get_bool tls_authentication "global" tls_authentication "1"
+ if [ "$tls_authentication" = "1" ]; then
+ echo "tls_authentication: GETDNS_AUTHENTICATION_REQUIRED" >> "$config_file"
+ else
+ echo "tls_authentication: GETDNS_AUTHENTICATION_NONE" >> "$config_file"
+ fi
+
+ config_get_bool dnssec_return_status "global" dnssec_return_status "0"
+ if [ "$dnssec_return_status" = "1" ]; then
+ echo "dnssec_return_status: GETDNS_EXTENSION_TRUE" >> "$config_file"
+ fi
+
+ config_get dnssec_trust_anchors "global" dnssec_trust_anchors ""
+ if [ -n "$dnssec_trust_anchors" ]; then
+ echo "dnssec_trust_anchors: \"$dnssec_trust_anchors\"" >> "$config_file"
+ fi
+
+ config_get tls_query_padding_blocksize "global" tls_query_padding_blocksize "128"
+ echo "tls_query_padding_blocksize: $tls_query_padding_blocksize" >> "$config_file"
+
+ config_get_bool edns_client_subnet_private "global" edns_client_subnet_private "1"
+ echo "edns_client_subnet_private: $edns_client_subnet_private" >> "$config_file"
+
+ config_get idle_timeout "global" idle_timeout "10000"
+ echo "idle_timeout: $idle_timeout" >> "$config_file"
+
+ handle_listen_address_value()
+ {
+ local value="$1"
+
+ if [ "$listen_addresses_section" = 0 ]; then
+ echo "listen_addresses:" >> "$config_file"
+ listen_addresses_section=1
+ fi
+ echo " - $value" >> "$config_file"
+ }
+ config_list_foreach "global" listen_address handle_listen_address_value
+
+ handle_dns_transport_list_value()
+ {
+ local value="$1"
+
+ if [ "$dns_transport_list_section" = 0 ]; then
+ echo "dns_transport_list:" >> "$config_file"
+ dns_transport_list_section=1
+ fi
+ echo " - $value" >> "$config_file"
+ }
+ config_list_foreach "global" dns_transport handle_dns_transport_list_value
+
+ handle_resolver()
+ {
+ local config=$1
+ local address
+ local tls_auth_name
+ local spki
+ local tls_pubkey_pinset_section=0
+
+ if [ "$upstream_recursive_servers_section" = 0 ]; then
+ echo "upstream_recursive_servers:" >> "$config_file"
+ upstream_recursive_servers_section=1
+ fi
+ config_get address "$config" address
+ config_get tls_auth_name "$config" tls_auth_name
+ echo " - address_data: $address" >> "$config_file"
+ echo " tls_auth_name: \"$tls_auth_name\"" >> "$config_file"
+
+ handle_resolver_spki()
+ {
+ local val="$1"
+ local digest="${val%/*}"
+ local value="${val#*/}"
+
+ if [ "$tls_pubkey_pinset_section" = 0 ]; then
+ echo " tls_pubkey_pinset:" >> "$config_file"
+ tls_pubkey_pinset_section=1
+ fi
+ echo " - digest: \"$digest\"" >> "$config_file"
+ echo " value: $value" >> "$config_file"
+ }
+ config_list_foreach "$config" spki handle_resolver_spki
+ }
+
+ config_foreach handle_resolver resolver
+}
start_service() {
- procd_open_instance stubby
- procd_set_param command /usr/sbin/stubby
+ local config_file_tmp
+ local manual
+ local log_level
+ local command_line_arguments
+
+ mkdir -p "$stubby_config_dir"
+
+ config_load "stubby"
- procd_set_param respawn ${respawn_threshold:-3600} ${respawn_timeout:-5} ${respawn_retry:-5}
+ config_get_bool manual "global" manual "0"
- procd_set_param limits core="unlimited"
+ if [ "$manual" = "1" ]; then
+ cp "$stubby_manual_config" "$stubby_config"
+ else
+ config_file_tmp="$stubby_config.$$"
+ generate_config "$config_file_tmp"
+ mv "$config_file_tmp" "$stubby_config"
+ fi
- procd_set_param file /etc/stubby/stubby.yml
+ config_get command_line_arguments "global" command_line_arguments ""
- procd_set_param stdout 1
- procd_set_param stderr 1
- procd_set_param user stubby
- procd_close_instance
+ config_get log_level "global" log_level ""
+
+ if [ $("${stubby_init}" enabled; printf "%u" ${?}) -eq 0 ]; then
+ if [ -n "${stubby_boot}" ]; then
+ local trigger="$(uci_get stubby global trigger)"
+ if [ "${trigger}" != "timed" ]; then
+ return 0
+ fi
+ fi
+ procd_open_instance "stubby"
+ procd_set_param command "$stubby" -C "$stubby_config"
+ if [ -n "$log_level" ]; then
+ procd_append_param command -v "$log_level"
+ fi
+ if [ -n "$command_line_arguments" ]; then
+ procd_append_param command "$command_line_arguments"
+ fi
+ procd_set_param respawn ${respawn_threshold:-3600} ${respawn_timeout:-5} ${respawn_retry:-5}
+ procd_set_param file "$stubby_config"
+ procd_set_param stdout 1
+ procd_set_param stderr 1
+ procd_set_param pidfile "$stubby_pid_file"
+ procd_set_param user stubby
+ procd_close_instance
+ fi
}
+service_triggers()
+{
+ local trigger="$(uci_get stubby global trigger)"
+ local delay="$(uci_get stubby global triggerdelay "2")"
+
+ if [ "${trigger}" != "none" ] && [ "${trigger}" != "timed" ]; then
+ PROCD_RELOAD_DELAY=$((${delay:-2} * 1000))
+ procd_add_interface_trigger "interface.*.up" "${trigger}" "${stubby_init}" start
+ fi
+ procd_add_reload_trigger "stubby"
+}
-#NOTE: See '/etc/stubby/stubby.yml.default' for original config file and descriptions
-
+# Note: by default on OpenWRT stubby configuration is handled via
+# the UCI system and the file /etc/config/stubby. If you want to
+# use this file to configure stubby, then set "option manual '1'"
+# in /etc/config/stubby.
resolution_type: GETDNS_RESOLUTION_STUB
-
-dns_transport_list:
- - GETDNS_TRANSPORT_TLS
-
+round_robin_upstreams: 1
+appdata_dir: "/var/lib/stubby"
tls_authentication: GETDNS_AUTHENTICATION_REQUIRED
-
tls_query_padding_blocksize: 128
-
-edns_client_subnet_private : 0
-
-round_robin_upstreams: 0
-
+edns_client_subnet_private: 1
idle_timeout: 10000
-
listen_addresses:
- 127.0.0.1@5453
- - 0::1@5453
-
+ - 0::1@5453
+dns_transport_list:
+ - GETDNS_TRANSPORT_TLS
upstream_recursive_servers:
-# IPv6 addresses
-# # Cloudflare IPv6
- address_data: 2606:4700:4700::1111
tls_auth_name: "cloudflare-dns.com"
-
-# # Quad 9 IPv6
-# - address_data: 2620:fe::10
-# tls_auth_name: "dns.quad9.net"
-
-# IPv4 addresses
-# # Cloudflare servers
+ - address_data: 2606:4700:4700::1111
+ tls_auth_name: "cloudflare-dns.com"
- address_data: 1.1.1.1
tls_auth_name: "cloudflare-dns.com"
-
-# Quad 9 service
-# - address_data: 9.9.9.10
-# tls_auth_name: "dns.quad9.net"
+ - address_data: 1.0.0.1
+ tls_auth_name: "cloudflare-dns.com"
include $(TOPDIR)/rules.mk
PKG_NAME:=stunnel
-PKG_VERSION:=5.44
-PKG_RELEASE:=4
+PKG_VERSION:=5.49
+PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0+
PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de>
PKG_SOURCE_URL:= \
http://ftp.nluug.nl/pub/networking/stunnel/ \
http://www.usenix.org.uk/mirrors/stunnel/ \
- https://www.stunnel.org/downloads/
+ https://www.stunnel.org/downloads/ \
+ https://www.usenix.org.uk/mirrors/stunnel/archive/$(word 1, $(subst .,$(space),$(PKG_VERSION))).x/
+
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=990a325dbb47d77d88772dd02fbbd27d91b1fea3ece76c9ff4461eca93f12299
+PKG_HASH:=3d6641213a82175c19f23fde1c3d1c841738385289eb7ca1554f4a58b96d955e
PKG_FIXUP:=autoreconf
PKG_FIXUP:=patch-libtool
PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
PKG_NAME:=sysrepo
-PKG_VERSION:=0.7.4
-PKG_RELEASE:=2
+PKG_VERSION:=0.7.5
+PKG_RELEASE:=3
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=724a62fa830df7fcb2736b1ec41b320abe5064d2
-PKG_MIRROR_HASH:=19b864c52a35fd71398b2c965f87c37901a7056a2afd6b740105a5235bd459b1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
-PKG_SOURCE_URL:=https://github.com/sysrepo/sysrepo.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)
-
-PKG_BUILD_ROOT:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
-PKG_BUILD_DIR:=$(PKG_BUILD_ROOT)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/sysrepo/sysrepo/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=3ef20e1e005fd22f13d1996231ccfc72241f3f76c5700397ad59dda0f9b29f72
CMAKE_INSTALL:=1
CATEGORY:=Utilities
URL:=$(PKG_SOURCE_URL)
TITLE:=YANG-based data store library
- DEPENDS:=+libyang +libprotobuf-c +libev +libredblack +librt +SYSREPO_BINDINGS:libstdcpp +SYSREPO_PYTHON:python-base +SYSREPO_LUA:lua
+ DEPENDS:=+libyang +libprotobuf-c +libev +libredblack +librt +libpthread +SYSREPO_BINDINGS:libstdcpp +SYSREPO_PYTHON:python-base +SYSREPO_LUA:lua
MENU:=1
endef
-DOPER_DATA_PROVIDE_TIMEOUT=4 \
-DNOTIF_AGE_TIMEOUT=120 \
-DNOTIF_TIME_WINDOW=20 \
- -DUSE_SR_MEM_MGMT=0
+ -DUSE_SR_MEM_MGMT=0 \
+ -DFILE_FORMAT_EXT:STRING=xml
ifeq ($(CONFIG_SYSREPO_LUA),y)
CMAKE_OPTIONS += \
CMAKE_OPTIONS += \
-DCMAKE_DISABLE_FIND_PACKAGE_SWIG=FALSE \
-DGEN_LANGUAGE_BINDINGS:BOOL=TRUE \
- -DSWIG_DIR=$(STAGING_DIR)/host/share/swig
+ -DSWIG_DIR=$(STAGING_DIR)/host/share/swig \
+ -DCALL_TARGET_BINS_DIRECTLY=OFF
endif
define Package/libsysrepo/install
$(INSTALL_CONF) $(PKG_BUILD_DIR)/yang/sysrepo-persistent-data.yang $(1)/etc/sysrepo/yang/internal
$(INSTALL_DIR) $(1)/etc/sysrepo/yang
- $(INSTALL_DATA) $(PKG_BUILD_DIR)/yang/ietf-netconf-acm@2012-02-22.yang $(1)/etc/sysrepo/yang/ietf-netconf-acm@2012-02-22.yang
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/yang/ietf-netconf-acm@2018-02-14.yang $(1)/etc/sysrepo/yang/ietf-netconf-acm@2018-02-14.yang
$(INSTALL_DATA) $(PKG_BUILD_DIR)/yang/ietf-netconf-notifications.yang $(1)/etc/sysrepo/yang/ietf-netconf-notifications@2012-02-06.yang
$(INSTALL_DATA) $(PKG_BUILD_DIR)/yang/nc-notifications.yang $(1)/etc/sysrepo/yang/nc-notifications@2008-07-14.yang
$(INSTALL_DATA) $(PKG_BUILD_DIR)/yang/notifications.yang $(1)/etc/sysrepo/yang/notifications@2008-07-14.yang
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/sysrepocfg $(1)/bin/
endef
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libsysrepo.pc $(1)/usr/lib/pkgconfig/
+
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/src/libsysrepo.so* $(1)/usr/lib/
+
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_BUILD_DIR)/inc/* $(1)/usr/include/
+endef
+
$(eval $(call BuildPackage,libsysrepo))
$(eval $(call BuildPackage,sysrepo))
$(eval $(call BuildPackage,sysrepoctl))
match=$(sysrepoctl -l | grep "ietf-netconf-acm ")
if [ ! "$match" ]; then
- sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-acm@2012-02-22.yang -p 644
+ sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-acm@2018-02-14.yang -p 644
fi
match=$(sysrepoctl -l | grep "ietf-netconf-notifications ")
STOP=10
USE_PROCD=1
-PROG_DEAMON=/bin/sysrepod
+PROG_DAEMON=/bin/sysrepod
PROG_PLUGIN=/bin/sysrepo-plugind
start_service() {
procd_open_instance
- procd_set_param command ${PROG_DEAMON}
+ procd_set_param command ${PROG_DAEMON}
procd_append_param command -d -l 0
procd_set_param respawn
procd_close_instance
{
kill -9 `ps | grep netopeer2-server | grep -v grep | awk '{print $1}'` >/dev/null 2>&1
service_stop ${PROG_PLUGIN}
- service_stop ${PROG_DEAMON}
+ service_stop ${PROG_DAEMON}
rm -rf /var/run/sysrepo-subscriptions/*
}
--- /dev/null
+Index: sysrepo-0.7.5/src/common/sysrepo.pb-c.c
+===================================================================
+--- /dev/null
++++ sysrepo-0.7.5/src/common/sysrepo.pb-c.c
+@@ -0,0 +1,10537 @@
++/* Generated by the protocol buffer compiler. DO NOT EDIT! */
++/* Generated from: sysrepo.proto */
++
++/* Do not generate deprecated warnings for self */
++#ifndef PROTOBUF_C__NO_DEPRECATED
++#define PROTOBUF_C__NO_DEPRECATED
++#endif
++
++#include "sysrepo.pb-c.h"
++void sr__value__init
++ (Sr__Value *message)
++{
++ static Sr__Value init_value = SR__VALUE__INIT;
++ *message = init_value;
++}
++size_t sr__value__get_packed_size
++ (const Sr__Value *message)
++{
++ assert(message->base.descriptor == &sr__value__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__value__pack
++ (const Sr__Value *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__value__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__value__pack_to_buffer
++ (const Sr__Value *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__value__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__Value *
++ sr__value__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__Value *)
++ protobuf_c_message_unpack (&sr__value__descriptor,
++ allocator, len, data);
++}
++void sr__value__free_unpacked
++ (Sr__Value *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__value__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__node__init
++ (Sr__Node *message)
++{
++ static Sr__Node init_value = SR__NODE__INIT;
++ *message = init_value;
++}
++size_t sr__node__get_packed_size
++ (const Sr__Node *message)
++{
++ assert(message->base.descriptor == &sr__node__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__node__pack
++ (const Sr__Node *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__node__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__node__pack_to_buffer
++ (const Sr__Node *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__node__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__Node *
++ sr__node__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__Node *)
++ protobuf_c_message_unpack (&sr__node__descriptor,
++ allocator, len, data);
++}
++void sr__node__free_unpacked
++ (Sr__Node *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__node__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__error__init
++ (Sr__Error *message)
++{
++ static Sr__Error init_value = SR__ERROR__INIT;
++ *message = init_value;
++}
++size_t sr__error__get_packed_size
++ (const Sr__Error *message)
++{
++ assert(message->base.descriptor == &sr__error__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__error__pack
++ (const Sr__Error *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__error__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__error__pack_to_buffer
++ (const Sr__Error *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__error__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__Error *
++ sr__error__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__Error *)
++ protobuf_c_message_unpack (&sr__error__descriptor,
++ allocator, len, data);
++}
++void sr__error__free_unpacked
++ (Sr__Error *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__error__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__session_start_req__init
++ (Sr__SessionStartReq *message)
++{
++ static Sr__SessionStartReq init_value = SR__SESSION_START_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__session_start_req__get_packed_size
++ (const Sr__SessionStartReq *message)
++{
++ assert(message->base.descriptor == &sr__session_start_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__session_start_req__pack
++ (const Sr__SessionStartReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__session_start_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__session_start_req__pack_to_buffer
++ (const Sr__SessionStartReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__session_start_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SessionStartReq *
++ sr__session_start_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SessionStartReq *)
++ protobuf_c_message_unpack (&sr__session_start_req__descriptor,
++ allocator, len, data);
++}
++void sr__session_start_req__free_unpacked
++ (Sr__SessionStartReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__session_start_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__session_start_resp__init
++ (Sr__SessionStartResp *message)
++{
++ static Sr__SessionStartResp init_value = SR__SESSION_START_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__session_start_resp__get_packed_size
++ (const Sr__SessionStartResp *message)
++{
++ assert(message->base.descriptor == &sr__session_start_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__session_start_resp__pack
++ (const Sr__SessionStartResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__session_start_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__session_start_resp__pack_to_buffer
++ (const Sr__SessionStartResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__session_start_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SessionStartResp *
++ sr__session_start_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SessionStartResp *)
++ protobuf_c_message_unpack (&sr__session_start_resp__descriptor,
++ allocator, len, data);
++}
++void sr__session_start_resp__free_unpacked
++ (Sr__SessionStartResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__session_start_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__session_stop_req__init
++ (Sr__SessionStopReq *message)
++{
++ static Sr__SessionStopReq init_value = SR__SESSION_STOP_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__session_stop_req__get_packed_size
++ (const Sr__SessionStopReq *message)
++{
++ assert(message->base.descriptor == &sr__session_stop_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__session_stop_req__pack
++ (const Sr__SessionStopReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__session_stop_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__session_stop_req__pack_to_buffer
++ (const Sr__SessionStopReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__session_stop_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SessionStopReq *
++ sr__session_stop_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SessionStopReq *)
++ protobuf_c_message_unpack (&sr__session_stop_req__descriptor,
++ allocator, len, data);
++}
++void sr__session_stop_req__free_unpacked
++ (Sr__SessionStopReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__session_stop_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__session_stop_resp__init
++ (Sr__SessionStopResp *message)
++{
++ static Sr__SessionStopResp init_value = SR__SESSION_STOP_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__session_stop_resp__get_packed_size
++ (const Sr__SessionStopResp *message)
++{
++ assert(message->base.descriptor == &sr__session_stop_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__session_stop_resp__pack
++ (const Sr__SessionStopResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__session_stop_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__session_stop_resp__pack_to_buffer
++ (const Sr__SessionStopResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__session_stop_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SessionStopResp *
++ sr__session_stop_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SessionStopResp *)
++ protobuf_c_message_unpack (&sr__session_stop_resp__descriptor,
++ allocator, len, data);
++}
++void sr__session_stop_resp__free_unpacked
++ (Sr__SessionStopResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__session_stop_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__session_refresh_req__init
++ (Sr__SessionRefreshReq *message)
++{
++ static Sr__SessionRefreshReq init_value = SR__SESSION_REFRESH_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__session_refresh_req__get_packed_size
++ (const Sr__SessionRefreshReq *message)
++{
++ assert(message->base.descriptor == &sr__session_refresh_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__session_refresh_req__pack
++ (const Sr__SessionRefreshReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__session_refresh_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__session_refresh_req__pack_to_buffer
++ (const Sr__SessionRefreshReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__session_refresh_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SessionRefreshReq *
++ sr__session_refresh_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SessionRefreshReq *)
++ protobuf_c_message_unpack (&sr__session_refresh_req__descriptor,
++ allocator, len, data);
++}
++void sr__session_refresh_req__free_unpacked
++ (Sr__SessionRefreshReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__session_refresh_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__session_refresh_resp__init
++ (Sr__SessionRefreshResp *message)
++{
++ static Sr__SessionRefreshResp init_value = SR__SESSION_REFRESH_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__session_refresh_resp__get_packed_size
++ (const Sr__SessionRefreshResp *message)
++{
++ assert(message->base.descriptor == &sr__session_refresh_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__session_refresh_resp__pack
++ (const Sr__SessionRefreshResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__session_refresh_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__session_refresh_resp__pack_to_buffer
++ (const Sr__SessionRefreshResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__session_refresh_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SessionRefreshResp *
++ sr__session_refresh_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SessionRefreshResp *)
++ protobuf_c_message_unpack (&sr__session_refresh_resp__descriptor,
++ allocator, len, data);
++}
++void sr__session_refresh_resp__free_unpacked
++ (Sr__SessionRefreshResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__session_refresh_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__session_check_req__init
++ (Sr__SessionCheckReq *message)
++{
++ static Sr__SessionCheckReq init_value = SR__SESSION_CHECK_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__session_check_req__get_packed_size
++ (const Sr__SessionCheckReq *message)
++{
++ assert(message->base.descriptor == &sr__session_check_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__session_check_req__pack
++ (const Sr__SessionCheckReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__session_check_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__session_check_req__pack_to_buffer
++ (const Sr__SessionCheckReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__session_check_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SessionCheckReq *
++ sr__session_check_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SessionCheckReq *)
++ protobuf_c_message_unpack (&sr__session_check_req__descriptor,
++ allocator, len, data);
++}
++void sr__session_check_req__free_unpacked
++ (Sr__SessionCheckReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__session_check_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__session_check_resp__init
++ (Sr__SessionCheckResp *message)
++{
++ static Sr__SessionCheckResp init_value = SR__SESSION_CHECK_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__session_check_resp__get_packed_size
++ (const Sr__SessionCheckResp *message)
++{
++ assert(message->base.descriptor == &sr__session_check_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__session_check_resp__pack
++ (const Sr__SessionCheckResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__session_check_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__session_check_resp__pack_to_buffer
++ (const Sr__SessionCheckResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__session_check_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SessionCheckResp *
++ sr__session_check_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SessionCheckResp *)
++ protobuf_c_message_unpack (&sr__session_check_resp__descriptor,
++ allocator, len, data);
++}
++void sr__session_check_resp__free_unpacked
++ (Sr__SessionCheckResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__session_check_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__session_switch_ds_req__init
++ (Sr__SessionSwitchDsReq *message)
++{
++ static Sr__SessionSwitchDsReq init_value = SR__SESSION_SWITCH_DS_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__session_switch_ds_req__get_packed_size
++ (const Sr__SessionSwitchDsReq *message)
++{
++ assert(message->base.descriptor == &sr__session_switch_ds_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__session_switch_ds_req__pack
++ (const Sr__SessionSwitchDsReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__session_switch_ds_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__session_switch_ds_req__pack_to_buffer
++ (const Sr__SessionSwitchDsReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__session_switch_ds_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SessionSwitchDsReq *
++ sr__session_switch_ds_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SessionSwitchDsReq *)
++ protobuf_c_message_unpack (&sr__session_switch_ds_req__descriptor,
++ allocator, len, data);
++}
++void sr__session_switch_ds_req__free_unpacked
++ (Sr__SessionSwitchDsReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__session_switch_ds_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__session_switch_ds_resp__init
++ (Sr__SessionSwitchDsResp *message)
++{
++ static Sr__SessionSwitchDsResp init_value = SR__SESSION_SWITCH_DS_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__session_switch_ds_resp__get_packed_size
++ (const Sr__SessionSwitchDsResp *message)
++{
++ assert(message->base.descriptor == &sr__session_switch_ds_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__session_switch_ds_resp__pack
++ (const Sr__SessionSwitchDsResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__session_switch_ds_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__session_switch_ds_resp__pack_to_buffer
++ (const Sr__SessionSwitchDsResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__session_switch_ds_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SessionSwitchDsResp *
++ sr__session_switch_ds_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SessionSwitchDsResp *)
++ protobuf_c_message_unpack (&sr__session_switch_ds_resp__descriptor,
++ allocator, len, data);
++}
++void sr__session_switch_ds_resp__free_unpacked
++ (Sr__SessionSwitchDsResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__session_switch_ds_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__session_set_opts_req__init
++ (Sr__SessionSetOptsReq *message)
++{
++ static Sr__SessionSetOptsReq init_value = SR__SESSION_SET_OPTS_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__session_set_opts_req__get_packed_size
++ (const Sr__SessionSetOptsReq *message)
++{
++ assert(message->base.descriptor == &sr__session_set_opts_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__session_set_opts_req__pack
++ (const Sr__SessionSetOptsReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__session_set_opts_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__session_set_opts_req__pack_to_buffer
++ (const Sr__SessionSetOptsReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__session_set_opts_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SessionSetOptsReq *
++ sr__session_set_opts_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SessionSetOptsReq *)
++ protobuf_c_message_unpack (&sr__session_set_opts_req__descriptor,
++ allocator, len, data);
++}
++void sr__session_set_opts_req__free_unpacked
++ (Sr__SessionSetOptsReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__session_set_opts_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__session_set_opts_resp__init
++ (Sr__SessionSetOptsResp *message)
++{
++ static Sr__SessionSetOptsResp init_value = SR__SESSION_SET_OPTS_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__session_set_opts_resp__get_packed_size
++ (const Sr__SessionSetOptsResp *message)
++{
++ assert(message->base.descriptor == &sr__session_set_opts_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__session_set_opts_resp__pack
++ (const Sr__SessionSetOptsResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__session_set_opts_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__session_set_opts_resp__pack_to_buffer
++ (const Sr__SessionSetOptsResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__session_set_opts_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SessionSetOptsResp *
++ sr__session_set_opts_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SessionSetOptsResp *)
++ protobuf_c_message_unpack (&sr__session_set_opts_resp__descriptor,
++ allocator, len, data);
++}
++void sr__session_set_opts_resp__free_unpacked
++ (Sr__SessionSetOptsResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__session_set_opts_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__version_verify_req__init
++ (Sr__VersionVerifyReq *message)
++{
++ static Sr__VersionVerifyReq init_value = SR__VERSION_VERIFY_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__version_verify_req__get_packed_size
++ (const Sr__VersionVerifyReq *message)
++{
++ assert(message->base.descriptor == &sr__version_verify_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__version_verify_req__pack
++ (const Sr__VersionVerifyReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__version_verify_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__version_verify_req__pack_to_buffer
++ (const Sr__VersionVerifyReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__version_verify_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__VersionVerifyReq *
++ sr__version_verify_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__VersionVerifyReq *)
++ protobuf_c_message_unpack (&sr__version_verify_req__descriptor,
++ allocator, len, data);
++}
++void sr__version_verify_req__free_unpacked
++ (Sr__VersionVerifyReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__version_verify_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__version_verify_resp__init
++ (Sr__VersionVerifyResp *message)
++{
++ static Sr__VersionVerifyResp init_value = SR__VERSION_VERIFY_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__version_verify_resp__get_packed_size
++ (const Sr__VersionVerifyResp *message)
++{
++ assert(message->base.descriptor == &sr__version_verify_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__version_verify_resp__pack
++ (const Sr__VersionVerifyResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__version_verify_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__version_verify_resp__pack_to_buffer
++ (const Sr__VersionVerifyResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__version_verify_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__VersionVerifyResp *
++ sr__version_verify_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__VersionVerifyResp *)
++ protobuf_c_message_unpack (&sr__version_verify_resp__descriptor,
++ allocator, len, data);
++}
++void sr__version_verify_resp__free_unpacked
++ (Sr__VersionVerifyResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__version_verify_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__schema_revision__init
++ (Sr__SchemaRevision *message)
++{
++ static Sr__SchemaRevision init_value = SR__SCHEMA_REVISION__INIT;
++ *message = init_value;
++}
++size_t sr__schema_revision__get_packed_size
++ (const Sr__SchemaRevision *message)
++{
++ assert(message->base.descriptor == &sr__schema_revision__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__schema_revision__pack
++ (const Sr__SchemaRevision *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__schema_revision__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__schema_revision__pack_to_buffer
++ (const Sr__SchemaRevision *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__schema_revision__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SchemaRevision *
++ sr__schema_revision__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SchemaRevision *)
++ protobuf_c_message_unpack (&sr__schema_revision__descriptor,
++ allocator, len, data);
++}
++void sr__schema_revision__free_unpacked
++ (Sr__SchemaRevision *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__schema_revision__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__schema_submodule__init
++ (Sr__SchemaSubmodule *message)
++{
++ static Sr__SchemaSubmodule init_value = SR__SCHEMA_SUBMODULE__INIT;
++ *message = init_value;
++}
++size_t sr__schema_submodule__get_packed_size
++ (const Sr__SchemaSubmodule *message)
++{
++ assert(message->base.descriptor == &sr__schema_submodule__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__schema_submodule__pack
++ (const Sr__SchemaSubmodule *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__schema_submodule__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__schema_submodule__pack_to_buffer
++ (const Sr__SchemaSubmodule *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__schema_submodule__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SchemaSubmodule *
++ sr__schema_submodule__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SchemaSubmodule *)
++ protobuf_c_message_unpack (&sr__schema_submodule__descriptor,
++ allocator, len, data);
++}
++void sr__schema_submodule__free_unpacked
++ (Sr__SchemaSubmodule *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__schema_submodule__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__schema__init
++ (Sr__Schema *message)
++{
++ static Sr__Schema init_value = SR__SCHEMA__INIT;
++ *message = init_value;
++}
++size_t sr__schema__get_packed_size
++ (const Sr__Schema *message)
++{
++ assert(message->base.descriptor == &sr__schema__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__schema__pack
++ (const Sr__Schema *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__schema__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__schema__pack_to_buffer
++ (const Sr__Schema *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__schema__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__Schema *
++ sr__schema__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__Schema *)
++ protobuf_c_message_unpack (&sr__schema__descriptor,
++ allocator, len, data);
++}
++void sr__schema__free_unpacked
++ (Sr__Schema *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__schema__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__list_schemas_req__init
++ (Sr__ListSchemasReq *message)
++{
++ static Sr__ListSchemasReq init_value = SR__LIST_SCHEMAS_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__list_schemas_req__get_packed_size
++ (const Sr__ListSchemasReq *message)
++{
++ assert(message->base.descriptor == &sr__list_schemas_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__list_schemas_req__pack
++ (const Sr__ListSchemasReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__list_schemas_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__list_schemas_req__pack_to_buffer
++ (const Sr__ListSchemasReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__list_schemas_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__ListSchemasReq *
++ sr__list_schemas_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__ListSchemasReq *)
++ protobuf_c_message_unpack (&sr__list_schemas_req__descriptor,
++ allocator, len, data);
++}
++void sr__list_schemas_req__free_unpacked
++ (Sr__ListSchemasReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__list_schemas_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__list_schemas_resp__init
++ (Sr__ListSchemasResp *message)
++{
++ static Sr__ListSchemasResp init_value = SR__LIST_SCHEMAS_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__list_schemas_resp__get_packed_size
++ (const Sr__ListSchemasResp *message)
++{
++ assert(message->base.descriptor == &sr__list_schemas_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__list_schemas_resp__pack
++ (const Sr__ListSchemasResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__list_schemas_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__list_schemas_resp__pack_to_buffer
++ (const Sr__ListSchemasResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__list_schemas_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__ListSchemasResp *
++ sr__list_schemas_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__ListSchemasResp *)
++ protobuf_c_message_unpack (&sr__list_schemas_resp__descriptor,
++ allocator, len, data);
++}
++void sr__list_schemas_resp__free_unpacked
++ (Sr__ListSchemasResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__list_schemas_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__get_schema_req__init
++ (Sr__GetSchemaReq *message)
++{
++ static Sr__GetSchemaReq init_value = SR__GET_SCHEMA_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__get_schema_req__get_packed_size
++ (const Sr__GetSchemaReq *message)
++{
++ assert(message->base.descriptor == &sr__get_schema_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__get_schema_req__pack
++ (const Sr__GetSchemaReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__get_schema_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__get_schema_req__pack_to_buffer
++ (const Sr__GetSchemaReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__get_schema_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__GetSchemaReq *
++ sr__get_schema_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__GetSchemaReq *)
++ protobuf_c_message_unpack (&sr__get_schema_req__descriptor,
++ allocator, len, data);
++}
++void sr__get_schema_req__free_unpacked
++ (Sr__GetSchemaReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__get_schema_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__get_schema_resp__init
++ (Sr__GetSchemaResp *message)
++{
++ static Sr__GetSchemaResp init_value = SR__GET_SCHEMA_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__get_schema_resp__get_packed_size
++ (const Sr__GetSchemaResp *message)
++{
++ assert(message->base.descriptor == &sr__get_schema_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__get_schema_resp__pack
++ (const Sr__GetSchemaResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__get_schema_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__get_schema_resp__pack_to_buffer
++ (const Sr__GetSchemaResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__get_schema_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__GetSchemaResp *
++ sr__get_schema_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__GetSchemaResp *)
++ protobuf_c_message_unpack (&sr__get_schema_resp__descriptor,
++ allocator, len, data);
++}
++void sr__get_schema_resp__free_unpacked
++ (Sr__GetSchemaResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__get_schema_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__get_item_req__init
++ (Sr__GetItemReq *message)
++{
++ static Sr__GetItemReq init_value = SR__GET_ITEM_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__get_item_req__get_packed_size
++ (const Sr__GetItemReq *message)
++{
++ assert(message->base.descriptor == &sr__get_item_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__get_item_req__pack
++ (const Sr__GetItemReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__get_item_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__get_item_req__pack_to_buffer
++ (const Sr__GetItemReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__get_item_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__GetItemReq *
++ sr__get_item_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__GetItemReq *)
++ protobuf_c_message_unpack (&sr__get_item_req__descriptor,
++ allocator, len, data);
++}
++void sr__get_item_req__free_unpacked
++ (Sr__GetItemReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__get_item_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__get_item_resp__init
++ (Sr__GetItemResp *message)
++{
++ static Sr__GetItemResp init_value = SR__GET_ITEM_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__get_item_resp__get_packed_size
++ (const Sr__GetItemResp *message)
++{
++ assert(message->base.descriptor == &sr__get_item_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__get_item_resp__pack
++ (const Sr__GetItemResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__get_item_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__get_item_resp__pack_to_buffer
++ (const Sr__GetItemResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__get_item_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__GetItemResp *
++ sr__get_item_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__GetItemResp *)
++ protobuf_c_message_unpack (&sr__get_item_resp__descriptor,
++ allocator, len, data);
++}
++void sr__get_item_resp__free_unpacked
++ (Sr__GetItemResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__get_item_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__get_items_req__init
++ (Sr__GetItemsReq *message)
++{
++ static Sr__GetItemsReq init_value = SR__GET_ITEMS_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__get_items_req__get_packed_size
++ (const Sr__GetItemsReq *message)
++{
++ assert(message->base.descriptor == &sr__get_items_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__get_items_req__pack
++ (const Sr__GetItemsReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__get_items_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__get_items_req__pack_to_buffer
++ (const Sr__GetItemsReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__get_items_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__GetItemsReq *
++ sr__get_items_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__GetItemsReq *)
++ protobuf_c_message_unpack (&sr__get_items_req__descriptor,
++ allocator, len, data);
++}
++void sr__get_items_req__free_unpacked
++ (Sr__GetItemsReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__get_items_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__get_items_resp__init
++ (Sr__GetItemsResp *message)
++{
++ static Sr__GetItemsResp init_value = SR__GET_ITEMS_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__get_items_resp__get_packed_size
++ (const Sr__GetItemsResp *message)
++{
++ assert(message->base.descriptor == &sr__get_items_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__get_items_resp__pack
++ (const Sr__GetItemsResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__get_items_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__get_items_resp__pack_to_buffer
++ (const Sr__GetItemsResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__get_items_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__GetItemsResp *
++ sr__get_items_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__GetItemsResp *)
++ protobuf_c_message_unpack (&sr__get_items_resp__descriptor,
++ allocator, len, data);
++}
++void sr__get_items_resp__free_unpacked
++ (Sr__GetItemsResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__get_items_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__get_subtree_req__init
++ (Sr__GetSubtreeReq *message)
++{
++ static Sr__GetSubtreeReq init_value = SR__GET_SUBTREE_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__get_subtree_req__get_packed_size
++ (const Sr__GetSubtreeReq *message)
++{
++ assert(message->base.descriptor == &sr__get_subtree_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__get_subtree_req__pack
++ (const Sr__GetSubtreeReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__get_subtree_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__get_subtree_req__pack_to_buffer
++ (const Sr__GetSubtreeReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__get_subtree_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__GetSubtreeReq *
++ sr__get_subtree_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__GetSubtreeReq *)
++ protobuf_c_message_unpack (&sr__get_subtree_req__descriptor,
++ allocator, len, data);
++}
++void sr__get_subtree_req__free_unpacked
++ (Sr__GetSubtreeReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__get_subtree_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__get_subtree_resp__init
++ (Sr__GetSubtreeResp *message)
++{
++ static Sr__GetSubtreeResp init_value = SR__GET_SUBTREE_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__get_subtree_resp__get_packed_size
++ (const Sr__GetSubtreeResp *message)
++{
++ assert(message->base.descriptor == &sr__get_subtree_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__get_subtree_resp__pack
++ (const Sr__GetSubtreeResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__get_subtree_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__get_subtree_resp__pack_to_buffer
++ (const Sr__GetSubtreeResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__get_subtree_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__GetSubtreeResp *
++ sr__get_subtree_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__GetSubtreeResp *)
++ protobuf_c_message_unpack (&sr__get_subtree_resp__descriptor,
++ allocator, len, data);
++}
++void sr__get_subtree_resp__free_unpacked
++ (Sr__GetSubtreeResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__get_subtree_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__get_subtrees_req__init
++ (Sr__GetSubtreesReq *message)
++{
++ static Sr__GetSubtreesReq init_value = SR__GET_SUBTREES_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__get_subtrees_req__get_packed_size
++ (const Sr__GetSubtreesReq *message)
++{
++ assert(message->base.descriptor == &sr__get_subtrees_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__get_subtrees_req__pack
++ (const Sr__GetSubtreesReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__get_subtrees_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__get_subtrees_req__pack_to_buffer
++ (const Sr__GetSubtreesReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__get_subtrees_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__GetSubtreesReq *
++ sr__get_subtrees_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__GetSubtreesReq *)
++ protobuf_c_message_unpack (&sr__get_subtrees_req__descriptor,
++ allocator, len, data);
++}
++void sr__get_subtrees_req__free_unpacked
++ (Sr__GetSubtreesReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__get_subtrees_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__get_subtrees_resp__init
++ (Sr__GetSubtreesResp *message)
++{
++ static Sr__GetSubtreesResp init_value = SR__GET_SUBTREES_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__get_subtrees_resp__get_packed_size
++ (const Sr__GetSubtreesResp *message)
++{
++ assert(message->base.descriptor == &sr__get_subtrees_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__get_subtrees_resp__pack
++ (const Sr__GetSubtreesResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__get_subtrees_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__get_subtrees_resp__pack_to_buffer
++ (const Sr__GetSubtreesResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__get_subtrees_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__GetSubtreesResp *
++ sr__get_subtrees_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__GetSubtreesResp *)
++ protobuf_c_message_unpack (&sr__get_subtrees_resp__descriptor,
++ allocator, len, data);
++}
++void sr__get_subtrees_resp__free_unpacked
++ (Sr__GetSubtreesResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__get_subtrees_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__get_subtree_chunk_req__init
++ (Sr__GetSubtreeChunkReq *message)
++{
++ static Sr__GetSubtreeChunkReq init_value = SR__GET_SUBTREE_CHUNK_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__get_subtree_chunk_req__get_packed_size
++ (const Sr__GetSubtreeChunkReq *message)
++{
++ assert(message->base.descriptor == &sr__get_subtree_chunk_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__get_subtree_chunk_req__pack
++ (const Sr__GetSubtreeChunkReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__get_subtree_chunk_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__get_subtree_chunk_req__pack_to_buffer
++ (const Sr__GetSubtreeChunkReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__get_subtree_chunk_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__GetSubtreeChunkReq *
++ sr__get_subtree_chunk_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__GetSubtreeChunkReq *)
++ protobuf_c_message_unpack (&sr__get_subtree_chunk_req__descriptor,
++ allocator, len, data);
++}
++void sr__get_subtree_chunk_req__free_unpacked
++ (Sr__GetSubtreeChunkReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__get_subtree_chunk_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__get_subtree_chunk_resp__init
++ (Sr__GetSubtreeChunkResp *message)
++{
++ static Sr__GetSubtreeChunkResp init_value = SR__GET_SUBTREE_CHUNK_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__get_subtree_chunk_resp__get_packed_size
++ (const Sr__GetSubtreeChunkResp *message)
++{
++ assert(message->base.descriptor == &sr__get_subtree_chunk_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__get_subtree_chunk_resp__pack
++ (const Sr__GetSubtreeChunkResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__get_subtree_chunk_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__get_subtree_chunk_resp__pack_to_buffer
++ (const Sr__GetSubtreeChunkResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__get_subtree_chunk_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__GetSubtreeChunkResp *
++ sr__get_subtree_chunk_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__GetSubtreeChunkResp *)
++ protobuf_c_message_unpack (&sr__get_subtree_chunk_resp__descriptor,
++ allocator, len, data);
++}
++void sr__get_subtree_chunk_resp__free_unpacked
++ (Sr__GetSubtreeChunkResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__get_subtree_chunk_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__set_item_req__init
++ (Sr__SetItemReq *message)
++{
++ static Sr__SetItemReq init_value = SR__SET_ITEM_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__set_item_req__get_packed_size
++ (const Sr__SetItemReq *message)
++{
++ assert(message->base.descriptor == &sr__set_item_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__set_item_req__pack
++ (const Sr__SetItemReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__set_item_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__set_item_req__pack_to_buffer
++ (const Sr__SetItemReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__set_item_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SetItemReq *
++ sr__set_item_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SetItemReq *)
++ protobuf_c_message_unpack (&sr__set_item_req__descriptor,
++ allocator, len, data);
++}
++void sr__set_item_req__free_unpacked
++ (Sr__SetItemReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__set_item_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__set_item_resp__init
++ (Sr__SetItemResp *message)
++{
++ static Sr__SetItemResp init_value = SR__SET_ITEM_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__set_item_resp__get_packed_size
++ (const Sr__SetItemResp *message)
++{
++ assert(message->base.descriptor == &sr__set_item_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__set_item_resp__pack
++ (const Sr__SetItemResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__set_item_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__set_item_resp__pack_to_buffer
++ (const Sr__SetItemResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__set_item_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SetItemResp *
++ sr__set_item_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SetItemResp *)
++ protobuf_c_message_unpack (&sr__set_item_resp__descriptor,
++ allocator, len, data);
++}
++void sr__set_item_resp__free_unpacked
++ (Sr__SetItemResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__set_item_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__set_item_str_req__init
++ (Sr__SetItemStrReq *message)
++{
++ static Sr__SetItemStrReq init_value = SR__SET_ITEM_STR_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__set_item_str_req__get_packed_size
++ (const Sr__SetItemStrReq *message)
++{
++ assert(message->base.descriptor == &sr__set_item_str_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__set_item_str_req__pack
++ (const Sr__SetItemStrReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__set_item_str_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__set_item_str_req__pack_to_buffer
++ (const Sr__SetItemStrReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__set_item_str_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SetItemStrReq *
++ sr__set_item_str_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SetItemStrReq *)
++ protobuf_c_message_unpack (&sr__set_item_str_req__descriptor,
++ allocator, len, data);
++}
++void sr__set_item_str_req__free_unpacked
++ (Sr__SetItemStrReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__set_item_str_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__set_item_str_resp__init
++ (Sr__SetItemStrResp *message)
++{
++ static Sr__SetItemStrResp init_value = SR__SET_ITEM_STR_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__set_item_str_resp__get_packed_size
++ (const Sr__SetItemStrResp *message)
++{
++ assert(message->base.descriptor == &sr__set_item_str_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__set_item_str_resp__pack
++ (const Sr__SetItemStrResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__set_item_str_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__set_item_str_resp__pack_to_buffer
++ (const Sr__SetItemStrResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__set_item_str_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SetItemStrResp *
++ sr__set_item_str_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SetItemStrResp *)
++ protobuf_c_message_unpack (&sr__set_item_str_resp__descriptor,
++ allocator, len, data);
++}
++void sr__set_item_str_resp__free_unpacked
++ (Sr__SetItemStrResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__set_item_str_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__delete_item_req__init
++ (Sr__DeleteItemReq *message)
++{
++ static Sr__DeleteItemReq init_value = SR__DELETE_ITEM_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__delete_item_req__get_packed_size
++ (const Sr__DeleteItemReq *message)
++{
++ assert(message->base.descriptor == &sr__delete_item_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__delete_item_req__pack
++ (const Sr__DeleteItemReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__delete_item_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__delete_item_req__pack_to_buffer
++ (const Sr__DeleteItemReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__delete_item_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__DeleteItemReq *
++ sr__delete_item_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__DeleteItemReq *)
++ protobuf_c_message_unpack (&sr__delete_item_req__descriptor,
++ allocator, len, data);
++}
++void sr__delete_item_req__free_unpacked
++ (Sr__DeleteItemReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__delete_item_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__delete_item_resp__init
++ (Sr__DeleteItemResp *message)
++{
++ static Sr__DeleteItemResp init_value = SR__DELETE_ITEM_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__delete_item_resp__get_packed_size
++ (const Sr__DeleteItemResp *message)
++{
++ assert(message->base.descriptor == &sr__delete_item_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__delete_item_resp__pack
++ (const Sr__DeleteItemResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__delete_item_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__delete_item_resp__pack_to_buffer
++ (const Sr__DeleteItemResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__delete_item_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__DeleteItemResp *
++ sr__delete_item_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__DeleteItemResp *)
++ protobuf_c_message_unpack (&sr__delete_item_resp__descriptor,
++ allocator, len, data);
++}
++void sr__delete_item_resp__free_unpacked
++ (Sr__DeleteItemResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__delete_item_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__move_item_req__init
++ (Sr__MoveItemReq *message)
++{
++ static Sr__MoveItemReq init_value = SR__MOVE_ITEM_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__move_item_req__get_packed_size
++ (const Sr__MoveItemReq *message)
++{
++ assert(message->base.descriptor == &sr__move_item_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__move_item_req__pack
++ (const Sr__MoveItemReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__move_item_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__move_item_req__pack_to_buffer
++ (const Sr__MoveItemReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__move_item_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__MoveItemReq *
++ sr__move_item_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__MoveItemReq *)
++ protobuf_c_message_unpack (&sr__move_item_req__descriptor,
++ allocator, len, data);
++}
++void sr__move_item_req__free_unpacked
++ (Sr__MoveItemReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__move_item_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__move_item_resp__init
++ (Sr__MoveItemResp *message)
++{
++ static Sr__MoveItemResp init_value = SR__MOVE_ITEM_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__move_item_resp__get_packed_size
++ (const Sr__MoveItemResp *message)
++{
++ assert(message->base.descriptor == &sr__move_item_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__move_item_resp__pack
++ (const Sr__MoveItemResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__move_item_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__move_item_resp__pack_to_buffer
++ (const Sr__MoveItemResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__move_item_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__MoveItemResp *
++ sr__move_item_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__MoveItemResp *)
++ protobuf_c_message_unpack (&sr__move_item_resp__descriptor,
++ allocator, len, data);
++}
++void sr__move_item_resp__free_unpacked
++ (Sr__MoveItemResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__move_item_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__validate_req__init
++ (Sr__ValidateReq *message)
++{
++ static Sr__ValidateReq init_value = SR__VALIDATE_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__validate_req__get_packed_size
++ (const Sr__ValidateReq *message)
++{
++ assert(message->base.descriptor == &sr__validate_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__validate_req__pack
++ (const Sr__ValidateReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__validate_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__validate_req__pack_to_buffer
++ (const Sr__ValidateReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__validate_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__ValidateReq *
++ sr__validate_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__ValidateReq *)
++ protobuf_c_message_unpack (&sr__validate_req__descriptor,
++ allocator, len, data);
++}
++void sr__validate_req__free_unpacked
++ (Sr__ValidateReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__validate_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__validate_resp__init
++ (Sr__ValidateResp *message)
++{
++ static Sr__ValidateResp init_value = SR__VALIDATE_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__validate_resp__get_packed_size
++ (const Sr__ValidateResp *message)
++{
++ assert(message->base.descriptor == &sr__validate_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__validate_resp__pack
++ (const Sr__ValidateResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__validate_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__validate_resp__pack_to_buffer
++ (const Sr__ValidateResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__validate_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__ValidateResp *
++ sr__validate_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__ValidateResp *)
++ protobuf_c_message_unpack (&sr__validate_resp__descriptor,
++ allocator, len, data);
++}
++void sr__validate_resp__free_unpacked
++ (Sr__ValidateResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__validate_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__commit_req__init
++ (Sr__CommitReq *message)
++{
++ static Sr__CommitReq init_value = SR__COMMIT_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__commit_req__get_packed_size
++ (const Sr__CommitReq *message)
++{
++ assert(message->base.descriptor == &sr__commit_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__commit_req__pack
++ (const Sr__CommitReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__commit_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__commit_req__pack_to_buffer
++ (const Sr__CommitReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__commit_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__CommitReq *
++ sr__commit_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__CommitReq *)
++ protobuf_c_message_unpack (&sr__commit_req__descriptor,
++ allocator, len, data);
++}
++void sr__commit_req__free_unpacked
++ (Sr__CommitReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__commit_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__commit_resp__init
++ (Sr__CommitResp *message)
++{
++ static Sr__CommitResp init_value = SR__COMMIT_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__commit_resp__get_packed_size
++ (const Sr__CommitResp *message)
++{
++ assert(message->base.descriptor == &sr__commit_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__commit_resp__pack
++ (const Sr__CommitResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__commit_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__commit_resp__pack_to_buffer
++ (const Sr__CommitResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__commit_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__CommitResp *
++ sr__commit_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__CommitResp *)
++ protobuf_c_message_unpack (&sr__commit_resp__descriptor,
++ allocator, len, data);
++}
++void sr__commit_resp__free_unpacked
++ (Sr__CommitResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__commit_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__discard_changes_req__init
++ (Sr__DiscardChangesReq *message)
++{
++ static Sr__DiscardChangesReq init_value = SR__DISCARD_CHANGES_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__discard_changes_req__get_packed_size
++ (const Sr__DiscardChangesReq *message)
++{
++ assert(message->base.descriptor == &sr__discard_changes_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__discard_changes_req__pack
++ (const Sr__DiscardChangesReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__discard_changes_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__discard_changes_req__pack_to_buffer
++ (const Sr__DiscardChangesReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__discard_changes_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__DiscardChangesReq *
++ sr__discard_changes_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__DiscardChangesReq *)
++ protobuf_c_message_unpack (&sr__discard_changes_req__descriptor,
++ allocator, len, data);
++}
++void sr__discard_changes_req__free_unpacked
++ (Sr__DiscardChangesReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__discard_changes_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__discard_changes_resp__init
++ (Sr__DiscardChangesResp *message)
++{
++ static Sr__DiscardChangesResp init_value = SR__DISCARD_CHANGES_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__discard_changes_resp__get_packed_size
++ (const Sr__DiscardChangesResp *message)
++{
++ assert(message->base.descriptor == &sr__discard_changes_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__discard_changes_resp__pack
++ (const Sr__DiscardChangesResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__discard_changes_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__discard_changes_resp__pack_to_buffer
++ (const Sr__DiscardChangesResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__discard_changes_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__DiscardChangesResp *
++ sr__discard_changes_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__DiscardChangesResp *)
++ protobuf_c_message_unpack (&sr__discard_changes_resp__descriptor,
++ allocator, len, data);
++}
++void sr__discard_changes_resp__free_unpacked
++ (Sr__DiscardChangesResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__discard_changes_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__copy_config_req__init
++ (Sr__CopyConfigReq *message)
++{
++ static Sr__CopyConfigReq init_value = SR__COPY_CONFIG_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__copy_config_req__get_packed_size
++ (const Sr__CopyConfigReq *message)
++{
++ assert(message->base.descriptor == &sr__copy_config_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__copy_config_req__pack
++ (const Sr__CopyConfigReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__copy_config_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__copy_config_req__pack_to_buffer
++ (const Sr__CopyConfigReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__copy_config_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__CopyConfigReq *
++ sr__copy_config_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__CopyConfigReq *)
++ protobuf_c_message_unpack (&sr__copy_config_req__descriptor,
++ allocator, len, data);
++}
++void sr__copy_config_req__free_unpacked
++ (Sr__CopyConfigReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__copy_config_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__copy_config_resp__init
++ (Sr__CopyConfigResp *message)
++{
++ static Sr__CopyConfigResp init_value = SR__COPY_CONFIG_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__copy_config_resp__get_packed_size
++ (const Sr__CopyConfigResp *message)
++{
++ assert(message->base.descriptor == &sr__copy_config_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__copy_config_resp__pack
++ (const Sr__CopyConfigResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__copy_config_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__copy_config_resp__pack_to_buffer
++ (const Sr__CopyConfigResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__copy_config_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__CopyConfigResp *
++ sr__copy_config_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__CopyConfigResp *)
++ protobuf_c_message_unpack (&sr__copy_config_resp__descriptor,
++ allocator, len, data);
++}
++void sr__copy_config_resp__free_unpacked
++ (Sr__CopyConfigResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__copy_config_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__lock_req__init
++ (Sr__LockReq *message)
++{
++ static Sr__LockReq init_value = SR__LOCK_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__lock_req__get_packed_size
++ (const Sr__LockReq *message)
++{
++ assert(message->base.descriptor == &sr__lock_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__lock_req__pack
++ (const Sr__LockReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__lock_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__lock_req__pack_to_buffer
++ (const Sr__LockReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__lock_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__LockReq *
++ sr__lock_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__LockReq *)
++ protobuf_c_message_unpack (&sr__lock_req__descriptor,
++ allocator, len, data);
++}
++void sr__lock_req__free_unpacked
++ (Sr__LockReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__lock_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__lock_resp__init
++ (Sr__LockResp *message)
++{
++ static Sr__LockResp init_value = SR__LOCK_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__lock_resp__get_packed_size
++ (const Sr__LockResp *message)
++{
++ assert(message->base.descriptor == &sr__lock_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__lock_resp__pack
++ (const Sr__LockResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__lock_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__lock_resp__pack_to_buffer
++ (const Sr__LockResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__lock_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__LockResp *
++ sr__lock_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__LockResp *)
++ protobuf_c_message_unpack (&sr__lock_resp__descriptor,
++ allocator, len, data);
++}
++void sr__lock_resp__free_unpacked
++ (Sr__LockResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__lock_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__unlock_req__init
++ (Sr__UnlockReq *message)
++{
++ static Sr__UnlockReq init_value = SR__UNLOCK_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__unlock_req__get_packed_size
++ (const Sr__UnlockReq *message)
++{
++ assert(message->base.descriptor == &sr__unlock_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__unlock_req__pack
++ (const Sr__UnlockReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__unlock_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__unlock_req__pack_to_buffer
++ (const Sr__UnlockReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__unlock_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__UnlockReq *
++ sr__unlock_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__UnlockReq *)
++ protobuf_c_message_unpack (&sr__unlock_req__descriptor,
++ allocator, len, data);
++}
++void sr__unlock_req__free_unpacked
++ (Sr__UnlockReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__unlock_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__unlock_resp__init
++ (Sr__UnlockResp *message)
++{
++ static Sr__UnlockResp init_value = SR__UNLOCK_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__unlock_resp__get_packed_size
++ (const Sr__UnlockResp *message)
++{
++ assert(message->base.descriptor == &sr__unlock_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__unlock_resp__pack
++ (const Sr__UnlockResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__unlock_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__unlock_resp__pack_to_buffer
++ (const Sr__UnlockResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__unlock_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__UnlockResp *
++ sr__unlock_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__UnlockResp *)
++ protobuf_c_message_unpack (&sr__unlock_resp__descriptor,
++ allocator, len, data);
++}
++void sr__unlock_resp__free_unpacked
++ (Sr__UnlockResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__unlock_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__subscribe_req__init
++ (Sr__SubscribeReq *message)
++{
++ static Sr__SubscribeReq init_value = SR__SUBSCRIBE_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__subscribe_req__get_packed_size
++ (const Sr__SubscribeReq *message)
++{
++ assert(message->base.descriptor == &sr__subscribe_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__subscribe_req__pack
++ (const Sr__SubscribeReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__subscribe_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__subscribe_req__pack_to_buffer
++ (const Sr__SubscribeReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__subscribe_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SubscribeReq *
++ sr__subscribe_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SubscribeReq *)
++ protobuf_c_message_unpack (&sr__subscribe_req__descriptor,
++ allocator, len, data);
++}
++void sr__subscribe_req__free_unpacked
++ (Sr__SubscribeReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__subscribe_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__subscribe_resp__init
++ (Sr__SubscribeResp *message)
++{
++ static Sr__SubscribeResp init_value = SR__SUBSCRIBE_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__subscribe_resp__get_packed_size
++ (const Sr__SubscribeResp *message)
++{
++ assert(message->base.descriptor == &sr__subscribe_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__subscribe_resp__pack
++ (const Sr__SubscribeResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__subscribe_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__subscribe_resp__pack_to_buffer
++ (const Sr__SubscribeResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__subscribe_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SubscribeResp *
++ sr__subscribe_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SubscribeResp *)
++ protobuf_c_message_unpack (&sr__subscribe_resp__descriptor,
++ allocator, len, data);
++}
++void sr__subscribe_resp__free_unpacked
++ (Sr__SubscribeResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__subscribe_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__unsubscribe_req__init
++ (Sr__UnsubscribeReq *message)
++{
++ static Sr__UnsubscribeReq init_value = SR__UNSUBSCRIBE_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__unsubscribe_req__get_packed_size
++ (const Sr__UnsubscribeReq *message)
++{
++ assert(message->base.descriptor == &sr__unsubscribe_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__unsubscribe_req__pack
++ (const Sr__UnsubscribeReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__unsubscribe_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__unsubscribe_req__pack_to_buffer
++ (const Sr__UnsubscribeReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__unsubscribe_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__UnsubscribeReq *
++ sr__unsubscribe_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__UnsubscribeReq *)
++ protobuf_c_message_unpack (&sr__unsubscribe_req__descriptor,
++ allocator, len, data);
++}
++void sr__unsubscribe_req__free_unpacked
++ (Sr__UnsubscribeReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__unsubscribe_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__unsubscribe_resp__init
++ (Sr__UnsubscribeResp *message)
++{
++ static Sr__UnsubscribeResp init_value = SR__UNSUBSCRIBE_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__unsubscribe_resp__get_packed_size
++ (const Sr__UnsubscribeResp *message)
++{
++ assert(message->base.descriptor == &sr__unsubscribe_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__unsubscribe_resp__pack
++ (const Sr__UnsubscribeResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__unsubscribe_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__unsubscribe_resp__pack_to_buffer
++ (const Sr__UnsubscribeResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__unsubscribe_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__UnsubscribeResp *
++ sr__unsubscribe_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__UnsubscribeResp *)
++ protobuf_c_message_unpack (&sr__unsubscribe_resp__descriptor,
++ allocator, len, data);
++}
++void sr__unsubscribe_resp__free_unpacked
++ (Sr__UnsubscribeResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__unsubscribe_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__check_enabled_running_req__init
++ (Sr__CheckEnabledRunningReq *message)
++{
++ static Sr__CheckEnabledRunningReq init_value = SR__CHECK_ENABLED_RUNNING_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__check_enabled_running_req__get_packed_size
++ (const Sr__CheckEnabledRunningReq *message)
++{
++ assert(message->base.descriptor == &sr__check_enabled_running_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__check_enabled_running_req__pack
++ (const Sr__CheckEnabledRunningReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__check_enabled_running_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__check_enabled_running_req__pack_to_buffer
++ (const Sr__CheckEnabledRunningReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__check_enabled_running_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__CheckEnabledRunningReq *
++ sr__check_enabled_running_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__CheckEnabledRunningReq *)
++ protobuf_c_message_unpack (&sr__check_enabled_running_req__descriptor,
++ allocator, len, data);
++}
++void sr__check_enabled_running_req__free_unpacked
++ (Sr__CheckEnabledRunningReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__check_enabled_running_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__check_enabled_running_resp__init
++ (Sr__CheckEnabledRunningResp *message)
++{
++ static Sr__CheckEnabledRunningResp init_value = SR__CHECK_ENABLED_RUNNING_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__check_enabled_running_resp__get_packed_size
++ (const Sr__CheckEnabledRunningResp *message)
++{
++ assert(message->base.descriptor == &sr__check_enabled_running_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__check_enabled_running_resp__pack
++ (const Sr__CheckEnabledRunningResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__check_enabled_running_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__check_enabled_running_resp__pack_to_buffer
++ (const Sr__CheckEnabledRunningResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__check_enabled_running_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__CheckEnabledRunningResp *
++ sr__check_enabled_running_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__CheckEnabledRunningResp *)
++ protobuf_c_message_unpack (&sr__check_enabled_running_resp__descriptor,
++ allocator, len, data);
++}
++void sr__check_enabled_running_resp__free_unpacked
++ (Sr__CheckEnabledRunningResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__check_enabled_running_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__module_install_notification__init
++ (Sr__ModuleInstallNotification *message)
++{
++ static Sr__ModuleInstallNotification init_value = SR__MODULE_INSTALL_NOTIFICATION__INIT;
++ *message = init_value;
++}
++size_t sr__module_install_notification__get_packed_size
++ (const Sr__ModuleInstallNotification *message)
++{
++ assert(message->base.descriptor == &sr__module_install_notification__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__module_install_notification__pack
++ (const Sr__ModuleInstallNotification *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__module_install_notification__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__module_install_notification__pack_to_buffer
++ (const Sr__ModuleInstallNotification *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__module_install_notification__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__ModuleInstallNotification *
++ sr__module_install_notification__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__ModuleInstallNotification *)
++ protobuf_c_message_unpack (&sr__module_install_notification__descriptor,
++ allocator, len, data);
++}
++void sr__module_install_notification__free_unpacked
++ (Sr__ModuleInstallNotification *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__module_install_notification__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__feature_enable_notification__init
++ (Sr__FeatureEnableNotification *message)
++{
++ static Sr__FeatureEnableNotification init_value = SR__FEATURE_ENABLE_NOTIFICATION__INIT;
++ *message = init_value;
++}
++size_t sr__feature_enable_notification__get_packed_size
++ (const Sr__FeatureEnableNotification *message)
++{
++ assert(message->base.descriptor == &sr__feature_enable_notification__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__feature_enable_notification__pack
++ (const Sr__FeatureEnableNotification *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__feature_enable_notification__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__feature_enable_notification__pack_to_buffer
++ (const Sr__FeatureEnableNotification *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__feature_enable_notification__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__FeatureEnableNotification *
++ sr__feature_enable_notification__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__FeatureEnableNotification *)
++ protobuf_c_message_unpack (&sr__feature_enable_notification__descriptor,
++ allocator, len, data);
++}
++void sr__feature_enable_notification__free_unpacked
++ (Sr__FeatureEnableNotification *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__feature_enable_notification__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__module_change_notification__init
++ (Sr__ModuleChangeNotification *message)
++{
++ static Sr__ModuleChangeNotification init_value = SR__MODULE_CHANGE_NOTIFICATION__INIT;
++ *message = init_value;
++}
++size_t sr__module_change_notification__get_packed_size
++ (const Sr__ModuleChangeNotification *message)
++{
++ assert(message->base.descriptor == &sr__module_change_notification__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__module_change_notification__pack
++ (const Sr__ModuleChangeNotification *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__module_change_notification__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__module_change_notification__pack_to_buffer
++ (const Sr__ModuleChangeNotification *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__module_change_notification__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__ModuleChangeNotification *
++ sr__module_change_notification__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__ModuleChangeNotification *)
++ protobuf_c_message_unpack (&sr__module_change_notification__descriptor,
++ allocator, len, data);
++}
++void sr__module_change_notification__free_unpacked
++ (Sr__ModuleChangeNotification *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__module_change_notification__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__subtree_change_notification__init
++ (Sr__SubtreeChangeNotification *message)
++{
++ static Sr__SubtreeChangeNotification init_value = SR__SUBTREE_CHANGE_NOTIFICATION__INIT;
++ *message = init_value;
++}
++size_t sr__subtree_change_notification__get_packed_size
++ (const Sr__SubtreeChangeNotification *message)
++{
++ assert(message->base.descriptor == &sr__subtree_change_notification__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__subtree_change_notification__pack
++ (const Sr__SubtreeChangeNotification *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__subtree_change_notification__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__subtree_change_notification__pack_to_buffer
++ (const Sr__SubtreeChangeNotification *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__subtree_change_notification__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SubtreeChangeNotification *
++ sr__subtree_change_notification__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SubtreeChangeNotification *)
++ protobuf_c_message_unpack (&sr__subtree_change_notification__descriptor,
++ allocator, len, data);
++}
++void sr__subtree_change_notification__free_unpacked
++ (Sr__SubtreeChangeNotification *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__subtree_change_notification__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__change__init
++ (Sr__Change *message)
++{
++ static Sr__Change init_value = SR__CHANGE__INIT;
++ *message = init_value;
++}
++size_t sr__change__get_packed_size
++ (const Sr__Change *message)
++{
++ assert(message->base.descriptor == &sr__change__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__change__pack
++ (const Sr__Change *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__change__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__change__pack_to_buffer
++ (const Sr__Change *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__change__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__Change *
++ sr__change__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__Change *)
++ protobuf_c_message_unpack (&sr__change__descriptor,
++ allocator, len, data);
++}
++void sr__change__free_unpacked
++ (Sr__Change *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__change__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__get_changes_req__init
++ (Sr__GetChangesReq *message)
++{
++ static Sr__GetChangesReq init_value = SR__GET_CHANGES_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__get_changes_req__get_packed_size
++ (const Sr__GetChangesReq *message)
++{
++ assert(message->base.descriptor == &sr__get_changes_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__get_changes_req__pack
++ (const Sr__GetChangesReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__get_changes_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__get_changes_req__pack_to_buffer
++ (const Sr__GetChangesReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__get_changes_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__GetChangesReq *
++ sr__get_changes_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__GetChangesReq *)
++ protobuf_c_message_unpack (&sr__get_changes_req__descriptor,
++ allocator, len, data);
++}
++void sr__get_changes_req__free_unpacked
++ (Sr__GetChangesReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__get_changes_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__get_changes_resp__init
++ (Sr__GetChangesResp *message)
++{
++ static Sr__GetChangesResp init_value = SR__GET_CHANGES_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__get_changes_resp__get_packed_size
++ (const Sr__GetChangesResp *message)
++{
++ assert(message->base.descriptor == &sr__get_changes_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__get_changes_resp__pack
++ (const Sr__GetChangesResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__get_changes_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__get_changes_resp__pack_to_buffer
++ (const Sr__GetChangesResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__get_changes_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__GetChangesResp *
++ sr__get_changes_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__GetChangesResp *)
++ protobuf_c_message_unpack (&sr__get_changes_resp__descriptor,
++ allocator, len, data);
++}
++void sr__get_changes_resp__free_unpacked
++ (Sr__GetChangesResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__get_changes_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__check_exec_perm_req__init
++ (Sr__CheckExecPermReq *message)
++{
++ static Sr__CheckExecPermReq init_value = SR__CHECK_EXEC_PERM_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__check_exec_perm_req__get_packed_size
++ (const Sr__CheckExecPermReq *message)
++{
++ assert(message->base.descriptor == &sr__check_exec_perm_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__check_exec_perm_req__pack
++ (const Sr__CheckExecPermReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__check_exec_perm_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__check_exec_perm_req__pack_to_buffer
++ (const Sr__CheckExecPermReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__check_exec_perm_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__CheckExecPermReq *
++ sr__check_exec_perm_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__CheckExecPermReq *)
++ protobuf_c_message_unpack (&sr__check_exec_perm_req__descriptor,
++ allocator, len, data);
++}
++void sr__check_exec_perm_req__free_unpacked
++ (Sr__CheckExecPermReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__check_exec_perm_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__check_exec_perm_resp__init
++ (Sr__CheckExecPermResp *message)
++{
++ static Sr__CheckExecPermResp init_value = SR__CHECK_EXEC_PERM_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__check_exec_perm_resp__get_packed_size
++ (const Sr__CheckExecPermResp *message)
++{
++ assert(message->base.descriptor == &sr__check_exec_perm_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__check_exec_perm_resp__pack
++ (const Sr__CheckExecPermResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__check_exec_perm_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__check_exec_perm_resp__pack_to_buffer
++ (const Sr__CheckExecPermResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__check_exec_perm_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__CheckExecPermResp *
++ sr__check_exec_perm_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__CheckExecPermResp *)
++ protobuf_c_message_unpack (&sr__check_exec_perm_resp__descriptor,
++ allocator, len, data);
++}
++void sr__check_exec_perm_resp__free_unpacked
++ (Sr__CheckExecPermResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__check_exec_perm_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__rpcreq__init
++ (Sr__RPCReq *message)
++{
++ static Sr__RPCReq init_value = SR__RPCREQ__INIT;
++ *message = init_value;
++}
++size_t sr__rpcreq__get_packed_size
++ (const Sr__RPCReq *message)
++{
++ assert(message->base.descriptor == &sr__rpcreq__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__rpcreq__pack
++ (const Sr__RPCReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__rpcreq__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__rpcreq__pack_to_buffer
++ (const Sr__RPCReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__rpcreq__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__RPCReq *
++ sr__rpcreq__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__RPCReq *)
++ protobuf_c_message_unpack (&sr__rpcreq__descriptor,
++ allocator, len, data);
++}
++void sr__rpcreq__free_unpacked
++ (Sr__RPCReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__rpcreq__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__rpcresp__init
++ (Sr__RPCResp *message)
++{
++ static Sr__RPCResp init_value = SR__RPCRESP__INIT;
++ *message = init_value;
++}
++size_t sr__rpcresp__get_packed_size
++ (const Sr__RPCResp *message)
++{
++ assert(message->base.descriptor == &sr__rpcresp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__rpcresp__pack
++ (const Sr__RPCResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__rpcresp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__rpcresp__pack_to_buffer
++ (const Sr__RPCResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__rpcresp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__RPCResp *
++ sr__rpcresp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__RPCResp *)
++ protobuf_c_message_unpack (&sr__rpcresp__descriptor,
++ allocator, len, data);
++}
++void sr__rpcresp__free_unpacked
++ (Sr__RPCResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__rpcresp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__event_notif_req__init
++ (Sr__EventNotifReq *message)
++{
++ static Sr__EventNotifReq init_value = SR__EVENT_NOTIF_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__event_notif_req__get_packed_size
++ (const Sr__EventNotifReq *message)
++{
++ assert(message->base.descriptor == &sr__event_notif_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__event_notif_req__pack
++ (const Sr__EventNotifReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__event_notif_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__event_notif_req__pack_to_buffer
++ (const Sr__EventNotifReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__event_notif_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__EventNotifReq *
++ sr__event_notif_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__EventNotifReq *)
++ protobuf_c_message_unpack (&sr__event_notif_req__descriptor,
++ allocator, len, data);
++}
++void sr__event_notif_req__free_unpacked
++ (Sr__EventNotifReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__event_notif_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__event_notif_resp__init
++ (Sr__EventNotifResp *message)
++{
++ static Sr__EventNotifResp init_value = SR__EVENT_NOTIF_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__event_notif_resp__get_packed_size
++ (const Sr__EventNotifResp *message)
++{
++ assert(message->base.descriptor == &sr__event_notif_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__event_notif_resp__pack
++ (const Sr__EventNotifResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__event_notif_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__event_notif_resp__pack_to_buffer
++ (const Sr__EventNotifResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__event_notif_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__EventNotifResp *
++ sr__event_notif_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__EventNotifResp *)
++ protobuf_c_message_unpack (&sr__event_notif_resp__descriptor,
++ allocator, len, data);
++}
++void sr__event_notif_resp__free_unpacked
++ (Sr__EventNotifResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__event_notif_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__event_notif_replay_req__init
++ (Sr__EventNotifReplayReq *message)
++{
++ static Sr__EventNotifReplayReq init_value = SR__EVENT_NOTIF_REPLAY_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__event_notif_replay_req__get_packed_size
++ (const Sr__EventNotifReplayReq *message)
++{
++ assert(message->base.descriptor == &sr__event_notif_replay_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__event_notif_replay_req__pack
++ (const Sr__EventNotifReplayReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__event_notif_replay_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__event_notif_replay_req__pack_to_buffer
++ (const Sr__EventNotifReplayReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__event_notif_replay_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__EventNotifReplayReq *
++ sr__event_notif_replay_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__EventNotifReplayReq *)
++ protobuf_c_message_unpack (&sr__event_notif_replay_req__descriptor,
++ allocator, len, data);
++}
++void sr__event_notif_replay_req__free_unpacked
++ (Sr__EventNotifReplayReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__event_notif_replay_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__event_notif_replay_resp__init
++ (Sr__EventNotifReplayResp *message)
++{
++ static Sr__EventNotifReplayResp init_value = SR__EVENT_NOTIF_REPLAY_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__event_notif_replay_resp__get_packed_size
++ (const Sr__EventNotifReplayResp *message)
++{
++ assert(message->base.descriptor == &sr__event_notif_replay_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__event_notif_replay_resp__pack
++ (const Sr__EventNotifReplayResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__event_notif_replay_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__event_notif_replay_resp__pack_to_buffer
++ (const Sr__EventNotifReplayResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__event_notif_replay_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__EventNotifReplayResp *
++ sr__event_notif_replay_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__EventNotifReplayResp *)
++ protobuf_c_message_unpack (&sr__event_notif_replay_resp__descriptor,
++ allocator, len, data);
++}
++void sr__event_notif_replay_resp__free_unpacked
++ (Sr__EventNotifReplayResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__event_notif_replay_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__data_provide_req__init
++ (Sr__DataProvideReq *message)
++{
++ static Sr__DataProvideReq init_value = SR__DATA_PROVIDE_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__data_provide_req__get_packed_size
++ (const Sr__DataProvideReq *message)
++{
++ assert(message->base.descriptor == &sr__data_provide_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__data_provide_req__pack
++ (const Sr__DataProvideReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__data_provide_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__data_provide_req__pack_to_buffer
++ (const Sr__DataProvideReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__data_provide_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__DataProvideReq *
++ sr__data_provide_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__DataProvideReq *)
++ protobuf_c_message_unpack (&sr__data_provide_req__descriptor,
++ allocator, len, data);
++}
++void sr__data_provide_req__free_unpacked
++ (Sr__DataProvideReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__data_provide_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__data_provide_resp__init
++ (Sr__DataProvideResp *message)
++{
++ static Sr__DataProvideResp init_value = SR__DATA_PROVIDE_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__data_provide_resp__get_packed_size
++ (const Sr__DataProvideResp *message)
++{
++ assert(message->base.descriptor == &sr__data_provide_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__data_provide_resp__pack
++ (const Sr__DataProvideResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__data_provide_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__data_provide_resp__pack_to_buffer
++ (const Sr__DataProvideResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__data_provide_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__DataProvideResp *
++ sr__data_provide_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__DataProvideResp *)
++ protobuf_c_message_unpack (&sr__data_provide_resp__descriptor,
++ allocator, len, data);
++}
++void sr__data_provide_resp__free_unpacked
++ (Sr__DataProvideResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__data_provide_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__module_install_req__init
++ (Sr__ModuleInstallReq *message)
++{
++ static Sr__ModuleInstallReq init_value = SR__MODULE_INSTALL_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__module_install_req__get_packed_size
++ (const Sr__ModuleInstallReq *message)
++{
++ assert(message->base.descriptor == &sr__module_install_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__module_install_req__pack
++ (const Sr__ModuleInstallReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__module_install_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__module_install_req__pack_to_buffer
++ (const Sr__ModuleInstallReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__module_install_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__ModuleInstallReq *
++ sr__module_install_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__ModuleInstallReq *)
++ protobuf_c_message_unpack (&sr__module_install_req__descriptor,
++ allocator, len, data);
++}
++void sr__module_install_req__free_unpacked
++ (Sr__ModuleInstallReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__module_install_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__module_install_resp__init
++ (Sr__ModuleInstallResp *message)
++{
++ static Sr__ModuleInstallResp init_value = SR__MODULE_INSTALL_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__module_install_resp__get_packed_size
++ (const Sr__ModuleInstallResp *message)
++{
++ assert(message->base.descriptor == &sr__module_install_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__module_install_resp__pack
++ (const Sr__ModuleInstallResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__module_install_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__module_install_resp__pack_to_buffer
++ (const Sr__ModuleInstallResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__module_install_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__ModuleInstallResp *
++ sr__module_install_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__ModuleInstallResp *)
++ protobuf_c_message_unpack (&sr__module_install_resp__descriptor,
++ allocator, len, data);
++}
++void sr__module_install_resp__free_unpacked
++ (Sr__ModuleInstallResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__module_install_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__feature_enable_req__init
++ (Sr__FeatureEnableReq *message)
++{
++ static Sr__FeatureEnableReq init_value = SR__FEATURE_ENABLE_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__feature_enable_req__get_packed_size
++ (const Sr__FeatureEnableReq *message)
++{
++ assert(message->base.descriptor == &sr__feature_enable_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__feature_enable_req__pack
++ (const Sr__FeatureEnableReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__feature_enable_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__feature_enable_req__pack_to_buffer
++ (const Sr__FeatureEnableReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__feature_enable_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__FeatureEnableReq *
++ sr__feature_enable_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__FeatureEnableReq *)
++ protobuf_c_message_unpack (&sr__feature_enable_req__descriptor,
++ allocator, len, data);
++}
++void sr__feature_enable_req__free_unpacked
++ (Sr__FeatureEnableReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__feature_enable_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__feature_enable_resp__init
++ (Sr__FeatureEnableResp *message)
++{
++ static Sr__FeatureEnableResp init_value = SR__FEATURE_ENABLE_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__feature_enable_resp__get_packed_size
++ (const Sr__FeatureEnableResp *message)
++{
++ assert(message->base.descriptor == &sr__feature_enable_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__feature_enable_resp__pack
++ (const Sr__FeatureEnableResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__feature_enable_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__feature_enable_resp__pack_to_buffer
++ (const Sr__FeatureEnableResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__feature_enable_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__FeatureEnableResp *
++ sr__feature_enable_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__FeatureEnableResp *)
++ protobuf_c_message_unpack (&sr__feature_enable_resp__descriptor,
++ allocator, len, data);
++}
++void sr__feature_enable_resp__free_unpacked
++ (Sr__FeatureEnableResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__feature_enable_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__unsubscribe_destination_req__init
++ (Sr__UnsubscribeDestinationReq *message)
++{
++ static Sr__UnsubscribeDestinationReq init_value = SR__UNSUBSCRIBE_DESTINATION_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__unsubscribe_destination_req__get_packed_size
++ (const Sr__UnsubscribeDestinationReq *message)
++{
++ assert(message->base.descriptor == &sr__unsubscribe_destination_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__unsubscribe_destination_req__pack
++ (const Sr__UnsubscribeDestinationReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__unsubscribe_destination_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__unsubscribe_destination_req__pack_to_buffer
++ (const Sr__UnsubscribeDestinationReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__unsubscribe_destination_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__UnsubscribeDestinationReq *
++ sr__unsubscribe_destination_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__UnsubscribeDestinationReq *)
++ protobuf_c_message_unpack (&sr__unsubscribe_destination_req__descriptor,
++ allocator, len, data);
++}
++void sr__unsubscribe_destination_req__free_unpacked
++ (Sr__UnsubscribeDestinationReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__unsubscribe_destination_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__commit_timeout_req__init
++ (Sr__CommitTimeoutReq *message)
++{
++ static Sr__CommitTimeoutReq init_value = SR__COMMIT_TIMEOUT_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__commit_timeout_req__get_packed_size
++ (const Sr__CommitTimeoutReq *message)
++{
++ assert(message->base.descriptor == &sr__commit_timeout_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__commit_timeout_req__pack
++ (const Sr__CommitTimeoutReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__commit_timeout_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__commit_timeout_req__pack_to_buffer
++ (const Sr__CommitTimeoutReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__commit_timeout_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__CommitTimeoutReq *
++ sr__commit_timeout_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__CommitTimeoutReq *)
++ protobuf_c_message_unpack (&sr__commit_timeout_req__descriptor,
++ allocator, len, data);
++}
++void sr__commit_timeout_req__free_unpacked
++ (Sr__CommitTimeoutReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__commit_timeout_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__oper_data_timeout_req__init
++ (Sr__OperDataTimeoutReq *message)
++{
++ static Sr__OperDataTimeoutReq init_value = SR__OPER_DATA_TIMEOUT_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__oper_data_timeout_req__get_packed_size
++ (const Sr__OperDataTimeoutReq *message)
++{
++ assert(message->base.descriptor == &sr__oper_data_timeout_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__oper_data_timeout_req__pack
++ (const Sr__OperDataTimeoutReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__oper_data_timeout_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__oper_data_timeout_req__pack_to_buffer
++ (const Sr__OperDataTimeoutReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__oper_data_timeout_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__OperDataTimeoutReq *
++ sr__oper_data_timeout_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__OperDataTimeoutReq *)
++ protobuf_c_message_unpack (&sr__oper_data_timeout_req__descriptor,
++ allocator, len, data);
++}
++void sr__oper_data_timeout_req__free_unpacked
++ (Sr__OperDataTimeoutReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__oper_data_timeout_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__internal_state_data_req__init
++ (Sr__InternalStateDataReq *message)
++{
++ static Sr__InternalStateDataReq init_value = SR__INTERNAL_STATE_DATA_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__internal_state_data_req__get_packed_size
++ (const Sr__InternalStateDataReq *message)
++{
++ assert(message->base.descriptor == &sr__internal_state_data_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__internal_state_data_req__pack
++ (const Sr__InternalStateDataReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__internal_state_data_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__internal_state_data_req__pack_to_buffer
++ (const Sr__InternalStateDataReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__internal_state_data_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__InternalStateDataReq *
++ sr__internal_state_data_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__InternalStateDataReq *)
++ protobuf_c_message_unpack (&sr__internal_state_data_req__descriptor,
++ allocator, len, data);
++}
++void sr__internal_state_data_req__free_unpacked
++ (Sr__InternalStateDataReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__internal_state_data_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__notif_store_cleanup_req__init
++ (Sr__NotifStoreCleanupReq *message)
++{
++ static Sr__NotifStoreCleanupReq init_value = SR__NOTIF_STORE_CLEANUP_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__notif_store_cleanup_req__get_packed_size
++ (const Sr__NotifStoreCleanupReq *message)
++{
++ assert(message->base.descriptor == &sr__notif_store_cleanup_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__notif_store_cleanup_req__pack
++ (const Sr__NotifStoreCleanupReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__notif_store_cleanup_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__notif_store_cleanup_req__pack_to_buffer
++ (const Sr__NotifStoreCleanupReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__notif_store_cleanup_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__NotifStoreCleanupReq *
++ sr__notif_store_cleanup_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__NotifStoreCleanupReq *)
++ protobuf_c_message_unpack (&sr__notif_store_cleanup_req__descriptor,
++ allocator, len, data);
++}
++void sr__notif_store_cleanup_req__free_unpacked
++ (Sr__NotifStoreCleanupReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__notif_store_cleanup_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__delayed_msg_req__init
++ (Sr__DelayedMsgReq *message)
++{
++ static Sr__DelayedMsgReq init_value = SR__DELAYED_MSG_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__delayed_msg_req__get_packed_size
++ (const Sr__DelayedMsgReq *message)
++{
++ assert(message->base.descriptor == &sr__delayed_msg_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__delayed_msg_req__pack
++ (const Sr__DelayedMsgReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__delayed_msg_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__delayed_msg_req__pack_to_buffer
++ (const Sr__DelayedMsgReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__delayed_msg_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__DelayedMsgReq *
++ sr__delayed_msg_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__DelayedMsgReq *)
++ protobuf_c_message_unpack (&sr__delayed_msg_req__descriptor,
++ allocator, len, data);
++}
++void sr__delayed_msg_req__free_unpacked
++ (Sr__DelayedMsgReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__delayed_msg_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__nacm_reload_req__init
++ (Sr__NacmReloadReq *message)
++{
++ static Sr__NacmReloadReq init_value = SR__NACM_RELOAD_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__nacm_reload_req__get_packed_size
++ (const Sr__NacmReloadReq *message)
++{
++ assert(message->base.descriptor == &sr__nacm_reload_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__nacm_reload_req__pack
++ (const Sr__NacmReloadReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__nacm_reload_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__nacm_reload_req__pack_to_buffer
++ (const Sr__NacmReloadReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__nacm_reload_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__NacmReloadReq *
++ sr__nacm_reload_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__NacmReloadReq *)
++ protobuf_c_message_unpack (&sr__nacm_reload_req__descriptor,
++ allocator, len, data);
++}
++void sr__nacm_reload_req__free_unpacked
++ (Sr__NacmReloadReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__nacm_reload_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__request__init
++ (Sr__Request *message)
++{
++ static Sr__Request init_value = SR__REQUEST__INIT;
++ *message = init_value;
++}
++size_t sr__request__get_packed_size
++ (const Sr__Request *message)
++{
++ assert(message->base.descriptor == &sr__request__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__request__pack
++ (const Sr__Request *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__request__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__request__pack_to_buffer
++ (const Sr__Request *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__request__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__Request *
++ sr__request__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__Request *)
++ protobuf_c_message_unpack (&sr__request__descriptor,
++ allocator, len, data);
++}
++void sr__request__free_unpacked
++ (Sr__Request *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__request__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__response__init
++ (Sr__Response *message)
++{
++ static Sr__Response init_value = SR__RESPONSE__INIT;
++ *message = init_value;
++}
++size_t sr__response__get_packed_size
++ (const Sr__Response *message)
++{
++ assert(message->base.descriptor == &sr__response__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__response__pack
++ (const Sr__Response *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__response__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__response__pack_to_buffer
++ (const Sr__Response *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__response__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__Response *
++ sr__response__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__Response *)
++ protobuf_c_message_unpack (&sr__response__descriptor,
++ allocator, len, data);
++}
++void sr__response__free_unpacked
++ (Sr__Response *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__response__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__notification__init
++ (Sr__Notification *message)
++{
++ static Sr__Notification init_value = SR__NOTIFICATION__INIT;
++ *message = init_value;
++}
++size_t sr__notification__get_packed_size
++ (const Sr__Notification *message)
++{
++ assert(message->base.descriptor == &sr__notification__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__notification__pack
++ (const Sr__Notification *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__notification__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__notification__pack_to_buffer
++ (const Sr__Notification *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__notification__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__Notification *
++ sr__notification__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__Notification *)
++ protobuf_c_message_unpack (&sr__notification__descriptor,
++ allocator, len, data);
++}
++void sr__notification__free_unpacked
++ (Sr__Notification *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__notification__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__notification_ack__init
++ (Sr__NotificationAck *message)
++{
++ static Sr__NotificationAck init_value = SR__NOTIFICATION_ACK__INIT;
++ *message = init_value;
++}
++size_t sr__notification_ack__get_packed_size
++ (const Sr__NotificationAck *message)
++{
++ assert(message->base.descriptor == &sr__notification_ack__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__notification_ack__pack
++ (const Sr__NotificationAck *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__notification_ack__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__notification_ack__pack_to_buffer
++ (const Sr__NotificationAck *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__notification_ack__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__NotificationAck *
++ sr__notification_ack__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__NotificationAck *)
++ protobuf_c_message_unpack (&sr__notification_ack__descriptor,
++ allocator, len, data);
++}
++void sr__notification_ack__free_unpacked
++ (Sr__NotificationAck *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__notification_ack__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__internal_request__init
++ (Sr__InternalRequest *message)
++{
++ static Sr__InternalRequest init_value = SR__INTERNAL_REQUEST__INIT;
++ *message = init_value;
++}
++size_t sr__internal_request__get_packed_size
++ (const Sr__InternalRequest *message)
++{
++ assert(message->base.descriptor == &sr__internal_request__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__internal_request__pack
++ (const Sr__InternalRequest *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__internal_request__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__internal_request__pack_to_buffer
++ (const Sr__InternalRequest *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__internal_request__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__InternalRequest *
++ sr__internal_request__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__InternalRequest *)
++ protobuf_c_message_unpack (&sr__internal_request__descriptor,
++ allocator, len, data);
++}
++void sr__internal_request__free_unpacked
++ (Sr__InternalRequest *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__internal_request__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__msg__init
++ (Sr__Msg *message)
++{
++ static Sr__Msg init_value = SR__MSG__INIT;
++ *message = init_value;
++}
++size_t sr__msg__get_packed_size
++ (const Sr__Msg *message)
++{
++ assert(message->base.descriptor == &sr__msg__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__msg__pack
++ (const Sr__Msg *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__msg__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__msg__pack_to_buffer
++ (const Sr__Msg *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__msg__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__Msg *
++ sr__msg__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__Msg *)
++ protobuf_c_message_unpack (&sr__msg__descriptor,
++ allocator, len, data);
++}
++void sr__msg__free_unpacked
++ (Sr__Msg *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__msg__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++static const ProtobufCEnumValue sr__value__types__enum_values_by_number[22] =
++{
++ { "LIST", "SR__VALUE__TYPES__LIST", 1 },
++ { "CONTAINER", "SR__VALUE__TYPES__CONTAINER", 2 },
++ { "CONTAINER_PRESENCE", "SR__VALUE__TYPES__CONTAINER_PRESENCE", 3 },
++ { "LEAF_EMPTY", "SR__VALUE__TYPES__LEAF_EMPTY", 4 },
++ { "BINARY", "SR__VALUE__TYPES__BINARY", 10 },
++ { "BITS", "SR__VALUE__TYPES__BITS", 11 },
++ { "BOOL", "SR__VALUE__TYPES__BOOL", 12 },
++ { "DECIMAL64", "SR__VALUE__TYPES__DECIMAL64", 13 },
++ { "ENUM", "SR__VALUE__TYPES__ENUM", 14 },
++ { "IDENTITYREF", "SR__VALUE__TYPES__IDENTITYREF", 15 },
++ { "INSTANCEID", "SR__VALUE__TYPES__INSTANCEID", 16 },
++ { "INT8", "SR__VALUE__TYPES__INT8", 17 },
++ { "INT16", "SR__VALUE__TYPES__INT16", 18 },
++ { "INT32", "SR__VALUE__TYPES__INT32", 19 },
++ { "INT64", "SR__VALUE__TYPES__INT64", 20 },
++ { "STRING", "SR__VALUE__TYPES__STRING", 21 },
++ { "UINT8", "SR__VALUE__TYPES__UINT8", 22 },
++ { "UINT16", "SR__VALUE__TYPES__UINT16", 23 },
++ { "UINT32", "SR__VALUE__TYPES__UINT32", 24 },
++ { "UINT64", "SR__VALUE__TYPES__UINT64", 25 },
++ { "ANYXML", "SR__VALUE__TYPES__ANYXML", 26 },
++ { "ANYDATA", "SR__VALUE__TYPES__ANYDATA", 27 },
++};
++static const ProtobufCIntRange sr__value__types__value_ranges[] = {
++{1, 0},{10, 4},{0, 22}
++};
++static const ProtobufCEnumValueIndex sr__value__types__enum_values_by_name[22] =
++{
++ { "ANYDATA", 21 },
++ { "ANYXML", 20 },
++ { "BINARY", 4 },
++ { "BITS", 5 },
++ { "BOOL", 6 },
++ { "CONTAINER", 1 },
++ { "CONTAINER_PRESENCE", 2 },
++ { "DECIMAL64", 7 },
++ { "ENUM", 8 },
++ { "IDENTITYREF", 9 },
++ { "INSTANCEID", 10 },
++ { "INT16", 12 },
++ { "INT32", 13 },
++ { "INT64", 14 },
++ { "INT8", 11 },
++ { "LEAF_EMPTY", 3 },
++ { "LIST", 0 },
++ { "STRING", 15 },
++ { "UINT16", 17 },
++ { "UINT32", 18 },
++ { "UINT64", 19 },
++ { "UINT8", 16 },
++};
++const ProtobufCEnumDescriptor sr__value__types__descriptor =
++{
++ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
++ "sr.Value.Types",
++ "Types",
++ "Sr__Value__Types",
++ "sr",
++ 22,
++ sr__value__types__enum_values_by_number,
++ 22,
++ sr__value__types__enum_values_by_name,
++ 2,
++ sr__value__types__value_ranges,
++ NULL,NULL,NULL,NULL /* reserved[1234] */
++};
++static const ProtobufCFieldDescriptor sr__value__field_descriptors[21] =
++{
++ {
++ "xpath",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Value, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "type",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Value, type),
++ &sr__value__types__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "dflt",
++ 3,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_BOOL,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Value, dflt),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "binary_val",
++ 10,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Value, binary_val),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "bits_val",
++ 11,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Value, bits_val),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "bool_val",
++ 12,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_BOOL,
++ offsetof(Sr__Value, has_bool_val),
++ offsetof(Sr__Value, bool_val),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "decimal64_val",
++ 13,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_DOUBLE,
++ offsetof(Sr__Value, has_decimal64_val),
++ offsetof(Sr__Value, decimal64_val),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "enum_val",
++ 14,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Value, enum_val),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "identityref_val",
++ 15,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Value, identityref_val),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "instanceid_val",
++ 16,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Value, instanceid_val),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "int8_val",
++ 17,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_INT32,
++ offsetof(Sr__Value, has_int8_val),
++ offsetof(Sr__Value, int8_val),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "int16_val",
++ 18,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_INT32,
++ offsetof(Sr__Value, has_int16_val),
++ offsetof(Sr__Value, int16_val),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "int32_val",
++ 19,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_INT32,
++ offsetof(Sr__Value, has_int32_val),
++ offsetof(Sr__Value, int32_val),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "int64_val",
++ 20,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_INT64,
++ offsetof(Sr__Value, has_int64_val),
++ offsetof(Sr__Value, int64_val),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "string_val",
++ 21,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Value, string_val),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "uint8_val",
++ 22,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_UINT32,
++ offsetof(Sr__Value, has_uint8_val),
++ offsetof(Sr__Value, uint8_val),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "uint16_val",
++ 23,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_UINT32,
++ offsetof(Sr__Value, has_uint16_val),
++ offsetof(Sr__Value, uint16_val),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "uint32_val",
++ 24,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_UINT32,
++ offsetof(Sr__Value, has_uint32_val),
++ offsetof(Sr__Value, uint32_val),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "uint64_val",
++ 25,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_UINT64,
++ offsetof(Sr__Value, has_uint64_val),
++ offsetof(Sr__Value, uint64_val),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "anyxml_val",
++ 26,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Value, anyxml_val),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "anydata_val",
++ 27,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Value, anydata_val),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__value__field_indices_by_name[] = {
++ 20, /* field[20] = anydata_val */
++ 19, /* field[19] = anyxml_val */
++ 3, /* field[3] = binary_val */
++ 4, /* field[4] = bits_val */
++ 5, /* field[5] = bool_val */
++ 6, /* field[6] = decimal64_val */
++ 2, /* field[2] = dflt */
++ 7, /* field[7] = enum_val */
++ 8, /* field[8] = identityref_val */
++ 9, /* field[9] = instanceid_val */
++ 11, /* field[11] = int16_val */
++ 12, /* field[12] = int32_val */
++ 13, /* field[13] = int64_val */
++ 10, /* field[10] = int8_val */
++ 14, /* field[14] = string_val */
++ 1, /* field[1] = type */
++ 16, /* field[16] = uint16_val */
++ 17, /* field[17] = uint32_val */
++ 18, /* field[18] = uint64_val */
++ 15, /* field[15] = uint8_val */
++ 0, /* field[0] = xpath */
++};
++static const ProtobufCIntRange sr__value__number_ranges[2 + 1] =
++{
++ { 1, 0 },
++ { 10, 3 },
++ { 0, 21 }
++};
++const ProtobufCMessageDescriptor sr__value__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.Value",
++ "Value",
++ "Sr__Value",
++ "sr",
++ sizeof(Sr__Value),
++ 21,
++ sr__value__field_descriptors,
++ sr__value__field_indices_by_name,
++ 2, sr__value__number_ranges,
++ (ProtobufCMessageInit) sr__value__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__node__field_descriptors[3] =
++{
++ {
++ "value",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Node, value),
++ &sr__value__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "module_name",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Node, module_name),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "children",
++ 3,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ offsetof(Sr__Node, n_children),
++ offsetof(Sr__Node, children),
++ &sr__node__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__node__field_indices_by_name[] = {
++ 2, /* field[2] = children */
++ 1, /* field[1] = module_name */
++ 0, /* field[0] = value */
++};
++static const ProtobufCIntRange sr__node__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 3 }
++};
++const ProtobufCMessageDescriptor sr__node__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.Node",
++ "Node",
++ "Sr__Node",
++ "sr",
++ sizeof(Sr__Node),
++ 3,
++ sr__node__field_descriptors,
++ sr__node__field_indices_by_name,
++ 1, sr__node__number_ranges,
++ (ProtobufCMessageInit) sr__node__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__error__field_descriptors[2] =
++{
++ {
++ "message",
++ 1,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Error, message),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "xpath",
++ 2,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Error, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__error__field_indices_by_name[] = {
++ 0, /* field[0] = message */
++ 1, /* field[1] = xpath */
++};
++static const ProtobufCIntRange sr__error__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 2 }
++};
++const ProtobufCMessageDescriptor sr__error__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.Error",
++ "Error",
++ "Sr__Error",
++ "sr",
++ sizeof(Sr__Error),
++ 2,
++ sr__error__field_descriptors,
++ sr__error__field_indices_by_name,
++ 1, sr__error__number_ranges,
++ (ProtobufCMessageInit) sr__error__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__session_start_req__field_descriptors[4] =
++{
++ {
++ "datastore",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SessionStartReq, datastore),
++ &sr__data_store__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "user_name",
++ 2,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SessionStartReq, user_name),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "options",
++ 3,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SessionStartReq, options),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "commit_id",
++ 4,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_UINT32,
++ offsetof(Sr__SessionStartReq, has_commit_id),
++ offsetof(Sr__SessionStartReq, commit_id),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__session_start_req__field_indices_by_name[] = {
++ 3, /* field[3] = commit_id */
++ 0, /* field[0] = datastore */
++ 2, /* field[2] = options */
++ 1, /* field[1] = user_name */
++};
++static const ProtobufCIntRange sr__session_start_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 4 }
++};
++const ProtobufCMessageDescriptor sr__session_start_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SessionStartReq",
++ "SessionStartReq",
++ "Sr__SessionStartReq",
++ "sr",
++ sizeof(Sr__SessionStartReq),
++ 4,
++ sr__session_start_req__field_descriptors,
++ sr__session_start_req__field_indices_by_name,
++ 1, sr__session_start_req__number_ranges,
++ (ProtobufCMessageInit) sr__session_start_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__session_start_resp__field_descriptors[1] =
++{
++ {
++ "session_id",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SessionStartResp, session_id),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__session_start_resp__field_indices_by_name[] = {
++ 0, /* field[0] = session_id */
++};
++static const ProtobufCIntRange sr__session_start_resp__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__session_start_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SessionStartResp",
++ "SessionStartResp",
++ "Sr__SessionStartResp",
++ "sr",
++ sizeof(Sr__SessionStartResp),
++ 1,
++ sr__session_start_resp__field_descriptors,
++ sr__session_start_resp__field_indices_by_name,
++ 1, sr__session_start_resp__number_ranges,
++ (ProtobufCMessageInit) sr__session_start_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__session_stop_req__field_descriptors[1] =
++{
++ {
++ "session_id",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SessionStopReq, session_id),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__session_stop_req__field_indices_by_name[] = {
++ 0, /* field[0] = session_id */
++};
++static const ProtobufCIntRange sr__session_stop_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__session_stop_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SessionStopReq",
++ "SessionStopReq",
++ "Sr__SessionStopReq",
++ "sr",
++ sizeof(Sr__SessionStopReq),
++ 1,
++ sr__session_stop_req__field_descriptors,
++ sr__session_stop_req__field_indices_by_name,
++ 1, sr__session_stop_req__number_ranges,
++ (ProtobufCMessageInit) sr__session_stop_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__session_stop_resp__field_descriptors[1] =
++{
++ {
++ "session_id",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SessionStopResp, session_id),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__session_stop_resp__field_indices_by_name[] = {
++ 0, /* field[0] = session_id */
++};
++static const ProtobufCIntRange sr__session_stop_resp__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__session_stop_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SessionStopResp",
++ "SessionStopResp",
++ "Sr__SessionStopResp",
++ "sr",
++ sizeof(Sr__SessionStopResp),
++ 1,
++ sr__session_stop_resp__field_descriptors,
++ sr__session_stop_resp__field_indices_by_name,
++ 1, sr__session_stop_resp__number_ranges,
++ (ProtobufCMessageInit) sr__session_stop_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__session_refresh_req__field_descriptors NULL
++#define sr__session_refresh_req__field_indices_by_name NULL
++#define sr__session_refresh_req__number_ranges NULL
++const ProtobufCMessageDescriptor sr__session_refresh_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SessionRefreshReq",
++ "SessionRefreshReq",
++ "Sr__SessionRefreshReq",
++ "sr",
++ sizeof(Sr__SessionRefreshReq),
++ 0,
++ sr__session_refresh_req__field_descriptors,
++ sr__session_refresh_req__field_indices_by_name,
++ 0, sr__session_refresh_req__number_ranges,
++ (ProtobufCMessageInit) sr__session_refresh_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__session_refresh_resp__field_descriptors[1] =
++{
++ {
++ "errors",
++ 1,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ offsetof(Sr__SessionRefreshResp, n_errors),
++ offsetof(Sr__SessionRefreshResp, errors),
++ &sr__error__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__session_refresh_resp__field_indices_by_name[] = {
++ 0, /* field[0] = errors */
++};
++static const ProtobufCIntRange sr__session_refresh_resp__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__session_refresh_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SessionRefreshResp",
++ "SessionRefreshResp",
++ "Sr__SessionRefreshResp",
++ "sr",
++ sizeof(Sr__SessionRefreshResp),
++ 1,
++ sr__session_refresh_resp__field_descriptors,
++ sr__session_refresh_resp__field_indices_by_name,
++ 1, sr__session_refresh_resp__number_ranges,
++ (ProtobufCMessageInit) sr__session_refresh_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__session_check_req__field_descriptors NULL
++#define sr__session_check_req__field_indices_by_name NULL
++#define sr__session_check_req__number_ranges NULL
++const ProtobufCMessageDescriptor sr__session_check_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SessionCheckReq",
++ "SessionCheckReq",
++ "Sr__SessionCheckReq",
++ "sr",
++ sizeof(Sr__SessionCheckReq),
++ 0,
++ sr__session_check_req__field_descriptors,
++ sr__session_check_req__field_indices_by_name,
++ 0, sr__session_check_req__number_ranges,
++ (ProtobufCMessageInit) sr__session_check_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__session_check_resp__field_descriptors[1] =
++{
++ {
++ "errors",
++ 1,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ offsetof(Sr__SessionCheckResp, n_errors),
++ offsetof(Sr__SessionCheckResp, errors),
++ &sr__error__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__session_check_resp__field_indices_by_name[] = {
++ 0, /* field[0] = errors */
++};
++static const ProtobufCIntRange sr__session_check_resp__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__session_check_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SessionCheckResp",
++ "SessionCheckResp",
++ "Sr__SessionCheckResp",
++ "sr",
++ sizeof(Sr__SessionCheckResp),
++ 1,
++ sr__session_check_resp__field_descriptors,
++ sr__session_check_resp__field_indices_by_name,
++ 1, sr__session_check_resp__number_ranges,
++ (ProtobufCMessageInit) sr__session_check_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__session_switch_ds_req__field_descriptors[1] =
++{
++ {
++ "datastore",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SessionSwitchDsReq, datastore),
++ &sr__data_store__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__session_switch_ds_req__field_indices_by_name[] = {
++ 0, /* field[0] = datastore */
++};
++static const ProtobufCIntRange sr__session_switch_ds_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__session_switch_ds_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SessionSwitchDsReq",
++ "SessionSwitchDsReq",
++ "Sr__SessionSwitchDsReq",
++ "sr",
++ sizeof(Sr__SessionSwitchDsReq),
++ 1,
++ sr__session_switch_ds_req__field_descriptors,
++ sr__session_switch_ds_req__field_indices_by_name,
++ 1, sr__session_switch_ds_req__number_ranges,
++ (ProtobufCMessageInit) sr__session_switch_ds_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__session_switch_ds_resp__field_descriptors NULL
++#define sr__session_switch_ds_resp__field_indices_by_name NULL
++#define sr__session_switch_ds_resp__number_ranges NULL
++const ProtobufCMessageDescriptor sr__session_switch_ds_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SessionSwitchDsResp",
++ "SessionSwitchDsResp",
++ "Sr__SessionSwitchDsResp",
++ "sr",
++ sizeof(Sr__SessionSwitchDsResp),
++ 0,
++ sr__session_switch_ds_resp__field_descriptors,
++ sr__session_switch_ds_resp__field_indices_by_name,
++ 0, sr__session_switch_ds_resp__number_ranges,
++ (ProtobufCMessageInit) sr__session_switch_ds_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__session_set_opts_req__field_descriptors[1] =
++{
++ {
++ "options",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SessionSetOptsReq, options),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__session_set_opts_req__field_indices_by_name[] = {
++ 0, /* field[0] = options */
++};
++static const ProtobufCIntRange sr__session_set_opts_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__session_set_opts_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SessionSetOptsReq",
++ "SessionSetOptsReq",
++ "Sr__SessionSetOptsReq",
++ "sr",
++ sizeof(Sr__SessionSetOptsReq),
++ 1,
++ sr__session_set_opts_req__field_descriptors,
++ sr__session_set_opts_req__field_indices_by_name,
++ 1, sr__session_set_opts_req__number_ranges,
++ (ProtobufCMessageInit) sr__session_set_opts_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__session_set_opts_resp__field_descriptors NULL
++#define sr__session_set_opts_resp__field_indices_by_name NULL
++#define sr__session_set_opts_resp__number_ranges NULL
++const ProtobufCMessageDescriptor sr__session_set_opts_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SessionSetOptsResp",
++ "SessionSetOptsResp",
++ "Sr__SessionSetOptsResp",
++ "sr",
++ sizeof(Sr__SessionSetOptsResp),
++ 0,
++ sr__session_set_opts_resp__field_descriptors,
++ sr__session_set_opts_resp__field_indices_by_name,
++ 0, sr__session_set_opts_resp__number_ranges,
++ (ProtobufCMessageInit) sr__session_set_opts_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__version_verify_req__field_descriptors[1] =
++{
++ {
++ "soname",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__VersionVerifyReq, soname),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__version_verify_req__field_indices_by_name[] = {
++ 0, /* field[0] = soname */
++};
++static const ProtobufCIntRange sr__version_verify_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__version_verify_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.VersionVerifyReq",
++ "VersionVerifyReq",
++ "Sr__VersionVerifyReq",
++ "sr",
++ sizeof(Sr__VersionVerifyReq),
++ 1,
++ sr__version_verify_req__field_descriptors,
++ sr__version_verify_req__field_indices_by_name,
++ 1, sr__version_verify_req__number_ranges,
++ (ProtobufCMessageInit) sr__version_verify_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__version_verify_resp__field_descriptors[1] =
++{
++ {
++ "soname",
++ 1,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__VersionVerifyResp, soname),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__version_verify_resp__field_indices_by_name[] = {
++ 0, /* field[0] = soname */
++};
++static const ProtobufCIntRange sr__version_verify_resp__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__version_verify_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.VersionVerifyResp",
++ "VersionVerifyResp",
++ "Sr__VersionVerifyResp",
++ "sr",
++ sizeof(Sr__VersionVerifyResp),
++ 1,
++ sr__version_verify_resp__field_descriptors,
++ sr__version_verify_resp__field_indices_by_name,
++ 1, sr__version_verify_resp__number_ranges,
++ (ProtobufCMessageInit) sr__version_verify_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__schema_revision__field_descriptors[3] =
++{
++ {
++ "revision",
++ 1,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SchemaRevision, revision),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "file_path_yang",
++ 2,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SchemaRevision, file_path_yang),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "file_path_yin",
++ 3,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SchemaRevision, file_path_yin),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__schema_revision__field_indices_by_name[] = {
++ 1, /* field[1] = file_path_yang */
++ 2, /* field[2] = file_path_yin */
++ 0, /* field[0] = revision */
++};
++static const ProtobufCIntRange sr__schema_revision__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 3 }
++};
++const ProtobufCMessageDescriptor sr__schema_revision__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SchemaRevision",
++ "SchemaRevision",
++ "Sr__SchemaRevision",
++ "sr",
++ sizeof(Sr__SchemaRevision),
++ 3,
++ sr__schema_revision__field_descriptors,
++ sr__schema_revision__field_indices_by_name,
++ 1, sr__schema_revision__number_ranges,
++ (ProtobufCMessageInit) sr__schema_revision__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__schema_submodule__field_descriptors[2] =
++{
++ {
++ "submodule_name",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SchemaSubmodule, submodule_name),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "revision",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SchemaSubmodule, revision),
++ &sr__schema_revision__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__schema_submodule__field_indices_by_name[] = {
++ 1, /* field[1] = revision */
++ 0, /* field[0] = submodule_name */
++};
++static const ProtobufCIntRange sr__schema_submodule__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 2 }
++};
++const ProtobufCMessageDescriptor sr__schema_submodule__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SchemaSubmodule",
++ "SchemaSubmodule",
++ "Sr__SchemaSubmodule",
++ "sr",
++ sizeof(Sr__SchemaSubmodule),
++ 2,
++ sr__schema_submodule__field_descriptors,
++ sr__schema_submodule__field_indices_by_name,
++ 1, sr__schema_submodule__number_ranges,
++ (ProtobufCMessageInit) sr__schema_submodule__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__schema__field_descriptors[8] =
++{
++ {
++ "module_name",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Schema, module_name),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "ns",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Schema, ns),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "prefix",
++ 3,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Schema, prefix),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "installed",
++ 4,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_BOOL,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Schema, installed),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "implemented",
++ 5,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_BOOL,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Schema, implemented),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "revision",
++ 6,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Schema, revision),
++ &sr__schema_revision__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "submodules",
++ 7,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ offsetof(Sr__Schema, n_submodules),
++ offsetof(Sr__Schema, submodules),
++ &sr__schema_submodule__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "enabled_features",
++ 8,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_STRING,
++ offsetof(Sr__Schema, n_enabled_features),
++ offsetof(Sr__Schema, enabled_features),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__schema__field_indices_by_name[] = {
++ 7, /* field[7] = enabled_features */
++ 4, /* field[4] = implemented */
++ 3, /* field[3] = installed */
++ 0, /* field[0] = module_name */
++ 1, /* field[1] = ns */
++ 2, /* field[2] = prefix */
++ 5, /* field[5] = revision */
++ 6, /* field[6] = submodules */
++};
++static const ProtobufCIntRange sr__schema__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 8 }
++};
++const ProtobufCMessageDescriptor sr__schema__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.Schema",
++ "Schema",
++ "Sr__Schema",
++ "sr",
++ sizeof(Sr__Schema),
++ 8,
++ sr__schema__field_descriptors,
++ sr__schema__field_indices_by_name,
++ 1, sr__schema__number_ranges,
++ (ProtobufCMessageInit) sr__schema__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__list_schemas_req__field_descriptors NULL
++#define sr__list_schemas_req__field_indices_by_name NULL
++#define sr__list_schemas_req__number_ranges NULL
++const ProtobufCMessageDescriptor sr__list_schemas_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.ListSchemasReq",
++ "ListSchemasReq",
++ "Sr__ListSchemasReq",
++ "sr",
++ sizeof(Sr__ListSchemasReq),
++ 0,
++ sr__list_schemas_req__field_descriptors,
++ sr__list_schemas_req__field_indices_by_name,
++ 0, sr__list_schemas_req__number_ranges,
++ (ProtobufCMessageInit) sr__list_schemas_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__list_schemas_resp__field_descriptors[1] =
++{
++ {
++ "schemas",
++ 1,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ offsetof(Sr__ListSchemasResp, n_schemas),
++ offsetof(Sr__ListSchemasResp, schemas),
++ &sr__schema__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__list_schemas_resp__field_indices_by_name[] = {
++ 0, /* field[0] = schemas */
++};
++static const ProtobufCIntRange sr__list_schemas_resp__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__list_schemas_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.ListSchemasResp",
++ "ListSchemasResp",
++ "Sr__ListSchemasResp",
++ "sr",
++ sizeof(Sr__ListSchemasResp),
++ 1,
++ sr__list_schemas_resp__field_descriptors,
++ sr__list_schemas_resp__field_indices_by_name,
++ 1, sr__list_schemas_resp__number_ranges,
++ (ProtobufCMessageInit) sr__list_schemas_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__get_schema_req__field_descriptors[5] =
++{
++ {
++ "module_name",
++ 1,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetSchemaReq, module_name),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "revision",
++ 2,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetSchemaReq, revision),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "submodule_name",
++ 3,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetSchemaReq, submodule_name),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "submodule_revision",
++ 4,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetSchemaReq, submodule_revision),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "yang_format",
++ 5,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_BOOL,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetSchemaReq, yang_format),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__get_schema_req__field_indices_by_name[] = {
++ 0, /* field[0] = module_name */
++ 1, /* field[1] = revision */
++ 2, /* field[2] = submodule_name */
++ 3, /* field[3] = submodule_revision */
++ 4, /* field[4] = yang_format */
++};
++static const ProtobufCIntRange sr__get_schema_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 5 }
++};
++const ProtobufCMessageDescriptor sr__get_schema_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.GetSchemaReq",
++ "GetSchemaReq",
++ "Sr__GetSchemaReq",
++ "sr",
++ sizeof(Sr__GetSchemaReq),
++ 5,
++ sr__get_schema_req__field_descriptors,
++ sr__get_schema_req__field_indices_by_name,
++ 1, sr__get_schema_req__number_ranges,
++ (ProtobufCMessageInit) sr__get_schema_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__get_schema_resp__field_descriptors[1] =
++{
++ {
++ "schema_content",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetSchemaResp, schema_content),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__get_schema_resp__field_indices_by_name[] = {
++ 0, /* field[0] = schema_content */
++};
++static const ProtobufCIntRange sr__get_schema_resp__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__get_schema_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.GetSchemaResp",
++ "GetSchemaResp",
++ "Sr__GetSchemaResp",
++ "sr",
++ sizeof(Sr__GetSchemaResp),
++ 1,
++ sr__get_schema_resp__field_descriptors,
++ sr__get_schema_resp__field_indices_by_name,
++ 1, sr__get_schema_resp__number_ranges,
++ (ProtobufCMessageInit) sr__get_schema_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__get_item_req__field_descriptors[1] =
++{
++ {
++ "xpath",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetItemReq, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__get_item_req__field_indices_by_name[] = {
++ 0, /* field[0] = xpath */
++};
++static const ProtobufCIntRange sr__get_item_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__get_item_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.GetItemReq",
++ "GetItemReq",
++ "Sr__GetItemReq",
++ "sr",
++ sizeof(Sr__GetItemReq),
++ 1,
++ sr__get_item_req__field_descriptors,
++ sr__get_item_req__field_indices_by_name,
++ 1, sr__get_item_req__number_ranges,
++ (ProtobufCMessageInit) sr__get_item_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__get_item_resp__field_descriptors[1] =
++{
++ {
++ "value",
++ 1,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetItemResp, value),
++ &sr__value__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__get_item_resp__field_indices_by_name[] = {
++ 0, /* field[0] = value */
++};
++static const ProtobufCIntRange sr__get_item_resp__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__get_item_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.GetItemResp",
++ "GetItemResp",
++ "Sr__GetItemResp",
++ "sr",
++ sizeof(Sr__GetItemResp),
++ 1,
++ sr__get_item_resp__field_descriptors,
++ sr__get_item_resp__field_indices_by_name,
++ 1, sr__get_item_resp__number_ranges,
++ (ProtobufCMessageInit) sr__get_item_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__get_items_req__field_descriptors[3] =
++{
++ {
++ "xpath",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetItemsReq, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "limit",
++ 2,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_UINT32,
++ offsetof(Sr__GetItemsReq, has_limit),
++ offsetof(Sr__GetItemsReq, limit),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "offset",
++ 3,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_UINT32,
++ offsetof(Sr__GetItemsReq, has_offset),
++ offsetof(Sr__GetItemsReq, offset),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__get_items_req__field_indices_by_name[] = {
++ 1, /* field[1] = limit */
++ 2, /* field[2] = offset */
++ 0, /* field[0] = xpath */
++};
++static const ProtobufCIntRange sr__get_items_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 3 }
++};
++const ProtobufCMessageDescriptor sr__get_items_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.GetItemsReq",
++ "GetItemsReq",
++ "Sr__GetItemsReq",
++ "sr",
++ sizeof(Sr__GetItemsReq),
++ 3,
++ sr__get_items_req__field_descriptors,
++ sr__get_items_req__field_indices_by_name,
++ 1, sr__get_items_req__number_ranges,
++ (ProtobufCMessageInit) sr__get_items_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__get_items_resp__field_descriptors[1] =
++{
++ {
++ "values",
++ 1,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ offsetof(Sr__GetItemsResp, n_values),
++ offsetof(Sr__GetItemsResp, values),
++ &sr__value__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__get_items_resp__field_indices_by_name[] = {
++ 0, /* field[0] = values */
++};
++static const ProtobufCIntRange sr__get_items_resp__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__get_items_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.GetItemsResp",
++ "GetItemsResp",
++ "Sr__GetItemsResp",
++ "sr",
++ sizeof(Sr__GetItemsResp),
++ 1,
++ sr__get_items_resp__field_descriptors,
++ sr__get_items_resp__field_indices_by_name,
++ 1, sr__get_items_resp__number_ranges,
++ (ProtobufCMessageInit) sr__get_items_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__get_subtree_req__field_descriptors[1] =
++{
++ {
++ "xpath",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetSubtreeReq, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__get_subtree_req__field_indices_by_name[] = {
++ 0, /* field[0] = xpath */
++};
++static const ProtobufCIntRange sr__get_subtree_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__get_subtree_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.GetSubtreeReq",
++ "GetSubtreeReq",
++ "Sr__GetSubtreeReq",
++ "sr",
++ sizeof(Sr__GetSubtreeReq),
++ 1,
++ sr__get_subtree_req__field_descriptors,
++ sr__get_subtree_req__field_indices_by_name,
++ 1, sr__get_subtree_req__number_ranges,
++ (ProtobufCMessageInit) sr__get_subtree_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__get_subtree_resp__field_descriptors[1] =
++{
++ {
++ "tree",
++ 1,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetSubtreeResp, tree),
++ &sr__node__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__get_subtree_resp__field_indices_by_name[] = {
++ 0, /* field[0] = tree */
++};
++static const ProtobufCIntRange sr__get_subtree_resp__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__get_subtree_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.GetSubtreeResp",
++ "GetSubtreeResp",
++ "Sr__GetSubtreeResp",
++ "sr",
++ sizeof(Sr__GetSubtreeResp),
++ 1,
++ sr__get_subtree_resp__field_descriptors,
++ sr__get_subtree_resp__field_indices_by_name,
++ 1, sr__get_subtree_resp__number_ranges,
++ (ProtobufCMessageInit) sr__get_subtree_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__get_subtrees_req__field_descriptors[1] =
++{
++ {
++ "xpath",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetSubtreesReq, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__get_subtrees_req__field_indices_by_name[] = {
++ 0, /* field[0] = xpath */
++};
++static const ProtobufCIntRange sr__get_subtrees_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__get_subtrees_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.GetSubtreesReq",
++ "GetSubtreesReq",
++ "Sr__GetSubtreesReq",
++ "sr",
++ sizeof(Sr__GetSubtreesReq),
++ 1,
++ sr__get_subtrees_req__field_descriptors,
++ sr__get_subtrees_req__field_indices_by_name,
++ 1, sr__get_subtrees_req__number_ranges,
++ (ProtobufCMessageInit) sr__get_subtrees_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__get_subtrees_resp__field_descriptors[1] =
++{
++ {
++ "trees",
++ 1,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ offsetof(Sr__GetSubtreesResp, n_trees),
++ offsetof(Sr__GetSubtreesResp, trees),
++ &sr__node__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__get_subtrees_resp__field_indices_by_name[] = {
++ 0, /* field[0] = trees */
++};
++static const ProtobufCIntRange sr__get_subtrees_resp__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__get_subtrees_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.GetSubtreesResp",
++ "GetSubtreesResp",
++ "Sr__GetSubtreesResp",
++ "sr",
++ sizeof(Sr__GetSubtreesResp),
++ 1,
++ sr__get_subtrees_resp__field_descriptors,
++ sr__get_subtrees_resp__field_indices_by_name,
++ 1, sr__get_subtrees_resp__number_ranges,
++ (ProtobufCMessageInit) sr__get_subtrees_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__get_subtree_chunk_req__field_descriptors[6] =
++{
++ {
++ "xpath",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetSubtreeChunkReq, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "single",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_BOOL,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetSubtreeChunkReq, single),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "slice_offset",
++ 3,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetSubtreeChunkReq, slice_offset),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "slice_width",
++ 4,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetSubtreeChunkReq, slice_width),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "child_limit",
++ 5,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetSubtreeChunkReq, child_limit),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "depth_limit",
++ 6,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetSubtreeChunkReq, depth_limit),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__get_subtree_chunk_req__field_indices_by_name[] = {
++ 4, /* field[4] = child_limit */
++ 5, /* field[5] = depth_limit */
++ 1, /* field[1] = single */
++ 2, /* field[2] = slice_offset */
++ 3, /* field[3] = slice_width */
++ 0, /* field[0] = xpath */
++};
++static const ProtobufCIntRange sr__get_subtree_chunk_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 6 }
++};
++const ProtobufCMessageDescriptor sr__get_subtree_chunk_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.GetSubtreeChunkReq",
++ "GetSubtreeChunkReq",
++ "Sr__GetSubtreeChunkReq",
++ "sr",
++ sizeof(Sr__GetSubtreeChunkReq),
++ 6,
++ sr__get_subtree_chunk_req__field_descriptors,
++ sr__get_subtree_chunk_req__field_indices_by_name,
++ 1, sr__get_subtree_chunk_req__number_ranges,
++ (ProtobufCMessageInit) sr__get_subtree_chunk_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__get_subtree_chunk_resp__field_descriptors[2] =
++{
++ {
++ "xpath",
++ 1,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_STRING,
++ offsetof(Sr__GetSubtreeChunkResp, n_xpath),
++ offsetof(Sr__GetSubtreeChunkResp, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "chunk",
++ 2,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ offsetof(Sr__GetSubtreeChunkResp, n_chunk),
++ offsetof(Sr__GetSubtreeChunkResp, chunk),
++ &sr__node__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__get_subtree_chunk_resp__field_indices_by_name[] = {
++ 1, /* field[1] = chunk */
++ 0, /* field[0] = xpath */
++};
++static const ProtobufCIntRange sr__get_subtree_chunk_resp__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 2 }
++};
++const ProtobufCMessageDescriptor sr__get_subtree_chunk_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.GetSubtreeChunkResp",
++ "GetSubtreeChunkResp",
++ "Sr__GetSubtreeChunkResp",
++ "sr",
++ sizeof(Sr__GetSubtreeChunkResp),
++ 2,
++ sr__get_subtree_chunk_resp__field_descriptors,
++ sr__get_subtree_chunk_resp__field_indices_by_name,
++ 1, sr__get_subtree_chunk_resp__number_ranges,
++ (ProtobufCMessageInit) sr__get_subtree_chunk_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__set_item_req__field_descriptors[3] =
++{
++ {
++ "xpath",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SetItemReq, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "value",
++ 2,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SetItemReq, value),
++ &sr__value__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "options",
++ 3,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SetItemReq, options),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__set_item_req__field_indices_by_name[] = {
++ 2, /* field[2] = options */
++ 1, /* field[1] = value */
++ 0, /* field[0] = xpath */
++};
++static const ProtobufCIntRange sr__set_item_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 3 }
++};
++const ProtobufCMessageDescriptor sr__set_item_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SetItemReq",
++ "SetItemReq",
++ "Sr__SetItemReq",
++ "sr",
++ sizeof(Sr__SetItemReq),
++ 3,
++ sr__set_item_req__field_descriptors,
++ sr__set_item_req__field_indices_by_name,
++ 1, sr__set_item_req__number_ranges,
++ (ProtobufCMessageInit) sr__set_item_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__set_item_resp__field_descriptors NULL
++#define sr__set_item_resp__field_indices_by_name NULL
++#define sr__set_item_resp__number_ranges NULL
++const ProtobufCMessageDescriptor sr__set_item_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SetItemResp",
++ "SetItemResp",
++ "Sr__SetItemResp",
++ "sr",
++ sizeof(Sr__SetItemResp),
++ 0,
++ sr__set_item_resp__field_descriptors,
++ sr__set_item_resp__field_indices_by_name,
++ 0, sr__set_item_resp__number_ranges,
++ (ProtobufCMessageInit) sr__set_item_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__set_item_str_req__field_descriptors[3] =
++{
++ {
++ "xpath",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SetItemStrReq, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "value",
++ 2,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SetItemStrReq, value),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "options",
++ 3,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SetItemStrReq, options),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__set_item_str_req__field_indices_by_name[] = {
++ 2, /* field[2] = options */
++ 1, /* field[1] = value */
++ 0, /* field[0] = xpath */
++};
++static const ProtobufCIntRange sr__set_item_str_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 3 }
++};
++const ProtobufCMessageDescriptor sr__set_item_str_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SetItemStrReq",
++ "SetItemStrReq",
++ "Sr__SetItemStrReq",
++ "sr",
++ sizeof(Sr__SetItemStrReq),
++ 3,
++ sr__set_item_str_req__field_descriptors,
++ sr__set_item_str_req__field_indices_by_name,
++ 1, sr__set_item_str_req__number_ranges,
++ (ProtobufCMessageInit) sr__set_item_str_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__set_item_str_resp__field_descriptors NULL
++#define sr__set_item_str_resp__field_indices_by_name NULL
++#define sr__set_item_str_resp__number_ranges NULL
++const ProtobufCMessageDescriptor sr__set_item_str_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SetItemStrResp",
++ "SetItemStrResp",
++ "Sr__SetItemStrResp",
++ "sr",
++ sizeof(Sr__SetItemStrResp),
++ 0,
++ sr__set_item_str_resp__field_descriptors,
++ sr__set_item_str_resp__field_indices_by_name,
++ 0, sr__set_item_str_resp__number_ranges,
++ (ProtobufCMessageInit) sr__set_item_str_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__delete_item_req__field_descriptors[2] =
++{
++ {
++ "xpath",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__DeleteItemReq, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "options",
++ 3,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__DeleteItemReq, options),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__delete_item_req__field_indices_by_name[] = {
++ 1, /* field[1] = options */
++ 0, /* field[0] = xpath */
++};
++static const ProtobufCIntRange sr__delete_item_req__number_ranges[2 + 1] =
++{
++ { 1, 0 },
++ { 3, 1 },
++ { 0, 2 }
++};
++const ProtobufCMessageDescriptor sr__delete_item_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.DeleteItemReq",
++ "DeleteItemReq",
++ "Sr__DeleteItemReq",
++ "sr",
++ sizeof(Sr__DeleteItemReq),
++ 2,
++ sr__delete_item_req__field_descriptors,
++ sr__delete_item_req__field_indices_by_name,
++ 2, sr__delete_item_req__number_ranges,
++ (ProtobufCMessageInit) sr__delete_item_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__delete_item_resp__field_descriptors NULL
++#define sr__delete_item_resp__field_indices_by_name NULL
++#define sr__delete_item_resp__number_ranges NULL
++const ProtobufCMessageDescriptor sr__delete_item_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.DeleteItemResp",
++ "DeleteItemResp",
++ "Sr__DeleteItemResp",
++ "sr",
++ sizeof(Sr__DeleteItemResp),
++ 0,
++ sr__delete_item_resp__field_descriptors,
++ sr__delete_item_resp__field_indices_by_name,
++ 0, sr__delete_item_resp__number_ranges,
++ (ProtobufCMessageInit) sr__delete_item_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCEnumValue sr__move_item_req__move_position__enum_values_by_number[4] =
++{
++ { "BEFORE", "SR__MOVE_ITEM_REQ__MOVE_POSITION__BEFORE", 1 },
++ { "AFTER", "SR__MOVE_ITEM_REQ__MOVE_POSITION__AFTER", 2 },
++ { "FIRST", "SR__MOVE_ITEM_REQ__MOVE_POSITION__FIRST", 3 },
++ { "LAST", "SR__MOVE_ITEM_REQ__MOVE_POSITION__LAST", 4 },
++};
++static const ProtobufCIntRange sr__move_item_req__move_position__value_ranges[] = {
++{1, 0},{0, 4}
++};
++static const ProtobufCEnumValueIndex sr__move_item_req__move_position__enum_values_by_name[4] =
++{
++ { "AFTER", 1 },
++ { "BEFORE", 0 },
++ { "FIRST", 2 },
++ { "LAST", 3 },
++};
++const ProtobufCEnumDescriptor sr__move_item_req__move_position__descriptor =
++{
++ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
++ "sr.MoveItemReq.MovePosition",
++ "MovePosition",
++ "Sr__MoveItemReq__MovePosition",
++ "sr",
++ 4,
++ sr__move_item_req__move_position__enum_values_by_number,
++ 4,
++ sr__move_item_req__move_position__enum_values_by_name,
++ 1,
++ sr__move_item_req__move_position__value_ranges,
++ NULL,NULL,NULL,NULL /* reserved[1234] */
++};
++static const ProtobufCFieldDescriptor sr__move_item_req__field_descriptors[3] =
++{
++ {
++ "xpath",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__MoveItemReq, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "position",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__MoveItemReq, position),
++ &sr__move_item_req__move_position__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "relative_item",
++ 3,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__MoveItemReq, relative_item),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__move_item_req__field_indices_by_name[] = {
++ 1, /* field[1] = position */
++ 2, /* field[2] = relative_item */
++ 0, /* field[0] = xpath */
++};
++static const ProtobufCIntRange sr__move_item_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 3 }
++};
++const ProtobufCMessageDescriptor sr__move_item_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.MoveItemReq",
++ "MoveItemReq",
++ "Sr__MoveItemReq",
++ "sr",
++ sizeof(Sr__MoveItemReq),
++ 3,
++ sr__move_item_req__field_descriptors,
++ sr__move_item_req__field_indices_by_name,
++ 1, sr__move_item_req__number_ranges,
++ (ProtobufCMessageInit) sr__move_item_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__move_item_resp__field_descriptors NULL
++#define sr__move_item_resp__field_indices_by_name NULL
++#define sr__move_item_resp__number_ranges NULL
++const ProtobufCMessageDescriptor sr__move_item_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.MoveItemResp",
++ "MoveItemResp",
++ "Sr__MoveItemResp",
++ "sr",
++ sizeof(Sr__MoveItemResp),
++ 0,
++ sr__move_item_resp__field_descriptors,
++ sr__move_item_resp__field_indices_by_name,
++ 0, sr__move_item_resp__number_ranges,
++ (ProtobufCMessageInit) sr__move_item_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__validate_req__field_descriptors NULL
++#define sr__validate_req__field_indices_by_name NULL
++#define sr__validate_req__number_ranges NULL
++const ProtobufCMessageDescriptor sr__validate_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.ValidateReq",
++ "ValidateReq",
++ "Sr__ValidateReq",
++ "sr",
++ sizeof(Sr__ValidateReq),
++ 0,
++ sr__validate_req__field_descriptors,
++ sr__validate_req__field_indices_by_name,
++ 0, sr__validate_req__number_ranges,
++ (ProtobufCMessageInit) sr__validate_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__validate_resp__field_descriptors[1] =
++{
++ {
++ "errors",
++ 1,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ offsetof(Sr__ValidateResp, n_errors),
++ offsetof(Sr__ValidateResp, errors),
++ &sr__error__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__validate_resp__field_indices_by_name[] = {
++ 0, /* field[0] = errors */
++};
++static const ProtobufCIntRange sr__validate_resp__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__validate_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.ValidateResp",
++ "ValidateResp",
++ "Sr__ValidateResp",
++ "sr",
++ sizeof(Sr__ValidateResp),
++ 1,
++ sr__validate_resp__field_descriptors,
++ sr__validate_resp__field_indices_by_name,
++ 1, sr__validate_resp__number_ranges,
++ (ProtobufCMessageInit) sr__validate_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__commit_req__field_descriptors NULL
++#define sr__commit_req__field_indices_by_name NULL
++#define sr__commit_req__number_ranges NULL
++const ProtobufCMessageDescriptor sr__commit_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.CommitReq",
++ "CommitReq",
++ "Sr__CommitReq",
++ "sr",
++ sizeof(Sr__CommitReq),
++ 0,
++ sr__commit_req__field_descriptors,
++ sr__commit_req__field_indices_by_name,
++ 0, sr__commit_req__number_ranges,
++ (ProtobufCMessageInit) sr__commit_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__commit_resp__field_descriptors[1] =
++{
++ {
++ "errors",
++ 1,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ offsetof(Sr__CommitResp, n_errors),
++ offsetof(Sr__CommitResp, errors),
++ &sr__error__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__commit_resp__field_indices_by_name[] = {
++ 0, /* field[0] = errors */
++};
++static const ProtobufCIntRange sr__commit_resp__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__commit_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.CommitResp",
++ "CommitResp",
++ "Sr__CommitResp",
++ "sr",
++ sizeof(Sr__CommitResp),
++ 1,
++ sr__commit_resp__field_descriptors,
++ sr__commit_resp__field_indices_by_name,
++ 1, sr__commit_resp__number_ranges,
++ (ProtobufCMessageInit) sr__commit_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__discard_changes_req__field_descriptors NULL
++#define sr__discard_changes_req__field_indices_by_name NULL
++#define sr__discard_changes_req__number_ranges NULL
++const ProtobufCMessageDescriptor sr__discard_changes_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.DiscardChangesReq",
++ "DiscardChangesReq",
++ "Sr__DiscardChangesReq",
++ "sr",
++ sizeof(Sr__DiscardChangesReq),
++ 0,
++ sr__discard_changes_req__field_descriptors,
++ sr__discard_changes_req__field_indices_by_name,
++ 0, sr__discard_changes_req__number_ranges,
++ (ProtobufCMessageInit) sr__discard_changes_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__discard_changes_resp__field_descriptors NULL
++#define sr__discard_changes_resp__field_indices_by_name NULL
++#define sr__discard_changes_resp__number_ranges NULL
++const ProtobufCMessageDescriptor sr__discard_changes_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.DiscardChangesResp",
++ "DiscardChangesResp",
++ "Sr__DiscardChangesResp",
++ "sr",
++ sizeof(Sr__DiscardChangesResp),
++ 0,
++ sr__discard_changes_resp__field_descriptors,
++ sr__discard_changes_resp__field_indices_by_name,
++ 0, sr__discard_changes_resp__number_ranges,
++ (ProtobufCMessageInit) sr__discard_changes_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__copy_config_req__field_descriptors[3] =
++{
++ {
++ "src_datastore",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__CopyConfigReq, src_datastore),
++ &sr__data_store__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "dst_datastore",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__CopyConfigReq, dst_datastore),
++ &sr__data_store__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "module_name",
++ 3,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__CopyConfigReq, module_name),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__copy_config_req__field_indices_by_name[] = {
++ 1, /* field[1] = dst_datastore */
++ 2, /* field[2] = module_name */
++ 0, /* field[0] = src_datastore */
++};
++static const ProtobufCIntRange sr__copy_config_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 3 }
++};
++const ProtobufCMessageDescriptor sr__copy_config_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.CopyConfigReq",
++ "CopyConfigReq",
++ "Sr__CopyConfigReq",
++ "sr",
++ sizeof(Sr__CopyConfigReq),
++ 3,
++ sr__copy_config_req__field_descriptors,
++ sr__copy_config_req__field_indices_by_name,
++ 1, sr__copy_config_req__number_ranges,
++ (ProtobufCMessageInit) sr__copy_config_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__copy_config_resp__field_descriptors[1] =
++{
++ {
++ "errors",
++ 1,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ offsetof(Sr__CopyConfigResp, n_errors),
++ offsetof(Sr__CopyConfigResp, errors),
++ &sr__error__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__copy_config_resp__field_indices_by_name[] = {
++ 0, /* field[0] = errors */
++};
++static const ProtobufCIntRange sr__copy_config_resp__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__copy_config_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.CopyConfigResp",
++ "CopyConfigResp",
++ "Sr__CopyConfigResp",
++ "sr",
++ sizeof(Sr__CopyConfigResp),
++ 1,
++ sr__copy_config_resp__field_descriptors,
++ sr__copy_config_resp__field_indices_by_name,
++ 1, sr__copy_config_resp__number_ranges,
++ (ProtobufCMessageInit) sr__copy_config_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__lock_req__field_descriptors[1] =
++{
++ {
++ "module_name",
++ 1,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__LockReq, module_name),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__lock_req__field_indices_by_name[] = {
++ 0, /* field[0] = module_name */
++};
++static const ProtobufCIntRange sr__lock_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__lock_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.LockReq",
++ "LockReq",
++ "Sr__LockReq",
++ "sr",
++ sizeof(Sr__LockReq),
++ 1,
++ sr__lock_req__field_descriptors,
++ sr__lock_req__field_indices_by_name,
++ 1, sr__lock_req__number_ranges,
++ (ProtobufCMessageInit) sr__lock_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__lock_resp__field_descriptors NULL
++#define sr__lock_resp__field_indices_by_name NULL
++#define sr__lock_resp__number_ranges NULL
++const ProtobufCMessageDescriptor sr__lock_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.LockResp",
++ "LockResp",
++ "Sr__LockResp",
++ "sr",
++ sizeof(Sr__LockResp),
++ 0,
++ sr__lock_resp__field_descriptors,
++ sr__lock_resp__field_indices_by_name,
++ 0, sr__lock_resp__number_ranges,
++ (ProtobufCMessageInit) sr__lock_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__unlock_req__field_descriptors[1] =
++{
++ {
++ "module_name",
++ 1,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__UnlockReq, module_name),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__unlock_req__field_indices_by_name[] = {
++ 0, /* field[0] = module_name */
++};
++static const ProtobufCIntRange sr__unlock_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__unlock_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.UnlockReq",
++ "UnlockReq",
++ "Sr__UnlockReq",
++ "sr",
++ sizeof(Sr__UnlockReq),
++ 1,
++ sr__unlock_req__field_descriptors,
++ sr__unlock_req__field_indices_by_name,
++ 1, sr__unlock_req__number_ranges,
++ (ProtobufCMessageInit) sr__unlock_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__unlock_resp__field_descriptors NULL
++#define sr__unlock_resp__field_indices_by_name NULL
++#define sr__unlock_resp__number_ranges NULL
++const ProtobufCMessageDescriptor sr__unlock_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.UnlockResp",
++ "UnlockResp",
++ "Sr__UnlockResp",
++ "sr",
++ sizeof(Sr__UnlockResp),
++ 0,
++ sr__unlock_resp__field_descriptors,
++ sr__unlock_resp__field_indices_by_name,
++ 0, sr__unlock_resp__number_ranges,
++ (ProtobufCMessageInit) sr__unlock_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__subscribe_req__field_descriptors[10] =
++{
++ {
++ "type",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SubscribeReq, type),
++ &sr__subscription_type__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "destination",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SubscribeReq, destination),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "subscription_id",
++ 3,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SubscribeReq, subscription_id),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "module_name",
++ 4,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SubscribeReq, module_name),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "xpath",
++ 5,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SubscribeReq, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "notif_event",
++ 10,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_ENUM,
++ offsetof(Sr__SubscribeReq, has_notif_event),
++ offsetof(Sr__SubscribeReq, notif_event),
++ &sr__notification_event__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "priority",
++ 11,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_UINT32,
++ offsetof(Sr__SubscribeReq, has_priority),
++ offsetof(Sr__SubscribeReq, priority),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "enable_running",
++ 12,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_BOOL,
++ offsetof(Sr__SubscribeReq, has_enable_running),
++ offsetof(Sr__SubscribeReq, enable_running),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "enable_event",
++ 13,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_BOOL,
++ offsetof(Sr__SubscribeReq, has_enable_event),
++ offsetof(Sr__SubscribeReq, enable_event),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "api_variant",
++ 20,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SubscribeReq, api_variant),
++ &sr__api_variant__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__subscribe_req__field_indices_by_name[] = {
++ 9, /* field[9] = api_variant */
++ 1, /* field[1] = destination */
++ 8, /* field[8] = enable_event */
++ 7, /* field[7] = enable_running */
++ 3, /* field[3] = module_name */
++ 5, /* field[5] = notif_event */
++ 6, /* field[6] = priority */
++ 2, /* field[2] = subscription_id */
++ 0, /* field[0] = type */
++ 4, /* field[4] = xpath */
++};
++static const ProtobufCIntRange sr__subscribe_req__number_ranges[3 + 1] =
++{
++ { 1, 0 },
++ { 10, 5 },
++ { 20, 9 },
++ { 0, 10 }
++};
++const ProtobufCMessageDescriptor sr__subscribe_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SubscribeReq",
++ "SubscribeReq",
++ "Sr__SubscribeReq",
++ "sr",
++ sizeof(Sr__SubscribeReq),
++ 10,
++ sr__subscribe_req__field_descriptors,
++ sr__subscribe_req__field_indices_by_name,
++ 3, sr__subscribe_req__number_ranges,
++ (ProtobufCMessageInit) sr__subscribe_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__subscribe_resp__field_descriptors NULL
++#define sr__subscribe_resp__field_indices_by_name NULL
++#define sr__subscribe_resp__number_ranges NULL
++const ProtobufCMessageDescriptor sr__subscribe_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SubscribeResp",
++ "SubscribeResp",
++ "Sr__SubscribeResp",
++ "sr",
++ sizeof(Sr__SubscribeResp),
++ 0,
++ sr__subscribe_resp__field_descriptors,
++ sr__subscribe_resp__field_indices_by_name,
++ 0, sr__subscribe_resp__number_ranges,
++ (ProtobufCMessageInit) sr__subscribe_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__unsubscribe_req__field_descriptors[4] =
++{
++ {
++ "type",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__UnsubscribeReq, type),
++ &sr__subscription_type__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "destination",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__UnsubscribeReq, destination),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "subscription_id",
++ 3,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__UnsubscribeReq, subscription_id),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "module_name",
++ 4,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__UnsubscribeReq, module_name),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__unsubscribe_req__field_indices_by_name[] = {
++ 1, /* field[1] = destination */
++ 3, /* field[3] = module_name */
++ 2, /* field[2] = subscription_id */
++ 0, /* field[0] = type */
++};
++static const ProtobufCIntRange sr__unsubscribe_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 4 }
++};
++const ProtobufCMessageDescriptor sr__unsubscribe_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.UnsubscribeReq",
++ "UnsubscribeReq",
++ "Sr__UnsubscribeReq",
++ "sr",
++ sizeof(Sr__UnsubscribeReq),
++ 4,
++ sr__unsubscribe_req__field_descriptors,
++ sr__unsubscribe_req__field_indices_by_name,
++ 1, sr__unsubscribe_req__number_ranges,
++ (ProtobufCMessageInit) sr__unsubscribe_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__unsubscribe_resp__field_descriptors NULL
++#define sr__unsubscribe_resp__field_indices_by_name NULL
++#define sr__unsubscribe_resp__number_ranges NULL
++const ProtobufCMessageDescriptor sr__unsubscribe_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.UnsubscribeResp",
++ "UnsubscribeResp",
++ "Sr__UnsubscribeResp",
++ "sr",
++ sizeof(Sr__UnsubscribeResp),
++ 0,
++ sr__unsubscribe_resp__field_descriptors,
++ sr__unsubscribe_resp__field_indices_by_name,
++ 0, sr__unsubscribe_resp__number_ranges,
++ (ProtobufCMessageInit) sr__unsubscribe_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__check_enabled_running_req__field_descriptors[1] =
++{
++ {
++ "module_name",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__CheckEnabledRunningReq, module_name),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__check_enabled_running_req__field_indices_by_name[] = {
++ 0, /* field[0] = module_name */
++};
++static const ProtobufCIntRange sr__check_enabled_running_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__check_enabled_running_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.CheckEnabledRunningReq",
++ "CheckEnabledRunningReq",
++ "Sr__CheckEnabledRunningReq",
++ "sr",
++ sizeof(Sr__CheckEnabledRunningReq),
++ 1,
++ sr__check_enabled_running_req__field_descriptors,
++ sr__check_enabled_running_req__field_indices_by_name,
++ 1, sr__check_enabled_running_req__number_ranges,
++ (ProtobufCMessageInit) sr__check_enabled_running_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__check_enabled_running_resp__field_descriptors[1] =
++{
++ {
++ "enabled",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_BOOL,
++ 0, /* quantifier_offset */
++ offsetof(Sr__CheckEnabledRunningResp, enabled),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__check_enabled_running_resp__field_indices_by_name[] = {
++ 0, /* field[0] = enabled */
++};
++static const ProtobufCIntRange sr__check_enabled_running_resp__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__check_enabled_running_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.CheckEnabledRunningResp",
++ "CheckEnabledRunningResp",
++ "Sr__CheckEnabledRunningResp",
++ "sr",
++ sizeof(Sr__CheckEnabledRunningResp),
++ 1,
++ sr__check_enabled_running_resp__field_descriptors,
++ sr__check_enabled_running_resp__field_indices_by_name,
++ 1, sr__check_enabled_running_resp__number_ranges,
++ (ProtobufCMessageInit) sr__check_enabled_running_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__module_install_notification__field_descriptors[3] =
++{
++ {
++ "module_name",
++ 1,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__ModuleInstallNotification, module_name),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "revision",
++ 2,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__ModuleInstallNotification, revision),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "state",
++ 3,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__ModuleInstallNotification, state),
++ &sr__module_state__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__module_install_notification__field_indices_by_name[] = {
++ 0, /* field[0] = module_name */
++ 1, /* field[1] = revision */
++ 2, /* field[2] = state */
++};
++static const ProtobufCIntRange sr__module_install_notification__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 3 }
++};
++const ProtobufCMessageDescriptor sr__module_install_notification__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.ModuleInstallNotification",
++ "ModuleInstallNotification",
++ "Sr__ModuleInstallNotification",
++ "sr",
++ sizeof(Sr__ModuleInstallNotification),
++ 3,
++ sr__module_install_notification__field_descriptors,
++ sr__module_install_notification__field_indices_by_name,
++ 1, sr__module_install_notification__number_ranges,
++ (ProtobufCMessageInit) sr__module_install_notification__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__feature_enable_notification__field_descriptors[3] =
++{
++ {
++ "module_name",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__FeatureEnableNotification, module_name),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "feature_name",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__FeatureEnableNotification, feature_name),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "enabled",
++ 3,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_BOOL,
++ 0, /* quantifier_offset */
++ offsetof(Sr__FeatureEnableNotification, enabled),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__feature_enable_notification__field_indices_by_name[] = {
++ 2, /* field[2] = enabled */
++ 1, /* field[1] = feature_name */
++ 0, /* field[0] = module_name */
++};
++static const ProtobufCIntRange sr__feature_enable_notification__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 3 }
++};
++const ProtobufCMessageDescriptor sr__feature_enable_notification__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.FeatureEnableNotification",
++ "FeatureEnableNotification",
++ "Sr__FeatureEnableNotification",
++ "sr",
++ sizeof(Sr__FeatureEnableNotification),
++ 3,
++ sr__feature_enable_notification__field_descriptors,
++ sr__feature_enable_notification__field_indices_by_name,
++ 1, sr__feature_enable_notification__number_ranges,
++ (ProtobufCMessageInit) sr__feature_enable_notification__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__module_change_notification__field_descriptors[2] =
++{
++ {
++ "event",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__ModuleChangeNotification, event),
++ &sr__notification_event__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "module_name",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__ModuleChangeNotification, module_name),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__module_change_notification__field_indices_by_name[] = {
++ 0, /* field[0] = event */
++ 1, /* field[1] = module_name */
++};
++static const ProtobufCIntRange sr__module_change_notification__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 2 }
++};
++const ProtobufCMessageDescriptor sr__module_change_notification__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.ModuleChangeNotification",
++ "ModuleChangeNotification",
++ "Sr__ModuleChangeNotification",
++ "sr",
++ sizeof(Sr__ModuleChangeNotification),
++ 2,
++ sr__module_change_notification__field_descriptors,
++ sr__module_change_notification__field_indices_by_name,
++ 1, sr__module_change_notification__number_ranges,
++ (ProtobufCMessageInit) sr__module_change_notification__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__subtree_change_notification__field_descriptors[2] =
++{
++ {
++ "event",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SubtreeChangeNotification, event),
++ &sr__notification_event__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "xpath",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SubtreeChangeNotification, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__subtree_change_notification__field_indices_by_name[] = {
++ 0, /* field[0] = event */
++ 1, /* field[1] = xpath */
++};
++static const ProtobufCIntRange sr__subtree_change_notification__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 2 }
++};
++const ProtobufCMessageDescriptor sr__subtree_change_notification__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SubtreeChangeNotification",
++ "SubtreeChangeNotification",
++ "Sr__SubtreeChangeNotification",
++ "sr",
++ sizeof(Sr__SubtreeChangeNotification),
++ 2,
++ sr__subtree_change_notification__field_descriptors,
++ sr__subtree_change_notification__field_indices_by_name,
++ 1, sr__subtree_change_notification__number_ranges,
++ (ProtobufCMessageInit) sr__subtree_change_notification__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__change__field_descriptors[3] =
++{
++ {
++ "changeOperation",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Change, changeoperation),
++ &sr__change_operation__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "new_value",
++ 2,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Change, new_value),
++ &sr__value__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "old_value",
++ 3,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Change, old_value),
++ &sr__value__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__change__field_indices_by_name[] = {
++ 0, /* field[0] = changeOperation */
++ 1, /* field[1] = new_value */
++ 2, /* field[2] = old_value */
++};
++static const ProtobufCIntRange sr__change__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 3 }
++};
++const ProtobufCMessageDescriptor sr__change__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.Change",
++ "Change",
++ "Sr__Change",
++ "sr",
++ sizeof(Sr__Change),
++ 3,
++ sr__change__field_descriptors,
++ sr__change__field_indices_by_name,
++ 1, sr__change__number_ranges,
++ (ProtobufCMessageInit) sr__change__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__get_changes_req__field_descriptors[3] =
++{
++ {
++ "xpath",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetChangesReq, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "limit",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetChangesReq, limit),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "offset",
++ 3,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetChangesReq, offset),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__get_changes_req__field_indices_by_name[] = {
++ 1, /* field[1] = limit */
++ 2, /* field[2] = offset */
++ 0, /* field[0] = xpath */
++};
++static const ProtobufCIntRange sr__get_changes_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 3 }
++};
++const ProtobufCMessageDescriptor sr__get_changes_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.GetChangesReq",
++ "GetChangesReq",
++ "Sr__GetChangesReq",
++ "sr",
++ sizeof(Sr__GetChangesReq),
++ 3,
++ sr__get_changes_req__field_descriptors,
++ sr__get_changes_req__field_indices_by_name,
++ 1, sr__get_changes_req__number_ranges,
++ (ProtobufCMessageInit) sr__get_changes_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__get_changes_resp__field_descriptors[1] =
++{
++ {
++ "changes",
++ 1,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ offsetof(Sr__GetChangesResp, n_changes),
++ offsetof(Sr__GetChangesResp, changes),
++ &sr__change__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__get_changes_resp__field_indices_by_name[] = {
++ 0, /* field[0] = changes */
++};
++static const ProtobufCIntRange sr__get_changes_resp__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__get_changes_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.GetChangesResp",
++ "GetChangesResp",
++ "Sr__GetChangesResp",
++ "sr",
++ sizeof(Sr__GetChangesResp),
++ 1,
++ sr__get_changes_resp__field_descriptors,
++ sr__get_changes_resp__field_indices_by_name,
++ 1, sr__get_changes_resp__number_ranges,
++ (ProtobufCMessageInit) sr__get_changes_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__check_exec_perm_req__field_descriptors[1] =
++{
++ {
++ "xpath",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__CheckExecPermReq, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__check_exec_perm_req__field_indices_by_name[] = {
++ 0, /* field[0] = xpath */
++};
++static const ProtobufCIntRange sr__check_exec_perm_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__check_exec_perm_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.CheckExecPermReq",
++ "CheckExecPermReq",
++ "Sr__CheckExecPermReq",
++ "sr",
++ sizeof(Sr__CheckExecPermReq),
++ 1,
++ sr__check_exec_perm_req__field_descriptors,
++ sr__check_exec_perm_req__field_indices_by_name,
++ 1, sr__check_exec_perm_req__number_ranges,
++ (ProtobufCMessageInit) sr__check_exec_perm_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__check_exec_perm_resp__field_descriptors[1] =
++{
++ {
++ "permitted",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_BOOL,
++ 0, /* quantifier_offset */
++ offsetof(Sr__CheckExecPermResp, permitted),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__check_exec_perm_resp__field_indices_by_name[] = {
++ 0, /* field[0] = permitted */
++};
++static const ProtobufCIntRange sr__check_exec_perm_resp__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__check_exec_perm_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.CheckExecPermResp",
++ "CheckExecPermResp",
++ "Sr__CheckExecPermResp",
++ "sr",
++ sizeof(Sr__CheckExecPermResp),
++ 1,
++ sr__check_exec_perm_resp__field_descriptors,
++ sr__check_exec_perm_resp__field_indices_by_name,
++ 1, sr__check_exec_perm_resp__number_ranges,
++ (ProtobufCMessageInit) sr__check_exec_perm_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__rpcreq__field_descriptors[7] =
++{
++ {
++ "action",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_BOOL,
++ 0, /* quantifier_offset */
++ offsetof(Sr__RPCReq, action),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "xpath",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__RPCReq, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "orig_api_variant",
++ 3,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__RPCReq, orig_api_variant),
++ &sr__api_variant__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "input",
++ 4,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ offsetof(Sr__RPCReq, n_input),
++ offsetof(Sr__RPCReq, input),
++ &sr__value__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "input_tree",
++ 5,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ offsetof(Sr__RPCReq, n_input_tree),
++ offsetof(Sr__RPCReq, input_tree),
++ &sr__node__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "subscriber_address",
++ 10,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__RPCReq, subscriber_address),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "subscription_id",
++ 11,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_UINT32,
++ offsetof(Sr__RPCReq, has_subscription_id),
++ offsetof(Sr__RPCReq, subscription_id),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__rpcreq__field_indices_by_name[] = {
++ 0, /* field[0] = action */
++ 3, /* field[3] = input */
++ 4, /* field[4] = input_tree */
++ 2, /* field[2] = orig_api_variant */
++ 5, /* field[5] = subscriber_address */
++ 6, /* field[6] = subscription_id */
++ 1, /* field[1] = xpath */
++};
++static const ProtobufCIntRange sr__rpcreq__number_ranges[2 + 1] =
++{
++ { 1, 0 },
++ { 10, 5 },
++ { 0, 7 }
++};
++const ProtobufCMessageDescriptor sr__rpcreq__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.RPCReq",
++ "RPCReq",
++ "Sr__RPCReq",
++ "sr",
++ sizeof(Sr__RPCReq),
++ 7,
++ sr__rpcreq__field_descriptors,
++ sr__rpcreq__field_indices_by_name,
++ 2, sr__rpcreq__number_ranges,
++ (ProtobufCMessageInit) sr__rpcreq__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__rpcresp__field_descriptors[5] =
++{
++ {
++ "action",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_BOOL,
++ 0, /* quantifier_offset */
++ offsetof(Sr__RPCResp, action),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "xpath",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__RPCResp, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "orig_api_variant",
++ 3,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__RPCResp, orig_api_variant),
++ &sr__api_variant__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "output",
++ 4,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ offsetof(Sr__RPCResp, n_output),
++ offsetof(Sr__RPCResp, output),
++ &sr__value__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "output_tree",
++ 5,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ offsetof(Sr__RPCResp, n_output_tree),
++ offsetof(Sr__RPCResp, output_tree),
++ &sr__node__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__rpcresp__field_indices_by_name[] = {
++ 0, /* field[0] = action */
++ 2, /* field[2] = orig_api_variant */
++ 3, /* field[3] = output */
++ 4, /* field[4] = output_tree */
++ 1, /* field[1] = xpath */
++};
++static const ProtobufCIntRange sr__rpcresp__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 5 }
++};
++const ProtobufCMessageDescriptor sr__rpcresp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.RPCResp",
++ "RPCResp",
++ "Sr__RPCResp",
++ "sr",
++ sizeof(Sr__RPCResp),
++ 5,
++ sr__rpcresp__field_descriptors,
++ sr__rpcresp__field_indices_by_name,
++ 1, sr__rpcresp__number_ranges,
++ (ProtobufCMessageInit) sr__rpcresp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCEnumValue sr__event_notif_req__notif_type__enum_values_by_number[4] =
++{
++ { "REALTIME", "SR__EVENT_NOTIF_REQ__NOTIF_TYPE__REALTIME", 1 },
++ { "REPLAY", "SR__EVENT_NOTIF_REQ__NOTIF_TYPE__REPLAY", 2 },
++ { "REPLAY_COMPLETE", "SR__EVENT_NOTIF_REQ__NOTIF_TYPE__REPLAY_COMPLETE", 3 },
++ { "REPLAY_STOP", "SR__EVENT_NOTIF_REQ__NOTIF_TYPE__REPLAY_STOP", 4 },
++};
++static const ProtobufCIntRange sr__event_notif_req__notif_type__value_ranges[] = {
++{1, 0},{0, 4}
++};
++static const ProtobufCEnumValueIndex sr__event_notif_req__notif_type__enum_values_by_name[4] =
++{
++ { "REALTIME", 0 },
++ { "REPLAY", 1 },
++ { "REPLAY_COMPLETE", 2 },
++ { "REPLAY_STOP", 3 },
++};
++const ProtobufCEnumDescriptor sr__event_notif_req__notif_type__descriptor =
++{
++ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
++ "sr.EventNotifReq.NotifType",
++ "NotifType",
++ "Sr__EventNotifReq__NotifType",
++ "sr",
++ 4,
++ sr__event_notif_req__notif_type__enum_values_by_number,
++ 4,
++ sr__event_notif_req__notif_type__enum_values_by_name,
++ 1,
++ sr__event_notif_req__notif_type__value_ranges,
++ NULL,NULL,NULL,NULL /* reserved[1234] */
++};
++static const ProtobufCEnumValue sr__event_notif_req__notif_flags__enum_values_by_number[2] =
++{
++ { "DEFAULT", "SR__EVENT_NOTIF_REQ__NOTIF_FLAGS__DEFAULT", 0 },
++ { "EPHEMERAL", "SR__EVENT_NOTIF_REQ__NOTIF_FLAGS__EPHEMERAL", 1 },
++};
++static const ProtobufCIntRange sr__event_notif_req__notif_flags__value_ranges[] = {
++{0, 0},{0, 2}
++};
++static const ProtobufCEnumValueIndex sr__event_notif_req__notif_flags__enum_values_by_name[2] =
++{
++ { "DEFAULT", 0 },
++ { "EPHEMERAL", 1 },
++};
++const ProtobufCEnumDescriptor sr__event_notif_req__notif_flags__descriptor =
++{
++ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
++ "sr.EventNotifReq.NotifFlags",
++ "NotifFlags",
++ "Sr__EventNotifReq__NotifFlags",
++ "sr",
++ 2,
++ sr__event_notif_req__notif_flags__enum_values_by_number,
++ 2,
++ sr__event_notif_req__notif_flags__enum_values_by_name,
++ 1,
++ sr__event_notif_req__notif_flags__value_ranges,
++ NULL,NULL,NULL,NULL /* reserved[1234] */
++};
++static const ProtobufCFieldDescriptor sr__event_notif_req__field_descriptors[9] =
++{
++ {
++ "type",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__EventNotifReq, type),
++ &sr__event_notif_req__notif_type__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "options",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__EventNotifReq, options),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "xpath",
++ 3,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__EventNotifReq, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "values",
++ 4,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ offsetof(Sr__EventNotifReq, n_values),
++ offsetof(Sr__EventNotifReq, values),
++ &sr__value__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "trees",
++ 5,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ offsetof(Sr__EventNotifReq, n_trees),
++ offsetof(Sr__EventNotifReq, trees),
++ &sr__node__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "timestamp",
++ 6,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT64,
++ 0, /* quantifier_offset */
++ offsetof(Sr__EventNotifReq, timestamp),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "subscriber_address",
++ 10,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__EventNotifReq, subscriber_address),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "subscription_id",
++ 11,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_UINT32,
++ offsetof(Sr__EventNotifReq, has_subscription_id),
++ offsetof(Sr__EventNotifReq, subscription_id),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "do_not_send_reply",
++ 20,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_BOOL,
++ 0, /* quantifier_offset */
++ offsetof(Sr__EventNotifReq, do_not_send_reply),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__event_notif_req__field_indices_by_name[] = {
++ 8, /* field[8] = do_not_send_reply */
++ 1, /* field[1] = options */
++ 6, /* field[6] = subscriber_address */
++ 7, /* field[7] = subscription_id */
++ 5, /* field[5] = timestamp */
++ 4, /* field[4] = trees */
++ 0, /* field[0] = type */
++ 3, /* field[3] = values */
++ 2, /* field[2] = xpath */
++};
++static const ProtobufCIntRange sr__event_notif_req__number_ranges[3 + 1] =
++{
++ { 1, 0 },
++ { 10, 6 },
++ { 20, 8 },
++ { 0, 9 }
++};
++const ProtobufCMessageDescriptor sr__event_notif_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.EventNotifReq",
++ "EventNotifReq",
++ "Sr__EventNotifReq",
++ "sr",
++ sizeof(Sr__EventNotifReq),
++ 9,
++ sr__event_notif_req__field_descriptors,
++ sr__event_notif_req__field_indices_by_name,
++ 3, sr__event_notif_req__number_ranges,
++ (ProtobufCMessageInit) sr__event_notif_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__event_notif_resp__field_descriptors NULL
++#define sr__event_notif_resp__field_indices_by_name NULL
++#define sr__event_notif_resp__number_ranges NULL
++const ProtobufCMessageDescriptor sr__event_notif_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.EventNotifResp",
++ "EventNotifResp",
++ "Sr__EventNotifResp",
++ "sr",
++ sizeof(Sr__EventNotifResp),
++ 0,
++ sr__event_notif_resp__field_descriptors,
++ sr__event_notif_resp__field_indices_by_name,
++ 0, sr__event_notif_resp__number_ranges,
++ (ProtobufCMessageInit) sr__event_notif_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__event_notif_replay_req__field_descriptors[6] =
++{
++ {
++ "xpath",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__EventNotifReplayReq, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "start_time",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT64,
++ 0, /* quantifier_offset */
++ offsetof(Sr__EventNotifReplayReq, start_time),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "stop_time",
++ 3,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT64,
++ 0, /* quantifier_offset */
++ offsetof(Sr__EventNotifReplayReq, stop_time),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "subscriber_address",
++ 10,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__EventNotifReplayReq, subscriber_address),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "subscription_id",
++ 11,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__EventNotifReplayReq, subscription_id),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "api_variant",
++ 12,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__EventNotifReplayReq, api_variant),
++ &sr__api_variant__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__event_notif_replay_req__field_indices_by_name[] = {
++ 5, /* field[5] = api_variant */
++ 1, /* field[1] = start_time */
++ 2, /* field[2] = stop_time */
++ 3, /* field[3] = subscriber_address */
++ 4, /* field[4] = subscription_id */
++ 0, /* field[0] = xpath */
++};
++static const ProtobufCIntRange sr__event_notif_replay_req__number_ranges[2 + 1] =
++{
++ { 1, 0 },
++ { 10, 3 },
++ { 0, 6 }
++};
++const ProtobufCMessageDescriptor sr__event_notif_replay_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.EventNotifReplayReq",
++ "EventNotifReplayReq",
++ "Sr__EventNotifReplayReq",
++ "sr",
++ sizeof(Sr__EventNotifReplayReq),
++ 6,
++ sr__event_notif_replay_req__field_descriptors,
++ sr__event_notif_replay_req__field_indices_by_name,
++ 2, sr__event_notif_replay_req__number_ranges,
++ (ProtobufCMessageInit) sr__event_notif_replay_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__event_notif_replay_resp__field_descriptors NULL
++#define sr__event_notif_replay_resp__field_indices_by_name NULL
++#define sr__event_notif_replay_resp__number_ranges NULL
++const ProtobufCMessageDescriptor sr__event_notif_replay_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.EventNotifReplayResp",
++ "EventNotifReplayResp",
++ "Sr__EventNotifReplayResp",
++ "sr",
++ sizeof(Sr__EventNotifReplayResp),
++ 0,
++ sr__event_notif_replay_resp__field_descriptors,
++ sr__event_notif_replay_resp__field_indices_by_name,
++ 0, sr__event_notif_replay_resp__number_ranges,
++ (ProtobufCMessageInit) sr__event_notif_replay_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__data_provide_req__field_descriptors[4] =
++{
++ {
++ "xpath",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__DataProvideReq, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "subscriber_address",
++ 10,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__DataProvideReq, subscriber_address),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "subscription_id",
++ 11,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__DataProvideReq, subscription_id),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "request_id",
++ 20,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT64,
++ 0, /* quantifier_offset */
++ offsetof(Sr__DataProvideReq, request_id),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__data_provide_req__field_indices_by_name[] = {
++ 3, /* field[3] = request_id */
++ 1, /* field[1] = subscriber_address */
++ 2, /* field[2] = subscription_id */
++ 0, /* field[0] = xpath */
++};
++static const ProtobufCIntRange sr__data_provide_req__number_ranges[3 + 1] =
++{
++ { 1, 0 },
++ { 10, 1 },
++ { 20, 3 },
++ { 0, 4 }
++};
++const ProtobufCMessageDescriptor sr__data_provide_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.DataProvideReq",
++ "DataProvideReq",
++ "Sr__DataProvideReq",
++ "sr",
++ sizeof(Sr__DataProvideReq),
++ 4,
++ sr__data_provide_req__field_descriptors,
++ sr__data_provide_req__field_indices_by_name,
++ 3, sr__data_provide_req__number_ranges,
++ (ProtobufCMessageInit) sr__data_provide_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__data_provide_resp__field_descriptors[3] =
++{
++ {
++ "xpath",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__DataProvideResp, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "values",
++ 2,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ offsetof(Sr__DataProvideResp, n_values),
++ offsetof(Sr__DataProvideResp, values),
++ &sr__value__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "request_id",
++ 10,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT64,
++ 0, /* quantifier_offset */
++ offsetof(Sr__DataProvideResp, request_id),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__data_provide_resp__field_indices_by_name[] = {
++ 2, /* field[2] = request_id */
++ 1, /* field[1] = values */
++ 0, /* field[0] = xpath */
++};
++static const ProtobufCIntRange sr__data_provide_resp__number_ranges[2 + 1] =
++{
++ { 1, 0 },
++ { 10, 2 },
++ { 0, 3 }
++};
++const ProtobufCMessageDescriptor sr__data_provide_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.DataProvideResp",
++ "DataProvideResp",
++ "Sr__DataProvideResp",
++ "sr",
++ sizeof(Sr__DataProvideResp),
++ 3,
++ sr__data_provide_resp__field_descriptors,
++ sr__data_provide_resp__field_indices_by_name,
++ 2, sr__data_provide_resp__number_ranges,
++ (ProtobufCMessageInit) sr__data_provide_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__module_install_req__field_descriptors[4] =
++{
++ {
++ "module_name",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__ModuleInstallReq, module_name),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "revision",
++ 2,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__ModuleInstallReq, revision),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "file_name",
++ 3,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__ModuleInstallReq, file_name),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "installed",
++ 4,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_BOOL,
++ 0, /* quantifier_offset */
++ offsetof(Sr__ModuleInstallReq, installed),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__module_install_req__field_indices_by_name[] = {
++ 2, /* field[2] = file_name */
++ 3, /* field[3] = installed */
++ 0, /* field[0] = module_name */
++ 1, /* field[1] = revision */
++};
++static const ProtobufCIntRange sr__module_install_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 4 }
++};
++const ProtobufCMessageDescriptor sr__module_install_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.ModuleInstallReq",
++ "ModuleInstallReq",
++ "Sr__ModuleInstallReq",
++ "sr",
++ sizeof(Sr__ModuleInstallReq),
++ 4,
++ sr__module_install_req__field_descriptors,
++ sr__module_install_req__field_indices_by_name,
++ 1, sr__module_install_req__number_ranges,
++ (ProtobufCMessageInit) sr__module_install_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__module_install_resp__field_descriptors NULL
++#define sr__module_install_resp__field_indices_by_name NULL
++#define sr__module_install_resp__number_ranges NULL
++const ProtobufCMessageDescriptor sr__module_install_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.ModuleInstallResp",
++ "ModuleInstallResp",
++ "Sr__ModuleInstallResp",
++ "sr",
++ sizeof(Sr__ModuleInstallResp),
++ 0,
++ sr__module_install_resp__field_descriptors,
++ sr__module_install_resp__field_indices_by_name,
++ 0, sr__module_install_resp__number_ranges,
++ (ProtobufCMessageInit) sr__module_install_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__feature_enable_req__field_descriptors[3] =
++{
++ {
++ "module_name",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__FeatureEnableReq, module_name),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "feature_name",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__FeatureEnableReq, feature_name),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "enabled",
++ 3,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_BOOL,
++ 0, /* quantifier_offset */
++ offsetof(Sr__FeatureEnableReq, enabled),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__feature_enable_req__field_indices_by_name[] = {
++ 2, /* field[2] = enabled */
++ 1, /* field[1] = feature_name */
++ 0, /* field[0] = module_name */
++};
++static const ProtobufCIntRange sr__feature_enable_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 3 }
++};
++const ProtobufCMessageDescriptor sr__feature_enable_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.FeatureEnableReq",
++ "FeatureEnableReq",
++ "Sr__FeatureEnableReq",
++ "sr",
++ sizeof(Sr__FeatureEnableReq),
++ 3,
++ sr__feature_enable_req__field_descriptors,
++ sr__feature_enable_req__field_indices_by_name,
++ 1, sr__feature_enable_req__number_ranges,
++ (ProtobufCMessageInit) sr__feature_enable_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__feature_enable_resp__field_descriptors NULL
++#define sr__feature_enable_resp__field_indices_by_name NULL
++#define sr__feature_enable_resp__number_ranges NULL
++const ProtobufCMessageDescriptor sr__feature_enable_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.FeatureEnableResp",
++ "FeatureEnableResp",
++ "Sr__FeatureEnableResp",
++ "sr",
++ sizeof(Sr__FeatureEnableResp),
++ 0,
++ sr__feature_enable_resp__field_descriptors,
++ sr__feature_enable_resp__field_indices_by_name,
++ 0, sr__feature_enable_resp__number_ranges,
++ (ProtobufCMessageInit) sr__feature_enable_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__unsubscribe_destination_req__field_descriptors[1] =
++{
++ {
++ "destination",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__UnsubscribeDestinationReq, destination),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__unsubscribe_destination_req__field_indices_by_name[] = {
++ 0, /* field[0] = destination */
++};
++static const ProtobufCIntRange sr__unsubscribe_destination_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__unsubscribe_destination_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.UnsubscribeDestinationReq",
++ "UnsubscribeDestinationReq",
++ "Sr__UnsubscribeDestinationReq",
++ "sr",
++ sizeof(Sr__UnsubscribeDestinationReq),
++ 1,
++ sr__unsubscribe_destination_req__field_descriptors,
++ sr__unsubscribe_destination_req__field_indices_by_name,
++ 1, sr__unsubscribe_destination_req__number_ranges,
++ (ProtobufCMessageInit) sr__unsubscribe_destination_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__commit_timeout_req__field_descriptors[2] =
++{
++ {
++ "commit_id",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__CommitTimeoutReq, commit_id),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "expired",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_BOOL,
++ 0, /* quantifier_offset */
++ offsetof(Sr__CommitTimeoutReq, expired),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__commit_timeout_req__field_indices_by_name[] = {
++ 0, /* field[0] = commit_id */
++ 1, /* field[1] = expired */
++};
++static const ProtobufCIntRange sr__commit_timeout_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 2 }
++};
++const ProtobufCMessageDescriptor sr__commit_timeout_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.CommitTimeoutReq",
++ "CommitTimeoutReq",
++ "Sr__CommitTimeoutReq",
++ "sr",
++ sizeof(Sr__CommitTimeoutReq),
++ 2,
++ sr__commit_timeout_req__field_descriptors,
++ sr__commit_timeout_req__field_indices_by_name,
++ 1, sr__commit_timeout_req__number_ranges,
++ (ProtobufCMessageInit) sr__commit_timeout_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__oper_data_timeout_req__field_descriptors[1] =
++{
++ {
++ "request_id",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT64,
++ 0, /* quantifier_offset */
++ offsetof(Sr__OperDataTimeoutReq, request_id),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__oper_data_timeout_req__field_indices_by_name[] = {
++ 0, /* field[0] = request_id */
++};
++static const ProtobufCIntRange sr__oper_data_timeout_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__oper_data_timeout_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.OperDataTimeoutReq",
++ "OperDataTimeoutReq",
++ "Sr__OperDataTimeoutReq",
++ "sr",
++ sizeof(Sr__OperDataTimeoutReq),
++ 1,
++ sr__oper_data_timeout_req__field_descriptors,
++ sr__oper_data_timeout_req__field_indices_by_name,
++ 1, sr__oper_data_timeout_req__number_ranges,
++ (ProtobufCMessageInit) sr__oper_data_timeout_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__internal_state_data_req__field_descriptors[2] =
++{
++ {
++ "request_id",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT64,
++ 0, /* quantifier_offset */
++ offsetof(Sr__InternalStateDataReq, request_id),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "xpath",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__InternalStateDataReq, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__internal_state_data_req__field_indices_by_name[] = {
++ 0, /* field[0] = request_id */
++ 1, /* field[1] = xpath */
++};
++static const ProtobufCIntRange sr__internal_state_data_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 2 }
++};
++const ProtobufCMessageDescriptor sr__internal_state_data_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.InternalStateDataReq",
++ "InternalStateDataReq",
++ "Sr__InternalStateDataReq",
++ "sr",
++ sizeof(Sr__InternalStateDataReq),
++ 2,
++ sr__internal_state_data_req__field_descriptors,
++ sr__internal_state_data_req__field_indices_by_name,
++ 1, sr__internal_state_data_req__number_ranges,
++ (ProtobufCMessageInit) sr__internal_state_data_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__notif_store_cleanup_req__field_descriptors NULL
++#define sr__notif_store_cleanup_req__field_indices_by_name NULL
++#define sr__notif_store_cleanup_req__number_ranges NULL
++const ProtobufCMessageDescriptor sr__notif_store_cleanup_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.NotifStoreCleanupReq",
++ "NotifStoreCleanupReq",
++ "Sr__NotifStoreCleanupReq",
++ "sr",
++ sizeof(Sr__NotifStoreCleanupReq),
++ 0,
++ sr__notif_store_cleanup_req__field_descriptors,
++ sr__notif_store_cleanup_req__field_indices_by_name,
++ 0, sr__notif_store_cleanup_req__number_ranges,
++ (ProtobufCMessageInit) sr__notif_store_cleanup_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__delayed_msg_req__field_descriptors[1] =
++{
++ {
++ "message",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__DelayedMsgReq, message),
++ &sr__msg__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__delayed_msg_req__field_indices_by_name[] = {
++ 0, /* field[0] = message */
++};
++static const ProtobufCIntRange sr__delayed_msg_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__delayed_msg_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.DelayedMsgReq",
++ "DelayedMsgReq",
++ "Sr__DelayedMsgReq",
++ "sr",
++ sizeof(Sr__DelayedMsgReq),
++ 1,
++ sr__delayed_msg_req__field_descriptors,
++ sr__delayed_msg_req__field_indices_by_name,
++ 1, sr__delayed_msg_req__number_ranges,
++ (ProtobufCMessageInit) sr__delayed_msg_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__nacm_reload_req__field_descriptors NULL
++#define sr__nacm_reload_req__field_indices_by_name NULL
++#define sr__nacm_reload_req__number_ranges NULL
++const ProtobufCMessageDescriptor sr__nacm_reload_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.NacmReloadReq",
++ "NacmReloadReq",
++ "Sr__NacmReloadReq",
++ "sr",
++ sizeof(Sr__NacmReloadReq),
++ 0,
++ sr__nacm_reload_req__field_descriptors,
++ sr__nacm_reload_req__field_indices_by_name,
++ 0, sr__nacm_reload_req__number_ranges,
++ (ProtobufCMessageInit) sr__nacm_reload_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__request__field_descriptors[37] =
++{
++ {
++ "_id",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT64,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, _id),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "operation",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, operation),
++ &sr__operation__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "session_start_req",
++ 10,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, session_start_req),
++ &sr__session_start_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "session_stop_req",
++ 11,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, session_stop_req),
++ &sr__session_stop_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "session_refresh_req",
++ 12,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, session_refresh_req),
++ &sr__session_refresh_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "session_check_req",
++ 13,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, session_check_req),
++ &sr__session_check_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "session_switch_ds_req",
++ 14,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, session_switch_ds_req),
++ &sr__session_switch_ds_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "session_set_opts_req",
++ 15,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, session_set_opts_req),
++ &sr__session_set_opts_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "version_verify_req",
++ 16,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, version_verify_req),
++ &sr__version_verify_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "list_schemas_req",
++ 20,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, list_schemas_req),
++ &sr__list_schemas_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "get_schema_req",
++ 21,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, get_schema_req),
++ &sr__get_schema_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "module_install_req",
++ 22,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, module_install_req),
++ &sr__module_install_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "feature_enable_req",
++ 23,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, feature_enable_req),
++ &sr__feature_enable_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "get_item_req",
++ 30,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, get_item_req),
++ &sr__get_item_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "get_items_req",
++ 31,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, get_items_req),
++ &sr__get_items_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "get_subtree_req",
++ 32,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, get_subtree_req),
++ &sr__get_subtree_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "get_subtrees_req",
++ 33,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, get_subtrees_req),
++ &sr__get_subtrees_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "get_subtree_chunk_req",
++ 34,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, get_subtree_chunk_req),
++ &sr__get_subtree_chunk_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "set_item_req",
++ 40,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, set_item_req),
++ &sr__set_item_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "delete_item_req",
++ 41,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, delete_item_req),
++ &sr__delete_item_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "move_item_req",
++ 42,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, move_item_req),
++ &sr__move_item_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "set_item_str_req",
++ 43,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, set_item_str_req),
++ &sr__set_item_str_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "validate_req",
++ 50,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, validate_req),
++ &sr__validate_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "commit_req",
++ 51,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, commit_req),
++ &sr__commit_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "discard_changes_req",
++ 52,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, discard_changes_req),
++ &sr__discard_changes_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "copy_config_req",
++ 53,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, copy_config_req),
++ &sr__copy_config_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "lock_req",
++ 60,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, lock_req),
++ &sr__lock_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "unlock_req",
++ 61,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, unlock_req),
++ &sr__unlock_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "subscribe_req",
++ 70,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, subscribe_req),
++ &sr__subscribe_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "unsubscribe_req",
++ 71,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, unsubscribe_req),
++ &sr__unsubscribe_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "check_enabled_running_req",
++ 72,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, check_enabled_running_req),
++ &sr__check_enabled_running_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "get_changes_req",
++ 73,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, get_changes_req),
++ &sr__get_changes_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "data_provide_req",
++ 80,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, data_provide_req),
++ &sr__data_provide_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "check_exec_perm_req",
++ 81,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, check_exec_perm_req),
++ &sr__check_exec_perm_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "rpc_req",
++ 82,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, rpc_req),
++ &sr__rpcreq__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "event_notif_req",
++ 83,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, event_notif_req),
++ &sr__event_notif_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "event_notif_replay_req",
++ 84,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, event_notif_replay_req),
++ &sr__event_notif_replay_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__request__field_indices_by_name[] = {
++ 0, /* field[0] = _id */
++ 30, /* field[30] = check_enabled_running_req */
++ 33, /* field[33] = check_exec_perm_req */
++ 23, /* field[23] = commit_req */
++ 25, /* field[25] = copy_config_req */
++ 32, /* field[32] = data_provide_req */
++ 19, /* field[19] = delete_item_req */
++ 24, /* field[24] = discard_changes_req */
++ 36, /* field[36] = event_notif_replay_req */
++ 35, /* field[35] = event_notif_req */
++ 12, /* field[12] = feature_enable_req */
++ 31, /* field[31] = get_changes_req */
++ 13, /* field[13] = get_item_req */
++ 14, /* field[14] = get_items_req */
++ 10, /* field[10] = get_schema_req */
++ 17, /* field[17] = get_subtree_chunk_req */
++ 15, /* field[15] = get_subtree_req */
++ 16, /* field[16] = get_subtrees_req */
++ 9, /* field[9] = list_schemas_req */
++ 26, /* field[26] = lock_req */
++ 11, /* field[11] = module_install_req */
++ 20, /* field[20] = move_item_req */
++ 1, /* field[1] = operation */
++ 34, /* field[34] = rpc_req */
++ 5, /* field[5] = session_check_req */
++ 4, /* field[4] = session_refresh_req */
++ 7, /* field[7] = session_set_opts_req */
++ 2, /* field[2] = session_start_req */
++ 3, /* field[3] = session_stop_req */
++ 6, /* field[6] = session_switch_ds_req */
++ 18, /* field[18] = set_item_req */
++ 21, /* field[21] = set_item_str_req */
++ 28, /* field[28] = subscribe_req */
++ 27, /* field[27] = unlock_req */
++ 29, /* field[29] = unsubscribe_req */
++ 22, /* field[22] = validate_req */
++ 8, /* field[8] = version_verify_req */
++};
++static const ProtobufCIntRange sr__request__number_ranges[9 + 1] =
++{
++ { 1, 0 },
++ { 10, 2 },
++ { 20, 9 },
++ { 30, 13 },
++ { 40, 18 },
++ { 50, 22 },
++ { 60, 26 },
++ { 70, 28 },
++ { 80, 32 },
++ { 0, 37 }
++};
++const ProtobufCMessageDescriptor sr__request__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.Request",
++ "Request",
++ "Sr__Request",
++ "sr",
++ sizeof(Sr__Request),
++ 37,
++ sr__request__field_descriptors,
++ sr__request__field_indices_by_name,
++ 9, sr__request__number_ranges,
++ (ProtobufCMessageInit) sr__request__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__response__field_descriptors[38] =
++{
++ {
++ "operation",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, operation),
++ &sr__operation__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "result",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, result),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "error",
++ 3,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, error),
++ &sr__error__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "session_start_resp",
++ 10,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, session_start_resp),
++ &sr__session_start_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "session_stop_resp",
++ 11,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, session_stop_resp),
++ &sr__session_stop_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "session_refresh_resp",
++ 12,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, session_refresh_resp),
++ &sr__session_refresh_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "session_check_resp",
++ 13,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, session_check_resp),
++ &sr__session_check_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "session_switch_ds_resp",
++ 14,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, session_switch_ds_resp),
++ &sr__session_switch_ds_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "session_set_opts_resp",
++ 15,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, session_set_opts_resp),
++ &sr__session_set_opts_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "version_verify_resp",
++ 16,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, version_verify_resp),
++ &sr__version_verify_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "list_schemas_resp",
++ 20,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, list_schemas_resp),
++ &sr__list_schemas_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "get_schema_resp",
++ 21,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, get_schema_resp),
++ &sr__get_schema_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "module_install_resp",
++ 22,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, module_install_resp),
++ &sr__module_install_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "feature_enable_resp",
++ 23,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, feature_enable_resp),
++ &sr__feature_enable_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "get_item_resp",
++ 30,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, get_item_resp),
++ &sr__get_item_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "get_items_resp",
++ 31,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, get_items_resp),
++ &sr__get_items_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "get_subtree_resp",
++ 32,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, get_subtree_resp),
++ &sr__get_subtree_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "get_subtrees_resp",
++ 33,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, get_subtrees_resp),
++ &sr__get_subtrees_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "get_subtree_chunk_resp",
++ 34,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, get_subtree_chunk_resp),
++ &sr__get_subtree_chunk_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "set_item_resp",
++ 40,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, set_item_resp),
++ &sr__set_item_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "delete_item_resp",
++ 41,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, delete_item_resp),
++ &sr__delete_item_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "move_item_resp",
++ 42,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, move_item_resp),
++ &sr__move_item_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "set_item_str_resp",
++ 43,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, set_item_str_resp),
++ &sr__set_item_str_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "validate_resp",
++ 50,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, validate_resp),
++ &sr__validate_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "commit_resp",
++ 51,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, commit_resp),
++ &sr__commit_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "discard_changes_resp",
++ 52,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, discard_changes_resp),
++ &sr__discard_changes_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "copy_config_resp",
++ 53,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, copy_config_resp),
++ &sr__copy_config_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "lock_resp",
++ 60,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, lock_resp),
++ &sr__lock_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "unlock_resp",
++ 61,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, unlock_resp),
++ &sr__unlock_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "subscribe_resp",
++ 70,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, subscribe_resp),
++ &sr__subscribe_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "unsubscribe_resp",
++ 71,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, unsubscribe_resp),
++ &sr__unsubscribe_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "check_enabled_running_resp",
++ 72,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, check_enabled_running_resp),
++ &sr__check_enabled_running_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "get_changes_resp",
++ 73,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, get_changes_resp),
++ &sr__get_changes_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "data_provide_resp",
++ 80,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, data_provide_resp),
++ &sr__data_provide_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "check_exec_perm_resp",
++ 81,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, check_exec_perm_resp),
++ &sr__check_exec_perm_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "rpc_resp",
++ 82,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, rpc_resp),
++ &sr__rpcresp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "event_notif_resp",
++ 83,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, event_notif_resp),
++ &sr__event_notif_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "event_notif_replay_resp",
++ 84,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, event_notif_replay_resp),
++ &sr__event_notif_replay_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__response__field_indices_by_name[] = {
++ 31, /* field[31] = check_enabled_running_resp */
++ 34, /* field[34] = check_exec_perm_resp */
++ 24, /* field[24] = commit_resp */
++ 26, /* field[26] = copy_config_resp */
++ 33, /* field[33] = data_provide_resp */
++ 20, /* field[20] = delete_item_resp */
++ 25, /* field[25] = discard_changes_resp */
++ 2, /* field[2] = error */
++ 37, /* field[37] = event_notif_replay_resp */
++ 36, /* field[36] = event_notif_resp */
++ 13, /* field[13] = feature_enable_resp */
++ 32, /* field[32] = get_changes_resp */
++ 14, /* field[14] = get_item_resp */
++ 15, /* field[15] = get_items_resp */
++ 11, /* field[11] = get_schema_resp */
++ 18, /* field[18] = get_subtree_chunk_resp */
++ 16, /* field[16] = get_subtree_resp */
++ 17, /* field[17] = get_subtrees_resp */
++ 10, /* field[10] = list_schemas_resp */
++ 27, /* field[27] = lock_resp */
++ 12, /* field[12] = module_install_resp */
++ 21, /* field[21] = move_item_resp */
++ 0, /* field[0] = operation */
++ 1, /* field[1] = result */
++ 35, /* field[35] = rpc_resp */
++ 6, /* field[6] = session_check_resp */
++ 5, /* field[5] = session_refresh_resp */
++ 8, /* field[8] = session_set_opts_resp */
++ 3, /* field[3] = session_start_resp */
++ 4, /* field[4] = session_stop_resp */
++ 7, /* field[7] = session_switch_ds_resp */
++ 19, /* field[19] = set_item_resp */
++ 22, /* field[22] = set_item_str_resp */
++ 29, /* field[29] = subscribe_resp */
++ 28, /* field[28] = unlock_resp */
++ 30, /* field[30] = unsubscribe_resp */
++ 23, /* field[23] = validate_resp */
++ 9, /* field[9] = version_verify_resp */
++};
++static const ProtobufCIntRange sr__response__number_ranges[9 + 1] =
++{
++ { 1, 0 },
++ { 10, 3 },
++ { 20, 10 },
++ { 30, 14 },
++ { 40, 19 },
++ { 50, 23 },
++ { 60, 27 },
++ { 70, 29 },
++ { 80, 33 },
++ { 0, 38 }
++};
++const ProtobufCMessageDescriptor sr__response__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.Response",
++ "Response",
++ "Sr__Response",
++ "sr",
++ sizeof(Sr__Response),
++ 38,
++ sr__response__field_descriptors,
++ sr__response__field_indices_by_name,
++ 9, sr__response__number_ranges,
++ (ProtobufCMessageInit) sr__response__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__notification__field_descriptors[10] =
++{
++ {
++ "type",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Notification, type),
++ &sr__subscription_type__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "destination_address",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Notification, destination_address),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "source_address",
++ 3,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Notification, source_address),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "source_pid",
++ 4,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Notification, source_pid),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "subscription_id",
++ 5,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Notification, subscription_id),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "commit_id",
++ 6,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_UINT32,
++ offsetof(Sr__Notification, has_commit_id),
++ offsetof(Sr__Notification, commit_id),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "module_install_notif",
++ 10,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Notification, module_install_notif),
++ &sr__module_install_notification__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "feature_enable_notif",
++ 11,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Notification, feature_enable_notif),
++ &sr__feature_enable_notification__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "module_change_notif",
++ 12,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Notification, module_change_notif),
++ &sr__module_change_notification__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "subtree_change_notif",
++ 13,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Notification, subtree_change_notif),
++ &sr__subtree_change_notification__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__notification__field_indices_by_name[] = {
++ 5, /* field[5] = commit_id */
++ 1, /* field[1] = destination_address */
++ 7, /* field[7] = feature_enable_notif */
++ 8, /* field[8] = module_change_notif */
++ 6, /* field[6] = module_install_notif */
++ 2, /* field[2] = source_address */
++ 3, /* field[3] = source_pid */
++ 4, /* field[4] = subscription_id */
++ 9, /* field[9] = subtree_change_notif */
++ 0, /* field[0] = type */
++};
++static const ProtobufCIntRange sr__notification__number_ranges[2 + 1] =
++{
++ { 1, 0 },
++ { 10, 6 },
++ { 0, 10 }
++};
++const ProtobufCMessageDescriptor sr__notification__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.Notification",
++ "Notification",
++ "Sr__Notification",
++ "sr",
++ sizeof(Sr__Notification),
++ 10,
++ sr__notification__field_descriptors,
++ sr__notification__field_indices_by_name,
++ 2, sr__notification__number_ranges,
++ (ProtobufCMessageInit) sr__notification__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__notification_ack__field_descriptors[4] =
++{
++ {
++ "notif",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__NotificationAck, notif),
++ &sr__notification__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "result",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__NotificationAck, result),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "error",
++ 3,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__NotificationAck, error),
++ &sr__error__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "do_not_send_abort",
++ 4,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_BOOL,
++ 0, /* quantifier_offset */
++ offsetof(Sr__NotificationAck, do_not_send_abort),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__notification_ack__field_indices_by_name[] = {
++ 3, /* field[3] = do_not_send_abort */
++ 2, /* field[2] = error */
++ 0, /* field[0] = notif */
++ 1, /* field[1] = result */
++};
++static const ProtobufCIntRange sr__notification_ack__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 4 }
++};
++const ProtobufCMessageDescriptor sr__notification_ack__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.NotificationAck",
++ "NotificationAck",
++ "Sr__NotificationAck",
++ "sr",
++ sizeof(Sr__NotificationAck),
++ 4,
++ sr__notification_ack__field_descriptors,
++ sr__notification_ack__field_indices_by_name,
++ 1, sr__notification_ack__number_ranges,
++ (ProtobufCMessageInit) sr__notification_ack__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__internal_request__field_descriptors[9] =
++{
++ {
++ "operation",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__InternalRequest, operation),
++ &sr__operation__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "postpone_timeout",
++ 2,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_UINT32,
++ offsetof(Sr__InternalRequest, has_postpone_timeout),
++ offsetof(Sr__InternalRequest, postpone_timeout),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "unsubscribe_dst_req",
++ 10,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__InternalRequest, unsubscribe_dst_req),
++ &sr__unsubscribe_destination_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "commit_timeout_req",
++ 11,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__InternalRequest, commit_timeout_req),
++ &sr__commit_timeout_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "oper_data_timeout_req",
++ 12,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__InternalRequest, oper_data_timeout_req),
++ &sr__oper_data_timeout_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "internal_state_data_req",
++ 13,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__InternalRequest, internal_state_data_req),
++ &sr__internal_state_data_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "notif_store_cleanup_req",
++ 14,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__InternalRequest, notif_store_cleanup_req),
++ &sr__notif_store_cleanup_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "delayed_msg_req",
++ 15,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__InternalRequest, delayed_msg_req),
++ &sr__delayed_msg_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "nacm_reload_req",
++ 16,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__InternalRequest, nacm_reload_req),
++ &sr__nacm_reload_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__internal_request__field_indices_by_name[] = {
++ 3, /* field[3] = commit_timeout_req */
++ 7, /* field[7] = delayed_msg_req */
++ 5, /* field[5] = internal_state_data_req */
++ 8, /* field[8] = nacm_reload_req */
++ 6, /* field[6] = notif_store_cleanup_req */
++ 4, /* field[4] = oper_data_timeout_req */
++ 0, /* field[0] = operation */
++ 1, /* field[1] = postpone_timeout */
++ 2, /* field[2] = unsubscribe_dst_req */
++};
++static const ProtobufCIntRange sr__internal_request__number_ranges[2 + 1] =
++{
++ { 1, 0 },
++ { 10, 2 },
++ { 0, 9 }
++};
++const ProtobufCMessageDescriptor sr__internal_request__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.InternalRequest",
++ "InternalRequest",
++ "Sr__InternalRequest",
++ "sr",
++ sizeof(Sr__InternalRequest),
++ 9,
++ sr__internal_request__field_descriptors,
++ sr__internal_request__field_indices_by_name,
++ 2, sr__internal_request__number_ranges,
++ (ProtobufCMessageInit) sr__internal_request__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCEnumValue sr__msg__msg_type__enum_values_by_number[5] =
++{
++ { "REQUEST", "SR__MSG__MSG_TYPE__REQUEST", 1 },
++ { "RESPONSE", "SR__MSG__MSG_TYPE__RESPONSE", 2 },
++ { "NOTIFICATION", "SR__MSG__MSG_TYPE__NOTIFICATION", 3 },
++ { "NOTIFICATION_ACK", "SR__MSG__MSG_TYPE__NOTIFICATION_ACK", 4 },
++ { "INTERNAL_REQUEST", "SR__MSG__MSG_TYPE__INTERNAL_REQUEST", 5 },
++};
++static const ProtobufCIntRange sr__msg__msg_type__value_ranges[] = {
++{1, 0},{0, 5}
++};
++static const ProtobufCEnumValueIndex sr__msg__msg_type__enum_values_by_name[5] =
++{
++ { "INTERNAL_REQUEST", 4 },
++ { "NOTIFICATION", 2 },
++ { "NOTIFICATION_ACK", 3 },
++ { "REQUEST", 0 },
++ { "RESPONSE", 1 },
++};
++const ProtobufCEnumDescriptor sr__msg__msg_type__descriptor =
++{
++ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
++ "sr.Msg.MsgType",
++ "MsgType",
++ "Sr__Msg__MsgType",
++ "sr",
++ 5,
++ sr__msg__msg_type__enum_values_by_number,
++ 5,
++ sr__msg__msg_type__enum_values_by_name,
++ 1,
++ sr__msg__msg_type__value_ranges,
++ NULL,NULL,NULL,NULL /* reserved[1234] */
++};
++static const ProtobufCFieldDescriptor sr__msg__field_descriptors[8] =
++{
++ {
++ "type",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Msg, type),
++ &sr__msg__msg_type__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "session_id",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Msg, session_id),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "request",
++ 3,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Msg, request),
++ &sr__request__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "response",
++ 4,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Msg, response),
++ &sr__response__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "notification",
++ 5,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Msg, notification),
++ &sr__notification__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "notification_ack",
++ 6,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Msg, notification_ack),
++ &sr__notification_ack__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "internal_request",
++ 7,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Msg, internal_request),
++ &sr__internal_request__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "_sysrepo_mem_ctx",
++ 20,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT64,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Msg, _sysrepo_mem_ctx),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__msg__field_indices_by_name[] = {
++ 7, /* field[7] = _sysrepo_mem_ctx */
++ 6, /* field[6] = internal_request */
++ 4, /* field[4] = notification */
++ 5, /* field[5] = notification_ack */
++ 2, /* field[2] = request */
++ 3, /* field[3] = response */
++ 1, /* field[1] = session_id */
++ 0, /* field[0] = type */
++};
++static const ProtobufCIntRange sr__msg__number_ranges[2 + 1] =
++{
++ { 1, 0 },
++ { 20, 7 },
++ { 0, 8 }
++};
++const ProtobufCMessageDescriptor sr__msg__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.Msg",
++ "Msg",
++ "Sr__Msg",
++ "sr",
++ sizeof(Sr__Msg),
++ 8,
++ sr__msg__field_descriptors,
++ sr__msg__field_indices_by_name,
++ 2, sr__msg__number_ranges,
++ (ProtobufCMessageInit) sr__msg__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCEnumValue sr__api_variant__enum_values_by_number[2] =
++{
++ { "VALUES", "SR__API_VARIANT__VALUES", 1 },
++ { "TREES", "SR__API_VARIANT__TREES", 2 },
++};
++static const ProtobufCIntRange sr__api_variant__value_ranges[] = {
++{1, 0},{0, 2}
++};
++static const ProtobufCEnumValueIndex sr__api_variant__enum_values_by_name[2] =
++{
++ { "TREES", 1 },
++ { "VALUES", 0 },
++};
++const ProtobufCEnumDescriptor sr__api_variant__descriptor =
++{
++ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
++ "sr.ApiVariant",
++ "ApiVariant",
++ "Sr__ApiVariant",
++ "sr",
++ 2,
++ sr__api_variant__enum_values_by_number,
++ 2,
++ sr__api_variant__enum_values_by_name,
++ 1,
++ sr__api_variant__value_ranges,
++ NULL,NULL,NULL,NULL /* reserved[1234] */
++};
++static const ProtobufCEnumValue sr__data_store__enum_values_by_number[3] =
++{
++ { "STARTUP", "SR__DATA_STORE__STARTUP", 1 },
++ { "RUNNING", "SR__DATA_STORE__RUNNING", 2 },
++ { "CANDIDATE", "SR__DATA_STORE__CANDIDATE", 3 },
++};
++static const ProtobufCIntRange sr__data_store__value_ranges[] = {
++{1, 0},{0, 3}
++};
++static const ProtobufCEnumValueIndex sr__data_store__enum_values_by_name[3] =
++{
++ { "CANDIDATE", 2 },
++ { "RUNNING", 1 },
++ { "STARTUP", 0 },
++};
++const ProtobufCEnumDescriptor sr__data_store__descriptor =
++{
++ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
++ "sr.DataStore",
++ "DataStore",
++ "Sr__DataStore",
++ "sr",
++ 3,
++ sr__data_store__enum_values_by_number,
++ 3,
++ sr__data_store__enum_values_by_name,
++ 1,
++ sr__data_store__value_ranges,
++ NULL,NULL,NULL,NULL /* reserved[1234] */
++};
++static const ProtobufCEnumValue sr__session_flags__enum_values_by_number[4] =
++{
++ { "SESS_DEFAULT", "SR__SESSION_FLAGS__SESS_DEFAULT", 0 },
++ { "SESS_CONFIG_ONLY", "SR__SESSION_FLAGS__SESS_CONFIG_ONLY", 1 },
++ { "SESS_ENABLE_NACM", "SR__SESSION_FLAGS__SESS_ENABLE_NACM", 2 },
++ { "SESS_NOTIFICATION", "SR__SESSION_FLAGS__SESS_NOTIFICATION", 1024 },
++};
++static const ProtobufCIntRange sr__session_flags__value_ranges[] = {
++{0, 0},{1024, 3},{0, 4}
++};
++static const ProtobufCEnumValueIndex sr__session_flags__enum_values_by_name[4] =
++{
++ { "SESS_CONFIG_ONLY", 1 },
++ { "SESS_DEFAULT", 0 },
++ { "SESS_ENABLE_NACM", 2 },
++ { "SESS_NOTIFICATION", 3 },
++};
++const ProtobufCEnumDescriptor sr__session_flags__descriptor =
++{
++ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
++ "sr.SessionFlags",
++ "SessionFlags",
++ "Sr__SessionFlags",
++ "sr",
++ 4,
++ sr__session_flags__enum_values_by_number,
++ 4,
++ sr__session_flags__enum_values_by_name,
++ 2,
++ sr__session_flags__value_ranges,
++ NULL,NULL,NULL,NULL /* reserved[1234] */
++};
++static const ProtobufCEnumValue sr__edit_flags__enum_values_by_number[3] =
++{
++ { "EDIT_DEFAULT", "SR__EDIT_FLAGS__EDIT_DEFAULT", 0 },
++ { "EDIT_NON_RECURSIVE", "SR__EDIT_FLAGS__EDIT_NON_RECURSIVE", 1 },
++ { "EDIT_STRICT", "SR__EDIT_FLAGS__EDIT_STRICT", 2 },
++};
++static const ProtobufCIntRange sr__edit_flags__value_ranges[] = {
++{0, 0},{0, 3}
++};
++static const ProtobufCEnumValueIndex sr__edit_flags__enum_values_by_name[3] =
++{
++ { "EDIT_DEFAULT", 0 },
++ { "EDIT_NON_RECURSIVE", 1 },
++ { "EDIT_STRICT", 2 },
++};
++const ProtobufCEnumDescriptor sr__edit_flags__descriptor =
++{
++ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
++ "sr.EditFlags",
++ "EditFlags",
++ "Sr__EditFlags",
++ "sr",
++ 3,
++ sr__edit_flags__enum_values_by_number,
++ 3,
++ sr__edit_flags__enum_values_by_name,
++ 1,
++ sr__edit_flags__value_ranges,
++ NULL,NULL,NULL,NULL /* reserved[1234] */
++};
++static const ProtobufCEnumValue sr__subscription_type__enum_values_by_number[10] =
++{
++ { "MODULE_INSTALL_SUBS", "SR__SUBSCRIPTION_TYPE__MODULE_INSTALL_SUBS", 1 },
++ { "FEATURE_ENABLE_SUBS", "SR__SUBSCRIPTION_TYPE__FEATURE_ENABLE_SUBS", 2 },
++ { "MODULE_CHANGE_SUBS", "SR__SUBSCRIPTION_TYPE__MODULE_CHANGE_SUBS", 10 },
++ { "SUBTREE_CHANGE_SUBS", "SR__SUBSCRIPTION_TYPE__SUBTREE_CHANGE_SUBS", 11 },
++ { "DP_GET_ITEMS_SUBS", "SR__SUBSCRIPTION_TYPE__DP_GET_ITEMS_SUBS", 20 },
++ { "RPC_SUBS", "SR__SUBSCRIPTION_TYPE__RPC_SUBS", 30 },
++ { "ACTION_SUBS", "SR__SUBSCRIPTION_TYPE__ACTION_SUBS", 31 },
++ { "EVENT_NOTIF_SUBS", "SR__SUBSCRIPTION_TYPE__EVENT_NOTIF_SUBS", 40 },
++ { "HELLO_SUBS", "SR__SUBSCRIPTION_TYPE__HELLO_SUBS", 50 },
++ { "COMMIT_END_SUBS", "SR__SUBSCRIPTION_TYPE__COMMIT_END_SUBS", 51 },
++};
++static const ProtobufCIntRange sr__subscription_type__value_ranges[] = {
++{1, 0},{10, 2},{20, 4},{30, 5},{40, 7},{50, 8},{0, 10}
++};
++static const ProtobufCEnumValueIndex sr__subscription_type__enum_values_by_name[10] =
++{
++ { "ACTION_SUBS", 6 },
++ { "COMMIT_END_SUBS", 9 },
++ { "DP_GET_ITEMS_SUBS", 4 },
++ { "EVENT_NOTIF_SUBS", 7 },
++ { "FEATURE_ENABLE_SUBS", 1 },
++ { "HELLO_SUBS", 8 },
++ { "MODULE_CHANGE_SUBS", 2 },
++ { "MODULE_INSTALL_SUBS", 0 },
++ { "RPC_SUBS", 5 },
++ { "SUBTREE_CHANGE_SUBS", 3 },
++};
++const ProtobufCEnumDescriptor sr__subscription_type__descriptor =
++{
++ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
++ "sr.SubscriptionType",
++ "SubscriptionType",
++ "Sr__SubscriptionType",
++ "sr",
++ 10,
++ sr__subscription_type__enum_values_by_number,
++ 10,
++ sr__subscription_type__enum_values_by_name,
++ 6,
++ sr__subscription_type__value_ranges,
++ NULL,NULL,NULL,NULL /* reserved[1234] */
++};
++static const ProtobufCEnumValue sr__notification_event__enum_values_by_number[4] =
++{
++ { "VERIFY_EV", "SR__NOTIFICATION_EVENT__VERIFY_EV", 1 },
++ { "APPLY_EV", "SR__NOTIFICATION_EVENT__APPLY_EV", 2 },
++ { "ABORT_EV", "SR__NOTIFICATION_EVENT__ABORT_EV", 3 },
++ { "ENABLED_EV", "SR__NOTIFICATION_EVENT__ENABLED_EV", 4 },
++};
++static const ProtobufCIntRange sr__notification_event__value_ranges[] = {
++{1, 0},{0, 4}
++};
++static const ProtobufCEnumValueIndex sr__notification_event__enum_values_by_name[4] =
++{
++ { "ABORT_EV", 2 },
++ { "APPLY_EV", 1 },
++ { "ENABLED_EV", 3 },
++ { "VERIFY_EV", 0 },
++};
++const ProtobufCEnumDescriptor sr__notification_event__descriptor =
++{
++ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
++ "sr.NotificationEvent",
++ "NotificationEvent",
++ "Sr__NotificationEvent",
++ "sr",
++ 4,
++ sr__notification_event__enum_values_by_number,
++ 4,
++ sr__notification_event__enum_values_by_name,
++ 1,
++ sr__notification_event__value_ranges,
++ NULL,NULL,NULL,NULL /* reserved[1234] */
++};
++static const ProtobufCEnumValue sr__module_state__enum_values_by_number[3] =
++{
++ { "UNINSTALLED", "SR__MODULE_STATE__UNINSTALLED", 1 },
++ { "IMPORTED", "SR__MODULE_STATE__IMPORTED", 2 },
++ { "IMPLEMENTED", "SR__MODULE_STATE__IMPLEMENTED", 3 },
++};
++static const ProtobufCIntRange sr__module_state__value_ranges[] = {
++{1, 0},{0, 3}
++};
++static const ProtobufCEnumValueIndex sr__module_state__enum_values_by_name[3] =
++{
++ { "IMPLEMENTED", 2 },
++ { "IMPORTED", 1 },
++ { "UNINSTALLED", 0 },
++};
++const ProtobufCEnumDescriptor sr__module_state__descriptor =
++{
++ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
++ "sr.ModuleState",
++ "ModuleState",
++ "Sr__ModuleState",
++ "sr",
++ 3,
++ sr__module_state__enum_values_by_number,
++ 3,
++ sr__module_state__enum_values_by_name,
++ 1,
++ sr__module_state__value_ranges,
++ NULL,NULL,NULL,NULL /* reserved[1234] */
++};
++static const ProtobufCEnumValue sr__change_operation__enum_values_by_number[4] =
++{
++ { "CREATED", "SR__CHANGE_OPERATION__CREATED", 1 },
++ { "MODIFIED", "SR__CHANGE_OPERATION__MODIFIED", 2 },
++ { "DELETED", "SR__CHANGE_OPERATION__DELETED", 3 },
++ { "MOVED", "SR__CHANGE_OPERATION__MOVED", 4 },
++};
++static const ProtobufCIntRange sr__change_operation__value_ranges[] = {
++{1, 0},{0, 4}
++};
++static const ProtobufCEnumValueIndex sr__change_operation__enum_values_by_name[4] =
++{
++ { "CREATED", 0 },
++ { "DELETED", 2 },
++ { "MODIFIED", 1 },
++ { "MOVED", 3 },
++};
++const ProtobufCEnumDescriptor sr__change_operation__descriptor =
++{
++ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
++ "sr.ChangeOperation",
++ "ChangeOperation",
++ "Sr__ChangeOperation",
++ "sr",
++ 4,
++ sr__change_operation__enum_values_by_number,
++ 4,
++ sr__change_operation__enum_values_by_name,
++ 1,
++ sr__change_operation__value_ranges,
++ NULL,NULL,NULL,NULL /* reserved[1234] */
++};
++static const ProtobufCEnumValue sr__operation__enum_values_by_number[43] =
++{
++ { "SESSION_START", "SR__OPERATION__SESSION_START", 10 },
++ { "SESSION_STOP", "SR__OPERATION__SESSION_STOP", 11 },
++ { "SESSION_REFRESH", "SR__OPERATION__SESSION_REFRESH", 12 },
++ { "SESSION_CHECK", "SR__OPERATION__SESSION_CHECK", 13 },
++ { "SESSION_SWITCH_DS", "SR__OPERATION__SESSION_SWITCH_DS", 14 },
++ { "SESSION_SET_OPTS", "SR__OPERATION__SESSION_SET_OPTS", 15 },
++ { "VERSION_VERIFY", "SR__OPERATION__VERSION_VERIFY", 16 },
++ { "LIST_SCHEMAS", "SR__OPERATION__LIST_SCHEMAS", 20 },
++ { "GET_SCHEMA", "SR__OPERATION__GET_SCHEMA", 21 },
++ { "MODULE_INSTALL", "SR__OPERATION__MODULE_INSTALL", 22 },
++ { "FEATURE_ENABLE", "SR__OPERATION__FEATURE_ENABLE", 23 },
++ { "GET_ITEM", "SR__OPERATION__GET_ITEM", 30 },
++ { "GET_ITEMS", "SR__OPERATION__GET_ITEMS", 31 },
++ { "GET_SUBTREE", "SR__OPERATION__GET_SUBTREE", 32 },
++ { "GET_SUBTREES", "SR__OPERATION__GET_SUBTREES", 33 },
++ { "GET_SUBTREE_CHUNK", "SR__OPERATION__GET_SUBTREE_CHUNK", 34 },
++ { "SET_ITEM", "SR__OPERATION__SET_ITEM", 40 },
++ { "DELETE_ITEM", "SR__OPERATION__DELETE_ITEM", 41 },
++ { "MOVE_ITEM", "SR__OPERATION__MOVE_ITEM", 42 },
++ { "SET_ITEM_STR", "SR__OPERATION__SET_ITEM_STR", 43 },
++ { "VALIDATE", "SR__OPERATION__VALIDATE", 50 },
++ { "COMMIT", "SR__OPERATION__COMMIT", 51 },
++ { "DISCARD_CHANGES", "SR__OPERATION__DISCARD_CHANGES", 52 },
++ { "COPY_CONFIG", "SR__OPERATION__COPY_CONFIG", 53 },
++ { "LOCK", "SR__OPERATION__LOCK", 60 },
++ { "UNLOCK", "SR__OPERATION__UNLOCK", 61 },
++ { "SUBSCRIBE", "SR__OPERATION__SUBSCRIBE", 70 },
++ { "UNSUBSCRIBE", "SR__OPERATION__UNSUBSCRIBE", 71 },
++ { "CHECK_ENABLED_RUNNING", "SR__OPERATION__CHECK_ENABLED_RUNNING", 72 },
++ { "GET_CHANGES", "SR__OPERATION__GET_CHANGES", 73 },
++ { "DATA_PROVIDE", "SR__OPERATION__DATA_PROVIDE", 80 },
++ { "CHECK_EXEC_PERMISSION", "SR__OPERATION__CHECK_EXEC_PERMISSION", 81 },
++ { "RPC", "SR__OPERATION__RPC", 82 },
++ { "ACTION", "SR__OPERATION__ACTION", 83 },
++ { "EVENT_NOTIF", "SR__OPERATION__EVENT_NOTIF", 84 },
++ { "EVENT_NOTIF_REPLAY", "SR__OPERATION__EVENT_NOTIF_REPLAY", 85 },
++ { "UNSUBSCRIBE_DESTINATION", "SR__OPERATION__UNSUBSCRIBE_DESTINATION", 101 },
++ { "COMMIT_TIMEOUT", "SR__OPERATION__COMMIT_TIMEOUT", 102 },
++ { "OPER_DATA_TIMEOUT", "SR__OPERATION__OPER_DATA_TIMEOUT", 103 },
++ { "INTERNAL_STATE_DATA", "SR__OPERATION__INTERNAL_STATE_DATA", 104 },
++ { "NOTIF_STORE_CLEANUP", "SR__OPERATION__NOTIF_STORE_CLEANUP", 105 },
++ { "DELAYED_MSG", "SR__OPERATION__DELAYED_MSG", 106 },
++ { "NACM_RELOAD", "SR__OPERATION__NACM_RELOAD", 107 },
++};
++static const ProtobufCIntRange sr__operation__value_ranges[] = {
++{10, 0},{20, 7},{30, 11},{40, 16},{50, 20},{60, 24},{70, 26},{80, 30},{101, 36},{0, 43}
++};
++static const ProtobufCEnumValueIndex sr__operation__enum_values_by_name[43] =
++{
++ { "ACTION", 33 },
++ { "CHECK_ENABLED_RUNNING", 28 },
++ { "CHECK_EXEC_PERMISSION", 31 },
++ { "COMMIT", 21 },
++ { "COMMIT_TIMEOUT", 37 },
++ { "COPY_CONFIG", 23 },
++ { "DATA_PROVIDE", 30 },
++ { "DELAYED_MSG", 41 },
++ { "DELETE_ITEM", 17 },
++ { "DISCARD_CHANGES", 22 },
++ { "EVENT_NOTIF", 34 },
++ { "EVENT_NOTIF_REPLAY", 35 },
++ { "FEATURE_ENABLE", 10 },
++ { "GET_CHANGES", 29 },
++ { "GET_ITEM", 11 },
++ { "GET_ITEMS", 12 },
++ { "GET_SCHEMA", 8 },
++ { "GET_SUBTREE", 13 },
++ { "GET_SUBTREES", 14 },
++ { "GET_SUBTREE_CHUNK", 15 },
++ { "INTERNAL_STATE_DATA", 39 },
++ { "LIST_SCHEMAS", 7 },
++ { "LOCK", 24 },
++ { "MODULE_INSTALL", 9 },
++ { "MOVE_ITEM", 18 },
++ { "NACM_RELOAD", 42 },
++ { "NOTIF_STORE_CLEANUP", 40 },
++ { "OPER_DATA_TIMEOUT", 38 },
++ { "RPC", 32 },
++ { "SESSION_CHECK", 3 },
++ { "SESSION_REFRESH", 2 },
++ { "SESSION_SET_OPTS", 5 },
++ { "SESSION_START", 0 },
++ { "SESSION_STOP", 1 },
++ { "SESSION_SWITCH_DS", 4 },
++ { "SET_ITEM", 16 },
++ { "SET_ITEM_STR", 19 },
++ { "SUBSCRIBE", 26 },
++ { "UNLOCK", 25 },
++ { "UNSUBSCRIBE", 27 },
++ { "UNSUBSCRIBE_DESTINATION", 36 },
++ { "VALIDATE", 20 },
++ { "VERSION_VERIFY", 6 },
++};
++const ProtobufCEnumDescriptor sr__operation__descriptor =
++{
++ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
++ "sr.Operation",
++ "Operation",
++ "Sr__Operation",
++ "sr",
++ 43,
++ sr__operation__enum_values_by_number,
++ 43,
++ sr__operation__enum_values_by_name,
++ 9,
++ sr__operation__value_ranges,
++ NULL,NULL,NULL,NULL /* reserved[1234] */
++};
+Index: sysrepo-0.7.5/src/common/sysrepo.pb-c.h
+===================================================================
+--- /dev/null
++++ sysrepo-0.7.5/src/common/sysrepo.pb-c.h
+@@ -0,0 +1,4238 @@
++/* Generated by the protocol buffer compiler. DO NOT EDIT! */
++/* Generated from: sysrepo.proto */
++
++#ifndef PROTOBUF_C_sysrepo_2eproto__INCLUDED
++#define PROTOBUF_C_sysrepo_2eproto__INCLUDED
++
++#include <protobuf-c/protobuf-c.h>
++
++PROTOBUF_C__BEGIN_DECLS
++
++#if PROTOBUF_C_VERSION_NUMBER < 1000000
++# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers.
++#elif 1002001 < PROTOBUF_C_MIN_COMPILER_VERSION
++# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c.
++#endif
++
++
++typedef struct _Sr__Value Sr__Value;
++typedef struct _Sr__Node Sr__Node;
++typedef struct _Sr__Error Sr__Error;
++typedef struct _Sr__SessionStartReq Sr__SessionStartReq;
++typedef struct _Sr__SessionStartResp Sr__SessionStartResp;
++typedef struct _Sr__SessionStopReq Sr__SessionStopReq;
++typedef struct _Sr__SessionStopResp Sr__SessionStopResp;
++typedef struct _Sr__SessionRefreshReq Sr__SessionRefreshReq;
++typedef struct _Sr__SessionRefreshResp Sr__SessionRefreshResp;
++typedef struct _Sr__SessionCheckReq Sr__SessionCheckReq;
++typedef struct _Sr__SessionCheckResp Sr__SessionCheckResp;
++typedef struct _Sr__SessionSwitchDsReq Sr__SessionSwitchDsReq;
++typedef struct _Sr__SessionSwitchDsResp Sr__SessionSwitchDsResp;
++typedef struct _Sr__SessionSetOptsReq Sr__SessionSetOptsReq;
++typedef struct _Sr__SessionSetOptsResp Sr__SessionSetOptsResp;
++typedef struct _Sr__VersionVerifyReq Sr__VersionVerifyReq;
++typedef struct _Sr__VersionVerifyResp Sr__VersionVerifyResp;
++typedef struct _Sr__SchemaRevision Sr__SchemaRevision;
++typedef struct _Sr__SchemaSubmodule Sr__SchemaSubmodule;
++typedef struct _Sr__Schema Sr__Schema;
++typedef struct _Sr__ListSchemasReq Sr__ListSchemasReq;
++typedef struct _Sr__ListSchemasResp Sr__ListSchemasResp;
++typedef struct _Sr__GetSchemaReq Sr__GetSchemaReq;
++typedef struct _Sr__GetSchemaResp Sr__GetSchemaResp;
++typedef struct _Sr__GetItemReq Sr__GetItemReq;
++typedef struct _Sr__GetItemResp Sr__GetItemResp;
++typedef struct _Sr__GetItemsReq Sr__GetItemsReq;
++typedef struct _Sr__GetItemsResp Sr__GetItemsResp;
++typedef struct _Sr__GetSubtreeReq Sr__GetSubtreeReq;
++typedef struct _Sr__GetSubtreeResp Sr__GetSubtreeResp;
++typedef struct _Sr__GetSubtreesReq Sr__GetSubtreesReq;
++typedef struct _Sr__GetSubtreesResp Sr__GetSubtreesResp;
++typedef struct _Sr__GetSubtreeChunkReq Sr__GetSubtreeChunkReq;
++typedef struct _Sr__GetSubtreeChunkResp Sr__GetSubtreeChunkResp;
++typedef struct _Sr__SetItemReq Sr__SetItemReq;
++typedef struct _Sr__SetItemResp Sr__SetItemResp;
++typedef struct _Sr__SetItemStrReq Sr__SetItemStrReq;
++typedef struct _Sr__SetItemStrResp Sr__SetItemStrResp;
++typedef struct _Sr__DeleteItemReq Sr__DeleteItemReq;
++typedef struct _Sr__DeleteItemResp Sr__DeleteItemResp;
++typedef struct _Sr__MoveItemReq Sr__MoveItemReq;
++typedef struct _Sr__MoveItemResp Sr__MoveItemResp;
++typedef struct _Sr__ValidateReq Sr__ValidateReq;
++typedef struct _Sr__ValidateResp Sr__ValidateResp;
++typedef struct _Sr__CommitReq Sr__CommitReq;
++typedef struct _Sr__CommitResp Sr__CommitResp;
++typedef struct _Sr__DiscardChangesReq Sr__DiscardChangesReq;
++typedef struct _Sr__DiscardChangesResp Sr__DiscardChangesResp;
++typedef struct _Sr__CopyConfigReq Sr__CopyConfigReq;
++typedef struct _Sr__CopyConfigResp Sr__CopyConfigResp;
++typedef struct _Sr__LockReq Sr__LockReq;
++typedef struct _Sr__LockResp Sr__LockResp;
++typedef struct _Sr__UnlockReq Sr__UnlockReq;
++typedef struct _Sr__UnlockResp Sr__UnlockResp;
++typedef struct _Sr__SubscribeReq Sr__SubscribeReq;
++typedef struct _Sr__SubscribeResp Sr__SubscribeResp;
++typedef struct _Sr__UnsubscribeReq Sr__UnsubscribeReq;
++typedef struct _Sr__UnsubscribeResp Sr__UnsubscribeResp;
++typedef struct _Sr__CheckEnabledRunningReq Sr__CheckEnabledRunningReq;
++typedef struct _Sr__CheckEnabledRunningResp Sr__CheckEnabledRunningResp;
++typedef struct _Sr__ModuleInstallNotification Sr__ModuleInstallNotification;
++typedef struct _Sr__FeatureEnableNotification Sr__FeatureEnableNotification;
++typedef struct _Sr__ModuleChangeNotification Sr__ModuleChangeNotification;
++typedef struct _Sr__SubtreeChangeNotification Sr__SubtreeChangeNotification;
++typedef struct _Sr__Change Sr__Change;
++typedef struct _Sr__GetChangesReq Sr__GetChangesReq;
++typedef struct _Sr__GetChangesResp Sr__GetChangesResp;
++typedef struct _Sr__CheckExecPermReq Sr__CheckExecPermReq;
++typedef struct _Sr__CheckExecPermResp Sr__CheckExecPermResp;
++typedef struct _Sr__RPCReq Sr__RPCReq;
++typedef struct _Sr__RPCResp Sr__RPCResp;
++typedef struct _Sr__EventNotifReq Sr__EventNotifReq;
++typedef struct _Sr__EventNotifResp Sr__EventNotifResp;
++typedef struct _Sr__EventNotifReplayReq Sr__EventNotifReplayReq;
++typedef struct _Sr__EventNotifReplayResp Sr__EventNotifReplayResp;
++typedef struct _Sr__DataProvideReq Sr__DataProvideReq;
++typedef struct _Sr__DataProvideResp Sr__DataProvideResp;
++typedef struct _Sr__ModuleInstallReq Sr__ModuleInstallReq;
++typedef struct _Sr__ModuleInstallResp Sr__ModuleInstallResp;
++typedef struct _Sr__FeatureEnableReq Sr__FeatureEnableReq;
++typedef struct _Sr__FeatureEnableResp Sr__FeatureEnableResp;
++typedef struct _Sr__UnsubscribeDestinationReq Sr__UnsubscribeDestinationReq;
++typedef struct _Sr__CommitTimeoutReq Sr__CommitTimeoutReq;
++typedef struct _Sr__OperDataTimeoutReq Sr__OperDataTimeoutReq;
++typedef struct _Sr__InternalStateDataReq Sr__InternalStateDataReq;
++typedef struct _Sr__NotifStoreCleanupReq Sr__NotifStoreCleanupReq;
++typedef struct _Sr__DelayedMsgReq Sr__DelayedMsgReq;
++typedef struct _Sr__NacmReloadReq Sr__NacmReloadReq;
++typedef struct _Sr__Request Sr__Request;
++typedef struct _Sr__Response Sr__Response;
++typedef struct _Sr__Notification Sr__Notification;
++typedef struct _Sr__NotificationAck Sr__NotificationAck;
++typedef struct _Sr__InternalRequest Sr__InternalRequest;
++typedef struct _Sr__Msg Sr__Msg;
++
++
++/* --- enums --- */
++
++typedef enum _Sr__Value__Types {
++ SR__VALUE__TYPES__LIST = 1,
++ SR__VALUE__TYPES__CONTAINER = 2,
++ SR__VALUE__TYPES__CONTAINER_PRESENCE = 3,
++ SR__VALUE__TYPES__LEAF_EMPTY = 4,
++ SR__VALUE__TYPES__BINARY = 10,
++ SR__VALUE__TYPES__BITS = 11,
++ SR__VALUE__TYPES__BOOL = 12,
++ SR__VALUE__TYPES__DECIMAL64 = 13,
++ SR__VALUE__TYPES__ENUM = 14,
++ SR__VALUE__TYPES__IDENTITYREF = 15,
++ SR__VALUE__TYPES__INSTANCEID = 16,
++ SR__VALUE__TYPES__INT8 = 17,
++ SR__VALUE__TYPES__INT16 = 18,
++ SR__VALUE__TYPES__INT32 = 19,
++ SR__VALUE__TYPES__INT64 = 20,
++ SR__VALUE__TYPES__STRING = 21,
++ SR__VALUE__TYPES__UINT8 = 22,
++ SR__VALUE__TYPES__UINT16 = 23,
++ SR__VALUE__TYPES__UINT32 = 24,
++ SR__VALUE__TYPES__UINT64 = 25,
++ SR__VALUE__TYPES__ANYXML = 26,
++ SR__VALUE__TYPES__ANYDATA = 27
++ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__VALUE__TYPES)
++} Sr__Value__Types;
++typedef enum _Sr__MoveItemReq__MovePosition {
++ SR__MOVE_ITEM_REQ__MOVE_POSITION__BEFORE = 1,
++ SR__MOVE_ITEM_REQ__MOVE_POSITION__AFTER = 2,
++ SR__MOVE_ITEM_REQ__MOVE_POSITION__FIRST = 3,
++ SR__MOVE_ITEM_REQ__MOVE_POSITION__LAST = 4
++ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__MOVE_ITEM_REQ__MOVE_POSITION)
++} Sr__MoveItemReq__MovePosition;
++/*
++ **
++ * @brief Type of the event notification.
++ */
++typedef enum _Sr__EventNotifReq__NotifType {
++ SR__EVENT_NOTIF_REQ__NOTIF_TYPE__REALTIME = 1,
++ SR__EVENT_NOTIF_REQ__NOTIF_TYPE__REPLAY = 2,
++ SR__EVENT_NOTIF_REQ__NOTIF_TYPE__REPLAY_COMPLETE = 3,
++ SR__EVENT_NOTIF_REQ__NOTIF_TYPE__REPLAY_STOP = 4
++ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__EVENT_NOTIF_REQ__NOTIF_TYPE)
++} Sr__EventNotifReq__NotifType;
++/*
++ **
++ * @brief Flags used to override default session handling.
++ */
++typedef enum _Sr__EventNotifReq__NotifFlags {
++ /*
++ **< Notification will be handled normally.
++ */
++ SR__EVENT_NOTIF_REQ__NOTIF_FLAGS__DEFAULT = 0,
++ /*
++ **< Notification will not be stored in the notification store.
++ */
++ SR__EVENT_NOTIF_REQ__NOTIF_FLAGS__EPHEMERAL = 1
++ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__EVENT_NOTIF_REQ__NOTIF_FLAGS)
++} Sr__EventNotifReq__NotifFlags;
++/*
++ **
++ * @brief Type of the message.
++ */
++typedef enum _Sr__Msg__MsgType {
++ /*
++ **< The message is a request.
++ */
++ SR__MSG__MSG_TYPE__REQUEST = 1,
++ /*
++ **< The message is a response to the request.
++ */
++ SR__MSG__MSG_TYPE__RESPONSE = 2,
++ /*
++ **< The message is a notification.
++ */
++ SR__MSG__MSG_TYPE__NOTIFICATION = 3,
++ /*
++ **< The message is a notification acknowledgment.
++ */
++ SR__MSG__MSG_TYPE__NOTIFICATION_ACK = 4,
++ /*
++ **< The message is an internal request, should not be used from the public API.
++ */
++ SR__MSG__MSG_TYPE__INTERNAL_REQUEST = 5
++ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__MSG__MSG_TYPE)
++} Sr__Msg__MsgType;
++/*
++ **
++ * @brief Variant of the API. Currently only values (sr_val_t) vs. trees (sr_node_t).
++ */
++typedef enum _Sr__ApiVariant {
++ SR__API_VARIANT__VALUES = 1,
++ SR__API_VARIANT__TREES = 2
++ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__API_VARIANT)
++} Sr__ApiVariant;
++/*
++ **
++ * @brief Datastore on which the configuration session will operate.
++ */
++typedef enum _Sr__DataStore {
++ SR__DATA_STORE__STARTUP = 1,
++ SR__DATA_STORE__RUNNING = 2,
++ SR__DATA_STORE__CANDIDATE = 3
++ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__DATA_STORE)
++} Sr__DataStore;
++/*
++ **
++ * @brief Flags used to override default session handling.
++ */
++typedef enum _Sr__SessionFlags {
++ /*
++ **< Default (normal) session behavior.
++ */
++ SR__SESSION_FLAGS__SESS_DEFAULT = 0,
++ /*
++ **< Session will process only configuration data (e.g. sysrepo won't
++ *return any state data by ::sr_get_items / ::sr_get_items_iter calls).
++ */
++ SR__SESSION_FLAGS__SESS_CONFIG_ONLY = 1,
++ /*
++ **< Enable NETCONF access control for this session.
++ */
++ SR__SESSION_FLAGS__SESS_ENABLE_NACM = 2,
++ /*
++ **< Notification session (internal type of session).
++ */
++ SR__SESSION_FLAGS__SESS_NOTIFICATION = 1024
++ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__SESSION_FLAGS)
++} Sr__SessionFlags;
++/*
++ **
++ * @brief Flags used to override default behavior of data manipulation calls.
++ */
++typedef enum _Sr__EditFlags {
++ /*
++ **< Default behavior - recursive and non-strict.
++ */
++ SR__EDIT_FLAGS__EDIT_DEFAULT = 0,
++ /*
++ **< Non-recursive behavior:
++ *by ::SetItemReq, all preceding nodes (parents) of the identified element must exist,
++ *by ::DeleteItemReq xpath must not identify an non-empty list or non-empty container.
++ */
++ SR__EDIT_FLAGS__EDIT_NON_RECURSIVE = 1,
++ /*
++ **< Strict behavior:
++ *by ::SetItemReq the identified element must not exist (similar to netconf create operation),
++ *by ::DeleteItemReq the identified element must exist (similar to netconf delete operation).
++ */
++ SR__EDIT_FLAGS__EDIT_STRICT = 2
++ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__EDIT_FLAGS)
++} Sr__EditFlags;
++typedef enum _Sr__SubscriptionType {
++ SR__SUBSCRIPTION_TYPE__MODULE_INSTALL_SUBS = 1,
++ SR__SUBSCRIPTION_TYPE__FEATURE_ENABLE_SUBS = 2,
++ SR__SUBSCRIPTION_TYPE__MODULE_CHANGE_SUBS = 10,
++ SR__SUBSCRIPTION_TYPE__SUBTREE_CHANGE_SUBS = 11,
++ SR__SUBSCRIPTION_TYPE__DP_GET_ITEMS_SUBS = 20,
++ SR__SUBSCRIPTION_TYPE__RPC_SUBS = 30,
++ SR__SUBSCRIPTION_TYPE__ACTION_SUBS = 31,
++ SR__SUBSCRIPTION_TYPE__EVENT_NOTIF_SUBS = 40,
++ /*
++ **< Used only internally to test for inactive notification subscriptions.
++ */
++ SR__SUBSCRIPTION_TYPE__HELLO_SUBS = 50,
++ /*
++ **< Used only internally to notify about the end of the commit process.
++ */
++ SR__SUBSCRIPTION_TYPE__COMMIT_END_SUBS = 51
++ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__SUBSCRIPTION_TYPE)
++} Sr__SubscriptionType;
++typedef enum _Sr__NotificationEvent {
++ SR__NOTIFICATION_EVENT__VERIFY_EV = 1,
++ SR__NOTIFICATION_EVENT__APPLY_EV = 2,
++ SR__NOTIFICATION_EVENT__ABORT_EV = 3,
++ SR__NOTIFICATION_EVENT__ENABLED_EV = 4
++ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__NOTIFICATION_EVENT)
++} Sr__NotificationEvent;
++typedef enum _Sr__ModuleState {
++ SR__MODULE_STATE__UNINSTALLED = 1,
++ SR__MODULE_STATE__IMPORTED = 2,
++ SR__MODULE_STATE__IMPLEMENTED = 3
++ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__MODULE_STATE)
++} Sr__ModuleState;
++typedef enum _Sr__ChangeOperation {
++ SR__CHANGE_OPERATION__CREATED = 1,
++ SR__CHANGE_OPERATION__MODIFIED = 2,
++ SR__CHANGE_OPERATION__DELETED = 3,
++ SR__CHANGE_OPERATION__MOVED = 4
++ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__CHANGE_OPERATION)
++} Sr__ChangeOperation;
++/*
++ **
++ * @brief Requested operation.
++ */
++typedef enum _Sr__Operation {
++ SR__OPERATION__SESSION_START = 10,
++ SR__OPERATION__SESSION_STOP = 11,
++ SR__OPERATION__SESSION_REFRESH = 12,
++ SR__OPERATION__SESSION_CHECK = 13,
++ SR__OPERATION__SESSION_SWITCH_DS = 14,
++ SR__OPERATION__SESSION_SET_OPTS = 15,
++ SR__OPERATION__VERSION_VERIFY = 16,
++ SR__OPERATION__LIST_SCHEMAS = 20,
++ SR__OPERATION__GET_SCHEMA = 21,
++ SR__OPERATION__MODULE_INSTALL = 22,
++ SR__OPERATION__FEATURE_ENABLE = 23,
++ SR__OPERATION__GET_ITEM = 30,
++ SR__OPERATION__GET_ITEMS = 31,
++ SR__OPERATION__GET_SUBTREE = 32,
++ SR__OPERATION__GET_SUBTREES = 33,
++ SR__OPERATION__GET_SUBTREE_CHUNK = 34,
++ SR__OPERATION__SET_ITEM = 40,
++ SR__OPERATION__DELETE_ITEM = 41,
++ SR__OPERATION__MOVE_ITEM = 42,
++ SR__OPERATION__SET_ITEM_STR = 43,
++ SR__OPERATION__VALIDATE = 50,
++ SR__OPERATION__COMMIT = 51,
++ SR__OPERATION__DISCARD_CHANGES = 52,
++ SR__OPERATION__COPY_CONFIG = 53,
++ SR__OPERATION__LOCK = 60,
++ SR__OPERATION__UNLOCK = 61,
++ SR__OPERATION__SUBSCRIBE = 70,
++ SR__OPERATION__UNSUBSCRIBE = 71,
++ SR__OPERATION__CHECK_ENABLED_RUNNING = 72,
++ SR__OPERATION__GET_CHANGES = 73,
++ SR__OPERATION__DATA_PROVIDE = 80,
++ SR__OPERATION__CHECK_EXEC_PERMISSION = 81,
++ SR__OPERATION__RPC = 82,
++ SR__OPERATION__ACTION = 83,
++ SR__OPERATION__EVENT_NOTIF = 84,
++ SR__OPERATION__EVENT_NOTIF_REPLAY = 85,
++ SR__OPERATION__UNSUBSCRIBE_DESTINATION = 101,
++ SR__OPERATION__COMMIT_TIMEOUT = 102,
++ SR__OPERATION__OPER_DATA_TIMEOUT = 103,
++ SR__OPERATION__INTERNAL_STATE_DATA = 104,
++ SR__OPERATION__NOTIF_STORE_CLEANUP = 105,
++ SR__OPERATION__DELAYED_MSG = 106,
++ SR__OPERATION__NACM_RELOAD = 107
++ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__OPERATION)
++} Sr__Operation;
++
++/* --- messages --- */
++
++/*
++ **
++ * @brief Value of an item stored (or to be stored) in the datastore.
++ * Can be mapped to sr_val_t data structure from sysrepo library API.
++ */
++struct _Sr__Value
++{
++ ProtobufCMessage base;
++ char *xpath;
++ Sr__Value__Types type;
++ protobuf_c_boolean dflt;
++ char *binary_val;
++ char *bits_val;
++ protobuf_c_boolean has_bool_val;
++ protobuf_c_boolean bool_val;
++ protobuf_c_boolean has_decimal64_val;
++ double decimal64_val;
++ char *enum_val;
++ char *identityref_val;
++ char *instanceid_val;
++ protobuf_c_boolean has_int8_val;
++ int32_t int8_val;
++ protobuf_c_boolean has_int16_val;
++ int32_t int16_val;
++ protobuf_c_boolean has_int32_val;
++ int32_t int32_val;
++ protobuf_c_boolean has_int64_val;
++ int64_t int64_val;
++ char *string_val;
++ protobuf_c_boolean has_uint8_val;
++ uint32_t uint8_val;
++ protobuf_c_boolean has_uint16_val;
++ uint32_t uint16_val;
++ protobuf_c_boolean has_uint32_val;
++ uint32_t uint32_val;
++ protobuf_c_boolean has_uint64_val;
++ uint64_t uint64_val;
++ char *anyxml_val;
++ char *anydata_val;
++};
++#define SR__VALUE__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__value__descriptor) \
++ , NULL, 0, 0, NULL, NULL, 0,0, 0,0, NULL, NULL, NULL, 0,0, 0,0, 0,0, 0,0, NULL, 0,0, 0,0, 0,0, 0,0, NULL, NULL }
++
++
++/*
++ **
++ * @brief Item stored (or to be stored) in the datastore represented as a tree node
++ * reflecting module schema. Can be mapped to sr_node_t data structure from sysrepo library API.
++ */
++struct _Sr__Node
++{
++ ProtobufCMessage base;
++ /*
++ **< Value of the node; member *xpath* is used to store node's name.
++ */
++ Sr__Value *value;
++ /*
++ **< Name of the module that defines scheme of this node.
++ */
++ char *module_name;
++ /*
++ **< Direct descendands of this node.
++ */
++ size_t n_children;
++ Sr__Node **children;
++};
++#define SR__NODE__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__node__descriptor) \
++ , NULL, NULL, 0,NULL }
++
++
++/*
++ **
++ * @brief Error message retuned from the Sysrepo Engine.
++ */
++struct _Sr__Error
++{
++ ProtobufCMessage base;
++ char *message;
++ char *xpath;
++};
++#define SR__ERROR__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__error__descriptor) \
++ , NULL, NULL }
++
++
++/*
++ **
++ * @brief Request for starting a session. Sent by sr_session_start API call.
++ */
++struct _Sr__SessionStartReq
++{
++ ProtobufCMessage base;
++ Sr__DataStore datastore;
++ char *user_name;
++ /*
++ **< Bitwise OR of SessionFlags.
++ */
++ uint32_t options;
++ /*
++ **< Applicable if SESS_NOTIFICATION was specified.
++ */
++ protobuf_c_boolean has_commit_id;
++ uint32_t commit_id;
++};
++#define SR__SESSION_START_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__session_start_req__descriptor) \
++ , 0, NULL, 0, 0,0 }
++
++
++/*
++ **
++ * @brief Response to session_start request.
++ */
++struct _Sr__SessionStartResp
++{
++ ProtobufCMessage base;
++ uint32_t session_id;
++};
++#define SR__SESSION_START_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__session_start_resp__descriptor) \
++ , 0 }
++
++
++/*
++ **
++ * @brief Request for stopping the session. Sent by sr_session_stop API call.
++ */
++struct _Sr__SessionStopReq
++{
++ ProtobufCMessage base;
++ uint32_t session_id;
++};
++#define SR__SESSION_STOP_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__session_stop_req__descriptor) \
++ , 0 }
++
++
++/*
++ **
++ * @brief Response to session_stop request.
++ */
++struct _Sr__SessionStopResp
++{
++ ProtobufCMessage base;
++ uint32_t session_id;
++};
++#define SR__SESSION_STOP_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__session_stop_resp__descriptor) \
++ , 0 }
++
++
++/*
++ **
++ * @brief Refreshes configuration data cached within the session.
++ * Sent by sr_session_refresh API call.
++ */
++struct _Sr__SessionRefreshReq
++{
++ ProtobufCMessage base;
++};
++#define SR__SESSION_REFRESH_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__session_refresh_req__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Response to sr_session_refresh request.
++ */
++struct _Sr__SessionRefreshResp
++{
++ ProtobufCMessage base;
++ size_t n_errors;
++ Sr__Error **errors;
++};
++#define SR__SESSION_REFRESH_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__session_refresh_resp__descriptor) \
++ , 0,NULL }
++
++
++/*
++ **
++ * @brief Checks aliveness and validity of the session & connection tied to it.
++ * Sent by sr_session_check API call.
++ */
++struct _Sr__SessionCheckReq
++{
++ ProtobufCMessage base;
++};
++#define SR__SESSION_CHECK_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__session_check_req__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Response to sr_session_check request.
++ */
++struct _Sr__SessionCheckResp
++{
++ ProtobufCMessage base;
++ size_t n_errors;
++ Sr__Error **errors;
++};
++#define SR__SESSION_CHECK_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__session_check_resp__descriptor) \
++ , 0,NULL }
++
++
++/*
++ **
++ * @brief Changes the datastore to which the session is tied to.
++ */
++struct _Sr__SessionSwitchDsReq
++{
++ ProtobufCMessage base;
++ Sr__DataStore datastore;
++};
++#define SR__SESSION_SWITCH_DS_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__session_switch_ds_req__descriptor) \
++ , 0 }
++
++
++/*
++ **
++ * @brief Response to sr_session_switch_ds request.
++ */
++struct _Sr__SessionSwitchDsResp
++{
++ ProtobufCMessage base;
++};
++#define SR__SESSION_SWITCH_DS_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__session_switch_ds_resp__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Request for modification of session options.
++ */
++struct _Sr__SessionSetOptsReq
++{
++ ProtobufCMessage base;
++ uint32_t options;
++};
++#define SR__SESSION_SET_OPTS_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__session_set_opts_req__descriptor) \
++ , 0 }
++
++
++/*
++ **
++ * @brief Response to sr_session_set_options.
++ */
++struct _Sr__SessionSetOptsResp
++{
++ ProtobufCMessage base;
++};
++#define SR__SESSION_SET_OPTS_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__session_set_opts_resp__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Request to verify version compatibility.
++ */
++struct _Sr__VersionVerifyReq
++{
++ ProtobufCMessage base;
++ char *soname;
++};
++#define SR__VERSION_VERIFY_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__version_verify_req__descriptor) \
++ , NULL }
++
++
++/*
++ **
++ * @brief Response to version verification.
++ */
++struct _Sr__VersionVerifyResp
++{
++ ProtobufCMessage base;
++ /*
++ **< server-side SONAME version in case of versions incompatibility.
++ */
++ char *soname;
++};
++#define SR__VERSION_VERIFY_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__version_verify_resp__descriptor) \
++ , NULL }
++
++
++/*
++ **
++ * @brief Schema revision details.
++ */
++struct _Sr__SchemaRevision
++{
++ ProtobufCMessage base;
++ /*
++ **< Latest revision date of the module.
++ */
++ char *revision;
++ /*
++ **< Absolute path to file where the schema is stored (YANG format).
++ */
++ char *file_path_yang;
++ /*
++ **< Absolute path to file where the schema is stored (.yin format).
++ */
++ char *file_path_yin;
++};
++#define SR__SCHEMA_REVISION__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__schema_revision__descriptor) \
++ , NULL, NULL, NULL }
++
++
++/*
++ **
++ * @brief Schema submodule information.
++ */
++struct _Sr__SchemaSubmodule
++{
++ ProtobufCMessage base;
++ /*
++ **< Submodule name
++ */
++ char *submodule_name;
++ /*
++ **< Revision of the submodule
++ */
++ Sr__SchemaRevision *revision;
++};
++#define SR__SCHEMA_SUBMODULE__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__schema_submodule__descriptor) \
++ , NULL, NULL }
++
++
++/*
++ **
++ * @brief Information about a schema installed in sysrepo datastore.
++ */
++struct _Sr__Schema
++{
++ ProtobufCMessage base;
++ /*
++ **< Name of the module.
++ */
++ char *module_name;
++ /*
++ **< Namespace of the module.
++ */
++ char *ns;
++ /*
++ **< Prefix of he module.
++ */
++ char *prefix;
++ /*
++ **< TRUE only for explicitly installed modules (those are always implemented).
++ */
++ protobuf_c_boolean installed;
++ /*
++ **< TRUE for implemented modules (do not have to be installed if they have augments,
++ *deviations or are targets for leafrefs of other implemented modules).
++ */
++ protobuf_c_boolean implemented;
++ /*
++ **< Revision of the module
++ */
++ Sr__SchemaRevision *revision;
++ /*
++ **< Submodules
++ */
++ size_t n_submodules;
++ Sr__SchemaSubmodule **submodules;
++ /*
++ **< Features enabled for the module
++ */
++ size_t n_enabled_features;
++ char **enabled_features;
++};
++#define SR__SCHEMA__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__schema__descriptor) \
++ , NULL, NULL, NULL, 0, 0, NULL, 0,NULL, 0,NULL }
++
++
++/*
++ **
++ * @brief Retrieves an array of schemas installed in the sysrepo datastore.
++ * Sent by sr_list_schemas API call.
++ */
++struct _Sr__ListSchemasReq
++{
++ ProtobufCMessage base;
++};
++#define SR__LIST_SCHEMAS_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__list_schemas_req__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Response to sr_list_schemas request.
++ */
++struct _Sr__ListSchemasResp
++{
++ ProtobufCMessage base;
++ size_t n_schemas;
++ Sr__Schema **schemas;
++};
++#define SR__LIST_SCHEMAS_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__list_schemas_resp__descriptor) \
++ , 0,NULL }
++
++
++/*
++ **
++ * @brief Retrieves the content of specified schema file.
++ * Sent by sr_get_schema API call.
++ */
++struct _Sr__GetSchemaReq
++{
++ ProtobufCMessage base;
++ char *module_name;
++ char *revision;
++ char *submodule_name;
++ char *submodule_revision;
++ protobuf_c_boolean yang_format;
++};
++#define SR__GET_SCHEMA_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__get_schema_req__descriptor) \
++ , NULL, NULL, NULL, NULL, 0 }
++
++
++/*
++ **
++ * @brief Response to sr_get_schema request.
++ */
++struct _Sr__GetSchemaResp
++{
++ ProtobufCMessage base;
++ char *schema_content;
++};
++#define SR__GET_SCHEMA_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__get_schema_resp__descriptor) \
++ , NULL }
++
++
++/*
++ **
++ * @brief Retrieves a single data element stored under provided path.
++ * Sent by sr_get_item API call.
++ */
++struct _Sr__GetItemReq
++{
++ ProtobufCMessage base;
++ char *xpath;
++};
++#define SR__GET_ITEM_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__get_item_req__descriptor) \
++ , NULL }
++
++
++/*
++ **
++ * @brief Response to get_item request.
++ */
++struct _Sr__GetItemResp
++{
++ ProtobufCMessage base;
++ Sr__Value *value;
++};
++#define SR__GET_ITEM_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__get_item_resp__descriptor) \
++ , NULL }
++
++
++/*
++ **
++ * @brief Retrieves an array of data elements stored under provided path.
++ * Sent by sr_get_items and sr_get_items_iter API calls.
++ */
++struct _Sr__GetItemsReq
++{
++ ProtobufCMessage base;
++ char *xpath;
++ /*
++ * The options below are applicable only for sr_get_items_iter
++ * (not set by sr_get_items).
++ */
++ protobuf_c_boolean has_limit;
++ uint32_t limit;
++ protobuf_c_boolean has_offset;
++ uint32_t offset;
++};
++#define SR__GET_ITEMS_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__get_items_req__descriptor) \
++ , NULL, 0,0, 0,0 }
++
++
++/*
++ **
++ * @brief Response to get_items / sr_get_items_iter request.
++ */
++struct _Sr__GetItemsResp
++{
++ ProtobufCMessage base;
++ size_t n_values;
++ Sr__Value **values;
++};
++#define SR__GET_ITEMS_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__get_items_resp__descriptor) \
++ , 0,NULL }
++
++
++/*
++ **
++ * @brief Retrieves a single subtree whose root is stored under provided path.
++ * Sent by sr_get_subtree API call.
++ */
++struct _Sr__GetSubtreeReq
++{
++ ProtobufCMessage base;
++ char *xpath;
++};
++#define SR__GET_SUBTREE_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__get_subtree_req__descriptor) \
++ , NULL }
++
++
++/*
++ **
++ * @brief Response to sr_get_subtree request.
++ */
++struct _Sr__GetSubtreeResp
++{
++ ProtobufCMessage base;
++ Sr__Node *tree;
++};
++#define SR__GET_SUBTREE_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__get_subtree_resp__descriptor) \
++ , NULL }
++
++
++/*
++ **
++ * @brief Retrieves an array of subtrees whose root nodes match provided path.
++ * Sent by sr_get_subtrees API call.
++ */
++struct _Sr__GetSubtreesReq
++{
++ ProtobufCMessage base;
++ char *xpath;
++};
++#define SR__GET_SUBTREES_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__get_subtrees_req__descriptor) \
++ , NULL }
++
++
++/*
++ **
++ * @brief Response to sr_get_subtrees request.
++ */
++struct _Sr__GetSubtreesResp
++{
++ ProtobufCMessage base;
++ size_t n_trees;
++ Sr__Node **trees;
++};
++#define SR__GET_SUBTREES_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__get_subtrees_resp__descriptor) \
++ , 0,NULL }
++
++
++/*
++ **
++ * @brief Retrieves a chunk of a single or multiple subtrees.
++ * A subtree chunk is also a tree, where the root node is the node referenced by XPath,
++ * the next level consists of its children skipping the first "slice_offset" nodes and including
++ * at most "slice_limit" nodes, while the remaining (depth_limit-2) levels always start with
++ * the first child (slice_offset is ignored) and include at most "child_limit" nodes.
++ * The chunk consists of at most "depth_limit" levels.
++ * @note Order of child nodes depends on the libyang implementation.
++ */
++struct _Sr__GetSubtreeChunkReq
++{
++ ProtobufCMessage base;
++ char *xpath;
++ protobuf_c_boolean single;
++ uint32_t slice_offset;
++ uint32_t slice_width;
++ uint32_t child_limit;
++ uint32_t depth_limit;
++};
++#define SR__GET_SUBTREE_CHUNK_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__get_subtree_chunk_req__descriptor) \
++ , NULL, 0, 0, 0, 0, 0 }
++
++
++/*
++ **
++ * @brief Response to sr_get_subtree_chunk request.
++ */
++struct _Sr__GetSubtreeChunkResp
++{
++ ProtobufCMessage base;
++ /*
++ **< JSON node-id of the root node for each subtree chunk
++ */
++ size_t n_xpath;
++ char **xpath;
++ /*
++ **< first chunk may carry mutliple trees
++ */
++ size_t n_chunk;
++ Sr__Node **chunk;
++};
++#define SR__GET_SUBTREE_CHUNK_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__get_subtree_chunk_resp__descriptor) \
++ , 0,NULL, 0,NULL }
++
++
++/*
++ **
++ * @brief Sets the value of the leaf, leaf-list or presence container.
++ * Sent by sr_set_item API call.
++ */
++struct _Sr__SetItemReq
++{
++ ProtobufCMessage base;
++ char *xpath;
++ Sr__Value *value;
++ /*
++ **< Bitwise OR of EditFlags
++ */
++ uint32_t options;
++};
++#define SR__SET_ITEM_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__set_item_req__descriptor) \
++ , NULL, NULL, 0 }
++
++
++/*
++ **
++ * @brief Response to sr_set_item request.
++ */
++struct _Sr__SetItemResp
++{
++ ProtobufCMessage base;
++};
++#define SR__SET_ITEM_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__set_item_resp__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Sets the value of the leaf, leaf-list or presence container.
++ * The value is transferred as string.
++ * Sent by sr_set_item_str API call.
++ */
++struct _Sr__SetItemStrReq
++{
++ ProtobufCMessage base;
++ char *xpath;
++ char *value;
++ /*
++ **< Bitwise OR of EditFlags
++ */
++ uint32_t options;
++};
++#define SR__SET_ITEM_STR_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__set_item_str_req__descriptor) \
++ , NULL, NULL, 0 }
++
++
++/*
++ **
++ * @brief Response to sr_set_item_str request.
++ */
++struct _Sr__SetItemStrResp
++{
++ ProtobufCMessage base;
++};
++#define SR__SET_ITEM_STR_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__set_item_str_resp__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Deletes the nodes under the specified xpath.
++ * Sent by sr_delete_item API call.
++ */
++struct _Sr__DeleteItemReq
++{
++ ProtobufCMessage base;
++ char *xpath;
++ /*
++ **< Bitwise OR of EditFlags
++ */
++ uint32_t options;
++};
++#define SR__DELETE_ITEM_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__delete_item_req__descriptor) \
++ , NULL, 0 }
++
++
++/*
++ **
++ * @brief Response to sr_delete_item request.
++ */
++struct _Sr__DeleteItemResp
++{
++ ProtobufCMessage base;
++};
++#define SR__DELETE_ITEM_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__delete_item_resp__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Move the instance of an ordered list in specified direction.
++ * Sent by sr_move_item API call.
++ */
++struct _Sr__MoveItemReq
++{
++ ProtobufCMessage base;
++ char *xpath;
++ Sr__MoveItemReq__MovePosition position;
++ char *relative_item;
++};
++#define SR__MOVE_ITEM_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__move_item_req__descriptor) \
++ , NULL, 0, NULL }
++
++
++/*
++ **
++ * @brief Response to sr_move_item request.
++ */
++struct _Sr__MoveItemResp
++{
++ ProtobufCMessage base;
++};
++#define SR__MOVE_ITEM_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__move_item_resp__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Perform the validation of changes made in current session, but do not
++ * commit nor discard them. Sent by sr_validate API call.
++ */
++struct _Sr__ValidateReq
++{
++ ProtobufCMessage base;
++};
++#define SR__VALIDATE_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__validate_req__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Response to sr_validate request.
++ */
++struct _Sr__ValidateResp
++{
++ ProtobufCMessage base;
++ size_t n_errors;
++ Sr__Error **errors;
++};
++#define SR__VALIDATE_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__validate_resp__descriptor) \
++ , 0,NULL }
++
++
++/*
++ **
++ * @brief Apply changes made in current session.
++ * Sent by sr_commit API call.
++ */
++struct _Sr__CommitReq
++{
++ ProtobufCMessage base;
++};
++#define SR__COMMIT_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__commit_req__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Response to sr_commit request.
++ */
++struct _Sr__CommitResp
++{
++ ProtobufCMessage base;
++ size_t n_errors;
++ Sr__Error **errors;
++};
++#define SR__COMMIT_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__commit_resp__descriptor) \
++ , 0,NULL }
++
++
++/*
++ **
++ * @brief Discard non-committed changes made in current session.
++ * Sent by sr_discard_changes API call.
++ */
++struct _Sr__DiscardChangesReq
++{
++ ProtobufCMessage base;
++};
++#define SR__DISCARD_CHANGES_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__discard_changes_req__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Response to sr_discard_changes request.
++ */
++struct _Sr__DiscardChangesResp
++{
++ ProtobufCMessage base;
++};
++#define SR__DISCARD_CHANGES_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__discard_changes_resp__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Replaces an entire configuration datastore with the contents of
++ * another complete configuration datastore. Sent by sr_copy_config request.
++ */
++struct _Sr__CopyConfigReq
++{
++ ProtobufCMessage base;
++ Sr__DataStore src_datastore;
++ Sr__DataStore dst_datastore;
++ /*
++ **< If not specified, the operation is performed on all
++ *modules that are currently active in the source datastore
++ */
++ char *module_name;
++};
++#define SR__COPY_CONFIG_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__copy_config_req__descriptor) \
++ , 0, 0, NULL }
++
++
++/*
++ **
++ * @brief Response to sr_copy_config request.
++ */
++struct _Sr__CopyConfigResp
++{
++ ProtobufCMessage base;
++ size_t n_errors;
++ Sr__Error **errors;
++};
++#define SR__COPY_CONFIG_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__copy_config_resp__descriptor) \
++ , 0,NULL }
++
++
++/*
++ **
++ * @brief Locks specified data model or the datastore which the session is tied to.
++ * Sent by sr_lock_datastore and sr_lock_model API calls.
++ */
++struct _Sr__LockReq
++{
++ ProtobufCMessage base;
++ /*
++ **< If module name is not set, LockReq locks whole datastore.
++ */
++ char *module_name;
++};
++#define SR__LOCK_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__lock_req__descriptor) \
++ , NULL }
++
++
++/*
++ **
++ * @brief Response to sr_lock_datastore or sr_lock_model request.
++ */
++struct _Sr__LockResp
++{
++ ProtobufCMessage base;
++};
++#define SR__LOCK_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__lock_resp__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Unlocks specified data model or the datastore which the session is tied to.
++ * Sent by sr_unlock_datastore and sr_unlock_model API calls.
++ */
++struct _Sr__UnlockReq
++{
++ ProtobufCMessage base;
++ /*
++ **< If module name is not set, UnlockReq unlocks whole datastore.
++ */
++ char *module_name;
++};
++#define SR__UNLOCK_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__unlock_req__descriptor) \
++ , NULL }
++
++
++/*
++ **
++ * @brief Response to sr_lock_datastore or sr_lock_model request.
++ */
++struct _Sr__UnlockResp
++{
++ ProtobufCMessage base;
++};
++#define SR__UNLOCK_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__unlock_resp__descriptor) \
++ }
++
++
++struct _Sr__SubscribeReq
++{
++ ProtobufCMessage base;
++ Sr__SubscriptionType type;
++ char *destination;
++ uint32_t subscription_id;
++ char *module_name;
++ char *xpath;
++ protobuf_c_boolean has_notif_event;
++ Sr__NotificationEvent notif_event;
++ protobuf_c_boolean has_priority;
++ uint32_t priority;
++ protobuf_c_boolean has_enable_running;
++ protobuf_c_boolean enable_running;
++ protobuf_c_boolean has_enable_event;
++ protobuf_c_boolean enable_event;
++ Sr__ApiVariant api_variant;
++};
++#define SR__SUBSCRIBE_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__subscribe_req__descriptor) \
++ , 0, NULL, 0, NULL, NULL, 0,0, 0,0, 0,0, 0,0, 0 }
++
++
++struct _Sr__SubscribeResp
++{
++ ProtobufCMessage base;
++};
++#define SR__SUBSCRIBE_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__subscribe_resp__descriptor) \
++ }
++
++
++struct _Sr__UnsubscribeReq
++{
++ ProtobufCMessage base;
++ Sr__SubscriptionType type;
++ char *destination;
++ uint32_t subscription_id;
++ char *module_name;
++};
++#define SR__UNSUBSCRIBE_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__unsubscribe_req__descriptor) \
++ , 0, NULL, 0, NULL }
++
++
++struct _Sr__UnsubscribeResp
++{
++ ProtobufCMessage base;
++};
++#define SR__UNSUBSCRIBE_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__unsubscribe_resp__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Checks whether the module has any enabled subtree.
++ * Sent by sr_check_enabled_running.
++ */
++struct _Sr__CheckEnabledRunningReq
++{
++ ProtobufCMessage base;
++ char *module_name;
++};
++#define SR__CHECK_ENABLED_RUNNING_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__check_enabled_running_req__descriptor) \
++ , NULL }
++
++
++struct _Sr__CheckEnabledRunningResp
++{
++ ProtobufCMessage base;
++ protobuf_c_boolean enabled;
++};
++#define SR__CHECK_ENABLED_RUNNING_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__check_enabled_running_resp__descriptor) \
++ , 0 }
++
++
++struct _Sr__ModuleInstallNotification
++{
++ ProtobufCMessage base;
++ char *module_name;
++ char *revision;
++ Sr__ModuleState state;
++};
++#define SR__MODULE_INSTALL_NOTIFICATION__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__module_install_notification__descriptor) \
++ , NULL, NULL, 0 }
++
++
++struct _Sr__FeatureEnableNotification
++{
++ ProtobufCMessage base;
++ char *module_name;
++ char *feature_name;
++ protobuf_c_boolean enabled;
++};
++#define SR__FEATURE_ENABLE_NOTIFICATION__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__feature_enable_notification__descriptor) \
++ , NULL, NULL, 0 }
++
++
++struct _Sr__ModuleChangeNotification
++{
++ ProtobufCMessage base;
++ Sr__NotificationEvent event;
++ char *module_name;
++};
++#define SR__MODULE_CHANGE_NOTIFICATION__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__module_change_notification__descriptor) \
++ , 0, NULL }
++
++
++struct _Sr__SubtreeChangeNotification
++{
++ ProtobufCMessage base;
++ Sr__NotificationEvent event;
++ char *xpath;
++};
++#define SR__SUBTREE_CHANGE_NOTIFICATION__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__subtree_change_notification__descriptor) \
++ , 0, NULL }
++
++
++struct _Sr__Change
++{
++ ProtobufCMessage base;
++ Sr__ChangeOperation changeoperation;
++ Sr__Value *new_value;
++ Sr__Value *old_value;
++};
++#define SR__CHANGE__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__change__descriptor) \
++ , 0, NULL, NULL }
++
++
++/*
++ **
++ * @brief Retrieves an array of changes made under provided path.
++ * Sent by sr_get_changes_iter or sr_get_change_next API calls.
++ */
++struct _Sr__GetChangesReq
++{
++ ProtobufCMessage base;
++ char *xpath;
++ uint32_t limit;
++ uint32_t offset;
++};
++#define SR__GET_CHANGES_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__get_changes_req__descriptor) \
++ , NULL, 0, 0 }
++
++
++/*
++ **
++ * @brief Response to get_changes request.
++ */
++struct _Sr__GetChangesResp
++{
++ ProtobufCMessage base;
++ size_t n_changes;
++ Sr__Change **changes;
++};
++#define SR__GET_CHANGES_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__get_changes_resp__descriptor) \
++ , 0,NULL }
++
++
++/*
++ **
++ * @brief Sends a request to check if the owner of this session is authorized to invoke
++ * the protocol operation referenced by the xpath.
++ * Sent by sr_check_exec_permission.
++ */
++struct _Sr__CheckExecPermReq
++{
++ ProtobufCMessage base;
++ char *xpath;
++};
++#define SR__CHECK_EXEC_PERM_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__check_exec_perm_req__descriptor) \
++ , NULL }
++
++
++/*
++ **
++ * @brief Response to sr_check_exec_permission request.
++ */
++struct _Sr__CheckExecPermResp
++{
++ ProtobufCMessage base;
++ protobuf_c_boolean permitted;
++};
++#define SR__CHECK_EXEC_PERM_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__check_exec_perm_resp__descriptor) \
++ , 0 }
++
++
++/*
++ **
++ * @brief Sends a RPC / action request into the datastore, will be delivered to the RPC subscriber.
++ * Sent by sr_rpc_send / sr_rpc_send_tree and sr_action_send / sr_action_send_tree API calls.
++ */
++struct _Sr__RPCReq
++{
++ ProtobufCMessage base;
++ protobuf_c_boolean action;
++ char *xpath;
++ /*
++ **< which API variant was used to send RPC req.
++ */
++ Sr__ApiVariant orig_api_variant;
++ size_t n_input;
++ Sr__Value **input;
++ size_t n_input_tree;
++ Sr__Node **input_tree;
++ char *subscriber_address;
++ protobuf_c_boolean has_subscription_id;
++ uint32_t subscription_id;
++};
++#define SR__RPCREQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__rpcreq__descriptor) \
++ , 0, NULL, 0, 0,NULL, 0,NULL, NULL, 0,0 }
++
++
++/*
++ **
++ * @brief Response to sr_rpc_send / sr_rpc_send_tree or sr_action_send / sr_action_send_tree request.
++ */
++struct _Sr__RPCResp
++{
++ ProtobufCMessage base;
++ protobuf_c_boolean action;
++ char *xpath;
++ /*
++ **< which API variant was used to send RPC req.
++ */
++ Sr__ApiVariant orig_api_variant;
++ size_t n_output;
++ Sr__Value **output;
++ size_t n_output_tree;
++ Sr__Node **output_tree;
++};
++#define SR__RPCRESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__rpcresp__descriptor) \
++ , 0, NULL, 0, 0,NULL, 0,NULL }
++
++
++/*
++ **
++ * @brief Sends an event notification into the datastore, will be delivered to all notification subscribers.
++ * Sent by sr_event_notif_send API call.
++ */
++struct _Sr__EventNotifReq
++{
++ ProtobufCMessage base;
++ Sr__EventNotifReq__NotifType type;
++ /*
++ **< Bitwise OR of NotifFlags.
++ */
++ uint32_t options;
++ char *xpath;
++ size_t n_values;
++ Sr__Value **values;
++ size_t n_trees;
++ Sr__Node **trees;
++ uint64_t timestamp;
++ char *subscriber_address;
++ protobuf_c_boolean has_subscription_id;
++ uint32_t subscription_id;
++ protobuf_c_boolean do_not_send_reply;
++};
++#define SR__EVENT_NOTIF_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__event_notif_req__descriptor) \
++ , 0, 0, NULL, 0,NULL, 0,NULL, 0, NULL, 0,0, 0 }
++
++
++/*
++ **
++ * @brief Response to sr_event_notif_send request.
++ */
++struct _Sr__EventNotifResp
++{
++ ProtobufCMessage base;
++};
++#define SR__EVENT_NOTIF_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__event_notif_resp__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Sends a request to replay event notifications stored in the datastore.
++ * Sent by sr_event_notif_replay API call.
++ */
++struct _Sr__EventNotifReplayReq
++{
++ ProtobufCMessage base;
++ char *xpath;
++ uint64_t start_time;
++ uint64_t stop_time;
++ char *subscriber_address;
++ uint32_t subscription_id;
++ Sr__ApiVariant api_variant;
++};
++#define SR__EVENT_NOTIF_REPLAY_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__event_notif_replay_req__descriptor) \
++ , NULL, 0, 0, NULL, 0, 0 }
++
++
++/*
++ **
++ * @brief Response to sr_event_notif_replay request.
++ */
++struct _Sr__EventNotifReplayResp
++{
++ ProtobufCMessage base;
++};
++#define SR__EVENT_NOTIF_REPLAY_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__event_notif_replay_resp__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Requests operational data under given path form an operational data
++ * provider.
++ */
++struct _Sr__DataProvideReq
++{
++ ProtobufCMessage base;
++ char *xpath;
++ char *subscriber_address;
++ uint32_t subscription_id;
++ uint64_t request_id;
++};
++#define SR__DATA_PROVIDE_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__data_provide_req__descriptor) \
++ , NULL, NULL, 0, 0 }
++
++
++/*
++ **
++ * @brief Response to a request of operational data under given path form an
++ * operational data provider.
++ */
++struct _Sr__DataProvideResp
++{
++ ProtobufCMessage base;
++ char *xpath;
++ size_t n_values;
++ Sr__Value **values;
++ uint64_t request_id;
++};
++#define SR__DATA_PROVIDE_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__data_provide_resp__descriptor) \
++ , NULL, 0,NULL, 0 }
++
++
++/*
++ **
++ * @brief Requests installation / uinstallation of specified YANG model.
++ * Sent by sr_module_install internal API calls.
++ */
++struct _Sr__ModuleInstallReq
++{
++ ProtobufCMessage base;
++ char *module_name;
++ char *revision;
++ char *file_name;
++ protobuf_c_boolean installed;
++};
++#define SR__MODULE_INSTALL_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__module_install_req__descriptor) \
++ , NULL, NULL, NULL, 0 }
++
++
++/*
++ **
++ * @brief Response to sr_module_install request.
++ */
++struct _Sr__ModuleInstallResp
++{
++ ProtobufCMessage base;
++};
++#define SR__MODULE_INSTALL_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__module_install_resp__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Requests enabling / disabling of specified YANG feature within the
++ * YANG model. Sent by sr_feature_enable internal API calls.
++ */
++struct _Sr__FeatureEnableReq
++{
++ ProtobufCMessage base;
++ char *module_name;
++ char *feature_name;
++ protobuf_c_boolean enabled;
++};
++#define SR__FEATURE_ENABLE_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__feature_enable_req__descriptor) \
++ , NULL, NULL, 0 }
++
++
++/*
++ **
++ * @brief Response to sr_feature_enable request.
++ */
++struct _Sr__FeatureEnableResp
++{
++ ProtobufCMessage base;
++};
++#define SR__FEATURE_ENABLE_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__feature_enable_resp__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Internal request to unsubscribe all subscriptions of a subscriber on given destination address.
++ */
++struct _Sr__UnsubscribeDestinationReq
++{
++ ProtobufCMessage base;
++ char *destination;
++};
++#define SR__UNSUBSCRIBE_DESTINATION_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__unsubscribe_destination_req__descriptor) \
++ , NULL }
++
++
++/*
++ **
++ * @brief Internal request to timeout a commit, if it hasn't been terminated yet.
++ */
++struct _Sr__CommitTimeoutReq
++{
++ ProtobufCMessage base;
++ uint32_t commit_id;
++ protobuf_c_boolean expired;
++};
++#define SR__COMMIT_TIMEOUT_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__commit_timeout_req__descriptor) \
++ , 0, 0 }
++
++
++/*
++ **
++ * @brief Internal request to timeout a request for operational data, if it hasn't been terminated yet.
++ */
++struct _Sr__OperDataTimeoutReq
++{
++ ProtobufCMessage base;
++ uint64_t request_id;
++};
++#define SR__OPER_DATA_TIMEOUT_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__oper_data_timeout_req__descriptor) \
++ , 0 }
++
++
++/*
++ **
++ * @brief Internal request for internal state data (state data provided by Sysrepo Engine itself).
++ */
++struct _Sr__InternalStateDataReq
++{
++ ProtobufCMessage base;
++ uint64_t request_id;
++ char *xpath;
++};
++#define SR__INTERNAL_STATE_DATA_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__internal_state_data_req__descriptor) \
++ , 0, NULL }
++
++
++/*
++ **
++ * @brief Internal request to cleanup aged notifications in the Notification Store.
++ */
++struct _Sr__NotifStoreCleanupReq
++{
++ ProtobufCMessage base;
++};
++#define SR__NOTIF_STORE_CLEANUP_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__notif_store_cleanup_req__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Message to be delivered to the client after some timeout.
++ */
++struct _Sr__DelayedMsgReq
++{
++ ProtobufCMessage base;
++ Sr__Msg *message;
++};
++#define SR__DELAYED_MSG_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__delayed_msg_req__descriptor) \
++ , NULL }
++
++
++/*
++ **
++ * @brief Internal request to reload NACM configuration from the running datastore.
++ */
++struct _Sr__NacmReloadReq
++{
++ ProtobufCMessage base;
++};
++#define SR__NACM_RELOAD_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__nacm_reload_req__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Request for an operation.
++ */
++struct _Sr__Request
++{
++ ProtobufCMessage base;
++ /*
++ * Request ID used internally by sysrepo
++ */
++ uint64_t _id;
++ Sr__Operation operation;
++ Sr__SessionStartReq *session_start_req;
++ Sr__SessionStopReq *session_stop_req;
++ Sr__SessionRefreshReq *session_refresh_req;
++ Sr__SessionCheckReq *session_check_req;
++ Sr__SessionSwitchDsReq *session_switch_ds_req;
++ Sr__SessionSetOptsReq *session_set_opts_req;
++ Sr__VersionVerifyReq *version_verify_req;
++ Sr__ListSchemasReq *list_schemas_req;
++ Sr__GetSchemaReq *get_schema_req;
++ Sr__ModuleInstallReq *module_install_req;
++ Sr__FeatureEnableReq *feature_enable_req;
++ Sr__GetItemReq *get_item_req;
++ Sr__GetItemsReq *get_items_req;
++ Sr__GetSubtreeReq *get_subtree_req;
++ Sr__GetSubtreesReq *get_subtrees_req;
++ Sr__GetSubtreeChunkReq *get_subtree_chunk_req;
++ Sr__SetItemReq *set_item_req;
++ Sr__DeleteItemReq *delete_item_req;
++ Sr__MoveItemReq *move_item_req;
++ Sr__SetItemStrReq *set_item_str_req;
++ Sr__ValidateReq *validate_req;
++ Sr__CommitReq *commit_req;
++ Sr__DiscardChangesReq *discard_changes_req;
++ Sr__CopyConfigReq *copy_config_req;
++ Sr__LockReq *lock_req;
++ Sr__UnlockReq *unlock_req;
++ Sr__SubscribeReq *subscribe_req;
++ Sr__UnsubscribeReq *unsubscribe_req;
++ Sr__CheckEnabledRunningReq *check_enabled_running_req;
++ Sr__GetChangesReq *get_changes_req;
++ Sr__DataProvideReq *data_provide_req;
++ Sr__CheckExecPermReq *check_exec_perm_req;
++ Sr__RPCReq *rpc_req;
++ Sr__EventNotifReq *event_notif_req;
++ Sr__EventNotifReplayReq *event_notif_replay_req;
++};
++#define SR__REQUEST__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__request__descriptor) \
++ , 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }
++
++
++/*
++ **
++ * @brief Response to the received request.
++ */
++struct _Sr__Response
++{
++ ProtobufCMessage base;
++ Sr__Operation operation;
++ /*
++ **< Result of the operation. 0 on success, non-zero values map to sr_error_t enum in sysrepo.h.
++ */
++ uint32_t result;
++ /*
++ **< Additional error information.
++ */
++ Sr__Error *error;
++ Sr__SessionStartResp *session_start_resp;
++ Sr__SessionStopResp *session_stop_resp;
++ Sr__SessionRefreshResp *session_refresh_resp;
++ Sr__SessionCheckResp *session_check_resp;
++ Sr__SessionSwitchDsResp *session_switch_ds_resp;
++ Sr__SessionSetOptsResp *session_set_opts_resp;
++ Sr__VersionVerifyResp *version_verify_resp;
++ Sr__ListSchemasResp *list_schemas_resp;
++ Sr__GetSchemaResp *get_schema_resp;
++ Sr__ModuleInstallResp *module_install_resp;
++ Sr__FeatureEnableResp *feature_enable_resp;
++ Sr__GetItemResp *get_item_resp;
++ Sr__GetItemsResp *get_items_resp;
++ Sr__GetSubtreeResp *get_subtree_resp;
++ Sr__GetSubtreesResp *get_subtrees_resp;
++ Sr__GetSubtreeChunkResp *get_subtree_chunk_resp;
++ Sr__SetItemResp *set_item_resp;
++ Sr__DeleteItemResp *delete_item_resp;
++ Sr__MoveItemResp *move_item_resp;
++ Sr__SetItemStrResp *set_item_str_resp;
++ Sr__ValidateResp *validate_resp;
++ Sr__CommitResp *commit_resp;
++ Sr__DiscardChangesResp *discard_changes_resp;
++ Sr__CopyConfigResp *copy_config_resp;
++ Sr__LockResp *lock_resp;
++ Sr__UnlockResp *unlock_resp;
++ Sr__SubscribeResp *subscribe_resp;
++ Sr__UnsubscribeResp *unsubscribe_resp;
++ Sr__CheckEnabledRunningResp *check_enabled_running_resp;
++ Sr__GetChangesResp *get_changes_resp;
++ Sr__DataProvideResp *data_provide_resp;
++ Sr__CheckExecPermResp *check_exec_perm_resp;
++ Sr__RPCResp *rpc_resp;
++ Sr__EventNotifResp *event_notif_resp;
++ Sr__EventNotifReplayResp *event_notif_replay_resp;
++};
++#define SR__RESPONSE__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__response__descriptor) \
++ , 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }
++
++
++/*
++ **
++ * @brief Notification about an event that occurred in the datastore.
++ */
++struct _Sr__Notification
++{
++ ProtobufCMessage base;
++ Sr__SubscriptionType type;
++ char *destination_address;
++ char *source_address;
++ uint32_t source_pid;
++ uint32_t subscription_id;
++ protobuf_c_boolean has_commit_id;
++ uint32_t commit_id;
++ Sr__ModuleInstallNotification *module_install_notif;
++ Sr__FeatureEnableNotification *feature_enable_notif;
++ Sr__ModuleChangeNotification *module_change_notif;
++ Sr__SubtreeChangeNotification *subtree_change_notif;
++};
++#define SR__NOTIFICATION__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__notification__descriptor) \
++ , 0, NULL, NULL, 0, 0, 0,0, NULL, NULL, NULL, NULL }
++
++
++/*
++ **
++ * @brief Notification Acknowledgment.
++ */
++struct _Sr__NotificationAck
++{
++ ProtobufCMessage base;
++ /*
++ **< Original notification.
++ */
++ Sr__Notification *notif;
++ /*
++ **< Result of the notification (success / error code).
++ */
++ uint32_t result;
++ /*
++ **< Additional error information.
++ */
++ Sr__Error *error;
++ /*
++ **< If the result is error and this flag is set to true abort notification
++ * will not be delivered to this subscriber
++ * (Subscriber doesn't want notification about changes that he refused).
++ */
++ protobuf_c_boolean do_not_send_abort;
++};
++#define SR__NOTIFICATION_ACK__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__notification_ack__descriptor) \
++ , NULL, 0, NULL, 0 }
++
++
++/*
++ **
++ * @brief Internal request sent by sysrepo. Should not be used from the public API.
++ */
++struct _Sr__InternalRequest
++{
++ ProtobufCMessage base;
++ Sr__Operation operation;
++ protobuf_c_boolean has_postpone_timeout;
++ uint32_t postpone_timeout;
++ Sr__UnsubscribeDestinationReq *unsubscribe_dst_req;
++ Sr__CommitTimeoutReq *commit_timeout_req;
++ Sr__OperDataTimeoutReq *oper_data_timeout_req;
++ Sr__InternalStateDataReq *internal_state_data_req;
++ Sr__NotifStoreCleanupReq *notif_store_cleanup_req;
++ Sr__DelayedMsgReq *delayed_msg_req;
++ Sr__NacmReloadReq *nacm_reload_req;
++};
++#define SR__INTERNAL_REQUEST__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__internal_request__descriptor) \
++ , 0, 0,0, NULL, NULL, NULL, NULL, NULL, NULL, NULL }
++
++
++/*
++ **
++ * @brief Umbrella sysrepo message used for communication between sysrepo
++ * engine and client library.
++ */
++struct _Sr__Msg
++{
++ ProtobufCMessage base;
++ /*
++ **< Indicates type of the message.
++ */
++ Sr__Msg__MsgType type;
++ /*
++ **< Session identifier. Can be 0 (value is ignored) for session_start and version_verify requests.
++ */
++ uint32_t session_id;
++ /*
++ **< Filled in in case of type == REQUEST.
++ */
++ Sr__Request *request;
++ /*
++ **< Filled in in case of type == RESPONSE.
++ */
++ Sr__Response *response;
++ /*
++ **< Filled in in case of type == NOTIFICATION.
++ */
++ Sr__Notification *notification;
++ /*
++ **< Filled in in case of type == NOTIFICATION_ACK
++ */
++ Sr__NotificationAck *notification_ack;
++ /*
++ **< Filled in in case of type == INTERNAL.
++ */
++ Sr__InternalRequest *internal_request;
++ /*
++ **< Not part of the protocol. Used internally by Sysrepo to store a pointer to memory context.
++ */
++ uint64_t _sysrepo_mem_ctx;
++};
++#define SR__MSG__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__msg__descriptor) \
++ , 0, 0, NULL, NULL, NULL, NULL, NULL, 0 }
++
++
++/* Sr__Value methods */
++void sr__value__init
++ (Sr__Value *message);
++size_t sr__value__get_packed_size
++ (const Sr__Value *message);
++size_t sr__value__pack
++ (const Sr__Value *message,
++ uint8_t *out);
++size_t sr__value__pack_to_buffer
++ (const Sr__Value *message,
++ ProtobufCBuffer *buffer);
++Sr__Value *
++ sr__value__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__value__free_unpacked
++ (Sr__Value *message,
++ ProtobufCAllocator *allocator);
++/* Sr__Node methods */
++void sr__node__init
++ (Sr__Node *message);
++size_t sr__node__get_packed_size
++ (const Sr__Node *message);
++size_t sr__node__pack
++ (const Sr__Node *message,
++ uint8_t *out);
++size_t sr__node__pack_to_buffer
++ (const Sr__Node *message,
++ ProtobufCBuffer *buffer);
++Sr__Node *
++ sr__node__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__node__free_unpacked
++ (Sr__Node *message,
++ ProtobufCAllocator *allocator);
++/* Sr__Error methods */
++void sr__error__init
++ (Sr__Error *message);
++size_t sr__error__get_packed_size
++ (const Sr__Error *message);
++size_t sr__error__pack
++ (const Sr__Error *message,
++ uint8_t *out);
++size_t sr__error__pack_to_buffer
++ (const Sr__Error *message,
++ ProtobufCBuffer *buffer);
++Sr__Error *
++ sr__error__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__error__free_unpacked
++ (Sr__Error *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SessionStartReq methods */
++void sr__session_start_req__init
++ (Sr__SessionStartReq *message);
++size_t sr__session_start_req__get_packed_size
++ (const Sr__SessionStartReq *message);
++size_t sr__session_start_req__pack
++ (const Sr__SessionStartReq *message,
++ uint8_t *out);
++size_t sr__session_start_req__pack_to_buffer
++ (const Sr__SessionStartReq *message,
++ ProtobufCBuffer *buffer);
++Sr__SessionStartReq *
++ sr__session_start_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__session_start_req__free_unpacked
++ (Sr__SessionStartReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SessionStartResp methods */
++void sr__session_start_resp__init
++ (Sr__SessionStartResp *message);
++size_t sr__session_start_resp__get_packed_size
++ (const Sr__SessionStartResp *message);
++size_t sr__session_start_resp__pack
++ (const Sr__SessionStartResp *message,
++ uint8_t *out);
++size_t sr__session_start_resp__pack_to_buffer
++ (const Sr__SessionStartResp *message,
++ ProtobufCBuffer *buffer);
++Sr__SessionStartResp *
++ sr__session_start_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__session_start_resp__free_unpacked
++ (Sr__SessionStartResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SessionStopReq methods */
++void sr__session_stop_req__init
++ (Sr__SessionStopReq *message);
++size_t sr__session_stop_req__get_packed_size
++ (const Sr__SessionStopReq *message);
++size_t sr__session_stop_req__pack
++ (const Sr__SessionStopReq *message,
++ uint8_t *out);
++size_t sr__session_stop_req__pack_to_buffer
++ (const Sr__SessionStopReq *message,
++ ProtobufCBuffer *buffer);
++Sr__SessionStopReq *
++ sr__session_stop_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__session_stop_req__free_unpacked
++ (Sr__SessionStopReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SessionStopResp methods */
++void sr__session_stop_resp__init
++ (Sr__SessionStopResp *message);
++size_t sr__session_stop_resp__get_packed_size
++ (const Sr__SessionStopResp *message);
++size_t sr__session_stop_resp__pack
++ (const Sr__SessionStopResp *message,
++ uint8_t *out);
++size_t sr__session_stop_resp__pack_to_buffer
++ (const Sr__SessionStopResp *message,
++ ProtobufCBuffer *buffer);
++Sr__SessionStopResp *
++ sr__session_stop_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__session_stop_resp__free_unpacked
++ (Sr__SessionStopResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SessionRefreshReq methods */
++void sr__session_refresh_req__init
++ (Sr__SessionRefreshReq *message);
++size_t sr__session_refresh_req__get_packed_size
++ (const Sr__SessionRefreshReq *message);
++size_t sr__session_refresh_req__pack
++ (const Sr__SessionRefreshReq *message,
++ uint8_t *out);
++size_t sr__session_refresh_req__pack_to_buffer
++ (const Sr__SessionRefreshReq *message,
++ ProtobufCBuffer *buffer);
++Sr__SessionRefreshReq *
++ sr__session_refresh_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__session_refresh_req__free_unpacked
++ (Sr__SessionRefreshReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SessionRefreshResp methods */
++void sr__session_refresh_resp__init
++ (Sr__SessionRefreshResp *message);
++size_t sr__session_refresh_resp__get_packed_size
++ (const Sr__SessionRefreshResp *message);
++size_t sr__session_refresh_resp__pack
++ (const Sr__SessionRefreshResp *message,
++ uint8_t *out);
++size_t sr__session_refresh_resp__pack_to_buffer
++ (const Sr__SessionRefreshResp *message,
++ ProtobufCBuffer *buffer);
++Sr__SessionRefreshResp *
++ sr__session_refresh_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__session_refresh_resp__free_unpacked
++ (Sr__SessionRefreshResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SessionCheckReq methods */
++void sr__session_check_req__init
++ (Sr__SessionCheckReq *message);
++size_t sr__session_check_req__get_packed_size
++ (const Sr__SessionCheckReq *message);
++size_t sr__session_check_req__pack
++ (const Sr__SessionCheckReq *message,
++ uint8_t *out);
++size_t sr__session_check_req__pack_to_buffer
++ (const Sr__SessionCheckReq *message,
++ ProtobufCBuffer *buffer);
++Sr__SessionCheckReq *
++ sr__session_check_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__session_check_req__free_unpacked
++ (Sr__SessionCheckReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SessionCheckResp methods */
++void sr__session_check_resp__init
++ (Sr__SessionCheckResp *message);
++size_t sr__session_check_resp__get_packed_size
++ (const Sr__SessionCheckResp *message);
++size_t sr__session_check_resp__pack
++ (const Sr__SessionCheckResp *message,
++ uint8_t *out);
++size_t sr__session_check_resp__pack_to_buffer
++ (const Sr__SessionCheckResp *message,
++ ProtobufCBuffer *buffer);
++Sr__SessionCheckResp *
++ sr__session_check_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__session_check_resp__free_unpacked
++ (Sr__SessionCheckResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SessionSwitchDsReq methods */
++void sr__session_switch_ds_req__init
++ (Sr__SessionSwitchDsReq *message);
++size_t sr__session_switch_ds_req__get_packed_size
++ (const Sr__SessionSwitchDsReq *message);
++size_t sr__session_switch_ds_req__pack
++ (const Sr__SessionSwitchDsReq *message,
++ uint8_t *out);
++size_t sr__session_switch_ds_req__pack_to_buffer
++ (const Sr__SessionSwitchDsReq *message,
++ ProtobufCBuffer *buffer);
++Sr__SessionSwitchDsReq *
++ sr__session_switch_ds_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__session_switch_ds_req__free_unpacked
++ (Sr__SessionSwitchDsReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SessionSwitchDsResp methods */
++void sr__session_switch_ds_resp__init
++ (Sr__SessionSwitchDsResp *message);
++size_t sr__session_switch_ds_resp__get_packed_size
++ (const Sr__SessionSwitchDsResp *message);
++size_t sr__session_switch_ds_resp__pack
++ (const Sr__SessionSwitchDsResp *message,
++ uint8_t *out);
++size_t sr__session_switch_ds_resp__pack_to_buffer
++ (const Sr__SessionSwitchDsResp *message,
++ ProtobufCBuffer *buffer);
++Sr__SessionSwitchDsResp *
++ sr__session_switch_ds_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__session_switch_ds_resp__free_unpacked
++ (Sr__SessionSwitchDsResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SessionSetOptsReq methods */
++void sr__session_set_opts_req__init
++ (Sr__SessionSetOptsReq *message);
++size_t sr__session_set_opts_req__get_packed_size
++ (const Sr__SessionSetOptsReq *message);
++size_t sr__session_set_opts_req__pack
++ (const Sr__SessionSetOptsReq *message,
++ uint8_t *out);
++size_t sr__session_set_opts_req__pack_to_buffer
++ (const Sr__SessionSetOptsReq *message,
++ ProtobufCBuffer *buffer);
++Sr__SessionSetOptsReq *
++ sr__session_set_opts_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__session_set_opts_req__free_unpacked
++ (Sr__SessionSetOptsReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SessionSetOptsResp methods */
++void sr__session_set_opts_resp__init
++ (Sr__SessionSetOptsResp *message);
++size_t sr__session_set_opts_resp__get_packed_size
++ (const Sr__SessionSetOptsResp *message);
++size_t sr__session_set_opts_resp__pack
++ (const Sr__SessionSetOptsResp *message,
++ uint8_t *out);
++size_t sr__session_set_opts_resp__pack_to_buffer
++ (const Sr__SessionSetOptsResp *message,
++ ProtobufCBuffer *buffer);
++Sr__SessionSetOptsResp *
++ sr__session_set_opts_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__session_set_opts_resp__free_unpacked
++ (Sr__SessionSetOptsResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__VersionVerifyReq methods */
++void sr__version_verify_req__init
++ (Sr__VersionVerifyReq *message);
++size_t sr__version_verify_req__get_packed_size
++ (const Sr__VersionVerifyReq *message);
++size_t sr__version_verify_req__pack
++ (const Sr__VersionVerifyReq *message,
++ uint8_t *out);
++size_t sr__version_verify_req__pack_to_buffer
++ (const Sr__VersionVerifyReq *message,
++ ProtobufCBuffer *buffer);
++Sr__VersionVerifyReq *
++ sr__version_verify_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__version_verify_req__free_unpacked
++ (Sr__VersionVerifyReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__VersionVerifyResp methods */
++void sr__version_verify_resp__init
++ (Sr__VersionVerifyResp *message);
++size_t sr__version_verify_resp__get_packed_size
++ (const Sr__VersionVerifyResp *message);
++size_t sr__version_verify_resp__pack
++ (const Sr__VersionVerifyResp *message,
++ uint8_t *out);
++size_t sr__version_verify_resp__pack_to_buffer
++ (const Sr__VersionVerifyResp *message,
++ ProtobufCBuffer *buffer);
++Sr__VersionVerifyResp *
++ sr__version_verify_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__version_verify_resp__free_unpacked
++ (Sr__VersionVerifyResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SchemaRevision methods */
++void sr__schema_revision__init
++ (Sr__SchemaRevision *message);
++size_t sr__schema_revision__get_packed_size
++ (const Sr__SchemaRevision *message);
++size_t sr__schema_revision__pack
++ (const Sr__SchemaRevision *message,
++ uint8_t *out);
++size_t sr__schema_revision__pack_to_buffer
++ (const Sr__SchemaRevision *message,
++ ProtobufCBuffer *buffer);
++Sr__SchemaRevision *
++ sr__schema_revision__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__schema_revision__free_unpacked
++ (Sr__SchemaRevision *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SchemaSubmodule methods */
++void sr__schema_submodule__init
++ (Sr__SchemaSubmodule *message);
++size_t sr__schema_submodule__get_packed_size
++ (const Sr__SchemaSubmodule *message);
++size_t sr__schema_submodule__pack
++ (const Sr__SchemaSubmodule *message,
++ uint8_t *out);
++size_t sr__schema_submodule__pack_to_buffer
++ (const Sr__SchemaSubmodule *message,
++ ProtobufCBuffer *buffer);
++Sr__SchemaSubmodule *
++ sr__schema_submodule__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__schema_submodule__free_unpacked
++ (Sr__SchemaSubmodule *message,
++ ProtobufCAllocator *allocator);
++/* Sr__Schema methods */
++void sr__schema__init
++ (Sr__Schema *message);
++size_t sr__schema__get_packed_size
++ (const Sr__Schema *message);
++size_t sr__schema__pack
++ (const Sr__Schema *message,
++ uint8_t *out);
++size_t sr__schema__pack_to_buffer
++ (const Sr__Schema *message,
++ ProtobufCBuffer *buffer);
++Sr__Schema *
++ sr__schema__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__schema__free_unpacked
++ (Sr__Schema *message,
++ ProtobufCAllocator *allocator);
++/* Sr__ListSchemasReq methods */
++void sr__list_schemas_req__init
++ (Sr__ListSchemasReq *message);
++size_t sr__list_schemas_req__get_packed_size
++ (const Sr__ListSchemasReq *message);
++size_t sr__list_schemas_req__pack
++ (const Sr__ListSchemasReq *message,
++ uint8_t *out);
++size_t sr__list_schemas_req__pack_to_buffer
++ (const Sr__ListSchemasReq *message,
++ ProtobufCBuffer *buffer);
++Sr__ListSchemasReq *
++ sr__list_schemas_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__list_schemas_req__free_unpacked
++ (Sr__ListSchemasReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__ListSchemasResp methods */
++void sr__list_schemas_resp__init
++ (Sr__ListSchemasResp *message);
++size_t sr__list_schemas_resp__get_packed_size
++ (const Sr__ListSchemasResp *message);
++size_t sr__list_schemas_resp__pack
++ (const Sr__ListSchemasResp *message,
++ uint8_t *out);
++size_t sr__list_schemas_resp__pack_to_buffer
++ (const Sr__ListSchemasResp *message,
++ ProtobufCBuffer *buffer);
++Sr__ListSchemasResp *
++ sr__list_schemas_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__list_schemas_resp__free_unpacked
++ (Sr__ListSchemasResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__GetSchemaReq methods */
++void sr__get_schema_req__init
++ (Sr__GetSchemaReq *message);
++size_t sr__get_schema_req__get_packed_size
++ (const Sr__GetSchemaReq *message);
++size_t sr__get_schema_req__pack
++ (const Sr__GetSchemaReq *message,
++ uint8_t *out);
++size_t sr__get_schema_req__pack_to_buffer
++ (const Sr__GetSchemaReq *message,
++ ProtobufCBuffer *buffer);
++Sr__GetSchemaReq *
++ sr__get_schema_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__get_schema_req__free_unpacked
++ (Sr__GetSchemaReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__GetSchemaResp methods */
++void sr__get_schema_resp__init
++ (Sr__GetSchemaResp *message);
++size_t sr__get_schema_resp__get_packed_size
++ (const Sr__GetSchemaResp *message);
++size_t sr__get_schema_resp__pack
++ (const Sr__GetSchemaResp *message,
++ uint8_t *out);
++size_t sr__get_schema_resp__pack_to_buffer
++ (const Sr__GetSchemaResp *message,
++ ProtobufCBuffer *buffer);
++Sr__GetSchemaResp *
++ sr__get_schema_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__get_schema_resp__free_unpacked
++ (Sr__GetSchemaResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__GetItemReq methods */
++void sr__get_item_req__init
++ (Sr__GetItemReq *message);
++size_t sr__get_item_req__get_packed_size
++ (const Sr__GetItemReq *message);
++size_t sr__get_item_req__pack
++ (const Sr__GetItemReq *message,
++ uint8_t *out);
++size_t sr__get_item_req__pack_to_buffer
++ (const Sr__GetItemReq *message,
++ ProtobufCBuffer *buffer);
++Sr__GetItemReq *
++ sr__get_item_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__get_item_req__free_unpacked
++ (Sr__GetItemReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__GetItemResp methods */
++void sr__get_item_resp__init
++ (Sr__GetItemResp *message);
++size_t sr__get_item_resp__get_packed_size
++ (const Sr__GetItemResp *message);
++size_t sr__get_item_resp__pack
++ (const Sr__GetItemResp *message,
++ uint8_t *out);
++size_t sr__get_item_resp__pack_to_buffer
++ (const Sr__GetItemResp *message,
++ ProtobufCBuffer *buffer);
++Sr__GetItemResp *
++ sr__get_item_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__get_item_resp__free_unpacked
++ (Sr__GetItemResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__GetItemsReq methods */
++void sr__get_items_req__init
++ (Sr__GetItemsReq *message);
++size_t sr__get_items_req__get_packed_size
++ (const Sr__GetItemsReq *message);
++size_t sr__get_items_req__pack
++ (const Sr__GetItemsReq *message,
++ uint8_t *out);
++size_t sr__get_items_req__pack_to_buffer
++ (const Sr__GetItemsReq *message,
++ ProtobufCBuffer *buffer);
++Sr__GetItemsReq *
++ sr__get_items_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__get_items_req__free_unpacked
++ (Sr__GetItemsReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__GetItemsResp methods */
++void sr__get_items_resp__init
++ (Sr__GetItemsResp *message);
++size_t sr__get_items_resp__get_packed_size
++ (const Sr__GetItemsResp *message);
++size_t sr__get_items_resp__pack
++ (const Sr__GetItemsResp *message,
++ uint8_t *out);
++size_t sr__get_items_resp__pack_to_buffer
++ (const Sr__GetItemsResp *message,
++ ProtobufCBuffer *buffer);
++Sr__GetItemsResp *
++ sr__get_items_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__get_items_resp__free_unpacked
++ (Sr__GetItemsResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__GetSubtreeReq methods */
++void sr__get_subtree_req__init
++ (Sr__GetSubtreeReq *message);
++size_t sr__get_subtree_req__get_packed_size
++ (const Sr__GetSubtreeReq *message);
++size_t sr__get_subtree_req__pack
++ (const Sr__GetSubtreeReq *message,
++ uint8_t *out);
++size_t sr__get_subtree_req__pack_to_buffer
++ (const Sr__GetSubtreeReq *message,
++ ProtobufCBuffer *buffer);
++Sr__GetSubtreeReq *
++ sr__get_subtree_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__get_subtree_req__free_unpacked
++ (Sr__GetSubtreeReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__GetSubtreeResp methods */
++void sr__get_subtree_resp__init
++ (Sr__GetSubtreeResp *message);
++size_t sr__get_subtree_resp__get_packed_size
++ (const Sr__GetSubtreeResp *message);
++size_t sr__get_subtree_resp__pack
++ (const Sr__GetSubtreeResp *message,
++ uint8_t *out);
++size_t sr__get_subtree_resp__pack_to_buffer
++ (const Sr__GetSubtreeResp *message,
++ ProtobufCBuffer *buffer);
++Sr__GetSubtreeResp *
++ sr__get_subtree_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__get_subtree_resp__free_unpacked
++ (Sr__GetSubtreeResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__GetSubtreesReq methods */
++void sr__get_subtrees_req__init
++ (Sr__GetSubtreesReq *message);
++size_t sr__get_subtrees_req__get_packed_size
++ (const Sr__GetSubtreesReq *message);
++size_t sr__get_subtrees_req__pack
++ (const Sr__GetSubtreesReq *message,
++ uint8_t *out);
++size_t sr__get_subtrees_req__pack_to_buffer
++ (const Sr__GetSubtreesReq *message,
++ ProtobufCBuffer *buffer);
++Sr__GetSubtreesReq *
++ sr__get_subtrees_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__get_subtrees_req__free_unpacked
++ (Sr__GetSubtreesReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__GetSubtreesResp methods */
++void sr__get_subtrees_resp__init
++ (Sr__GetSubtreesResp *message);
++size_t sr__get_subtrees_resp__get_packed_size
++ (const Sr__GetSubtreesResp *message);
++size_t sr__get_subtrees_resp__pack
++ (const Sr__GetSubtreesResp *message,
++ uint8_t *out);
++size_t sr__get_subtrees_resp__pack_to_buffer
++ (const Sr__GetSubtreesResp *message,
++ ProtobufCBuffer *buffer);
++Sr__GetSubtreesResp *
++ sr__get_subtrees_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__get_subtrees_resp__free_unpacked
++ (Sr__GetSubtreesResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__GetSubtreeChunkReq methods */
++void sr__get_subtree_chunk_req__init
++ (Sr__GetSubtreeChunkReq *message);
++size_t sr__get_subtree_chunk_req__get_packed_size
++ (const Sr__GetSubtreeChunkReq *message);
++size_t sr__get_subtree_chunk_req__pack
++ (const Sr__GetSubtreeChunkReq *message,
++ uint8_t *out);
++size_t sr__get_subtree_chunk_req__pack_to_buffer
++ (const Sr__GetSubtreeChunkReq *message,
++ ProtobufCBuffer *buffer);
++Sr__GetSubtreeChunkReq *
++ sr__get_subtree_chunk_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__get_subtree_chunk_req__free_unpacked
++ (Sr__GetSubtreeChunkReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__GetSubtreeChunkResp methods */
++void sr__get_subtree_chunk_resp__init
++ (Sr__GetSubtreeChunkResp *message);
++size_t sr__get_subtree_chunk_resp__get_packed_size
++ (const Sr__GetSubtreeChunkResp *message);
++size_t sr__get_subtree_chunk_resp__pack
++ (const Sr__GetSubtreeChunkResp *message,
++ uint8_t *out);
++size_t sr__get_subtree_chunk_resp__pack_to_buffer
++ (const Sr__GetSubtreeChunkResp *message,
++ ProtobufCBuffer *buffer);
++Sr__GetSubtreeChunkResp *
++ sr__get_subtree_chunk_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__get_subtree_chunk_resp__free_unpacked
++ (Sr__GetSubtreeChunkResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SetItemReq methods */
++void sr__set_item_req__init
++ (Sr__SetItemReq *message);
++size_t sr__set_item_req__get_packed_size
++ (const Sr__SetItemReq *message);
++size_t sr__set_item_req__pack
++ (const Sr__SetItemReq *message,
++ uint8_t *out);
++size_t sr__set_item_req__pack_to_buffer
++ (const Sr__SetItemReq *message,
++ ProtobufCBuffer *buffer);
++Sr__SetItemReq *
++ sr__set_item_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__set_item_req__free_unpacked
++ (Sr__SetItemReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SetItemResp methods */
++void sr__set_item_resp__init
++ (Sr__SetItemResp *message);
++size_t sr__set_item_resp__get_packed_size
++ (const Sr__SetItemResp *message);
++size_t sr__set_item_resp__pack
++ (const Sr__SetItemResp *message,
++ uint8_t *out);
++size_t sr__set_item_resp__pack_to_buffer
++ (const Sr__SetItemResp *message,
++ ProtobufCBuffer *buffer);
++Sr__SetItemResp *
++ sr__set_item_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__set_item_resp__free_unpacked
++ (Sr__SetItemResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SetItemStrReq methods */
++void sr__set_item_str_req__init
++ (Sr__SetItemStrReq *message);
++size_t sr__set_item_str_req__get_packed_size
++ (const Sr__SetItemStrReq *message);
++size_t sr__set_item_str_req__pack
++ (const Sr__SetItemStrReq *message,
++ uint8_t *out);
++size_t sr__set_item_str_req__pack_to_buffer
++ (const Sr__SetItemStrReq *message,
++ ProtobufCBuffer *buffer);
++Sr__SetItemStrReq *
++ sr__set_item_str_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__set_item_str_req__free_unpacked
++ (Sr__SetItemStrReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SetItemStrResp methods */
++void sr__set_item_str_resp__init
++ (Sr__SetItemStrResp *message);
++size_t sr__set_item_str_resp__get_packed_size
++ (const Sr__SetItemStrResp *message);
++size_t sr__set_item_str_resp__pack
++ (const Sr__SetItemStrResp *message,
++ uint8_t *out);
++size_t sr__set_item_str_resp__pack_to_buffer
++ (const Sr__SetItemStrResp *message,
++ ProtobufCBuffer *buffer);
++Sr__SetItemStrResp *
++ sr__set_item_str_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__set_item_str_resp__free_unpacked
++ (Sr__SetItemStrResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__DeleteItemReq methods */
++void sr__delete_item_req__init
++ (Sr__DeleteItemReq *message);
++size_t sr__delete_item_req__get_packed_size
++ (const Sr__DeleteItemReq *message);
++size_t sr__delete_item_req__pack
++ (const Sr__DeleteItemReq *message,
++ uint8_t *out);
++size_t sr__delete_item_req__pack_to_buffer
++ (const Sr__DeleteItemReq *message,
++ ProtobufCBuffer *buffer);
++Sr__DeleteItemReq *
++ sr__delete_item_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__delete_item_req__free_unpacked
++ (Sr__DeleteItemReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__DeleteItemResp methods */
++void sr__delete_item_resp__init
++ (Sr__DeleteItemResp *message);
++size_t sr__delete_item_resp__get_packed_size
++ (const Sr__DeleteItemResp *message);
++size_t sr__delete_item_resp__pack
++ (const Sr__DeleteItemResp *message,
++ uint8_t *out);
++size_t sr__delete_item_resp__pack_to_buffer
++ (const Sr__DeleteItemResp *message,
++ ProtobufCBuffer *buffer);
++Sr__DeleteItemResp *
++ sr__delete_item_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__delete_item_resp__free_unpacked
++ (Sr__DeleteItemResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__MoveItemReq methods */
++void sr__move_item_req__init
++ (Sr__MoveItemReq *message);
++size_t sr__move_item_req__get_packed_size
++ (const Sr__MoveItemReq *message);
++size_t sr__move_item_req__pack
++ (const Sr__MoveItemReq *message,
++ uint8_t *out);
++size_t sr__move_item_req__pack_to_buffer
++ (const Sr__MoveItemReq *message,
++ ProtobufCBuffer *buffer);
++Sr__MoveItemReq *
++ sr__move_item_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__move_item_req__free_unpacked
++ (Sr__MoveItemReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__MoveItemResp methods */
++void sr__move_item_resp__init
++ (Sr__MoveItemResp *message);
++size_t sr__move_item_resp__get_packed_size
++ (const Sr__MoveItemResp *message);
++size_t sr__move_item_resp__pack
++ (const Sr__MoveItemResp *message,
++ uint8_t *out);
++size_t sr__move_item_resp__pack_to_buffer
++ (const Sr__MoveItemResp *message,
++ ProtobufCBuffer *buffer);
++Sr__MoveItemResp *
++ sr__move_item_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__move_item_resp__free_unpacked
++ (Sr__MoveItemResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__ValidateReq methods */
++void sr__validate_req__init
++ (Sr__ValidateReq *message);
++size_t sr__validate_req__get_packed_size
++ (const Sr__ValidateReq *message);
++size_t sr__validate_req__pack
++ (const Sr__ValidateReq *message,
++ uint8_t *out);
++size_t sr__validate_req__pack_to_buffer
++ (const Sr__ValidateReq *message,
++ ProtobufCBuffer *buffer);
++Sr__ValidateReq *
++ sr__validate_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__validate_req__free_unpacked
++ (Sr__ValidateReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__ValidateResp methods */
++void sr__validate_resp__init
++ (Sr__ValidateResp *message);
++size_t sr__validate_resp__get_packed_size
++ (const Sr__ValidateResp *message);
++size_t sr__validate_resp__pack
++ (const Sr__ValidateResp *message,
++ uint8_t *out);
++size_t sr__validate_resp__pack_to_buffer
++ (const Sr__ValidateResp *message,
++ ProtobufCBuffer *buffer);
++Sr__ValidateResp *
++ sr__validate_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__validate_resp__free_unpacked
++ (Sr__ValidateResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__CommitReq methods */
++void sr__commit_req__init
++ (Sr__CommitReq *message);
++size_t sr__commit_req__get_packed_size
++ (const Sr__CommitReq *message);
++size_t sr__commit_req__pack
++ (const Sr__CommitReq *message,
++ uint8_t *out);
++size_t sr__commit_req__pack_to_buffer
++ (const Sr__CommitReq *message,
++ ProtobufCBuffer *buffer);
++Sr__CommitReq *
++ sr__commit_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__commit_req__free_unpacked
++ (Sr__CommitReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__CommitResp methods */
++void sr__commit_resp__init
++ (Sr__CommitResp *message);
++size_t sr__commit_resp__get_packed_size
++ (const Sr__CommitResp *message);
++size_t sr__commit_resp__pack
++ (const Sr__CommitResp *message,
++ uint8_t *out);
++size_t sr__commit_resp__pack_to_buffer
++ (const Sr__CommitResp *message,
++ ProtobufCBuffer *buffer);
++Sr__CommitResp *
++ sr__commit_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__commit_resp__free_unpacked
++ (Sr__CommitResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__DiscardChangesReq methods */
++void sr__discard_changes_req__init
++ (Sr__DiscardChangesReq *message);
++size_t sr__discard_changes_req__get_packed_size
++ (const Sr__DiscardChangesReq *message);
++size_t sr__discard_changes_req__pack
++ (const Sr__DiscardChangesReq *message,
++ uint8_t *out);
++size_t sr__discard_changes_req__pack_to_buffer
++ (const Sr__DiscardChangesReq *message,
++ ProtobufCBuffer *buffer);
++Sr__DiscardChangesReq *
++ sr__discard_changes_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__discard_changes_req__free_unpacked
++ (Sr__DiscardChangesReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__DiscardChangesResp methods */
++void sr__discard_changes_resp__init
++ (Sr__DiscardChangesResp *message);
++size_t sr__discard_changes_resp__get_packed_size
++ (const Sr__DiscardChangesResp *message);
++size_t sr__discard_changes_resp__pack
++ (const Sr__DiscardChangesResp *message,
++ uint8_t *out);
++size_t sr__discard_changes_resp__pack_to_buffer
++ (const Sr__DiscardChangesResp *message,
++ ProtobufCBuffer *buffer);
++Sr__DiscardChangesResp *
++ sr__discard_changes_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__discard_changes_resp__free_unpacked
++ (Sr__DiscardChangesResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__CopyConfigReq methods */
++void sr__copy_config_req__init
++ (Sr__CopyConfigReq *message);
++size_t sr__copy_config_req__get_packed_size
++ (const Sr__CopyConfigReq *message);
++size_t sr__copy_config_req__pack
++ (const Sr__CopyConfigReq *message,
++ uint8_t *out);
++size_t sr__copy_config_req__pack_to_buffer
++ (const Sr__CopyConfigReq *message,
++ ProtobufCBuffer *buffer);
++Sr__CopyConfigReq *
++ sr__copy_config_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__copy_config_req__free_unpacked
++ (Sr__CopyConfigReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__CopyConfigResp methods */
++void sr__copy_config_resp__init
++ (Sr__CopyConfigResp *message);
++size_t sr__copy_config_resp__get_packed_size
++ (const Sr__CopyConfigResp *message);
++size_t sr__copy_config_resp__pack
++ (const Sr__CopyConfigResp *message,
++ uint8_t *out);
++size_t sr__copy_config_resp__pack_to_buffer
++ (const Sr__CopyConfigResp *message,
++ ProtobufCBuffer *buffer);
++Sr__CopyConfigResp *
++ sr__copy_config_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__copy_config_resp__free_unpacked
++ (Sr__CopyConfigResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__LockReq methods */
++void sr__lock_req__init
++ (Sr__LockReq *message);
++size_t sr__lock_req__get_packed_size
++ (const Sr__LockReq *message);
++size_t sr__lock_req__pack
++ (const Sr__LockReq *message,
++ uint8_t *out);
++size_t sr__lock_req__pack_to_buffer
++ (const Sr__LockReq *message,
++ ProtobufCBuffer *buffer);
++Sr__LockReq *
++ sr__lock_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__lock_req__free_unpacked
++ (Sr__LockReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__LockResp methods */
++void sr__lock_resp__init
++ (Sr__LockResp *message);
++size_t sr__lock_resp__get_packed_size
++ (const Sr__LockResp *message);
++size_t sr__lock_resp__pack
++ (const Sr__LockResp *message,
++ uint8_t *out);
++size_t sr__lock_resp__pack_to_buffer
++ (const Sr__LockResp *message,
++ ProtobufCBuffer *buffer);
++Sr__LockResp *
++ sr__lock_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__lock_resp__free_unpacked
++ (Sr__LockResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__UnlockReq methods */
++void sr__unlock_req__init
++ (Sr__UnlockReq *message);
++size_t sr__unlock_req__get_packed_size
++ (const Sr__UnlockReq *message);
++size_t sr__unlock_req__pack
++ (const Sr__UnlockReq *message,
++ uint8_t *out);
++size_t sr__unlock_req__pack_to_buffer
++ (const Sr__UnlockReq *message,
++ ProtobufCBuffer *buffer);
++Sr__UnlockReq *
++ sr__unlock_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__unlock_req__free_unpacked
++ (Sr__UnlockReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__UnlockResp methods */
++void sr__unlock_resp__init
++ (Sr__UnlockResp *message);
++size_t sr__unlock_resp__get_packed_size
++ (const Sr__UnlockResp *message);
++size_t sr__unlock_resp__pack
++ (const Sr__UnlockResp *message,
++ uint8_t *out);
++size_t sr__unlock_resp__pack_to_buffer
++ (const Sr__UnlockResp *message,
++ ProtobufCBuffer *buffer);
++Sr__UnlockResp *
++ sr__unlock_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__unlock_resp__free_unpacked
++ (Sr__UnlockResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SubscribeReq methods */
++void sr__subscribe_req__init
++ (Sr__SubscribeReq *message);
++size_t sr__subscribe_req__get_packed_size
++ (const Sr__SubscribeReq *message);
++size_t sr__subscribe_req__pack
++ (const Sr__SubscribeReq *message,
++ uint8_t *out);
++size_t sr__subscribe_req__pack_to_buffer
++ (const Sr__SubscribeReq *message,
++ ProtobufCBuffer *buffer);
++Sr__SubscribeReq *
++ sr__subscribe_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__subscribe_req__free_unpacked
++ (Sr__SubscribeReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SubscribeResp methods */
++void sr__subscribe_resp__init
++ (Sr__SubscribeResp *message);
++size_t sr__subscribe_resp__get_packed_size
++ (const Sr__SubscribeResp *message);
++size_t sr__subscribe_resp__pack
++ (const Sr__SubscribeResp *message,
++ uint8_t *out);
++size_t sr__subscribe_resp__pack_to_buffer
++ (const Sr__SubscribeResp *message,
++ ProtobufCBuffer *buffer);
++Sr__SubscribeResp *
++ sr__subscribe_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__subscribe_resp__free_unpacked
++ (Sr__SubscribeResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__UnsubscribeReq methods */
++void sr__unsubscribe_req__init
++ (Sr__UnsubscribeReq *message);
++size_t sr__unsubscribe_req__get_packed_size
++ (const Sr__UnsubscribeReq *message);
++size_t sr__unsubscribe_req__pack
++ (const Sr__UnsubscribeReq *message,
++ uint8_t *out);
++size_t sr__unsubscribe_req__pack_to_buffer
++ (const Sr__UnsubscribeReq *message,
++ ProtobufCBuffer *buffer);
++Sr__UnsubscribeReq *
++ sr__unsubscribe_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__unsubscribe_req__free_unpacked
++ (Sr__UnsubscribeReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__UnsubscribeResp methods */
++void sr__unsubscribe_resp__init
++ (Sr__UnsubscribeResp *message);
++size_t sr__unsubscribe_resp__get_packed_size
++ (const Sr__UnsubscribeResp *message);
++size_t sr__unsubscribe_resp__pack
++ (const Sr__UnsubscribeResp *message,
++ uint8_t *out);
++size_t sr__unsubscribe_resp__pack_to_buffer
++ (const Sr__UnsubscribeResp *message,
++ ProtobufCBuffer *buffer);
++Sr__UnsubscribeResp *
++ sr__unsubscribe_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__unsubscribe_resp__free_unpacked
++ (Sr__UnsubscribeResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__CheckEnabledRunningReq methods */
++void sr__check_enabled_running_req__init
++ (Sr__CheckEnabledRunningReq *message);
++size_t sr__check_enabled_running_req__get_packed_size
++ (const Sr__CheckEnabledRunningReq *message);
++size_t sr__check_enabled_running_req__pack
++ (const Sr__CheckEnabledRunningReq *message,
++ uint8_t *out);
++size_t sr__check_enabled_running_req__pack_to_buffer
++ (const Sr__CheckEnabledRunningReq *message,
++ ProtobufCBuffer *buffer);
++Sr__CheckEnabledRunningReq *
++ sr__check_enabled_running_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__check_enabled_running_req__free_unpacked
++ (Sr__CheckEnabledRunningReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__CheckEnabledRunningResp methods */
++void sr__check_enabled_running_resp__init
++ (Sr__CheckEnabledRunningResp *message);
++size_t sr__check_enabled_running_resp__get_packed_size
++ (const Sr__CheckEnabledRunningResp *message);
++size_t sr__check_enabled_running_resp__pack
++ (const Sr__CheckEnabledRunningResp *message,
++ uint8_t *out);
++size_t sr__check_enabled_running_resp__pack_to_buffer
++ (const Sr__CheckEnabledRunningResp *message,
++ ProtobufCBuffer *buffer);
++Sr__CheckEnabledRunningResp *
++ sr__check_enabled_running_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__check_enabled_running_resp__free_unpacked
++ (Sr__CheckEnabledRunningResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__ModuleInstallNotification methods */
++void sr__module_install_notification__init
++ (Sr__ModuleInstallNotification *message);
++size_t sr__module_install_notification__get_packed_size
++ (const Sr__ModuleInstallNotification *message);
++size_t sr__module_install_notification__pack
++ (const Sr__ModuleInstallNotification *message,
++ uint8_t *out);
++size_t sr__module_install_notification__pack_to_buffer
++ (const Sr__ModuleInstallNotification *message,
++ ProtobufCBuffer *buffer);
++Sr__ModuleInstallNotification *
++ sr__module_install_notification__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__module_install_notification__free_unpacked
++ (Sr__ModuleInstallNotification *message,
++ ProtobufCAllocator *allocator);
++/* Sr__FeatureEnableNotification methods */
++void sr__feature_enable_notification__init
++ (Sr__FeatureEnableNotification *message);
++size_t sr__feature_enable_notification__get_packed_size
++ (const Sr__FeatureEnableNotification *message);
++size_t sr__feature_enable_notification__pack
++ (const Sr__FeatureEnableNotification *message,
++ uint8_t *out);
++size_t sr__feature_enable_notification__pack_to_buffer
++ (const Sr__FeatureEnableNotification *message,
++ ProtobufCBuffer *buffer);
++Sr__FeatureEnableNotification *
++ sr__feature_enable_notification__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__feature_enable_notification__free_unpacked
++ (Sr__FeatureEnableNotification *message,
++ ProtobufCAllocator *allocator);
++/* Sr__ModuleChangeNotification methods */
++void sr__module_change_notification__init
++ (Sr__ModuleChangeNotification *message);
++size_t sr__module_change_notification__get_packed_size
++ (const Sr__ModuleChangeNotification *message);
++size_t sr__module_change_notification__pack
++ (const Sr__ModuleChangeNotification *message,
++ uint8_t *out);
++size_t sr__module_change_notification__pack_to_buffer
++ (const Sr__ModuleChangeNotification *message,
++ ProtobufCBuffer *buffer);
++Sr__ModuleChangeNotification *
++ sr__module_change_notification__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__module_change_notification__free_unpacked
++ (Sr__ModuleChangeNotification *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SubtreeChangeNotification methods */
++void sr__subtree_change_notification__init
++ (Sr__SubtreeChangeNotification *message);
++size_t sr__subtree_change_notification__get_packed_size
++ (const Sr__SubtreeChangeNotification *message);
++size_t sr__subtree_change_notification__pack
++ (const Sr__SubtreeChangeNotification *message,
++ uint8_t *out);
++size_t sr__subtree_change_notification__pack_to_buffer
++ (const Sr__SubtreeChangeNotification *message,
++ ProtobufCBuffer *buffer);
++Sr__SubtreeChangeNotification *
++ sr__subtree_change_notification__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__subtree_change_notification__free_unpacked
++ (Sr__SubtreeChangeNotification *message,
++ ProtobufCAllocator *allocator);
++/* Sr__Change methods */
++void sr__change__init
++ (Sr__Change *message);
++size_t sr__change__get_packed_size
++ (const Sr__Change *message);
++size_t sr__change__pack
++ (const Sr__Change *message,
++ uint8_t *out);
++size_t sr__change__pack_to_buffer
++ (const Sr__Change *message,
++ ProtobufCBuffer *buffer);
++Sr__Change *
++ sr__change__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__change__free_unpacked
++ (Sr__Change *message,
++ ProtobufCAllocator *allocator);
++/* Sr__GetChangesReq methods */
++void sr__get_changes_req__init
++ (Sr__GetChangesReq *message);
++size_t sr__get_changes_req__get_packed_size
++ (const Sr__GetChangesReq *message);
++size_t sr__get_changes_req__pack
++ (const Sr__GetChangesReq *message,
++ uint8_t *out);
++size_t sr__get_changes_req__pack_to_buffer
++ (const Sr__GetChangesReq *message,
++ ProtobufCBuffer *buffer);
++Sr__GetChangesReq *
++ sr__get_changes_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__get_changes_req__free_unpacked
++ (Sr__GetChangesReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__GetChangesResp methods */
++void sr__get_changes_resp__init
++ (Sr__GetChangesResp *message);
++size_t sr__get_changes_resp__get_packed_size
++ (const Sr__GetChangesResp *message);
++size_t sr__get_changes_resp__pack
++ (const Sr__GetChangesResp *message,
++ uint8_t *out);
++size_t sr__get_changes_resp__pack_to_buffer
++ (const Sr__GetChangesResp *message,
++ ProtobufCBuffer *buffer);
++Sr__GetChangesResp *
++ sr__get_changes_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__get_changes_resp__free_unpacked
++ (Sr__GetChangesResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__CheckExecPermReq methods */
++void sr__check_exec_perm_req__init
++ (Sr__CheckExecPermReq *message);
++size_t sr__check_exec_perm_req__get_packed_size
++ (const Sr__CheckExecPermReq *message);
++size_t sr__check_exec_perm_req__pack
++ (const Sr__CheckExecPermReq *message,
++ uint8_t *out);
++size_t sr__check_exec_perm_req__pack_to_buffer
++ (const Sr__CheckExecPermReq *message,
++ ProtobufCBuffer *buffer);
++Sr__CheckExecPermReq *
++ sr__check_exec_perm_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__check_exec_perm_req__free_unpacked
++ (Sr__CheckExecPermReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__CheckExecPermResp methods */
++void sr__check_exec_perm_resp__init
++ (Sr__CheckExecPermResp *message);
++size_t sr__check_exec_perm_resp__get_packed_size
++ (const Sr__CheckExecPermResp *message);
++size_t sr__check_exec_perm_resp__pack
++ (const Sr__CheckExecPermResp *message,
++ uint8_t *out);
++size_t sr__check_exec_perm_resp__pack_to_buffer
++ (const Sr__CheckExecPermResp *message,
++ ProtobufCBuffer *buffer);
++Sr__CheckExecPermResp *
++ sr__check_exec_perm_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__check_exec_perm_resp__free_unpacked
++ (Sr__CheckExecPermResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__RPCReq methods */
++void sr__rpcreq__init
++ (Sr__RPCReq *message);
++size_t sr__rpcreq__get_packed_size
++ (const Sr__RPCReq *message);
++size_t sr__rpcreq__pack
++ (const Sr__RPCReq *message,
++ uint8_t *out);
++size_t sr__rpcreq__pack_to_buffer
++ (const Sr__RPCReq *message,
++ ProtobufCBuffer *buffer);
++Sr__RPCReq *
++ sr__rpcreq__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__rpcreq__free_unpacked
++ (Sr__RPCReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__RPCResp methods */
++void sr__rpcresp__init
++ (Sr__RPCResp *message);
++size_t sr__rpcresp__get_packed_size
++ (const Sr__RPCResp *message);
++size_t sr__rpcresp__pack
++ (const Sr__RPCResp *message,
++ uint8_t *out);
++size_t sr__rpcresp__pack_to_buffer
++ (const Sr__RPCResp *message,
++ ProtobufCBuffer *buffer);
++Sr__RPCResp *
++ sr__rpcresp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__rpcresp__free_unpacked
++ (Sr__RPCResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__EventNotifReq methods */
++void sr__event_notif_req__init
++ (Sr__EventNotifReq *message);
++size_t sr__event_notif_req__get_packed_size
++ (const Sr__EventNotifReq *message);
++size_t sr__event_notif_req__pack
++ (const Sr__EventNotifReq *message,
++ uint8_t *out);
++size_t sr__event_notif_req__pack_to_buffer
++ (const Sr__EventNotifReq *message,
++ ProtobufCBuffer *buffer);
++Sr__EventNotifReq *
++ sr__event_notif_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__event_notif_req__free_unpacked
++ (Sr__EventNotifReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__EventNotifResp methods */
++void sr__event_notif_resp__init
++ (Sr__EventNotifResp *message);
++size_t sr__event_notif_resp__get_packed_size
++ (const Sr__EventNotifResp *message);
++size_t sr__event_notif_resp__pack
++ (const Sr__EventNotifResp *message,
++ uint8_t *out);
++size_t sr__event_notif_resp__pack_to_buffer
++ (const Sr__EventNotifResp *message,
++ ProtobufCBuffer *buffer);
++Sr__EventNotifResp *
++ sr__event_notif_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__event_notif_resp__free_unpacked
++ (Sr__EventNotifResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__EventNotifReplayReq methods */
++void sr__event_notif_replay_req__init
++ (Sr__EventNotifReplayReq *message);
++size_t sr__event_notif_replay_req__get_packed_size
++ (const Sr__EventNotifReplayReq *message);
++size_t sr__event_notif_replay_req__pack
++ (const Sr__EventNotifReplayReq *message,
++ uint8_t *out);
++size_t sr__event_notif_replay_req__pack_to_buffer
++ (const Sr__EventNotifReplayReq *message,
++ ProtobufCBuffer *buffer);
++Sr__EventNotifReplayReq *
++ sr__event_notif_replay_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__event_notif_replay_req__free_unpacked
++ (Sr__EventNotifReplayReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__EventNotifReplayResp methods */
++void sr__event_notif_replay_resp__init
++ (Sr__EventNotifReplayResp *message);
++size_t sr__event_notif_replay_resp__get_packed_size
++ (const Sr__EventNotifReplayResp *message);
++size_t sr__event_notif_replay_resp__pack
++ (const Sr__EventNotifReplayResp *message,
++ uint8_t *out);
++size_t sr__event_notif_replay_resp__pack_to_buffer
++ (const Sr__EventNotifReplayResp *message,
++ ProtobufCBuffer *buffer);
++Sr__EventNotifReplayResp *
++ sr__event_notif_replay_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__event_notif_replay_resp__free_unpacked
++ (Sr__EventNotifReplayResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__DataProvideReq methods */
++void sr__data_provide_req__init
++ (Sr__DataProvideReq *message);
++size_t sr__data_provide_req__get_packed_size
++ (const Sr__DataProvideReq *message);
++size_t sr__data_provide_req__pack
++ (const Sr__DataProvideReq *message,
++ uint8_t *out);
++size_t sr__data_provide_req__pack_to_buffer
++ (const Sr__DataProvideReq *message,
++ ProtobufCBuffer *buffer);
++Sr__DataProvideReq *
++ sr__data_provide_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__data_provide_req__free_unpacked
++ (Sr__DataProvideReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__DataProvideResp methods */
++void sr__data_provide_resp__init
++ (Sr__DataProvideResp *message);
++size_t sr__data_provide_resp__get_packed_size
++ (const Sr__DataProvideResp *message);
++size_t sr__data_provide_resp__pack
++ (const Sr__DataProvideResp *message,
++ uint8_t *out);
++size_t sr__data_provide_resp__pack_to_buffer
++ (const Sr__DataProvideResp *message,
++ ProtobufCBuffer *buffer);
++Sr__DataProvideResp *
++ sr__data_provide_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__data_provide_resp__free_unpacked
++ (Sr__DataProvideResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__ModuleInstallReq methods */
++void sr__module_install_req__init
++ (Sr__ModuleInstallReq *message);
++size_t sr__module_install_req__get_packed_size
++ (const Sr__ModuleInstallReq *message);
++size_t sr__module_install_req__pack
++ (const Sr__ModuleInstallReq *message,
++ uint8_t *out);
++size_t sr__module_install_req__pack_to_buffer
++ (const Sr__ModuleInstallReq *message,
++ ProtobufCBuffer *buffer);
++Sr__ModuleInstallReq *
++ sr__module_install_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__module_install_req__free_unpacked
++ (Sr__ModuleInstallReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__ModuleInstallResp methods */
++void sr__module_install_resp__init
++ (Sr__ModuleInstallResp *message);
++size_t sr__module_install_resp__get_packed_size
++ (const Sr__ModuleInstallResp *message);
++size_t sr__module_install_resp__pack
++ (const Sr__ModuleInstallResp *message,
++ uint8_t *out);
++size_t sr__module_install_resp__pack_to_buffer
++ (const Sr__ModuleInstallResp *message,
++ ProtobufCBuffer *buffer);
++Sr__ModuleInstallResp *
++ sr__module_install_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__module_install_resp__free_unpacked
++ (Sr__ModuleInstallResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__FeatureEnableReq methods */
++void sr__feature_enable_req__init
++ (Sr__FeatureEnableReq *message);
++size_t sr__feature_enable_req__get_packed_size
++ (const Sr__FeatureEnableReq *message);
++size_t sr__feature_enable_req__pack
++ (const Sr__FeatureEnableReq *message,
++ uint8_t *out);
++size_t sr__feature_enable_req__pack_to_buffer
++ (const Sr__FeatureEnableReq *message,
++ ProtobufCBuffer *buffer);
++Sr__FeatureEnableReq *
++ sr__feature_enable_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__feature_enable_req__free_unpacked
++ (Sr__FeatureEnableReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__FeatureEnableResp methods */
++void sr__feature_enable_resp__init
++ (Sr__FeatureEnableResp *message);
++size_t sr__feature_enable_resp__get_packed_size
++ (const Sr__FeatureEnableResp *message);
++size_t sr__feature_enable_resp__pack
++ (const Sr__FeatureEnableResp *message,
++ uint8_t *out);
++size_t sr__feature_enable_resp__pack_to_buffer
++ (const Sr__FeatureEnableResp *message,
++ ProtobufCBuffer *buffer);
++Sr__FeatureEnableResp *
++ sr__feature_enable_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__feature_enable_resp__free_unpacked
++ (Sr__FeatureEnableResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__UnsubscribeDestinationReq methods */
++void sr__unsubscribe_destination_req__init
++ (Sr__UnsubscribeDestinationReq *message);
++size_t sr__unsubscribe_destination_req__get_packed_size
++ (const Sr__UnsubscribeDestinationReq *message);
++size_t sr__unsubscribe_destination_req__pack
++ (const Sr__UnsubscribeDestinationReq *message,
++ uint8_t *out);
++size_t sr__unsubscribe_destination_req__pack_to_buffer
++ (const Sr__UnsubscribeDestinationReq *message,
++ ProtobufCBuffer *buffer);
++Sr__UnsubscribeDestinationReq *
++ sr__unsubscribe_destination_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__unsubscribe_destination_req__free_unpacked
++ (Sr__UnsubscribeDestinationReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__CommitTimeoutReq methods */
++void sr__commit_timeout_req__init
++ (Sr__CommitTimeoutReq *message);
++size_t sr__commit_timeout_req__get_packed_size
++ (const Sr__CommitTimeoutReq *message);
++size_t sr__commit_timeout_req__pack
++ (const Sr__CommitTimeoutReq *message,
++ uint8_t *out);
++size_t sr__commit_timeout_req__pack_to_buffer
++ (const Sr__CommitTimeoutReq *message,
++ ProtobufCBuffer *buffer);
++Sr__CommitTimeoutReq *
++ sr__commit_timeout_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__commit_timeout_req__free_unpacked
++ (Sr__CommitTimeoutReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__OperDataTimeoutReq methods */
++void sr__oper_data_timeout_req__init
++ (Sr__OperDataTimeoutReq *message);
++size_t sr__oper_data_timeout_req__get_packed_size
++ (const Sr__OperDataTimeoutReq *message);
++size_t sr__oper_data_timeout_req__pack
++ (const Sr__OperDataTimeoutReq *message,
++ uint8_t *out);
++size_t sr__oper_data_timeout_req__pack_to_buffer
++ (const Sr__OperDataTimeoutReq *message,
++ ProtobufCBuffer *buffer);
++Sr__OperDataTimeoutReq *
++ sr__oper_data_timeout_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__oper_data_timeout_req__free_unpacked
++ (Sr__OperDataTimeoutReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__InternalStateDataReq methods */
++void sr__internal_state_data_req__init
++ (Sr__InternalStateDataReq *message);
++size_t sr__internal_state_data_req__get_packed_size
++ (const Sr__InternalStateDataReq *message);
++size_t sr__internal_state_data_req__pack
++ (const Sr__InternalStateDataReq *message,
++ uint8_t *out);
++size_t sr__internal_state_data_req__pack_to_buffer
++ (const Sr__InternalStateDataReq *message,
++ ProtobufCBuffer *buffer);
++Sr__InternalStateDataReq *
++ sr__internal_state_data_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__internal_state_data_req__free_unpacked
++ (Sr__InternalStateDataReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__NotifStoreCleanupReq methods */
++void sr__notif_store_cleanup_req__init
++ (Sr__NotifStoreCleanupReq *message);
++size_t sr__notif_store_cleanup_req__get_packed_size
++ (const Sr__NotifStoreCleanupReq *message);
++size_t sr__notif_store_cleanup_req__pack
++ (const Sr__NotifStoreCleanupReq *message,
++ uint8_t *out);
++size_t sr__notif_store_cleanup_req__pack_to_buffer
++ (const Sr__NotifStoreCleanupReq *message,
++ ProtobufCBuffer *buffer);
++Sr__NotifStoreCleanupReq *
++ sr__notif_store_cleanup_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__notif_store_cleanup_req__free_unpacked
++ (Sr__NotifStoreCleanupReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__DelayedMsgReq methods */
++void sr__delayed_msg_req__init
++ (Sr__DelayedMsgReq *message);
++size_t sr__delayed_msg_req__get_packed_size
++ (const Sr__DelayedMsgReq *message);
++size_t sr__delayed_msg_req__pack
++ (const Sr__DelayedMsgReq *message,
++ uint8_t *out);
++size_t sr__delayed_msg_req__pack_to_buffer
++ (const Sr__DelayedMsgReq *message,
++ ProtobufCBuffer *buffer);
++Sr__DelayedMsgReq *
++ sr__delayed_msg_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__delayed_msg_req__free_unpacked
++ (Sr__DelayedMsgReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__NacmReloadReq methods */
++void sr__nacm_reload_req__init
++ (Sr__NacmReloadReq *message);
++size_t sr__nacm_reload_req__get_packed_size
++ (const Sr__NacmReloadReq *message);
++size_t sr__nacm_reload_req__pack
++ (const Sr__NacmReloadReq *message,
++ uint8_t *out);
++size_t sr__nacm_reload_req__pack_to_buffer
++ (const Sr__NacmReloadReq *message,
++ ProtobufCBuffer *buffer);
++Sr__NacmReloadReq *
++ sr__nacm_reload_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__nacm_reload_req__free_unpacked
++ (Sr__NacmReloadReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__Request methods */
++void sr__request__init
++ (Sr__Request *message);
++size_t sr__request__get_packed_size
++ (const Sr__Request *message);
++size_t sr__request__pack
++ (const Sr__Request *message,
++ uint8_t *out);
++size_t sr__request__pack_to_buffer
++ (const Sr__Request *message,
++ ProtobufCBuffer *buffer);
++Sr__Request *
++ sr__request__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__request__free_unpacked
++ (Sr__Request *message,
++ ProtobufCAllocator *allocator);
++/* Sr__Response methods */
++void sr__response__init
++ (Sr__Response *message);
++size_t sr__response__get_packed_size
++ (const Sr__Response *message);
++size_t sr__response__pack
++ (const Sr__Response *message,
++ uint8_t *out);
++size_t sr__response__pack_to_buffer
++ (const Sr__Response *message,
++ ProtobufCBuffer *buffer);
++Sr__Response *
++ sr__response__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__response__free_unpacked
++ (Sr__Response *message,
++ ProtobufCAllocator *allocator);
++/* Sr__Notification methods */
++void sr__notification__init
++ (Sr__Notification *message);
++size_t sr__notification__get_packed_size
++ (const Sr__Notification *message);
++size_t sr__notification__pack
++ (const Sr__Notification *message,
++ uint8_t *out);
++size_t sr__notification__pack_to_buffer
++ (const Sr__Notification *message,
++ ProtobufCBuffer *buffer);
++Sr__Notification *
++ sr__notification__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__notification__free_unpacked
++ (Sr__Notification *message,
++ ProtobufCAllocator *allocator);
++/* Sr__NotificationAck methods */
++void sr__notification_ack__init
++ (Sr__NotificationAck *message);
++size_t sr__notification_ack__get_packed_size
++ (const Sr__NotificationAck *message);
++size_t sr__notification_ack__pack
++ (const Sr__NotificationAck *message,
++ uint8_t *out);
++size_t sr__notification_ack__pack_to_buffer
++ (const Sr__NotificationAck *message,
++ ProtobufCBuffer *buffer);
++Sr__NotificationAck *
++ sr__notification_ack__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__notification_ack__free_unpacked
++ (Sr__NotificationAck *message,
++ ProtobufCAllocator *allocator);
++/* Sr__InternalRequest methods */
++void sr__internal_request__init
++ (Sr__InternalRequest *message);
++size_t sr__internal_request__get_packed_size
++ (const Sr__InternalRequest *message);
++size_t sr__internal_request__pack
++ (const Sr__InternalRequest *message,
++ uint8_t *out);
++size_t sr__internal_request__pack_to_buffer
++ (const Sr__InternalRequest *message,
++ ProtobufCBuffer *buffer);
++Sr__InternalRequest *
++ sr__internal_request__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__internal_request__free_unpacked
++ (Sr__InternalRequest *message,
++ ProtobufCAllocator *allocator);
++/* Sr__Msg methods */
++void sr__msg__init
++ (Sr__Msg *message);
++size_t sr__msg__get_packed_size
++ (const Sr__Msg *message);
++size_t sr__msg__pack
++ (const Sr__Msg *message,
++ uint8_t *out);
++size_t sr__msg__pack_to_buffer
++ (const Sr__Msg *message,
++ ProtobufCBuffer *buffer);
++Sr__Msg *
++ sr__msg__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__msg__free_unpacked
++ (Sr__Msg *message,
++ ProtobufCAllocator *allocator);
++/* --- per-message closures --- */
++
++typedef void (*Sr__Value_Closure)
++ (const Sr__Value *message,
++ void *closure_data);
++typedef void (*Sr__Node_Closure)
++ (const Sr__Node *message,
++ void *closure_data);
++typedef void (*Sr__Error_Closure)
++ (const Sr__Error *message,
++ void *closure_data);
++typedef void (*Sr__SessionStartReq_Closure)
++ (const Sr__SessionStartReq *message,
++ void *closure_data);
++typedef void (*Sr__SessionStartResp_Closure)
++ (const Sr__SessionStartResp *message,
++ void *closure_data);
++typedef void (*Sr__SessionStopReq_Closure)
++ (const Sr__SessionStopReq *message,
++ void *closure_data);
++typedef void (*Sr__SessionStopResp_Closure)
++ (const Sr__SessionStopResp *message,
++ void *closure_data);
++typedef void (*Sr__SessionRefreshReq_Closure)
++ (const Sr__SessionRefreshReq *message,
++ void *closure_data);
++typedef void (*Sr__SessionRefreshResp_Closure)
++ (const Sr__SessionRefreshResp *message,
++ void *closure_data);
++typedef void (*Sr__SessionCheckReq_Closure)
++ (const Sr__SessionCheckReq *message,
++ void *closure_data);
++typedef void (*Sr__SessionCheckResp_Closure)
++ (const Sr__SessionCheckResp *message,
++ void *closure_data);
++typedef void (*Sr__SessionSwitchDsReq_Closure)
++ (const Sr__SessionSwitchDsReq *message,
++ void *closure_data);
++typedef void (*Sr__SessionSwitchDsResp_Closure)
++ (const Sr__SessionSwitchDsResp *message,
++ void *closure_data);
++typedef void (*Sr__SessionSetOptsReq_Closure)
++ (const Sr__SessionSetOptsReq *message,
++ void *closure_data);
++typedef void (*Sr__SessionSetOptsResp_Closure)
++ (const Sr__SessionSetOptsResp *message,
++ void *closure_data);
++typedef void (*Sr__VersionVerifyReq_Closure)
++ (const Sr__VersionVerifyReq *message,
++ void *closure_data);
++typedef void (*Sr__VersionVerifyResp_Closure)
++ (const Sr__VersionVerifyResp *message,
++ void *closure_data);
++typedef void (*Sr__SchemaRevision_Closure)
++ (const Sr__SchemaRevision *message,
++ void *closure_data);
++typedef void (*Sr__SchemaSubmodule_Closure)
++ (const Sr__SchemaSubmodule *message,
++ void *closure_data);
++typedef void (*Sr__Schema_Closure)
++ (const Sr__Schema *message,
++ void *closure_data);
++typedef void (*Sr__ListSchemasReq_Closure)
++ (const Sr__ListSchemasReq *message,
++ void *closure_data);
++typedef void (*Sr__ListSchemasResp_Closure)
++ (const Sr__ListSchemasResp *message,
++ void *closure_data);
++typedef void (*Sr__GetSchemaReq_Closure)
++ (const Sr__GetSchemaReq *message,
++ void *closure_data);
++typedef void (*Sr__GetSchemaResp_Closure)
++ (const Sr__GetSchemaResp *message,
++ void *closure_data);
++typedef void (*Sr__GetItemReq_Closure)
++ (const Sr__GetItemReq *message,
++ void *closure_data);
++typedef void (*Sr__GetItemResp_Closure)
++ (const Sr__GetItemResp *message,
++ void *closure_data);
++typedef void (*Sr__GetItemsReq_Closure)
++ (const Sr__GetItemsReq *message,
++ void *closure_data);
++typedef void (*Sr__GetItemsResp_Closure)
++ (const Sr__GetItemsResp *message,
++ void *closure_data);
++typedef void (*Sr__GetSubtreeReq_Closure)
++ (const Sr__GetSubtreeReq *message,
++ void *closure_data);
++typedef void (*Sr__GetSubtreeResp_Closure)
++ (const Sr__GetSubtreeResp *message,
++ void *closure_data);
++typedef void (*Sr__GetSubtreesReq_Closure)
++ (const Sr__GetSubtreesReq *message,
++ void *closure_data);
++typedef void (*Sr__GetSubtreesResp_Closure)
++ (const Sr__GetSubtreesResp *message,
++ void *closure_data);
++typedef void (*Sr__GetSubtreeChunkReq_Closure)
++ (const Sr__GetSubtreeChunkReq *message,
++ void *closure_data);
++typedef void (*Sr__GetSubtreeChunkResp_Closure)
++ (const Sr__GetSubtreeChunkResp *message,
++ void *closure_data);
++typedef void (*Sr__SetItemReq_Closure)
++ (const Sr__SetItemReq *message,
++ void *closure_data);
++typedef void (*Sr__SetItemResp_Closure)
++ (const Sr__SetItemResp *message,
++ void *closure_data);
++typedef void (*Sr__SetItemStrReq_Closure)
++ (const Sr__SetItemStrReq *message,
++ void *closure_data);
++typedef void (*Sr__SetItemStrResp_Closure)
++ (const Sr__SetItemStrResp *message,
++ void *closure_data);
++typedef void (*Sr__DeleteItemReq_Closure)
++ (const Sr__DeleteItemReq *message,
++ void *closure_data);
++typedef void (*Sr__DeleteItemResp_Closure)
++ (const Sr__DeleteItemResp *message,
++ void *closure_data);
++typedef void (*Sr__MoveItemReq_Closure)
++ (const Sr__MoveItemReq *message,
++ void *closure_data);
++typedef void (*Sr__MoveItemResp_Closure)
++ (const Sr__MoveItemResp *message,
++ void *closure_data);
++typedef void (*Sr__ValidateReq_Closure)
++ (const Sr__ValidateReq *message,
++ void *closure_data);
++typedef void (*Sr__ValidateResp_Closure)
++ (const Sr__ValidateResp *message,
++ void *closure_data);
++typedef void (*Sr__CommitReq_Closure)
++ (const Sr__CommitReq *message,
++ void *closure_data);
++typedef void (*Sr__CommitResp_Closure)
++ (const Sr__CommitResp *message,
++ void *closure_data);
++typedef void (*Sr__DiscardChangesReq_Closure)
++ (const Sr__DiscardChangesReq *message,
++ void *closure_data);
++typedef void (*Sr__DiscardChangesResp_Closure)
++ (const Sr__DiscardChangesResp *message,
++ void *closure_data);
++typedef void (*Sr__CopyConfigReq_Closure)
++ (const Sr__CopyConfigReq *message,
++ void *closure_data);
++typedef void (*Sr__CopyConfigResp_Closure)
++ (const Sr__CopyConfigResp *message,
++ void *closure_data);
++typedef void (*Sr__LockReq_Closure)
++ (const Sr__LockReq *message,
++ void *closure_data);
++typedef void (*Sr__LockResp_Closure)
++ (const Sr__LockResp *message,
++ void *closure_data);
++typedef void (*Sr__UnlockReq_Closure)
++ (const Sr__UnlockReq *message,
++ void *closure_data);
++typedef void (*Sr__UnlockResp_Closure)
++ (const Sr__UnlockResp *message,
++ void *closure_data);
++typedef void (*Sr__SubscribeReq_Closure)
++ (const Sr__SubscribeReq *message,
++ void *closure_data);
++typedef void (*Sr__SubscribeResp_Closure)
++ (const Sr__SubscribeResp *message,
++ void *closure_data);
++typedef void (*Sr__UnsubscribeReq_Closure)
++ (const Sr__UnsubscribeReq *message,
++ void *closure_data);
++typedef void (*Sr__UnsubscribeResp_Closure)
++ (const Sr__UnsubscribeResp *message,
++ void *closure_data);
++typedef void (*Sr__CheckEnabledRunningReq_Closure)
++ (const Sr__CheckEnabledRunningReq *message,
++ void *closure_data);
++typedef void (*Sr__CheckEnabledRunningResp_Closure)
++ (const Sr__CheckEnabledRunningResp *message,
++ void *closure_data);
++typedef void (*Sr__ModuleInstallNotification_Closure)
++ (const Sr__ModuleInstallNotification *message,
++ void *closure_data);
++typedef void (*Sr__FeatureEnableNotification_Closure)
++ (const Sr__FeatureEnableNotification *message,
++ void *closure_data);
++typedef void (*Sr__ModuleChangeNotification_Closure)
++ (const Sr__ModuleChangeNotification *message,
++ void *closure_data);
++typedef void (*Sr__SubtreeChangeNotification_Closure)
++ (const Sr__SubtreeChangeNotification *message,
++ void *closure_data);
++typedef void (*Sr__Change_Closure)
++ (const Sr__Change *message,
++ void *closure_data);
++typedef void (*Sr__GetChangesReq_Closure)
++ (const Sr__GetChangesReq *message,
++ void *closure_data);
++typedef void (*Sr__GetChangesResp_Closure)
++ (const Sr__GetChangesResp *message,
++ void *closure_data);
++typedef void (*Sr__CheckExecPermReq_Closure)
++ (const Sr__CheckExecPermReq *message,
++ void *closure_data);
++typedef void (*Sr__CheckExecPermResp_Closure)
++ (const Sr__CheckExecPermResp *message,
++ void *closure_data);
++typedef void (*Sr__RPCReq_Closure)
++ (const Sr__RPCReq *message,
++ void *closure_data);
++typedef void (*Sr__RPCResp_Closure)
++ (const Sr__RPCResp *message,
++ void *closure_data);
++typedef void (*Sr__EventNotifReq_Closure)
++ (const Sr__EventNotifReq *message,
++ void *closure_data);
++typedef void (*Sr__EventNotifResp_Closure)
++ (const Sr__EventNotifResp *message,
++ void *closure_data);
++typedef void (*Sr__EventNotifReplayReq_Closure)
++ (const Sr__EventNotifReplayReq *message,
++ void *closure_data);
++typedef void (*Sr__EventNotifReplayResp_Closure)
++ (const Sr__EventNotifReplayResp *message,
++ void *closure_data);
++typedef void (*Sr__DataProvideReq_Closure)
++ (const Sr__DataProvideReq *message,
++ void *closure_data);
++typedef void (*Sr__DataProvideResp_Closure)
++ (const Sr__DataProvideResp *message,
++ void *closure_data);
++typedef void (*Sr__ModuleInstallReq_Closure)
++ (const Sr__ModuleInstallReq *message,
++ void *closure_data);
++typedef void (*Sr__ModuleInstallResp_Closure)
++ (const Sr__ModuleInstallResp *message,
++ void *closure_data);
++typedef void (*Sr__FeatureEnableReq_Closure)
++ (const Sr__FeatureEnableReq *message,
++ void *closure_data);
++typedef void (*Sr__FeatureEnableResp_Closure)
++ (const Sr__FeatureEnableResp *message,
++ void *closure_data);
++typedef void (*Sr__UnsubscribeDestinationReq_Closure)
++ (const Sr__UnsubscribeDestinationReq *message,
++ void *closure_data);
++typedef void (*Sr__CommitTimeoutReq_Closure)
++ (const Sr__CommitTimeoutReq *message,
++ void *closure_data);
++typedef void (*Sr__OperDataTimeoutReq_Closure)
++ (const Sr__OperDataTimeoutReq *message,
++ void *closure_data);
++typedef void (*Sr__InternalStateDataReq_Closure)
++ (const Sr__InternalStateDataReq *message,
++ void *closure_data);
++typedef void (*Sr__NotifStoreCleanupReq_Closure)
++ (const Sr__NotifStoreCleanupReq *message,
++ void *closure_data);
++typedef void (*Sr__DelayedMsgReq_Closure)
++ (const Sr__DelayedMsgReq *message,
++ void *closure_data);
++typedef void (*Sr__NacmReloadReq_Closure)
++ (const Sr__NacmReloadReq *message,
++ void *closure_data);
++typedef void (*Sr__Request_Closure)
++ (const Sr__Request *message,
++ void *closure_data);
++typedef void (*Sr__Response_Closure)
++ (const Sr__Response *message,
++ void *closure_data);
++typedef void (*Sr__Notification_Closure)
++ (const Sr__Notification *message,
++ void *closure_data);
++typedef void (*Sr__NotificationAck_Closure)
++ (const Sr__NotificationAck *message,
++ void *closure_data);
++typedef void (*Sr__InternalRequest_Closure)
++ (const Sr__InternalRequest *message,
++ void *closure_data);
++typedef void (*Sr__Msg_Closure)
++ (const Sr__Msg *message,
++ void *closure_data);
++
++/* --- services --- */
++
++
++/* --- descriptors --- */
++
++extern const ProtobufCEnumDescriptor sr__api_variant__descriptor;
++extern const ProtobufCEnumDescriptor sr__data_store__descriptor;
++extern const ProtobufCEnumDescriptor sr__session_flags__descriptor;
++extern const ProtobufCEnumDescriptor sr__edit_flags__descriptor;
++extern const ProtobufCEnumDescriptor sr__subscription_type__descriptor;
++extern const ProtobufCEnumDescriptor sr__notification_event__descriptor;
++extern const ProtobufCEnumDescriptor sr__module_state__descriptor;
++extern const ProtobufCEnumDescriptor sr__change_operation__descriptor;
++extern const ProtobufCEnumDescriptor sr__operation__descriptor;
++extern const ProtobufCMessageDescriptor sr__value__descriptor;
++extern const ProtobufCEnumDescriptor sr__value__types__descriptor;
++extern const ProtobufCMessageDescriptor sr__node__descriptor;
++extern const ProtobufCMessageDescriptor sr__error__descriptor;
++extern const ProtobufCMessageDescriptor sr__session_start_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__session_start_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__session_stop_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__session_stop_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__session_refresh_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__session_refresh_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__session_check_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__session_check_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__session_switch_ds_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__session_switch_ds_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__session_set_opts_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__session_set_opts_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__version_verify_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__version_verify_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__schema_revision__descriptor;
++extern const ProtobufCMessageDescriptor sr__schema_submodule__descriptor;
++extern const ProtobufCMessageDescriptor sr__schema__descriptor;
++extern const ProtobufCMessageDescriptor sr__list_schemas_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__list_schemas_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__get_schema_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__get_schema_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__get_item_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__get_item_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__get_items_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__get_items_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__get_subtree_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__get_subtree_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__get_subtrees_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__get_subtrees_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__get_subtree_chunk_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__get_subtree_chunk_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__set_item_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__set_item_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__set_item_str_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__set_item_str_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__delete_item_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__delete_item_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__move_item_req__descriptor;
++extern const ProtobufCEnumDescriptor sr__move_item_req__move_position__descriptor;
++extern const ProtobufCMessageDescriptor sr__move_item_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__validate_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__validate_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__commit_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__commit_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__discard_changes_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__discard_changes_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__copy_config_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__copy_config_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__lock_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__lock_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__unlock_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__unlock_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__subscribe_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__subscribe_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__unsubscribe_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__unsubscribe_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__check_enabled_running_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__check_enabled_running_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__module_install_notification__descriptor;
++extern const ProtobufCMessageDescriptor sr__feature_enable_notification__descriptor;
++extern const ProtobufCMessageDescriptor sr__module_change_notification__descriptor;
++extern const ProtobufCMessageDescriptor sr__subtree_change_notification__descriptor;
++extern const ProtobufCMessageDescriptor sr__change__descriptor;
++extern const ProtobufCMessageDescriptor sr__get_changes_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__get_changes_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__check_exec_perm_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__check_exec_perm_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__rpcreq__descriptor;
++extern const ProtobufCMessageDescriptor sr__rpcresp__descriptor;
++extern const ProtobufCMessageDescriptor sr__event_notif_req__descriptor;
++extern const ProtobufCEnumDescriptor sr__event_notif_req__notif_type__descriptor;
++extern const ProtobufCEnumDescriptor sr__event_notif_req__notif_flags__descriptor;
++extern const ProtobufCMessageDescriptor sr__event_notif_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__event_notif_replay_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__event_notif_replay_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__data_provide_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__data_provide_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__module_install_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__module_install_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__feature_enable_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__feature_enable_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__unsubscribe_destination_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__commit_timeout_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__oper_data_timeout_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__internal_state_data_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__notif_store_cleanup_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__delayed_msg_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__nacm_reload_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__request__descriptor;
++extern const ProtobufCMessageDescriptor sr__response__descriptor;
++extern const ProtobufCMessageDescriptor sr__notification__descriptor;
++extern const ProtobufCMessageDescriptor sr__notification_ack__descriptor;
++extern const ProtobufCMessageDescriptor sr__internal_request__descriptor;
++extern const ProtobufCMessageDescriptor sr__msg__descriptor;
++extern const ProtobufCEnumDescriptor sr__msg__msg_type__descriptor;
++
++PROTOBUF_C__END_DECLS
++
++
++#endif /* PROTOBUF_C_sysrepo_2eproto__INCLUDED */
+++ /dev/null
-Index: sysrepo-7aa2f18d234267403147df92c0005c871f0aa840/src/CMakeLists.txt
-===================================================================
---- sysrepo-7aa2f18d234267403147df92c0005c871f0aa840.orig/src/CMakeLists.txt
-+++ sysrepo-7aa2f18d234267403147df92c0005c871f0aa840/src/CMakeLists.txt
-@@ -21,14 +21,6 @@ set(GENERATED_PROTO_H "${COMMON_BIN_DIR}
- set(GENERATED_PROTO_C "${COMMON_BIN_DIR}/${PROTO_NAME}.pb-c.c")
-
- get_filename_component(ABS_PATH ${PROTO_FILE} PATH)
--add_custom_command(
-- OUTPUT "${GENERATED_PROTO_C}"
-- "${GENERATED_PROTO_H}"
-- COMMAND ${PROTOBUFC_PROTOC_EXECUTABLE}
-- ARGS --c_out ${COMMON_BIN_DIR} -I ${ABS_PATH} ${PROTO_FILE}
-- DEPENDS ${PROTO_FILE}
-- COMMENT "Running C protocol buffer compiler on ${PROTO_FILE}"
-- VERBATIM )
-
- configure_file("${COMMON_DIR}/sr_constants.h.in" "${COMMON_BIN_DIR}/sr_constants.h" ESCAPE_QUOTES @ONLY)
-
-Index: sysrepo-7aa2f18d234267403147df92c0005c871f0aa840/src/common/sysrepo.pb-c.c
-===================================================================
---- /dev/null
-+++ sysrepo-7aa2f18d234267403147df92c0005c871f0aa840/src/common/sysrepo.pb-c.c
-@@ -0,0 +1,10537 @@
-+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
-+/* Generated from: sysrepo.proto */
-+
-+/* Do not generate deprecated warnings for self */
-+#ifndef PROTOBUF_C__NO_DEPRECATED
-+#define PROTOBUF_C__NO_DEPRECATED
-+#endif
-+
-+#include "sysrepo.pb-c.h"
-+void sr__value__init
-+ (Sr__Value *message)
-+{
-+ static Sr__Value init_value = SR__VALUE__INIT;
-+ *message = init_value;
-+}
-+size_t sr__value__get_packed_size
-+ (const Sr__Value *message)
-+{
-+ assert(message->base.descriptor == &sr__value__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__value__pack
-+ (const Sr__Value *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__value__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__value__pack_to_buffer
-+ (const Sr__Value *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__value__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__Value *
-+ sr__value__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__Value *)
-+ protobuf_c_message_unpack (&sr__value__descriptor,
-+ allocator, len, data);
-+}
-+void sr__value__free_unpacked
-+ (Sr__Value *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__value__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__node__init
-+ (Sr__Node *message)
-+{
-+ static Sr__Node init_value = SR__NODE__INIT;
-+ *message = init_value;
-+}
-+size_t sr__node__get_packed_size
-+ (const Sr__Node *message)
-+{
-+ assert(message->base.descriptor == &sr__node__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__node__pack
-+ (const Sr__Node *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__node__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__node__pack_to_buffer
-+ (const Sr__Node *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__node__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__Node *
-+ sr__node__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__Node *)
-+ protobuf_c_message_unpack (&sr__node__descriptor,
-+ allocator, len, data);
-+}
-+void sr__node__free_unpacked
-+ (Sr__Node *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__node__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__error__init
-+ (Sr__Error *message)
-+{
-+ static Sr__Error init_value = SR__ERROR__INIT;
-+ *message = init_value;
-+}
-+size_t sr__error__get_packed_size
-+ (const Sr__Error *message)
-+{
-+ assert(message->base.descriptor == &sr__error__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__error__pack
-+ (const Sr__Error *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__error__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__error__pack_to_buffer
-+ (const Sr__Error *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__error__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__Error *
-+ sr__error__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__Error *)
-+ protobuf_c_message_unpack (&sr__error__descriptor,
-+ allocator, len, data);
-+}
-+void sr__error__free_unpacked
-+ (Sr__Error *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__error__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__session_start_req__init
-+ (Sr__SessionStartReq *message)
-+{
-+ static Sr__SessionStartReq init_value = SR__SESSION_START_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__session_start_req__get_packed_size
-+ (const Sr__SessionStartReq *message)
-+{
-+ assert(message->base.descriptor == &sr__session_start_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__session_start_req__pack
-+ (const Sr__SessionStartReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__session_start_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__session_start_req__pack_to_buffer
-+ (const Sr__SessionStartReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__session_start_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SessionStartReq *
-+ sr__session_start_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SessionStartReq *)
-+ protobuf_c_message_unpack (&sr__session_start_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__session_start_req__free_unpacked
-+ (Sr__SessionStartReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__session_start_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__session_start_resp__init
-+ (Sr__SessionStartResp *message)
-+{
-+ static Sr__SessionStartResp init_value = SR__SESSION_START_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__session_start_resp__get_packed_size
-+ (const Sr__SessionStartResp *message)
-+{
-+ assert(message->base.descriptor == &sr__session_start_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__session_start_resp__pack
-+ (const Sr__SessionStartResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__session_start_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__session_start_resp__pack_to_buffer
-+ (const Sr__SessionStartResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__session_start_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SessionStartResp *
-+ sr__session_start_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SessionStartResp *)
-+ protobuf_c_message_unpack (&sr__session_start_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__session_start_resp__free_unpacked
-+ (Sr__SessionStartResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__session_start_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__session_stop_req__init
-+ (Sr__SessionStopReq *message)
-+{
-+ static Sr__SessionStopReq init_value = SR__SESSION_STOP_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__session_stop_req__get_packed_size
-+ (const Sr__SessionStopReq *message)
-+{
-+ assert(message->base.descriptor == &sr__session_stop_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__session_stop_req__pack
-+ (const Sr__SessionStopReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__session_stop_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__session_stop_req__pack_to_buffer
-+ (const Sr__SessionStopReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__session_stop_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SessionStopReq *
-+ sr__session_stop_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SessionStopReq *)
-+ protobuf_c_message_unpack (&sr__session_stop_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__session_stop_req__free_unpacked
-+ (Sr__SessionStopReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__session_stop_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__session_stop_resp__init
-+ (Sr__SessionStopResp *message)
-+{
-+ static Sr__SessionStopResp init_value = SR__SESSION_STOP_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__session_stop_resp__get_packed_size
-+ (const Sr__SessionStopResp *message)
-+{
-+ assert(message->base.descriptor == &sr__session_stop_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__session_stop_resp__pack
-+ (const Sr__SessionStopResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__session_stop_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__session_stop_resp__pack_to_buffer
-+ (const Sr__SessionStopResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__session_stop_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SessionStopResp *
-+ sr__session_stop_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SessionStopResp *)
-+ protobuf_c_message_unpack (&sr__session_stop_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__session_stop_resp__free_unpacked
-+ (Sr__SessionStopResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__session_stop_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__session_refresh_req__init
-+ (Sr__SessionRefreshReq *message)
-+{
-+ static Sr__SessionRefreshReq init_value = SR__SESSION_REFRESH_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__session_refresh_req__get_packed_size
-+ (const Sr__SessionRefreshReq *message)
-+{
-+ assert(message->base.descriptor == &sr__session_refresh_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__session_refresh_req__pack
-+ (const Sr__SessionRefreshReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__session_refresh_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__session_refresh_req__pack_to_buffer
-+ (const Sr__SessionRefreshReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__session_refresh_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SessionRefreshReq *
-+ sr__session_refresh_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SessionRefreshReq *)
-+ protobuf_c_message_unpack (&sr__session_refresh_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__session_refresh_req__free_unpacked
-+ (Sr__SessionRefreshReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__session_refresh_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__session_refresh_resp__init
-+ (Sr__SessionRefreshResp *message)
-+{
-+ static Sr__SessionRefreshResp init_value = SR__SESSION_REFRESH_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__session_refresh_resp__get_packed_size
-+ (const Sr__SessionRefreshResp *message)
-+{
-+ assert(message->base.descriptor == &sr__session_refresh_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__session_refresh_resp__pack
-+ (const Sr__SessionRefreshResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__session_refresh_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__session_refresh_resp__pack_to_buffer
-+ (const Sr__SessionRefreshResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__session_refresh_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SessionRefreshResp *
-+ sr__session_refresh_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SessionRefreshResp *)
-+ protobuf_c_message_unpack (&sr__session_refresh_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__session_refresh_resp__free_unpacked
-+ (Sr__SessionRefreshResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__session_refresh_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__session_check_req__init
-+ (Sr__SessionCheckReq *message)
-+{
-+ static Sr__SessionCheckReq init_value = SR__SESSION_CHECK_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__session_check_req__get_packed_size
-+ (const Sr__SessionCheckReq *message)
-+{
-+ assert(message->base.descriptor == &sr__session_check_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__session_check_req__pack
-+ (const Sr__SessionCheckReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__session_check_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__session_check_req__pack_to_buffer
-+ (const Sr__SessionCheckReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__session_check_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SessionCheckReq *
-+ sr__session_check_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SessionCheckReq *)
-+ protobuf_c_message_unpack (&sr__session_check_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__session_check_req__free_unpacked
-+ (Sr__SessionCheckReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__session_check_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__session_check_resp__init
-+ (Sr__SessionCheckResp *message)
-+{
-+ static Sr__SessionCheckResp init_value = SR__SESSION_CHECK_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__session_check_resp__get_packed_size
-+ (const Sr__SessionCheckResp *message)
-+{
-+ assert(message->base.descriptor == &sr__session_check_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__session_check_resp__pack
-+ (const Sr__SessionCheckResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__session_check_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__session_check_resp__pack_to_buffer
-+ (const Sr__SessionCheckResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__session_check_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SessionCheckResp *
-+ sr__session_check_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SessionCheckResp *)
-+ protobuf_c_message_unpack (&sr__session_check_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__session_check_resp__free_unpacked
-+ (Sr__SessionCheckResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__session_check_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__session_switch_ds_req__init
-+ (Sr__SessionSwitchDsReq *message)
-+{
-+ static Sr__SessionSwitchDsReq init_value = SR__SESSION_SWITCH_DS_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__session_switch_ds_req__get_packed_size
-+ (const Sr__SessionSwitchDsReq *message)
-+{
-+ assert(message->base.descriptor == &sr__session_switch_ds_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__session_switch_ds_req__pack
-+ (const Sr__SessionSwitchDsReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__session_switch_ds_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__session_switch_ds_req__pack_to_buffer
-+ (const Sr__SessionSwitchDsReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__session_switch_ds_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SessionSwitchDsReq *
-+ sr__session_switch_ds_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SessionSwitchDsReq *)
-+ protobuf_c_message_unpack (&sr__session_switch_ds_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__session_switch_ds_req__free_unpacked
-+ (Sr__SessionSwitchDsReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__session_switch_ds_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__session_switch_ds_resp__init
-+ (Sr__SessionSwitchDsResp *message)
-+{
-+ static Sr__SessionSwitchDsResp init_value = SR__SESSION_SWITCH_DS_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__session_switch_ds_resp__get_packed_size
-+ (const Sr__SessionSwitchDsResp *message)
-+{
-+ assert(message->base.descriptor == &sr__session_switch_ds_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__session_switch_ds_resp__pack
-+ (const Sr__SessionSwitchDsResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__session_switch_ds_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__session_switch_ds_resp__pack_to_buffer
-+ (const Sr__SessionSwitchDsResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__session_switch_ds_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SessionSwitchDsResp *
-+ sr__session_switch_ds_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SessionSwitchDsResp *)
-+ protobuf_c_message_unpack (&sr__session_switch_ds_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__session_switch_ds_resp__free_unpacked
-+ (Sr__SessionSwitchDsResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__session_switch_ds_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__session_set_opts_req__init
-+ (Sr__SessionSetOptsReq *message)
-+{
-+ static Sr__SessionSetOptsReq init_value = SR__SESSION_SET_OPTS_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__session_set_opts_req__get_packed_size
-+ (const Sr__SessionSetOptsReq *message)
-+{
-+ assert(message->base.descriptor == &sr__session_set_opts_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__session_set_opts_req__pack
-+ (const Sr__SessionSetOptsReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__session_set_opts_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__session_set_opts_req__pack_to_buffer
-+ (const Sr__SessionSetOptsReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__session_set_opts_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SessionSetOptsReq *
-+ sr__session_set_opts_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SessionSetOptsReq *)
-+ protobuf_c_message_unpack (&sr__session_set_opts_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__session_set_opts_req__free_unpacked
-+ (Sr__SessionSetOptsReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__session_set_opts_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__session_set_opts_resp__init
-+ (Sr__SessionSetOptsResp *message)
-+{
-+ static Sr__SessionSetOptsResp init_value = SR__SESSION_SET_OPTS_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__session_set_opts_resp__get_packed_size
-+ (const Sr__SessionSetOptsResp *message)
-+{
-+ assert(message->base.descriptor == &sr__session_set_opts_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__session_set_opts_resp__pack
-+ (const Sr__SessionSetOptsResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__session_set_opts_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__session_set_opts_resp__pack_to_buffer
-+ (const Sr__SessionSetOptsResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__session_set_opts_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SessionSetOptsResp *
-+ sr__session_set_opts_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SessionSetOptsResp *)
-+ protobuf_c_message_unpack (&sr__session_set_opts_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__session_set_opts_resp__free_unpacked
-+ (Sr__SessionSetOptsResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__session_set_opts_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__version_verify_req__init
-+ (Sr__VersionVerifyReq *message)
-+{
-+ static Sr__VersionVerifyReq init_value = SR__VERSION_VERIFY_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__version_verify_req__get_packed_size
-+ (const Sr__VersionVerifyReq *message)
-+{
-+ assert(message->base.descriptor == &sr__version_verify_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__version_verify_req__pack
-+ (const Sr__VersionVerifyReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__version_verify_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__version_verify_req__pack_to_buffer
-+ (const Sr__VersionVerifyReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__version_verify_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__VersionVerifyReq *
-+ sr__version_verify_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__VersionVerifyReq *)
-+ protobuf_c_message_unpack (&sr__version_verify_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__version_verify_req__free_unpacked
-+ (Sr__VersionVerifyReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__version_verify_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__version_verify_resp__init
-+ (Sr__VersionVerifyResp *message)
-+{
-+ static Sr__VersionVerifyResp init_value = SR__VERSION_VERIFY_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__version_verify_resp__get_packed_size
-+ (const Sr__VersionVerifyResp *message)
-+{
-+ assert(message->base.descriptor == &sr__version_verify_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__version_verify_resp__pack
-+ (const Sr__VersionVerifyResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__version_verify_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__version_verify_resp__pack_to_buffer
-+ (const Sr__VersionVerifyResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__version_verify_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__VersionVerifyResp *
-+ sr__version_verify_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__VersionVerifyResp *)
-+ protobuf_c_message_unpack (&sr__version_verify_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__version_verify_resp__free_unpacked
-+ (Sr__VersionVerifyResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__version_verify_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__schema_revision__init
-+ (Sr__SchemaRevision *message)
-+{
-+ static Sr__SchemaRevision init_value = SR__SCHEMA_REVISION__INIT;
-+ *message = init_value;
-+}
-+size_t sr__schema_revision__get_packed_size
-+ (const Sr__SchemaRevision *message)
-+{
-+ assert(message->base.descriptor == &sr__schema_revision__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__schema_revision__pack
-+ (const Sr__SchemaRevision *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__schema_revision__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__schema_revision__pack_to_buffer
-+ (const Sr__SchemaRevision *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__schema_revision__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SchemaRevision *
-+ sr__schema_revision__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SchemaRevision *)
-+ protobuf_c_message_unpack (&sr__schema_revision__descriptor,
-+ allocator, len, data);
-+}
-+void sr__schema_revision__free_unpacked
-+ (Sr__SchemaRevision *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__schema_revision__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__schema_submodule__init
-+ (Sr__SchemaSubmodule *message)
-+{
-+ static Sr__SchemaSubmodule init_value = SR__SCHEMA_SUBMODULE__INIT;
-+ *message = init_value;
-+}
-+size_t sr__schema_submodule__get_packed_size
-+ (const Sr__SchemaSubmodule *message)
-+{
-+ assert(message->base.descriptor == &sr__schema_submodule__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__schema_submodule__pack
-+ (const Sr__SchemaSubmodule *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__schema_submodule__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__schema_submodule__pack_to_buffer
-+ (const Sr__SchemaSubmodule *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__schema_submodule__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SchemaSubmodule *
-+ sr__schema_submodule__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SchemaSubmodule *)
-+ protobuf_c_message_unpack (&sr__schema_submodule__descriptor,
-+ allocator, len, data);
-+}
-+void sr__schema_submodule__free_unpacked
-+ (Sr__SchemaSubmodule *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__schema_submodule__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__schema__init
-+ (Sr__Schema *message)
-+{
-+ static Sr__Schema init_value = SR__SCHEMA__INIT;
-+ *message = init_value;
-+}
-+size_t sr__schema__get_packed_size
-+ (const Sr__Schema *message)
-+{
-+ assert(message->base.descriptor == &sr__schema__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__schema__pack
-+ (const Sr__Schema *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__schema__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__schema__pack_to_buffer
-+ (const Sr__Schema *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__schema__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__Schema *
-+ sr__schema__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__Schema *)
-+ protobuf_c_message_unpack (&sr__schema__descriptor,
-+ allocator, len, data);
-+}
-+void sr__schema__free_unpacked
-+ (Sr__Schema *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__schema__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__list_schemas_req__init
-+ (Sr__ListSchemasReq *message)
-+{
-+ static Sr__ListSchemasReq init_value = SR__LIST_SCHEMAS_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__list_schemas_req__get_packed_size
-+ (const Sr__ListSchemasReq *message)
-+{
-+ assert(message->base.descriptor == &sr__list_schemas_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__list_schemas_req__pack
-+ (const Sr__ListSchemasReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__list_schemas_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__list_schemas_req__pack_to_buffer
-+ (const Sr__ListSchemasReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__list_schemas_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__ListSchemasReq *
-+ sr__list_schemas_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__ListSchemasReq *)
-+ protobuf_c_message_unpack (&sr__list_schemas_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__list_schemas_req__free_unpacked
-+ (Sr__ListSchemasReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__list_schemas_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__list_schemas_resp__init
-+ (Sr__ListSchemasResp *message)
-+{
-+ static Sr__ListSchemasResp init_value = SR__LIST_SCHEMAS_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__list_schemas_resp__get_packed_size
-+ (const Sr__ListSchemasResp *message)
-+{
-+ assert(message->base.descriptor == &sr__list_schemas_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__list_schemas_resp__pack
-+ (const Sr__ListSchemasResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__list_schemas_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__list_schemas_resp__pack_to_buffer
-+ (const Sr__ListSchemasResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__list_schemas_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__ListSchemasResp *
-+ sr__list_schemas_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__ListSchemasResp *)
-+ protobuf_c_message_unpack (&sr__list_schemas_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__list_schemas_resp__free_unpacked
-+ (Sr__ListSchemasResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__list_schemas_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__get_schema_req__init
-+ (Sr__GetSchemaReq *message)
-+{
-+ static Sr__GetSchemaReq init_value = SR__GET_SCHEMA_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__get_schema_req__get_packed_size
-+ (const Sr__GetSchemaReq *message)
-+{
-+ assert(message->base.descriptor == &sr__get_schema_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__get_schema_req__pack
-+ (const Sr__GetSchemaReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__get_schema_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__get_schema_req__pack_to_buffer
-+ (const Sr__GetSchemaReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__get_schema_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__GetSchemaReq *
-+ sr__get_schema_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__GetSchemaReq *)
-+ protobuf_c_message_unpack (&sr__get_schema_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__get_schema_req__free_unpacked
-+ (Sr__GetSchemaReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__get_schema_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__get_schema_resp__init
-+ (Sr__GetSchemaResp *message)
-+{
-+ static Sr__GetSchemaResp init_value = SR__GET_SCHEMA_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__get_schema_resp__get_packed_size
-+ (const Sr__GetSchemaResp *message)
-+{
-+ assert(message->base.descriptor == &sr__get_schema_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__get_schema_resp__pack
-+ (const Sr__GetSchemaResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__get_schema_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__get_schema_resp__pack_to_buffer
-+ (const Sr__GetSchemaResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__get_schema_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__GetSchemaResp *
-+ sr__get_schema_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__GetSchemaResp *)
-+ protobuf_c_message_unpack (&sr__get_schema_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__get_schema_resp__free_unpacked
-+ (Sr__GetSchemaResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__get_schema_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__get_item_req__init
-+ (Sr__GetItemReq *message)
-+{
-+ static Sr__GetItemReq init_value = SR__GET_ITEM_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__get_item_req__get_packed_size
-+ (const Sr__GetItemReq *message)
-+{
-+ assert(message->base.descriptor == &sr__get_item_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__get_item_req__pack
-+ (const Sr__GetItemReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__get_item_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__get_item_req__pack_to_buffer
-+ (const Sr__GetItemReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__get_item_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__GetItemReq *
-+ sr__get_item_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__GetItemReq *)
-+ protobuf_c_message_unpack (&sr__get_item_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__get_item_req__free_unpacked
-+ (Sr__GetItemReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__get_item_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__get_item_resp__init
-+ (Sr__GetItemResp *message)
-+{
-+ static Sr__GetItemResp init_value = SR__GET_ITEM_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__get_item_resp__get_packed_size
-+ (const Sr__GetItemResp *message)
-+{
-+ assert(message->base.descriptor == &sr__get_item_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__get_item_resp__pack
-+ (const Sr__GetItemResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__get_item_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__get_item_resp__pack_to_buffer
-+ (const Sr__GetItemResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__get_item_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__GetItemResp *
-+ sr__get_item_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__GetItemResp *)
-+ protobuf_c_message_unpack (&sr__get_item_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__get_item_resp__free_unpacked
-+ (Sr__GetItemResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__get_item_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__get_items_req__init
-+ (Sr__GetItemsReq *message)
-+{
-+ static Sr__GetItemsReq init_value = SR__GET_ITEMS_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__get_items_req__get_packed_size
-+ (const Sr__GetItemsReq *message)
-+{
-+ assert(message->base.descriptor == &sr__get_items_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__get_items_req__pack
-+ (const Sr__GetItemsReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__get_items_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__get_items_req__pack_to_buffer
-+ (const Sr__GetItemsReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__get_items_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__GetItemsReq *
-+ sr__get_items_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__GetItemsReq *)
-+ protobuf_c_message_unpack (&sr__get_items_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__get_items_req__free_unpacked
-+ (Sr__GetItemsReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__get_items_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__get_items_resp__init
-+ (Sr__GetItemsResp *message)
-+{
-+ static Sr__GetItemsResp init_value = SR__GET_ITEMS_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__get_items_resp__get_packed_size
-+ (const Sr__GetItemsResp *message)
-+{
-+ assert(message->base.descriptor == &sr__get_items_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__get_items_resp__pack
-+ (const Sr__GetItemsResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__get_items_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__get_items_resp__pack_to_buffer
-+ (const Sr__GetItemsResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__get_items_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__GetItemsResp *
-+ sr__get_items_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__GetItemsResp *)
-+ protobuf_c_message_unpack (&sr__get_items_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__get_items_resp__free_unpacked
-+ (Sr__GetItemsResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__get_items_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__get_subtree_req__init
-+ (Sr__GetSubtreeReq *message)
-+{
-+ static Sr__GetSubtreeReq init_value = SR__GET_SUBTREE_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__get_subtree_req__get_packed_size
-+ (const Sr__GetSubtreeReq *message)
-+{
-+ assert(message->base.descriptor == &sr__get_subtree_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__get_subtree_req__pack
-+ (const Sr__GetSubtreeReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__get_subtree_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__get_subtree_req__pack_to_buffer
-+ (const Sr__GetSubtreeReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__get_subtree_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__GetSubtreeReq *
-+ sr__get_subtree_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__GetSubtreeReq *)
-+ protobuf_c_message_unpack (&sr__get_subtree_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__get_subtree_req__free_unpacked
-+ (Sr__GetSubtreeReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__get_subtree_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__get_subtree_resp__init
-+ (Sr__GetSubtreeResp *message)
-+{
-+ static Sr__GetSubtreeResp init_value = SR__GET_SUBTREE_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__get_subtree_resp__get_packed_size
-+ (const Sr__GetSubtreeResp *message)
-+{
-+ assert(message->base.descriptor == &sr__get_subtree_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__get_subtree_resp__pack
-+ (const Sr__GetSubtreeResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__get_subtree_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__get_subtree_resp__pack_to_buffer
-+ (const Sr__GetSubtreeResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__get_subtree_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__GetSubtreeResp *
-+ sr__get_subtree_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__GetSubtreeResp *)
-+ protobuf_c_message_unpack (&sr__get_subtree_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__get_subtree_resp__free_unpacked
-+ (Sr__GetSubtreeResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__get_subtree_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__get_subtrees_req__init
-+ (Sr__GetSubtreesReq *message)
-+{
-+ static Sr__GetSubtreesReq init_value = SR__GET_SUBTREES_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__get_subtrees_req__get_packed_size
-+ (const Sr__GetSubtreesReq *message)
-+{
-+ assert(message->base.descriptor == &sr__get_subtrees_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__get_subtrees_req__pack
-+ (const Sr__GetSubtreesReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__get_subtrees_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__get_subtrees_req__pack_to_buffer
-+ (const Sr__GetSubtreesReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__get_subtrees_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__GetSubtreesReq *
-+ sr__get_subtrees_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__GetSubtreesReq *)
-+ protobuf_c_message_unpack (&sr__get_subtrees_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__get_subtrees_req__free_unpacked
-+ (Sr__GetSubtreesReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__get_subtrees_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__get_subtrees_resp__init
-+ (Sr__GetSubtreesResp *message)
-+{
-+ static Sr__GetSubtreesResp init_value = SR__GET_SUBTREES_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__get_subtrees_resp__get_packed_size
-+ (const Sr__GetSubtreesResp *message)
-+{
-+ assert(message->base.descriptor == &sr__get_subtrees_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__get_subtrees_resp__pack
-+ (const Sr__GetSubtreesResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__get_subtrees_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__get_subtrees_resp__pack_to_buffer
-+ (const Sr__GetSubtreesResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__get_subtrees_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__GetSubtreesResp *
-+ sr__get_subtrees_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__GetSubtreesResp *)
-+ protobuf_c_message_unpack (&sr__get_subtrees_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__get_subtrees_resp__free_unpacked
-+ (Sr__GetSubtreesResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__get_subtrees_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__get_subtree_chunk_req__init
-+ (Sr__GetSubtreeChunkReq *message)
-+{
-+ static Sr__GetSubtreeChunkReq init_value = SR__GET_SUBTREE_CHUNK_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__get_subtree_chunk_req__get_packed_size
-+ (const Sr__GetSubtreeChunkReq *message)
-+{
-+ assert(message->base.descriptor == &sr__get_subtree_chunk_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__get_subtree_chunk_req__pack
-+ (const Sr__GetSubtreeChunkReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__get_subtree_chunk_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__get_subtree_chunk_req__pack_to_buffer
-+ (const Sr__GetSubtreeChunkReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__get_subtree_chunk_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__GetSubtreeChunkReq *
-+ sr__get_subtree_chunk_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__GetSubtreeChunkReq *)
-+ protobuf_c_message_unpack (&sr__get_subtree_chunk_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__get_subtree_chunk_req__free_unpacked
-+ (Sr__GetSubtreeChunkReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__get_subtree_chunk_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__get_subtree_chunk_resp__init
-+ (Sr__GetSubtreeChunkResp *message)
-+{
-+ static Sr__GetSubtreeChunkResp init_value = SR__GET_SUBTREE_CHUNK_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__get_subtree_chunk_resp__get_packed_size
-+ (const Sr__GetSubtreeChunkResp *message)
-+{
-+ assert(message->base.descriptor == &sr__get_subtree_chunk_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__get_subtree_chunk_resp__pack
-+ (const Sr__GetSubtreeChunkResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__get_subtree_chunk_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__get_subtree_chunk_resp__pack_to_buffer
-+ (const Sr__GetSubtreeChunkResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__get_subtree_chunk_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__GetSubtreeChunkResp *
-+ sr__get_subtree_chunk_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__GetSubtreeChunkResp *)
-+ protobuf_c_message_unpack (&sr__get_subtree_chunk_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__get_subtree_chunk_resp__free_unpacked
-+ (Sr__GetSubtreeChunkResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__get_subtree_chunk_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__set_item_req__init
-+ (Sr__SetItemReq *message)
-+{
-+ static Sr__SetItemReq init_value = SR__SET_ITEM_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__set_item_req__get_packed_size
-+ (const Sr__SetItemReq *message)
-+{
-+ assert(message->base.descriptor == &sr__set_item_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__set_item_req__pack
-+ (const Sr__SetItemReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__set_item_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__set_item_req__pack_to_buffer
-+ (const Sr__SetItemReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__set_item_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SetItemReq *
-+ sr__set_item_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SetItemReq *)
-+ protobuf_c_message_unpack (&sr__set_item_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__set_item_req__free_unpacked
-+ (Sr__SetItemReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__set_item_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__set_item_resp__init
-+ (Sr__SetItemResp *message)
-+{
-+ static Sr__SetItemResp init_value = SR__SET_ITEM_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__set_item_resp__get_packed_size
-+ (const Sr__SetItemResp *message)
-+{
-+ assert(message->base.descriptor == &sr__set_item_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__set_item_resp__pack
-+ (const Sr__SetItemResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__set_item_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__set_item_resp__pack_to_buffer
-+ (const Sr__SetItemResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__set_item_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SetItemResp *
-+ sr__set_item_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SetItemResp *)
-+ protobuf_c_message_unpack (&sr__set_item_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__set_item_resp__free_unpacked
-+ (Sr__SetItemResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__set_item_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__set_item_str_req__init
-+ (Sr__SetItemStrReq *message)
-+{
-+ static Sr__SetItemStrReq init_value = SR__SET_ITEM_STR_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__set_item_str_req__get_packed_size
-+ (const Sr__SetItemStrReq *message)
-+{
-+ assert(message->base.descriptor == &sr__set_item_str_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__set_item_str_req__pack
-+ (const Sr__SetItemStrReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__set_item_str_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__set_item_str_req__pack_to_buffer
-+ (const Sr__SetItemStrReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__set_item_str_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SetItemStrReq *
-+ sr__set_item_str_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SetItemStrReq *)
-+ protobuf_c_message_unpack (&sr__set_item_str_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__set_item_str_req__free_unpacked
-+ (Sr__SetItemStrReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__set_item_str_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__set_item_str_resp__init
-+ (Sr__SetItemStrResp *message)
-+{
-+ static Sr__SetItemStrResp init_value = SR__SET_ITEM_STR_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__set_item_str_resp__get_packed_size
-+ (const Sr__SetItemStrResp *message)
-+{
-+ assert(message->base.descriptor == &sr__set_item_str_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__set_item_str_resp__pack
-+ (const Sr__SetItemStrResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__set_item_str_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__set_item_str_resp__pack_to_buffer
-+ (const Sr__SetItemStrResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__set_item_str_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SetItemStrResp *
-+ sr__set_item_str_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SetItemStrResp *)
-+ protobuf_c_message_unpack (&sr__set_item_str_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__set_item_str_resp__free_unpacked
-+ (Sr__SetItemStrResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__set_item_str_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__delete_item_req__init
-+ (Sr__DeleteItemReq *message)
-+{
-+ static Sr__DeleteItemReq init_value = SR__DELETE_ITEM_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__delete_item_req__get_packed_size
-+ (const Sr__DeleteItemReq *message)
-+{
-+ assert(message->base.descriptor == &sr__delete_item_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__delete_item_req__pack
-+ (const Sr__DeleteItemReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__delete_item_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__delete_item_req__pack_to_buffer
-+ (const Sr__DeleteItemReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__delete_item_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__DeleteItemReq *
-+ sr__delete_item_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__DeleteItemReq *)
-+ protobuf_c_message_unpack (&sr__delete_item_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__delete_item_req__free_unpacked
-+ (Sr__DeleteItemReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__delete_item_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__delete_item_resp__init
-+ (Sr__DeleteItemResp *message)
-+{
-+ static Sr__DeleteItemResp init_value = SR__DELETE_ITEM_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__delete_item_resp__get_packed_size
-+ (const Sr__DeleteItemResp *message)
-+{
-+ assert(message->base.descriptor == &sr__delete_item_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__delete_item_resp__pack
-+ (const Sr__DeleteItemResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__delete_item_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__delete_item_resp__pack_to_buffer
-+ (const Sr__DeleteItemResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__delete_item_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__DeleteItemResp *
-+ sr__delete_item_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__DeleteItemResp *)
-+ protobuf_c_message_unpack (&sr__delete_item_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__delete_item_resp__free_unpacked
-+ (Sr__DeleteItemResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__delete_item_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__move_item_req__init
-+ (Sr__MoveItemReq *message)
-+{
-+ static Sr__MoveItemReq init_value = SR__MOVE_ITEM_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__move_item_req__get_packed_size
-+ (const Sr__MoveItemReq *message)
-+{
-+ assert(message->base.descriptor == &sr__move_item_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__move_item_req__pack
-+ (const Sr__MoveItemReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__move_item_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__move_item_req__pack_to_buffer
-+ (const Sr__MoveItemReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__move_item_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__MoveItemReq *
-+ sr__move_item_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__MoveItemReq *)
-+ protobuf_c_message_unpack (&sr__move_item_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__move_item_req__free_unpacked
-+ (Sr__MoveItemReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__move_item_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__move_item_resp__init
-+ (Sr__MoveItemResp *message)
-+{
-+ static Sr__MoveItemResp init_value = SR__MOVE_ITEM_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__move_item_resp__get_packed_size
-+ (const Sr__MoveItemResp *message)
-+{
-+ assert(message->base.descriptor == &sr__move_item_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__move_item_resp__pack
-+ (const Sr__MoveItemResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__move_item_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__move_item_resp__pack_to_buffer
-+ (const Sr__MoveItemResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__move_item_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__MoveItemResp *
-+ sr__move_item_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__MoveItemResp *)
-+ protobuf_c_message_unpack (&sr__move_item_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__move_item_resp__free_unpacked
-+ (Sr__MoveItemResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__move_item_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__validate_req__init
-+ (Sr__ValidateReq *message)
-+{
-+ static Sr__ValidateReq init_value = SR__VALIDATE_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__validate_req__get_packed_size
-+ (const Sr__ValidateReq *message)
-+{
-+ assert(message->base.descriptor == &sr__validate_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__validate_req__pack
-+ (const Sr__ValidateReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__validate_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__validate_req__pack_to_buffer
-+ (const Sr__ValidateReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__validate_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__ValidateReq *
-+ sr__validate_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__ValidateReq *)
-+ protobuf_c_message_unpack (&sr__validate_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__validate_req__free_unpacked
-+ (Sr__ValidateReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__validate_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__validate_resp__init
-+ (Sr__ValidateResp *message)
-+{
-+ static Sr__ValidateResp init_value = SR__VALIDATE_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__validate_resp__get_packed_size
-+ (const Sr__ValidateResp *message)
-+{
-+ assert(message->base.descriptor == &sr__validate_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__validate_resp__pack
-+ (const Sr__ValidateResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__validate_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__validate_resp__pack_to_buffer
-+ (const Sr__ValidateResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__validate_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__ValidateResp *
-+ sr__validate_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__ValidateResp *)
-+ protobuf_c_message_unpack (&sr__validate_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__validate_resp__free_unpacked
-+ (Sr__ValidateResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__validate_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__commit_req__init
-+ (Sr__CommitReq *message)
-+{
-+ static Sr__CommitReq init_value = SR__COMMIT_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__commit_req__get_packed_size
-+ (const Sr__CommitReq *message)
-+{
-+ assert(message->base.descriptor == &sr__commit_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__commit_req__pack
-+ (const Sr__CommitReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__commit_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__commit_req__pack_to_buffer
-+ (const Sr__CommitReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__commit_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__CommitReq *
-+ sr__commit_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__CommitReq *)
-+ protobuf_c_message_unpack (&sr__commit_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__commit_req__free_unpacked
-+ (Sr__CommitReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__commit_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__commit_resp__init
-+ (Sr__CommitResp *message)
-+{
-+ static Sr__CommitResp init_value = SR__COMMIT_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__commit_resp__get_packed_size
-+ (const Sr__CommitResp *message)
-+{
-+ assert(message->base.descriptor == &sr__commit_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__commit_resp__pack
-+ (const Sr__CommitResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__commit_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__commit_resp__pack_to_buffer
-+ (const Sr__CommitResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__commit_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__CommitResp *
-+ sr__commit_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__CommitResp *)
-+ protobuf_c_message_unpack (&sr__commit_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__commit_resp__free_unpacked
-+ (Sr__CommitResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__commit_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__discard_changes_req__init
-+ (Sr__DiscardChangesReq *message)
-+{
-+ static Sr__DiscardChangesReq init_value = SR__DISCARD_CHANGES_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__discard_changes_req__get_packed_size
-+ (const Sr__DiscardChangesReq *message)
-+{
-+ assert(message->base.descriptor == &sr__discard_changes_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__discard_changes_req__pack
-+ (const Sr__DiscardChangesReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__discard_changes_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__discard_changes_req__pack_to_buffer
-+ (const Sr__DiscardChangesReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__discard_changes_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__DiscardChangesReq *
-+ sr__discard_changes_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__DiscardChangesReq *)
-+ protobuf_c_message_unpack (&sr__discard_changes_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__discard_changes_req__free_unpacked
-+ (Sr__DiscardChangesReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__discard_changes_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__discard_changes_resp__init
-+ (Sr__DiscardChangesResp *message)
-+{
-+ static Sr__DiscardChangesResp init_value = SR__DISCARD_CHANGES_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__discard_changes_resp__get_packed_size
-+ (const Sr__DiscardChangesResp *message)
-+{
-+ assert(message->base.descriptor == &sr__discard_changes_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__discard_changes_resp__pack
-+ (const Sr__DiscardChangesResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__discard_changes_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__discard_changes_resp__pack_to_buffer
-+ (const Sr__DiscardChangesResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__discard_changes_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__DiscardChangesResp *
-+ sr__discard_changes_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__DiscardChangesResp *)
-+ protobuf_c_message_unpack (&sr__discard_changes_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__discard_changes_resp__free_unpacked
-+ (Sr__DiscardChangesResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__discard_changes_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__copy_config_req__init
-+ (Sr__CopyConfigReq *message)
-+{
-+ static Sr__CopyConfigReq init_value = SR__COPY_CONFIG_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__copy_config_req__get_packed_size
-+ (const Sr__CopyConfigReq *message)
-+{
-+ assert(message->base.descriptor == &sr__copy_config_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__copy_config_req__pack
-+ (const Sr__CopyConfigReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__copy_config_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__copy_config_req__pack_to_buffer
-+ (const Sr__CopyConfigReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__copy_config_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__CopyConfigReq *
-+ sr__copy_config_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__CopyConfigReq *)
-+ protobuf_c_message_unpack (&sr__copy_config_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__copy_config_req__free_unpacked
-+ (Sr__CopyConfigReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__copy_config_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__copy_config_resp__init
-+ (Sr__CopyConfigResp *message)
-+{
-+ static Sr__CopyConfigResp init_value = SR__COPY_CONFIG_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__copy_config_resp__get_packed_size
-+ (const Sr__CopyConfigResp *message)
-+{
-+ assert(message->base.descriptor == &sr__copy_config_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__copy_config_resp__pack
-+ (const Sr__CopyConfigResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__copy_config_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__copy_config_resp__pack_to_buffer
-+ (const Sr__CopyConfigResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__copy_config_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__CopyConfigResp *
-+ sr__copy_config_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__CopyConfigResp *)
-+ protobuf_c_message_unpack (&sr__copy_config_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__copy_config_resp__free_unpacked
-+ (Sr__CopyConfigResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__copy_config_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__lock_req__init
-+ (Sr__LockReq *message)
-+{
-+ static Sr__LockReq init_value = SR__LOCK_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__lock_req__get_packed_size
-+ (const Sr__LockReq *message)
-+{
-+ assert(message->base.descriptor == &sr__lock_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__lock_req__pack
-+ (const Sr__LockReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__lock_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__lock_req__pack_to_buffer
-+ (const Sr__LockReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__lock_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__LockReq *
-+ sr__lock_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__LockReq *)
-+ protobuf_c_message_unpack (&sr__lock_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__lock_req__free_unpacked
-+ (Sr__LockReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__lock_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__lock_resp__init
-+ (Sr__LockResp *message)
-+{
-+ static Sr__LockResp init_value = SR__LOCK_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__lock_resp__get_packed_size
-+ (const Sr__LockResp *message)
-+{
-+ assert(message->base.descriptor == &sr__lock_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__lock_resp__pack
-+ (const Sr__LockResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__lock_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__lock_resp__pack_to_buffer
-+ (const Sr__LockResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__lock_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__LockResp *
-+ sr__lock_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__LockResp *)
-+ protobuf_c_message_unpack (&sr__lock_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__lock_resp__free_unpacked
-+ (Sr__LockResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__lock_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__unlock_req__init
-+ (Sr__UnlockReq *message)
-+{
-+ static Sr__UnlockReq init_value = SR__UNLOCK_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__unlock_req__get_packed_size
-+ (const Sr__UnlockReq *message)
-+{
-+ assert(message->base.descriptor == &sr__unlock_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__unlock_req__pack
-+ (const Sr__UnlockReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__unlock_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__unlock_req__pack_to_buffer
-+ (const Sr__UnlockReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__unlock_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__UnlockReq *
-+ sr__unlock_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__UnlockReq *)
-+ protobuf_c_message_unpack (&sr__unlock_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__unlock_req__free_unpacked
-+ (Sr__UnlockReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__unlock_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__unlock_resp__init
-+ (Sr__UnlockResp *message)
-+{
-+ static Sr__UnlockResp init_value = SR__UNLOCK_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__unlock_resp__get_packed_size
-+ (const Sr__UnlockResp *message)
-+{
-+ assert(message->base.descriptor == &sr__unlock_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__unlock_resp__pack
-+ (const Sr__UnlockResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__unlock_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__unlock_resp__pack_to_buffer
-+ (const Sr__UnlockResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__unlock_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__UnlockResp *
-+ sr__unlock_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__UnlockResp *)
-+ protobuf_c_message_unpack (&sr__unlock_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__unlock_resp__free_unpacked
-+ (Sr__UnlockResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__unlock_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__subscribe_req__init
-+ (Sr__SubscribeReq *message)
-+{
-+ static Sr__SubscribeReq init_value = SR__SUBSCRIBE_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__subscribe_req__get_packed_size
-+ (const Sr__SubscribeReq *message)
-+{
-+ assert(message->base.descriptor == &sr__subscribe_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__subscribe_req__pack
-+ (const Sr__SubscribeReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__subscribe_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__subscribe_req__pack_to_buffer
-+ (const Sr__SubscribeReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__subscribe_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SubscribeReq *
-+ sr__subscribe_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SubscribeReq *)
-+ protobuf_c_message_unpack (&sr__subscribe_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__subscribe_req__free_unpacked
-+ (Sr__SubscribeReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__subscribe_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__subscribe_resp__init
-+ (Sr__SubscribeResp *message)
-+{
-+ static Sr__SubscribeResp init_value = SR__SUBSCRIBE_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__subscribe_resp__get_packed_size
-+ (const Sr__SubscribeResp *message)
-+{
-+ assert(message->base.descriptor == &sr__subscribe_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__subscribe_resp__pack
-+ (const Sr__SubscribeResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__subscribe_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__subscribe_resp__pack_to_buffer
-+ (const Sr__SubscribeResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__subscribe_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SubscribeResp *
-+ sr__subscribe_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SubscribeResp *)
-+ protobuf_c_message_unpack (&sr__subscribe_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__subscribe_resp__free_unpacked
-+ (Sr__SubscribeResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__subscribe_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__unsubscribe_req__init
-+ (Sr__UnsubscribeReq *message)
-+{
-+ static Sr__UnsubscribeReq init_value = SR__UNSUBSCRIBE_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__unsubscribe_req__get_packed_size
-+ (const Sr__UnsubscribeReq *message)
-+{
-+ assert(message->base.descriptor == &sr__unsubscribe_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__unsubscribe_req__pack
-+ (const Sr__UnsubscribeReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__unsubscribe_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__unsubscribe_req__pack_to_buffer
-+ (const Sr__UnsubscribeReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__unsubscribe_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__UnsubscribeReq *
-+ sr__unsubscribe_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__UnsubscribeReq *)
-+ protobuf_c_message_unpack (&sr__unsubscribe_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__unsubscribe_req__free_unpacked
-+ (Sr__UnsubscribeReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__unsubscribe_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__unsubscribe_resp__init
-+ (Sr__UnsubscribeResp *message)
-+{
-+ static Sr__UnsubscribeResp init_value = SR__UNSUBSCRIBE_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__unsubscribe_resp__get_packed_size
-+ (const Sr__UnsubscribeResp *message)
-+{
-+ assert(message->base.descriptor == &sr__unsubscribe_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__unsubscribe_resp__pack
-+ (const Sr__UnsubscribeResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__unsubscribe_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__unsubscribe_resp__pack_to_buffer
-+ (const Sr__UnsubscribeResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__unsubscribe_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__UnsubscribeResp *
-+ sr__unsubscribe_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__UnsubscribeResp *)
-+ protobuf_c_message_unpack (&sr__unsubscribe_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__unsubscribe_resp__free_unpacked
-+ (Sr__UnsubscribeResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__unsubscribe_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__check_enabled_running_req__init
-+ (Sr__CheckEnabledRunningReq *message)
-+{
-+ static Sr__CheckEnabledRunningReq init_value = SR__CHECK_ENABLED_RUNNING_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__check_enabled_running_req__get_packed_size
-+ (const Sr__CheckEnabledRunningReq *message)
-+{
-+ assert(message->base.descriptor == &sr__check_enabled_running_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__check_enabled_running_req__pack
-+ (const Sr__CheckEnabledRunningReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__check_enabled_running_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__check_enabled_running_req__pack_to_buffer
-+ (const Sr__CheckEnabledRunningReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__check_enabled_running_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__CheckEnabledRunningReq *
-+ sr__check_enabled_running_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__CheckEnabledRunningReq *)
-+ protobuf_c_message_unpack (&sr__check_enabled_running_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__check_enabled_running_req__free_unpacked
-+ (Sr__CheckEnabledRunningReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__check_enabled_running_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__check_enabled_running_resp__init
-+ (Sr__CheckEnabledRunningResp *message)
-+{
-+ static Sr__CheckEnabledRunningResp init_value = SR__CHECK_ENABLED_RUNNING_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__check_enabled_running_resp__get_packed_size
-+ (const Sr__CheckEnabledRunningResp *message)
-+{
-+ assert(message->base.descriptor == &sr__check_enabled_running_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__check_enabled_running_resp__pack
-+ (const Sr__CheckEnabledRunningResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__check_enabled_running_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__check_enabled_running_resp__pack_to_buffer
-+ (const Sr__CheckEnabledRunningResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__check_enabled_running_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__CheckEnabledRunningResp *
-+ sr__check_enabled_running_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__CheckEnabledRunningResp *)
-+ protobuf_c_message_unpack (&sr__check_enabled_running_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__check_enabled_running_resp__free_unpacked
-+ (Sr__CheckEnabledRunningResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__check_enabled_running_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__module_install_notification__init
-+ (Sr__ModuleInstallNotification *message)
-+{
-+ static Sr__ModuleInstallNotification init_value = SR__MODULE_INSTALL_NOTIFICATION__INIT;
-+ *message = init_value;
-+}
-+size_t sr__module_install_notification__get_packed_size
-+ (const Sr__ModuleInstallNotification *message)
-+{
-+ assert(message->base.descriptor == &sr__module_install_notification__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__module_install_notification__pack
-+ (const Sr__ModuleInstallNotification *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__module_install_notification__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__module_install_notification__pack_to_buffer
-+ (const Sr__ModuleInstallNotification *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__module_install_notification__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__ModuleInstallNotification *
-+ sr__module_install_notification__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__ModuleInstallNotification *)
-+ protobuf_c_message_unpack (&sr__module_install_notification__descriptor,
-+ allocator, len, data);
-+}
-+void sr__module_install_notification__free_unpacked
-+ (Sr__ModuleInstallNotification *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__module_install_notification__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__feature_enable_notification__init
-+ (Sr__FeatureEnableNotification *message)
-+{
-+ static Sr__FeatureEnableNotification init_value = SR__FEATURE_ENABLE_NOTIFICATION__INIT;
-+ *message = init_value;
-+}
-+size_t sr__feature_enable_notification__get_packed_size
-+ (const Sr__FeatureEnableNotification *message)
-+{
-+ assert(message->base.descriptor == &sr__feature_enable_notification__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__feature_enable_notification__pack
-+ (const Sr__FeatureEnableNotification *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__feature_enable_notification__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__feature_enable_notification__pack_to_buffer
-+ (const Sr__FeatureEnableNotification *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__feature_enable_notification__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__FeatureEnableNotification *
-+ sr__feature_enable_notification__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__FeatureEnableNotification *)
-+ protobuf_c_message_unpack (&sr__feature_enable_notification__descriptor,
-+ allocator, len, data);
-+}
-+void sr__feature_enable_notification__free_unpacked
-+ (Sr__FeatureEnableNotification *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__feature_enable_notification__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__module_change_notification__init
-+ (Sr__ModuleChangeNotification *message)
-+{
-+ static Sr__ModuleChangeNotification init_value = SR__MODULE_CHANGE_NOTIFICATION__INIT;
-+ *message = init_value;
-+}
-+size_t sr__module_change_notification__get_packed_size
-+ (const Sr__ModuleChangeNotification *message)
-+{
-+ assert(message->base.descriptor == &sr__module_change_notification__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__module_change_notification__pack
-+ (const Sr__ModuleChangeNotification *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__module_change_notification__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__module_change_notification__pack_to_buffer
-+ (const Sr__ModuleChangeNotification *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__module_change_notification__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__ModuleChangeNotification *
-+ sr__module_change_notification__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__ModuleChangeNotification *)
-+ protobuf_c_message_unpack (&sr__module_change_notification__descriptor,
-+ allocator, len, data);
-+}
-+void sr__module_change_notification__free_unpacked
-+ (Sr__ModuleChangeNotification *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__module_change_notification__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__subtree_change_notification__init
-+ (Sr__SubtreeChangeNotification *message)
-+{
-+ static Sr__SubtreeChangeNotification init_value = SR__SUBTREE_CHANGE_NOTIFICATION__INIT;
-+ *message = init_value;
-+}
-+size_t sr__subtree_change_notification__get_packed_size
-+ (const Sr__SubtreeChangeNotification *message)
-+{
-+ assert(message->base.descriptor == &sr__subtree_change_notification__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__subtree_change_notification__pack
-+ (const Sr__SubtreeChangeNotification *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__subtree_change_notification__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__subtree_change_notification__pack_to_buffer
-+ (const Sr__SubtreeChangeNotification *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__subtree_change_notification__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SubtreeChangeNotification *
-+ sr__subtree_change_notification__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SubtreeChangeNotification *)
-+ protobuf_c_message_unpack (&sr__subtree_change_notification__descriptor,
-+ allocator, len, data);
-+}
-+void sr__subtree_change_notification__free_unpacked
-+ (Sr__SubtreeChangeNotification *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__subtree_change_notification__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__change__init
-+ (Sr__Change *message)
-+{
-+ static Sr__Change init_value = SR__CHANGE__INIT;
-+ *message = init_value;
-+}
-+size_t sr__change__get_packed_size
-+ (const Sr__Change *message)
-+{
-+ assert(message->base.descriptor == &sr__change__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__change__pack
-+ (const Sr__Change *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__change__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__change__pack_to_buffer
-+ (const Sr__Change *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__change__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__Change *
-+ sr__change__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__Change *)
-+ protobuf_c_message_unpack (&sr__change__descriptor,
-+ allocator, len, data);
-+}
-+void sr__change__free_unpacked
-+ (Sr__Change *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__change__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__get_changes_req__init
-+ (Sr__GetChangesReq *message)
-+{
-+ static Sr__GetChangesReq init_value = SR__GET_CHANGES_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__get_changes_req__get_packed_size
-+ (const Sr__GetChangesReq *message)
-+{
-+ assert(message->base.descriptor == &sr__get_changes_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__get_changes_req__pack
-+ (const Sr__GetChangesReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__get_changes_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__get_changes_req__pack_to_buffer
-+ (const Sr__GetChangesReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__get_changes_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__GetChangesReq *
-+ sr__get_changes_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__GetChangesReq *)
-+ protobuf_c_message_unpack (&sr__get_changes_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__get_changes_req__free_unpacked
-+ (Sr__GetChangesReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__get_changes_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__get_changes_resp__init
-+ (Sr__GetChangesResp *message)
-+{
-+ static Sr__GetChangesResp init_value = SR__GET_CHANGES_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__get_changes_resp__get_packed_size
-+ (const Sr__GetChangesResp *message)
-+{
-+ assert(message->base.descriptor == &sr__get_changes_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__get_changes_resp__pack
-+ (const Sr__GetChangesResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__get_changes_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__get_changes_resp__pack_to_buffer
-+ (const Sr__GetChangesResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__get_changes_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__GetChangesResp *
-+ sr__get_changes_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__GetChangesResp *)
-+ protobuf_c_message_unpack (&sr__get_changes_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__get_changes_resp__free_unpacked
-+ (Sr__GetChangesResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__get_changes_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__check_exec_perm_req__init
-+ (Sr__CheckExecPermReq *message)
-+{
-+ static Sr__CheckExecPermReq init_value = SR__CHECK_EXEC_PERM_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__check_exec_perm_req__get_packed_size
-+ (const Sr__CheckExecPermReq *message)
-+{
-+ assert(message->base.descriptor == &sr__check_exec_perm_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__check_exec_perm_req__pack
-+ (const Sr__CheckExecPermReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__check_exec_perm_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__check_exec_perm_req__pack_to_buffer
-+ (const Sr__CheckExecPermReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__check_exec_perm_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__CheckExecPermReq *
-+ sr__check_exec_perm_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__CheckExecPermReq *)
-+ protobuf_c_message_unpack (&sr__check_exec_perm_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__check_exec_perm_req__free_unpacked
-+ (Sr__CheckExecPermReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__check_exec_perm_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__check_exec_perm_resp__init
-+ (Sr__CheckExecPermResp *message)
-+{
-+ static Sr__CheckExecPermResp init_value = SR__CHECK_EXEC_PERM_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__check_exec_perm_resp__get_packed_size
-+ (const Sr__CheckExecPermResp *message)
-+{
-+ assert(message->base.descriptor == &sr__check_exec_perm_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__check_exec_perm_resp__pack
-+ (const Sr__CheckExecPermResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__check_exec_perm_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__check_exec_perm_resp__pack_to_buffer
-+ (const Sr__CheckExecPermResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__check_exec_perm_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__CheckExecPermResp *
-+ sr__check_exec_perm_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__CheckExecPermResp *)
-+ protobuf_c_message_unpack (&sr__check_exec_perm_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__check_exec_perm_resp__free_unpacked
-+ (Sr__CheckExecPermResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__check_exec_perm_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__rpcreq__init
-+ (Sr__RPCReq *message)
-+{
-+ static Sr__RPCReq init_value = SR__RPCREQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__rpcreq__get_packed_size
-+ (const Sr__RPCReq *message)
-+{
-+ assert(message->base.descriptor == &sr__rpcreq__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__rpcreq__pack
-+ (const Sr__RPCReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__rpcreq__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__rpcreq__pack_to_buffer
-+ (const Sr__RPCReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__rpcreq__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__RPCReq *
-+ sr__rpcreq__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__RPCReq *)
-+ protobuf_c_message_unpack (&sr__rpcreq__descriptor,
-+ allocator, len, data);
-+}
-+void sr__rpcreq__free_unpacked
-+ (Sr__RPCReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__rpcreq__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__rpcresp__init
-+ (Sr__RPCResp *message)
-+{
-+ static Sr__RPCResp init_value = SR__RPCRESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__rpcresp__get_packed_size
-+ (const Sr__RPCResp *message)
-+{
-+ assert(message->base.descriptor == &sr__rpcresp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__rpcresp__pack
-+ (const Sr__RPCResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__rpcresp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__rpcresp__pack_to_buffer
-+ (const Sr__RPCResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__rpcresp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__RPCResp *
-+ sr__rpcresp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__RPCResp *)
-+ protobuf_c_message_unpack (&sr__rpcresp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__rpcresp__free_unpacked
-+ (Sr__RPCResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__rpcresp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__event_notif_req__init
-+ (Sr__EventNotifReq *message)
-+{
-+ static Sr__EventNotifReq init_value = SR__EVENT_NOTIF_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__event_notif_req__get_packed_size
-+ (const Sr__EventNotifReq *message)
-+{
-+ assert(message->base.descriptor == &sr__event_notif_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__event_notif_req__pack
-+ (const Sr__EventNotifReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__event_notif_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__event_notif_req__pack_to_buffer
-+ (const Sr__EventNotifReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__event_notif_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__EventNotifReq *
-+ sr__event_notif_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__EventNotifReq *)
-+ protobuf_c_message_unpack (&sr__event_notif_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__event_notif_req__free_unpacked
-+ (Sr__EventNotifReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__event_notif_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__event_notif_resp__init
-+ (Sr__EventNotifResp *message)
-+{
-+ static Sr__EventNotifResp init_value = SR__EVENT_NOTIF_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__event_notif_resp__get_packed_size
-+ (const Sr__EventNotifResp *message)
-+{
-+ assert(message->base.descriptor == &sr__event_notif_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__event_notif_resp__pack
-+ (const Sr__EventNotifResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__event_notif_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__event_notif_resp__pack_to_buffer
-+ (const Sr__EventNotifResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__event_notif_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__EventNotifResp *
-+ sr__event_notif_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__EventNotifResp *)
-+ protobuf_c_message_unpack (&sr__event_notif_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__event_notif_resp__free_unpacked
-+ (Sr__EventNotifResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__event_notif_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__event_notif_replay_req__init
-+ (Sr__EventNotifReplayReq *message)
-+{
-+ static Sr__EventNotifReplayReq init_value = SR__EVENT_NOTIF_REPLAY_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__event_notif_replay_req__get_packed_size
-+ (const Sr__EventNotifReplayReq *message)
-+{
-+ assert(message->base.descriptor == &sr__event_notif_replay_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__event_notif_replay_req__pack
-+ (const Sr__EventNotifReplayReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__event_notif_replay_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__event_notif_replay_req__pack_to_buffer
-+ (const Sr__EventNotifReplayReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__event_notif_replay_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__EventNotifReplayReq *
-+ sr__event_notif_replay_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__EventNotifReplayReq *)
-+ protobuf_c_message_unpack (&sr__event_notif_replay_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__event_notif_replay_req__free_unpacked
-+ (Sr__EventNotifReplayReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__event_notif_replay_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__event_notif_replay_resp__init
-+ (Sr__EventNotifReplayResp *message)
-+{
-+ static Sr__EventNotifReplayResp init_value = SR__EVENT_NOTIF_REPLAY_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__event_notif_replay_resp__get_packed_size
-+ (const Sr__EventNotifReplayResp *message)
-+{
-+ assert(message->base.descriptor == &sr__event_notif_replay_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__event_notif_replay_resp__pack
-+ (const Sr__EventNotifReplayResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__event_notif_replay_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__event_notif_replay_resp__pack_to_buffer
-+ (const Sr__EventNotifReplayResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__event_notif_replay_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__EventNotifReplayResp *
-+ sr__event_notif_replay_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__EventNotifReplayResp *)
-+ protobuf_c_message_unpack (&sr__event_notif_replay_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__event_notif_replay_resp__free_unpacked
-+ (Sr__EventNotifReplayResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__event_notif_replay_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__data_provide_req__init
-+ (Sr__DataProvideReq *message)
-+{
-+ static Sr__DataProvideReq init_value = SR__DATA_PROVIDE_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__data_provide_req__get_packed_size
-+ (const Sr__DataProvideReq *message)
-+{
-+ assert(message->base.descriptor == &sr__data_provide_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__data_provide_req__pack
-+ (const Sr__DataProvideReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__data_provide_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__data_provide_req__pack_to_buffer
-+ (const Sr__DataProvideReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__data_provide_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__DataProvideReq *
-+ sr__data_provide_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__DataProvideReq *)
-+ protobuf_c_message_unpack (&sr__data_provide_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__data_provide_req__free_unpacked
-+ (Sr__DataProvideReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__data_provide_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__data_provide_resp__init
-+ (Sr__DataProvideResp *message)
-+{
-+ static Sr__DataProvideResp init_value = SR__DATA_PROVIDE_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__data_provide_resp__get_packed_size
-+ (const Sr__DataProvideResp *message)
-+{
-+ assert(message->base.descriptor == &sr__data_provide_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__data_provide_resp__pack
-+ (const Sr__DataProvideResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__data_provide_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__data_provide_resp__pack_to_buffer
-+ (const Sr__DataProvideResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__data_provide_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__DataProvideResp *
-+ sr__data_provide_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__DataProvideResp *)
-+ protobuf_c_message_unpack (&sr__data_provide_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__data_provide_resp__free_unpacked
-+ (Sr__DataProvideResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__data_provide_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__module_install_req__init
-+ (Sr__ModuleInstallReq *message)
-+{
-+ static Sr__ModuleInstallReq init_value = SR__MODULE_INSTALL_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__module_install_req__get_packed_size
-+ (const Sr__ModuleInstallReq *message)
-+{
-+ assert(message->base.descriptor == &sr__module_install_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__module_install_req__pack
-+ (const Sr__ModuleInstallReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__module_install_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__module_install_req__pack_to_buffer
-+ (const Sr__ModuleInstallReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__module_install_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__ModuleInstallReq *
-+ sr__module_install_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__ModuleInstallReq *)
-+ protobuf_c_message_unpack (&sr__module_install_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__module_install_req__free_unpacked
-+ (Sr__ModuleInstallReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__module_install_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__module_install_resp__init
-+ (Sr__ModuleInstallResp *message)
-+{
-+ static Sr__ModuleInstallResp init_value = SR__MODULE_INSTALL_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__module_install_resp__get_packed_size
-+ (const Sr__ModuleInstallResp *message)
-+{
-+ assert(message->base.descriptor == &sr__module_install_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__module_install_resp__pack
-+ (const Sr__ModuleInstallResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__module_install_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__module_install_resp__pack_to_buffer
-+ (const Sr__ModuleInstallResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__module_install_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__ModuleInstallResp *
-+ sr__module_install_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__ModuleInstallResp *)
-+ protobuf_c_message_unpack (&sr__module_install_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__module_install_resp__free_unpacked
-+ (Sr__ModuleInstallResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__module_install_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__feature_enable_req__init
-+ (Sr__FeatureEnableReq *message)
-+{
-+ static Sr__FeatureEnableReq init_value = SR__FEATURE_ENABLE_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__feature_enable_req__get_packed_size
-+ (const Sr__FeatureEnableReq *message)
-+{
-+ assert(message->base.descriptor == &sr__feature_enable_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__feature_enable_req__pack
-+ (const Sr__FeatureEnableReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__feature_enable_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__feature_enable_req__pack_to_buffer
-+ (const Sr__FeatureEnableReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__feature_enable_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__FeatureEnableReq *
-+ sr__feature_enable_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__FeatureEnableReq *)
-+ protobuf_c_message_unpack (&sr__feature_enable_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__feature_enable_req__free_unpacked
-+ (Sr__FeatureEnableReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__feature_enable_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__feature_enable_resp__init
-+ (Sr__FeatureEnableResp *message)
-+{
-+ static Sr__FeatureEnableResp init_value = SR__FEATURE_ENABLE_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__feature_enable_resp__get_packed_size
-+ (const Sr__FeatureEnableResp *message)
-+{
-+ assert(message->base.descriptor == &sr__feature_enable_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__feature_enable_resp__pack
-+ (const Sr__FeatureEnableResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__feature_enable_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__feature_enable_resp__pack_to_buffer
-+ (const Sr__FeatureEnableResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__feature_enable_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__FeatureEnableResp *
-+ sr__feature_enable_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__FeatureEnableResp *)
-+ protobuf_c_message_unpack (&sr__feature_enable_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__feature_enable_resp__free_unpacked
-+ (Sr__FeatureEnableResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__feature_enable_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__unsubscribe_destination_req__init
-+ (Sr__UnsubscribeDestinationReq *message)
-+{
-+ static Sr__UnsubscribeDestinationReq init_value = SR__UNSUBSCRIBE_DESTINATION_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__unsubscribe_destination_req__get_packed_size
-+ (const Sr__UnsubscribeDestinationReq *message)
-+{
-+ assert(message->base.descriptor == &sr__unsubscribe_destination_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__unsubscribe_destination_req__pack
-+ (const Sr__UnsubscribeDestinationReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__unsubscribe_destination_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__unsubscribe_destination_req__pack_to_buffer
-+ (const Sr__UnsubscribeDestinationReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__unsubscribe_destination_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__UnsubscribeDestinationReq *
-+ sr__unsubscribe_destination_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__UnsubscribeDestinationReq *)
-+ protobuf_c_message_unpack (&sr__unsubscribe_destination_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__unsubscribe_destination_req__free_unpacked
-+ (Sr__UnsubscribeDestinationReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__unsubscribe_destination_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__commit_timeout_req__init
-+ (Sr__CommitTimeoutReq *message)
-+{
-+ static Sr__CommitTimeoutReq init_value = SR__COMMIT_TIMEOUT_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__commit_timeout_req__get_packed_size
-+ (const Sr__CommitTimeoutReq *message)
-+{
-+ assert(message->base.descriptor == &sr__commit_timeout_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__commit_timeout_req__pack
-+ (const Sr__CommitTimeoutReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__commit_timeout_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__commit_timeout_req__pack_to_buffer
-+ (const Sr__CommitTimeoutReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__commit_timeout_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__CommitTimeoutReq *
-+ sr__commit_timeout_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__CommitTimeoutReq *)
-+ protobuf_c_message_unpack (&sr__commit_timeout_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__commit_timeout_req__free_unpacked
-+ (Sr__CommitTimeoutReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__commit_timeout_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__oper_data_timeout_req__init
-+ (Sr__OperDataTimeoutReq *message)
-+{
-+ static Sr__OperDataTimeoutReq init_value = SR__OPER_DATA_TIMEOUT_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__oper_data_timeout_req__get_packed_size
-+ (const Sr__OperDataTimeoutReq *message)
-+{
-+ assert(message->base.descriptor == &sr__oper_data_timeout_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__oper_data_timeout_req__pack
-+ (const Sr__OperDataTimeoutReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__oper_data_timeout_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__oper_data_timeout_req__pack_to_buffer
-+ (const Sr__OperDataTimeoutReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__oper_data_timeout_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__OperDataTimeoutReq *
-+ sr__oper_data_timeout_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__OperDataTimeoutReq *)
-+ protobuf_c_message_unpack (&sr__oper_data_timeout_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__oper_data_timeout_req__free_unpacked
-+ (Sr__OperDataTimeoutReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__oper_data_timeout_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__internal_state_data_req__init
-+ (Sr__InternalStateDataReq *message)
-+{
-+ static Sr__InternalStateDataReq init_value = SR__INTERNAL_STATE_DATA_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__internal_state_data_req__get_packed_size
-+ (const Sr__InternalStateDataReq *message)
-+{
-+ assert(message->base.descriptor == &sr__internal_state_data_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__internal_state_data_req__pack
-+ (const Sr__InternalStateDataReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__internal_state_data_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__internal_state_data_req__pack_to_buffer
-+ (const Sr__InternalStateDataReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__internal_state_data_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__InternalStateDataReq *
-+ sr__internal_state_data_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__InternalStateDataReq *)
-+ protobuf_c_message_unpack (&sr__internal_state_data_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__internal_state_data_req__free_unpacked
-+ (Sr__InternalStateDataReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__internal_state_data_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__notif_store_cleanup_req__init
-+ (Sr__NotifStoreCleanupReq *message)
-+{
-+ static Sr__NotifStoreCleanupReq init_value = SR__NOTIF_STORE_CLEANUP_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__notif_store_cleanup_req__get_packed_size
-+ (const Sr__NotifStoreCleanupReq *message)
-+{
-+ assert(message->base.descriptor == &sr__notif_store_cleanup_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__notif_store_cleanup_req__pack
-+ (const Sr__NotifStoreCleanupReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__notif_store_cleanup_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__notif_store_cleanup_req__pack_to_buffer
-+ (const Sr__NotifStoreCleanupReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__notif_store_cleanup_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__NotifStoreCleanupReq *
-+ sr__notif_store_cleanup_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__NotifStoreCleanupReq *)
-+ protobuf_c_message_unpack (&sr__notif_store_cleanup_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__notif_store_cleanup_req__free_unpacked
-+ (Sr__NotifStoreCleanupReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__notif_store_cleanup_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__delayed_msg_req__init
-+ (Sr__DelayedMsgReq *message)
-+{
-+ static Sr__DelayedMsgReq init_value = SR__DELAYED_MSG_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__delayed_msg_req__get_packed_size
-+ (const Sr__DelayedMsgReq *message)
-+{
-+ assert(message->base.descriptor == &sr__delayed_msg_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__delayed_msg_req__pack
-+ (const Sr__DelayedMsgReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__delayed_msg_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__delayed_msg_req__pack_to_buffer
-+ (const Sr__DelayedMsgReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__delayed_msg_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__DelayedMsgReq *
-+ sr__delayed_msg_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__DelayedMsgReq *)
-+ protobuf_c_message_unpack (&sr__delayed_msg_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__delayed_msg_req__free_unpacked
-+ (Sr__DelayedMsgReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__delayed_msg_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__nacm_reload_req__init
-+ (Sr__NacmReloadReq *message)
-+{
-+ static Sr__NacmReloadReq init_value = SR__NACM_RELOAD_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__nacm_reload_req__get_packed_size
-+ (const Sr__NacmReloadReq *message)
-+{
-+ assert(message->base.descriptor == &sr__nacm_reload_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__nacm_reload_req__pack
-+ (const Sr__NacmReloadReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__nacm_reload_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__nacm_reload_req__pack_to_buffer
-+ (const Sr__NacmReloadReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__nacm_reload_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__NacmReloadReq *
-+ sr__nacm_reload_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__NacmReloadReq *)
-+ protobuf_c_message_unpack (&sr__nacm_reload_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__nacm_reload_req__free_unpacked
-+ (Sr__NacmReloadReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__nacm_reload_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__request__init
-+ (Sr__Request *message)
-+{
-+ static Sr__Request init_value = SR__REQUEST__INIT;
-+ *message = init_value;
-+}
-+size_t sr__request__get_packed_size
-+ (const Sr__Request *message)
-+{
-+ assert(message->base.descriptor == &sr__request__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__request__pack
-+ (const Sr__Request *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__request__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__request__pack_to_buffer
-+ (const Sr__Request *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__request__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__Request *
-+ sr__request__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__Request *)
-+ protobuf_c_message_unpack (&sr__request__descriptor,
-+ allocator, len, data);
-+}
-+void sr__request__free_unpacked
-+ (Sr__Request *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__request__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__response__init
-+ (Sr__Response *message)
-+{
-+ static Sr__Response init_value = SR__RESPONSE__INIT;
-+ *message = init_value;
-+}
-+size_t sr__response__get_packed_size
-+ (const Sr__Response *message)
-+{
-+ assert(message->base.descriptor == &sr__response__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__response__pack
-+ (const Sr__Response *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__response__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__response__pack_to_buffer
-+ (const Sr__Response *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__response__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__Response *
-+ sr__response__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__Response *)
-+ protobuf_c_message_unpack (&sr__response__descriptor,
-+ allocator, len, data);
-+}
-+void sr__response__free_unpacked
-+ (Sr__Response *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__response__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__notification__init
-+ (Sr__Notification *message)
-+{
-+ static Sr__Notification init_value = SR__NOTIFICATION__INIT;
-+ *message = init_value;
-+}
-+size_t sr__notification__get_packed_size
-+ (const Sr__Notification *message)
-+{
-+ assert(message->base.descriptor == &sr__notification__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__notification__pack
-+ (const Sr__Notification *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__notification__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__notification__pack_to_buffer
-+ (const Sr__Notification *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__notification__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__Notification *
-+ sr__notification__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__Notification *)
-+ protobuf_c_message_unpack (&sr__notification__descriptor,
-+ allocator, len, data);
-+}
-+void sr__notification__free_unpacked
-+ (Sr__Notification *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__notification__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__notification_ack__init
-+ (Sr__NotificationAck *message)
-+{
-+ static Sr__NotificationAck init_value = SR__NOTIFICATION_ACK__INIT;
-+ *message = init_value;
-+}
-+size_t sr__notification_ack__get_packed_size
-+ (const Sr__NotificationAck *message)
-+{
-+ assert(message->base.descriptor == &sr__notification_ack__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__notification_ack__pack
-+ (const Sr__NotificationAck *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__notification_ack__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__notification_ack__pack_to_buffer
-+ (const Sr__NotificationAck *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__notification_ack__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__NotificationAck *
-+ sr__notification_ack__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__NotificationAck *)
-+ protobuf_c_message_unpack (&sr__notification_ack__descriptor,
-+ allocator, len, data);
-+}
-+void sr__notification_ack__free_unpacked
-+ (Sr__NotificationAck *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__notification_ack__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__internal_request__init
-+ (Sr__InternalRequest *message)
-+{
-+ static Sr__InternalRequest init_value = SR__INTERNAL_REQUEST__INIT;
-+ *message = init_value;
-+}
-+size_t sr__internal_request__get_packed_size
-+ (const Sr__InternalRequest *message)
-+{
-+ assert(message->base.descriptor == &sr__internal_request__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__internal_request__pack
-+ (const Sr__InternalRequest *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__internal_request__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__internal_request__pack_to_buffer
-+ (const Sr__InternalRequest *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__internal_request__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__InternalRequest *
-+ sr__internal_request__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__InternalRequest *)
-+ protobuf_c_message_unpack (&sr__internal_request__descriptor,
-+ allocator, len, data);
-+}
-+void sr__internal_request__free_unpacked
-+ (Sr__InternalRequest *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__internal_request__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__msg__init
-+ (Sr__Msg *message)
-+{
-+ static Sr__Msg init_value = SR__MSG__INIT;
-+ *message = init_value;
-+}
-+size_t sr__msg__get_packed_size
-+ (const Sr__Msg *message)
-+{
-+ assert(message->base.descriptor == &sr__msg__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__msg__pack
-+ (const Sr__Msg *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__msg__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__msg__pack_to_buffer
-+ (const Sr__Msg *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__msg__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__Msg *
-+ sr__msg__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__Msg *)
-+ protobuf_c_message_unpack (&sr__msg__descriptor,
-+ allocator, len, data);
-+}
-+void sr__msg__free_unpacked
-+ (Sr__Msg *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__msg__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+static const ProtobufCEnumValue sr__value__types__enum_values_by_number[22] =
-+{
-+ { "LIST", "SR__VALUE__TYPES__LIST", 1 },
-+ { "CONTAINER", "SR__VALUE__TYPES__CONTAINER", 2 },
-+ { "CONTAINER_PRESENCE", "SR__VALUE__TYPES__CONTAINER_PRESENCE", 3 },
-+ { "LEAF_EMPTY", "SR__VALUE__TYPES__LEAF_EMPTY", 4 },
-+ { "BINARY", "SR__VALUE__TYPES__BINARY", 10 },
-+ { "BITS", "SR__VALUE__TYPES__BITS", 11 },
-+ { "BOOL", "SR__VALUE__TYPES__BOOL", 12 },
-+ { "DECIMAL64", "SR__VALUE__TYPES__DECIMAL64", 13 },
-+ { "ENUM", "SR__VALUE__TYPES__ENUM", 14 },
-+ { "IDENTITYREF", "SR__VALUE__TYPES__IDENTITYREF", 15 },
-+ { "INSTANCEID", "SR__VALUE__TYPES__INSTANCEID", 16 },
-+ { "INT8", "SR__VALUE__TYPES__INT8", 17 },
-+ { "INT16", "SR__VALUE__TYPES__INT16", 18 },
-+ { "INT32", "SR__VALUE__TYPES__INT32", 19 },
-+ { "INT64", "SR__VALUE__TYPES__INT64", 20 },
-+ { "STRING", "SR__VALUE__TYPES__STRING", 21 },
-+ { "UINT8", "SR__VALUE__TYPES__UINT8", 22 },
-+ { "UINT16", "SR__VALUE__TYPES__UINT16", 23 },
-+ { "UINT32", "SR__VALUE__TYPES__UINT32", 24 },
-+ { "UINT64", "SR__VALUE__TYPES__UINT64", 25 },
-+ { "ANYXML", "SR__VALUE__TYPES__ANYXML", 26 },
-+ { "ANYDATA", "SR__VALUE__TYPES__ANYDATA", 27 },
-+};
-+static const ProtobufCIntRange sr__value__types__value_ranges[] = {
-+{1, 0},{10, 4},{0, 22}
-+};
-+static const ProtobufCEnumValueIndex sr__value__types__enum_values_by_name[22] =
-+{
-+ { "ANYDATA", 21 },
-+ { "ANYXML", 20 },
-+ { "BINARY", 4 },
-+ { "BITS", 5 },
-+ { "BOOL", 6 },
-+ { "CONTAINER", 1 },
-+ { "CONTAINER_PRESENCE", 2 },
-+ { "DECIMAL64", 7 },
-+ { "ENUM", 8 },
-+ { "IDENTITYREF", 9 },
-+ { "INSTANCEID", 10 },
-+ { "INT16", 12 },
-+ { "INT32", 13 },
-+ { "INT64", 14 },
-+ { "INT8", 11 },
-+ { "LEAF_EMPTY", 3 },
-+ { "LIST", 0 },
-+ { "STRING", 15 },
-+ { "UINT16", 17 },
-+ { "UINT32", 18 },
-+ { "UINT64", 19 },
-+ { "UINT8", 16 },
-+};
-+const ProtobufCEnumDescriptor sr__value__types__descriptor =
-+{
-+ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
-+ "sr.Value.Types",
-+ "Types",
-+ "Sr__Value__Types",
-+ "sr",
-+ 22,
-+ sr__value__types__enum_values_by_number,
-+ 22,
-+ sr__value__types__enum_values_by_name,
-+ 2,
-+ sr__value__types__value_ranges,
-+ NULL,NULL,NULL,NULL /* reserved[1234] */
-+};
-+static const ProtobufCFieldDescriptor sr__value__field_descriptors[21] =
-+{
-+ {
-+ "xpath",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Value, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "type",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Value, type),
-+ &sr__value__types__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "dflt",
-+ 3,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_BOOL,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Value, dflt),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "binary_val",
-+ 10,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Value, binary_val),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "bits_val",
-+ 11,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Value, bits_val),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "bool_val",
-+ 12,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_BOOL,
-+ offsetof(Sr__Value, has_bool_val),
-+ offsetof(Sr__Value, bool_val),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "decimal64_val",
-+ 13,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_DOUBLE,
-+ offsetof(Sr__Value, has_decimal64_val),
-+ offsetof(Sr__Value, decimal64_val),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "enum_val",
-+ 14,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Value, enum_val),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "identityref_val",
-+ 15,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Value, identityref_val),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "instanceid_val",
-+ 16,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Value, instanceid_val),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "int8_val",
-+ 17,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_INT32,
-+ offsetof(Sr__Value, has_int8_val),
-+ offsetof(Sr__Value, int8_val),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "int16_val",
-+ 18,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_INT32,
-+ offsetof(Sr__Value, has_int16_val),
-+ offsetof(Sr__Value, int16_val),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "int32_val",
-+ 19,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_INT32,
-+ offsetof(Sr__Value, has_int32_val),
-+ offsetof(Sr__Value, int32_val),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "int64_val",
-+ 20,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_INT64,
-+ offsetof(Sr__Value, has_int64_val),
-+ offsetof(Sr__Value, int64_val),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "string_val",
-+ 21,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Value, string_val),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "uint8_val",
-+ 22,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_UINT32,
-+ offsetof(Sr__Value, has_uint8_val),
-+ offsetof(Sr__Value, uint8_val),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "uint16_val",
-+ 23,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_UINT32,
-+ offsetof(Sr__Value, has_uint16_val),
-+ offsetof(Sr__Value, uint16_val),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "uint32_val",
-+ 24,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_UINT32,
-+ offsetof(Sr__Value, has_uint32_val),
-+ offsetof(Sr__Value, uint32_val),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "uint64_val",
-+ 25,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_UINT64,
-+ offsetof(Sr__Value, has_uint64_val),
-+ offsetof(Sr__Value, uint64_val),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "anyxml_val",
-+ 26,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Value, anyxml_val),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "anydata_val",
-+ 27,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Value, anydata_val),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__value__field_indices_by_name[] = {
-+ 20, /* field[20] = anydata_val */
-+ 19, /* field[19] = anyxml_val */
-+ 3, /* field[3] = binary_val */
-+ 4, /* field[4] = bits_val */
-+ 5, /* field[5] = bool_val */
-+ 6, /* field[6] = decimal64_val */
-+ 2, /* field[2] = dflt */
-+ 7, /* field[7] = enum_val */
-+ 8, /* field[8] = identityref_val */
-+ 9, /* field[9] = instanceid_val */
-+ 11, /* field[11] = int16_val */
-+ 12, /* field[12] = int32_val */
-+ 13, /* field[13] = int64_val */
-+ 10, /* field[10] = int8_val */
-+ 14, /* field[14] = string_val */
-+ 1, /* field[1] = type */
-+ 16, /* field[16] = uint16_val */
-+ 17, /* field[17] = uint32_val */
-+ 18, /* field[18] = uint64_val */
-+ 15, /* field[15] = uint8_val */
-+ 0, /* field[0] = xpath */
-+};
-+static const ProtobufCIntRange sr__value__number_ranges[2 + 1] =
-+{
-+ { 1, 0 },
-+ { 10, 3 },
-+ { 0, 21 }
-+};
-+const ProtobufCMessageDescriptor sr__value__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.Value",
-+ "Value",
-+ "Sr__Value",
-+ "sr",
-+ sizeof(Sr__Value),
-+ 21,
-+ sr__value__field_descriptors,
-+ sr__value__field_indices_by_name,
-+ 2, sr__value__number_ranges,
-+ (ProtobufCMessageInit) sr__value__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__node__field_descriptors[3] =
-+{
-+ {
-+ "value",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Node, value),
-+ &sr__value__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "module_name",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Node, module_name),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "children",
-+ 3,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ offsetof(Sr__Node, n_children),
-+ offsetof(Sr__Node, children),
-+ &sr__node__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__node__field_indices_by_name[] = {
-+ 2, /* field[2] = children */
-+ 1, /* field[1] = module_name */
-+ 0, /* field[0] = value */
-+};
-+static const ProtobufCIntRange sr__node__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 3 }
-+};
-+const ProtobufCMessageDescriptor sr__node__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.Node",
-+ "Node",
-+ "Sr__Node",
-+ "sr",
-+ sizeof(Sr__Node),
-+ 3,
-+ sr__node__field_descriptors,
-+ sr__node__field_indices_by_name,
-+ 1, sr__node__number_ranges,
-+ (ProtobufCMessageInit) sr__node__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__error__field_descriptors[2] =
-+{
-+ {
-+ "message",
-+ 1,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Error, message),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "xpath",
-+ 2,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Error, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__error__field_indices_by_name[] = {
-+ 0, /* field[0] = message */
-+ 1, /* field[1] = xpath */
-+};
-+static const ProtobufCIntRange sr__error__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 2 }
-+};
-+const ProtobufCMessageDescriptor sr__error__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.Error",
-+ "Error",
-+ "Sr__Error",
-+ "sr",
-+ sizeof(Sr__Error),
-+ 2,
-+ sr__error__field_descriptors,
-+ sr__error__field_indices_by_name,
-+ 1, sr__error__number_ranges,
-+ (ProtobufCMessageInit) sr__error__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__session_start_req__field_descriptors[4] =
-+{
-+ {
-+ "datastore",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SessionStartReq, datastore),
-+ &sr__data_store__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "user_name",
-+ 2,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SessionStartReq, user_name),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "options",
-+ 3,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SessionStartReq, options),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "commit_id",
-+ 4,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_UINT32,
-+ offsetof(Sr__SessionStartReq, has_commit_id),
-+ offsetof(Sr__SessionStartReq, commit_id),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__session_start_req__field_indices_by_name[] = {
-+ 3, /* field[3] = commit_id */
-+ 0, /* field[0] = datastore */
-+ 2, /* field[2] = options */
-+ 1, /* field[1] = user_name */
-+};
-+static const ProtobufCIntRange sr__session_start_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 4 }
-+};
-+const ProtobufCMessageDescriptor sr__session_start_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SessionStartReq",
-+ "SessionStartReq",
-+ "Sr__SessionStartReq",
-+ "sr",
-+ sizeof(Sr__SessionStartReq),
-+ 4,
-+ sr__session_start_req__field_descriptors,
-+ sr__session_start_req__field_indices_by_name,
-+ 1, sr__session_start_req__number_ranges,
-+ (ProtobufCMessageInit) sr__session_start_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__session_start_resp__field_descriptors[1] =
-+{
-+ {
-+ "session_id",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SessionStartResp, session_id),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__session_start_resp__field_indices_by_name[] = {
-+ 0, /* field[0] = session_id */
-+};
-+static const ProtobufCIntRange sr__session_start_resp__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__session_start_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SessionStartResp",
-+ "SessionStartResp",
-+ "Sr__SessionStartResp",
-+ "sr",
-+ sizeof(Sr__SessionStartResp),
-+ 1,
-+ sr__session_start_resp__field_descriptors,
-+ sr__session_start_resp__field_indices_by_name,
-+ 1, sr__session_start_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__session_start_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__session_stop_req__field_descriptors[1] =
-+{
-+ {
-+ "session_id",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SessionStopReq, session_id),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__session_stop_req__field_indices_by_name[] = {
-+ 0, /* field[0] = session_id */
-+};
-+static const ProtobufCIntRange sr__session_stop_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__session_stop_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SessionStopReq",
-+ "SessionStopReq",
-+ "Sr__SessionStopReq",
-+ "sr",
-+ sizeof(Sr__SessionStopReq),
-+ 1,
-+ sr__session_stop_req__field_descriptors,
-+ sr__session_stop_req__field_indices_by_name,
-+ 1, sr__session_stop_req__number_ranges,
-+ (ProtobufCMessageInit) sr__session_stop_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__session_stop_resp__field_descriptors[1] =
-+{
-+ {
-+ "session_id",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SessionStopResp, session_id),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__session_stop_resp__field_indices_by_name[] = {
-+ 0, /* field[0] = session_id */
-+};
-+static const ProtobufCIntRange sr__session_stop_resp__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__session_stop_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SessionStopResp",
-+ "SessionStopResp",
-+ "Sr__SessionStopResp",
-+ "sr",
-+ sizeof(Sr__SessionStopResp),
-+ 1,
-+ sr__session_stop_resp__field_descriptors,
-+ sr__session_stop_resp__field_indices_by_name,
-+ 1, sr__session_stop_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__session_stop_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__session_refresh_req__field_descriptors NULL
-+#define sr__session_refresh_req__field_indices_by_name NULL
-+#define sr__session_refresh_req__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__session_refresh_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SessionRefreshReq",
-+ "SessionRefreshReq",
-+ "Sr__SessionRefreshReq",
-+ "sr",
-+ sizeof(Sr__SessionRefreshReq),
-+ 0,
-+ sr__session_refresh_req__field_descriptors,
-+ sr__session_refresh_req__field_indices_by_name,
-+ 0, sr__session_refresh_req__number_ranges,
-+ (ProtobufCMessageInit) sr__session_refresh_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__session_refresh_resp__field_descriptors[1] =
-+{
-+ {
-+ "errors",
-+ 1,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ offsetof(Sr__SessionRefreshResp, n_errors),
-+ offsetof(Sr__SessionRefreshResp, errors),
-+ &sr__error__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__session_refresh_resp__field_indices_by_name[] = {
-+ 0, /* field[0] = errors */
-+};
-+static const ProtobufCIntRange sr__session_refresh_resp__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__session_refresh_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SessionRefreshResp",
-+ "SessionRefreshResp",
-+ "Sr__SessionRefreshResp",
-+ "sr",
-+ sizeof(Sr__SessionRefreshResp),
-+ 1,
-+ sr__session_refresh_resp__field_descriptors,
-+ sr__session_refresh_resp__field_indices_by_name,
-+ 1, sr__session_refresh_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__session_refresh_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__session_check_req__field_descriptors NULL
-+#define sr__session_check_req__field_indices_by_name NULL
-+#define sr__session_check_req__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__session_check_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SessionCheckReq",
-+ "SessionCheckReq",
-+ "Sr__SessionCheckReq",
-+ "sr",
-+ sizeof(Sr__SessionCheckReq),
-+ 0,
-+ sr__session_check_req__field_descriptors,
-+ sr__session_check_req__field_indices_by_name,
-+ 0, sr__session_check_req__number_ranges,
-+ (ProtobufCMessageInit) sr__session_check_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__session_check_resp__field_descriptors[1] =
-+{
-+ {
-+ "errors",
-+ 1,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ offsetof(Sr__SessionCheckResp, n_errors),
-+ offsetof(Sr__SessionCheckResp, errors),
-+ &sr__error__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__session_check_resp__field_indices_by_name[] = {
-+ 0, /* field[0] = errors */
-+};
-+static const ProtobufCIntRange sr__session_check_resp__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__session_check_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SessionCheckResp",
-+ "SessionCheckResp",
-+ "Sr__SessionCheckResp",
-+ "sr",
-+ sizeof(Sr__SessionCheckResp),
-+ 1,
-+ sr__session_check_resp__field_descriptors,
-+ sr__session_check_resp__field_indices_by_name,
-+ 1, sr__session_check_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__session_check_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__session_switch_ds_req__field_descriptors[1] =
-+{
-+ {
-+ "datastore",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SessionSwitchDsReq, datastore),
-+ &sr__data_store__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__session_switch_ds_req__field_indices_by_name[] = {
-+ 0, /* field[0] = datastore */
-+};
-+static const ProtobufCIntRange sr__session_switch_ds_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__session_switch_ds_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SessionSwitchDsReq",
-+ "SessionSwitchDsReq",
-+ "Sr__SessionSwitchDsReq",
-+ "sr",
-+ sizeof(Sr__SessionSwitchDsReq),
-+ 1,
-+ sr__session_switch_ds_req__field_descriptors,
-+ sr__session_switch_ds_req__field_indices_by_name,
-+ 1, sr__session_switch_ds_req__number_ranges,
-+ (ProtobufCMessageInit) sr__session_switch_ds_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__session_switch_ds_resp__field_descriptors NULL
-+#define sr__session_switch_ds_resp__field_indices_by_name NULL
-+#define sr__session_switch_ds_resp__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__session_switch_ds_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SessionSwitchDsResp",
-+ "SessionSwitchDsResp",
-+ "Sr__SessionSwitchDsResp",
-+ "sr",
-+ sizeof(Sr__SessionSwitchDsResp),
-+ 0,
-+ sr__session_switch_ds_resp__field_descriptors,
-+ sr__session_switch_ds_resp__field_indices_by_name,
-+ 0, sr__session_switch_ds_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__session_switch_ds_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__session_set_opts_req__field_descriptors[1] =
-+{
-+ {
-+ "options",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SessionSetOptsReq, options),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__session_set_opts_req__field_indices_by_name[] = {
-+ 0, /* field[0] = options */
-+};
-+static const ProtobufCIntRange sr__session_set_opts_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__session_set_opts_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SessionSetOptsReq",
-+ "SessionSetOptsReq",
-+ "Sr__SessionSetOptsReq",
-+ "sr",
-+ sizeof(Sr__SessionSetOptsReq),
-+ 1,
-+ sr__session_set_opts_req__field_descriptors,
-+ sr__session_set_opts_req__field_indices_by_name,
-+ 1, sr__session_set_opts_req__number_ranges,
-+ (ProtobufCMessageInit) sr__session_set_opts_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__session_set_opts_resp__field_descriptors NULL
-+#define sr__session_set_opts_resp__field_indices_by_name NULL
-+#define sr__session_set_opts_resp__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__session_set_opts_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SessionSetOptsResp",
-+ "SessionSetOptsResp",
-+ "Sr__SessionSetOptsResp",
-+ "sr",
-+ sizeof(Sr__SessionSetOptsResp),
-+ 0,
-+ sr__session_set_opts_resp__field_descriptors,
-+ sr__session_set_opts_resp__field_indices_by_name,
-+ 0, sr__session_set_opts_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__session_set_opts_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__version_verify_req__field_descriptors[1] =
-+{
-+ {
-+ "soname",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__VersionVerifyReq, soname),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__version_verify_req__field_indices_by_name[] = {
-+ 0, /* field[0] = soname */
-+};
-+static const ProtobufCIntRange sr__version_verify_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__version_verify_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.VersionVerifyReq",
-+ "VersionVerifyReq",
-+ "Sr__VersionVerifyReq",
-+ "sr",
-+ sizeof(Sr__VersionVerifyReq),
-+ 1,
-+ sr__version_verify_req__field_descriptors,
-+ sr__version_verify_req__field_indices_by_name,
-+ 1, sr__version_verify_req__number_ranges,
-+ (ProtobufCMessageInit) sr__version_verify_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__version_verify_resp__field_descriptors[1] =
-+{
-+ {
-+ "soname",
-+ 1,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__VersionVerifyResp, soname),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__version_verify_resp__field_indices_by_name[] = {
-+ 0, /* field[0] = soname */
-+};
-+static const ProtobufCIntRange sr__version_verify_resp__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__version_verify_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.VersionVerifyResp",
-+ "VersionVerifyResp",
-+ "Sr__VersionVerifyResp",
-+ "sr",
-+ sizeof(Sr__VersionVerifyResp),
-+ 1,
-+ sr__version_verify_resp__field_descriptors,
-+ sr__version_verify_resp__field_indices_by_name,
-+ 1, sr__version_verify_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__version_verify_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__schema_revision__field_descriptors[3] =
-+{
-+ {
-+ "revision",
-+ 1,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SchemaRevision, revision),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "file_path_yang",
-+ 2,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SchemaRevision, file_path_yang),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "file_path_yin",
-+ 3,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SchemaRevision, file_path_yin),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__schema_revision__field_indices_by_name[] = {
-+ 1, /* field[1] = file_path_yang */
-+ 2, /* field[2] = file_path_yin */
-+ 0, /* field[0] = revision */
-+};
-+static const ProtobufCIntRange sr__schema_revision__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 3 }
-+};
-+const ProtobufCMessageDescriptor sr__schema_revision__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SchemaRevision",
-+ "SchemaRevision",
-+ "Sr__SchemaRevision",
-+ "sr",
-+ sizeof(Sr__SchemaRevision),
-+ 3,
-+ sr__schema_revision__field_descriptors,
-+ sr__schema_revision__field_indices_by_name,
-+ 1, sr__schema_revision__number_ranges,
-+ (ProtobufCMessageInit) sr__schema_revision__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__schema_submodule__field_descriptors[2] =
-+{
-+ {
-+ "submodule_name",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SchemaSubmodule, submodule_name),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "revision",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SchemaSubmodule, revision),
-+ &sr__schema_revision__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__schema_submodule__field_indices_by_name[] = {
-+ 1, /* field[1] = revision */
-+ 0, /* field[0] = submodule_name */
-+};
-+static const ProtobufCIntRange sr__schema_submodule__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 2 }
-+};
-+const ProtobufCMessageDescriptor sr__schema_submodule__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SchemaSubmodule",
-+ "SchemaSubmodule",
-+ "Sr__SchemaSubmodule",
-+ "sr",
-+ sizeof(Sr__SchemaSubmodule),
-+ 2,
-+ sr__schema_submodule__field_descriptors,
-+ sr__schema_submodule__field_indices_by_name,
-+ 1, sr__schema_submodule__number_ranges,
-+ (ProtobufCMessageInit) sr__schema_submodule__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__schema__field_descriptors[8] =
-+{
-+ {
-+ "module_name",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Schema, module_name),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "ns",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Schema, ns),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "prefix",
-+ 3,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Schema, prefix),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "installed",
-+ 4,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_BOOL,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Schema, installed),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "implemented",
-+ 5,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_BOOL,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Schema, implemented),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "revision",
-+ 6,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Schema, revision),
-+ &sr__schema_revision__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "submodules",
-+ 7,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ offsetof(Sr__Schema, n_submodules),
-+ offsetof(Sr__Schema, submodules),
-+ &sr__schema_submodule__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "enabled_features",
-+ 8,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_STRING,
-+ offsetof(Sr__Schema, n_enabled_features),
-+ offsetof(Sr__Schema, enabled_features),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__schema__field_indices_by_name[] = {
-+ 7, /* field[7] = enabled_features */
-+ 4, /* field[4] = implemented */
-+ 3, /* field[3] = installed */
-+ 0, /* field[0] = module_name */
-+ 1, /* field[1] = ns */
-+ 2, /* field[2] = prefix */
-+ 5, /* field[5] = revision */
-+ 6, /* field[6] = submodules */
-+};
-+static const ProtobufCIntRange sr__schema__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 8 }
-+};
-+const ProtobufCMessageDescriptor sr__schema__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.Schema",
-+ "Schema",
-+ "Sr__Schema",
-+ "sr",
-+ sizeof(Sr__Schema),
-+ 8,
-+ sr__schema__field_descriptors,
-+ sr__schema__field_indices_by_name,
-+ 1, sr__schema__number_ranges,
-+ (ProtobufCMessageInit) sr__schema__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__list_schemas_req__field_descriptors NULL
-+#define sr__list_schemas_req__field_indices_by_name NULL
-+#define sr__list_schemas_req__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__list_schemas_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.ListSchemasReq",
-+ "ListSchemasReq",
-+ "Sr__ListSchemasReq",
-+ "sr",
-+ sizeof(Sr__ListSchemasReq),
-+ 0,
-+ sr__list_schemas_req__field_descriptors,
-+ sr__list_schemas_req__field_indices_by_name,
-+ 0, sr__list_schemas_req__number_ranges,
-+ (ProtobufCMessageInit) sr__list_schemas_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__list_schemas_resp__field_descriptors[1] =
-+{
-+ {
-+ "schemas",
-+ 1,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ offsetof(Sr__ListSchemasResp, n_schemas),
-+ offsetof(Sr__ListSchemasResp, schemas),
-+ &sr__schema__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__list_schemas_resp__field_indices_by_name[] = {
-+ 0, /* field[0] = schemas */
-+};
-+static const ProtobufCIntRange sr__list_schemas_resp__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__list_schemas_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.ListSchemasResp",
-+ "ListSchemasResp",
-+ "Sr__ListSchemasResp",
-+ "sr",
-+ sizeof(Sr__ListSchemasResp),
-+ 1,
-+ sr__list_schemas_resp__field_descriptors,
-+ sr__list_schemas_resp__field_indices_by_name,
-+ 1, sr__list_schemas_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__list_schemas_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__get_schema_req__field_descriptors[5] =
-+{
-+ {
-+ "module_name",
-+ 1,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetSchemaReq, module_name),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "revision",
-+ 2,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetSchemaReq, revision),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "submodule_name",
-+ 3,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetSchemaReq, submodule_name),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "submodule_revision",
-+ 4,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetSchemaReq, submodule_revision),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "yang_format",
-+ 5,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_BOOL,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetSchemaReq, yang_format),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__get_schema_req__field_indices_by_name[] = {
-+ 0, /* field[0] = module_name */
-+ 1, /* field[1] = revision */
-+ 2, /* field[2] = submodule_name */
-+ 3, /* field[3] = submodule_revision */
-+ 4, /* field[4] = yang_format */
-+};
-+static const ProtobufCIntRange sr__get_schema_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 5 }
-+};
-+const ProtobufCMessageDescriptor sr__get_schema_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.GetSchemaReq",
-+ "GetSchemaReq",
-+ "Sr__GetSchemaReq",
-+ "sr",
-+ sizeof(Sr__GetSchemaReq),
-+ 5,
-+ sr__get_schema_req__field_descriptors,
-+ sr__get_schema_req__field_indices_by_name,
-+ 1, sr__get_schema_req__number_ranges,
-+ (ProtobufCMessageInit) sr__get_schema_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__get_schema_resp__field_descriptors[1] =
-+{
-+ {
-+ "schema_content",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetSchemaResp, schema_content),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__get_schema_resp__field_indices_by_name[] = {
-+ 0, /* field[0] = schema_content */
-+};
-+static const ProtobufCIntRange sr__get_schema_resp__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__get_schema_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.GetSchemaResp",
-+ "GetSchemaResp",
-+ "Sr__GetSchemaResp",
-+ "sr",
-+ sizeof(Sr__GetSchemaResp),
-+ 1,
-+ sr__get_schema_resp__field_descriptors,
-+ sr__get_schema_resp__field_indices_by_name,
-+ 1, sr__get_schema_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__get_schema_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__get_item_req__field_descriptors[1] =
-+{
-+ {
-+ "xpath",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetItemReq, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__get_item_req__field_indices_by_name[] = {
-+ 0, /* field[0] = xpath */
-+};
-+static const ProtobufCIntRange sr__get_item_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__get_item_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.GetItemReq",
-+ "GetItemReq",
-+ "Sr__GetItemReq",
-+ "sr",
-+ sizeof(Sr__GetItemReq),
-+ 1,
-+ sr__get_item_req__field_descriptors,
-+ sr__get_item_req__field_indices_by_name,
-+ 1, sr__get_item_req__number_ranges,
-+ (ProtobufCMessageInit) sr__get_item_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__get_item_resp__field_descriptors[1] =
-+{
-+ {
-+ "value",
-+ 1,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetItemResp, value),
-+ &sr__value__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__get_item_resp__field_indices_by_name[] = {
-+ 0, /* field[0] = value */
-+};
-+static const ProtobufCIntRange sr__get_item_resp__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__get_item_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.GetItemResp",
-+ "GetItemResp",
-+ "Sr__GetItemResp",
-+ "sr",
-+ sizeof(Sr__GetItemResp),
-+ 1,
-+ sr__get_item_resp__field_descriptors,
-+ sr__get_item_resp__field_indices_by_name,
-+ 1, sr__get_item_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__get_item_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__get_items_req__field_descriptors[3] =
-+{
-+ {
-+ "xpath",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetItemsReq, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "limit",
-+ 2,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_UINT32,
-+ offsetof(Sr__GetItemsReq, has_limit),
-+ offsetof(Sr__GetItemsReq, limit),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "offset",
-+ 3,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_UINT32,
-+ offsetof(Sr__GetItemsReq, has_offset),
-+ offsetof(Sr__GetItemsReq, offset),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__get_items_req__field_indices_by_name[] = {
-+ 1, /* field[1] = limit */
-+ 2, /* field[2] = offset */
-+ 0, /* field[0] = xpath */
-+};
-+static const ProtobufCIntRange sr__get_items_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 3 }
-+};
-+const ProtobufCMessageDescriptor sr__get_items_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.GetItemsReq",
-+ "GetItemsReq",
-+ "Sr__GetItemsReq",
-+ "sr",
-+ sizeof(Sr__GetItemsReq),
-+ 3,
-+ sr__get_items_req__field_descriptors,
-+ sr__get_items_req__field_indices_by_name,
-+ 1, sr__get_items_req__number_ranges,
-+ (ProtobufCMessageInit) sr__get_items_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__get_items_resp__field_descriptors[1] =
-+{
-+ {
-+ "values",
-+ 1,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ offsetof(Sr__GetItemsResp, n_values),
-+ offsetof(Sr__GetItemsResp, values),
-+ &sr__value__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__get_items_resp__field_indices_by_name[] = {
-+ 0, /* field[0] = values */
-+};
-+static const ProtobufCIntRange sr__get_items_resp__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__get_items_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.GetItemsResp",
-+ "GetItemsResp",
-+ "Sr__GetItemsResp",
-+ "sr",
-+ sizeof(Sr__GetItemsResp),
-+ 1,
-+ sr__get_items_resp__field_descriptors,
-+ sr__get_items_resp__field_indices_by_name,
-+ 1, sr__get_items_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__get_items_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__get_subtree_req__field_descriptors[1] =
-+{
-+ {
-+ "xpath",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetSubtreeReq, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__get_subtree_req__field_indices_by_name[] = {
-+ 0, /* field[0] = xpath */
-+};
-+static const ProtobufCIntRange sr__get_subtree_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__get_subtree_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.GetSubtreeReq",
-+ "GetSubtreeReq",
-+ "Sr__GetSubtreeReq",
-+ "sr",
-+ sizeof(Sr__GetSubtreeReq),
-+ 1,
-+ sr__get_subtree_req__field_descriptors,
-+ sr__get_subtree_req__field_indices_by_name,
-+ 1, sr__get_subtree_req__number_ranges,
-+ (ProtobufCMessageInit) sr__get_subtree_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__get_subtree_resp__field_descriptors[1] =
-+{
-+ {
-+ "tree",
-+ 1,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetSubtreeResp, tree),
-+ &sr__node__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__get_subtree_resp__field_indices_by_name[] = {
-+ 0, /* field[0] = tree */
-+};
-+static const ProtobufCIntRange sr__get_subtree_resp__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__get_subtree_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.GetSubtreeResp",
-+ "GetSubtreeResp",
-+ "Sr__GetSubtreeResp",
-+ "sr",
-+ sizeof(Sr__GetSubtreeResp),
-+ 1,
-+ sr__get_subtree_resp__field_descriptors,
-+ sr__get_subtree_resp__field_indices_by_name,
-+ 1, sr__get_subtree_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__get_subtree_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__get_subtrees_req__field_descriptors[1] =
-+{
-+ {
-+ "xpath",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetSubtreesReq, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__get_subtrees_req__field_indices_by_name[] = {
-+ 0, /* field[0] = xpath */
-+};
-+static const ProtobufCIntRange sr__get_subtrees_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__get_subtrees_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.GetSubtreesReq",
-+ "GetSubtreesReq",
-+ "Sr__GetSubtreesReq",
-+ "sr",
-+ sizeof(Sr__GetSubtreesReq),
-+ 1,
-+ sr__get_subtrees_req__field_descriptors,
-+ sr__get_subtrees_req__field_indices_by_name,
-+ 1, sr__get_subtrees_req__number_ranges,
-+ (ProtobufCMessageInit) sr__get_subtrees_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__get_subtrees_resp__field_descriptors[1] =
-+{
-+ {
-+ "trees",
-+ 1,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ offsetof(Sr__GetSubtreesResp, n_trees),
-+ offsetof(Sr__GetSubtreesResp, trees),
-+ &sr__node__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__get_subtrees_resp__field_indices_by_name[] = {
-+ 0, /* field[0] = trees */
-+};
-+static const ProtobufCIntRange sr__get_subtrees_resp__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__get_subtrees_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.GetSubtreesResp",
-+ "GetSubtreesResp",
-+ "Sr__GetSubtreesResp",
-+ "sr",
-+ sizeof(Sr__GetSubtreesResp),
-+ 1,
-+ sr__get_subtrees_resp__field_descriptors,
-+ sr__get_subtrees_resp__field_indices_by_name,
-+ 1, sr__get_subtrees_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__get_subtrees_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__get_subtree_chunk_req__field_descriptors[6] =
-+{
-+ {
-+ "xpath",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetSubtreeChunkReq, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "single",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_BOOL,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetSubtreeChunkReq, single),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "slice_offset",
-+ 3,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetSubtreeChunkReq, slice_offset),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "slice_width",
-+ 4,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetSubtreeChunkReq, slice_width),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "child_limit",
-+ 5,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetSubtreeChunkReq, child_limit),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "depth_limit",
-+ 6,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetSubtreeChunkReq, depth_limit),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__get_subtree_chunk_req__field_indices_by_name[] = {
-+ 4, /* field[4] = child_limit */
-+ 5, /* field[5] = depth_limit */
-+ 1, /* field[1] = single */
-+ 2, /* field[2] = slice_offset */
-+ 3, /* field[3] = slice_width */
-+ 0, /* field[0] = xpath */
-+};
-+static const ProtobufCIntRange sr__get_subtree_chunk_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 6 }
-+};
-+const ProtobufCMessageDescriptor sr__get_subtree_chunk_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.GetSubtreeChunkReq",
-+ "GetSubtreeChunkReq",
-+ "Sr__GetSubtreeChunkReq",
-+ "sr",
-+ sizeof(Sr__GetSubtreeChunkReq),
-+ 6,
-+ sr__get_subtree_chunk_req__field_descriptors,
-+ sr__get_subtree_chunk_req__field_indices_by_name,
-+ 1, sr__get_subtree_chunk_req__number_ranges,
-+ (ProtobufCMessageInit) sr__get_subtree_chunk_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__get_subtree_chunk_resp__field_descriptors[2] =
-+{
-+ {
-+ "xpath",
-+ 1,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_STRING,
-+ offsetof(Sr__GetSubtreeChunkResp, n_xpath),
-+ offsetof(Sr__GetSubtreeChunkResp, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "chunk",
-+ 2,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ offsetof(Sr__GetSubtreeChunkResp, n_chunk),
-+ offsetof(Sr__GetSubtreeChunkResp, chunk),
-+ &sr__node__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__get_subtree_chunk_resp__field_indices_by_name[] = {
-+ 1, /* field[1] = chunk */
-+ 0, /* field[0] = xpath */
-+};
-+static const ProtobufCIntRange sr__get_subtree_chunk_resp__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 2 }
-+};
-+const ProtobufCMessageDescriptor sr__get_subtree_chunk_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.GetSubtreeChunkResp",
-+ "GetSubtreeChunkResp",
-+ "Sr__GetSubtreeChunkResp",
-+ "sr",
-+ sizeof(Sr__GetSubtreeChunkResp),
-+ 2,
-+ sr__get_subtree_chunk_resp__field_descriptors,
-+ sr__get_subtree_chunk_resp__field_indices_by_name,
-+ 1, sr__get_subtree_chunk_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__get_subtree_chunk_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__set_item_req__field_descriptors[3] =
-+{
-+ {
-+ "xpath",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SetItemReq, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "value",
-+ 2,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SetItemReq, value),
-+ &sr__value__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "options",
-+ 3,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SetItemReq, options),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__set_item_req__field_indices_by_name[] = {
-+ 2, /* field[2] = options */
-+ 1, /* field[1] = value */
-+ 0, /* field[0] = xpath */
-+};
-+static const ProtobufCIntRange sr__set_item_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 3 }
-+};
-+const ProtobufCMessageDescriptor sr__set_item_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SetItemReq",
-+ "SetItemReq",
-+ "Sr__SetItemReq",
-+ "sr",
-+ sizeof(Sr__SetItemReq),
-+ 3,
-+ sr__set_item_req__field_descriptors,
-+ sr__set_item_req__field_indices_by_name,
-+ 1, sr__set_item_req__number_ranges,
-+ (ProtobufCMessageInit) sr__set_item_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__set_item_resp__field_descriptors NULL
-+#define sr__set_item_resp__field_indices_by_name NULL
-+#define sr__set_item_resp__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__set_item_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SetItemResp",
-+ "SetItemResp",
-+ "Sr__SetItemResp",
-+ "sr",
-+ sizeof(Sr__SetItemResp),
-+ 0,
-+ sr__set_item_resp__field_descriptors,
-+ sr__set_item_resp__field_indices_by_name,
-+ 0, sr__set_item_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__set_item_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__set_item_str_req__field_descriptors[3] =
-+{
-+ {
-+ "xpath",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SetItemStrReq, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "value",
-+ 2,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SetItemStrReq, value),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "options",
-+ 3,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SetItemStrReq, options),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__set_item_str_req__field_indices_by_name[] = {
-+ 2, /* field[2] = options */
-+ 1, /* field[1] = value */
-+ 0, /* field[0] = xpath */
-+};
-+static const ProtobufCIntRange sr__set_item_str_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 3 }
-+};
-+const ProtobufCMessageDescriptor sr__set_item_str_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SetItemStrReq",
-+ "SetItemStrReq",
-+ "Sr__SetItemStrReq",
-+ "sr",
-+ sizeof(Sr__SetItemStrReq),
-+ 3,
-+ sr__set_item_str_req__field_descriptors,
-+ sr__set_item_str_req__field_indices_by_name,
-+ 1, sr__set_item_str_req__number_ranges,
-+ (ProtobufCMessageInit) sr__set_item_str_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__set_item_str_resp__field_descriptors NULL
-+#define sr__set_item_str_resp__field_indices_by_name NULL
-+#define sr__set_item_str_resp__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__set_item_str_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SetItemStrResp",
-+ "SetItemStrResp",
-+ "Sr__SetItemStrResp",
-+ "sr",
-+ sizeof(Sr__SetItemStrResp),
-+ 0,
-+ sr__set_item_str_resp__field_descriptors,
-+ sr__set_item_str_resp__field_indices_by_name,
-+ 0, sr__set_item_str_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__set_item_str_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__delete_item_req__field_descriptors[2] =
-+{
-+ {
-+ "xpath",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__DeleteItemReq, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "options",
-+ 3,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__DeleteItemReq, options),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__delete_item_req__field_indices_by_name[] = {
-+ 1, /* field[1] = options */
-+ 0, /* field[0] = xpath */
-+};
-+static const ProtobufCIntRange sr__delete_item_req__number_ranges[2 + 1] =
-+{
-+ { 1, 0 },
-+ { 3, 1 },
-+ { 0, 2 }
-+};
-+const ProtobufCMessageDescriptor sr__delete_item_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.DeleteItemReq",
-+ "DeleteItemReq",
-+ "Sr__DeleteItemReq",
-+ "sr",
-+ sizeof(Sr__DeleteItemReq),
-+ 2,
-+ sr__delete_item_req__field_descriptors,
-+ sr__delete_item_req__field_indices_by_name,
-+ 2, sr__delete_item_req__number_ranges,
-+ (ProtobufCMessageInit) sr__delete_item_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__delete_item_resp__field_descriptors NULL
-+#define sr__delete_item_resp__field_indices_by_name NULL
-+#define sr__delete_item_resp__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__delete_item_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.DeleteItemResp",
-+ "DeleteItemResp",
-+ "Sr__DeleteItemResp",
-+ "sr",
-+ sizeof(Sr__DeleteItemResp),
-+ 0,
-+ sr__delete_item_resp__field_descriptors,
-+ sr__delete_item_resp__field_indices_by_name,
-+ 0, sr__delete_item_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__delete_item_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCEnumValue sr__move_item_req__move_position__enum_values_by_number[4] =
-+{
-+ { "BEFORE", "SR__MOVE_ITEM_REQ__MOVE_POSITION__BEFORE", 1 },
-+ { "AFTER", "SR__MOVE_ITEM_REQ__MOVE_POSITION__AFTER", 2 },
-+ { "FIRST", "SR__MOVE_ITEM_REQ__MOVE_POSITION__FIRST", 3 },
-+ { "LAST", "SR__MOVE_ITEM_REQ__MOVE_POSITION__LAST", 4 },
-+};
-+static const ProtobufCIntRange sr__move_item_req__move_position__value_ranges[] = {
-+{1, 0},{0, 4}
-+};
-+static const ProtobufCEnumValueIndex sr__move_item_req__move_position__enum_values_by_name[4] =
-+{
-+ { "AFTER", 1 },
-+ { "BEFORE", 0 },
-+ { "FIRST", 2 },
-+ { "LAST", 3 },
-+};
-+const ProtobufCEnumDescriptor sr__move_item_req__move_position__descriptor =
-+{
-+ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
-+ "sr.MoveItemReq.MovePosition",
-+ "MovePosition",
-+ "Sr__MoveItemReq__MovePosition",
-+ "sr",
-+ 4,
-+ sr__move_item_req__move_position__enum_values_by_number,
-+ 4,
-+ sr__move_item_req__move_position__enum_values_by_name,
-+ 1,
-+ sr__move_item_req__move_position__value_ranges,
-+ NULL,NULL,NULL,NULL /* reserved[1234] */
-+};
-+static const ProtobufCFieldDescriptor sr__move_item_req__field_descriptors[3] =
-+{
-+ {
-+ "xpath",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__MoveItemReq, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "position",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__MoveItemReq, position),
-+ &sr__move_item_req__move_position__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "relative_item",
-+ 3,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__MoveItemReq, relative_item),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__move_item_req__field_indices_by_name[] = {
-+ 1, /* field[1] = position */
-+ 2, /* field[2] = relative_item */
-+ 0, /* field[0] = xpath */
-+};
-+static const ProtobufCIntRange sr__move_item_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 3 }
-+};
-+const ProtobufCMessageDescriptor sr__move_item_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.MoveItemReq",
-+ "MoveItemReq",
-+ "Sr__MoveItemReq",
-+ "sr",
-+ sizeof(Sr__MoveItemReq),
-+ 3,
-+ sr__move_item_req__field_descriptors,
-+ sr__move_item_req__field_indices_by_name,
-+ 1, sr__move_item_req__number_ranges,
-+ (ProtobufCMessageInit) sr__move_item_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__move_item_resp__field_descriptors NULL
-+#define sr__move_item_resp__field_indices_by_name NULL
-+#define sr__move_item_resp__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__move_item_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.MoveItemResp",
-+ "MoveItemResp",
-+ "Sr__MoveItemResp",
-+ "sr",
-+ sizeof(Sr__MoveItemResp),
-+ 0,
-+ sr__move_item_resp__field_descriptors,
-+ sr__move_item_resp__field_indices_by_name,
-+ 0, sr__move_item_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__move_item_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__validate_req__field_descriptors NULL
-+#define sr__validate_req__field_indices_by_name NULL
-+#define sr__validate_req__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__validate_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.ValidateReq",
-+ "ValidateReq",
-+ "Sr__ValidateReq",
-+ "sr",
-+ sizeof(Sr__ValidateReq),
-+ 0,
-+ sr__validate_req__field_descriptors,
-+ sr__validate_req__field_indices_by_name,
-+ 0, sr__validate_req__number_ranges,
-+ (ProtobufCMessageInit) sr__validate_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__validate_resp__field_descriptors[1] =
-+{
-+ {
-+ "errors",
-+ 1,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ offsetof(Sr__ValidateResp, n_errors),
-+ offsetof(Sr__ValidateResp, errors),
-+ &sr__error__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__validate_resp__field_indices_by_name[] = {
-+ 0, /* field[0] = errors */
-+};
-+static const ProtobufCIntRange sr__validate_resp__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__validate_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.ValidateResp",
-+ "ValidateResp",
-+ "Sr__ValidateResp",
-+ "sr",
-+ sizeof(Sr__ValidateResp),
-+ 1,
-+ sr__validate_resp__field_descriptors,
-+ sr__validate_resp__field_indices_by_name,
-+ 1, sr__validate_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__validate_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__commit_req__field_descriptors NULL
-+#define sr__commit_req__field_indices_by_name NULL
-+#define sr__commit_req__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__commit_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.CommitReq",
-+ "CommitReq",
-+ "Sr__CommitReq",
-+ "sr",
-+ sizeof(Sr__CommitReq),
-+ 0,
-+ sr__commit_req__field_descriptors,
-+ sr__commit_req__field_indices_by_name,
-+ 0, sr__commit_req__number_ranges,
-+ (ProtobufCMessageInit) sr__commit_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__commit_resp__field_descriptors[1] =
-+{
-+ {
-+ "errors",
-+ 1,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ offsetof(Sr__CommitResp, n_errors),
-+ offsetof(Sr__CommitResp, errors),
-+ &sr__error__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__commit_resp__field_indices_by_name[] = {
-+ 0, /* field[0] = errors */
-+};
-+static const ProtobufCIntRange sr__commit_resp__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__commit_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.CommitResp",
-+ "CommitResp",
-+ "Sr__CommitResp",
-+ "sr",
-+ sizeof(Sr__CommitResp),
-+ 1,
-+ sr__commit_resp__field_descriptors,
-+ sr__commit_resp__field_indices_by_name,
-+ 1, sr__commit_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__commit_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__discard_changes_req__field_descriptors NULL
-+#define sr__discard_changes_req__field_indices_by_name NULL
-+#define sr__discard_changes_req__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__discard_changes_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.DiscardChangesReq",
-+ "DiscardChangesReq",
-+ "Sr__DiscardChangesReq",
-+ "sr",
-+ sizeof(Sr__DiscardChangesReq),
-+ 0,
-+ sr__discard_changes_req__field_descriptors,
-+ sr__discard_changes_req__field_indices_by_name,
-+ 0, sr__discard_changes_req__number_ranges,
-+ (ProtobufCMessageInit) sr__discard_changes_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__discard_changes_resp__field_descriptors NULL
-+#define sr__discard_changes_resp__field_indices_by_name NULL
-+#define sr__discard_changes_resp__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__discard_changes_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.DiscardChangesResp",
-+ "DiscardChangesResp",
-+ "Sr__DiscardChangesResp",
-+ "sr",
-+ sizeof(Sr__DiscardChangesResp),
-+ 0,
-+ sr__discard_changes_resp__field_descriptors,
-+ sr__discard_changes_resp__field_indices_by_name,
-+ 0, sr__discard_changes_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__discard_changes_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__copy_config_req__field_descriptors[3] =
-+{
-+ {
-+ "src_datastore",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__CopyConfigReq, src_datastore),
-+ &sr__data_store__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "dst_datastore",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__CopyConfigReq, dst_datastore),
-+ &sr__data_store__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "module_name",
-+ 3,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__CopyConfigReq, module_name),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__copy_config_req__field_indices_by_name[] = {
-+ 1, /* field[1] = dst_datastore */
-+ 2, /* field[2] = module_name */
-+ 0, /* field[0] = src_datastore */
-+};
-+static const ProtobufCIntRange sr__copy_config_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 3 }
-+};
-+const ProtobufCMessageDescriptor sr__copy_config_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.CopyConfigReq",
-+ "CopyConfigReq",
-+ "Sr__CopyConfigReq",
-+ "sr",
-+ sizeof(Sr__CopyConfigReq),
-+ 3,
-+ sr__copy_config_req__field_descriptors,
-+ sr__copy_config_req__field_indices_by_name,
-+ 1, sr__copy_config_req__number_ranges,
-+ (ProtobufCMessageInit) sr__copy_config_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__copy_config_resp__field_descriptors[1] =
-+{
-+ {
-+ "errors",
-+ 1,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ offsetof(Sr__CopyConfigResp, n_errors),
-+ offsetof(Sr__CopyConfigResp, errors),
-+ &sr__error__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__copy_config_resp__field_indices_by_name[] = {
-+ 0, /* field[0] = errors */
-+};
-+static const ProtobufCIntRange sr__copy_config_resp__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__copy_config_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.CopyConfigResp",
-+ "CopyConfigResp",
-+ "Sr__CopyConfigResp",
-+ "sr",
-+ sizeof(Sr__CopyConfigResp),
-+ 1,
-+ sr__copy_config_resp__field_descriptors,
-+ sr__copy_config_resp__field_indices_by_name,
-+ 1, sr__copy_config_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__copy_config_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__lock_req__field_descriptors[1] =
-+{
-+ {
-+ "module_name",
-+ 1,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__LockReq, module_name),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__lock_req__field_indices_by_name[] = {
-+ 0, /* field[0] = module_name */
-+};
-+static const ProtobufCIntRange sr__lock_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__lock_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.LockReq",
-+ "LockReq",
-+ "Sr__LockReq",
-+ "sr",
-+ sizeof(Sr__LockReq),
-+ 1,
-+ sr__lock_req__field_descriptors,
-+ sr__lock_req__field_indices_by_name,
-+ 1, sr__lock_req__number_ranges,
-+ (ProtobufCMessageInit) sr__lock_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__lock_resp__field_descriptors NULL
-+#define sr__lock_resp__field_indices_by_name NULL
-+#define sr__lock_resp__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__lock_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.LockResp",
-+ "LockResp",
-+ "Sr__LockResp",
-+ "sr",
-+ sizeof(Sr__LockResp),
-+ 0,
-+ sr__lock_resp__field_descriptors,
-+ sr__lock_resp__field_indices_by_name,
-+ 0, sr__lock_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__lock_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__unlock_req__field_descriptors[1] =
-+{
-+ {
-+ "module_name",
-+ 1,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__UnlockReq, module_name),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__unlock_req__field_indices_by_name[] = {
-+ 0, /* field[0] = module_name */
-+};
-+static const ProtobufCIntRange sr__unlock_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__unlock_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.UnlockReq",
-+ "UnlockReq",
-+ "Sr__UnlockReq",
-+ "sr",
-+ sizeof(Sr__UnlockReq),
-+ 1,
-+ sr__unlock_req__field_descriptors,
-+ sr__unlock_req__field_indices_by_name,
-+ 1, sr__unlock_req__number_ranges,
-+ (ProtobufCMessageInit) sr__unlock_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__unlock_resp__field_descriptors NULL
-+#define sr__unlock_resp__field_indices_by_name NULL
-+#define sr__unlock_resp__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__unlock_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.UnlockResp",
-+ "UnlockResp",
-+ "Sr__UnlockResp",
-+ "sr",
-+ sizeof(Sr__UnlockResp),
-+ 0,
-+ sr__unlock_resp__field_descriptors,
-+ sr__unlock_resp__field_indices_by_name,
-+ 0, sr__unlock_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__unlock_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__subscribe_req__field_descriptors[10] =
-+{
-+ {
-+ "type",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SubscribeReq, type),
-+ &sr__subscription_type__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "destination",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SubscribeReq, destination),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "subscription_id",
-+ 3,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SubscribeReq, subscription_id),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "module_name",
-+ 4,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SubscribeReq, module_name),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "xpath",
-+ 5,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SubscribeReq, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "notif_event",
-+ 10,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_ENUM,
-+ offsetof(Sr__SubscribeReq, has_notif_event),
-+ offsetof(Sr__SubscribeReq, notif_event),
-+ &sr__notification_event__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "priority",
-+ 11,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_UINT32,
-+ offsetof(Sr__SubscribeReq, has_priority),
-+ offsetof(Sr__SubscribeReq, priority),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "enable_running",
-+ 12,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_BOOL,
-+ offsetof(Sr__SubscribeReq, has_enable_running),
-+ offsetof(Sr__SubscribeReq, enable_running),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "enable_event",
-+ 13,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_BOOL,
-+ offsetof(Sr__SubscribeReq, has_enable_event),
-+ offsetof(Sr__SubscribeReq, enable_event),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "api_variant",
-+ 20,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SubscribeReq, api_variant),
-+ &sr__api_variant__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__subscribe_req__field_indices_by_name[] = {
-+ 9, /* field[9] = api_variant */
-+ 1, /* field[1] = destination */
-+ 8, /* field[8] = enable_event */
-+ 7, /* field[7] = enable_running */
-+ 3, /* field[3] = module_name */
-+ 5, /* field[5] = notif_event */
-+ 6, /* field[6] = priority */
-+ 2, /* field[2] = subscription_id */
-+ 0, /* field[0] = type */
-+ 4, /* field[4] = xpath */
-+};
-+static const ProtobufCIntRange sr__subscribe_req__number_ranges[3 + 1] =
-+{
-+ { 1, 0 },
-+ { 10, 5 },
-+ { 20, 9 },
-+ { 0, 10 }
-+};
-+const ProtobufCMessageDescriptor sr__subscribe_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SubscribeReq",
-+ "SubscribeReq",
-+ "Sr__SubscribeReq",
-+ "sr",
-+ sizeof(Sr__SubscribeReq),
-+ 10,
-+ sr__subscribe_req__field_descriptors,
-+ sr__subscribe_req__field_indices_by_name,
-+ 3, sr__subscribe_req__number_ranges,
-+ (ProtobufCMessageInit) sr__subscribe_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__subscribe_resp__field_descriptors NULL
-+#define sr__subscribe_resp__field_indices_by_name NULL
-+#define sr__subscribe_resp__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__subscribe_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SubscribeResp",
-+ "SubscribeResp",
-+ "Sr__SubscribeResp",
-+ "sr",
-+ sizeof(Sr__SubscribeResp),
-+ 0,
-+ sr__subscribe_resp__field_descriptors,
-+ sr__subscribe_resp__field_indices_by_name,
-+ 0, sr__subscribe_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__subscribe_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__unsubscribe_req__field_descriptors[4] =
-+{
-+ {
-+ "type",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__UnsubscribeReq, type),
-+ &sr__subscription_type__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "destination",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__UnsubscribeReq, destination),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "subscription_id",
-+ 3,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__UnsubscribeReq, subscription_id),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "module_name",
-+ 4,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__UnsubscribeReq, module_name),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__unsubscribe_req__field_indices_by_name[] = {
-+ 1, /* field[1] = destination */
-+ 3, /* field[3] = module_name */
-+ 2, /* field[2] = subscription_id */
-+ 0, /* field[0] = type */
-+};
-+static const ProtobufCIntRange sr__unsubscribe_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 4 }
-+};
-+const ProtobufCMessageDescriptor sr__unsubscribe_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.UnsubscribeReq",
-+ "UnsubscribeReq",
-+ "Sr__UnsubscribeReq",
-+ "sr",
-+ sizeof(Sr__UnsubscribeReq),
-+ 4,
-+ sr__unsubscribe_req__field_descriptors,
-+ sr__unsubscribe_req__field_indices_by_name,
-+ 1, sr__unsubscribe_req__number_ranges,
-+ (ProtobufCMessageInit) sr__unsubscribe_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__unsubscribe_resp__field_descriptors NULL
-+#define sr__unsubscribe_resp__field_indices_by_name NULL
-+#define sr__unsubscribe_resp__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__unsubscribe_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.UnsubscribeResp",
-+ "UnsubscribeResp",
-+ "Sr__UnsubscribeResp",
-+ "sr",
-+ sizeof(Sr__UnsubscribeResp),
-+ 0,
-+ sr__unsubscribe_resp__field_descriptors,
-+ sr__unsubscribe_resp__field_indices_by_name,
-+ 0, sr__unsubscribe_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__unsubscribe_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__check_enabled_running_req__field_descriptors[1] =
-+{
-+ {
-+ "module_name",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__CheckEnabledRunningReq, module_name),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__check_enabled_running_req__field_indices_by_name[] = {
-+ 0, /* field[0] = module_name */
-+};
-+static const ProtobufCIntRange sr__check_enabled_running_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__check_enabled_running_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.CheckEnabledRunningReq",
-+ "CheckEnabledRunningReq",
-+ "Sr__CheckEnabledRunningReq",
-+ "sr",
-+ sizeof(Sr__CheckEnabledRunningReq),
-+ 1,
-+ sr__check_enabled_running_req__field_descriptors,
-+ sr__check_enabled_running_req__field_indices_by_name,
-+ 1, sr__check_enabled_running_req__number_ranges,
-+ (ProtobufCMessageInit) sr__check_enabled_running_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__check_enabled_running_resp__field_descriptors[1] =
-+{
-+ {
-+ "enabled",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_BOOL,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__CheckEnabledRunningResp, enabled),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__check_enabled_running_resp__field_indices_by_name[] = {
-+ 0, /* field[0] = enabled */
-+};
-+static const ProtobufCIntRange sr__check_enabled_running_resp__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__check_enabled_running_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.CheckEnabledRunningResp",
-+ "CheckEnabledRunningResp",
-+ "Sr__CheckEnabledRunningResp",
-+ "sr",
-+ sizeof(Sr__CheckEnabledRunningResp),
-+ 1,
-+ sr__check_enabled_running_resp__field_descriptors,
-+ sr__check_enabled_running_resp__field_indices_by_name,
-+ 1, sr__check_enabled_running_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__check_enabled_running_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__module_install_notification__field_descriptors[3] =
-+{
-+ {
-+ "module_name",
-+ 1,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__ModuleInstallNotification, module_name),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "revision",
-+ 2,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__ModuleInstallNotification, revision),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "state",
-+ 3,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__ModuleInstallNotification, state),
-+ &sr__module_state__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__module_install_notification__field_indices_by_name[] = {
-+ 0, /* field[0] = module_name */
-+ 1, /* field[1] = revision */
-+ 2, /* field[2] = state */
-+};
-+static const ProtobufCIntRange sr__module_install_notification__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 3 }
-+};
-+const ProtobufCMessageDescriptor sr__module_install_notification__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.ModuleInstallNotification",
-+ "ModuleInstallNotification",
-+ "Sr__ModuleInstallNotification",
-+ "sr",
-+ sizeof(Sr__ModuleInstallNotification),
-+ 3,
-+ sr__module_install_notification__field_descriptors,
-+ sr__module_install_notification__field_indices_by_name,
-+ 1, sr__module_install_notification__number_ranges,
-+ (ProtobufCMessageInit) sr__module_install_notification__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__feature_enable_notification__field_descriptors[3] =
-+{
-+ {
-+ "module_name",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__FeatureEnableNotification, module_name),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "feature_name",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__FeatureEnableNotification, feature_name),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "enabled",
-+ 3,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_BOOL,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__FeatureEnableNotification, enabled),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__feature_enable_notification__field_indices_by_name[] = {
-+ 2, /* field[2] = enabled */
-+ 1, /* field[1] = feature_name */
-+ 0, /* field[0] = module_name */
-+};
-+static const ProtobufCIntRange sr__feature_enable_notification__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 3 }
-+};
-+const ProtobufCMessageDescriptor sr__feature_enable_notification__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.FeatureEnableNotification",
-+ "FeatureEnableNotification",
-+ "Sr__FeatureEnableNotification",
-+ "sr",
-+ sizeof(Sr__FeatureEnableNotification),
-+ 3,
-+ sr__feature_enable_notification__field_descriptors,
-+ sr__feature_enable_notification__field_indices_by_name,
-+ 1, sr__feature_enable_notification__number_ranges,
-+ (ProtobufCMessageInit) sr__feature_enable_notification__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__module_change_notification__field_descriptors[2] =
-+{
-+ {
-+ "event",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__ModuleChangeNotification, event),
-+ &sr__notification_event__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "module_name",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__ModuleChangeNotification, module_name),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__module_change_notification__field_indices_by_name[] = {
-+ 0, /* field[0] = event */
-+ 1, /* field[1] = module_name */
-+};
-+static const ProtobufCIntRange sr__module_change_notification__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 2 }
-+};
-+const ProtobufCMessageDescriptor sr__module_change_notification__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.ModuleChangeNotification",
-+ "ModuleChangeNotification",
-+ "Sr__ModuleChangeNotification",
-+ "sr",
-+ sizeof(Sr__ModuleChangeNotification),
-+ 2,
-+ sr__module_change_notification__field_descriptors,
-+ sr__module_change_notification__field_indices_by_name,
-+ 1, sr__module_change_notification__number_ranges,
-+ (ProtobufCMessageInit) sr__module_change_notification__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__subtree_change_notification__field_descriptors[2] =
-+{
-+ {
-+ "event",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SubtreeChangeNotification, event),
-+ &sr__notification_event__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "xpath",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SubtreeChangeNotification, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__subtree_change_notification__field_indices_by_name[] = {
-+ 0, /* field[0] = event */
-+ 1, /* field[1] = xpath */
-+};
-+static const ProtobufCIntRange sr__subtree_change_notification__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 2 }
-+};
-+const ProtobufCMessageDescriptor sr__subtree_change_notification__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SubtreeChangeNotification",
-+ "SubtreeChangeNotification",
-+ "Sr__SubtreeChangeNotification",
-+ "sr",
-+ sizeof(Sr__SubtreeChangeNotification),
-+ 2,
-+ sr__subtree_change_notification__field_descriptors,
-+ sr__subtree_change_notification__field_indices_by_name,
-+ 1, sr__subtree_change_notification__number_ranges,
-+ (ProtobufCMessageInit) sr__subtree_change_notification__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__change__field_descriptors[3] =
-+{
-+ {
-+ "changeOperation",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Change, changeoperation),
-+ &sr__change_operation__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "new_value",
-+ 2,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Change, new_value),
-+ &sr__value__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "old_value",
-+ 3,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Change, old_value),
-+ &sr__value__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__change__field_indices_by_name[] = {
-+ 0, /* field[0] = changeOperation */
-+ 1, /* field[1] = new_value */
-+ 2, /* field[2] = old_value */
-+};
-+static const ProtobufCIntRange sr__change__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 3 }
-+};
-+const ProtobufCMessageDescriptor sr__change__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.Change",
-+ "Change",
-+ "Sr__Change",
-+ "sr",
-+ sizeof(Sr__Change),
-+ 3,
-+ sr__change__field_descriptors,
-+ sr__change__field_indices_by_name,
-+ 1, sr__change__number_ranges,
-+ (ProtobufCMessageInit) sr__change__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__get_changes_req__field_descriptors[3] =
-+{
-+ {
-+ "xpath",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetChangesReq, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "limit",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetChangesReq, limit),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "offset",
-+ 3,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetChangesReq, offset),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__get_changes_req__field_indices_by_name[] = {
-+ 1, /* field[1] = limit */
-+ 2, /* field[2] = offset */
-+ 0, /* field[0] = xpath */
-+};
-+static const ProtobufCIntRange sr__get_changes_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 3 }
-+};
-+const ProtobufCMessageDescriptor sr__get_changes_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.GetChangesReq",
-+ "GetChangesReq",
-+ "Sr__GetChangesReq",
-+ "sr",
-+ sizeof(Sr__GetChangesReq),
-+ 3,
-+ sr__get_changes_req__field_descriptors,
-+ sr__get_changes_req__field_indices_by_name,
-+ 1, sr__get_changes_req__number_ranges,
-+ (ProtobufCMessageInit) sr__get_changes_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__get_changes_resp__field_descriptors[1] =
-+{
-+ {
-+ "changes",
-+ 1,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ offsetof(Sr__GetChangesResp, n_changes),
-+ offsetof(Sr__GetChangesResp, changes),
-+ &sr__change__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__get_changes_resp__field_indices_by_name[] = {
-+ 0, /* field[0] = changes */
-+};
-+static const ProtobufCIntRange sr__get_changes_resp__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__get_changes_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.GetChangesResp",
-+ "GetChangesResp",
-+ "Sr__GetChangesResp",
-+ "sr",
-+ sizeof(Sr__GetChangesResp),
-+ 1,
-+ sr__get_changes_resp__field_descriptors,
-+ sr__get_changes_resp__field_indices_by_name,
-+ 1, sr__get_changes_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__get_changes_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__check_exec_perm_req__field_descriptors[1] =
-+{
-+ {
-+ "xpath",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__CheckExecPermReq, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__check_exec_perm_req__field_indices_by_name[] = {
-+ 0, /* field[0] = xpath */
-+};
-+static const ProtobufCIntRange sr__check_exec_perm_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__check_exec_perm_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.CheckExecPermReq",
-+ "CheckExecPermReq",
-+ "Sr__CheckExecPermReq",
-+ "sr",
-+ sizeof(Sr__CheckExecPermReq),
-+ 1,
-+ sr__check_exec_perm_req__field_descriptors,
-+ sr__check_exec_perm_req__field_indices_by_name,
-+ 1, sr__check_exec_perm_req__number_ranges,
-+ (ProtobufCMessageInit) sr__check_exec_perm_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__check_exec_perm_resp__field_descriptors[1] =
-+{
-+ {
-+ "permitted",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_BOOL,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__CheckExecPermResp, permitted),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__check_exec_perm_resp__field_indices_by_name[] = {
-+ 0, /* field[0] = permitted */
-+};
-+static const ProtobufCIntRange sr__check_exec_perm_resp__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__check_exec_perm_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.CheckExecPermResp",
-+ "CheckExecPermResp",
-+ "Sr__CheckExecPermResp",
-+ "sr",
-+ sizeof(Sr__CheckExecPermResp),
-+ 1,
-+ sr__check_exec_perm_resp__field_descriptors,
-+ sr__check_exec_perm_resp__field_indices_by_name,
-+ 1, sr__check_exec_perm_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__check_exec_perm_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__rpcreq__field_descriptors[7] =
-+{
-+ {
-+ "action",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_BOOL,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__RPCReq, action),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "xpath",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__RPCReq, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "orig_api_variant",
-+ 3,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__RPCReq, orig_api_variant),
-+ &sr__api_variant__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "input",
-+ 4,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ offsetof(Sr__RPCReq, n_input),
-+ offsetof(Sr__RPCReq, input),
-+ &sr__value__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "input_tree",
-+ 5,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ offsetof(Sr__RPCReq, n_input_tree),
-+ offsetof(Sr__RPCReq, input_tree),
-+ &sr__node__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "subscriber_address",
-+ 10,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__RPCReq, subscriber_address),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "subscription_id",
-+ 11,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_UINT32,
-+ offsetof(Sr__RPCReq, has_subscription_id),
-+ offsetof(Sr__RPCReq, subscription_id),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__rpcreq__field_indices_by_name[] = {
-+ 0, /* field[0] = action */
-+ 3, /* field[3] = input */
-+ 4, /* field[4] = input_tree */
-+ 2, /* field[2] = orig_api_variant */
-+ 5, /* field[5] = subscriber_address */
-+ 6, /* field[6] = subscription_id */
-+ 1, /* field[1] = xpath */
-+};
-+static const ProtobufCIntRange sr__rpcreq__number_ranges[2 + 1] =
-+{
-+ { 1, 0 },
-+ { 10, 5 },
-+ { 0, 7 }
-+};
-+const ProtobufCMessageDescriptor sr__rpcreq__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.RPCReq",
-+ "RPCReq",
-+ "Sr__RPCReq",
-+ "sr",
-+ sizeof(Sr__RPCReq),
-+ 7,
-+ sr__rpcreq__field_descriptors,
-+ sr__rpcreq__field_indices_by_name,
-+ 2, sr__rpcreq__number_ranges,
-+ (ProtobufCMessageInit) sr__rpcreq__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__rpcresp__field_descriptors[5] =
-+{
-+ {
-+ "action",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_BOOL,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__RPCResp, action),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "xpath",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__RPCResp, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "orig_api_variant",
-+ 3,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__RPCResp, orig_api_variant),
-+ &sr__api_variant__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "output",
-+ 4,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ offsetof(Sr__RPCResp, n_output),
-+ offsetof(Sr__RPCResp, output),
-+ &sr__value__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "output_tree",
-+ 5,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ offsetof(Sr__RPCResp, n_output_tree),
-+ offsetof(Sr__RPCResp, output_tree),
-+ &sr__node__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__rpcresp__field_indices_by_name[] = {
-+ 0, /* field[0] = action */
-+ 2, /* field[2] = orig_api_variant */
-+ 3, /* field[3] = output */
-+ 4, /* field[4] = output_tree */
-+ 1, /* field[1] = xpath */
-+};
-+static const ProtobufCIntRange sr__rpcresp__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 5 }
-+};
-+const ProtobufCMessageDescriptor sr__rpcresp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.RPCResp",
-+ "RPCResp",
-+ "Sr__RPCResp",
-+ "sr",
-+ sizeof(Sr__RPCResp),
-+ 5,
-+ sr__rpcresp__field_descriptors,
-+ sr__rpcresp__field_indices_by_name,
-+ 1, sr__rpcresp__number_ranges,
-+ (ProtobufCMessageInit) sr__rpcresp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCEnumValue sr__event_notif_req__notif_type__enum_values_by_number[4] =
-+{
-+ { "REALTIME", "SR__EVENT_NOTIF_REQ__NOTIF_TYPE__REALTIME", 1 },
-+ { "REPLAY", "SR__EVENT_NOTIF_REQ__NOTIF_TYPE__REPLAY", 2 },
-+ { "REPLAY_COMPLETE", "SR__EVENT_NOTIF_REQ__NOTIF_TYPE__REPLAY_COMPLETE", 3 },
-+ { "REPLAY_STOP", "SR__EVENT_NOTIF_REQ__NOTIF_TYPE__REPLAY_STOP", 4 },
-+};
-+static const ProtobufCIntRange sr__event_notif_req__notif_type__value_ranges[] = {
-+{1, 0},{0, 4}
-+};
-+static const ProtobufCEnumValueIndex sr__event_notif_req__notif_type__enum_values_by_name[4] =
-+{
-+ { "REALTIME", 0 },
-+ { "REPLAY", 1 },
-+ { "REPLAY_COMPLETE", 2 },
-+ { "REPLAY_STOP", 3 },
-+};
-+const ProtobufCEnumDescriptor sr__event_notif_req__notif_type__descriptor =
-+{
-+ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
-+ "sr.EventNotifReq.NotifType",
-+ "NotifType",
-+ "Sr__EventNotifReq__NotifType",
-+ "sr",
-+ 4,
-+ sr__event_notif_req__notif_type__enum_values_by_number,
-+ 4,
-+ sr__event_notif_req__notif_type__enum_values_by_name,
-+ 1,
-+ sr__event_notif_req__notif_type__value_ranges,
-+ NULL,NULL,NULL,NULL /* reserved[1234] */
-+};
-+static const ProtobufCEnumValue sr__event_notif_req__notif_flags__enum_values_by_number[2] =
-+{
-+ { "DEFAULT", "SR__EVENT_NOTIF_REQ__NOTIF_FLAGS__DEFAULT", 0 },
-+ { "EPHEMERAL", "SR__EVENT_NOTIF_REQ__NOTIF_FLAGS__EPHEMERAL", 1 },
-+};
-+static const ProtobufCIntRange sr__event_notif_req__notif_flags__value_ranges[] = {
-+{0, 0},{0, 2}
-+};
-+static const ProtobufCEnumValueIndex sr__event_notif_req__notif_flags__enum_values_by_name[2] =
-+{
-+ { "DEFAULT", 0 },
-+ { "EPHEMERAL", 1 },
-+};
-+const ProtobufCEnumDescriptor sr__event_notif_req__notif_flags__descriptor =
-+{
-+ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
-+ "sr.EventNotifReq.NotifFlags",
-+ "NotifFlags",
-+ "Sr__EventNotifReq__NotifFlags",
-+ "sr",
-+ 2,
-+ sr__event_notif_req__notif_flags__enum_values_by_number,
-+ 2,
-+ sr__event_notif_req__notif_flags__enum_values_by_name,
-+ 1,
-+ sr__event_notif_req__notif_flags__value_ranges,
-+ NULL,NULL,NULL,NULL /* reserved[1234] */
-+};
-+static const ProtobufCFieldDescriptor sr__event_notif_req__field_descriptors[9] =
-+{
-+ {
-+ "type",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__EventNotifReq, type),
-+ &sr__event_notif_req__notif_type__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "options",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__EventNotifReq, options),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "xpath",
-+ 3,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__EventNotifReq, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "values",
-+ 4,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ offsetof(Sr__EventNotifReq, n_values),
-+ offsetof(Sr__EventNotifReq, values),
-+ &sr__value__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "trees",
-+ 5,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ offsetof(Sr__EventNotifReq, n_trees),
-+ offsetof(Sr__EventNotifReq, trees),
-+ &sr__node__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "timestamp",
-+ 6,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT64,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__EventNotifReq, timestamp),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "subscriber_address",
-+ 10,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__EventNotifReq, subscriber_address),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "subscription_id",
-+ 11,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_UINT32,
-+ offsetof(Sr__EventNotifReq, has_subscription_id),
-+ offsetof(Sr__EventNotifReq, subscription_id),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "do_not_send_reply",
-+ 20,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_BOOL,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__EventNotifReq, do_not_send_reply),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__event_notif_req__field_indices_by_name[] = {
-+ 8, /* field[8] = do_not_send_reply */
-+ 1, /* field[1] = options */
-+ 6, /* field[6] = subscriber_address */
-+ 7, /* field[7] = subscription_id */
-+ 5, /* field[5] = timestamp */
-+ 4, /* field[4] = trees */
-+ 0, /* field[0] = type */
-+ 3, /* field[3] = values */
-+ 2, /* field[2] = xpath */
-+};
-+static const ProtobufCIntRange sr__event_notif_req__number_ranges[3 + 1] =
-+{
-+ { 1, 0 },
-+ { 10, 6 },
-+ { 20, 8 },
-+ { 0, 9 }
-+};
-+const ProtobufCMessageDescriptor sr__event_notif_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.EventNotifReq",
-+ "EventNotifReq",
-+ "Sr__EventNotifReq",
-+ "sr",
-+ sizeof(Sr__EventNotifReq),
-+ 9,
-+ sr__event_notif_req__field_descriptors,
-+ sr__event_notif_req__field_indices_by_name,
-+ 3, sr__event_notif_req__number_ranges,
-+ (ProtobufCMessageInit) sr__event_notif_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__event_notif_resp__field_descriptors NULL
-+#define sr__event_notif_resp__field_indices_by_name NULL
-+#define sr__event_notif_resp__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__event_notif_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.EventNotifResp",
-+ "EventNotifResp",
-+ "Sr__EventNotifResp",
-+ "sr",
-+ sizeof(Sr__EventNotifResp),
-+ 0,
-+ sr__event_notif_resp__field_descriptors,
-+ sr__event_notif_resp__field_indices_by_name,
-+ 0, sr__event_notif_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__event_notif_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__event_notif_replay_req__field_descriptors[6] =
-+{
-+ {
-+ "xpath",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__EventNotifReplayReq, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "start_time",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT64,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__EventNotifReplayReq, start_time),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "stop_time",
-+ 3,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT64,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__EventNotifReplayReq, stop_time),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "subscriber_address",
-+ 10,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__EventNotifReplayReq, subscriber_address),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "subscription_id",
-+ 11,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__EventNotifReplayReq, subscription_id),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "api_variant",
-+ 12,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__EventNotifReplayReq, api_variant),
-+ &sr__api_variant__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__event_notif_replay_req__field_indices_by_name[] = {
-+ 5, /* field[5] = api_variant */
-+ 1, /* field[1] = start_time */
-+ 2, /* field[2] = stop_time */
-+ 3, /* field[3] = subscriber_address */
-+ 4, /* field[4] = subscription_id */
-+ 0, /* field[0] = xpath */
-+};
-+static const ProtobufCIntRange sr__event_notif_replay_req__number_ranges[2 + 1] =
-+{
-+ { 1, 0 },
-+ { 10, 3 },
-+ { 0, 6 }
-+};
-+const ProtobufCMessageDescriptor sr__event_notif_replay_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.EventNotifReplayReq",
-+ "EventNotifReplayReq",
-+ "Sr__EventNotifReplayReq",
-+ "sr",
-+ sizeof(Sr__EventNotifReplayReq),
-+ 6,
-+ sr__event_notif_replay_req__field_descriptors,
-+ sr__event_notif_replay_req__field_indices_by_name,
-+ 2, sr__event_notif_replay_req__number_ranges,
-+ (ProtobufCMessageInit) sr__event_notif_replay_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__event_notif_replay_resp__field_descriptors NULL
-+#define sr__event_notif_replay_resp__field_indices_by_name NULL
-+#define sr__event_notif_replay_resp__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__event_notif_replay_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.EventNotifReplayResp",
-+ "EventNotifReplayResp",
-+ "Sr__EventNotifReplayResp",
-+ "sr",
-+ sizeof(Sr__EventNotifReplayResp),
-+ 0,
-+ sr__event_notif_replay_resp__field_descriptors,
-+ sr__event_notif_replay_resp__field_indices_by_name,
-+ 0, sr__event_notif_replay_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__event_notif_replay_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__data_provide_req__field_descriptors[4] =
-+{
-+ {
-+ "xpath",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__DataProvideReq, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "subscriber_address",
-+ 10,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__DataProvideReq, subscriber_address),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "subscription_id",
-+ 11,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__DataProvideReq, subscription_id),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "request_id",
-+ 20,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT64,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__DataProvideReq, request_id),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__data_provide_req__field_indices_by_name[] = {
-+ 3, /* field[3] = request_id */
-+ 1, /* field[1] = subscriber_address */
-+ 2, /* field[2] = subscription_id */
-+ 0, /* field[0] = xpath */
-+};
-+static const ProtobufCIntRange sr__data_provide_req__number_ranges[3 + 1] =
-+{
-+ { 1, 0 },
-+ { 10, 1 },
-+ { 20, 3 },
-+ { 0, 4 }
-+};
-+const ProtobufCMessageDescriptor sr__data_provide_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.DataProvideReq",
-+ "DataProvideReq",
-+ "Sr__DataProvideReq",
-+ "sr",
-+ sizeof(Sr__DataProvideReq),
-+ 4,
-+ sr__data_provide_req__field_descriptors,
-+ sr__data_provide_req__field_indices_by_name,
-+ 3, sr__data_provide_req__number_ranges,
-+ (ProtobufCMessageInit) sr__data_provide_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__data_provide_resp__field_descriptors[3] =
-+{
-+ {
-+ "xpath",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__DataProvideResp, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "values",
-+ 2,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ offsetof(Sr__DataProvideResp, n_values),
-+ offsetof(Sr__DataProvideResp, values),
-+ &sr__value__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "request_id",
-+ 10,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT64,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__DataProvideResp, request_id),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__data_provide_resp__field_indices_by_name[] = {
-+ 2, /* field[2] = request_id */
-+ 1, /* field[1] = values */
-+ 0, /* field[0] = xpath */
-+};
-+static const ProtobufCIntRange sr__data_provide_resp__number_ranges[2 + 1] =
-+{
-+ { 1, 0 },
-+ { 10, 2 },
-+ { 0, 3 }
-+};
-+const ProtobufCMessageDescriptor sr__data_provide_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.DataProvideResp",
-+ "DataProvideResp",
-+ "Sr__DataProvideResp",
-+ "sr",
-+ sizeof(Sr__DataProvideResp),
-+ 3,
-+ sr__data_provide_resp__field_descriptors,
-+ sr__data_provide_resp__field_indices_by_name,
-+ 2, sr__data_provide_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__data_provide_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__module_install_req__field_descriptors[4] =
-+{
-+ {
-+ "module_name",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__ModuleInstallReq, module_name),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "revision",
-+ 2,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__ModuleInstallReq, revision),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "file_name",
-+ 3,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__ModuleInstallReq, file_name),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "installed",
-+ 4,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_BOOL,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__ModuleInstallReq, installed),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__module_install_req__field_indices_by_name[] = {
-+ 2, /* field[2] = file_name */
-+ 3, /* field[3] = installed */
-+ 0, /* field[0] = module_name */
-+ 1, /* field[1] = revision */
-+};
-+static const ProtobufCIntRange sr__module_install_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 4 }
-+};
-+const ProtobufCMessageDescriptor sr__module_install_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.ModuleInstallReq",
-+ "ModuleInstallReq",
-+ "Sr__ModuleInstallReq",
-+ "sr",
-+ sizeof(Sr__ModuleInstallReq),
-+ 4,
-+ sr__module_install_req__field_descriptors,
-+ sr__module_install_req__field_indices_by_name,
-+ 1, sr__module_install_req__number_ranges,
-+ (ProtobufCMessageInit) sr__module_install_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__module_install_resp__field_descriptors NULL
-+#define sr__module_install_resp__field_indices_by_name NULL
-+#define sr__module_install_resp__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__module_install_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.ModuleInstallResp",
-+ "ModuleInstallResp",
-+ "Sr__ModuleInstallResp",
-+ "sr",
-+ sizeof(Sr__ModuleInstallResp),
-+ 0,
-+ sr__module_install_resp__field_descriptors,
-+ sr__module_install_resp__field_indices_by_name,
-+ 0, sr__module_install_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__module_install_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__feature_enable_req__field_descriptors[3] =
-+{
-+ {
-+ "module_name",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__FeatureEnableReq, module_name),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "feature_name",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__FeatureEnableReq, feature_name),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "enabled",
-+ 3,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_BOOL,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__FeatureEnableReq, enabled),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__feature_enable_req__field_indices_by_name[] = {
-+ 2, /* field[2] = enabled */
-+ 1, /* field[1] = feature_name */
-+ 0, /* field[0] = module_name */
-+};
-+static const ProtobufCIntRange sr__feature_enable_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 3 }
-+};
-+const ProtobufCMessageDescriptor sr__feature_enable_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.FeatureEnableReq",
-+ "FeatureEnableReq",
-+ "Sr__FeatureEnableReq",
-+ "sr",
-+ sizeof(Sr__FeatureEnableReq),
-+ 3,
-+ sr__feature_enable_req__field_descriptors,
-+ sr__feature_enable_req__field_indices_by_name,
-+ 1, sr__feature_enable_req__number_ranges,
-+ (ProtobufCMessageInit) sr__feature_enable_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__feature_enable_resp__field_descriptors NULL
-+#define sr__feature_enable_resp__field_indices_by_name NULL
-+#define sr__feature_enable_resp__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__feature_enable_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.FeatureEnableResp",
-+ "FeatureEnableResp",
-+ "Sr__FeatureEnableResp",
-+ "sr",
-+ sizeof(Sr__FeatureEnableResp),
-+ 0,
-+ sr__feature_enable_resp__field_descriptors,
-+ sr__feature_enable_resp__field_indices_by_name,
-+ 0, sr__feature_enable_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__feature_enable_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__unsubscribe_destination_req__field_descriptors[1] =
-+{
-+ {
-+ "destination",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__UnsubscribeDestinationReq, destination),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__unsubscribe_destination_req__field_indices_by_name[] = {
-+ 0, /* field[0] = destination */
-+};
-+static const ProtobufCIntRange sr__unsubscribe_destination_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__unsubscribe_destination_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.UnsubscribeDestinationReq",
-+ "UnsubscribeDestinationReq",
-+ "Sr__UnsubscribeDestinationReq",
-+ "sr",
-+ sizeof(Sr__UnsubscribeDestinationReq),
-+ 1,
-+ sr__unsubscribe_destination_req__field_descriptors,
-+ sr__unsubscribe_destination_req__field_indices_by_name,
-+ 1, sr__unsubscribe_destination_req__number_ranges,
-+ (ProtobufCMessageInit) sr__unsubscribe_destination_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__commit_timeout_req__field_descriptors[2] =
-+{
-+ {
-+ "commit_id",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__CommitTimeoutReq, commit_id),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "expired",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_BOOL,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__CommitTimeoutReq, expired),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__commit_timeout_req__field_indices_by_name[] = {
-+ 0, /* field[0] = commit_id */
-+ 1, /* field[1] = expired */
-+};
-+static const ProtobufCIntRange sr__commit_timeout_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 2 }
-+};
-+const ProtobufCMessageDescriptor sr__commit_timeout_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.CommitTimeoutReq",
-+ "CommitTimeoutReq",
-+ "Sr__CommitTimeoutReq",
-+ "sr",
-+ sizeof(Sr__CommitTimeoutReq),
-+ 2,
-+ sr__commit_timeout_req__field_descriptors,
-+ sr__commit_timeout_req__field_indices_by_name,
-+ 1, sr__commit_timeout_req__number_ranges,
-+ (ProtobufCMessageInit) sr__commit_timeout_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__oper_data_timeout_req__field_descriptors[1] =
-+{
-+ {
-+ "request_id",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT64,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__OperDataTimeoutReq, request_id),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__oper_data_timeout_req__field_indices_by_name[] = {
-+ 0, /* field[0] = request_id */
-+};
-+static const ProtobufCIntRange sr__oper_data_timeout_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__oper_data_timeout_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.OperDataTimeoutReq",
-+ "OperDataTimeoutReq",
-+ "Sr__OperDataTimeoutReq",
-+ "sr",
-+ sizeof(Sr__OperDataTimeoutReq),
-+ 1,
-+ sr__oper_data_timeout_req__field_descriptors,
-+ sr__oper_data_timeout_req__field_indices_by_name,
-+ 1, sr__oper_data_timeout_req__number_ranges,
-+ (ProtobufCMessageInit) sr__oper_data_timeout_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__internal_state_data_req__field_descriptors[2] =
-+{
-+ {
-+ "request_id",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT64,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__InternalStateDataReq, request_id),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "xpath",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__InternalStateDataReq, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__internal_state_data_req__field_indices_by_name[] = {
-+ 0, /* field[0] = request_id */
-+ 1, /* field[1] = xpath */
-+};
-+static const ProtobufCIntRange sr__internal_state_data_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 2 }
-+};
-+const ProtobufCMessageDescriptor sr__internal_state_data_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.InternalStateDataReq",
-+ "InternalStateDataReq",
-+ "Sr__InternalStateDataReq",
-+ "sr",
-+ sizeof(Sr__InternalStateDataReq),
-+ 2,
-+ sr__internal_state_data_req__field_descriptors,
-+ sr__internal_state_data_req__field_indices_by_name,
-+ 1, sr__internal_state_data_req__number_ranges,
-+ (ProtobufCMessageInit) sr__internal_state_data_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__notif_store_cleanup_req__field_descriptors NULL
-+#define sr__notif_store_cleanup_req__field_indices_by_name NULL
-+#define sr__notif_store_cleanup_req__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__notif_store_cleanup_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.NotifStoreCleanupReq",
-+ "NotifStoreCleanupReq",
-+ "Sr__NotifStoreCleanupReq",
-+ "sr",
-+ sizeof(Sr__NotifStoreCleanupReq),
-+ 0,
-+ sr__notif_store_cleanup_req__field_descriptors,
-+ sr__notif_store_cleanup_req__field_indices_by_name,
-+ 0, sr__notif_store_cleanup_req__number_ranges,
-+ (ProtobufCMessageInit) sr__notif_store_cleanup_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__delayed_msg_req__field_descriptors[1] =
-+{
-+ {
-+ "message",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__DelayedMsgReq, message),
-+ &sr__msg__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__delayed_msg_req__field_indices_by_name[] = {
-+ 0, /* field[0] = message */
-+};
-+static const ProtobufCIntRange sr__delayed_msg_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__delayed_msg_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.DelayedMsgReq",
-+ "DelayedMsgReq",
-+ "Sr__DelayedMsgReq",
-+ "sr",
-+ sizeof(Sr__DelayedMsgReq),
-+ 1,
-+ sr__delayed_msg_req__field_descriptors,
-+ sr__delayed_msg_req__field_indices_by_name,
-+ 1, sr__delayed_msg_req__number_ranges,
-+ (ProtobufCMessageInit) sr__delayed_msg_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__nacm_reload_req__field_descriptors NULL
-+#define sr__nacm_reload_req__field_indices_by_name NULL
-+#define sr__nacm_reload_req__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__nacm_reload_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.NacmReloadReq",
-+ "NacmReloadReq",
-+ "Sr__NacmReloadReq",
-+ "sr",
-+ sizeof(Sr__NacmReloadReq),
-+ 0,
-+ sr__nacm_reload_req__field_descriptors,
-+ sr__nacm_reload_req__field_indices_by_name,
-+ 0, sr__nacm_reload_req__number_ranges,
-+ (ProtobufCMessageInit) sr__nacm_reload_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__request__field_descriptors[37] =
-+{
-+ {
-+ "_id",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT64,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, _id),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "operation",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, operation),
-+ &sr__operation__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "session_start_req",
-+ 10,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, session_start_req),
-+ &sr__session_start_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "session_stop_req",
-+ 11,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, session_stop_req),
-+ &sr__session_stop_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "session_refresh_req",
-+ 12,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, session_refresh_req),
-+ &sr__session_refresh_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "session_check_req",
-+ 13,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, session_check_req),
-+ &sr__session_check_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "session_switch_ds_req",
-+ 14,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, session_switch_ds_req),
-+ &sr__session_switch_ds_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "session_set_opts_req",
-+ 15,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, session_set_opts_req),
-+ &sr__session_set_opts_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "version_verify_req",
-+ 16,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, version_verify_req),
-+ &sr__version_verify_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "list_schemas_req",
-+ 20,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, list_schemas_req),
-+ &sr__list_schemas_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "get_schema_req",
-+ 21,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, get_schema_req),
-+ &sr__get_schema_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "module_install_req",
-+ 22,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, module_install_req),
-+ &sr__module_install_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "feature_enable_req",
-+ 23,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, feature_enable_req),
-+ &sr__feature_enable_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "get_item_req",
-+ 30,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, get_item_req),
-+ &sr__get_item_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "get_items_req",
-+ 31,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, get_items_req),
-+ &sr__get_items_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "get_subtree_req",
-+ 32,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, get_subtree_req),
-+ &sr__get_subtree_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "get_subtrees_req",
-+ 33,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, get_subtrees_req),
-+ &sr__get_subtrees_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "get_subtree_chunk_req",
-+ 34,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, get_subtree_chunk_req),
-+ &sr__get_subtree_chunk_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "set_item_req",
-+ 40,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, set_item_req),
-+ &sr__set_item_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "delete_item_req",
-+ 41,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, delete_item_req),
-+ &sr__delete_item_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "move_item_req",
-+ 42,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, move_item_req),
-+ &sr__move_item_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "set_item_str_req",
-+ 43,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, set_item_str_req),
-+ &sr__set_item_str_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "validate_req",
-+ 50,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, validate_req),
-+ &sr__validate_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "commit_req",
-+ 51,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, commit_req),
-+ &sr__commit_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "discard_changes_req",
-+ 52,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, discard_changes_req),
-+ &sr__discard_changes_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "copy_config_req",
-+ 53,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, copy_config_req),
-+ &sr__copy_config_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "lock_req",
-+ 60,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, lock_req),
-+ &sr__lock_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "unlock_req",
-+ 61,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, unlock_req),
-+ &sr__unlock_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "subscribe_req",
-+ 70,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, subscribe_req),
-+ &sr__subscribe_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "unsubscribe_req",
-+ 71,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, unsubscribe_req),
-+ &sr__unsubscribe_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "check_enabled_running_req",
-+ 72,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, check_enabled_running_req),
-+ &sr__check_enabled_running_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "get_changes_req",
-+ 73,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, get_changes_req),
-+ &sr__get_changes_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "data_provide_req",
-+ 80,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, data_provide_req),
-+ &sr__data_provide_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "check_exec_perm_req",
-+ 81,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, check_exec_perm_req),
-+ &sr__check_exec_perm_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "rpc_req",
-+ 82,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, rpc_req),
-+ &sr__rpcreq__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "event_notif_req",
-+ 83,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, event_notif_req),
-+ &sr__event_notif_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "event_notif_replay_req",
-+ 84,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, event_notif_replay_req),
-+ &sr__event_notif_replay_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__request__field_indices_by_name[] = {
-+ 0, /* field[0] = _id */
-+ 30, /* field[30] = check_enabled_running_req */
-+ 33, /* field[33] = check_exec_perm_req */
-+ 23, /* field[23] = commit_req */
-+ 25, /* field[25] = copy_config_req */
-+ 32, /* field[32] = data_provide_req */
-+ 19, /* field[19] = delete_item_req */
-+ 24, /* field[24] = discard_changes_req */
-+ 36, /* field[36] = event_notif_replay_req */
-+ 35, /* field[35] = event_notif_req */
-+ 12, /* field[12] = feature_enable_req */
-+ 31, /* field[31] = get_changes_req */
-+ 13, /* field[13] = get_item_req */
-+ 14, /* field[14] = get_items_req */
-+ 10, /* field[10] = get_schema_req */
-+ 17, /* field[17] = get_subtree_chunk_req */
-+ 15, /* field[15] = get_subtree_req */
-+ 16, /* field[16] = get_subtrees_req */
-+ 9, /* field[9] = list_schemas_req */
-+ 26, /* field[26] = lock_req */
-+ 11, /* field[11] = module_install_req */
-+ 20, /* field[20] = move_item_req */
-+ 1, /* field[1] = operation */
-+ 34, /* field[34] = rpc_req */
-+ 5, /* field[5] = session_check_req */
-+ 4, /* field[4] = session_refresh_req */
-+ 7, /* field[7] = session_set_opts_req */
-+ 2, /* field[2] = session_start_req */
-+ 3, /* field[3] = session_stop_req */
-+ 6, /* field[6] = session_switch_ds_req */
-+ 18, /* field[18] = set_item_req */
-+ 21, /* field[21] = set_item_str_req */
-+ 28, /* field[28] = subscribe_req */
-+ 27, /* field[27] = unlock_req */
-+ 29, /* field[29] = unsubscribe_req */
-+ 22, /* field[22] = validate_req */
-+ 8, /* field[8] = version_verify_req */
-+};
-+static const ProtobufCIntRange sr__request__number_ranges[9 + 1] =
-+{
-+ { 1, 0 },
-+ { 10, 2 },
-+ { 20, 9 },
-+ { 30, 13 },
-+ { 40, 18 },
-+ { 50, 22 },
-+ { 60, 26 },
-+ { 70, 28 },
-+ { 80, 32 },
-+ { 0, 37 }
-+};
-+const ProtobufCMessageDescriptor sr__request__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.Request",
-+ "Request",
-+ "Sr__Request",
-+ "sr",
-+ sizeof(Sr__Request),
-+ 37,
-+ sr__request__field_descriptors,
-+ sr__request__field_indices_by_name,
-+ 9, sr__request__number_ranges,
-+ (ProtobufCMessageInit) sr__request__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__response__field_descriptors[38] =
-+{
-+ {
-+ "operation",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, operation),
-+ &sr__operation__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "result",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, result),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "error",
-+ 3,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, error),
-+ &sr__error__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "session_start_resp",
-+ 10,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, session_start_resp),
-+ &sr__session_start_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "session_stop_resp",
-+ 11,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, session_stop_resp),
-+ &sr__session_stop_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "session_refresh_resp",
-+ 12,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, session_refresh_resp),
-+ &sr__session_refresh_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "session_check_resp",
-+ 13,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, session_check_resp),
-+ &sr__session_check_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "session_switch_ds_resp",
-+ 14,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, session_switch_ds_resp),
-+ &sr__session_switch_ds_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "session_set_opts_resp",
-+ 15,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, session_set_opts_resp),
-+ &sr__session_set_opts_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "version_verify_resp",
-+ 16,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, version_verify_resp),
-+ &sr__version_verify_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "list_schemas_resp",
-+ 20,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, list_schemas_resp),
-+ &sr__list_schemas_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "get_schema_resp",
-+ 21,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, get_schema_resp),
-+ &sr__get_schema_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "module_install_resp",
-+ 22,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, module_install_resp),
-+ &sr__module_install_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "feature_enable_resp",
-+ 23,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, feature_enable_resp),
-+ &sr__feature_enable_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "get_item_resp",
-+ 30,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, get_item_resp),
-+ &sr__get_item_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "get_items_resp",
-+ 31,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, get_items_resp),
-+ &sr__get_items_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "get_subtree_resp",
-+ 32,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, get_subtree_resp),
-+ &sr__get_subtree_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "get_subtrees_resp",
-+ 33,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, get_subtrees_resp),
-+ &sr__get_subtrees_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "get_subtree_chunk_resp",
-+ 34,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, get_subtree_chunk_resp),
-+ &sr__get_subtree_chunk_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "set_item_resp",
-+ 40,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, set_item_resp),
-+ &sr__set_item_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "delete_item_resp",
-+ 41,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, delete_item_resp),
-+ &sr__delete_item_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "move_item_resp",
-+ 42,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, move_item_resp),
-+ &sr__move_item_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "set_item_str_resp",
-+ 43,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, set_item_str_resp),
-+ &sr__set_item_str_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "validate_resp",
-+ 50,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, validate_resp),
-+ &sr__validate_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "commit_resp",
-+ 51,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, commit_resp),
-+ &sr__commit_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "discard_changes_resp",
-+ 52,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, discard_changes_resp),
-+ &sr__discard_changes_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "copy_config_resp",
-+ 53,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, copy_config_resp),
-+ &sr__copy_config_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "lock_resp",
-+ 60,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, lock_resp),
-+ &sr__lock_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "unlock_resp",
-+ 61,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, unlock_resp),
-+ &sr__unlock_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "subscribe_resp",
-+ 70,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, subscribe_resp),
-+ &sr__subscribe_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "unsubscribe_resp",
-+ 71,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, unsubscribe_resp),
-+ &sr__unsubscribe_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "check_enabled_running_resp",
-+ 72,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, check_enabled_running_resp),
-+ &sr__check_enabled_running_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "get_changes_resp",
-+ 73,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, get_changes_resp),
-+ &sr__get_changes_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "data_provide_resp",
-+ 80,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, data_provide_resp),
-+ &sr__data_provide_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "check_exec_perm_resp",
-+ 81,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, check_exec_perm_resp),
-+ &sr__check_exec_perm_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "rpc_resp",
-+ 82,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, rpc_resp),
-+ &sr__rpcresp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "event_notif_resp",
-+ 83,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, event_notif_resp),
-+ &sr__event_notif_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "event_notif_replay_resp",
-+ 84,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, event_notif_replay_resp),
-+ &sr__event_notif_replay_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__response__field_indices_by_name[] = {
-+ 31, /* field[31] = check_enabled_running_resp */
-+ 34, /* field[34] = check_exec_perm_resp */
-+ 24, /* field[24] = commit_resp */
-+ 26, /* field[26] = copy_config_resp */
-+ 33, /* field[33] = data_provide_resp */
-+ 20, /* field[20] = delete_item_resp */
-+ 25, /* field[25] = discard_changes_resp */
-+ 2, /* field[2] = error */
-+ 37, /* field[37] = event_notif_replay_resp */
-+ 36, /* field[36] = event_notif_resp */
-+ 13, /* field[13] = feature_enable_resp */
-+ 32, /* field[32] = get_changes_resp */
-+ 14, /* field[14] = get_item_resp */
-+ 15, /* field[15] = get_items_resp */
-+ 11, /* field[11] = get_schema_resp */
-+ 18, /* field[18] = get_subtree_chunk_resp */
-+ 16, /* field[16] = get_subtree_resp */
-+ 17, /* field[17] = get_subtrees_resp */
-+ 10, /* field[10] = list_schemas_resp */
-+ 27, /* field[27] = lock_resp */
-+ 12, /* field[12] = module_install_resp */
-+ 21, /* field[21] = move_item_resp */
-+ 0, /* field[0] = operation */
-+ 1, /* field[1] = result */
-+ 35, /* field[35] = rpc_resp */
-+ 6, /* field[6] = session_check_resp */
-+ 5, /* field[5] = session_refresh_resp */
-+ 8, /* field[8] = session_set_opts_resp */
-+ 3, /* field[3] = session_start_resp */
-+ 4, /* field[4] = session_stop_resp */
-+ 7, /* field[7] = session_switch_ds_resp */
-+ 19, /* field[19] = set_item_resp */
-+ 22, /* field[22] = set_item_str_resp */
-+ 29, /* field[29] = subscribe_resp */
-+ 28, /* field[28] = unlock_resp */
-+ 30, /* field[30] = unsubscribe_resp */
-+ 23, /* field[23] = validate_resp */
-+ 9, /* field[9] = version_verify_resp */
-+};
-+static const ProtobufCIntRange sr__response__number_ranges[9 + 1] =
-+{
-+ { 1, 0 },
-+ { 10, 3 },
-+ { 20, 10 },
-+ { 30, 14 },
-+ { 40, 19 },
-+ { 50, 23 },
-+ { 60, 27 },
-+ { 70, 29 },
-+ { 80, 33 },
-+ { 0, 38 }
-+};
-+const ProtobufCMessageDescriptor sr__response__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.Response",
-+ "Response",
-+ "Sr__Response",
-+ "sr",
-+ sizeof(Sr__Response),
-+ 38,
-+ sr__response__field_descriptors,
-+ sr__response__field_indices_by_name,
-+ 9, sr__response__number_ranges,
-+ (ProtobufCMessageInit) sr__response__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__notification__field_descriptors[10] =
-+{
-+ {
-+ "type",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Notification, type),
-+ &sr__subscription_type__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "destination_address",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Notification, destination_address),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "source_address",
-+ 3,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Notification, source_address),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "source_pid",
-+ 4,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Notification, source_pid),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "subscription_id",
-+ 5,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Notification, subscription_id),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "commit_id",
-+ 6,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_UINT32,
-+ offsetof(Sr__Notification, has_commit_id),
-+ offsetof(Sr__Notification, commit_id),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "module_install_notif",
-+ 10,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Notification, module_install_notif),
-+ &sr__module_install_notification__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "feature_enable_notif",
-+ 11,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Notification, feature_enable_notif),
-+ &sr__feature_enable_notification__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "module_change_notif",
-+ 12,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Notification, module_change_notif),
-+ &sr__module_change_notification__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "subtree_change_notif",
-+ 13,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Notification, subtree_change_notif),
-+ &sr__subtree_change_notification__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__notification__field_indices_by_name[] = {
-+ 5, /* field[5] = commit_id */
-+ 1, /* field[1] = destination_address */
-+ 7, /* field[7] = feature_enable_notif */
-+ 8, /* field[8] = module_change_notif */
-+ 6, /* field[6] = module_install_notif */
-+ 2, /* field[2] = source_address */
-+ 3, /* field[3] = source_pid */
-+ 4, /* field[4] = subscription_id */
-+ 9, /* field[9] = subtree_change_notif */
-+ 0, /* field[0] = type */
-+};
-+static const ProtobufCIntRange sr__notification__number_ranges[2 + 1] =
-+{
-+ { 1, 0 },
-+ { 10, 6 },
-+ { 0, 10 }
-+};
-+const ProtobufCMessageDescriptor sr__notification__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.Notification",
-+ "Notification",
-+ "Sr__Notification",
-+ "sr",
-+ sizeof(Sr__Notification),
-+ 10,
-+ sr__notification__field_descriptors,
-+ sr__notification__field_indices_by_name,
-+ 2, sr__notification__number_ranges,
-+ (ProtobufCMessageInit) sr__notification__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__notification_ack__field_descriptors[4] =
-+{
-+ {
-+ "notif",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__NotificationAck, notif),
-+ &sr__notification__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "result",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__NotificationAck, result),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "error",
-+ 3,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__NotificationAck, error),
-+ &sr__error__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "do_not_send_abort",
-+ 4,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_BOOL,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__NotificationAck, do_not_send_abort),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__notification_ack__field_indices_by_name[] = {
-+ 3, /* field[3] = do_not_send_abort */
-+ 2, /* field[2] = error */
-+ 0, /* field[0] = notif */
-+ 1, /* field[1] = result */
-+};
-+static const ProtobufCIntRange sr__notification_ack__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 4 }
-+};
-+const ProtobufCMessageDescriptor sr__notification_ack__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.NotificationAck",
-+ "NotificationAck",
-+ "Sr__NotificationAck",
-+ "sr",
-+ sizeof(Sr__NotificationAck),
-+ 4,
-+ sr__notification_ack__field_descriptors,
-+ sr__notification_ack__field_indices_by_name,
-+ 1, sr__notification_ack__number_ranges,
-+ (ProtobufCMessageInit) sr__notification_ack__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__internal_request__field_descriptors[9] =
-+{
-+ {
-+ "operation",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__InternalRequest, operation),
-+ &sr__operation__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "postpone_timeout",
-+ 2,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_UINT32,
-+ offsetof(Sr__InternalRequest, has_postpone_timeout),
-+ offsetof(Sr__InternalRequest, postpone_timeout),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "unsubscribe_dst_req",
-+ 10,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__InternalRequest, unsubscribe_dst_req),
-+ &sr__unsubscribe_destination_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "commit_timeout_req",
-+ 11,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__InternalRequest, commit_timeout_req),
-+ &sr__commit_timeout_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "oper_data_timeout_req",
-+ 12,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__InternalRequest, oper_data_timeout_req),
-+ &sr__oper_data_timeout_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "internal_state_data_req",
-+ 13,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__InternalRequest, internal_state_data_req),
-+ &sr__internal_state_data_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "notif_store_cleanup_req",
-+ 14,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__InternalRequest, notif_store_cleanup_req),
-+ &sr__notif_store_cleanup_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "delayed_msg_req",
-+ 15,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__InternalRequest, delayed_msg_req),
-+ &sr__delayed_msg_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "nacm_reload_req",
-+ 16,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__InternalRequest, nacm_reload_req),
-+ &sr__nacm_reload_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__internal_request__field_indices_by_name[] = {
-+ 3, /* field[3] = commit_timeout_req */
-+ 7, /* field[7] = delayed_msg_req */
-+ 5, /* field[5] = internal_state_data_req */
-+ 8, /* field[8] = nacm_reload_req */
-+ 6, /* field[6] = notif_store_cleanup_req */
-+ 4, /* field[4] = oper_data_timeout_req */
-+ 0, /* field[0] = operation */
-+ 1, /* field[1] = postpone_timeout */
-+ 2, /* field[2] = unsubscribe_dst_req */
-+};
-+static const ProtobufCIntRange sr__internal_request__number_ranges[2 + 1] =
-+{
-+ { 1, 0 },
-+ { 10, 2 },
-+ { 0, 9 }
-+};
-+const ProtobufCMessageDescriptor sr__internal_request__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.InternalRequest",
-+ "InternalRequest",
-+ "Sr__InternalRequest",
-+ "sr",
-+ sizeof(Sr__InternalRequest),
-+ 9,
-+ sr__internal_request__field_descriptors,
-+ sr__internal_request__field_indices_by_name,
-+ 2, sr__internal_request__number_ranges,
-+ (ProtobufCMessageInit) sr__internal_request__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCEnumValue sr__msg__msg_type__enum_values_by_number[5] =
-+{
-+ { "REQUEST", "SR__MSG__MSG_TYPE__REQUEST", 1 },
-+ { "RESPONSE", "SR__MSG__MSG_TYPE__RESPONSE", 2 },
-+ { "NOTIFICATION", "SR__MSG__MSG_TYPE__NOTIFICATION", 3 },
-+ { "NOTIFICATION_ACK", "SR__MSG__MSG_TYPE__NOTIFICATION_ACK", 4 },
-+ { "INTERNAL_REQUEST", "SR__MSG__MSG_TYPE__INTERNAL_REQUEST", 5 },
-+};
-+static const ProtobufCIntRange sr__msg__msg_type__value_ranges[] = {
-+{1, 0},{0, 5}
-+};
-+static const ProtobufCEnumValueIndex sr__msg__msg_type__enum_values_by_name[5] =
-+{
-+ { "INTERNAL_REQUEST", 4 },
-+ { "NOTIFICATION", 2 },
-+ { "NOTIFICATION_ACK", 3 },
-+ { "REQUEST", 0 },
-+ { "RESPONSE", 1 },
-+};
-+const ProtobufCEnumDescriptor sr__msg__msg_type__descriptor =
-+{
-+ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
-+ "sr.Msg.MsgType",
-+ "MsgType",
-+ "Sr__Msg__MsgType",
-+ "sr",
-+ 5,
-+ sr__msg__msg_type__enum_values_by_number,
-+ 5,
-+ sr__msg__msg_type__enum_values_by_name,
-+ 1,
-+ sr__msg__msg_type__value_ranges,
-+ NULL,NULL,NULL,NULL /* reserved[1234] */
-+};
-+static const ProtobufCFieldDescriptor sr__msg__field_descriptors[8] =
-+{
-+ {
-+ "type",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Msg, type),
-+ &sr__msg__msg_type__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "session_id",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Msg, session_id),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "request",
-+ 3,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Msg, request),
-+ &sr__request__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "response",
-+ 4,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Msg, response),
-+ &sr__response__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "notification",
-+ 5,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Msg, notification),
-+ &sr__notification__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "notification_ack",
-+ 6,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Msg, notification_ack),
-+ &sr__notification_ack__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "internal_request",
-+ 7,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Msg, internal_request),
-+ &sr__internal_request__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "_sysrepo_mem_ctx",
-+ 20,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT64,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Msg, _sysrepo_mem_ctx),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__msg__field_indices_by_name[] = {
-+ 7, /* field[7] = _sysrepo_mem_ctx */
-+ 6, /* field[6] = internal_request */
-+ 4, /* field[4] = notification */
-+ 5, /* field[5] = notification_ack */
-+ 2, /* field[2] = request */
-+ 3, /* field[3] = response */
-+ 1, /* field[1] = session_id */
-+ 0, /* field[0] = type */
-+};
-+static const ProtobufCIntRange sr__msg__number_ranges[2 + 1] =
-+{
-+ { 1, 0 },
-+ { 20, 7 },
-+ { 0, 8 }
-+};
-+const ProtobufCMessageDescriptor sr__msg__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.Msg",
-+ "Msg",
-+ "Sr__Msg",
-+ "sr",
-+ sizeof(Sr__Msg),
-+ 8,
-+ sr__msg__field_descriptors,
-+ sr__msg__field_indices_by_name,
-+ 2, sr__msg__number_ranges,
-+ (ProtobufCMessageInit) sr__msg__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCEnumValue sr__api_variant__enum_values_by_number[2] =
-+{
-+ { "VALUES", "SR__API_VARIANT__VALUES", 1 },
-+ { "TREES", "SR__API_VARIANT__TREES", 2 },
-+};
-+static const ProtobufCIntRange sr__api_variant__value_ranges[] = {
-+{1, 0},{0, 2}
-+};
-+static const ProtobufCEnumValueIndex sr__api_variant__enum_values_by_name[2] =
-+{
-+ { "TREES", 1 },
-+ { "VALUES", 0 },
-+};
-+const ProtobufCEnumDescriptor sr__api_variant__descriptor =
-+{
-+ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
-+ "sr.ApiVariant",
-+ "ApiVariant",
-+ "Sr__ApiVariant",
-+ "sr",
-+ 2,
-+ sr__api_variant__enum_values_by_number,
-+ 2,
-+ sr__api_variant__enum_values_by_name,
-+ 1,
-+ sr__api_variant__value_ranges,
-+ NULL,NULL,NULL,NULL /* reserved[1234] */
-+};
-+static const ProtobufCEnumValue sr__data_store__enum_values_by_number[3] =
-+{
-+ { "STARTUP", "SR__DATA_STORE__STARTUP", 1 },
-+ { "RUNNING", "SR__DATA_STORE__RUNNING", 2 },
-+ { "CANDIDATE", "SR__DATA_STORE__CANDIDATE", 3 },
-+};
-+static const ProtobufCIntRange sr__data_store__value_ranges[] = {
-+{1, 0},{0, 3}
-+};
-+static const ProtobufCEnumValueIndex sr__data_store__enum_values_by_name[3] =
-+{
-+ { "CANDIDATE", 2 },
-+ { "RUNNING", 1 },
-+ { "STARTUP", 0 },
-+};
-+const ProtobufCEnumDescriptor sr__data_store__descriptor =
-+{
-+ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
-+ "sr.DataStore",
-+ "DataStore",
-+ "Sr__DataStore",
-+ "sr",
-+ 3,
-+ sr__data_store__enum_values_by_number,
-+ 3,
-+ sr__data_store__enum_values_by_name,
-+ 1,
-+ sr__data_store__value_ranges,
-+ NULL,NULL,NULL,NULL /* reserved[1234] */
-+};
-+static const ProtobufCEnumValue sr__session_flags__enum_values_by_number[4] =
-+{
-+ { "SESS_DEFAULT", "SR__SESSION_FLAGS__SESS_DEFAULT", 0 },
-+ { "SESS_CONFIG_ONLY", "SR__SESSION_FLAGS__SESS_CONFIG_ONLY", 1 },
-+ { "SESS_ENABLE_NACM", "SR__SESSION_FLAGS__SESS_ENABLE_NACM", 2 },
-+ { "SESS_NOTIFICATION", "SR__SESSION_FLAGS__SESS_NOTIFICATION", 1024 },
-+};
-+static const ProtobufCIntRange sr__session_flags__value_ranges[] = {
-+{0, 0},{1024, 3},{0, 4}
-+};
-+static const ProtobufCEnumValueIndex sr__session_flags__enum_values_by_name[4] =
-+{
-+ { "SESS_CONFIG_ONLY", 1 },
-+ { "SESS_DEFAULT", 0 },
-+ { "SESS_ENABLE_NACM", 2 },
-+ { "SESS_NOTIFICATION", 3 },
-+};
-+const ProtobufCEnumDescriptor sr__session_flags__descriptor =
-+{
-+ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
-+ "sr.SessionFlags",
-+ "SessionFlags",
-+ "Sr__SessionFlags",
-+ "sr",
-+ 4,
-+ sr__session_flags__enum_values_by_number,
-+ 4,
-+ sr__session_flags__enum_values_by_name,
-+ 2,
-+ sr__session_flags__value_ranges,
-+ NULL,NULL,NULL,NULL /* reserved[1234] */
-+};
-+static const ProtobufCEnumValue sr__edit_flags__enum_values_by_number[3] =
-+{
-+ { "EDIT_DEFAULT", "SR__EDIT_FLAGS__EDIT_DEFAULT", 0 },
-+ { "EDIT_NON_RECURSIVE", "SR__EDIT_FLAGS__EDIT_NON_RECURSIVE", 1 },
-+ { "EDIT_STRICT", "SR__EDIT_FLAGS__EDIT_STRICT", 2 },
-+};
-+static const ProtobufCIntRange sr__edit_flags__value_ranges[] = {
-+{0, 0},{0, 3}
-+};
-+static const ProtobufCEnumValueIndex sr__edit_flags__enum_values_by_name[3] =
-+{
-+ { "EDIT_DEFAULT", 0 },
-+ { "EDIT_NON_RECURSIVE", 1 },
-+ { "EDIT_STRICT", 2 },
-+};
-+const ProtobufCEnumDescriptor sr__edit_flags__descriptor =
-+{
-+ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
-+ "sr.EditFlags",
-+ "EditFlags",
-+ "Sr__EditFlags",
-+ "sr",
-+ 3,
-+ sr__edit_flags__enum_values_by_number,
-+ 3,
-+ sr__edit_flags__enum_values_by_name,
-+ 1,
-+ sr__edit_flags__value_ranges,
-+ NULL,NULL,NULL,NULL /* reserved[1234] */
-+};
-+static const ProtobufCEnumValue sr__subscription_type__enum_values_by_number[10] =
-+{
-+ { "MODULE_INSTALL_SUBS", "SR__SUBSCRIPTION_TYPE__MODULE_INSTALL_SUBS", 1 },
-+ { "FEATURE_ENABLE_SUBS", "SR__SUBSCRIPTION_TYPE__FEATURE_ENABLE_SUBS", 2 },
-+ { "MODULE_CHANGE_SUBS", "SR__SUBSCRIPTION_TYPE__MODULE_CHANGE_SUBS", 10 },
-+ { "SUBTREE_CHANGE_SUBS", "SR__SUBSCRIPTION_TYPE__SUBTREE_CHANGE_SUBS", 11 },
-+ { "DP_GET_ITEMS_SUBS", "SR__SUBSCRIPTION_TYPE__DP_GET_ITEMS_SUBS", 20 },
-+ { "RPC_SUBS", "SR__SUBSCRIPTION_TYPE__RPC_SUBS", 30 },
-+ { "ACTION_SUBS", "SR__SUBSCRIPTION_TYPE__ACTION_SUBS", 31 },
-+ { "EVENT_NOTIF_SUBS", "SR__SUBSCRIPTION_TYPE__EVENT_NOTIF_SUBS", 40 },
-+ { "HELLO_SUBS", "SR__SUBSCRIPTION_TYPE__HELLO_SUBS", 50 },
-+ { "COMMIT_END_SUBS", "SR__SUBSCRIPTION_TYPE__COMMIT_END_SUBS", 51 },
-+};
-+static const ProtobufCIntRange sr__subscription_type__value_ranges[] = {
-+{1, 0},{10, 2},{20, 4},{30, 5},{40, 7},{50, 8},{0, 10}
-+};
-+static const ProtobufCEnumValueIndex sr__subscription_type__enum_values_by_name[10] =
-+{
-+ { "ACTION_SUBS", 6 },
-+ { "COMMIT_END_SUBS", 9 },
-+ { "DP_GET_ITEMS_SUBS", 4 },
-+ { "EVENT_NOTIF_SUBS", 7 },
-+ { "FEATURE_ENABLE_SUBS", 1 },
-+ { "HELLO_SUBS", 8 },
-+ { "MODULE_CHANGE_SUBS", 2 },
-+ { "MODULE_INSTALL_SUBS", 0 },
-+ { "RPC_SUBS", 5 },
-+ { "SUBTREE_CHANGE_SUBS", 3 },
-+};
-+const ProtobufCEnumDescriptor sr__subscription_type__descriptor =
-+{
-+ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
-+ "sr.SubscriptionType",
-+ "SubscriptionType",
-+ "Sr__SubscriptionType",
-+ "sr",
-+ 10,
-+ sr__subscription_type__enum_values_by_number,
-+ 10,
-+ sr__subscription_type__enum_values_by_name,
-+ 6,
-+ sr__subscription_type__value_ranges,
-+ NULL,NULL,NULL,NULL /* reserved[1234] */
-+};
-+static const ProtobufCEnumValue sr__notification_event__enum_values_by_number[4] =
-+{
-+ { "VERIFY_EV", "SR__NOTIFICATION_EVENT__VERIFY_EV", 1 },
-+ { "APPLY_EV", "SR__NOTIFICATION_EVENT__APPLY_EV", 2 },
-+ { "ABORT_EV", "SR__NOTIFICATION_EVENT__ABORT_EV", 3 },
-+ { "ENABLED_EV", "SR__NOTIFICATION_EVENT__ENABLED_EV", 4 },
-+};
-+static const ProtobufCIntRange sr__notification_event__value_ranges[] = {
-+{1, 0},{0, 4}
-+};
-+static const ProtobufCEnumValueIndex sr__notification_event__enum_values_by_name[4] =
-+{
-+ { "ABORT_EV", 2 },
-+ { "APPLY_EV", 1 },
-+ { "ENABLED_EV", 3 },
-+ { "VERIFY_EV", 0 },
-+};
-+const ProtobufCEnumDescriptor sr__notification_event__descriptor =
-+{
-+ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
-+ "sr.NotificationEvent",
-+ "NotificationEvent",
-+ "Sr__NotificationEvent",
-+ "sr",
-+ 4,
-+ sr__notification_event__enum_values_by_number,
-+ 4,
-+ sr__notification_event__enum_values_by_name,
-+ 1,
-+ sr__notification_event__value_ranges,
-+ NULL,NULL,NULL,NULL /* reserved[1234] */
-+};
-+static const ProtobufCEnumValue sr__module_state__enum_values_by_number[3] =
-+{
-+ { "UNINSTALLED", "SR__MODULE_STATE__UNINSTALLED", 1 },
-+ { "IMPORTED", "SR__MODULE_STATE__IMPORTED", 2 },
-+ { "IMPLEMENTED", "SR__MODULE_STATE__IMPLEMENTED", 3 },
-+};
-+static const ProtobufCIntRange sr__module_state__value_ranges[] = {
-+{1, 0},{0, 3}
-+};
-+static const ProtobufCEnumValueIndex sr__module_state__enum_values_by_name[3] =
-+{
-+ { "IMPLEMENTED", 2 },
-+ { "IMPORTED", 1 },
-+ { "UNINSTALLED", 0 },
-+};
-+const ProtobufCEnumDescriptor sr__module_state__descriptor =
-+{
-+ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
-+ "sr.ModuleState",
-+ "ModuleState",
-+ "Sr__ModuleState",
-+ "sr",
-+ 3,
-+ sr__module_state__enum_values_by_number,
-+ 3,
-+ sr__module_state__enum_values_by_name,
-+ 1,
-+ sr__module_state__value_ranges,
-+ NULL,NULL,NULL,NULL /* reserved[1234] */
-+};
-+static const ProtobufCEnumValue sr__change_operation__enum_values_by_number[4] =
-+{
-+ { "CREATED", "SR__CHANGE_OPERATION__CREATED", 1 },
-+ { "MODIFIED", "SR__CHANGE_OPERATION__MODIFIED", 2 },
-+ { "DELETED", "SR__CHANGE_OPERATION__DELETED", 3 },
-+ { "MOVED", "SR__CHANGE_OPERATION__MOVED", 4 },
-+};
-+static const ProtobufCIntRange sr__change_operation__value_ranges[] = {
-+{1, 0},{0, 4}
-+};
-+static const ProtobufCEnumValueIndex sr__change_operation__enum_values_by_name[4] =
-+{
-+ { "CREATED", 0 },
-+ { "DELETED", 2 },
-+ { "MODIFIED", 1 },
-+ { "MOVED", 3 },
-+};
-+const ProtobufCEnumDescriptor sr__change_operation__descriptor =
-+{
-+ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
-+ "sr.ChangeOperation",
-+ "ChangeOperation",
-+ "Sr__ChangeOperation",
-+ "sr",
-+ 4,
-+ sr__change_operation__enum_values_by_number,
-+ 4,
-+ sr__change_operation__enum_values_by_name,
-+ 1,
-+ sr__change_operation__value_ranges,
-+ NULL,NULL,NULL,NULL /* reserved[1234] */
-+};
-+static const ProtobufCEnumValue sr__operation__enum_values_by_number[43] =
-+{
-+ { "SESSION_START", "SR__OPERATION__SESSION_START", 10 },
-+ { "SESSION_STOP", "SR__OPERATION__SESSION_STOP", 11 },
-+ { "SESSION_REFRESH", "SR__OPERATION__SESSION_REFRESH", 12 },
-+ { "SESSION_CHECK", "SR__OPERATION__SESSION_CHECK", 13 },
-+ { "SESSION_SWITCH_DS", "SR__OPERATION__SESSION_SWITCH_DS", 14 },
-+ { "SESSION_SET_OPTS", "SR__OPERATION__SESSION_SET_OPTS", 15 },
-+ { "VERSION_VERIFY", "SR__OPERATION__VERSION_VERIFY", 16 },
-+ { "LIST_SCHEMAS", "SR__OPERATION__LIST_SCHEMAS", 20 },
-+ { "GET_SCHEMA", "SR__OPERATION__GET_SCHEMA", 21 },
-+ { "MODULE_INSTALL", "SR__OPERATION__MODULE_INSTALL", 22 },
-+ { "FEATURE_ENABLE", "SR__OPERATION__FEATURE_ENABLE", 23 },
-+ { "GET_ITEM", "SR__OPERATION__GET_ITEM", 30 },
-+ { "GET_ITEMS", "SR__OPERATION__GET_ITEMS", 31 },
-+ { "GET_SUBTREE", "SR__OPERATION__GET_SUBTREE", 32 },
-+ { "GET_SUBTREES", "SR__OPERATION__GET_SUBTREES", 33 },
-+ { "GET_SUBTREE_CHUNK", "SR__OPERATION__GET_SUBTREE_CHUNK", 34 },
-+ { "SET_ITEM", "SR__OPERATION__SET_ITEM", 40 },
-+ { "DELETE_ITEM", "SR__OPERATION__DELETE_ITEM", 41 },
-+ { "MOVE_ITEM", "SR__OPERATION__MOVE_ITEM", 42 },
-+ { "SET_ITEM_STR", "SR__OPERATION__SET_ITEM_STR", 43 },
-+ { "VALIDATE", "SR__OPERATION__VALIDATE", 50 },
-+ { "COMMIT", "SR__OPERATION__COMMIT", 51 },
-+ { "DISCARD_CHANGES", "SR__OPERATION__DISCARD_CHANGES", 52 },
-+ { "COPY_CONFIG", "SR__OPERATION__COPY_CONFIG", 53 },
-+ { "LOCK", "SR__OPERATION__LOCK", 60 },
-+ { "UNLOCK", "SR__OPERATION__UNLOCK", 61 },
-+ { "SUBSCRIBE", "SR__OPERATION__SUBSCRIBE", 70 },
-+ { "UNSUBSCRIBE", "SR__OPERATION__UNSUBSCRIBE", 71 },
-+ { "CHECK_ENABLED_RUNNING", "SR__OPERATION__CHECK_ENABLED_RUNNING", 72 },
-+ { "GET_CHANGES", "SR__OPERATION__GET_CHANGES", 73 },
-+ { "DATA_PROVIDE", "SR__OPERATION__DATA_PROVIDE", 80 },
-+ { "CHECK_EXEC_PERMISSION", "SR__OPERATION__CHECK_EXEC_PERMISSION", 81 },
-+ { "RPC", "SR__OPERATION__RPC", 82 },
-+ { "ACTION", "SR__OPERATION__ACTION", 83 },
-+ { "EVENT_NOTIF", "SR__OPERATION__EVENT_NOTIF", 84 },
-+ { "EVENT_NOTIF_REPLAY", "SR__OPERATION__EVENT_NOTIF_REPLAY", 85 },
-+ { "UNSUBSCRIBE_DESTINATION", "SR__OPERATION__UNSUBSCRIBE_DESTINATION", 101 },
-+ { "COMMIT_TIMEOUT", "SR__OPERATION__COMMIT_TIMEOUT", 102 },
-+ { "OPER_DATA_TIMEOUT", "SR__OPERATION__OPER_DATA_TIMEOUT", 103 },
-+ { "INTERNAL_STATE_DATA", "SR__OPERATION__INTERNAL_STATE_DATA", 104 },
-+ { "NOTIF_STORE_CLEANUP", "SR__OPERATION__NOTIF_STORE_CLEANUP", 105 },
-+ { "DELAYED_MSG", "SR__OPERATION__DELAYED_MSG", 106 },
-+ { "NACM_RELOAD", "SR__OPERATION__NACM_RELOAD", 107 },
-+};
-+static const ProtobufCIntRange sr__operation__value_ranges[] = {
-+{10, 0},{20, 7},{30, 11},{40, 16},{50, 20},{60, 24},{70, 26},{80, 30},{101, 36},{0, 43}
-+};
-+static const ProtobufCEnumValueIndex sr__operation__enum_values_by_name[43] =
-+{
-+ { "ACTION", 33 },
-+ { "CHECK_ENABLED_RUNNING", 28 },
-+ { "CHECK_EXEC_PERMISSION", 31 },
-+ { "COMMIT", 21 },
-+ { "COMMIT_TIMEOUT", 37 },
-+ { "COPY_CONFIG", 23 },
-+ { "DATA_PROVIDE", 30 },
-+ { "DELAYED_MSG", 41 },
-+ { "DELETE_ITEM", 17 },
-+ { "DISCARD_CHANGES", 22 },
-+ { "EVENT_NOTIF", 34 },
-+ { "EVENT_NOTIF_REPLAY", 35 },
-+ { "FEATURE_ENABLE", 10 },
-+ { "GET_CHANGES", 29 },
-+ { "GET_ITEM", 11 },
-+ { "GET_ITEMS", 12 },
-+ { "GET_SCHEMA", 8 },
-+ { "GET_SUBTREE", 13 },
-+ { "GET_SUBTREES", 14 },
-+ { "GET_SUBTREE_CHUNK", 15 },
-+ { "INTERNAL_STATE_DATA", 39 },
-+ { "LIST_SCHEMAS", 7 },
-+ { "LOCK", 24 },
-+ { "MODULE_INSTALL", 9 },
-+ { "MOVE_ITEM", 18 },
-+ { "NACM_RELOAD", 42 },
-+ { "NOTIF_STORE_CLEANUP", 40 },
-+ { "OPER_DATA_TIMEOUT", 38 },
-+ { "RPC", 32 },
-+ { "SESSION_CHECK", 3 },
-+ { "SESSION_REFRESH", 2 },
-+ { "SESSION_SET_OPTS", 5 },
-+ { "SESSION_START", 0 },
-+ { "SESSION_STOP", 1 },
-+ { "SESSION_SWITCH_DS", 4 },
-+ { "SET_ITEM", 16 },
-+ { "SET_ITEM_STR", 19 },
-+ { "SUBSCRIBE", 26 },
-+ { "UNLOCK", 25 },
-+ { "UNSUBSCRIBE", 27 },
-+ { "UNSUBSCRIBE_DESTINATION", 36 },
-+ { "VALIDATE", 20 },
-+ { "VERSION_VERIFY", 6 },
-+};
-+const ProtobufCEnumDescriptor sr__operation__descriptor =
-+{
-+ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
-+ "sr.Operation",
-+ "Operation",
-+ "Sr__Operation",
-+ "sr",
-+ 43,
-+ sr__operation__enum_values_by_number,
-+ 43,
-+ sr__operation__enum_values_by_name,
-+ 9,
-+ sr__operation__value_ranges,
-+ NULL,NULL,NULL,NULL /* reserved[1234] */
-+};
-Index: sysrepo-7aa2f18d234267403147df92c0005c871f0aa840/src/common/sysrepo.pb-c.h
-===================================================================
---- /dev/null
-+++ sysrepo-7aa2f18d234267403147df92c0005c871f0aa840/src/common/sysrepo.pb-c.h
-@@ -0,0 +1,4238 @@
-+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
-+/* Generated from: sysrepo.proto */
-+
-+#ifndef PROTOBUF_C_sysrepo_2eproto__INCLUDED
-+#define PROTOBUF_C_sysrepo_2eproto__INCLUDED
-+
-+#include <protobuf-c/protobuf-c.h>
-+
-+PROTOBUF_C__BEGIN_DECLS
-+
-+#if PROTOBUF_C_VERSION_NUMBER < 1000000
-+# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers.
-+#elif 1002001 < PROTOBUF_C_MIN_COMPILER_VERSION
-+# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c.
-+#endif
-+
-+
-+typedef struct _Sr__Value Sr__Value;
-+typedef struct _Sr__Node Sr__Node;
-+typedef struct _Sr__Error Sr__Error;
-+typedef struct _Sr__SessionStartReq Sr__SessionStartReq;
-+typedef struct _Sr__SessionStartResp Sr__SessionStartResp;
-+typedef struct _Sr__SessionStopReq Sr__SessionStopReq;
-+typedef struct _Sr__SessionStopResp Sr__SessionStopResp;
-+typedef struct _Sr__SessionRefreshReq Sr__SessionRefreshReq;
-+typedef struct _Sr__SessionRefreshResp Sr__SessionRefreshResp;
-+typedef struct _Sr__SessionCheckReq Sr__SessionCheckReq;
-+typedef struct _Sr__SessionCheckResp Sr__SessionCheckResp;
-+typedef struct _Sr__SessionSwitchDsReq Sr__SessionSwitchDsReq;
-+typedef struct _Sr__SessionSwitchDsResp Sr__SessionSwitchDsResp;
-+typedef struct _Sr__SessionSetOptsReq Sr__SessionSetOptsReq;
-+typedef struct _Sr__SessionSetOptsResp Sr__SessionSetOptsResp;
-+typedef struct _Sr__VersionVerifyReq Sr__VersionVerifyReq;
-+typedef struct _Sr__VersionVerifyResp Sr__VersionVerifyResp;
-+typedef struct _Sr__SchemaRevision Sr__SchemaRevision;
-+typedef struct _Sr__SchemaSubmodule Sr__SchemaSubmodule;
-+typedef struct _Sr__Schema Sr__Schema;
-+typedef struct _Sr__ListSchemasReq Sr__ListSchemasReq;
-+typedef struct _Sr__ListSchemasResp Sr__ListSchemasResp;
-+typedef struct _Sr__GetSchemaReq Sr__GetSchemaReq;
-+typedef struct _Sr__GetSchemaResp Sr__GetSchemaResp;
-+typedef struct _Sr__GetItemReq Sr__GetItemReq;
-+typedef struct _Sr__GetItemResp Sr__GetItemResp;
-+typedef struct _Sr__GetItemsReq Sr__GetItemsReq;
-+typedef struct _Sr__GetItemsResp Sr__GetItemsResp;
-+typedef struct _Sr__GetSubtreeReq Sr__GetSubtreeReq;
-+typedef struct _Sr__GetSubtreeResp Sr__GetSubtreeResp;
-+typedef struct _Sr__GetSubtreesReq Sr__GetSubtreesReq;
-+typedef struct _Sr__GetSubtreesResp Sr__GetSubtreesResp;
-+typedef struct _Sr__GetSubtreeChunkReq Sr__GetSubtreeChunkReq;
-+typedef struct _Sr__GetSubtreeChunkResp Sr__GetSubtreeChunkResp;
-+typedef struct _Sr__SetItemReq Sr__SetItemReq;
-+typedef struct _Sr__SetItemResp Sr__SetItemResp;
-+typedef struct _Sr__SetItemStrReq Sr__SetItemStrReq;
-+typedef struct _Sr__SetItemStrResp Sr__SetItemStrResp;
-+typedef struct _Sr__DeleteItemReq Sr__DeleteItemReq;
-+typedef struct _Sr__DeleteItemResp Sr__DeleteItemResp;
-+typedef struct _Sr__MoveItemReq Sr__MoveItemReq;
-+typedef struct _Sr__MoveItemResp Sr__MoveItemResp;
-+typedef struct _Sr__ValidateReq Sr__ValidateReq;
-+typedef struct _Sr__ValidateResp Sr__ValidateResp;
-+typedef struct _Sr__CommitReq Sr__CommitReq;
-+typedef struct _Sr__CommitResp Sr__CommitResp;
-+typedef struct _Sr__DiscardChangesReq Sr__DiscardChangesReq;
-+typedef struct _Sr__DiscardChangesResp Sr__DiscardChangesResp;
-+typedef struct _Sr__CopyConfigReq Sr__CopyConfigReq;
-+typedef struct _Sr__CopyConfigResp Sr__CopyConfigResp;
-+typedef struct _Sr__LockReq Sr__LockReq;
-+typedef struct _Sr__LockResp Sr__LockResp;
-+typedef struct _Sr__UnlockReq Sr__UnlockReq;
-+typedef struct _Sr__UnlockResp Sr__UnlockResp;
-+typedef struct _Sr__SubscribeReq Sr__SubscribeReq;
-+typedef struct _Sr__SubscribeResp Sr__SubscribeResp;
-+typedef struct _Sr__UnsubscribeReq Sr__UnsubscribeReq;
-+typedef struct _Sr__UnsubscribeResp Sr__UnsubscribeResp;
-+typedef struct _Sr__CheckEnabledRunningReq Sr__CheckEnabledRunningReq;
-+typedef struct _Sr__CheckEnabledRunningResp Sr__CheckEnabledRunningResp;
-+typedef struct _Sr__ModuleInstallNotification Sr__ModuleInstallNotification;
-+typedef struct _Sr__FeatureEnableNotification Sr__FeatureEnableNotification;
-+typedef struct _Sr__ModuleChangeNotification Sr__ModuleChangeNotification;
-+typedef struct _Sr__SubtreeChangeNotification Sr__SubtreeChangeNotification;
-+typedef struct _Sr__Change Sr__Change;
-+typedef struct _Sr__GetChangesReq Sr__GetChangesReq;
-+typedef struct _Sr__GetChangesResp Sr__GetChangesResp;
-+typedef struct _Sr__CheckExecPermReq Sr__CheckExecPermReq;
-+typedef struct _Sr__CheckExecPermResp Sr__CheckExecPermResp;
-+typedef struct _Sr__RPCReq Sr__RPCReq;
-+typedef struct _Sr__RPCResp Sr__RPCResp;
-+typedef struct _Sr__EventNotifReq Sr__EventNotifReq;
-+typedef struct _Sr__EventNotifResp Sr__EventNotifResp;
-+typedef struct _Sr__EventNotifReplayReq Sr__EventNotifReplayReq;
-+typedef struct _Sr__EventNotifReplayResp Sr__EventNotifReplayResp;
-+typedef struct _Sr__DataProvideReq Sr__DataProvideReq;
-+typedef struct _Sr__DataProvideResp Sr__DataProvideResp;
-+typedef struct _Sr__ModuleInstallReq Sr__ModuleInstallReq;
-+typedef struct _Sr__ModuleInstallResp Sr__ModuleInstallResp;
-+typedef struct _Sr__FeatureEnableReq Sr__FeatureEnableReq;
-+typedef struct _Sr__FeatureEnableResp Sr__FeatureEnableResp;
-+typedef struct _Sr__UnsubscribeDestinationReq Sr__UnsubscribeDestinationReq;
-+typedef struct _Sr__CommitTimeoutReq Sr__CommitTimeoutReq;
-+typedef struct _Sr__OperDataTimeoutReq Sr__OperDataTimeoutReq;
-+typedef struct _Sr__InternalStateDataReq Sr__InternalStateDataReq;
-+typedef struct _Sr__NotifStoreCleanupReq Sr__NotifStoreCleanupReq;
-+typedef struct _Sr__DelayedMsgReq Sr__DelayedMsgReq;
-+typedef struct _Sr__NacmReloadReq Sr__NacmReloadReq;
-+typedef struct _Sr__Request Sr__Request;
-+typedef struct _Sr__Response Sr__Response;
-+typedef struct _Sr__Notification Sr__Notification;
-+typedef struct _Sr__NotificationAck Sr__NotificationAck;
-+typedef struct _Sr__InternalRequest Sr__InternalRequest;
-+typedef struct _Sr__Msg Sr__Msg;
-+
-+
-+/* --- enums --- */
-+
-+typedef enum _Sr__Value__Types {
-+ SR__VALUE__TYPES__LIST = 1,
-+ SR__VALUE__TYPES__CONTAINER = 2,
-+ SR__VALUE__TYPES__CONTAINER_PRESENCE = 3,
-+ SR__VALUE__TYPES__LEAF_EMPTY = 4,
-+ SR__VALUE__TYPES__BINARY = 10,
-+ SR__VALUE__TYPES__BITS = 11,
-+ SR__VALUE__TYPES__BOOL = 12,
-+ SR__VALUE__TYPES__DECIMAL64 = 13,
-+ SR__VALUE__TYPES__ENUM = 14,
-+ SR__VALUE__TYPES__IDENTITYREF = 15,
-+ SR__VALUE__TYPES__INSTANCEID = 16,
-+ SR__VALUE__TYPES__INT8 = 17,
-+ SR__VALUE__TYPES__INT16 = 18,
-+ SR__VALUE__TYPES__INT32 = 19,
-+ SR__VALUE__TYPES__INT64 = 20,
-+ SR__VALUE__TYPES__STRING = 21,
-+ SR__VALUE__TYPES__UINT8 = 22,
-+ SR__VALUE__TYPES__UINT16 = 23,
-+ SR__VALUE__TYPES__UINT32 = 24,
-+ SR__VALUE__TYPES__UINT64 = 25,
-+ SR__VALUE__TYPES__ANYXML = 26,
-+ SR__VALUE__TYPES__ANYDATA = 27
-+ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__VALUE__TYPES)
-+} Sr__Value__Types;
-+typedef enum _Sr__MoveItemReq__MovePosition {
-+ SR__MOVE_ITEM_REQ__MOVE_POSITION__BEFORE = 1,
-+ SR__MOVE_ITEM_REQ__MOVE_POSITION__AFTER = 2,
-+ SR__MOVE_ITEM_REQ__MOVE_POSITION__FIRST = 3,
-+ SR__MOVE_ITEM_REQ__MOVE_POSITION__LAST = 4
-+ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__MOVE_ITEM_REQ__MOVE_POSITION)
-+} Sr__MoveItemReq__MovePosition;
-+/*
-+ **
-+ * @brief Type of the event notification.
-+ */
-+typedef enum _Sr__EventNotifReq__NotifType {
-+ SR__EVENT_NOTIF_REQ__NOTIF_TYPE__REALTIME = 1,
-+ SR__EVENT_NOTIF_REQ__NOTIF_TYPE__REPLAY = 2,
-+ SR__EVENT_NOTIF_REQ__NOTIF_TYPE__REPLAY_COMPLETE = 3,
-+ SR__EVENT_NOTIF_REQ__NOTIF_TYPE__REPLAY_STOP = 4
-+ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__EVENT_NOTIF_REQ__NOTIF_TYPE)
-+} Sr__EventNotifReq__NotifType;
-+/*
-+ **
-+ * @brief Flags used to override default session handling.
-+ */
-+typedef enum _Sr__EventNotifReq__NotifFlags {
-+ /*
-+ **< Notification will be handled normally.
-+ */
-+ SR__EVENT_NOTIF_REQ__NOTIF_FLAGS__DEFAULT = 0,
-+ /*
-+ **< Notification will not be stored in the notification store.
-+ */
-+ SR__EVENT_NOTIF_REQ__NOTIF_FLAGS__EPHEMERAL = 1
-+ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__EVENT_NOTIF_REQ__NOTIF_FLAGS)
-+} Sr__EventNotifReq__NotifFlags;
-+/*
-+ **
-+ * @brief Type of the message.
-+ */
-+typedef enum _Sr__Msg__MsgType {
-+ /*
-+ **< The message is a request.
-+ */
-+ SR__MSG__MSG_TYPE__REQUEST = 1,
-+ /*
-+ **< The message is a response to the request.
-+ */
-+ SR__MSG__MSG_TYPE__RESPONSE = 2,
-+ /*
-+ **< The message is a notification.
-+ */
-+ SR__MSG__MSG_TYPE__NOTIFICATION = 3,
-+ /*
-+ **< The message is a notification acknowledgment.
-+ */
-+ SR__MSG__MSG_TYPE__NOTIFICATION_ACK = 4,
-+ /*
-+ **< The message is an internal request, should not be used from the public API.
-+ */
-+ SR__MSG__MSG_TYPE__INTERNAL_REQUEST = 5
-+ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__MSG__MSG_TYPE)
-+} Sr__Msg__MsgType;
-+/*
-+ **
-+ * @brief Variant of the API. Currently only values (sr_val_t) vs. trees (sr_node_t).
-+ */
-+typedef enum _Sr__ApiVariant {
-+ SR__API_VARIANT__VALUES = 1,
-+ SR__API_VARIANT__TREES = 2
-+ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__API_VARIANT)
-+} Sr__ApiVariant;
-+/*
-+ **
-+ * @brief Datastore on which the configuration session will operate.
-+ */
-+typedef enum _Sr__DataStore {
-+ SR__DATA_STORE__STARTUP = 1,
-+ SR__DATA_STORE__RUNNING = 2,
-+ SR__DATA_STORE__CANDIDATE = 3
-+ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__DATA_STORE)
-+} Sr__DataStore;
-+/*
-+ **
-+ * @brief Flags used to override default session handling.
-+ */
-+typedef enum _Sr__SessionFlags {
-+ /*
-+ **< Default (normal) session behavior.
-+ */
-+ SR__SESSION_FLAGS__SESS_DEFAULT = 0,
-+ /*
-+ **< Session will process only configuration data (e.g. sysrepo won't
-+ *return any state data by ::sr_get_items / ::sr_get_items_iter calls).
-+ */
-+ SR__SESSION_FLAGS__SESS_CONFIG_ONLY = 1,
-+ /*
-+ **< Enable NETCONF access control for this session.
-+ */
-+ SR__SESSION_FLAGS__SESS_ENABLE_NACM = 2,
-+ /*
-+ **< Notification session (internal type of session).
-+ */
-+ SR__SESSION_FLAGS__SESS_NOTIFICATION = 1024
-+ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__SESSION_FLAGS)
-+} Sr__SessionFlags;
-+/*
-+ **
-+ * @brief Flags used to override default behavior of data manipulation calls.
-+ */
-+typedef enum _Sr__EditFlags {
-+ /*
-+ **< Default behavior - recursive and non-strict.
-+ */
-+ SR__EDIT_FLAGS__EDIT_DEFAULT = 0,
-+ /*
-+ **< Non-recursive behavior:
-+ *by ::SetItemReq, all preceding nodes (parents) of the identified element must exist,
-+ *by ::DeleteItemReq xpath must not identify an non-empty list or non-empty container.
-+ */
-+ SR__EDIT_FLAGS__EDIT_NON_RECURSIVE = 1,
-+ /*
-+ **< Strict behavior:
-+ *by ::SetItemReq the identified element must not exist (similar to netconf create operation),
-+ *by ::DeleteItemReq the identified element must exist (similar to netconf delete operation).
-+ */
-+ SR__EDIT_FLAGS__EDIT_STRICT = 2
-+ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__EDIT_FLAGS)
-+} Sr__EditFlags;
-+typedef enum _Sr__SubscriptionType {
-+ SR__SUBSCRIPTION_TYPE__MODULE_INSTALL_SUBS = 1,
-+ SR__SUBSCRIPTION_TYPE__FEATURE_ENABLE_SUBS = 2,
-+ SR__SUBSCRIPTION_TYPE__MODULE_CHANGE_SUBS = 10,
-+ SR__SUBSCRIPTION_TYPE__SUBTREE_CHANGE_SUBS = 11,
-+ SR__SUBSCRIPTION_TYPE__DP_GET_ITEMS_SUBS = 20,
-+ SR__SUBSCRIPTION_TYPE__RPC_SUBS = 30,
-+ SR__SUBSCRIPTION_TYPE__ACTION_SUBS = 31,
-+ SR__SUBSCRIPTION_TYPE__EVENT_NOTIF_SUBS = 40,
-+ /*
-+ **< Used only internally to test for inactive notification subscriptions.
-+ */
-+ SR__SUBSCRIPTION_TYPE__HELLO_SUBS = 50,
-+ /*
-+ **< Used only internally to notify about the end of the commit process.
-+ */
-+ SR__SUBSCRIPTION_TYPE__COMMIT_END_SUBS = 51
-+ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__SUBSCRIPTION_TYPE)
-+} Sr__SubscriptionType;
-+typedef enum _Sr__NotificationEvent {
-+ SR__NOTIFICATION_EVENT__VERIFY_EV = 1,
-+ SR__NOTIFICATION_EVENT__APPLY_EV = 2,
-+ SR__NOTIFICATION_EVENT__ABORT_EV = 3,
-+ SR__NOTIFICATION_EVENT__ENABLED_EV = 4
-+ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__NOTIFICATION_EVENT)
-+} Sr__NotificationEvent;
-+typedef enum _Sr__ModuleState {
-+ SR__MODULE_STATE__UNINSTALLED = 1,
-+ SR__MODULE_STATE__IMPORTED = 2,
-+ SR__MODULE_STATE__IMPLEMENTED = 3
-+ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__MODULE_STATE)
-+} Sr__ModuleState;
-+typedef enum _Sr__ChangeOperation {
-+ SR__CHANGE_OPERATION__CREATED = 1,
-+ SR__CHANGE_OPERATION__MODIFIED = 2,
-+ SR__CHANGE_OPERATION__DELETED = 3,
-+ SR__CHANGE_OPERATION__MOVED = 4
-+ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__CHANGE_OPERATION)
-+} Sr__ChangeOperation;
-+/*
-+ **
-+ * @brief Requested operation.
-+ */
-+typedef enum _Sr__Operation {
-+ SR__OPERATION__SESSION_START = 10,
-+ SR__OPERATION__SESSION_STOP = 11,
-+ SR__OPERATION__SESSION_REFRESH = 12,
-+ SR__OPERATION__SESSION_CHECK = 13,
-+ SR__OPERATION__SESSION_SWITCH_DS = 14,
-+ SR__OPERATION__SESSION_SET_OPTS = 15,
-+ SR__OPERATION__VERSION_VERIFY = 16,
-+ SR__OPERATION__LIST_SCHEMAS = 20,
-+ SR__OPERATION__GET_SCHEMA = 21,
-+ SR__OPERATION__MODULE_INSTALL = 22,
-+ SR__OPERATION__FEATURE_ENABLE = 23,
-+ SR__OPERATION__GET_ITEM = 30,
-+ SR__OPERATION__GET_ITEMS = 31,
-+ SR__OPERATION__GET_SUBTREE = 32,
-+ SR__OPERATION__GET_SUBTREES = 33,
-+ SR__OPERATION__GET_SUBTREE_CHUNK = 34,
-+ SR__OPERATION__SET_ITEM = 40,
-+ SR__OPERATION__DELETE_ITEM = 41,
-+ SR__OPERATION__MOVE_ITEM = 42,
-+ SR__OPERATION__SET_ITEM_STR = 43,
-+ SR__OPERATION__VALIDATE = 50,
-+ SR__OPERATION__COMMIT = 51,
-+ SR__OPERATION__DISCARD_CHANGES = 52,
-+ SR__OPERATION__COPY_CONFIG = 53,
-+ SR__OPERATION__LOCK = 60,
-+ SR__OPERATION__UNLOCK = 61,
-+ SR__OPERATION__SUBSCRIBE = 70,
-+ SR__OPERATION__UNSUBSCRIBE = 71,
-+ SR__OPERATION__CHECK_ENABLED_RUNNING = 72,
-+ SR__OPERATION__GET_CHANGES = 73,
-+ SR__OPERATION__DATA_PROVIDE = 80,
-+ SR__OPERATION__CHECK_EXEC_PERMISSION = 81,
-+ SR__OPERATION__RPC = 82,
-+ SR__OPERATION__ACTION = 83,
-+ SR__OPERATION__EVENT_NOTIF = 84,
-+ SR__OPERATION__EVENT_NOTIF_REPLAY = 85,
-+ SR__OPERATION__UNSUBSCRIBE_DESTINATION = 101,
-+ SR__OPERATION__COMMIT_TIMEOUT = 102,
-+ SR__OPERATION__OPER_DATA_TIMEOUT = 103,
-+ SR__OPERATION__INTERNAL_STATE_DATA = 104,
-+ SR__OPERATION__NOTIF_STORE_CLEANUP = 105,
-+ SR__OPERATION__DELAYED_MSG = 106,
-+ SR__OPERATION__NACM_RELOAD = 107
-+ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__OPERATION)
-+} Sr__Operation;
-+
-+/* --- messages --- */
-+
-+/*
-+ **
-+ * @brief Value of an item stored (or to be stored) in the datastore.
-+ * Can be mapped to sr_val_t data structure from sysrepo library API.
-+ */
-+struct _Sr__Value
-+{
-+ ProtobufCMessage base;
-+ char *xpath;
-+ Sr__Value__Types type;
-+ protobuf_c_boolean dflt;
-+ char *binary_val;
-+ char *bits_val;
-+ protobuf_c_boolean has_bool_val;
-+ protobuf_c_boolean bool_val;
-+ protobuf_c_boolean has_decimal64_val;
-+ double decimal64_val;
-+ char *enum_val;
-+ char *identityref_val;
-+ char *instanceid_val;
-+ protobuf_c_boolean has_int8_val;
-+ int32_t int8_val;
-+ protobuf_c_boolean has_int16_val;
-+ int32_t int16_val;
-+ protobuf_c_boolean has_int32_val;
-+ int32_t int32_val;
-+ protobuf_c_boolean has_int64_val;
-+ int64_t int64_val;
-+ char *string_val;
-+ protobuf_c_boolean has_uint8_val;
-+ uint32_t uint8_val;
-+ protobuf_c_boolean has_uint16_val;
-+ uint32_t uint16_val;
-+ protobuf_c_boolean has_uint32_val;
-+ uint32_t uint32_val;
-+ protobuf_c_boolean has_uint64_val;
-+ uint64_t uint64_val;
-+ char *anyxml_val;
-+ char *anydata_val;
-+};
-+#define SR__VALUE__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__value__descriptor) \
-+ , NULL, 0, 0, NULL, NULL, 0,0, 0,0, NULL, NULL, NULL, 0,0, 0,0, 0,0, 0,0, NULL, 0,0, 0,0, 0,0, 0,0, NULL, NULL }
-+
-+
-+/*
-+ **
-+ * @brief Item stored (or to be stored) in the datastore represented as a tree node
-+ * reflecting module schema. Can be mapped to sr_node_t data structure from sysrepo library API.
-+ */
-+struct _Sr__Node
-+{
-+ ProtobufCMessage base;
-+ /*
-+ **< Value of the node; member *xpath* is used to store node's name.
-+ */
-+ Sr__Value *value;
-+ /*
-+ **< Name of the module that defines scheme of this node.
-+ */
-+ char *module_name;
-+ /*
-+ **< Direct descendands of this node.
-+ */
-+ size_t n_children;
-+ Sr__Node **children;
-+};
-+#define SR__NODE__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__node__descriptor) \
-+ , NULL, NULL, 0,NULL }
-+
-+
-+/*
-+ **
-+ * @brief Error message retuned from the Sysrepo Engine.
-+ */
-+struct _Sr__Error
-+{
-+ ProtobufCMessage base;
-+ char *message;
-+ char *xpath;
-+};
-+#define SR__ERROR__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__error__descriptor) \
-+ , NULL, NULL }
-+
-+
-+/*
-+ **
-+ * @brief Request for starting a session. Sent by sr_session_start API call.
-+ */
-+struct _Sr__SessionStartReq
-+{
-+ ProtobufCMessage base;
-+ Sr__DataStore datastore;
-+ char *user_name;
-+ /*
-+ **< Bitwise OR of SessionFlags.
-+ */
-+ uint32_t options;
-+ /*
-+ **< Applicable if SESS_NOTIFICATION was specified.
-+ */
-+ protobuf_c_boolean has_commit_id;
-+ uint32_t commit_id;
-+};
-+#define SR__SESSION_START_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__session_start_req__descriptor) \
-+ , 0, NULL, 0, 0,0 }
-+
-+
-+/*
-+ **
-+ * @brief Response to session_start request.
-+ */
-+struct _Sr__SessionStartResp
-+{
-+ ProtobufCMessage base;
-+ uint32_t session_id;
-+};
-+#define SR__SESSION_START_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__session_start_resp__descriptor) \
-+ , 0 }
-+
-+
-+/*
-+ **
-+ * @brief Request for stopping the session. Sent by sr_session_stop API call.
-+ */
-+struct _Sr__SessionStopReq
-+{
-+ ProtobufCMessage base;
-+ uint32_t session_id;
-+};
-+#define SR__SESSION_STOP_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__session_stop_req__descriptor) \
-+ , 0 }
-+
-+
-+/*
-+ **
-+ * @brief Response to session_stop request.
-+ */
-+struct _Sr__SessionStopResp
-+{
-+ ProtobufCMessage base;
-+ uint32_t session_id;
-+};
-+#define SR__SESSION_STOP_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__session_stop_resp__descriptor) \
-+ , 0 }
-+
-+
-+/*
-+ **
-+ * @brief Refreshes configuration data cached within the session.
-+ * Sent by sr_session_refresh API call.
-+ */
-+struct _Sr__SessionRefreshReq
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__SESSION_REFRESH_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__session_refresh_req__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_session_refresh request.
-+ */
-+struct _Sr__SessionRefreshResp
-+{
-+ ProtobufCMessage base;
-+ size_t n_errors;
-+ Sr__Error **errors;
-+};
-+#define SR__SESSION_REFRESH_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__session_refresh_resp__descriptor) \
-+ , 0,NULL }
-+
-+
-+/*
-+ **
-+ * @brief Checks aliveness and validity of the session & connection tied to it.
-+ * Sent by sr_session_check API call.
-+ */
-+struct _Sr__SessionCheckReq
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__SESSION_CHECK_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__session_check_req__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_session_check request.
-+ */
-+struct _Sr__SessionCheckResp
-+{
-+ ProtobufCMessage base;
-+ size_t n_errors;
-+ Sr__Error **errors;
-+};
-+#define SR__SESSION_CHECK_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__session_check_resp__descriptor) \
-+ , 0,NULL }
-+
-+
-+/*
-+ **
-+ * @brief Changes the datastore to which the session is tied to.
-+ */
-+struct _Sr__SessionSwitchDsReq
-+{
-+ ProtobufCMessage base;
-+ Sr__DataStore datastore;
-+};
-+#define SR__SESSION_SWITCH_DS_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__session_switch_ds_req__descriptor) \
-+ , 0 }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_session_switch_ds request.
-+ */
-+struct _Sr__SessionSwitchDsResp
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__SESSION_SWITCH_DS_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__session_switch_ds_resp__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Request for modification of session options.
-+ */
-+struct _Sr__SessionSetOptsReq
-+{
-+ ProtobufCMessage base;
-+ uint32_t options;
-+};
-+#define SR__SESSION_SET_OPTS_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__session_set_opts_req__descriptor) \
-+ , 0 }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_session_set_options.
-+ */
-+struct _Sr__SessionSetOptsResp
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__SESSION_SET_OPTS_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__session_set_opts_resp__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Request to verify version compatibility.
-+ */
-+struct _Sr__VersionVerifyReq
-+{
-+ ProtobufCMessage base;
-+ char *soname;
-+};
-+#define SR__VERSION_VERIFY_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__version_verify_req__descriptor) \
-+ , NULL }
-+
-+
-+/*
-+ **
-+ * @brief Response to version verification.
-+ */
-+struct _Sr__VersionVerifyResp
-+{
-+ ProtobufCMessage base;
-+ /*
-+ **< server-side SONAME version in case of versions incompatibility.
-+ */
-+ char *soname;
-+};
-+#define SR__VERSION_VERIFY_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__version_verify_resp__descriptor) \
-+ , NULL }
-+
-+
-+/*
-+ **
-+ * @brief Schema revision details.
-+ */
-+struct _Sr__SchemaRevision
-+{
-+ ProtobufCMessage base;
-+ /*
-+ **< Latest revision date of the module.
-+ */
-+ char *revision;
-+ /*
-+ **< Absolute path to file where the schema is stored (YANG format).
-+ */
-+ char *file_path_yang;
-+ /*
-+ **< Absolute path to file where the schema is stored (.yin format).
-+ */
-+ char *file_path_yin;
-+};
-+#define SR__SCHEMA_REVISION__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__schema_revision__descriptor) \
-+ , NULL, NULL, NULL }
-+
-+
-+/*
-+ **
-+ * @brief Schema submodule information.
-+ */
-+struct _Sr__SchemaSubmodule
-+{
-+ ProtobufCMessage base;
-+ /*
-+ **< Submodule name
-+ */
-+ char *submodule_name;
-+ /*
-+ **< Revision of the submodule
-+ */
-+ Sr__SchemaRevision *revision;
-+};
-+#define SR__SCHEMA_SUBMODULE__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__schema_submodule__descriptor) \
-+ , NULL, NULL }
-+
-+
-+/*
-+ **
-+ * @brief Information about a schema installed in sysrepo datastore.
-+ */
-+struct _Sr__Schema
-+{
-+ ProtobufCMessage base;
-+ /*
-+ **< Name of the module.
-+ */
-+ char *module_name;
-+ /*
-+ **< Namespace of the module.
-+ */
-+ char *ns;
-+ /*
-+ **< Prefix of he module.
-+ */
-+ char *prefix;
-+ /*
-+ **< TRUE only for explicitly installed modules (those are always implemented).
-+ */
-+ protobuf_c_boolean installed;
-+ /*
-+ **< TRUE for implemented modules (do not have to be installed if they have augments,
-+ *deviations or are targets for leafrefs of other implemented modules).
-+ */
-+ protobuf_c_boolean implemented;
-+ /*
-+ **< Revision of the module
-+ */
-+ Sr__SchemaRevision *revision;
-+ /*
-+ **< Submodules
-+ */
-+ size_t n_submodules;
-+ Sr__SchemaSubmodule **submodules;
-+ /*
-+ **< Features enabled for the module
-+ */
-+ size_t n_enabled_features;
-+ char **enabled_features;
-+};
-+#define SR__SCHEMA__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__schema__descriptor) \
-+ , NULL, NULL, NULL, 0, 0, NULL, 0,NULL, 0,NULL }
-+
-+
-+/*
-+ **
-+ * @brief Retrieves an array of schemas installed in the sysrepo datastore.
-+ * Sent by sr_list_schemas API call.
-+ */
-+struct _Sr__ListSchemasReq
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__LIST_SCHEMAS_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__list_schemas_req__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_list_schemas request.
-+ */
-+struct _Sr__ListSchemasResp
-+{
-+ ProtobufCMessage base;
-+ size_t n_schemas;
-+ Sr__Schema **schemas;
-+};
-+#define SR__LIST_SCHEMAS_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__list_schemas_resp__descriptor) \
-+ , 0,NULL }
-+
-+
-+/*
-+ **
-+ * @brief Retrieves the content of specified schema file.
-+ * Sent by sr_get_schema API call.
-+ */
-+struct _Sr__GetSchemaReq
-+{
-+ ProtobufCMessage base;
-+ char *module_name;
-+ char *revision;
-+ char *submodule_name;
-+ char *submodule_revision;
-+ protobuf_c_boolean yang_format;
-+};
-+#define SR__GET_SCHEMA_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__get_schema_req__descriptor) \
-+ , NULL, NULL, NULL, NULL, 0 }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_get_schema request.
-+ */
-+struct _Sr__GetSchemaResp
-+{
-+ ProtobufCMessage base;
-+ char *schema_content;
-+};
-+#define SR__GET_SCHEMA_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__get_schema_resp__descriptor) \
-+ , NULL }
-+
-+
-+/*
-+ **
-+ * @brief Retrieves a single data element stored under provided path.
-+ * Sent by sr_get_item API call.
-+ */
-+struct _Sr__GetItemReq
-+{
-+ ProtobufCMessage base;
-+ char *xpath;
-+};
-+#define SR__GET_ITEM_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__get_item_req__descriptor) \
-+ , NULL }
-+
-+
-+/*
-+ **
-+ * @brief Response to get_item request.
-+ */
-+struct _Sr__GetItemResp
-+{
-+ ProtobufCMessage base;
-+ Sr__Value *value;
-+};
-+#define SR__GET_ITEM_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__get_item_resp__descriptor) \
-+ , NULL }
-+
-+
-+/*
-+ **
-+ * @brief Retrieves an array of data elements stored under provided path.
-+ * Sent by sr_get_items and sr_get_items_iter API calls.
-+ */
-+struct _Sr__GetItemsReq
-+{
-+ ProtobufCMessage base;
-+ char *xpath;
-+ /*
-+ * The options below are applicable only for sr_get_items_iter
-+ * (not set by sr_get_items).
-+ */
-+ protobuf_c_boolean has_limit;
-+ uint32_t limit;
-+ protobuf_c_boolean has_offset;
-+ uint32_t offset;
-+};
-+#define SR__GET_ITEMS_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__get_items_req__descriptor) \
-+ , NULL, 0,0, 0,0 }
-+
-+
-+/*
-+ **
-+ * @brief Response to get_items / sr_get_items_iter request.
-+ */
-+struct _Sr__GetItemsResp
-+{
-+ ProtobufCMessage base;
-+ size_t n_values;
-+ Sr__Value **values;
-+};
-+#define SR__GET_ITEMS_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__get_items_resp__descriptor) \
-+ , 0,NULL }
-+
-+
-+/*
-+ **
-+ * @brief Retrieves a single subtree whose root is stored under provided path.
-+ * Sent by sr_get_subtree API call.
-+ */
-+struct _Sr__GetSubtreeReq
-+{
-+ ProtobufCMessage base;
-+ char *xpath;
-+};
-+#define SR__GET_SUBTREE_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__get_subtree_req__descriptor) \
-+ , NULL }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_get_subtree request.
-+ */
-+struct _Sr__GetSubtreeResp
-+{
-+ ProtobufCMessage base;
-+ Sr__Node *tree;
-+};
-+#define SR__GET_SUBTREE_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__get_subtree_resp__descriptor) \
-+ , NULL }
-+
-+
-+/*
-+ **
-+ * @brief Retrieves an array of subtrees whose root nodes match provided path.
-+ * Sent by sr_get_subtrees API call.
-+ */
-+struct _Sr__GetSubtreesReq
-+{
-+ ProtobufCMessage base;
-+ char *xpath;
-+};
-+#define SR__GET_SUBTREES_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__get_subtrees_req__descriptor) \
-+ , NULL }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_get_subtrees request.
-+ */
-+struct _Sr__GetSubtreesResp
-+{
-+ ProtobufCMessage base;
-+ size_t n_trees;
-+ Sr__Node **trees;
-+};
-+#define SR__GET_SUBTREES_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__get_subtrees_resp__descriptor) \
-+ , 0,NULL }
-+
-+
-+/*
-+ **
-+ * @brief Retrieves a chunk of a single or multiple subtrees.
-+ * A subtree chunk is also a tree, where the root node is the node referenced by XPath,
-+ * the next level consists of its children skipping the first "slice_offset" nodes and including
-+ * at most "slice_limit" nodes, while the remaining (depth_limit-2) levels always start with
-+ * the first child (slice_offset is ignored) and include at most "child_limit" nodes.
-+ * The chunk consists of at most "depth_limit" levels.
-+ * @note Order of child nodes depends on the libyang implementation.
-+ */
-+struct _Sr__GetSubtreeChunkReq
-+{
-+ ProtobufCMessage base;
-+ char *xpath;
-+ protobuf_c_boolean single;
-+ uint32_t slice_offset;
-+ uint32_t slice_width;
-+ uint32_t child_limit;
-+ uint32_t depth_limit;
-+};
-+#define SR__GET_SUBTREE_CHUNK_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__get_subtree_chunk_req__descriptor) \
-+ , NULL, 0, 0, 0, 0, 0 }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_get_subtree_chunk request.
-+ */
-+struct _Sr__GetSubtreeChunkResp
-+{
-+ ProtobufCMessage base;
-+ /*
-+ **< JSON node-id of the root node for each subtree chunk
-+ */
-+ size_t n_xpath;
-+ char **xpath;
-+ /*
-+ **< first chunk may carry mutliple trees
-+ */
-+ size_t n_chunk;
-+ Sr__Node **chunk;
-+};
-+#define SR__GET_SUBTREE_CHUNK_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__get_subtree_chunk_resp__descriptor) \
-+ , 0,NULL, 0,NULL }
-+
-+
-+/*
-+ **
-+ * @brief Sets the value of the leaf, leaf-list or presence container.
-+ * Sent by sr_set_item API call.
-+ */
-+struct _Sr__SetItemReq
-+{
-+ ProtobufCMessage base;
-+ char *xpath;
-+ Sr__Value *value;
-+ /*
-+ **< Bitwise OR of EditFlags
-+ */
-+ uint32_t options;
-+};
-+#define SR__SET_ITEM_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__set_item_req__descriptor) \
-+ , NULL, NULL, 0 }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_set_item request.
-+ */
-+struct _Sr__SetItemResp
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__SET_ITEM_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__set_item_resp__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Sets the value of the leaf, leaf-list or presence container.
-+ * The value is transferred as string.
-+ * Sent by sr_set_item_str API call.
-+ */
-+struct _Sr__SetItemStrReq
-+{
-+ ProtobufCMessage base;
-+ char *xpath;
-+ char *value;
-+ /*
-+ **< Bitwise OR of EditFlags
-+ */
-+ uint32_t options;
-+};
-+#define SR__SET_ITEM_STR_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__set_item_str_req__descriptor) \
-+ , NULL, NULL, 0 }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_set_item_str request.
-+ */
-+struct _Sr__SetItemStrResp
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__SET_ITEM_STR_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__set_item_str_resp__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Deletes the nodes under the specified xpath.
-+ * Sent by sr_delete_item API call.
-+ */
-+struct _Sr__DeleteItemReq
-+{
-+ ProtobufCMessage base;
-+ char *xpath;
-+ /*
-+ **< Bitwise OR of EditFlags
-+ */
-+ uint32_t options;
-+};
-+#define SR__DELETE_ITEM_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__delete_item_req__descriptor) \
-+ , NULL, 0 }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_delete_item request.
-+ */
-+struct _Sr__DeleteItemResp
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__DELETE_ITEM_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__delete_item_resp__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Move the instance of an ordered list in specified direction.
-+ * Sent by sr_move_item API call.
-+ */
-+struct _Sr__MoveItemReq
-+{
-+ ProtobufCMessage base;
-+ char *xpath;
-+ Sr__MoveItemReq__MovePosition position;
-+ char *relative_item;
-+};
-+#define SR__MOVE_ITEM_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__move_item_req__descriptor) \
-+ , NULL, 0, NULL }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_move_item request.
-+ */
-+struct _Sr__MoveItemResp
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__MOVE_ITEM_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__move_item_resp__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Perform the validation of changes made in current session, but do not
-+ * commit nor discard them. Sent by sr_validate API call.
-+ */
-+struct _Sr__ValidateReq
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__VALIDATE_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__validate_req__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_validate request.
-+ */
-+struct _Sr__ValidateResp
-+{
-+ ProtobufCMessage base;
-+ size_t n_errors;
-+ Sr__Error **errors;
-+};
-+#define SR__VALIDATE_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__validate_resp__descriptor) \
-+ , 0,NULL }
-+
-+
-+/*
-+ **
-+ * @brief Apply changes made in current session.
-+ * Sent by sr_commit API call.
-+ */
-+struct _Sr__CommitReq
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__COMMIT_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__commit_req__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_commit request.
-+ */
-+struct _Sr__CommitResp
-+{
-+ ProtobufCMessage base;
-+ size_t n_errors;
-+ Sr__Error **errors;
-+};
-+#define SR__COMMIT_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__commit_resp__descriptor) \
-+ , 0,NULL }
-+
-+
-+/*
-+ **
-+ * @brief Discard non-committed changes made in current session.
-+ * Sent by sr_discard_changes API call.
-+ */
-+struct _Sr__DiscardChangesReq
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__DISCARD_CHANGES_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__discard_changes_req__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_discard_changes request.
-+ */
-+struct _Sr__DiscardChangesResp
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__DISCARD_CHANGES_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__discard_changes_resp__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Replaces an entire configuration datastore with the contents of
-+ * another complete configuration datastore. Sent by sr_copy_config request.
-+ */
-+struct _Sr__CopyConfigReq
-+{
-+ ProtobufCMessage base;
-+ Sr__DataStore src_datastore;
-+ Sr__DataStore dst_datastore;
-+ /*
-+ **< If not specified, the operation is performed on all
-+ *modules that are currently active in the source datastore
-+ */
-+ char *module_name;
-+};
-+#define SR__COPY_CONFIG_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__copy_config_req__descriptor) \
-+ , 0, 0, NULL }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_copy_config request.
-+ */
-+struct _Sr__CopyConfigResp
-+{
-+ ProtobufCMessage base;
-+ size_t n_errors;
-+ Sr__Error **errors;
-+};
-+#define SR__COPY_CONFIG_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__copy_config_resp__descriptor) \
-+ , 0,NULL }
-+
-+
-+/*
-+ **
-+ * @brief Locks specified data model or the datastore which the session is tied to.
-+ * Sent by sr_lock_datastore and sr_lock_model API calls.
-+ */
-+struct _Sr__LockReq
-+{
-+ ProtobufCMessage base;
-+ /*
-+ **< If module name is not set, LockReq locks whole datastore.
-+ */
-+ char *module_name;
-+};
-+#define SR__LOCK_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__lock_req__descriptor) \
-+ , NULL }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_lock_datastore or sr_lock_model request.
-+ */
-+struct _Sr__LockResp
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__LOCK_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__lock_resp__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Unlocks specified data model or the datastore which the session is tied to.
-+ * Sent by sr_unlock_datastore and sr_unlock_model API calls.
-+ */
-+struct _Sr__UnlockReq
-+{
-+ ProtobufCMessage base;
-+ /*
-+ **< If module name is not set, UnlockReq unlocks whole datastore.
-+ */
-+ char *module_name;
-+};
-+#define SR__UNLOCK_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__unlock_req__descriptor) \
-+ , NULL }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_lock_datastore or sr_lock_model request.
-+ */
-+struct _Sr__UnlockResp
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__UNLOCK_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__unlock_resp__descriptor) \
-+ }
-+
-+
-+struct _Sr__SubscribeReq
-+{
-+ ProtobufCMessage base;
-+ Sr__SubscriptionType type;
-+ char *destination;
-+ uint32_t subscription_id;
-+ char *module_name;
-+ char *xpath;
-+ protobuf_c_boolean has_notif_event;
-+ Sr__NotificationEvent notif_event;
-+ protobuf_c_boolean has_priority;
-+ uint32_t priority;
-+ protobuf_c_boolean has_enable_running;
-+ protobuf_c_boolean enable_running;
-+ protobuf_c_boolean has_enable_event;
-+ protobuf_c_boolean enable_event;
-+ Sr__ApiVariant api_variant;
-+};
-+#define SR__SUBSCRIBE_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__subscribe_req__descriptor) \
-+ , 0, NULL, 0, NULL, NULL, 0,0, 0,0, 0,0, 0,0, 0 }
-+
-+
-+struct _Sr__SubscribeResp
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__SUBSCRIBE_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__subscribe_resp__descriptor) \
-+ }
-+
-+
-+struct _Sr__UnsubscribeReq
-+{
-+ ProtobufCMessage base;
-+ Sr__SubscriptionType type;
-+ char *destination;
-+ uint32_t subscription_id;
-+ char *module_name;
-+};
-+#define SR__UNSUBSCRIBE_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__unsubscribe_req__descriptor) \
-+ , 0, NULL, 0, NULL }
-+
-+
-+struct _Sr__UnsubscribeResp
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__UNSUBSCRIBE_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__unsubscribe_resp__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Checks whether the module has any enabled subtree.
-+ * Sent by sr_check_enabled_running.
-+ */
-+struct _Sr__CheckEnabledRunningReq
-+{
-+ ProtobufCMessage base;
-+ char *module_name;
-+};
-+#define SR__CHECK_ENABLED_RUNNING_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__check_enabled_running_req__descriptor) \
-+ , NULL }
-+
-+
-+struct _Sr__CheckEnabledRunningResp
-+{
-+ ProtobufCMessage base;
-+ protobuf_c_boolean enabled;
-+};
-+#define SR__CHECK_ENABLED_RUNNING_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__check_enabled_running_resp__descriptor) \
-+ , 0 }
-+
-+
-+struct _Sr__ModuleInstallNotification
-+{
-+ ProtobufCMessage base;
-+ char *module_name;
-+ char *revision;
-+ Sr__ModuleState state;
-+};
-+#define SR__MODULE_INSTALL_NOTIFICATION__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__module_install_notification__descriptor) \
-+ , NULL, NULL, 0 }
-+
-+
-+struct _Sr__FeatureEnableNotification
-+{
-+ ProtobufCMessage base;
-+ char *module_name;
-+ char *feature_name;
-+ protobuf_c_boolean enabled;
-+};
-+#define SR__FEATURE_ENABLE_NOTIFICATION__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__feature_enable_notification__descriptor) \
-+ , NULL, NULL, 0 }
-+
-+
-+struct _Sr__ModuleChangeNotification
-+{
-+ ProtobufCMessage base;
-+ Sr__NotificationEvent event;
-+ char *module_name;
-+};
-+#define SR__MODULE_CHANGE_NOTIFICATION__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__module_change_notification__descriptor) \
-+ , 0, NULL }
-+
-+
-+struct _Sr__SubtreeChangeNotification
-+{
-+ ProtobufCMessage base;
-+ Sr__NotificationEvent event;
-+ char *xpath;
-+};
-+#define SR__SUBTREE_CHANGE_NOTIFICATION__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__subtree_change_notification__descriptor) \
-+ , 0, NULL }
-+
-+
-+struct _Sr__Change
-+{
-+ ProtobufCMessage base;
-+ Sr__ChangeOperation changeoperation;
-+ Sr__Value *new_value;
-+ Sr__Value *old_value;
-+};
-+#define SR__CHANGE__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__change__descriptor) \
-+ , 0, NULL, NULL }
-+
-+
-+/*
-+ **
-+ * @brief Retrieves an array of changes made under provided path.
-+ * Sent by sr_get_changes_iter or sr_get_change_next API calls.
-+ */
-+struct _Sr__GetChangesReq
-+{
-+ ProtobufCMessage base;
-+ char *xpath;
-+ uint32_t limit;
-+ uint32_t offset;
-+};
-+#define SR__GET_CHANGES_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__get_changes_req__descriptor) \
-+ , NULL, 0, 0 }
-+
-+
-+/*
-+ **
-+ * @brief Response to get_changes request.
-+ */
-+struct _Sr__GetChangesResp
-+{
-+ ProtobufCMessage base;
-+ size_t n_changes;
-+ Sr__Change **changes;
-+};
-+#define SR__GET_CHANGES_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__get_changes_resp__descriptor) \
-+ , 0,NULL }
-+
-+
-+/*
-+ **
-+ * @brief Sends a request to check if the owner of this session is authorized to invoke
-+ * the protocol operation referenced by the xpath.
-+ * Sent by sr_check_exec_permission.
-+ */
-+struct _Sr__CheckExecPermReq
-+{
-+ ProtobufCMessage base;
-+ char *xpath;
-+};
-+#define SR__CHECK_EXEC_PERM_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__check_exec_perm_req__descriptor) \
-+ , NULL }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_check_exec_permission request.
-+ */
-+struct _Sr__CheckExecPermResp
-+{
-+ ProtobufCMessage base;
-+ protobuf_c_boolean permitted;
-+};
-+#define SR__CHECK_EXEC_PERM_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__check_exec_perm_resp__descriptor) \
-+ , 0 }
-+
-+
-+/*
-+ **
-+ * @brief Sends a RPC / action request into the datastore, will be delivered to the RPC subscriber.
-+ * Sent by sr_rpc_send / sr_rpc_send_tree and sr_action_send / sr_action_send_tree API calls.
-+ */
-+struct _Sr__RPCReq
-+{
-+ ProtobufCMessage base;
-+ protobuf_c_boolean action;
-+ char *xpath;
-+ /*
-+ **< which API variant was used to send RPC req.
-+ */
-+ Sr__ApiVariant orig_api_variant;
-+ size_t n_input;
-+ Sr__Value **input;
-+ size_t n_input_tree;
-+ Sr__Node **input_tree;
-+ char *subscriber_address;
-+ protobuf_c_boolean has_subscription_id;
-+ uint32_t subscription_id;
-+};
-+#define SR__RPCREQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__rpcreq__descriptor) \
-+ , 0, NULL, 0, 0,NULL, 0,NULL, NULL, 0,0 }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_rpc_send / sr_rpc_send_tree or sr_action_send / sr_action_send_tree request.
-+ */
-+struct _Sr__RPCResp
-+{
-+ ProtobufCMessage base;
-+ protobuf_c_boolean action;
-+ char *xpath;
-+ /*
-+ **< which API variant was used to send RPC req.
-+ */
-+ Sr__ApiVariant orig_api_variant;
-+ size_t n_output;
-+ Sr__Value **output;
-+ size_t n_output_tree;
-+ Sr__Node **output_tree;
-+};
-+#define SR__RPCRESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__rpcresp__descriptor) \
-+ , 0, NULL, 0, 0,NULL, 0,NULL }
-+
-+
-+/*
-+ **
-+ * @brief Sends an event notification into the datastore, will be delivered to all notification subscribers.
-+ * Sent by sr_event_notif_send API call.
-+ */
-+struct _Sr__EventNotifReq
-+{
-+ ProtobufCMessage base;
-+ Sr__EventNotifReq__NotifType type;
-+ /*
-+ **< Bitwise OR of NotifFlags.
-+ */
-+ uint32_t options;
-+ char *xpath;
-+ size_t n_values;
-+ Sr__Value **values;
-+ size_t n_trees;
-+ Sr__Node **trees;
-+ uint64_t timestamp;
-+ char *subscriber_address;
-+ protobuf_c_boolean has_subscription_id;
-+ uint32_t subscription_id;
-+ protobuf_c_boolean do_not_send_reply;
-+};
-+#define SR__EVENT_NOTIF_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__event_notif_req__descriptor) \
-+ , 0, 0, NULL, 0,NULL, 0,NULL, 0, NULL, 0,0, 0 }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_event_notif_send request.
-+ */
-+struct _Sr__EventNotifResp
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__EVENT_NOTIF_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__event_notif_resp__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Sends a request to replay event notifications stored in the datastore.
-+ * Sent by sr_event_notif_replay API call.
-+ */
-+struct _Sr__EventNotifReplayReq
-+{
-+ ProtobufCMessage base;
-+ char *xpath;
-+ uint64_t start_time;
-+ uint64_t stop_time;
-+ char *subscriber_address;
-+ uint32_t subscription_id;
-+ Sr__ApiVariant api_variant;
-+};
-+#define SR__EVENT_NOTIF_REPLAY_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__event_notif_replay_req__descriptor) \
-+ , NULL, 0, 0, NULL, 0, 0 }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_event_notif_replay request.
-+ */
-+struct _Sr__EventNotifReplayResp
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__EVENT_NOTIF_REPLAY_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__event_notif_replay_resp__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Requests operational data under given path form an operational data
-+ * provider.
-+ */
-+struct _Sr__DataProvideReq
-+{
-+ ProtobufCMessage base;
-+ char *xpath;
-+ char *subscriber_address;
-+ uint32_t subscription_id;
-+ uint64_t request_id;
-+};
-+#define SR__DATA_PROVIDE_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__data_provide_req__descriptor) \
-+ , NULL, NULL, 0, 0 }
-+
-+
-+/*
-+ **
-+ * @brief Response to a request of operational data under given path form an
-+ * operational data provider.
-+ */
-+struct _Sr__DataProvideResp
-+{
-+ ProtobufCMessage base;
-+ char *xpath;
-+ size_t n_values;
-+ Sr__Value **values;
-+ uint64_t request_id;
-+};
-+#define SR__DATA_PROVIDE_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__data_provide_resp__descriptor) \
-+ , NULL, 0,NULL, 0 }
-+
-+
-+/*
-+ **
-+ * @brief Requests installation / uinstallation of specified YANG model.
-+ * Sent by sr_module_install internal API calls.
-+ */
-+struct _Sr__ModuleInstallReq
-+{
-+ ProtobufCMessage base;
-+ char *module_name;
-+ char *revision;
-+ char *file_name;
-+ protobuf_c_boolean installed;
-+};
-+#define SR__MODULE_INSTALL_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__module_install_req__descriptor) \
-+ , NULL, NULL, NULL, 0 }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_module_install request.
-+ */
-+struct _Sr__ModuleInstallResp
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__MODULE_INSTALL_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__module_install_resp__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Requests enabling / disabling of specified YANG feature within the
-+ * YANG model. Sent by sr_feature_enable internal API calls.
-+ */
-+struct _Sr__FeatureEnableReq
-+{
-+ ProtobufCMessage base;
-+ char *module_name;
-+ char *feature_name;
-+ protobuf_c_boolean enabled;
-+};
-+#define SR__FEATURE_ENABLE_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__feature_enable_req__descriptor) \
-+ , NULL, NULL, 0 }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_feature_enable request.
-+ */
-+struct _Sr__FeatureEnableResp
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__FEATURE_ENABLE_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__feature_enable_resp__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Internal request to unsubscribe all subscriptions of a subscriber on given destination address.
-+ */
-+struct _Sr__UnsubscribeDestinationReq
-+{
-+ ProtobufCMessage base;
-+ char *destination;
-+};
-+#define SR__UNSUBSCRIBE_DESTINATION_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__unsubscribe_destination_req__descriptor) \
-+ , NULL }
-+
-+
-+/*
-+ **
-+ * @brief Internal request to timeout a commit, if it hasn't been terminated yet.
-+ */
-+struct _Sr__CommitTimeoutReq
-+{
-+ ProtobufCMessage base;
-+ uint32_t commit_id;
-+ protobuf_c_boolean expired;
-+};
-+#define SR__COMMIT_TIMEOUT_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__commit_timeout_req__descriptor) \
-+ , 0, 0 }
-+
-+
-+/*
-+ **
-+ * @brief Internal request to timeout a request for operational data, if it hasn't been terminated yet.
-+ */
-+struct _Sr__OperDataTimeoutReq
-+{
-+ ProtobufCMessage base;
-+ uint64_t request_id;
-+};
-+#define SR__OPER_DATA_TIMEOUT_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__oper_data_timeout_req__descriptor) \
-+ , 0 }
-+
-+
-+/*
-+ **
-+ * @brief Internal request for internal state data (state data provided by Sysrepo Engine itself).
-+ */
-+struct _Sr__InternalStateDataReq
-+{
-+ ProtobufCMessage base;
-+ uint64_t request_id;
-+ char *xpath;
-+};
-+#define SR__INTERNAL_STATE_DATA_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__internal_state_data_req__descriptor) \
-+ , 0, NULL }
-+
-+
-+/*
-+ **
-+ * @brief Internal request to cleanup aged notifications in the Notification Store.
-+ */
-+struct _Sr__NotifStoreCleanupReq
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__NOTIF_STORE_CLEANUP_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__notif_store_cleanup_req__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Message to be delivered to the client after some timeout.
-+ */
-+struct _Sr__DelayedMsgReq
-+{
-+ ProtobufCMessage base;
-+ Sr__Msg *message;
-+};
-+#define SR__DELAYED_MSG_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__delayed_msg_req__descriptor) \
-+ , NULL }
-+
-+
-+/*
-+ **
-+ * @brief Internal request to reload NACM configuration from the running datastore.
-+ */
-+struct _Sr__NacmReloadReq
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__NACM_RELOAD_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__nacm_reload_req__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Request for an operation.
-+ */
-+struct _Sr__Request
-+{
-+ ProtobufCMessage base;
-+ /*
-+ * Request ID used internally by sysrepo
-+ */
-+ uint64_t _id;
-+ Sr__Operation operation;
-+ Sr__SessionStartReq *session_start_req;
-+ Sr__SessionStopReq *session_stop_req;
-+ Sr__SessionRefreshReq *session_refresh_req;
-+ Sr__SessionCheckReq *session_check_req;
-+ Sr__SessionSwitchDsReq *session_switch_ds_req;
-+ Sr__SessionSetOptsReq *session_set_opts_req;
-+ Sr__VersionVerifyReq *version_verify_req;
-+ Sr__ListSchemasReq *list_schemas_req;
-+ Sr__GetSchemaReq *get_schema_req;
-+ Sr__ModuleInstallReq *module_install_req;
-+ Sr__FeatureEnableReq *feature_enable_req;
-+ Sr__GetItemReq *get_item_req;
-+ Sr__GetItemsReq *get_items_req;
-+ Sr__GetSubtreeReq *get_subtree_req;
-+ Sr__GetSubtreesReq *get_subtrees_req;
-+ Sr__GetSubtreeChunkReq *get_subtree_chunk_req;
-+ Sr__SetItemReq *set_item_req;
-+ Sr__DeleteItemReq *delete_item_req;
-+ Sr__MoveItemReq *move_item_req;
-+ Sr__SetItemStrReq *set_item_str_req;
-+ Sr__ValidateReq *validate_req;
-+ Sr__CommitReq *commit_req;
-+ Sr__DiscardChangesReq *discard_changes_req;
-+ Sr__CopyConfigReq *copy_config_req;
-+ Sr__LockReq *lock_req;
-+ Sr__UnlockReq *unlock_req;
-+ Sr__SubscribeReq *subscribe_req;
-+ Sr__UnsubscribeReq *unsubscribe_req;
-+ Sr__CheckEnabledRunningReq *check_enabled_running_req;
-+ Sr__GetChangesReq *get_changes_req;
-+ Sr__DataProvideReq *data_provide_req;
-+ Sr__CheckExecPermReq *check_exec_perm_req;
-+ Sr__RPCReq *rpc_req;
-+ Sr__EventNotifReq *event_notif_req;
-+ Sr__EventNotifReplayReq *event_notif_replay_req;
-+};
-+#define SR__REQUEST__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__request__descriptor) \
-+ , 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }
-+
-+
-+/*
-+ **
-+ * @brief Response to the received request.
-+ */
-+struct _Sr__Response
-+{
-+ ProtobufCMessage base;
-+ Sr__Operation operation;
-+ /*
-+ **< Result of the operation. 0 on success, non-zero values map to sr_error_t enum in sysrepo.h.
-+ */
-+ uint32_t result;
-+ /*
-+ **< Additional error information.
-+ */
-+ Sr__Error *error;
-+ Sr__SessionStartResp *session_start_resp;
-+ Sr__SessionStopResp *session_stop_resp;
-+ Sr__SessionRefreshResp *session_refresh_resp;
-+ Sr__SessionCheckResp *session_check_resp;
-+ Sr__SessionSwitchDsResp *session_switch_ds_resp;
-+ Sr__SessionSetOptsResp *session_set_opts_resp;
-+ Sr__VersionVerifyResp *version_verify_resp;
-+ Sr__ListSchemasResp *list_schemas_resp;
-+ Sr__GetSchemaResp *get_schema_resp;
-+ Sr__ModuleInstallResp *module_install_resp;
-+ Sr__FeatureEnableResp *feature_enable_resp;
-+ Sr__GetItemResp *get_item_resp;
-+ Sr__GetItemsResp *get_items_resp;
-+ Sr__GetSubtreeResp *get_subtree_resp;
-+ Sr__GetSubtreesResp *get_subtrees_resp;
-+ Sr__GetSubtreeChunkResp *get_subtree_chunk_resp;
-+ Sr__SetItemResp *set_item_resp;
-+ Sr__DeleteItemResp *delete_item_resp;
-+ Sr__MoveItemResp *move_item_resp;
-+ Sr__SetItemStrResp *set_item_str_resp;
-+ Sr__ValidateResp *validate_resp;
-+ Sr__CommitResp *commit_resp;
-+ Sr__DiscardChangesResp *discard_changes_resp;
-+ Sr__CopyConfigResp *copy_config_resp;
-+ Sr__LockResp *lock_resp;
-+ Sr__UnlockResp *unlock_resp;
-+ Sr__SubscribeResp *subscribe_resp;
-+ Sr__UnsubscribeResp *unsubscribe_resp;
-+ Sr__CheckEnabledRunningResp *check_enabled_running_resp;
-+ Sr__GetChangesResp *get_changes_resp;
-+ Sr__DataProvideResp *data_provide_resp;
-+ Sr__CheckExecPermResp *check_exec_perm_resp;
-+ Sr__RPCResp *rpc_resp;
-+ Sr__EventNotifResp *event_notif_resp;
-+ Sr__EventNotifReplayResp *event_notif_replay_resp;
-+};
-+#define SR__RESPONSE__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__response__descriptor) \
-+ , 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }
-+
-+
-+/*
-+ **
-+ * @brief Notification about an event that occurred in the datastore.
-+ */
-+struct _Sr__Notification
-+{
-+ ProtobufCMessage base;
-+ Sr__SubscriptionType type;
-+ char *destination_address;
-+ char *source_address;
-+ uint32_t source_pid;
-+ uint32_t subscription_id;
-+ protobuf_c_boolean has_commit_id;
-+ uint32_t commit_id;
-+ Sr__ModuleInstallNotification *module_install_notif;
-+ Sr__FeatureEnableNotification *feature_enable_notif;
-+ Sr__ModuleChangeNotification *module_change_notif;
-+ Sr__SubtreeChangeNotification *subtree_change_notif;
-+};
-+#define SR__NOTIFICATION__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__notification__descriptor) \
-+ , 0, NULL, NULL, 0, 0, 0,0, NULL, NULL, NULL, NULL }
-+
-+
-+/*
-+ **
-+ * @brief Notification Acknowledgment.
-+ */
-+struct _Sr__NotificationAck
-+{
-+ ProtobufCMessage base;
-+ /*
-+ **< Original notification.
-+ */
-+ Sr__Notification *notif;
-+ /*
-+ **< Result of the notification (success / error code).
-+ */
-+ uint32_t result;
-+ /*
-+ **< Additional error information.
-+ */
-+ Sr__Error *error;
-+ /*
-+ **< If the result is error and this flag is set to true abort notification
-+ * will not be delivered to this subscriber
-+ * (Subscriber doesn't want notification about changes that he refused).
-+ */
-+ protobuf_c_boolean do_not_send_abort;
-+};
-+#define SR__NOTIFICATION_ACK__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__notification_ack__descriptor) \
-+ , NULL, 0, NULL, 0 }
-+
-+
-+/*
-+ **
-+ * @brief Internal request sent by sysrepo. Should not be used from the public API.
-+ */
-+struct _Sr__InternalRequest
-+{
-+ ProtobufCMessage base;
-+ Sr__Operation operation;
-+ protobuf_c_boolean has_postpone_timeout;
-+ uint32_t postpone_timeout;
-+ Sr__UnsubscribeDestinationReq *unsubscribe_dst_req;
-+ Sr__CommitTimeoutReq *commit_timeout_req;
-+ Sr__OperDataTimeoutReq *oper_data_timeout_req;
-+ Sr__InternalStateDataReq *internal_state_data_req;
-+ Sr__NotifStoreCleanupReq *notif_store_cleanup_req;
-+ Sr__DelayedMsgReq *delayed_msg_req;
-+ Sr__NacmReloadReq *nacm_reload_req;
-+};
-+#define SR__INTERNAL_REQUEST__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__internal_request__descriptor) \
-+ , 0, 0,0, NULL, NULL, NULL, NULL, NULL, NULL, NULL }
-+
-+
-+/*
-+ **
-+ * @brief Umbrella sysrepo message used for communication between sysrepo
-+ * engine and client library.
-+ */
-+struct _Sr__Msg
-+{
-+ ProtobufCMessage base;
-+ /*
-+ **< Indicates type of the message.
-+ */
-+ Sr__Msg__MsgType type;
-+ /*
-+ **< Session identifier. Can be 0 (value is ignored) for session_start and version_verify requests.
-+ */
-+ uint32_t session_id;
-+ /*
-+ **< Filled in in case of type == REQUEST.
-+ */
-+ Sr__Request *request;
-+ /*
-+ **< Filled in in case of type == RESPONSE.
-+ */
-+ Sr__Response *response;
-+ /*
-+ **< Filled in in case of type == NOTIFICATION.
-+ */
-+ Sr__Notification *notification;
-+ /*
-+ **< Filled in in case of type == NOTIFICATION_ACK
-+ */
-+ Sr__NotificationAck *notification_ack;
-+ /*
-+ **< Filled in in case of type == INTERNAL.
-+ */
-+ Sr__InternalRequest *internal_request;
-+ /*
-+ **< Not part of the protocol. Used internally by Sysrepo to store a pointer to memory context.
-+ */
-+ uint64_t _sysrepo_mem_ctx;
-+};
-+#define SR__MSG__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__msg__descriptor) \
-+ , 0, 0, NULL, NULL, NULL, NULL, NULL, 0 }
-+
-+
-+/* Sr__Value methods */
-+void sr__value__init
-+ (Sr__Value *message);
-+size_t sr__value__get_packed_size
-+ (const Sr__Value *message);
-+size_t sr__value__pack
-+ (const Sr__Value *message,
-+ uint8_t *out);
-+size_t sr__value__pack_to_buffer
-+ (const Sr__Value *message,
-+ ProtobufCBuffer *buffer);
-+Sr__Value *
-+ sr__value__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__value__free_unpacked
-+ (Sr__Value *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__Node methods */
-+void sr__node__init
-+ (Sr__Node *message);
-+size_t sr__node__get_packed_size
-+ (const Sr__Node *message);
-+size_t sr__node__pack
-+ (const Sr__Node *message,
-+ uint8_t *out);
-+size_t sr__node__pack_to_buffer
-+ (const Sr__Node *message,
-+ ProtobufCBuffer *buffer);
-+Sr__Node *
-+ sr__node__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__node__free_unpacked
-+ (Sr__Node *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__Error methods */
-+void sr__error__init
-+ (Sr__Error *message);
-+size_t sr__error__get_packed_size
-+ (const Sr__Error *message);
-+size_t sr__error__pack
-+ (const Sr__Error *message,
-+ uint8_t *out);
-+size_t sr__error__pack_to_buffer
-+ (const Sr__Error *message,
-+ ProtobufCBuffer *buffer);
-+Sr__Error *
-+ sr__error__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__error__free_unpacked
-+ (Sr__Error *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SessionStartReq methods */
-+void sr__session_start_req__init
-+ (Sr__SessionStartReq *message);
-+size_t sr__session_start_req__get_packed_size
-+ (const Sr__SessionStartReq *message);
-+size_t sr__session_start_req__pack
-+ (const Sr__SessionStartReq *message,
-+ uint8_t *out);
-+size_t sr__session_start_req__pack_to_buffer
-+ (const Sr__SessionStartReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SessionStartReq *
-+ sr__session_start_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__session_start_req__free_unpacked
-+ (Sr__SessionStartReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SessionStartResp methods */
-+void sr__session_start_resp__init
-+ (Sr__SessionStartResp *message);
-+size_t sr__session_start_resp__get_packed_size
-+ (const Sr__SessionStartResp *message);
-+size_t sr__session_start_resp__pack
-+ (const Sr__SessionStartResp *message,
-+ uint8_t *out);
-+size_t sr__session_start_resp__pack_to_buffer
-+ (const Sr__SessionStartResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SessionStartResp *
-+ sr__session_start_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__session_start_resp__free_unpacked
-+ (Sr__SessionStartResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SessionStopReq methods */
-+void sr__session_stop_req__init
-+ (Sr__SessionStopReq *message);
-+size_t sr__session_stop_req__get_packed_size
-+ (const Sr__SessionStopReq *message);
-+size_t sr__session_stop_req__pack
-+ (const Sr__SessionStopReq *message,
-+ uint8_t *out);
-+size_t sr__session_stop_req__pack_to_buffer
-+ (const Sr__SessionStopReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SessionStopReq *
-+ sr__session_stop_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__session_stop_req__free_unpacked
-+ (Sr__SessionStopReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SessionStopResp methods */
-+void sr__session_stop_resp__init
-+ (Sr__SessionStopResp *message);
-+size_t sr__session_stop_resp__get_packed_size
-+ (const Sr__SessionStopResp *message);
-+size_t sr__session_stop_resp__pack
-+ (const Sr__SessionStopResp *message,
-+ uint8_t *out);
-+size_t sr__session_stop_resp__pack_to_buffer
-+ (const Sr__SessionStopResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SessionStopResp *
-+ sr__session_stop_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__session_stop_resp__free_unpacked
-+ (Sr__SessionStopResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SessionRefreshReq methods */
-+void sr__session_refresh_req__init
-+ (Sr__SessionRefreshReq *message);
-+size_t sr__session_refresh_req__get_packed_size
-+ (const Sr__SessionRefreshReq *message);
-+size_t sr__session_refresh_req__pack
-+ (const Sr__SessionRefreshReq *message,
-+ uint8_t *out);
-+size_t sr__session_refresh_req__pack_to_buffer
-+ (const Sr__SessionRefreshReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SessionRefreshReq *
-+ sr__session_refresh_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__session_refresh_req__free_unpacked
-+ (Sr__SessionRefreshReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SessionRefreshResp methods */
-+void sr__session_refresh_resp__init
-+ (Sr__SessionRefreshResp *message);
-+size_t sr__session_refresh_resp__get_packed_size
-+ (const Sr__SessionRefreshResp *message);
-+size_t sr__session_refresh_resp__pack
-+ (const Sr__SessionRefreshResp *message,
-+ uint8_t *out);
-+size_t sr__session_refresh_resp__pack_to_buffer
-+ (const Sr__SessionRefreshResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SessionRefreshResp *
-+ sr__session_refresh_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__session_refresh_resp__free_unpacked
-+ (Sr__SessionRefreshResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SessionCheckReq methods */
-+void sr__session_check_req__init
-+ (Sr__SessionCheckReq *message);
-+size_t sr__session_check_req__get_packed_size
-+ (const Sr__SessionCheckReq *message);
-+size_t sr__session_check_req__pack
-+ (const Sr__SessionCheckReq *message,
-+ uint8_t *out);
-+size_t sr__session_check_req__pack_to_buffer
-+ (const Sr__SessionCheckReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SessionCheckReq *
-+ sr__session_check_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__session_check_req__free_unpacked
-+ (Sr__SessionCheckReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SessionCheckResp methods */
-+void sr__session_check_resp__init
-+ (Sr__SessionCheckResp *message);
-+size_t sr__session_check_resp__get_packed_size
-+ (const Sr__SessionCheckResp *message);
-+size_t sr__session_check_resp__pack
-+ (const Sr__SessionCheckResp *message,
-+ uint8_t *out);
-+size_t sr__session_check_resp__pack_to_buffer
-+ (const Sr__SessionCheckResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SessionCheckResp *
-+ sr__session_check_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__session_check_resp__free_unpacked
-+ (Sr__SessionCheckResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SessionSwitchDsReq methods */
-+void sr__session_switch_ds_req__init
-+ (Sr__SessionSwitchDsReq *message);
-+size_t sr__session_switch_ds_req__get_packed_size
-+ (const Sr__SessionSwitchDsReq *message);
-+size_t sr__session_switch_ds_req__pack
-+ (const Sr__SessionSwitchDsReq *message,
-+ uint8_t *out);
-+size_t sr__session_switch_ds_req__pack_to_buffer
-+ (const Sr__SessionSwitchDsReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SessionSwitchDsReq *
-+ sr__session_switch_ds_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__session_switch_ds_req__free_unpacked
-+ (Sr__SessionSwitchDsReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SessionSwitchDsResp methods */
-+void sr__session_switch_ds_resp__init
-+ (Sr__SessionSwitchDsResp *message);
-+size_t sr__session_switch_ds_resp__get_packed_size
-+ (const Sr__SessionSwitchDsResp *message);
-+size_t sr__session_switch_ds_resp__pack
-+ (const Sr__SessionSwitchDsResp *message,
-+ uint8_t *out);
-+size_t sr__session_switch_ds_resp__pack_to_buffer
-+ (const Sr__SessionSwitchDsResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SessionSwitchDsResp *
-+ sr__session_switch_ds_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__session_switch_ds_resp__free_unpacked
-+ (Sr__SessionSwitchDsResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SessionSetOptsReq methods */
-+void sr__session_set_opts_req__init
-+ (Sr__SessionSetOptsReq *message);
-+size_t sr__session_set_opts_req__get_packed_size
-+ (const Sr__SessionSetOptsReq *message);
-+size_t sr__session_set_opts_req__pack
-+ (const Sr__SessionSetOptsReq *message,
-+ uint8_t *out);
-+size_t sr__session_set_opts_req__pack_to_buffer
-+ (const Sr__SessionSetOptsReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SessionSetOptsReq *
-+ sr__session_set_opts_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__session_set_opts_req__free_unpacked
-+ (Sr__SessionSetOptsReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SessionSetOptsResp methods */
-+void sr__session_set_opts_resp__init
-+ (Sr__SessionSetOptsResp *message);
-+size_t sr__session_set_opts_resp__get_packed_size
-+ (const Sr__SessionSetOptsResp *message);
-+size_t sr__session_set_opts_resp__pack
-+ (const Sr__SessionSetOptsResp *message,
-+ uint8_t *out);
-+size_t sr__session_set_opts_resp__pack_to_buffer
-+ (const Sr__SessionSetOptsResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SessionSetOptsResp *
-+ sr__session_set_opts_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__session_set_opts_resp__free_unpacked
-+ (Sr__SessionSetOptsResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__VersionVerifyReq methods */
-+void sr__version_verify_req__init
-+ (Sr__VersionVerifyReq *message);
-+size_t sr__version_verify_req__get_packed_size
-+ (const Sr__VersionVerifyReq *message);
-+size_t sr__version_verify_req__pack
-+ (const Sr__VersionVerifyReq *message,
-+ uint8_t *out);
-+size_t sr__version_verify_req__pack_to_buffer
-+ (const Sr__VersionVerifyReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__VersionVerifyReq *
-+ sr__version_verify_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__version_verify_req__free_unpacked
-+ (Sr__VersionVerifyReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__VersionVerifyResp methods */
-+void sr__version_verify_resp__init
-+ (Sr__VersionVerifyResp *message);
-+size_t sr__version_verify_resp__get_packed_size
-+ (const Sr__VersionVerifyResp *message);
-+size_t sr__version_verify_resp__pack
-+ (const Sr__VersionVerifyResp *message,
-+ uint8_t *out);
-+size_t sr__version_verify_resp__pack_to_buffer
-+ (const Sr__VersionVerifyResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__VersionVerifyResp *
-+ sr__version_verify_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__version_verify_resp__free_unpacked
-+ (Sr__VersionVerifyResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SchemaRevision methods */
-+void sr__schema_revision__init
-+ (Sr__SchemaRevision *message);
-+size_t sr__schema_revision__get_packed_size
-+ (const Sr__SchemaRevision *message);
-+size_t sr__schema_revision__pack
-+ (const Sr__SchemaRevision *message,
-+ uint8_t *out);
-+size_t sr__schema_revision__pack_to_buffer
-+ (const Sr__SchemaRevision *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SchemaRevision *
-+ sr__schema_revision__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__schema_revision__free_unpacked
-+ (Sr__SchemaRevision *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SchemaSubmodule methods */
-+void sr__schema_submodule__init
-+ (Sr__SchemaSubmodule *message);
-+size_t sr__schema_submodule__get_packed_size
-+ (const Sr__SchemaSubmodule *message);
-+size_t sr__schema_submodule__pack
-+ (const Sr__SchemaSubmodule *message,
-+ uint8_t *out);
-+size_t sr__schema_submodule__pack_to_buffer
-+ (const Sr__SchemaSubmodule *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SchemaSubmodule *
-+ sr__schema_submodule__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__schema_submodule__free_unpacked
-+ (Sr__SchemaSubmodule *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__Schema methods */
-+void sr__schema__init
-+ (Sr__Schema *message);
-+size_t sr__schema__get_packed_size
-+ (const Sr__Schema *message);
-+size_t sr__schema__pack
-+ (const Sr__Schema *message,
-+ uint8_t *out);
-+size_t sr__schema__pack_to_buffer
-+ (const Sr__Schema *message,
-+ ProtobufCBuffer *buffer);
-+Sr__Schema *
-+ sr__schema__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__schema__free_unpacked
-+ (Sr__Schema *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__ListSchemasReq methods */
-+void sr__list_schemas_req__init
-+ (Sr__ListSchemasReq *message);
-+size_t sr__list_schemas_req__get_packed_size
-+ (const Sr__ListSchemasReq *message);
-+size_t sr__list_schemas_req__pack
-+ (const Sr__ListSchemasReq *message,
-+ uint8_t *out);
-+size_t sr__list_schemas_req__pack_to_buffer
-+ (const Sr__ListSchemasReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__ListSchemasReq *
-+ sr__list_schemas_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__list_schemas_req__free_unpacked
-+ (Sr__ListSchemasReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__ListSchemasResp methods */
-+void sr__list_schemas_resp__init
-+ (Sr__ListSchemasResp *message);
-+size_t sr__list_schemas_resp__get_packed_size
-+ (const Sr__ListSchemasResp *message);
-+size_t sr__list_schemas_resp__pack
-+ (const Sr__ListSchemasResp *message,
-+ uint8_t *out);
-+size_t sr__list_schemas_resp__pack_to_buffer
-+ (const Sr__ListSchemasResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__ListSchemasResp *
-+ sr__list_schemas_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__list_schemas_resp__free_unpacked
-+ (Sr__ListSchemasResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__GetSchemaReq methods */
-+void sr__get_schema_req__init
-+ (Sr__GetSchemaReq *message);
-+size_t sr__get_schema_req__get_packed_size
-+ (const Sr__GetSchemaReq *message);
-+size_t sr__get_schema_req__pack
-+ (const Sr__GetSchemaReq *message,
-+ uint8_t *out);
-+size_t sr__get_schema_req__pack_to_buffer
-+ (const Sr__GetSchemaReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__GetSchemaReq *
-+ sr__get_schema_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__get_schema_req__free_unpacked
-+ (Sr__GetSchemaReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__GetSchemaResp methods */
-+void sr__get_schema_resp__init
-+ (Sr__GetSchemaResp *message);
-+size_t sr__get_schema_resp__get_packed_size
-+ (const Sr__GetSchemaResp *message);
-+size_t sr__get_schema_resp__pack
-+ (const Sr__GetSchemaResp *message,
-+ uint8_t *out);
-+size_t sr__get_schema_resp__pack_to_buffer
-+ (const Sr__GetSchemaResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__GetSchemaResp *
-+ sr__get_schema_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__get_schema_resp__free_unpacked
-+ (Sr__GetSchemaResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__GetItemReq methods */
-+void sr__get_item_req__init
-+ (Sr__GetItemReq *message);
-+size_t sr__get_item_req__get_packed_size
-+ (const Sr__GetItemReq *message);
-+size_t sr__get_item_req__pack
-+ (const Sr__GetItemReq *message,
-+ uint8_t *out);
-+size_t sr__get_item_req__pack_to_buffer
-+ (const Sr__GetItemReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__GetItemReq *
-+ sr__get_item_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__get_item_req__free_unpacked
-+ (Sr__GetItemReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__GetItemResp methods */
-+void sr__get_item_resp__init
-+ (Sr__GetItemResp *message);
-+size_t sr__get_item_resp__get_packed_size
-+ (const Sr__GetItemResp *message);
-+size_t sr__get_item_resp__pack
-+ (const Sr__GetItemResp *message,
-+ uint8_t *out);
-+size_t sr__get_item_resp__pack_to_buffer
-+ (const Sr__GetItemResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__GetItemResp *
-+ sr__get_item_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__get_item_resp__free_unpacked
-+ (Sr__GetItemResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__GetItemsReq methods */
-+void sr__get_items_req__init
-+ (Sr__GetItemsReq *message);
-+size_t sr__get_items_req__get_packed_size
-+ (const Sr__GetItemsReq *message);
-+size_t sr__get_items_req__pack
-+ (const Sr__GetItemsReq *message,
-+ uint8_t *out);
-+size_t sr__get_items_req__pack_to_buffer
-+ (const Sr__GetItemsReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__GetItemsReq *
-+ sr__get_items_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__get_items_req__free_unpacked
-+ (Sr__GetItemsReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__GetItemsResp methods */
-+void sr__get_items_resp__init
-+ (Sr__GetItemsResp *message);
-+size_t sr__get_items_resp__get_packed_size
-+ (const Sr__GetItemsResp *message);
-+size_t sr__get_items_resp__pack
-+ (const Sr__GetItemsResp *message,
-+ uint8_t *out);
-+size_t sr__get_items_resp__pack_to_buffer
-+ (const Sr__GetItemsResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__GetItemsResp *
-+ sr__get_items_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__get_items_resp__free_unpacked
-+ (Sr__GetItemsResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__GetSubtreeReq methods */
-+void sr__get_subtree_req__init
-+ (Sr__GetSubtreeReq *message);
-+size_t sr__get_subtree_req__get_packed_size
-+ (const Sr__GetSubtreeReq *message);
-+size_t sr__get_subtree_req__pack
-+ (const Sr__GetSubtreeReq *message,
-+ uint8_t *out);
-+size_t sr__get_subtree_req__pack_to_buffer
-+ (const Sr__GetSubtreeReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__GetSubtreeReq *
-+ sr__get_subtree_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__get_subtree_req__free_unpacked
-+ (Sr__GetSubtreeReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__GetSubtreeResp methods */
-+void sr__get_subtree_resp__init
-+ (Sr__GetSubtreeResp *message);
-+size_t sr__get_subtree_resp__get_packed_size
-+ (const Sr__GetSubtreeResp *message);
-+size_t sr__get_subtree_resp__pack
-+ (const Sr__GetSubtreeResp *message,
-+ uint8_t *out);
-+size_t sr__get_subtree_resp__pack_to_buffer
-+ (const Sr__GetSubtreeResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__GetSubtreeResp *
-+ sr__get_subtree_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__get_subtree_resp__free_unpacked
-+ (Sr__GetSubtreeResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__GetSubtreesReq methods */
-+void sr__get_subtrees_req__init
-+ (Sr__GetSubtreesReq *message);
-+size_t sr__get_subtrees_req__get_packed_size
-+ (const Sr__GetSubtreesReq *message);
-+size_t sr__get_subtrees_req__pack
-+ (const Sr__GetSubtreesReq *message,
-+ uint8_t *out);
-+size_t sr__get_subtrees_req__pack_to_buffer
-+ (const Sr__GetSubtreesReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__GetSubtreesReq *
-+ sr__get_subtrees_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__get_subtrees_req__free_unpacked
-+ (Sr__GetSubtreesReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__GetSubtreesResp methods */
-+void sr__get_subtrees_resp__init
-+ (Sr__GetSubtreesResp *message);
-+size_t sr__get_subtrees_resp__get_packed_size
-+ (const Sr__GetSubtreesResp *message);
-+size_t sr__get_subtrees_resp__pack
-+ (const Sr__GetSubtreesResp *message,
-+ uint8_t *out);
-+size_t sr__get_subtrees_resp__pack_to_buffer
-+ (const Sr__GetSubtreesResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__GetSubtreesResp *
-+ sr__get_subtrees_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__get_subtrees_resp__free_unpacked
-+ (Sr__GetSubtreesResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__GetSubtreeChunkReq methods */
-+void sr__get_subtree_chunk_req__init
-+ (Sr__GetSubtreeChunkReq *message);
-+size_t sr__get_subtree_chunk_req__get_packed_size
-+ (const Sr__GetSubtreeChunkReq *message);
-+size_t sr__get_subtree_chunk_req__pack
-+ (const Sr__GetSubtreeChunkReq *message,
-+ uint8_t *out);
-+size_t sr__get_subtree_chunk_req__pack_to_buffer
-+ (const Sr__GetSubtreeChunkReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__GetSubtreeChunkReq *
-+ sr__get_subtree_chunk_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__get_subtree_chunk_req__free_unpacked
-+ (Sr__GetSubtreeChunkReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__GetSubtreeChunkResp methods */
-+void sr__get_subtree_chunk_resp__init
-+ (Sr__GetSubtreeChunkResp *message);
-+size_t sr__get_subtree_chunk_resp__get_packed_size
-+ (const Sr__GetSubtreeChunkResp *message);
-+size_t sr__get_subtree_chunk_resp__pack
-+ (const Sr__GetSubtreeChunkResp *message,
-+ uint8_t *out);
-+size_t sr__get_subtree_chunk_resp__pack_to_buffer
-+ (const Sr__GetSubtreeChunkResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__GetSubtreeChunkResp *
-+ sr__get_subtree_chunk_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__get_subtree_chunk_resp__free_unpacked
-+ (Sr__GetSubtreeChunkResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SetItemReq methods */
-+void sr__set_item_req__init
-+ (Sr__SetItemReq *message);
-+size_t sr__set_item_req__get_packed_size
-+ (const Sr__SetItemReq *message);
-+size_t sr__set_item_req__pack
-+ (const Sr__SetItemReq *message,
-+ uint8_t *out);
-+size_t sr__set_item_req__pack_to_buffer
-+ (const Sr__SetItemReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SetItemReq *
-+ sr__set_item_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__set_item_req__free_unpacked
-+ (Sr__SetItemReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SetItemResp methods */
-+void sr__set_item_resp__init
-+ (Sr__SetItemResp *message);
-+size_t sr__set_item_resp__get_packed_size
-+ (const Sr__SetItemResp *message);
-+size_t sr__set_item_resp__pack
-+ (const Sr__SetItemResp *message,
-+ uint8_t *out);
-+size_t sr__set_item_resp__pack_to_buffer
-+ (const Sr__SetItemResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SetItemResp *
-+ sr__set_item_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__set_item_resp__free_unpacked
-+ (Sr__SetItemResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SetItemStrReq methods */
-+void sr__set_item_str_req__init
-+ (Sr__SetItemStrReq *message);
-+size_t sr__set_item_str_req__get_packed_size
-+ (const Sr__SetItemStrReq *message);
-+size_t sr__set_item_str_req__pack
-+ (const Sr__SetItemStrReq *message,
-+ uint8_t *out);
-+size_t sr__set_item_str_req__pack_to_buffer
-+ (const Sr__SetItemStrReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SetItemStrReq *
-+ sr__set_item_str_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__set_item_str_req__free_unpacked
-+ (Sr__SetItemStrReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SetItemStrResp methods */
-+void sr__set_item_str_resp__init
-+ (Sr__SetItemStrResp *message);
-+size_t sr__set_item_str_resp__get_packed_size
-+ (const Sr__SetItemStrResp *message);
-+size_t sr__set_item_str_resp__pack
-+ (const Sr__SetItemStrResp *message,
-+ uint8_t *out);
-+size_t sr__set_item_str_resp__pack_to_buffer
-+ (const Sr__SetItemStrResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SetItemStrResp *
-+ sr__set_item_str_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__set_item_str_resp__free_unpacked
-+ (Sr__SetItemStrResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__DeleteItemReq methods */
-+void sr__delete_item_req__init
-+ (Sr__DeleteItemReq *message);
-+size_t sr__delete_item_req__get_packed_size
-+ (const Sr__DeleteItemReq *message);
-+size_t sr__delete_item_req__pack
-+ (const Sr__DeleteItemReq *message,
-+ uint8_t *out);
-+size_t sr__delete_item_req__pack_to_buffer
-+ (const Sr__DeleteItemReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__DeleteItemReq *
-+ sr__delete_item_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__delete_item_req__free_unpacked
-+ (Sr__DeleteItemReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__DeleteItemResp methods */
-+void sr__delete_item_resp__init
-+ (Sr__DeleteItemResp *message);
-+size_t sr__delete_item_resp__get_packed_size
-+ (const Sr__DeleteItemResp *message);
-+size_t sr__delete_item_resp__pack
-+ (const Sr__DeleteItemResp *message,
-+ uint8_t *out);
-+size_t sr__delete_item_resp__pack_to_buffer
-+ (const Sr__DeleteItemResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__DeleteItemResp *
-+ sr__delete_item_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__delete_item_resp__free_unpacked
-+ (Sr__DeleteItemResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__MoveItemReq methods */
-+void sr__move_item_req__init
-+ (Sr__MoveItemReq *message);
-+size_t sr__move_item_req__get_packed_size
-+ (const Sr__MoveItemReq *message);
-+size_t sr__move_item_req__pack
-+ (const Sr__MoveItemReq *message,
-+ uint8_t *out);
-+size_t sr__move_item_req__pack_to_buffer
-+ (const Sr__MoveItemReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__MoveItemReq *
-+ sr__move_item_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__move_item_req__free_unpacked
-+ (Sr__MoveItemReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__MoveItemResp methods */
-+void sr__move_item_resp__init
-+ (Sr__MoveItemResp *message);
-+size_t sr__move_item_resp__get_packed_size
-+ (const Sr__MoveItemResp *message);
-+size_t sr__move_item_resp__pack
-+ (const Sr__MoveItemResp *message,
-+ uint8_t *out);
-+size_t sr__move_item_resp__pack_to_buffer
-+ (const Sr__MoveItemResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__MoveItemResp *
-+ sr__move_item_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__move_item_resp__free_unpacked
-+ (Sr__MoveItemResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__ValidateReq methods */
-+void sr__validate_req__init
-+ (Sr__ValidateReq *message);
-+size_t sr__validate_req__get_packed_size
-+ (const Sr__ValidateReq *message);
-+size_t sr__validate_req__pack
-+ (const Sr__ValidateReq *message,
-+ uint8_t *out);
-+size_t sr__validate_req__pack_to_buffer
-+ (const Sr__ValidateReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__ValidateReq *
-+ sr__validate_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__validate_req__free_unpacked
-+ (Sr__ValidateReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__ValidateResp methods */
-+void sr__validate_resp__init
-+ (Sr__ValidateResp *message);
-+size_t sr__validate_resp__get_packed_size
-+ (const Sr__ValidateResp *message);
-+size_t sr__validate_resp__pack
-+ (const Sr__ValidateResp *message,
-+ uint8_t *out);
-+size_t sr__validate_resp__pack_to_buffer
-+ (const Sr__ValidateResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__ValidateResp *
-+ sr__validate_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__validate_resp__free_unpacked
-+ (Sr__ValidateResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__CommitReq methods */
-+void sr__commit_req__init
-+ (Sr__CommitReq *message);
-+size_t sr__commit_req__get_packed_size
-+ (const Sr__CommitReq *message);
-+size_t sr__commit_req__pack
-+ (const Sr__CommitReq *message,
-+ uint8_t *out);
-+size_t sr__commit_req__pack_to_buffer
-+ (const Sr__CommitReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__CommitReq *
-+ sr__commit_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__commit_req__free_unpacked
-+ (Sr__CommitReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__CommitResp methods */
-+void sr__commit_resp__init
-+ (Sr__CommitResp *message);
-+size_t sr__commit_resp__get_packed_size
-+ (const Sr__CommitResp *message);
-+size_t sr__commit_resp__pack
-+ (const Sr__CommitResp *message,
-+ uint8_t *out);
-+size_t sr__commit_resp__pack_to_buffer
-+ (const Sr__CommitResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__CommitResp *
-+ sr__commit_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__commit_resp__free_unpacked
-+ (Sr__CommitResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__DiscardChangesReq methods */
-+void sr__discard_changes_req__init
-+ (Sr__DiscardChangesReq *message);
-+size_t sr__discard_changes_req__get_packed_size
-+ (const Sr__DiscardChangesReq *message);
-+size_t sr__discard_changes_req__pack
-+ (const Sr__DiscardChangesReq *message,
-+ uint8_t *out);
-+size_t sr__discard_changes_req__pack_to_buffer
-+ (const Sr__DiscardChangesReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__DiscardChangesReq *
-+ sr__discard_changes_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__discard_changes_req__free_unpacked
-+ (Sr__DiscardChangesReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__DiscardChangesResp methods */
-+void sr__discard_changes_resp__init
-+ (Sr__DiscardChangesResp *message);
-+size_t sr__discard_changes_resp__get_packed_size
-+ (const Sr__DiscardChangesResp *message);
-+size_t sr__discard_changes_resp__pack
-+ (const Sr__DiscardChangesResp *message,
-+ uint8_t *out);
-+size_t sr__discard_changes_resp__pack_to_buffer
-+ (const Sr__DiscardChangesResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__DiscardChangesResp *
-+ sr__discard_changes_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__discard_changes_resp__free_unpacked
-+ (Sr__DiscardChangesResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__CopyConfigReq methods */
-+void sr__copy_config_req__init
-+ (Sr__CopyConfigReq *message);
-+size_t sr__copy_config_req__get_packed_size
-+ (const Sr__CopyConfigReq *message);
-+size_t sr__copy_config_req__pack
-+ (const Sr__CopyConfigReq *message,
-+ uint8_t *out);
-+size_t sr__copy_config_req__pack_to_buffer
-+ (const Sr__CopyConfigReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__CopyConfigReq *
-+ sr__copy_config_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__copy_config_req__free_unpacked
-+ (Sr__CopyConfigReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__CopyConfigResp methods */
-+void sr__copy_config_resp__init
-+ (Sr__CopyConfigResp *message);
-+size_t sr__copy_config_resp__get_packed_size
-+ (const Sr__CopyConfigResp *message);
-+size_t sr__copy_config_resp__pack
-+ (const Sr__CopyConfigResp *message,
-+ uint8_t *out);
-+size_t sr__copy_config_resp__pack_to_buffer
-+ (const Sr__CopyConfigResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__CopyConfigResp *
-+ sr__copy_config_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__copy_config_resp__free_unpacked
-+ (Sr__CopyConfigResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__LockReq methods */
-+void sr__lock_req__init
-+ (Sr__LockReq *message);
-+size_t sr__lock_req__get_packed_size
-+ (const Sr__LockReq *message);
-+size_t sr__lock_req__pack
-+ (const Sr__LockReq *message,
-+ uint8_t *out);
-+size_t sr__lock_req__pack_to_buffer
-+ (const Sr__LockReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__LockReq *
-+ sr__lock_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__lock_req__free_unpacked
-+ (Sr__LockReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__LockResp methods */
-+void sr__lock_resp__init
-+ (Sr__LockResp *message);
-+size_t sr__lock_resp__get_packed_size
-+ (const Sr__LockResp *message);
-+size_t sr__lock_resp__pack
-+ (const Sr__LockResp *message,
-+ uint8_t *out);
-+size_t sr__lock_resp__pack_to_buffer
-+ (const Sr__LockResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__LockResp *
-+ sr__lock_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__lock_resp__free_unpacked
-+ (Sr__LockResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__UnlockReq methods */
-+void sr__unlock_req__init
-+ (Sr__UnlockReq *message);
-+size_t sr__unlock_req__get_packed_size
-+ (const Sr__UnlockReq *message);
-+size_t sr__unlock_req__pack
-+ (const Sr__UnlockReq *message,
-+ uint8_t *out);
-+size_t sr__unlock_req__pack_to_buffer
-+ (const Sr__UnlockReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__UnlockReq *
-+ sr__unlock_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__unlock_req__free_unpacked
-+ (Sr__UnlockReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__UnlockResp methods */
-+void sr__unlock_resp__init
-+ (Sr__UnlockResp *message);
-+size_t sr__unlock_resp__get_packed_size
-+ (const Sr__UnlockResp *message);
-+size_t sr__unlock_resp__pack
-+ (const Sr__UnlockResp *message,
-+ uint8_t *out);
-+size_t sr__unlock_resp__pack_to_buffer
-+ (const Sr__UnlockResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__UnlockResp *
-+ sr__unlock_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__unlock_resp__free_unpacked
-+ (Sr__UnlockResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SubscribeReq methods */
-+void sr__subscribe_req__init
-+ (Sr__SubscribeReq *message);
-+size_t sr__subscribe_req__get_packed_size
-+ (const Sr__SubscribeReq *message);
-+size_t sr__subscribe_req__pack
-+ (const Sr__SubscribeReq *message,
-+ uint8_t *out);
-+size_t sr__subscribe_req__pack_to_buffer
-+ (const Sr__SubscribeReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SubscribeReq *
-+ sr__subscribe_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__subscribe_req__free_unpacked
-+ (Sr__SubscribeReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SubscribeResp methods */
-+void sr__subscribe_resp__init
-+ (Sr__SubscribeResp *message);
-+size_t sr__subscribe_resp__get_packed_size
-+ (const Sr__SubscribeResp *message);
-+size_t sr__subscribe_resp__pack
-+ (const Sr__SubscribeResp *message,
-+ uint8_t *out);
-+size_t sr__subscribe_resp__pack_to_buffer
-+ (const Sr__SubscribeResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SubscribeResp *
-+ sr__subscribe_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__subscribe_resp__free_unpacked
-+ (Sr__SubscribeResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__UnsubscribeReq methods */
-+void sr__unsubscribe_req__init
-+ (Sr__UnsubscribeReq *message);
-+size_t sr__unsubscribe_req__get_packed_size
-+ (const Sr__UnsubscribeReq *message);
-+size_t sr__unsubscribe_req__pack
-+ (const Sr__UnsubscribeReq *message,
-+ uint8_t *out);
-+size_t sr__unsubscribe_req__pack_to_buffer
-+ (const Sr__UnsubscribeReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__UnsubscribeReq *
-+ sr__unsubscribe_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__unsubscribe_req__free_unpacked
-+ (Sr__UnsubscribeReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__UnsubscribeResp methods */
-+void sr__unsubscribe_resp__init
-+ (Sr__UnsubscribeResp *message);
-+size_t sr__unsubscribe_resp__get_packed_size
-+ (const Sr__UnsubscribeResp *message);
-+size_t sr__unsubscribe_resp__pack
-+ (const Sr__UnsubscribeResp *message,
-+ uint8_t *out);
-+size_t sr__unsubscribe_resp__pack_to_buffer
-+ (const Sr__UnsubscribeResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__UnsubscribeResp *
-+ sr__unsubscribe_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__unsubscribe_resp__free_unpacked
-+ (Sr__UnsubscribeResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__CheckEnabledRunningReq methods */
-+void sr__check_enabled_running_req__init
-+ (Sr__CheckEnabledRunningReq *message);
-+size_t sr__check_enabled_running_req__get_packed_size
-+ (const Sr__CheckEnabledRunningReq *message);
-+size_t sr__check_enabled_running_req__pack
-+ (const Sr__CheckEnabledRunningReq *message,
-+ uint8_t *out);
-+size_t sr__check_enabled_running_req__pack_to_buffer
-+ (const Sr__CheckEnabledRunningReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__CheckEnabledRunningReq *
-+ sr__check_enabled_running_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__check_enabled_running_req__free_unpacked
-+ (Sr__CheckEnabledRunningReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__CheckEnabledRunningResp methods */
-+void sr__check_enabled_running_resp__init
-+ (Sr__CheckEnabledRunningResp *message);
-+size_t sr__check_enabled_running_resp__get_packed_size
-+ (const Sr__CheckEnabledRunningResp *message);
-+size_t sr__check_enabled_running_resp__pack
-+ (const Sr__CheckEnabledRunningResp *message,
-+ uint8_t *out);
-+size_t sr__check_enabled_running_resp__pack_to_buffer
-+ (const Sr__CheckEnabledRunningResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__CheckEnabledRunningResp *
-+ sr__check_enabled_running_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__check_enabled_running_resp__free_unpacked
-+ (Sr__CheckEnabledRunningResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__ModuleInstallNotification methods */
-+void sr__module_install_notification__init
-+ (Sr__ModuleInstallNotification *message);
-+size_t sr__module_install_notification__get_packed_size
-+ (const Sr__ModuleInstallNotification *message);
-+size_t sr__module_install_notification__pack
-+ (const Sr__ModuleInstallNotification *message,
-+ uint8_t *out);
-+size_t sr__module_install_notification__pack_to_buffer
-+ (const Sr__ModuleInstallNotification *message,
-+ ProtobufCBuffer *buffer);
-+Sr__ModuleInstallNotification *
-+ sr__module_install_notification__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__module_install_notification__free_unpacked
-+ (Sr__ModuleInstallNotification *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__FeatureEnableNotification methods */
-+void sr__feature_enable_notification__init
-+ (Sr__FeatureEnableNotification *message);
-+size_t sr__feature_enable_notification__get_packed_size
-+ (const Sr__FeatureEnableNotification *message);
-+size_t sr__feature_enable_notification__pack
-+ (const Sr__FeatureEnableNotification *message,
-+ uint8_t *out);
-+size_t sr__feature_enable_notification__pack_to_buffer
-+ (const Sr__FeatureEnableNotification *message,
-+ ProtobufCBuffer *buffer);
-+Sr__FeatureEnableNotification *
-+ sr__feature_enable_notification__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__feature_enable_notification__free_unpacked
-+ (Sr__FeatureEnableNotification *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__ModuleChangeNotification methods */
-+void sr__module_change_notification__init
-+ (Sr__ModuleChangeNotification *message);
-+size_t sr__module_change_notification__get_packed_size
-+ (const Sr__ModuleChangeNotification *message);
-+size_t sr__module_change_notification__pack
-+ (const Sr__ModuleChangeNotification *message,
-+ uint8_t *out);
-+size_t sr__module_change_notification__pack_to_buffer
-+ (const Sr__ModuleChangeNotification *message,
-+ ProtobufCBuffer *buffer);
-+Sr__ModuleChangeNotification *
-+ sr__module_change_notification__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__module_change_notification__free_unpacked
-+ (Sr__ModuleChangeNotification *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SubtreeChangeNotification methods */
-+void sr__subtree_change_notification__init
-+ (Sr__SubtreeChangeNotification *message);
-+size_t sr__subtree_change_notification__get_packed_size
-+ (const Sr__SubtreeChangeNotification *message);
-+size_t sr__subtree_change_notification__pack
-+ (const Sr__SubtreeChangeNotification *message,
-+ uint8_t *out);
-+size_t sr__subtree_change_notification__pack_to_buffer
-+ (const Sr__SubtreeChangeNotification *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SubtreeChangeNotification *
-+ sr__subtree_change_notification__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__subtree_change_notification__free_unpacked
-+ (Sr__SubtreeChangeNotification *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__Change methods */
-+void sr__change__init
-+ (Sr__Change *message);
-+size_t sr__change__get_packed_size
-+ (const Sr__Change *message);
-+size_t sr__change__pack
-+ (const Sr__Change *message,
-+ uint8_t *out);
-+size_t sr__change__pack_to_buffer
-+ (const Sr__Change *message,
-+ ProtobufCBuffer *buffer);
-+Sr__Change *
-+ sr__change__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__change__free_unpacked
-+ (Sr__Change *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__GetChangesReq methods */
-+void sr__get_changes_req__init
-+ (Sr__GetChangesReq *message);
-+size_t sr__get_changes_req__get_packed_size
-+ (const Sr__GetChangesReq *message);
-+size_t sr__get_changes_req__pack
-+ (const Sr__GetChangesReq *message,
-+ uint8_t *out);
-+size_t sr__get_changes_req__pack_to_buffer
-+ (const Sr__GetChangesReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__GetChangesReq *
-+ sr__get_changes_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__get_changes_req__free_unpacked
-+ (Sr__GetChangesReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__GetChangesResp methods */
-+void sr__get_changes_resp__init
-+ (Sr__GetChangesResp *message);
-+size_t sr__get_changes_resp__get_packed_size
-+ (const Sr__GetChangesResp *message);
-+size_t sr__get_changes_resp__pack
-+ (const Sr__GetChangesResp *message,
-+ uint8_t *out);
-+size_t sr__get_changes_resp__pack_to_buffer
-+ (const Sr__GetChangesResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__GetChangesResp *
-+ sr__get_changes_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__get_changes_resp__free_unpacked
-+ (Sr__GetChangesResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__CheckExecPermReq methods */
-+void sr__check_exec_perm_req__init
-+ (Sr__CheckExecPermReq *message);
-+size_t sr__check_exec_perm_req__get_packed_size
-+ (const Sr__CheckExecPermReq *message);
-+size_t sr__check_exec_perm_req__pack
-+ (const Sr__CheckExecPermReq *message,
-+ uint8_t *out);
-+size_t sr__check_exec_perm_req__pack_to_buffer
-+ (const Sr__CheckExecPermReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__CheckExecPermReq *
-+ sr__check_exec_perm_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__check_exec_perm_req__free_unpacked
-+ (Sr__CheckExecPermReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__CheckExecPermResp methods */
-+void sr__check_exec_perm_resp__init
-+ (Sr__CheckExecPermResp *message);
-+size_t sr__check_exec_perm_resp__get_packed_size
-+ (const Sr__CheckExecPermResp *message);
-+size_t sr__check_exec_perm_resp__pack
-+ (const Sr__CheckExecPermResp *message,
-+ uint8_t *out);
-+size_t sr__check_exec_perm_resp__pack_to_buffer
-+ (const Sr__CheckExecPermResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__CheckExecPermResp *
-+ sr__check_exec_perm_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__check_exec_perm_resp__free_unpacked
-+ (Sr__CheckExecPermResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__RPCReq methods */
-+void sr__rpcreq__init
-+ (Sr__RPCReq *message);
-+size_t sr__rpcreq__get_packed_size
-+ (const Sr__RPCReq *message);
-+size_t sr__rpcreq__pack
-+ (const Sr__RPCReq *message,
-+ uint8_t *out);
-+size_t sr__rpcreq__pack_to_buffer
-+ (const Sr__RPCReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__RPCReq *
-+ sr__rpcreq__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__rpcreq__free_unpacked
-+ (Sr__RPCReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__RPCResp methods */
-+void sr__rpcresp__init
-+ (Sr__RPCResp *message);
-+size_t sr__rpcresp__get_packed_size
-+ (const Sr__RPCResp *message);
-+size_t sr__rpcresp__pack
-+ (const Sr__RPCResp *message,
-+ uint8_t *out);
-+size_t sr__rpcresp__pack_to_buffer
-+ (const Sr__RPCResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__RPCResp *
-+ sr__rpcresp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__rpcresp__free_unpacked
-+ (Sr__RPCResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__EventNotifReq methods */
-+void sr__event_notif_req__init
-+ (Sr__EventNotifReq *message);
-+size_t sr__event_notif_req__get_packed_size
-+ (const Sr__EventNotifReq *message);
-+size_t sr__event_notif_req__pack
-+ (const Sr__EventNotifReq *message,
-+ uint8_t *out);
-+size_t sr__event_notif_req__pack_to_buffer
-+ (const Sr__EventNotifReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__EventNotifReq *
-+ sr__event_notif_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__event_notif_req__free_unpacked
-+ (Sr__EventNotifReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__EventNotifResp methods */
-+void sr__event_notif_resp__init
-+ (Sr__EventNotifResp *message);
-+size_t sr__event_notif_resp__get_packed_size
-+ (const Sr__EventNotifResp *message);
-+size_t sr__event_notif_resp__pack
-+ (const Sr__EventNotifResp *message,
-+ uint8_t *out);
-+size_t sr__event_notif_resp__pack_to_buffer
-+ (const Sr__EventNotifResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__EventNotifResp *
-+ sr__event_notif_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__event_notif_resp__free_unpacked
-+ (Sr__EventNotifResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__EventNotifReplayReq methods */
-+void sr__event_notif_replay_req__init
-+ (Sr__EventNotifReplayReq *message);
-+size_t sr__event_notif_replay_req__get_packed_size
-+ (const Sr__EventNotifReplayReq *message);
-+size_t sr__event_notif_replay_req__pack
-+ (const Sr__EventNotifReplayReq *message,
-+ uint8_t *out);
-+size_t sr__event_notif_replay_req__pack_to_buffer
-+ (const Sr__EventNotifReplayReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__EventNotifReplayReq *
-+ sr__event_notif_replay_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__event_notif_replay_req__free_unpacked
-+ (Sr__EventNotifReplayReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__EventNotifReplayResp methods */
-+void sr__event_notif_replay_resp__init
-+ (Sr__EventNotifReplayResp *message);
-+size_t sr__event_notif_replay_resp__get_packed_size
-+ (const Sr__EventNotifReplayResp *message);
-+size_t sr__event_notif_replay_resp__pack
-+ (const Sr__EventNotifReplayResp *message,
-+ uint8_t *out);
-+size_t sr__event_notif_replay_resp__pack_to_buffer
-+ (const Sr__EventNotifReplayResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__EventNotifReplayResp *
-+ sr__event_notif_replay_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__event_notif_replay_resp__free_unpacked
-+ (Sr__EventNotifReplayResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__DataProvideReq methods */
-+void sr__data_provide_req__init
-+ (Sr__DataProvideReq *message);
-+size_t sr__data_provide_req__get_packed_size
-+ (const Sr__DataProvideReq *message);
-+size_t sr__data_provide_req__pack
-+ (const Sr__DataProvideReq *message,
-+ uint8_t *out);
-+size_t sr__data_provide_req__pack_to_buffer
-+ (const Sr__DataProvideReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__DataProvideReq *
-+ sr__data_provide_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__data_provide_req__free_unpacked
-+ (Sr__DataProvideReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__DataProvideResp methods */
-+void sr__data_provide_resp__init
-+ (Sr__DataProvideResp *message);
-+size_t sr__data_provide_resp__get_packed_size
-+ (const Sr__DataProvideResp *message);
-+size_t sr__data_provide_resp__pack
-+ (const Sr__DataProvideResp *message,
-+ uint8_t *out);
-+size_t sr__data_provide_resp__pack_to_buffer
-+ (const Sr__DataProvideResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__DataProvideResp *
-+ sr__data_provide_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__data_provide_resp__free_unpacked
-+ (Sr__DataProvideResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__ModuleInstallReq methods */
-+void sr__module_install_req__init
-+ (Sr__ModuleInstallReq *message);
-+size_t sr__module_install_req__get_packed_size
-+ (const Sr__ModuleInstallReq *message);
-+size_t sr__module_install_req__pack
-+ (const Sr__ModuleInstallReq *message,
-+ uint8_t *out);
-+size_t sr__module_install_req__pack_to_buffer
-+ (const Sr__ModuleInstallReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__ModuleInstallReq *
-+ sr__module_install_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__module_install_req__free_unpacked
-+ (Sr__ModuleInstallReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__ModuleInstallResp methods */
-+void sr__module_install_resp__init
-+ (Sr__ModuleInstallResp *message);
-+size_t sr__module_install_resp__get_packed_size
-+ (const Sr__ModuleInstallResp *message);
-+size_t sr__module_install_resp__pack
-+ (const Sr__ModuleInstallResp *message,
-+ uint8_t *out);
-+size_t sr__module_install_resp__pack_to_buffer
-+ (const Sr__ModuleInstallResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__ModuleInstallResp *
-+ sr__module_install_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__module_install_resp__free_unpacked
-+ (Sr__ModuleInstallResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__FeatureEnableReq methods */
-+void sr__feature_enable_req__init
-+ (Sr__FeatureEnableReq *message);
-+size_t sr__feature_enable_req__get_packed_size
-+ (const Sr__FeatureEnableReq *message);
-+size_t sr__feature_enable_req__pack
-+ (const Sr__FeatureEnableReq *message,
-+ uint8_t *out);
-+size_t sr__feature_enable_req__pack_to_buffer
-+ (const Sr__FeatureEnableReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__FeatureEnableReq *
-+ sr__feature_enable_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__feature_enable_req__free_unpacked
-+ (Sr__FeatureEnableReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__FeatureEnableResp methods */
-+void sr__feature_enable_resp__init
-+ (Sr__FeatureEnableResp *message);
-+size_t sr__feature_enable_resp__get_packed_size
-+ (const Sr__FeatureEnableResp *message);
-+size_t sr__feature_enable_resp__pack
-+ (const Sr__FeatureEnableResp *message,
-+ uint8_t *out);
-+size_t sr__feature_enable_resp__pack_to_buffer
-+ (const Sr__FeatureEnableResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__FeatureEnableResp *
-+ sr__feature_enable_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__feature_enable_resp__free_unpacked
-+ (Sr__FeatureEnableResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__UnsubscribeDestinationReq methods */
-+void sr__unsubscribe_destination_req__init
-+ (Sr__UnsubscribeDestinationReq *message);
-+size_t sr__unsubscribe_destination_req__get_packed_size
-+ (const Sr__UnsubscribeDestinationReq *message);
-+size_t sr__unsubscribe_destination_req__pack
-+ (const Sr__UnsubscribeDestinationReq *message,
-+ uint8_t *out);
-+size_t sr__unsubscribe_destination_req__pack_to_buffer
-+ (const Sr__UnsubscribeDestinationReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__UnsubscribeDestinationReq *
-+ sr__unsubscribe_destination_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__unsubscribe_destination_req__free_unpacked
-+ (Sr__UnsubscribeDestinationReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__CommitTimeoutReq methods */
-+void sr__commit_timeout_req__init
-+ (Sr__CommitTimeoutReq *message);
-+size_t sr__commit_timeout_req__get_packed_size
-+ (const Sr__CommitTimeoutReq *message);
-+size_t sr__commit_timeout_req__pack
-+ (const Sr__CommitTimeoutReq *message,
-+ uint8_t *out);
-+size_t sr__commit_timeout_req__pack_to_buffer
-+ (const Sr__CommitTimeoutReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__CommitTimeoutReq *
-+ sr__commit_timeout_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__commit_timeout_req__free_unpacked
-+ (Sr__CommitTimeoutReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__OperDataTimeoutReq methods */
-+void sr__oper_data_timeout_req__init
-+ (Sr__OperDataTimeoutReq *message);
-+size_t sr__oper_data_timeout_req__get_packed_size
-+ (const Sr__OperDataTimeoutReq *message);
-+size_t sr__oper_data_timeout_req__pack
-+ (const Sr__OperDataTimeoutReq *message,
-+ uint8_t *out);
-+size_t sr__oper_data_timeout_req__pack_to_buffer
-+ (const Sr__OperDataTimeoutReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__OperDataTimeoutReq *
-+ sr__oper_data_timeout_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__oper_data_timeout_req__free_unpacked
-+ (Sr__OperDataTimeoutReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__InternalStateDataReq methods */
-+void sr__internal_state_data_req__init
-+ (Sr__InternalStateDataReq *message);
-+size_t sr__internal_state_data_req__get_packed_size
-+ (const Sr__InternalStateDataReq *message);
-+size_t sr__internal_state_data_req__pack
-+ (const Sr__InternalStateDataReq *message,
-+ uint8_t *out);
-+size_t sr__internal_state_data_req__pack_to_buffer
-+ (const Sr__InternalStateDataReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__InternalStateDataReq *
-+ sr__internal_state_data_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__internal_state_data_req__free_unpacked
-+ (Sr__InternalStateDataReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__NotifStoreCleanupReq methods */
-+void sr__notif_store_cleanup_req__init
-+ (Sr__NotifStoreCleanupReq *message);
-+size_t sr__notif_store_cleanup_req__get_packed_size
-+ (const Sr__NotifStoreCleanupReq *message);
-+size_t sr__notif_store_cleanup_req__pack
-+ (const Sr__NotifStoreCleanupReq *message,
-+ uint8_t *out);
-+size_t sr__notif_store_cleanup_req__pack_to_buffer
-+ (const Sr__NotifStoreCleanupReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__NotifStoreCleanupReq *
-+ sr__notif_store_cleanup_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__notif_store_cleanup_req__free_unpacked
-+ (Sr__NotifStoreCleanupReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__DelayedMsgReq methods */
-+void sr__delayed_msg_req__init
-+ (Sr__DelayedMsgReq *message);
-+size_t sr__delayed_msg_req__get_packed_size
-+ (const Sr__DelayedMsgReq *message);
-+size_t sr__delayed_msg_req__pack
-+ (const Sr__DelayedMsgReq *message,
-+ uint8_t *out);
-+size_t sr__delayed_msg_req__pack_to_buffer
-+ (const Sr__DelayedMsgReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__DelayedMsgReq *
-+ sr__delayed_msg_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__delayed_msg_req__free_unpacked
-+ (Sr__DelayedMsgReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__NacmReloadReq methods */
-+void sr__nacm_reload_req__init
-+ (Sr__NacmReloadReq *message);
-+size_t sr__nacm_reload_req__get_packed_size
-+ (const Sr__NacmReloadReq *message);
-+size_t sr__nacm_reload_req__pack
-+ (const Sr__NacmReloadReq *message,
-+ uint8_t *out);
-+size_t sr__nacm_reload_req__pack_to_buffer
-+ (const Sr__NacmReloadReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__NacmReloadReq *
-+ sr__nacm_reload_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__nacm_reload_req__free_unpacked
-+ (Sr__NacmReloadReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__Request methods */
-+void sr__request__init
-+ (Sr__Request *message);
-+size_t sr__request__get_packed_size
-+ (const Sr__Request *message);
-+size_t sr__request__pack
-+ (const Sr__Request *message,
-+ uint8_t *out);
-+size_t sr__request__pack_to_buffer
-+ (const Sr__Request *message,
-+ ProtobufCBuffer *buffer);
-+Sr__Request *
-+ sr__request__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__request__free_unpacked
-+ (Sr__Request *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__Response methods */
-+void sr__response__init
-+ (Sr__Response *message);
-+size_t sr__response__get_packed_size
-+ (const Sr__Response *message);
-+size_t sr__response__pack
-+ (const Sr__Response *message,
-+ uint8_t *out);
-+size_t sr__response__pack_to_buffer
-+ (const Sr__Response *message,
-+ ProtobufCBuffer *buffer);
-+Sr__Response *
-+ sr__response__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__response__free_unpacked
-+ (Sr__Response *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__Notification methods */
-+void sr__notification__init
-+ (Sr__Notification *message);
-+size_t sr__notification__get_packed_size
-+ (const Sr__Notification *message);
-+size_t sr__notification__pack
-+ (const Sr__Notification *message,
-+ uint8_t *out);
-+size_t sr__notification__pack_to_buffer
-+ (const Sr__Notification *message,
-+ ProtobufCBuffer *buffer);
-+Sr__Notification *
-+ sr__notification__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__notification__free_unpacked
-+ (Sr__Notification *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__NotificationAck methods */
-+void sr__notification_ack__init
-+ (Sr__NotificationAck *message);
-+size_t sr__notification_ack__get_packed_size
-+ (const Sr__NotificationAck *message);
-+size_t sr__notification_ack__pack
-+ (const Sr__NotificationAck *message,
-+ uint8_t *out);
-+size_t sr__notification_ack__pack_to_buffer
-+ (const Sr__NotificationAck *message,
-+ ProtobufCBuffer *buffer);
-+Sr__NotificationAck *
-+ sr__notification_ack__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__notification_ack__free_unpacked
-+ (Sr__NotificationAck *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__InternalRequest methods */
-+void sr__internal_request__init
-+ (Sr__InternalRequest *message);
-+size_t sr__internal_request__get_packed_size
-+ (const Sr__InternalRequest *message);
-+size_t sr__internal_request__pack
-+ (const Sr__InternalRequest *message,
-+ uint8_t *out);
-+size_t sr__internal_request__pack_to_buffer
-+ (const Sr__InternalRequest *message,
-+ ProtobufCBuffer *buffer);
-+Sr__InternalRequest *
-+ sr__internal_request__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__internal_request__free_unpacked
-+ (Sr__InternalRequest *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__Msg methods */
-+void sr__msg__init
-+ (Sr__Msg *message);
-+size_t sr__msg__get_packed_size
-+ (const Sr__Msg *message);
-+size_t sr__msg__pack
-+ (const Sr__Msg *message,
-+ uint8_t *out);
-+size_t sr__msg__pack_to_buffer
-+ (const Sr__Msg *message,
-+ ProtobufCBuffer *buffer);
-+Sr__Msg *
-+ sr__msg__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__msg__free_unpacked
-+ (Sr__Msg *message,
-+ ProtobufCAllocator *allocator);
-+/* --- per-message closures --- */
-+
-+typedef void (*Sr__Value_Closure)
-+ (const Sr__Value *message,
-+ void *closure_data);
-+typedef void (*Sr__Node_Closure)
-+ (const Sr__Node *message,
-+ void *closure_data);
-+typedef void (*Sr__Error_Closure)
-+ (const Sr__Error *message,
-+ void *closure_data);
-+typedef void (*Sr__SessionStartReq_Closure)
-+ (const Sr__SessionStartReq *message,
-+ void *closure_data);
-+typedef void (*Sr__SessionStartResp_Closure)
-+ (const Sr__SessionStartResp *message,
-+ void *closure_data);
-+typedef void (*Sr__SessionStopReq_Closure)
-+ (const Sr__SessionStopReq *message,
-+ void *closure_data);
-+typedef void (*Sr__SessionStopResp_Closure)
-+ (const Sr__SessionStopResp *message,
-+ void *closure_data);
-+typedef void (*Sr__SessionRefreshReq_Closure)
-+ (const Sr__SessionRefreshReq *message,
-+ void *closure_data);
-+typedef void (*Sr__SessionRefreshResp_Closure)
-+ (const Sr__SessionRefreshResp *message,
-+ void *closure_data);
-+typedef void (*Sr__SessionCheckReq_Closure)
-+ (const Sr__SessionCheckReq *message,
-+ void *closure_data);
-+typedef void (*Sr__SessionCheckResp_Closure)
-+ (const Sr__SessionCheckResp *message,
-+ void *closure_data);
-+typedef void (*Sr__SessionSwitchDsReq_Closure)
-+ (const Sr__SessionSwitchDsReq *message,
-+ void *closure_data);
-+typedef void (*Sr__SessionSwitchDsResp_Closure)
-+ (const Sr__SessionSwitchDsResp *message,
-+ void *closure_data);
-+typedef void (*Sr__SessionSetOptsReq_Closure)
-+ (const Sr__SessionSetOptsReq *message,
-+ void *closure_data);
-+typedef void (*Sr__SessionSetOptsResp_Closure)
-+ (const Sr__SessionSetOptsResp *message,
-+ void *closure_data);
-+typedef void (*Sr__VersionVerifyReq_Closure)
-+ (const Sr__VersionVerifyReq *message,
-+ void *closure_data);
-+typedef void (*Sr__VersionVerifyResp_Closure)
-+ (const Sr__VersionVerifyResp *message,
-+ void *closure_data);
-+typedef void (*Sr__SchemaRevision_Closure)
-+ (const Sr__SchemaRevision *message,
-+ void *closure_data);
-+typedef void (*Sr__SchemaSubmodule_Closure)
-+ (const Sr__SchemaSubmodule *message,
-+ void *closure_data);
-+typedef void (*Sr__Schema_Closure)
-+ (const Sr__Schema *message,
-+ void *closure_data);
-+typedef void (*Sr__ListSchemasReq_Closure)
-+ (const Sr__ListSchemasReq *message,
-+ void *closure_data);
-+typedef void (*Sr__ListSchemasResp_Closure)
-+ (const Sr__ListSchemasResp *message,
-+ void *closure_data);
-+typedef void (*Sr__GetSchemaReq_Closure)
-+ (const Sr__GetSchemaReq *message,
-+ void *closure_data);
-+typedef void (*Sr__GetSchemaResp_Closure)
-+ (const Sr__GetSchemaResp *message,
-+ void *closure_data);
-+typedef void (*Sr__GetItemReq_Closure)
-+ (const Sr__GetItemReq *message,
-+ void *closure_data);
-+typedef void (*Sr__GetItemResp_Closure)
-+ (const Sr__GetItemResp *message,
-+ void *closure_data);
-+typedef void (*Sr__GetItemsReq_Closure)
-+ (const Sr__GetItemsReq *message,
-+ void *closure_data);
-+typedef void (*Sr__GetItemsResp_Closure)
-+ (const Sr__GetItemsResp *message,
-+ void *closure_data);
-+typedef void (*Sr__GetSubtreeReq_Closure)
-+ (const Sr__GetSubtreeReq *message,
-+ void *closure_data);
-+typedef void (*Sr__GetSubtreeResp_Closure)
-+ (const Sr__GetSubtreeResp *message,
-+ void *closure_data);
-+typedef void (*Sr__GetSubtreesReq_Closure)
-+ (const Sr__GetSubtreesReq *message,
-+ void *closure_data);
-+typedef void (*Sr__GetSubtreesResp_Closure)
-+ (const Sr__GetSubtreesResp *message,
-+ void *closure_data);
-+typedef void (*Sr__GetSubtreeChunkReq_Closure)
-+ (const Sr__GetSubtreeChunkReq *message,
-+ void *closure_data);
-+typedef void (*Sr__GetSubtreeChunkResp_Closure)
-+ (const Sr__GetSubtreeChunkResp *message,
-+ void *closure_data);
-+typedef void (*Sr__SetItemReq_Closure)
-+ (const Sr__SetItemReq *message,
-+ void *closure_data);
-+typedef void (*Sr__SetItemResp_Closure)
-+ (const Sr__SetItemResp *message,
-+ void *closure_data);
-+typedef void (*Sr__SetItemStrReq_Closure)
-+ (const Sr__SetItemStrReq *message,
-+ void *closure_data);
-+typedef void (*Sr__SetItemStrResp_Closure)
-+ (const Sr__SetItemStrResp *message,
-+ void *closure_data);
-+typedef void (*Sr__DeleteItemReq_Closure)
-+ (const Sr__DeleteItemReq *message,
-+ void *closure_data);
-+typedef void (*Sr__DeleteItemResp_Closure)
-+ (const Sr__DeleteItemResp *message,
-+ void *closure_data);
-+typedef void (*Sr__MoveItemReq_Closure)
-+ (const Sr__MoveItemReq *message,
-+ void *closure_data);
-+typedef void (*Sr__MoveItemResp_Closure)
-+ (const Sr__MoveItemResp *message,
-+ void *closure_data);
-+typedef void (*Sr__ValidateReq_Closure)
-+ (const Sr__ValidateReq *message,
-+ void *closure_data);
-+typedef void (*Sr__ValidateResp_Closure)
-+ (const Sr__ValidateResp *message,
-+ void *closure_data);
-+typedef void (*Sr__CommitReq_Closure)
-+ (const Sr__CommitReq *message,
-+ void *closure_data);
-+typedef void (*Sr__CommitResp_Closure)
-+ (const Sr__CommitResp *message,
-+ void *closure_data);
-+typedef void (*Sr__DiscardChangesReq_Closure)
-+ (const Sr__DiscardChangesReq *message,
-+ void *closure_data);
-+typedef void (*Sr__DiscardChangesResp_Closure)
-+ (const Sr__DiscardChangesResp *message,
-+ void *closure_data);
-+typedef void (*Sr__CopyConfigReq_Closure)
-+ (const Sr__CopyConfigReq *message,
-+ void *closure_data);
-+typedef void (*Sr__CopyConfigResp_Closure)
-+ (const Sr__CopyConfigResp *message,
-+ void *closure_data);
-+typedef void (*Sr__LockReq_Closure)
-+ (const Sr__LockReq *message,
-+ void *closure_data);
-+typedef void (*Sr__LockResp_Closure)
-+ (const Sr__LockResp *message,
-+ void *closure_data);
-+typedef void (*Sr__UnlockReq_Closure)
-+ (const Sr__UnlockReq *message,
-+ void *closure_data);
-+typedef void (*Sr__UnlockResp_Closure)
-+ (const Sr__UnlockResp *message,
-+ void *closure_data);
-+typedef void (*Sr__SubscribeReq_Closure)
-+ (const Sr__SubscribeReq *message,
-+ void *closure_data);
-+typedef void (*Sr__SubscribeResp_Closure)
-+ (const Sr__SubscribeResp *message,
-+ void *closure_data);
-+typedef void (*Sr__UnsubscribeReq_Closure)
-+ (const Sr__UnsubscribeReq *message,
-+ void *closure_data);
-+typedef void (*Sr__UnsubscribeResp_Closure)
-+ (const Sr__UnsubscribeResp *message,
-+ void *closure_data);
-+typedef void (*Sr__CheckEnabledRunningReq_Closure)
-+ (const Sr__CheckEnabledRunningReq *message,
-+ void *closure_data);
-+typedef void (*Sr__CheckEnabledRunningResp_Closure)
-+ (const Sr__CheckEnabledRunningResp *message,
-+ void *closure_data);
-+typedef void (*Sr__ModuleInstallNotification_Closure)
-+ (const Sr__ModuleInstallNotification *message,
-+ void *closure_data);
-+typedef void (*Sr__FeatureEnableNotification_Closure)
-+ (const Sr__FeatureEnableNotification *message,
-+ void *closure_data);
-+typedef void (*Sr__ModuleChangeNotification_Closure)
-+ (const Sr__ModuleChangeNotification *message,
-+ void *closure_data);
-+typedef void (*Sr__SubtreeChangeNotification_Closure)
-+ (const Sr__SubtreeChangeNotification *message,
-+ void *closure_data);
-+typedef void (*Sr__Change_Closure)
-+ (const Sr__Change *message,
-+ void *closure_data);
-+typedef void (*Sr__GetChangesReq_Closure)
-+ (const Sr__GetChangesReq *message,
-+ void *closure_data);
-+typedef void (*Sr__GetChangesResp_Closure)
-+ (const Sr__GetChangesResp *message,
-+ void *closure_data);
-+typedef void (*Sr__CheckExecPermReq_Closure)
-+ (const Sr__CheckExecPermReq *message,
-+ void *closure_data);
-+typedef void (*Sr__CheckExecPermResp_Closure)
-+ (const Sr__CheckExecPermResp *message,
-+ void *closure_data);
-+typedef void (*Sr__RPCReq_Closure)
-+ (const Sr__RPCReq *message,
-+ void *closure_data);
-+typedef void (*Sr__RPCResp_Closure)
-+ (const Sr__RPCResp *message,
-+ void *closure_data);
-+typedef void (*Sr__EventNotifReq_Closure)
-+ (const Sr__EventNotifReq *message,
-+ void *closure_data);
-+typedef void (*Sr__EventNotifResp_Closure)
-+ (const Sr__EventNotifResp *message,
-+ void *closure_data);
-+typedef void (*Sr__EventNotifReplayReq_Closure)
-+ (const Sr__EventNotifReplayReq *message,
-+ void *closure_data);
-+typedef void (*Sr__EventNotifReplayResp_Closure)
-+ (const Sr__EventNotifReplayResp *message,
-+ void *closure_data);
-+typedef void (*Sr__DataProvideReq_Closure)
-+ (const Sr__DataProvideReq *message,
-+ void *closure_data);
-+typedef void (*Sr__DataProvideResp_Closure)
-+ (const Sr__DataProvideResp *message,
-+ void *closure_data);
-+typedef void (*Sr__ModuleInstallReq_Closure)
-+ (const Sr__ModuleInstallReq *message,
-+ void *closure_data);
-+typedef void (*Sr__ModuleInstallResp_Closure)
-+ (const Sr__ModuleInstallResp *message,
-+ void *closure_data);
-+typedef void (*Sr__FeatureEnableReq_Closure)
-+ (const Sr__FeatureEnableReq *message,
-+ void *closure_data);
-+typedef void (*Sr__FeatureEnableResp_Closure)
-+ (const Sr__FeatureEnableResp *message,
-+ void *closure_data);
-+typedef void (*Sr__UnsubscribeDestinationReq_Closure)
-+ (const Sr__UnsubscribeDestinationReq *message,
-+ void *closure_data);
-+typedef void (*Sr__CommitTimeoutReq_Closure)
-+ (const Sr__CommitTimeoutReq *message,
-+ void *closure_data);
-+typedef void (*Sr__OperDataTimeoutReq_Closure)
-+ (const Sr__OperDataTimeoutReq *message,
-+ void *closure_data);
-+typedef void (*Sr__InternalStateDataReq_Closure)
-+ (const Sr__InternalStateDataReq *message,
-+ void *closure_data);
-+typedef void (*Sr__NotifStoreCleanupReq_Closure)
-+ (const Sr__NotifStoreCleanupReq *message,
-+ void *closure_data);
-+typedef void (*Sr__DelayedMsgReq_Closure)
-+ (const Sr__DelayedMsgReq *message,
-+ void *closure_data);
-+typedef void (*Sr__NacmReloadReq_Closure)
-+ (const Sr__NacmReloadReq *message,
-+ void *closure_data);
-+typedef void (*Sr__Request_Closure)
-+ (const Sr__Request *message,
-+ void *closure_data);
-+typedef void (*Sr__Response_Closure)
-+ (const Sr__Response *message,
-+ void *closure_data);
-+typedef void (*Sr__Notification_Closure)
-+ (const Sr__Notification *message,
-+ void *closure_data);
-+typedef void (*Sr__NotificationAck_Closure)
-+ (const Sr__NotificationAck *message,
-+ void *closure_data);
-+typedef void (*Sr__InternalRequest_Closure)
-+ (const Sr__InternalRequest *message,
-+ void *closure_data);
-+typedef void (*Sr__Msg_Closure)
-+ (const Sr__Msg *message,
-+ void *closure_data);
-+
-+/* --- services --- */
-+
-+
-+/* --- descriptors --- */
-+
-+extern const ProtobufCEnumDescriptor sr__api_variant__descriptor;
-+extern const ProtobufCEnumDescriptor sr__data_store__descriptor;
-+extern const ProtobufCEnumDescriptor sr__session_flags__descriptor;
-+extern const ProtobufCEnumDescriptor sr__edit_flags__descriptor;
-+extern const ProtobufCEnumDescriptor sr__subscription_type__descriptor;
-+extern const ProtobufCEnumDescriptor sr__notification_event__descriptor;
-+extern const ProtobufCEnumDescriptor sr__module_state__descriptor;
-+extern const ProtobufCEnumDescriptor sr__change_operation__descriptor;
-+extern const ProtobufCEnumDescriptor sr__operation__descriptor;
-+extern const ProtobufCMessageDescriptor sr__value__descriptor;
-+extern const ProtobufCEnumDescriptor sr__value__types__descriptor;
-+extern const ProtobufCMessageDescriptor sr__node__descriptor;
-+extern const ProtobufCMessageDescriptor sr__error__descriptor;
-+extern const ProtobufCMessageDescriptor sr__session_start_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__session_start_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__session_stop_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__session_stop_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__session_refresh_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__session_refresh_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__session_check_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__session_check_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__session_switch_ds_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__session_switch_ds_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__session_set_opts_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__session_set_opts_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__version_verify_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__version_verify_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__schema_revision__descriptor;
-+extern const ProtobufCMessageDescriptor sr__schema_submodule__descriptor;
-+extern const ProtobufCMessageDescriptor sr__schema__descriptor;
-+extern const ProtobufCMessageDescriptor sr__list_schemas_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__list_schemas_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__get_schema_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__get_schema_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__get_item_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__get_item_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__get_items_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__get_items_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__get_subtree_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__get_subtree_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__get_subtrees_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__get_subtrees_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__get_subtree_chunk_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__get_subtree_chunk_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__set_item_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__set_item_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__set_item_str_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__set_item_str_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__delete_item_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__delete_item_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__move_item_req__descriptor;
-+extern const ProtobufCEnumDescriptor sr__move_item_req__move_position__descriptor;
-+extern const ProtobufCMessageDescriptor sr__move_item_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__validate_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__validate_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__commit_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__commit_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__discard_changes_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__discard_changes_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__copy_config_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__copy_config_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__lock_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__lock_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__unlock_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__unlock_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__subscribe_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__subscribe_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__unsubscribe_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__unsubscribe_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__check_enabled_running_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__check_enabled_running_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__module_install_notification__descriptor;
-+extern const ProtobufCMessageDescriptor sr__feature_enable_notification__descriptor;
-+extern const ProtobufCMessageDescriptor sr__module_change_notification__descriptor;
-+extern const ProtobufCMessageDescriptor sr__subtree_change_notification__descriptor;
-+extern const ProtobufCMessageDescriptor sr__change__descriptor;
-+extern const ProtobufCMessageDescriptor sr__get_changes_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__get_changes_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__check_exec_perm_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__check_exec_perm_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__rpcreq__descriptor;
-+extern const ProtobufCMessageDescriptor sr__rpcresp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__event_notif_req__descriptor;
-+extern const ProtobufCEnumDescriptor sr__event_notif_req__notif_type__descriptor;
-+extern const ProtobufCEnumDescriptor sr__event_notif_req__notif_flags__descriptor;
-+extern const ProtobufCMessageDescriptor sr__event_notif_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__event_notif_replay_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__event_notif_replay_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__data_provide_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__data_provide_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__module_install_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__module_install_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__feature_enable_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__feature_enable_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__unsubscribe_destination_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__commit_timeout_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__oper_data_timeout_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__internal_state_data_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__notif_store_cleanup_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__delayed_msg_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__nacm_reload_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__request__descriptor;
-+extern const ProtobufCMessageDescriptor sr__response__descriptor;
-+extern const ProtobufCMessageDescriptor sr__notification__descriptor;
-+extern const ProtobufCMessageDescriptor sr__notification_ack__descriptor;
-+extern const ProtobufCMessageDescriptor sr__internal_request__descriptor;
-+extern const ProtobufCMessageDescriptor sr__msg__descriptor;
-+extern const ProtobufCEnumDescriptor sr__msg__msg_type__descriptor;
-+
-+PROTOBUF_C__END_DECLS
-+
-+
-+#endif /* PROTOBUF_C_sysrepo_2eproto__INCLUDED */
-Index: sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf/CMakeLists.txt
+Index: sysrepo-0.7.5/CMakeLists.txt
===================================================================
---- sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf.orig/CMakeLists.txt
-+++ sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf/CMakeLists.txt
-@@ -280,7 +280,7 @@ install (FILES ${INTERNAL_YANGS} DESTINA
+--- sysrepo-0.7.5.orig/CMakeLists.txt
++++ sysrepo-0.7.5/CMakeLists.txt
+@@ -303,7 +303,7 @@ install (FILES ${INTERNAL_YANGS} DESTINA
# install NACM YANG module
if(ENABLE_NACM)
-- INSTALL_YANG("ietf-netconf-acm" "@2012-02-22" "644")
-+ # INSTALL_YANG("ietf-netconf-acm" "@2012-02-22" "644")
+- INSTALL_YANG("ietf-netconf-acm" "@2018-02-14" "644")
++ #INSTALL_YANG("ietf-netconf-acm" "@2018-02-14" "644")
endif(ENABLE_NACM)
find_package(PkgConfig QUIET)
-@@ -304,9 +304,9 @@ if(WITH_SYSTEMD)
+@@ -327,9 +327,9 @@ if(WITH_SYSTEMD)
FILES_MATCHING PATTERN "*.service")
endif()
-INSTALL_YANG("ietf-netconf-notifications" "" "666")
-INSTALL_YANG("nc-notifications" "" "666")
-INSTALL_YANG("notifications" "" "666")
-+# INSTALL_YANG("ietf-netconf-notifications" "" "666")
-+# INSTALL_YANG("nc-notifications" "" "666")
-+# INSTALL_YANG("notifications" "" "666")
++#INSTALL_YANG("ietf-netconf-notifications" "" "666")
++#INSTALL_YANG("nc-notifications" "" "666")
++#INSTALL_YANG("notifications" "" "666")
if(GEN_LANGUAGE_BINDINGS)
add_subdirectory(swig)
+++ /dev/null
-Index: sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf/inc/sysrepo.h
-===================================================================
---- sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf.orig/inc/sysrepo.h
-+++ sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf/inc/sysrepo.h
-@@ -51,6 +51,7 @@
- * @ref xp_page "XPath Addressing" is used for node identification in data-related calls.
- */
-
-+#include <time.h>
- #include <stdbool.h>
- #include <stdint.h>
- #include <stdlib.h>
-Index: sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf/src/clientlib/client_library.c
+Index: sysrepo-0.7.5/src/clientlib/client_library.c
===================================================================
---- sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf.orig/src/clientlib/client_library.c
-+++ sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf/src/clientlib/client_library.c
-@@ -405,14 +405,6 @@ sr_connect(const char *app_name, const s
- if (SR_ERR_OK != rc) {
+--- sysrepo-0.7.5.orig/src/clientlib/client_library.c
++++ sysrepo-0.7.5/src/clientlib/client_library.c
+@@ -396,13 +396,13 @@ sr_connect(const char *app_name, const s
if (opts & SR_CONN_DAEMON_REQUIRED) {
if ((opts & SR_CONN_DAEMON_START) && (0 == getuid())) {
-- /* sysrepo daemon start requested and process is running under root privileges */
+ /* sysrepo daemon start requested and process is running under root privileges */
- SR_LOG_DBG_MSG("Sysrepo daemon not detected, starting it.");
- ret = system("sysrepod");
- if (0 == ret) {
- } else {
- SR_LOG_WRN("Unable to start sysrepo daemon, error code=%d.", ret);
- }
++ //SR_LOG_DBG_MSG("Sysrepo daemon not detected, starting it.");
++ //ret = system("sysrepod");
++ //if (0 == ret) {
++ // SR_LOG_INF_MSG("Sysrepo daemon has been started.");
++ //} else {
++ // SR_LOG_WRN("Unable to start sysrepo daemon, error code=%d.", ret);
++ //}
/* retry to connect again in any case */
rc = cl_socket_connect(connection, SR_DAEMON_SOCKET);
CHECK_RC_LOG_GOTO(rc, cleanup, "Unable to connect to sysrepod: %s.", sr_strerror(rc));
include $(TOPDIR)/rules.mk
PKG_NAME:=tgt
-PKG_VERSION:=1.0.73
-PKG_REV:=013223dc886a03719ca02db52162056249d99448
-PKG_MIRROR_HASH:=649bd012ab0944644ff83cc2974e7a5c374d568e0f4328d9f8d352d4b59f73bb
+PKG_VERSION:=1.0.74
PKG_RELEASE:=1
-PKG_USE_MIPS16:=0
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/fujita/tgt.git
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/fujita/tgt/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=bfc202790d5326d7a18bd3928b4bb204ffb0acf443a5ec5c16a1a0fbc53be99f
-PKG_SOURCE_VERSION:=$(PKG_REV)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
PKG_LICENSE:=GPL-2.0
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
+PKG_USE_MIPS16:=0
include $(INCLUDE_DIR)/package.mk
CATEGORY:=Network
URL:=http://stgt.sourceforge.net/
TITLE:=userspace iSCSI target
- DEPENDS:=+libpthread +libaio @KERNEL_AIO
+ DEPENDS:=+libpthread +libaio
endef
define Package/tgt/description
-diff --git a/usr/Makefile b/usr/Makefile
-index d4e3eaf..ec1c9a3 100644
--- a/usr/Makefile
+++ b/usr/Makefile
@@ -1,11 +1,11 @@
---- tgt-1.0.48.orig/Makefile 2014-06-04 15:03:53.000000000 +0300
-+++ tgt-1.0.48/Makefile 2014-06-04 15:18:13.132963670 +0300
-@@ -64,7 +64,7 @@
+--- a/Makefile
++++ b/Makefile
+@@ -64,7 +64,7 @@ clean-conf:
$(MAKE) -C conf clean
.PHONY: install
-diff --git a/usr/tgtd.h b/usr/tgtd.h
-index d8b2ac1..c6eee54 100644
--- a/usr/tgtd.h
+++ b/usr/tgtd.h
@@ -9,6 +9,10 @@
struct concat_buf;
#define NR_SCSI_OPCODES 256
-diff --git a/usr/util.h b/usr/util.h
-index 0e34c35..3e2e63b 100644
--- a/usr/util.h
+++ b/usr/util.h
@@ -16,6 +16,10 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=tinc
-PKG_VERSION:=1.0.34
+PKG_VERSION:=1.0.35
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.tinc-vpn.org/packages
-PKG_HASH:=c03a9b61dedd452116dd9a8db231545ba08a7c96bce011e0cbd3cfd2c56dcfda
+PKG_HASH:=18c83b147cc3e2133a7ac2543eeb014d52070de01c7474287d3ccecc9b16895e
PKG_INSTALL:=1
--- /dev/null
+#
+# Copyright (C) 2018 Jeffery To
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=tor-fw-helper
+PKG_VERSION:=0.3
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://git.torproject.org/tor-fw-helper.git
+PKG_SOURCE_VERSION:=481599ee37dd3135c9e17d1df4810f36b4de4e3d
+PKG_SOURCE_DATE:=20150805
+PKG_MIRROR_HASH:=f22d1400bec6b62636bd59cb3a51befc9cddbacccb790a758694c589cb2bc032
+
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+PKG_BUILD_DEPENDS:=golang/host
+PKG_BUILD_PARALLEL:=1
+PKG_USE_MIPS16:=0
+
+GO_PKG:=git.torproject.org/tor-fw-helper.git
+
+include $(INCLUDE_DIR)/package.mk
+include ../../lang/golang/golang-package.mk
+
+define Package/tor-fw-helper/Default
+ TITLE:=Firewall helper for tor
+ URL:=https://gitweb.torproject.org/tor-fw-helper.git/
+ DEPENDS:=$(GO_ARCH_DEPENDS)
+endef
+
+define Package/tor-fw-helper
+$(call Package/tor-fw-helper/Default)
+ SECTION:=net
+ CATEGORY:=Network
+endef
+
+define Package/golang-torproject-tor-fw-helper-dev
+$(call Package/tor-fw-helper/Default)
+$(call GoPackage/GoSubMenu)
+ TITLE+= (source files)
+ PKGARCH:=all
+endef
+
+define Package/tor-fw-helper/Default/description
+tor-fw-helper is a helper to automatically configuring port forwarding
+for tor, using UPnP or NAT-PMP NAT traversal.
+
+This is a tor-fw-helper rewrite in Go that functions as a drop in
+replacement for the original C code.
+endef
+
+define Package/tor-fw-helper/description
+$(call Package/tor-fw-helper/Default/description)
+
+This package contains the main helper program.
+endef
+
+define Package/golang-torproject-tor-fw-helper-dev/description
+$(call Package/tor-fw-helper/Default/description)
+
+This package provides the source files for the helper program.
+endef
+
+$(eval $(call GoBinPackage,tor-fw-helper))
+$(eval $(call BuildPackage,tor-fw-helper))
+
+$(eval $(call GoSrcPackage,golang-torproject-tor-fw-helper-dev))
+$(eval $(call BuildPackage,golang-torproject-tor-fw-helper-dev))
include $(TOPDIR)/rules.mk
PKG_NAME:=tor
-PKG_VERSION:=0.3.3.9
+PKG_VERSION:=0.3.4.9
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://dist.torproject.org/ \
https://archive.torproject.org/tor-package-archive
-PKG_HASH:=85346b4d026e6a041c8e326d2cc64b5f5361b032075c89c5854f16dbc02fce6f
+PKG_HASH:=1a171081f02b9a6ff9e28c0898defb7670e5bbb3bdbcaddfcf4e4304aedd164a
PKG_MAINTAINER:=Hauke Mehrtens <hauke@hauke-m.de> \
Peter Wagner <tripolar@gmx.at>
PKG_LICENSE_FILES:=LICENSE
include $(TOPDIR)/rules.mk
PKG_NAME:=travelmate
-PKG_VERSION:=1.2.1
+PKG_VERSION:=1.3.0
PKG_RELEASE:=1
PKG_LICENSE:=GPL-3.0+
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
* support all kinds of uplinks, incl. hidden and enterprise uplinks
* continuously checks the existing uplink connection (quality), e.g. for conditional uplink (dis-) connections
* captive portal detection with internet online check and a 'heartbeat' function to keep the uplink connection up & running
-* support of devices with multiple radios
+* proactively scan and switch to a higher prioritized uplink, despite of an already existing connection
+* support devices with multiple radios in any order
* procd init and hotplug support
* runtime information available via LuCI & via 'status' init command
* status & debug logging to syslog
* optional: the LuCI frontend shows the WiFi QR codes from all configured Access Points. It allows you to connect your Android or iOS devices to your router’s WiFi using the QR code
## Prerequisites
-* [OpenWrt](https://openwrt.org), tested with the stable release series (17.01.x) and with the latest OpenWrt snapshot
+* [OpenWrt](https://openwrt.org), tested with the stable release series (18.06.x) and with the latest OpenWrt snapshot
* iwinfo for wlan scanning, uclient-fetch for captive portal detection
* optional: qrencode 4.x for QR code support
* trm\_enabled => main switch to enable/disable the travelmate service (bool/default: '0', disabled)
* trm\_debug => enable/disable debug logging (bool/default: '0', disabled)
* trm\_captive => enable/disable the captive portal detection (bool/default: '1', enabled)
+ * trm\_proactive => enable/disable the proactive uplink switch (bool/default: '1', enabled)
* trm\_minquality => minimum signal quality threshold as percent for conditional uplink (dis-) connections (int/default: '35', valid range: 20-80)
* trm\_maxwait => how long (in seconds) should travelmate wait for a successful wlan interface reload action (int/default: '30', valid range: 20-40)
* trm\_maxretry => how many times should travelmate try to connect to an uplink (int/default: '3', valid range: 1-10)
* trm\_timeout => overall retry timeout in seconds (int/default: '60', valid range: 30-300)
- * trm\_radio => limit travelmate to a dedicated radio, e.g. 'radio0' (default: not set, use all radios)
+ * trm\_radio => limit travelmate to a single radio (e.g. 'radio1') or change the overall scanning priority (e.g. 'radio1 radio2 radio0') (default: not set, use all radios 0-n)
* trm\_iface => main uplink / procd trigger network interface (default: trm_wwan)
* trm\_triggerdelay => additional trigger delay in seconds before travelmate processing begins (int/default: '2')
~# /etc/init.d/travelmate status
::: travelmate runtime information
+ travelmate_status : connected (net ok/78)
- + travelmate_version : 1.2.1
+ + travelmate_version : 1.2.3
+ station_id : radio1/blackhole/01:02:03:04:05:06
+ station_interface : trm_wwan
+ faulty_stations :
- + last_rundate : 28.07.2018 21:17:45
- + system : TP-LINK RE450, OpenWrt SNAPSHOT r7540+5-20c4819c7b
+ + last_rundate : 07.09.2018 17:22:37
+ + system : TP-LINK RE450, OpenWrt SNAPSHOT r8018-42f158314e
</code></pre>
## Manual Setup
**A:** Travelmate tries n times (default 3) to connect, then the respective uplink will be marked as "faulty" in the JSON runtime file and hereafter ignored. To reset the JSON runtime file, simply restart travelmate.
**Q:** How to connect to hidden uplinks?
**A:** See 'example\_hidden' STA configuration above, option 'SSID' and 'BSSID' must be specified for successful connections.
+**Q:** Any recommendations regarding suitable DNS settings to easily connect to captive portals?
+**A:** Use a simple DNS forwarder like dnsmasq and disable the option 'rebind_protection'.
## Support
Please join the travelmate discussion in this [forum thread](https://forum.lede-project.org/t/travelmate-support-thread/5155) or contact me by [mail](mailto:dev@brenken.org)
config travelmate 'global'
option trm_enabled '0'
option trm_captive '1'
+ option trm_proactive '1'
option trm_iface 'trm_wwan'
option trm_triggerdelay '2'
option trm_debug '0'
boot()
{
- ubus -t 30 wait_for network.interface network.wireless 2>/dev/null
- rc_procd start_service
+ ubus -t 30 wait_for network.interface network.wireless 2>/dev/null
+ rc_procd start_service
}
start_service()
{
- if [ $("${trm_init}" enabled; printf "%u" ${?}) -eq 0 ]
- then
- procd_open_instance "travelmate"
- procd_set_param command "${trm_script}" "${@}"
- procd_set_param stdout 1
- procd_set_param stderr 1
- procd_close_instance
- fi
+ if [ $("${trm_init}" enabled; printf "%u" ${?}) -eq 0 ]
+ then
+ procd_open_instance "travelmate"
+ procd_set_param command "${trm_script}" "${@}"
+ procd_set_param pidfile "${trm_pidfile}"
+ procd_set_param stdout 1
+ procd_set_param stderr 1
+ procd_close_instance
+ fi
}
reload_service()
{
- [ -s "${trm_pidfile}" ] && return 1
- "${trm_init}" restart
+ [ -s "${trm_pidfile}" ] && return 1
+ rc_procd start_service
}
stop_service()
{
- local rtfile="$(uci_get travelmate global trm_rtfile)"
-
- rtfile="${rtfile:-"/tmp/trm_runtime.json"}"
- > "${rtfile}"
- rc_procd start_service
+ rc_procd "${trm_script}" stop
}
status()
{
- local key keylist value rtfile="$(uci_get travelmate global trm_rtfile)"
+ local key keylist value rtfile="$(uci_get travelmate global trm_rtfile)"
- rtfile="${rtfile:-"/tmp/trm_runtime.json"}"
- if [ -s "${rtfile}" ]
- then
- printf "%s\n" "::: travelmate runtime information"
- json_load "$(cat "${rtfile}" 2>/dev/null)"
- json_select data
- json_get_keys keylist
- for key in ${keylist}
- do
- json_get_var value "${key}"
- printf " + %-18s : %s\n" "${key}" "${value}"
- done
- else
- printf "%s\n" "::: no travelmate runtime information available"
- fi
+ rtfile="${rtfile:-"/tmp/trm_runtime.json"}"
+ json_load_file "${rtfile}" >/dev/null 2>&1
+ json_select data >/dev/null 2>&1
+ if [ ${?} -eq 0 ]
+ then
+ printf "%s\n" "::: travelmate runtime information"
+ json_get_keys keylist
+ for key in ${keylist}
+ do
+ json_get_var value "${key}"
+ printf " + %-18s : %s\n" "${key}" "${value}"
+ done
+ else
+ printf "%s\n" "::: no travelmate runtime information available"
+ fi
}
service_triggers()
{
- local trigger="$(uci_get travelmate global trm_iface)"
- local delay="$(uci_get travelmate global trm_triggerdelay)"
+ local trigger="$(uci_get travelmate global trm_iface)"
+ local delay="$(uci_get travelmate global trm_triggerdelay)"
- PROCD_RELOAD_DELAY=$((${delay:-2} * 1000))
- procd_add_interface_trigger "interface.*.down" "${trigger}" "${trm_init}" reload
- procd_add_reload_trigger "travelmate"
+ PROCD_RELOAD_DELAY=$((${delay:-2} * 1000))
+ procd_add_interface_trigger "interface.*.down" "${trigger}" "${trm_init}" reload
+ procd_add_reload_trigger "travelmate"
}
#
LC_ALL=C
PATH="/usr/sbin:/usr/bin:/sbin:/bin"
-trm_ver="1.2.1"
+trm_ver="1.3.0"
trm_sysver="unknown"
trm_enabled=0
trm_debug=0
trm_captive=1
+trm_proactive=1
trm_captiveurl="http://captive.apple.com"
trm_minquality=35
trm_maxretry=3
trm_action="${1:-"start"}"
trm_pidfile="/var/run/travelmate.pid"
+# trim leading and trailing whitespace characters
+#
+f_trim()
+{
+ local trim="$1"
+
+ trim="${trim#"${trim%%[![:space:]]*}"}"
+ trim="${trim%"${trim##*[![:space:]]}"}"
+ printf '%s' "${trim}"
+}
+
# load travelmate environment
#
f_envload()
{
- local sys_call sys_desc sys_model sys_ver
+ local sys_call sys_desc sys_model sys_ver
- # get system information
- #
- sys_call="$(ubus -S call system board 2>/dev/null)"
- if [ -n "${sys_call}" ]
- then
- sys_desc="$(printf '%s' "${sys_call}" | jsonfilter -e '@.release.description')"
- sys_model="$(printf '%s' "${sys_call}" | jsonfilter -e '@.model')"
- sys_ver="$(cat /etc/turris-version 2>/dev/null)"
- if [ -n "${sys_ver}" ]
- then
- sys_desc="${sys_desc}/${sys_ver}"
- fi
- trm_sysver="${sys_model}, ${sys_desc}"
- fi
+ # get system information
+ #
+ sys_call="$(ubus -S call system board 2>/dev/null)"
+ if [ -n "${sys_call}" ]
+ then
+ sys_desc="$(printf '%s' "${sys_call}" | jsonfilter -e '@.release.description')"
+ sys_model="$(printf '%s' "${sys_call}" | jsonfilter -e '@.model')"
+ trm_sysver="${sys_model}, ${sys_desc}"
+ fi
- # (re-)initialize global list variables
- #
- trm_devlist=""
- trm_stalist=""
- trm_radiolist=""
+ # (re-)initialize global list variables
+ #
+ unset trm_devlist trm_stalist trm_radiolist trm_active_sta
- # load config and check 'enabled' option
- #
- option_cb()
- {
- local option="${1}"
- local value="${2}"
- eval "${option}=\"${value}\""
- }
- config_load travelmate
+ # load config and check 'enabled' option
+ #
+ option_cb()
+ {
+ local option="${1}"
+ local value="${2}"
+ eval "${option}=\"${value}\""
+ }
+ config_load travelmate
- if [ ${trm_enabled} -ne 1 ]
- then
- f_log "info" "travelmate is currently disabled, please set 'trm_enabled' to '1' to use this service"
- config_load wireless
- config_foreach f_prep wifi-iface
- uci_commit wireless
- ubus call network reload
- exit 0
- fi
+ if [ ${trm_enabled} -ne 1 ]
+ then
+ f_log "info" "travelmate is currently disabled, please set 'trm_enabled' to '1' to use this service"
+ exit 0
+ fi
- # validate input ranges
- #
- if [ ${trm_minquality} -lt 20 ] || [ ${trm_minquality} -gt 80 ]
- then
- trm_minquality=35
- fi
- if [ ${trm_maxretry} -lt 1 ] || [ ${trm_maxretry} -gt 10 ]
- then
- trm_maxretry=3
- fi
- if [ ${trm_maxwait} -lt 20 ] || [ ${trm_maxwait} -gt 40 ] || [ ${trm_maxwait} -ge ${trm_timeout} ]
- then
- trm_maxwait=30
- fi
- if [ ${trm_timeout} -lt 30 ] || [ ${trm_timeout} -gt 300 ] || [ ${trm_timeout} -le ${trm_maxwait} ]
- then
- trm_timeout=60
- fi
+ # validate input ranges
+ #
+ if [ ${trm_minquality} -lt 20 ] || [ ${trm_minquality} -gt 80 ]
+ then
+ trm_minquality=35
+ fi
+ if [ ${trm_maxretry} -lt 1 ] || [ ${trm_maxretry} -gt 10 ]
+ then
+ trm_maxretry=3
+ fi
+ if [ ${trm_maxwait} -lt 20 ] || [ ${trm_maxwait} -gt 40 ] || [ ${trm_maxwait} -ge ${trm_timeout} ]
+ then
+ trm_maxwait=30
+ fi
+ if [ ${trm_timeout} -lt 30 ] || [ ${trm_timeout} -gt 300 ] || [ ${trm_timeout} -le ${trm_maxwait} ]
+ then
+ trm_timeout=60
+ fi
}
# gather radio information & bring down all STA interfaces
#
f_prep()
{
- local eap_rc=0 config="${1}"
- local mode="$(uci_get wireless "${config}" mode)"
- local network="$(uci_get wireless "${config}" network)"
- local radio="$(uci_get wireless "${config}" device)"
- local disabled="$(uci_get wireless "${config}" disabled)"
- local eaptype="$(uci_get wireless "${config}" eap_type)"
+ local eap_rc=0 config="${1}" proactive="${2}"
+ local mode="$(uci_get wireless "${config}" mode)"
+ local network="$(uci_get wireless "${config}" network)"
+ local radio="$(uci_get wireless "${config}" device)"
+ local disabled="$(uci_get wireless "${config}" disabled)"
+ local eaptype="$(uci_get wireless "${config}" eap_type)"
- if ([ -z "${trm_radio}" ] || [ "${trm_radio}" = "${radio}" ]) && \
- [ -z "$(printf "%s" "${trm_radiolist}" | grep -Fo " ${radio}")" ]
- then
- trm_radiolist="${trm_radiolist} ${radio}"
- fi
- if [ "${mode}" = "sta" ] && [ "${network}" = "${trm_iface}" ]
- then
- if [ -z "${disabled}" ] || [ "${disabled}" = "0" ]
- then
- uci_set wireless "${config}" disabled 1
- fi
- if [ -n "${eaptype}" ]
- then
- eap_rc="$("${trm_wpa}" -veap >/dev/null 2>&1; printf "%u" ${?})"
- fi
- if [ -z "${eaptype}" ] || [ ${eap_rc} -eq 0 ]
- then
- trm_stalist="${trm_stalist} ${config}_${radio}"
- fi
- fi
- f_log "debug" "f_prep ::: config: ${config}, mode: ${mode}, network: ${network}, eap_rc: ${eap_rc}, radio: ${radio}, trm_radio: ${trm_radio:-"-"}, disabled: ${disabled}"
+ if [ -z "${trm_radio}" ] && [ -z "$(printf "%s" "${trm_radiolist}" | grep -Fo " ${radio}")" ]
+ then
+ trm_radiolist="$(f_trim "${trm_radiolist} ${radio}")"
+ elif [ -n "${trm_radio}" ] && [ -z "${trm_radiolist}" ]
+ then
+ trm_radiolist="$(f_trim "$(printf "%s" "${trm_radio}" | \
+ awk '{while(match(tolower($0),/radio[0-9]/)){ORS=" ";print substr(tolower($0),RSTART,RLENGTH);$0=substr($0,RSTART+RLENGTH)}}')")"
+ fi
+ if [ "${mode}" = "sta" ] && [ "${network}" = "${trm_iface}" ]
+ then
+ if ([ -z "${disabled}" ] || [ "${disabled}" = "0" ]) && ([ ${proactive} -eq 0 ] || [ "${trm_ifstatus}" != "true" ])
+ then
+ uci_set wireless "${config}" disabled 1
+ elif [ "${disabled}" = "0" ] && [ "${trm_ifstatus}" = "true" ] && [ -z "${trm_active_sta}" ] && [ ${proactive} -eq 1 ]
+ then
+ trm_active_sta="${config}"
+ fi
+ if [ -n "${eaptype}" ]
+ then
+ eap_rc="$("${trm_wpa}" -veap >/dev/null 2>&1; printf "%u" ${?})"
+ fi
+ if [ -z "${eaptype}" ] || [ ${eap_rc} -eq 0 ]
+ then
+ trm_stalist="$(f_trim "${trm_stalist} ${config}_${radio}")"
+ fi
+ fi
+ f_log "debug" "f_prep ::: config: ${config}, mode: ${mode}, network: ${network}, eap_rc: ${eap_rc}, radio: ${radio}, trm_radio: ${trm_radio:-"-"}, trm_active_sta: ${trm_active_sta:-"-"}, proactive: ${proactive}, disabled: ${disabled}"
}
# check interface status
#
f_check()
{
- local ifname radio dev_status config sta_essid sta_bssid result wait=1 mode="${1}" status="${2:-"false"}" IFS=" "
+ local IFS ifname radio dev_status config sta_essid sta_bssid result wait=1 mode="${1}" status="${2:-"false"}"
- trm_ifquality=0
- trm_ifstatus="false"
- if [ "${mode}" != "initial" ]
- then
- ubus call network reload
- fi
- while [ ${wait} -le ${trm_maxwait} ]
- do
- dev_status="$(ubus -S call network.wireless status 2>/dev/null)"
- if [ -n "${dev_status}" ]
- then
- if [ "${mode}" = "dev" ]
- then
- if [ "${trm_ifstatus}" != "${status}" ]
- then
- trm_ifstatus="${status}"
- f_jsnup
- fi
- for radio in ${trm_radiolist}
- do
- result="$(printf "%s" "${dev_status}" | jsonfilter -l1 -e "@.${radio}.up")"
- if [ "${result}" = "true" ] && [ -z "$(printf "%s" "${trm_devlist}" | grep -Fo " ${radio}")" ]
- then
- trm_devlist="${trm_devlist} ${radio}"
- fi
- done
- if [ "${trm_devlist}" = "${trm_radiolist}" ] || [ ${wait} -eq ${trm_maxwait} ]
- then
- ifname="${trm_devlist}"
- break
- else
- trm_devlist=""
- fi
- elif [ "${mode}" = "rev" ]
- then
- wait=$(( ${trm_maxwait} / 3 ))
- sleep ${wait}
- break
- else
- ifname="$(printf "%s" "${dev_status}" | jsonfilter -l1 -e '@.*.interfaces[@.config.mode="sta"].ifname')"
- if [ -n "${ifname}" ]
- then
- trm_ifquality="$(${trm_iwinfo} ${ifname} info 2>/dev/null | awk -F "[\/| ]" '/Link Quality:/{printf "%i\n", (100 / $NF * $(NF-1)) }')"
- if [ ${trm_ifquality} -ge ${trm_minquality} ]
- then
- trm_ifstatus="$(ubus -S call network.interface dump 2>/dev/null | jsonfilter -l1 -e "@.interface[@.device=\"${ifname}\"].up")"
- elif [ "${mode}" = "initial" ] && [ ${trm_ifquality} -lt ${trm_minquality} ]
- then
- trm_ifstatus="${status}"
- sta_essid="$(printf "%s" "${dev_status}" | jsonfilter -l1 -e '@.*.interfaces[@.config.mode="sta"].*.ssid')"
- sta_bssid="$(printf "%s" "${dev_status}" | jsonfilter -l1 -e '@.*.interfaces[@.config.mode="sta"].*.bssid')"
- f_log "info" "uplink '${sta_essid:-"-"}/${sta_bssid:-"-"}' is out of range (${trm_ifquality}/${trm_minquality}), uplink disconnected (${trm_sysver})"
- fi
- fi
- fi
- if [ "${mode}" = "initial" ] || [ "${trm_ifstatus}" = "true" ]
- then
- if ([ "${trm_ifstatus}" != "true" ] && [ "${trm_ifstatus}" != "${status}" ]) || [ ${trm_ifquality} -lt ${trm_minquality} ]
- then
- f_jsnup
- fi
- if [ "${mode}" = "initial" ] && [ "${trm_captive}" -eq 1 ] && [ "${trm_ifstatus}" = "true" ]
- then
- result="$(${trm_fetch} --timeout=$(( ${trm_maxwait} / 3 )) --spider "${trm_captiveurl}" 2>&1 | awk '/^Redirected/{printf "%s" "net cp \047"$NF"\047";exit}/^Download completed/{printf "%s" "net ok";exit}/^Failed|^Connection error/{printf "%s" "net nok";exit}')"
- if [ -n "${result}" ] && ([ -z "${trm_connection}" ] || [ "${result}" != "${trm_connection%/*}" ])
- then
- trm_connection="${result}/${trm_ifquality}"
- f_jsnup
- fi
- fi
- break
- fi
- fi
- wait=$(( wait + 1 ))
- sleep 1
- done
- f_log "debug" "f_check::: mode: ${mode}, name: ${ifname:-"-"}, status: ${trm_ifstatus}, quality: ${trm_ifquality}, connection: ${trm_connection:-"-"}, wait: ${wait}, max_wait: ${trm_maxwait}, min_quality: ${trm_minquality}, captive: ${trm_captive}"
+ trm_ifquality=0
+ if [ "${mode}" = "initial" ]
+ then
+ trm_ifstatus="false"
+ else
+ ubus call network reload
+ fi
+ while [ ${wait} -le ${trm_maxwait} ]
+ do
+ dev_status="$(ubus -S call network.wireless status 2>/dev/null)"
+ if [ -n "${dev_status}" ]
+ then
+ if [ "${mode}" = "dev" ]
+ then
+ if [ "${trm_ifstatus}" != "${status}" ]
+ then
+ trm_ifstatus="${status}"
+ f_jsnup
+ fi
+ for radio in ${trm_radiolist}
+ do
+ result="$(printf "%s" "${dev_status}" | jsonfilter -l1 -e "@.${radio}.up")"
+ if [ "${result}" = "true" ] && [ -z "$(printf "%s" "${trm_devlist}" | grep -Fo " ${radio}")" ]
+ then
+ trm_devlist="$(f_trim "${trm_devlist} ${radio}")"
+ fi
+ done
+ if [ "${trm_devlist}" = "${trm_radiolist}" ] || [ ${wait} -eq ${trm_maxwait} ]
+ then
+ ifname="${trm_devlist}"
+ break
+ else
+ unset trm_devlist
+ fi
+ elif [ "${mode}" = "rev" ]
+ then
+ wait=$(( ${trm_maxwait} / 3 ))
+ sleep ${wait}
+ break
+ else
+ ifname="$(printf "%s" "${dev_status}" | jsonfilter -l1 -e '@.*.interfaces[@.config.mode="sta"].ifname')"
+ if [ -n "${ifname}" ]
+ then
+ trm_ifquality="$(${trm_iwinfo} ${ifname} info 2>/dev/null | awk -F "[\/| ]" '/Link Quality:/{printf "%i\n", (100 / $NF * $(NF-1)) }')"
+ if [ ${trm_ifquality} -ge ${trm_minquality} ]
+ then
+ trm_ifstatus="$(ubus -S call network.interface dump 2>/dev/null | jsonfilter -l1 -e "@.interface[@.device=\"${ifname}\"].up")"
+ elif [ "${mode}" = "initial" ] && [ ${trm_ifquality} -lt ${trm_minquality} ]
+ then
+ trm_ifstatus="${status}"
+ sta_essid="$(printf "%s" "${dev_status}" | jsonfilter -l1 -e '@.*.interfaces[@.config.mode="sta"].*.ssid')"
+ sta_bssid="$(printf "%s" "${dev_status}" | jsonfilter -l1 -e '@.*.interfaces[@.config.mode="sta"].*.bssid')"
+ f_log "info" "uplink '${sta_essid:-"-"}/${sta_bssid:-"-"}' is out of range (${trm_ifquality}/${trm_minquality}), uplink disconnected (${trm_sysver})"
+ fi
+ fi
+ fi
+ if [ "${mode}" = "initial" ] || [ "${trm_ifstatus}" = "true" ]
+ then
+ if ([ "${trm_ifstatus}" != "true" ] && [ "${trm_ifstatus}" != "${status}" ]) || \
+ ([ "${trm_ifstatus}" = "true" ] && [ "${mode}" = "sta" ] && [ -n "${trm_active_sta}" ]) || \
+ [ ${trm_ifquality} -lt ${trm_minquality} ]
+ then
+ f_jsnup
+ fi
+ if [ "${mode}" = "initial" ] && [ "${trm_captive}" -eq 1 ] && [ "${trm_ifstatus}" = "true" ]
+ then
+ result="$(${trm_fetch} --timeout=$(( ${trm_maxwait} / 3 )) --spider "${trm_captiveurl}" 2>&1 | \
+ awk '/^Redirected/{printf "%s" "net cp \047"$NF"\047";exit}/^Download completed/{printf "%s" "net ok";exit}/^Failed|^Connection error/{printf "%s" "net nok";exit}')"
+ if [ -n "${result}" ] && ([ -z "${trm_connection}" ] || [ "${result}" != "${trm_connection%/*}" ])
+ then
+ trm_connection="${result}/${trm_ifquality}"
+ f_jsnup
+ fi
+ fi
+ break
+ fi
+ fi
+ wait=$(( wait + 1 ))
+ sleep 1
+ done
+ f_log "debug" "f_check::: mode: ${mode}, name: ${ifname:-"-"}, status: ${trm_ifstatus}, quality: ${trm_ifquality}, connection: ${trm_connection:-"-"}, wait: ${wait}, max_wait: ${trm_maxwait}, min_quality: ${trm_minquality}, captive: ${trm_captive}"
}
# update runtime information
#
f_jsnup()
{
- local config sta_iface sta_radio sta_essid sta_bssid dev_status status="${trm_ifstatus}" faulty_list faulty_station="${1}"
-
- if [ "${status}" = "true" ]
- then
- status="connected (${trm_connection:-"-"})"
- else
- trm_connection=""
- if [ "${status}" = "false" ]
- then
- status="not connected"
- fi
- fi
+ local config sta_iface sta_radio sta_essid sta_bssid dev_status status="${trm_ifstatus}" faulty_list faulty_station="${1}"
- dev_status="$(ubus -S call network.wireless status 2>/dev/null)"
- if [ -n "${dev_status}" ]
- then
- config="$(printf "%s" "${dev_status}" | jsonfilter -l1 -e '@.*.interfaces[@.config.mode="sta"].section')"
- if [ -n "${config}" ]
- then
- sta_iface="$(uci_get wireless "${config}" network)"
- sta_radio="$(uci_get wireless "${config}" device)"
- sta_essid="$(uci_get wireless "${config}" ssid)"
- sta_bssid="$(uci_get wireless "${config}" bssid)"
- fi
- fi
+ if [ "${status}" = "true" ]
+ then
+ status="connected (${trm_connection:-"-"})"
+ else
+ unset trm_connection
+ status="running / not connected"
+ fi
- json_get_var faulty_list "faulty_stations"
- if [ -n "${faulty_station}" ]
- then
- if [ -z "$(printf "%s" "${faulty_list}" | grep -Fo "${faulty_station}")" ]
- then
- faulty_list="${faulty_list} ${faulty_station}"
- fi
- fi
- json_add_string "travelmate_status" "${status}"
- json_add_string "travelmate_version" "${trm_ver}"
- json_add_string "station_id" "${sta_radio:-"-"}/${sta_essid:-"-"}/${sta_bssid:-"-"}"
- json_add_string "station_interface" "${sta_iface:-"-"}"
- json_add_string "faulty_stations" "${faulty_list}"
- json_add_string "last_rundate" "$(/bin/date "+%d.%m.%Y %H:%M:%S")"
- json_add_string "system" "${trm_sysver}"
- json_dump > "${trm_rtfile}"
+ dev_status="$(ubus -S call network.wireless status 2>/dev/null)"
+ if [ -n "${dev_status}" ]
+ then
+ config="$(printf "%s" "${dev_status}" | jsonfilter -l1 -e '@.*.interfaces[@.config.mode="sta"].section')"
+ if [ -n "${config}" ]
+ then
+ sta_iface="$(uci_get wireless "${config}" network)"
+ sta_radio="$(uci_get wireless "${config}" device)"
+ sta_essid="$(uci_get wireless "${config}" ssid)"
+ sta_bssid="$(uci_get wireless "${config}" bssid)"
+ fi
+ fi
- f_log "debug" "f_jsnup::: config: ${config:-"-"}, status: ${status:-"-"}, sta_iface: ${sta_iface:-"-"}, sta_radio: ${sta_radio:-"-"}, sta_essid: ${sta_essid:-"-"}, sta_bssid: ${sta_bssid:-"-"}, faulty_list: ${faulty_list:-"-"}"
+ json_get_var faulty_list "faulty_stations"
+ if [ -n "${faulty_station}" ]
+ then
+ if [ -z "$(printf "%s" "${faulty_list}" | grep -Fo "${faulty_station}")" ]
+ then
+ faulty_list="$(f_trim "${faulty_list} ${faulty_station}")"
+ fi
+ fi
+ json_add_string "travelmate_status" "${status}"
+ json_add_string "travelmate_version" "${trm_ver}"
+ json_add_string "station_id" "${sta_radio:-"-"}/${sta_essid:-"-"}/${sta_bssid:-"-"}"
+ json_add_string "station_interface" "${sta_iface:-"-"}"
+ json_add_string "faulty_stations" "${faulty_list}"
+ json_add_string "last_rundate" "$(/bin/date "+%d.%m.%Y %H:%M:%S")"
+ json_add_string "system" "${trm_sysver}"
+ json_dump > "${trm_rtfile}"
+ f_log "debug" "f_jsnup::: config: ${config:-"-"}, status: ${status:-"-"}, sta_iface: ${sta_iface:-"-"}, sta_radio: ${sta_radio:-"-"}, sta_essid: ${sta_essid:-"-"}, sta_bssid: ${sta_bssid:-"-"}, faulty_list: ${faulty_list:-"-"}"
}
# write to syslog
#
f_log()
{
- local class="${1}"
- local log_msg="${2}"
+ local class="${1}"
+ local log_msg="${2}"
- if [ -n "${log_msg}" ] && ([ "${class}" != "debug" ] || [ ${trm_debug} -eq 1 ])
- then
- logger -p "${class}" -t "travelmate-[${trm_ver}]" "${log_msg}"
- if [ "${class}" = "err" ]
- then
- trm_ifstatus="error"
- f_jsnup
- logger -p "${class}" -t "travelmate-[${trm_ver}]" "Please check 'https://github.com/openwrt/packages/blob/master/net/travelmate/files/README.md' (${trm_sysver})"
- exit 1
- fi
- fi
+ if [ -n "${log_msg}" ] && ([ "${class}" != "debug" ] || [ ${trm_debug} -eq 1 ])
+ then
+ logger -p "${class}" -t "travelmate-${trm_ver}[${$}]" "${log_msg}"
+ if [ "${class}" = "err" ]
+ then
+ trm_ifstatus="error"
+ f_jsnup
+ logger -p "${class}" -t "travelmate-${trm_ver}[${$}]" "Please check 'https://github.com/openwrt/packages/blob/master/net/travelmate/files/README.md' (${trm_sysver})"
+ exit 1
+ fi
+ fi
}
# main function for connection handling
#
f_main()
{
- local cnt dev config scan scan_list scan_essid scan_bssid scan_quality sta sta_essid sta_bssid sta_radio sta_iface IFS=" " faulty_list
+ local IFS cnt dev config scan scan_list scan_essid scan_bssid scan_quality faulty_list
+ local sta sta_essid sta_bssid sta_radio sta_iface active_essid active_bssid active_radio active_prio
- f_check "initial"
- if [ "${trm_ifstatus}" != "true" ]
- then
- config_load wireless
- config_foreach f_prep wifi-iface
- uci_commit wireless
- f_check "dev" "running"
- if [ -s "${trm_rtfile}" ]
- then
- json_get_var faulty_list "faulty_stations"
- fi
- f_log "debug" "f_main ::: iwinfo: ${trm_iwinfo}, dev_list: ${trm_devlist}, sta_list: ${trm_stalist:0:800}, faulty_list: ${faulty_list:-"-"}"
- for dev in ${trm_devlist}
- do
- if [ -z "$(printf "%s" "${trm_stalist}" | grep -Fo "_${dev}")" ]
- then
- continue
- fi
- cnt=1
- while [ ${trm_maxretry} -eq 0 ] || [ ${cnt} -le ${trm_maxretry} ]
- do
- scan_list="$(${trm_iwinfo} "${dev}" scan 2>/dev/null | awk 'BEGIN{FS="[/ ]"}/Address:/{var1=$NF}/ESSID:/{var2="";for(i=12;i<=NF;i++)if(var2==""){var2=$i}else{var2=var2" "$i}}/Quality:/{printf "%i,%s,%s\n",(100/$NF*$(NF-1)),var1,var2}' | sort -rn | awk '{ORS=",";print $0}')"
- f_log "debug" "f_main ::: dev: ${dev}, scan_list: ${scan_list:0:800}, cnt: ${cnt}, max_cnt: ${trm_maxretry}"
- if [ -n "${scan_list}" ]
- then
- for sta in ${trm_stalist}
- do
- config="${sta%%_*}"
- sta_radio="${sta##*_}"
- sta_essid="$(uci_get wireless "${config}" ssid)"
- sta_bssid="$(uci_get wireless "${config}" bssid)"
- sta_iface="$(uci_get wireless "${config}" network)"
- if [ -n "$(printf "%s" "${faulty_list}" | grep -Fo "${sta_radio}/${sta_essid}/${sta_bssid}")" ]
- then
- continue
- fi
- IFS=","
- for scan in ${scan_list}
- do
- if [ -z "${scan_quality}" ]
- then
- scan_quality="${scan}"
- elif [ -z "${scan_bssid}" ]
- then
- scan_bssid="${scan}"
- elif [ -z "${scan_essid}" ]
- then
- scan_essid="${scan}"
- fi
- if [ -n "${scan_quality}" ] && [ -n "${scan_bssid}" ] && [ -n "${scan_essid}" ]
- then
- if [ ${scan_quality} -ge ${trm_minquality} ]
- then
- if (([ "${scan_essid}" = "\"${sta_essid}\"" ] && ([ -z "${sta_bssid}" ] || [ "${scan_bssid}" = "${sta_bssid}" ])) || \
- ([ "${scan_bssid}" = "${sta_bssid}" ] && [ "${scan_essid}" = "unknown" ])) && [ "${dev}" = "${sta_radio}" ]
- then
- f_log "debug" "f_main ::: scan_quality: ${scan_quality}, scan_bssid: ${scan_bssid}, scan_essid: ${scan_essid}"
- uci_set wireless "${config}" disabled 0
- f_check "sta"
- if [ "${trm_ifstatus}" = "true" ]
- then
- uci_commit wireless
- f_log "info" "interface '${sta_iface}' on '${sta_radio}' connected to uplink '${sta_essid:-"-"}/${sta_bssid:-"-"}' (${trm_sysver})"
- return 0
- elif [ ${cnt} -eq ${trm_maxretry} ]
- then
- uci_set wireless "${config}" disabled 1
- uci_commit wireless
- faulty_station="${sta_radio}/${sta_essid}/${sta_bssid}"
- f_jsnup "${faulty_station}"
- f_log "info" "can't connect to uplink '${sta_essid:-"-"}/${sta_bssid:-"-"}', uplink disabled (${trm_sysver})"
- f_check "rev"
- else
- uci -q revert wireless
- f_jsnup
- f_log "info" "can't connect to uplink '${sta_essid:-"-"}/${sta_bssid:-"-"}' (${trm_sysver})"
- f_check "rev"
- fi
- fi
- fi
- scan_quality=""
- scan_bssid=""
- scan_essid=""
- fi
- done
- IFS=" "
- done
- fi
- cnt=$(( cnt + 1 ))
- sleep $(( ${trm_maxwait} / 6 ))
- done
- done
- if [ ! -s "${trm_rtfile}" ]
- then
- trm_ifstatus="false"
- f_jsnup
- fi
- elif [ ! -s "${trm_rtfile}" ]
- then
- f_jsnup
- fi
+ f_check "initial"
+ if [ "${trm_ifstatus}" != "true" ] || [ ${trm_proactive} -eq 1 ]
+ then
+ config_load wireless
+ config_foreach f_prep wifi-iface ${trm_proactive}
+ if [ "${trm_ifstatus}" = "true" ] && [ ${trm_proactive} -eq 1 ]
+ then
+ json_get_var station_id "station_id"
+ active_radio="${station_id%%/*}"
+ active_essid="${station_id%/*}"
+ active_essid="${active_essid#*/}"
+ active_bssid="${station_id##*/}"
+ f_check "dev" "true"
+ else
+ uci_commit wireless
+ f_check "dev"
+ fi
+ json_get_var faulty_list "faulty_stations"
+ f_log "debug" "f_main ::: iwinfo: ${trm_iwinfo:-"-"}, dev_list: ${trm_devlist:-"-"}, sta_list: ${trm_stalist:0:800}, faulty_list: ${faulty_list:-"-"}"
+ for dev in ${trm_devlist}
+ do
+ f_log "debug" "f_main ::: dev: ${dev}"
+ if [ -z "$(printf "%s" "${trm_stalist}" | grep -Fo "_${dev}")" ]
+ then
+ f_log "debug" "f_main ::: no station on '${dev}' - continue"
+ continue
+ fi
+ cnt=1
+ while [ ${cnt} -le ${trm_maxretry} ]
+ do
+ f_log "debug" "f_main ::: cnt: ${cnt}, max_cnt: ${trm_maxretry}"
+ for sta in ${trm_stalist}
+ do
+ config="${sta%%_*}"
+ sta_radio="${sta##*_}"
+ sta_essid="$(uci_get wireless "${config}" ssid)"
+ sta_bssid="$(uci_get wireless "${config}" bssid)"
+ sta_iface="$(uci_get wireless "${config}" network)"
+ json_get_var faulty_list "faulty_stations"
+ if [ -n "$(printf "%s" "${faulty_list}" | grep -Fo "${sta_radio}/${sta_essid}/${sta_bssid}")" ]
+ then
+ f_log "debug" "f_main ::: faulty station '${sta_radio}/${sta_essid}/${sta_bssid:-"-"}' - continue"
+ continue
+ fi
+ if ([ "${dev}" = "${active_radio}" ] && [ "${sta_essid}" = "${active_essid}" ] && [ "${sta_bssid:-"-"}" = "${active_bssid}" ]) || \
+ ([ "${dev}" != "${active_radio}" ] && [ "${active_prio}" = "true" ])
+ then
+ active_prio="true"
+ f_log "debug" "f_main ::: active station prioritized '${active_radio}/${active_essid}/${active_bssid:-"-"}' - break"
+ break
+ fi
+ if [ -z "${scan_list}" ]
+ then
+ scan_list="$(f_trim "$(${trm_iwinfo} "${dev}" scan 2>/dev/null | \
+ awk 'BEGIN{FS="[/ ]"}/Address:/{var1=$NF}/ESSID:/{var2="";for(i=12;i<=NF;i++) \
+ if(var2==""){var2=$i}else{var2=var2" "$i}}/Quality:/{printf "%i,%s,%s\n",(100/$NF*$(NF-1)),var1,var2}' | \
+ sort -rn | awk '{ORS=",";print $0}')")"
+ f_log "debug" "f_main ::: scan_list: ${scan_list:0:800}"
+ fi
+ IFS=","
+ for scan in ${scan_list}
+ do
+ if [ -z "${scan_quality}" ]
+ then
+ scan_quality="${scan}"
+ elif [ -z "${scan_bssid}" ]
+ then
+ scan_bssid="${scan}"
+ elif [ -z "${scan_essid}" ]
+ then
+ scan_essid="${scan}"
+ fi
+ if [ -n "${scan_quality}" ] && [ -n "${scan_bssid}" ] && [ -n "${scan_essid}" ]
+ then
+ if [ ${scan_quality} -ge ${trm_minquality} ]
+ then
+ if (([ "${scan_essid}" = "\"${sta_essid}\"" ] && ([ -z "${sta_bssid}" ] || [ "${scan_bssid}" = "${sta_bssid}" ])) || \
+ ([ "${scan_bssid}" = "${sta_bssid}" ] && [ "${scan_essid}" = "unknown" ])) && [ "${dev}" = "${sta_radio}" ]
+ then
+ f_log "debug" "f_main ::: scan_quality: ${scan_quality}, sta_bssid: ${sta_bssid}, scan_bssid: ${scan_bssid}, sta_essid: \"${sta_essid}\", scan_essid: ${scan_essid}"
+ if [ "${dev}" = "${active_radio}" ] && [ -n "${trm_active_sta}" ]
+ then
+ uci_set wireless "${trm_active_sta}" disabled 1
+ unset trm_connection
+ fi
+ uci_set wireless "${config}" disabled 0
+ f_check "sta"
+ if [ "${trm_ifstatus}" = "true" ]
+ then
+ uci_commit wireless
+ f_check "initial"
+ f_log "info" "connected to uplink '${sta_radio}/${sta_essid}/${sta_bssid:-"-"}' (${trm_sysver})"
+ return 0
+ elif [ ${cnt} -eq ${trm_maxretry} ]
+ then
+ uci -q revert wireless
+ f_check "rev"
+ if [ "${dev}" = "${active_radio}" ] && [ -n "${trm_active_sta}" ]
+ then
+ f_check "initial"
+ fi
+ faulty_station="${sta_radio}/${sta_essid}/${sta_bssid:-"-"}"
+ f_jsnup "${faulty_station}"
+ f_log "info" "uplink disabled '${sta_radio}/${sta_essid}/${sta_bssid:-"-"}' (${trm_sysver})"
+ break
+ else
+ uci -q revert wireless
+ f_check "rev"
+ f_jsnup
+ f_log "info" "can't connect to uplink '${sta_radio}/${sta_essid}/${sta_bssid:-"-"}' (${trm_sysver})"
+ unset scan_list
+ break
+ fi
+ fi
+ fi
+ unset scan_quality scan_bssid scan_essid
+ fi
+ done
+ unset IFS scan_quality scan_bssid scan_essid
+ done
+ cnt=$(( cnt + 1 ))
+ sleep $(( ${trm_maxwait} / 6 ))
+ done
+ unset scan_list
+ done
+ fi
}
# source required system libraries
#
if [ -r "/lib/functions.sh" ] && [ -r "/usr/share/libubox/jshn.sh" ]
then
- . "/lib/functions.sh"
- . "/usr/share/libubox/jshn.sh"
+ . "/lib/functions.sh"
+ . "/usr/share/libubox/jshn.sh"
else
- f_log "err" "system libraries not found"
+ f_log "err" "system libraries not found"
fi
# initialize json runtime file
#
-if [ ! -s "${trm_rtfile}" ]
+json_load_file "${trm_rtfile}" >/dev/null 2>&1
+json_select data >/dev/null 2>&1
+if [ ${?} -ne 0 ]
then
- json_init
- json_add_object "data"
-else
- json_load_file "${trm_rtfile}"
- json_select data
+ > "${trm_rtfile}"
+ json_init
+ json_add_object "data"
fi
# control travelmate actions
#
while true
do
- if [ -z "${trm_action}" ]
- then
- > "${trm_pidfile}"
- sleep ${trm_timeout}
- else
- printf '%s' "${$}" > "${trm_pidfile}"
- trm_action=""
- fi
- f_envload
- f_main
+ if [ -z "${trm_action}" ]
+ then
+ sleep ${trm_timeout}
+ elif [ "${trm_action}" = "stop" ]
+ then
+ > "${trm_rtfile}"
+ f_log "info" "travelmate instance stopped ::: action: ${trm_action}, pid: $(cat ${trm_pidfile} 2>/dev/null)"
+ exit 0
+ else
+ f_log "info" "travelmate instance started ::: action: ${trm_action}, pid: ${$}"
+ unset trm_action
+ fi
+ f_envload
+ f_main
done
-
PKG_VERSION:=0.2.17
PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_MIRROR_HASH:=d41db898c826077735d48ec1d1ff9ed200d6520f46ae3dbb0a89dfaad49310cd
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_URL:=https://github.com/umurmur/umurmur.git
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=c4f6b1f6d27f7d7a556d30aedee73a675b5a6c48
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/umurmur/umurmur/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=e77b7b6616768f4a1c07442afe49a772692f667b00c23cc85909d4dd0ce206d2
PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
PKG_FIXUP:=autoreconf
PKG_MAINTAINER:=Martin Johansson <martin@fatbob.nu>
include $(TOPDIR)/rules.mk
PKG_NAME:=unbound
-PKG_VERSION:=1.7.3
-PKG_RELEASE:=4
+PKG_VERSION:=1.8.1
+PKG_RELEASE:=3
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.unbound.net/downloads
-PKG_HASH:=c11de115d928a6b48b2165e0214402a7a7da313cd479203a7ce7a8b62cba602d
+PKG_HASH:=c362b3b9c35d1b8c1918da02cdd5528d729206c14c767add89ae95acae363c5d
PKG_BUILD_PARALLEL:=1
PKG_FIXUP:=autoreconf
```
## HOW TO: TLS Over DNS
-Unbound has the ability to be client and server in TLS mode. UCI can configure Unbound to be a client forwarding queries in TLS mode for selected domains. (Server is more complex to setup and needs to be done manually). This may be desired for privacy against stealth market tracking in some cases. Some public DNS servers seem to advertise help in this quest.
+Unbound can use TLS as a client or server. UCI supports Unbound as a forwarding client with TLS. Servers are more complex and need manual configuration. This may be desired for privacy against stealth tracking. Some public DNS servers seem to advertise help in this quest. If your looking for a better understanding, then some information can be found at [Cloudflare](https://www.cloudflare.com/) DNS [1.1.1.1](https://1.1.1.1/). The following is a generic example. You can mix providers by using complete server specificaiton to override the zones common port and certificate domain index.
-Unbound will make TLS connections without validation unless you install the 'ca-bundle' package. Do **not** however forget to maintain the certification bundle. The validation chain otherwise will expire and connections will go dead. Unbound makes and breaks TCP connections per connection. To reduce the lag from TLS handshaking it may help to use more cache memory `resource`, increase record exirations `ttl_min`, enable `aggressive` searching, or manually enable prefetch options.
-
-The following is a generic example. If your looking for a better understanding, then some information can be found at [Cloudflare](https://www.cloudflare.com/) DNS [1.1.1.1](https://1.1.1.1/) for one place.
+**NOTICE:** Unbound requires openssl-1.1.0 to verify host certificates. OpenWrt at present is configured with openssl-1.0.2. Connections will be over TLS, but theoretically, certificates may not be from a trusted source. See report [Unbound #658](https://www.nlnetlabs.nl/bugs-script/show_bug.cgi?id=658). When this is resolved, it will be recommended again to install `ca-bundle`, maintain it, and be sure to include the TLS certificate domain index with the host addresses.
**/etc/config/unbound**:
```
# question: do you want to recurse when TLS fails or not?
option fallback '0'
option tls_index 'dns.example.net'
+ option tls_port '853'
option tls_upstream '1'
option zone_type 'forward_zone'
+ # these servers assume a common TLS port/index
list server '192.0.2.53'
list server '2001:db8::53'
+ # this alternate server is fully specified inline
+ list server '192.0.2.153@443#dns.alternate.example.org'
list zone_name '.'
```
option protocol 'mixed'
Unbound can limit its protocol used for recursive queries.
- ip4_only - limit issues if you do not have native IPv6
+ ip4_only - old fashioned IPv4 upstream and downstream
ip6_only - test environment only; could cauase problems
+ ip6_local - upstream IPv4 only and local network IPv4 and IPv6
ip6_prefer - both IPv4 and IPv6 but try IPv6 first
mixed - both IPv4 and IPv6
default - Unbound built-in defaults
case $ip in
- fe80:*|169.254.*)
+ fe[89ab][0-9a-f]:*|169.254.*)
debug_ip="$ip@$host"
;;
##############################################################################
+valid_subnet_any() {
+ local subnet=$1
+ local validip4=$( valid_subnet4 $subnet )
+ local validip6=$( valid_subnet6 $subnet )
+
+
+ if [ "$validip4" = "ok" -o "$validip6" = "ok" ] ; then
+ echo "ok"
+ else
+ echo "not"
+ fi
+}
+##############################################################################
+
private_subnet() {
case "$1" in
10"."*) echo "ok" ;;
# function from dnsmasq and use DHCPv4 MAC to find IPV6 SLAAC hosts.
#
# External Parameters
-# "hostfile" = where this script will cache host DNS data
+# "conffile" = Unbound configuration left for a restart
+# "pipefile" = DNS entries for unbound-control standard input
# "domain" = text domain suffix
# "bslaac" = boolean, use DHCPv4 MAC to find GA and ULA IPV6 SLAAC
# "bisolt" = boolean, format <host>.<network>.<domain>. so you can isolate
-# "bconf" = boolean, write conf file format rather than pipe records
+# "bconf" = boolean, write conf file with pipe records
#
##############################################################################
sub( /.*\//, "", cdr2 ) ;
+ if ( hst !~ /^[[:alnum:]]([-[:alnum:]]*[[:alnum:]])?$/ ) {
+ # that is not a valid host name (RFC1123)
+ hst = "-" ;
+ }
+
+
if ( bisolt == 1 ) {
# TODO: this might be better with a substituion option,
# or per DHCP pool do-not-DNS option, but its getting busy here.
}
- if ( cls == "ipv4" ) {
- if ( NF == 8 ) {
- # odhcpd errata in field format without host name
- adr = $8 ; hst = "-" ; cdr = adr ;
- sub( /\/.*/, "", adr ) ;
- sub( /.*\//, "", cdr ) ;
- }
+ if ((cls == "ipv4") && (hst != "-") && (cdr == 32) && (NF == 9)) {
+ # IPV4 ; only for provided hostnames and full /32 assignments
+ # NF=9 ; odhcpd errata in field format without host name
+ ptr = adr ; qpr = "" ; split( ptr, ptr, "." ) ;
+ slaac = slaac_eui64( id ) ;
- if (( cdr == 32 ) && ( hst != "-" )) {
- # only for provided hostnames and full /32 assignments
- ptr = adr ; qpr = "" ; split( ptr, ptr, "." ) ;
- slaac = slaac_eui64( id ) ;
+ if ( bconf == 1 ) {
+ x = ( "local-data: \"" fqdn ". 300 IN A " adr "\"" ) ;
+ y = ( "local-data-ptr: \"" adr " 300 " fqdn "\"" ) ;
+ print ( x "\n" y "\n" ) > conffile ;
+ }
- if ( bconf == 1 ) {
- x = ( "local-data: \"" fqdn ". 300 IN A " adr "\"" ) ;
- y = ( "local-data-ptr: \"" adr " 300 " fqdn "\"" ) ;
- print ( x "\n" y "\n" ) > hostfile ;
- }
+ # always create the pipe file
+ for( i=1; i<=4; i++ ) { qpr = ( ptr[i] "." qpr) ; }
+ x = ( fqdn ". 300 IN A " adr ) ;
+ y = ( qpr "in-addr.arpa. 300 IN PTR " fqdn ) ;
+ print ( x "\n" y ) > pipefile ;
- else {
- for( i=1; i<=4; i++ ) { qpr = ( ptr[i] "." qpr) ; }
- x = ( fqdn ". 300 IN A " adr ) ;
- y = ( qpr "in-addr.arpa. 300 IN PTR " fqdn ) ;
- print ( x "\n" y ) > hostfile ;
- }
+ if (( bslaac == 1 ) && ( slaac != 0 )) {
+ # UCI option to discover IPV6 routed SLAAC addresses
+ # NOT TODO - ping probe take too long when added in awk-rule loop
+ cmd = ( "ip -6 --oneline route show dev " net ) ;
- if (( bslaac == 1 ) && ( slaac != 0 )) {
- # UCI option to discover IPV6 routed SLAAC addresses
- # NOT TODO - ping probe take too long when added in awk-rule loop
- cmd = ( "ip -6 --oneline route show dev " net ) ;
+ while ( ( cmd | getline adr ) > 0 ) {
+ if (( substr( adr, 1, 5 ) <= "fdff:" ) \
+ && ( index( adr, "anycast" ) == 0 ) \
+ && ( index( adr, "via" ) == 0 )) {
+ # GA or ULA routed addresses only (not LL or MC)
+ sub( /\/.*/, "", adr ) ;
+ adr = ( adr slaac ) ;
- while ( ( cmd | getline adr ) > 0 ) {
- if (( substr( adr, 1, 5 ) <= "fdff:" ) \
- && ( index( adr, "anycast" ) == 0 ) \
- && ( index( adr, "via" ) == 0 )) {
- # GA or ULA routed addresses only (not LL or MC)
- sub( /\/.*/, "", adr ) ;
- adr = ( adr slaac ) ;
+ if ( split( adr, tmp0, ":" ) > 8 ) {
+ sub( "::", ":", adr ) ;
+ }
- if ( split( adr, tmp0, ":" ) > 8 ) {
- sub( "::", ":", adr ) ;
- }
+ if ( bconf == 1 ) {
+ x = ( "local-data: \"" fqdn ". 300 IN AAAA " adr "\"" ) ;
+ y = ( "local-data-ptr: \"" adr " 300 " fqdn "\"" ) ;
+ print ( x "\n" y "\n" ) > conffile ;
+ }
- if ( bconf == 1 ) {
- x = ( "local-data: \"" fqdn ". 300 IN AAAA " adr "\"" ) ;
- y = ( "local-data-ptr: \"" adr " 300 " fqdn "\"" ) ;
- print ( x "\n" y "\n" ) > hostfile ;
- }
- else {
- qpr = ipv6_ptr( adr ) ;
- x = ( fqdn ". 300 IN AAAA " adr ) ;
- y = ( qpr ". 300 IN PTR " fqdn ) ;
- print ( x "\n" y ) > hostfile ;
- }
- }
+ # always create the pipe file
+ qpr = ipv6_ptr( adr ) ;
+ x = ( fqdn ". 300 IN AAAA " adr ) ;
+ y = ( qpr ". 300 IN PTR " fqdn ) ;
+ print ( x "\n" y ) > pipefile ;
}
+ }
- close( cmd ) ;
- }
+ close( cmd ) ;
}
}
- else {
- if (( cdr == 128 ) && ( hst != "-" )) {
+ else if ((cls != "ipv4") && (hst != "-") && (9 <= NF) && (NF <= 10)) {
+ if (cdr == 128) {
if ( bconf == 1 ) {
x = ( "local-data: \"" fqdn ". 300 IN AAAA " adr "\"" ) ;
y = ( "local-data-ptr: \"" adr " 300 " fqdn "\"" ) ;
- print ( x "\n" y "\n" ) > hostfile ;
+ print ( x "\n" y "\n" ) > conffile ;
}
- else {
- # only for provided hostnames and full /128 assignments
- qpr = ipv6_ptr( adr ) ;
- x = ( fqdn ". 300 IN AAAA " adr ) ;
- y = ( qpr ". 300 IN PTR " fqdn ) ;
- print ( x "\n" y ) > hostfile ;
- }
+
+ # only for provided hostnames and full /128 assignments
+ qpr = ipv6_ptr( adr ) ;
+ x = ( fqdn ". 300 IN AAAA " adr ) ;
+ y = ( qpr ". 300 IN PTR " fqdn ) ;
+ print ( x "\n" y ) > pipefile ;
}
- if (( cdr2 == 128 ) && ( hst != "-" )) {
+ if (cdr2 == 128) {
if ( bconf == 1 ) {
x = ( "local-data: \"" fqdn ". 300 IN AAAA " adr2 "\"" ) ;
y = ( "local-data-ptr: \"" adr2 " 300 " fqdn "\"" ) ;
- print ( x "\n" y "\n" ) > hostfile ;
+ print ( x "\n" y "\n" ) > conffile ;
}
- else {
- # odhcp puts GA and ULA on the same line (position 9 and 10)
- qpr2 = ipv6_ptr( adr2 ) ;
- x = ( fqdn ". 300 IN AAAA " adr2 ) ;
- y = ( qpr2 ". 300 IN PTR " fqdn ) ;
- print ( x "\n" y ) > hostfile ;
- }
+
+ # odhcp puts GA and ULA on the same line (position 9 and 10)
+ qpr2 = ipv6_ptr( adr2 ) ;
+ x = ( fqdn ". 300 IN AAAA " adr2 ) ;
+ y = ( qpr2 ". 300 IN PTR " fqdn ) ;
+ print ( x "\n" y ) > pipefile ;
}
}
+
+ else {
+ # dump non-conforming lease records
+ }
}
##############################################################################
##############################################################################
odhcpd_zonedata() {
- local longconf dateconf
- local dns_ls_add=$UB_VARDIR/dhcp_dns.add
- local dns_ls_del=$UB_VARDIR/dhcp_dns.del
- local dhcp_ls_new=$UB_VARDIR/dhcp_lease.new
- local dhcp_ls_old=$UB_VARDIR/dhcp_lease.old
- local dhcp_ls_add=$UB_VARDIR/dhcp_lease.add
- local dhcp_ls_del=$UB_VARDIR/dhcp_lease.del
-
local dhcp_link=$( uci_get unbound.@unbound[0].dhcp_link )
local dhcp4_slaac6=$( uci_get unbound.@unbound[0].dhcp4_slaac6 )
local dhcp_domain=$( uci_get unbound.@unbound[0].domain )
if [ -f "$UB_TOTAL_CONF" -a -f "$dhcp_origin" \
-a "$dhcp_link" = "odhcpd" -a -n "$dhcp_domain" ] ; then
+ local longconf dateconf
+ local dns_ls_add=$UB_VARDIR/dhcp_dns.add
+ local dns_ls_del=$UB_VARDIR/dhcp_dns.del
+ local dns_ls_new=$UB_VARDIR/dhcp_dns.new
+ local dns_ls_old=$UB_VARDIR/dhcp_dns.old
+ local dhcp_ls_new=$UB_VARDIR/dhcp_lease.new
+
# Capture the lease file which could be changing often
sort $dhcp_origin > $dhcp_ls_new
- if [ ! -f $UB_DHCP_CONF -o ! -f $dhcp_ls_old ] ; then
- longconf=2
+ if [ ! -f $UB_DHCP_CONF -o ! -f $dns_ls_old ] ; then
+ # no old files laying around
+ longconf=freshstart
else
+ # incremental at high load or full refresh about each 5 minutes
dateconf=$(( $( date +%s ) - $( date -r $UB_DHCP_CONF +%s ) ))
- if [ $dateconf > 150 ] ; then
- longconf=1
+ if [ $dateconf -gt 300 ] ; then
+ longconf=longtime
else
- longconf=0
+ longconf=increment
fi
fi
- if [ $longconf -gt 0 ] ; then
- # Go through the messy business of coding up A, AAAA, and PTR records
- # This static conf will be available if Unbound restarts asynchronously
- awk -v hostfile=$UB_DHCP_CONF -v domain=$dhcp_domain \
- -v bslaac=$dhcp4_slaac6 -v bisolt=0 -v bconf=1 \
+ case $longconf in
+ freshstart)
+ awk -v conffile=$UB_DHCP_CONF -v pipefile=$dns_ls_new \
+ -v domain=$dhcp_domain -v bslaac=$dhcp4_slaac6 \
+ -v bisolt=0 -v bconf=1 \
-f /usr/lib/unbound/odhcpd.awk $dhcp_ls_new
- fi
-
- if [ $longconf -lt 2 ] ; then
- # Deleting and adding all records into Unbound can be a burden in a
- # high density environment. Use unbound-control incrementally.
- sort $dhcp_ls_old $dhcp_ls_new $dhcp_ls_new | uniq -u > $dhcp_ls_del
- awk -v hostfile=$dns_ls_del -v domain=$dhcp_domain \
- -v bslaac=$dhcp4_slaac6 -v bisolt=0 -v bconf=0 \
- -f /usr/lib/unbound/odhcpd.awk $dhcp_ls_del
+ cp $dns_ls_new $dns_ls_add
+ cp $dns_ls_new $dns_ls_old
+ ;;
- sort $dhcp_ls_new $dhcp_ls_old $dhcp_ls_old | uniq -u > $dhcp_ls_add
- awk -v hostfile=$dns_ls_add -v domain=$dhcp_domain \
- -v bslaac=$dhcp4_slaac6 -v bisolt=0 -v bconf=0 \
- -f /usr/lib/unbound/odhcpd.awk $dhcp_ls_add
+ longtime)
+ awk -v conffile=$UB_DHCP_CONF -v pipefile=$dns_ls_new \
+ -v domain=$dhcp_domain -v bslaac=$dhcp4_slaac6 \
+ -v bisolt=0 -v bconf=1 \
+ -f /usr/lib/unbound/odhcpd.awk $dhcp_ls_new
- else
- awk -v hostfile=$dns_ls_add -v domain=$dhcp_domain \
- -v bslaac=$dhcp4_slaac6 -v bisolt=0 -v bconf=0 \
+ awk '{ print $1 }' $dns_ls_old | sort | uniq > $dns_ls_del
+ cp $dns_ls_new $dns_ls_add
+ cp $dns_ls_new $dns_ls_old
+ ;;
+
+ *)
+ # incremental add and prepare the old list for delete later
+ # unbound-control can be slow so high DHCP rates cannot run a full list
+ awk -v conffile=$UB_DHCP_CONF -v pipefile=$dns_ls_new \
+ -v domain=$dhcp_domain -v bslaac=$dhcp4_slaac6 \
+ -v bisolt=0 -v bconf=0 \
-f /usr/lib/unbound/odhcpd.awk $dhcp_ls_new
- fi
+
+ sort $dns_ls_new $dns_ls_old $dns_ls_old | uniq -u > $dns_ls_add
+ sort $dns_ls_new $dns_ls_old | uniq > $dns_ls_old
+ ;;
+ esac
if [ -f "$dns_ls_del" ] ; then
# prepare next round
- mv $dhcp_ls_new $dhcp_ls_old
- rm -f $dns_ls_del $dns_ls_add $dhcp_ls_del $dhcp_ls_add
+ rm -f $dns_ls_new $dns_ls_del $dns_ls_add $dhcp_ls_new
fi
}
if [ ! -f "$UB_TOTAL_CONF" -o -n "$UB_BOOT" ] ; then
# Unbound is can be a bit heavy, so wait some on first start but any
# interface coming up affects the trigger and delay so guarantee start
- procd_add_raw_trigger "interface.*.up" 5000 /etc/init.d/unbound restart
+ procd_add_raw_trigger "interface.*.up" 3000 /etc/init.d/unbound restart
elif [ -n "$triggers" ] ; then
- PROCD_RELOAD_DELAY=2000
procd_add_reload_trigger "unbound" "dhcp"
done
else
- PROCD_RELOAD_DELAY=2000
procd_add_reload_trigger "unbound" "dhcp"
fi
}
bundle_all_networks() {
local cfg="$1"
- local ifname ifdashname
+ local ifname ifdashname validip
local subnet subnets subnets4 subnets6
- local validip4 validip6
network_get_subnets subnets4 "$cfg"
network_get_subnets6 subnets6 "$cfg"
if [ -n "$subnets" ] ; then
for subnet in $subnets ; do
- validip4=$( valid_subnet4 $subnet )
- validip6=$( valid_subnet6 $subnet )
+ validip=$( valid_subnet_any $subnet )
- if [ "$validip4" = "ok" -o "$validip6" = "ok" ] ; then
+ if [ "$validip" = "ok" ] ; then
UB_LIST_NETW_ALL="$UB_LIST_NETW_ALL $ifdashname@$subnet"
fi
done
unbound_zone() {
local cfg=$1
+ local servers_ip=""
+ local servers_host=""
local zone_sym zone_name zone_type zone_enabled zone_file
- local tls_upstream fallback proivder
+ local tls_upstream fallback
local server port tls_port tls_index tls_suffix url_dir
if [ ! -f "$UB_ZONE_CONF" ] ; then
case $zone_type in
auth_zone)
- if [ -n "$UB_LIST_ZONE_NAMES" \
+ if [ "$UB_B_NTP_BOOT" -eq 0 -a -n "$UB_LIST_ZONE_NAMES" \
-a \( -n "$url_dir" -o -n "$UB_LIST_ZONE_SERVERS" \) ] ; then
+ # Note AXFR may have large downloads. If NTP restart is configured,
+ # then this can cause procd to force a process kill.
for zone_name in $UB_LIST_ZONE_NAMES ; do
if [ "$zone_name" = "." ] ; then
zone_sym=.
if [ -n "$UB_LIST_ZONE_NAMES" -a -n "$UB_LIST_ZONE_SERVERS" ] ; then
+ for server in $UB_LIST_ZONE_SERVERS ; do
+ if [ "$( valid_subnet_any $server )" = "not" ] ; then
+ case $server in
+ *@[0-9]*)
+ # unique Unbound option for server host name
+ servers_host="$servers_host $server"
+ ;;
+
+ *)
+ if [ "$tls_upstream" = "yes" ] ; then
+ servers_host="$servers_host $server${tls_port:+@${tls_port}}"
+ else
+ servers_host="$servers_host $server${port:+@${port}}"
+ fi
+ esac
+
+ else
+ case $server in
+ *[0-9]@[0-9]*)
+ # unique Unbound option for server address
+ servers_ip="$servers_ip $server"
+ ;;
+
+ *)
+ if [ "$tls_upstream" = "yes" ] ; then
+ servers_ip="$servers_ip $server$tls_suffix"
+ else
+ servers_ip="$servers_ip $server${port:+@${port}}"
+ fi
+ esac
+ fi
+ done
+
+
for zonename in $UB_LIST_ZONE_NAMES ; do
{
# generate a forward-zone with or without tls
echo "forward-zone:"
echo " name: $zonename"
- for server in $UB_LIST_ZONE_SERVERS ; do
- if [ "$tls_upstream" = "yes" ] ; then
- echo " forward-addr: $server${tls_suffix}"
- else
- echo " forward-addr: $server${port:+@${port}}"
- fi
+ for server in $servers_host ; do
+ echo " forward-host: $server"
+ done
+ for server in $servers_ip ; do
+ echo " forward-addr: $server"
done
echo " forward-first: $fallback"
echo " forward-tls-upstream: $tls_upstream"
echo " port: $UB_N_RX_PORT"
echo " outgoing-port-permit: 10240-65535"
echo " interface: 0.0.0.0"
- echo " interface: ::0"
echo " outgoing-interface: 0.0.0.0"
echo " do-ip4: yes"
echo " do-ip6: no"
echo " edns-buffer-size: $UB_N_EDNS_SIZE"
echo " port: $UB_N_RX_PORT"
echo " outgoing-port-permit: 10240-65535"
- echo " interface: 0.0.0.0"
echo " interface: ::0"
echo " outgoing-interface: ::0"
echo " do-ip4: no"
} >> $UB_CORE_CONF
;;
+ ip6_local)
+ {
+ echo " edns-buffer-size: $UB_N_EDNS_SIZE"
+ echo " port: $UB_N_RX_PORT"
+ echo " outgoing-port-permit: 10240-65535"
+ echo " interface: 0.0.0.0"
+ echo " interface: ::0"
+ echo " outgoing-interface: 0.0.0.0"
+ echo " do-ip4: yes"
+ echo " do-ip6: yes"
+ echo
+ } >> $UB_CORE_CONF
+ ;;
+
ip6_prefer)
{
echo " edns-buffer-size: $UB_N_EDNS_SIZE"
esac
- {
- # Other harding and options for an embedded router
- echo " harden-short-bufsize: yes"
- echo " harden-large-queries: yes"
- echo " harden-glue: yes"
- echo " harden-below-nxdomain: no"
- echo " harden-referral-path: no"
- echo " use-caps-for-id: no"
- echo
- } >> $UB_CORE_CONF
-
-
case "$UB_D_RESOURCE" in
# Tiny - Unbound's recommended cheap hardware config
tiny) rt_mem=1 ; rt_conn=2 ; rt_buff=1 ;;
# Small - Half RRCACHE and open ports
small) rt_mem=8 ; rt_conn=10 ; rt_buff=2 ;;
# Medium - Nearly default but with some added balancintg
- medium) rt_mem=16 ; rt_conn=20 ; rt_buff=4 ;;
+ medium) rt_mem=16 ; rt_conn=15 ; rt_buff=4 ;;
# Large - Double medium
- large) rt_mem=32 ; rt_conn=40 ; rt_buff=4 ;;
+ large) rt_mem=32 ; rt_conn=20 ; rt_buff=4 ;;
# Whatever unbound does
*) rt_mem=0 ; rt_conn=0 ;;
esac
if [ "$rt_mem" -gt 0 ] ; then
{
+ # Other harding and options for an embedded router
+ echo " harden-short-bufsize: yes"
+ echo " harden-large-queries: yes"
+ echo " harden-glue: yes"
+ echo " use-caps-for-id: no"
+ echo
# Set memory sizing parameters
echo " msg-buffer-size: $(($rt_buff*8192))"
- echo " outgoing-range: $(($rt_conn*64))"
- echo " num-queries-per-thread: $(($rt_conn*32))"
+ echo " outgoing-range: $(($rt_conn*32))"
+ echo " num-queries-per-thread: $(($rt_conn*16))"
echo " outgoing-num-tcp: $(($rt_conn))"
echo " incoming-num-tcp: $(($rt_conn))"
echo " rrset-cache-size: $(($rt_mem*256))k"
+++ /dev/null
-diff --git a/doc/example.conf.in b/doc/example.conf.in
-index be83bda..7317b23 100644
---- a/doc/example.conf.in
-+++ b/doc/example.conf.in
-@@ -15,6 +15,76 @@ server:
- # verbosity number, 0 is least verbose. 1 is default.
- verbosity: 1
-
-+ ############################################################################
-+ # MEMORY CONTROL EXAMPLE
-+ # In the example config settings below memory usage is reduced. Some ser-
-+ # vice levels are lower, notable very large data and a high TCP load are
-+ # no longer supported ... are exceptional for the DNS.
-+ # (http://unbound.net/documentation/unbound.conf.html)
-+ ############################################################################
-+
-+ # Self jail Unbound with user "unbound" to /var/lib/unbound
-+ # The script /etc/init.d/unbound will setup the location
-+ username: "unbound"
-+ directory: "/var/lib/unbound"
-+ chroot: "/var/lib/unbound"
-+
-+ # The pid file is created before privleges drop so no concern
-+ pidfile: "/var/run/unbound.pid"
-+
-+ # no threads and no memory slabs for threads
-+ num-threads: 1
-+ msg-cache-slabs: 1
-+ rrset-cache-slabs: 1
-+ infra-cache-slabs: 1
-+ key-cache-slabs: 1
-+
-+ # don't be picky about interfaces but consider your firewall
-+ interface: 0.0.0.0
-+ interface: ::0
-+ access-control: 0.0.0.0/0 allow
-+ access-control: ::0/0 allow
-+
-+ # this limits TCP service but uses less buffers
-+ outgoing-num-tcp: 1
-+ incoming-num-tcp: 1
-+
-+ # use somewhat higher port numbers versus possible NAT issue
-+ outgoing-port-permit: "10240-65335"
-+
-+ # uses less memory but less performance
-+ outgoing-range: 60
-+ num-queries-per-thread: 30
-+
-+ # exclude large responses
-+ msg-buffer-size: 8192
-+
-+ # tiny memory cache
-+ infra-cache-numhosts: 200
-+ msg-cache-size: 100k
-+ rrset-cache-size: 100k
-+ key-cache-size: 100k
-+ neg-cache-size: 10k
-+
-+ # gentle on recursion
-+ target-fetch-policy: "2 1 0 0 0 0"
-+ harden-large-queries: yes
-+ harden-short-bufsize: yes
-+
-+ # DNSSEC enable by removing comments on "module-config:" and "auto-trust-
-+ # -anchor-file:" The init script will copy root key to /var/lib/unbound.
-+ # See package documentation for crontab entry to copy RFC5011 results back.
-+ #module-config: "validator iterator"
-+ #auto-trust-anchor-file: "/var/lib/unbound/root.key"
-+
-+ # DNSSEC needs real time to validate signatures. If your device does not
-+ # have power off clock (reboot), then you may need this work around.
-+ #domain-insecure: "pool.ntp.org"
-+
-+ ############################################################################
-+ # Resume Stock example.conf.in
-+ ############################################################################
-+
- # print statistics to the log (for every thread) every N seconds.
- # Set to "" or 0 to disable. Default is disabled.
- # statistics-interval: 0
--- /dev/null
+OpenWrt (modification):
+Patch the default configuration file with the tiny memory
+configuration example from Unbound documentation. This is the best
+starting point for embedded routers if one is not going to use UCI.
+
+Index: doc/example.conf.in
+===================================================================
+--- a/doc/example.conf.in
++++ b/doc/example.conf.in
+@@ -15,6 +15,76 @@ server:
+ # verbosity number, 0 is least verbose. 1 is default.
+ verbosity: 1
+
++ ############################################################################
++ # MEMORY CONTROL EXAMPLE
++ # In the example config settings below memory usage is reduced. Some ser-
++ # vice levels are lower, notable very large data and a high TCP load are
++ # no longer supported ... are exceptional for the DNS.
++ # (http://unbound.net/documentation/unbound.conf.html)
++ ############################################################################
++
++ # Self jail Unbound with user "unbound" to /var/lib/unbound
++ # The script /etc/init.d/unbound will setup the location
++ username: "unbound"
++ directory: "/var/lib/unbound"
++ chroot: "/var/lib/unbound"
++
++ # The pid file is created before privleges drop so no concern
++ pidfile: "/var/run/unbound.pid"
++
++ # no threads and no memory slabs for threads
++ num-threads: 1
++ msg-cache-slabs: 1
++ rrset-cache-slabs: 1
++ infra-cache-slabs: 1
++ key-cache-slabs: 1
++
++ # don't be picky about interfaces but consider your firewall
++ interface: 0.0.0.0
++ interface: ::0
++ access-control: 0.0.0.0/0 allow
++ access-control: ::0/0 allow
++
++ # this limits TCP service but uses less buffers
++ outgoing-num-tcp: 1
++ incoming-num-tcp: 1
++
++ # use somewhat higher port numbers versus possible NAT issue
++ outgoing-port-permit: "10240-65335"
++
++ # uses less memory but less performance
++ outgoing-range: 60
++ num-queries-per-thread: 30
++
++ # exclude large responses
++ msg-buffer-size: 8192
++
++ # tiny memory cache
++ infra-cache-numhosts: 200
++ msg-cache-size: 100k
++ rrset-cache-size: 100k
++ key-cache-size: 100k
++ neg-cache-size: 10k
++
++ # gentle on recursion
++ target-fetch-policy: "2 1 0 0 0 0"
++ harden-large-queries: yes
++ harden-short-bufsize: yes
++
++ # DNSSEC enable by removing comments on "module-config:" and "auto-trust-
++ # -anchor-file:" The init script will copy root key to /var/lib/unbound.
++ # See package documentation for crontab entry to copy RFC5011 results back.
++ #module-config: "validator iterator"
++ #auto-trust-anchor-file: "/var/lib/unbound/root.key"
++
++ # DNSSEC needs real time to validate signatures. If your device does not
++ # have power off clock (reboot), then you may need this work around.
++ #domain-insecure: "pool.ntp.org"
++
++ ############################################################################
++ # Resume Stock example.conf.in
++ ############################################################################
++
+ # print statistics to the log (for every thread) every N seconds.
+ # Set to "" or 0 to disable. Default is disabled.
+ # statistics-interval: 0
--- /dev/null
+diff --git a/daemon/daemon.c b/daemon/daemon.c
+index 4c3d5f1..50f5060 100644
+--- a/daemon/daemon.c
++++ b/daemon/daemon.c
+@@ -769,7 +769,7 @@ daemon_delete(struct daemon* daemon)
+ # endif
+ # ifdef HAVE_OPENSSL_CONFIG
+ EVP_cleanup();
+-# if OPENSSL_VERSION_NUMBER < 0x10100000
++# if (OPENSSL_VERSION_NUMBER < 0x10100000) || !defined(OPENSSL_NO_ENGINE)
+ ENGINE_cleanup();
+ # endif
+ CONF_modules_free();
+diff --git a/util/net_help.c b/util/net_help.c
+index 91368c8..a932010 100644
+--- a/util/net_help.c
++++ b/util/net_help.c
+@@ -1006,10 +1006,10 @@ void* outgoing_ssl_fd(void* sslctx, int fd)
+ static lock_basic_type *ub_openssl_locks = NULL;
+
+ /** callback that gets thread id for openssl */
+-static unsigned long
+-ub_crypto_id_cb(void)
++static void
++ub_crypto_id_cb(CRYPTO_THREADID *id)
+ {
+- return (unsigned long)log_thread_get();
++ CRYPTO_THREADID_set_numeric(id, (unsigned long)log_thread_get());
+ }
+
+ static void
+@@ -1035,7 +1035,7 @@ int ub_openssl_lock_init(void)
+ for(i=0; i<CRYPTO_num_locks(); i++) {
+ lock_basic_init(&ub_openssl_locks[i]);
+ }
+- CRYPTO_set_id_callback(&ub_crypto_id_cb);
++ CRYPTO_THREADID_set_callback(&ub_crypto_id_cb);
+ CRYPTO_set_locking_callback(&ub_crypto_lock_cb);
+ #endif /* OPENSSL_THREADS */
+ return 1;
+@@ -1047,7 +1047,7 @@ void ub_openssl_lock_delete(void)
+ int i;
+ if(!ub_openssl_locks)
+ return;
+- CRYPTO_set_id_callback(NULL);
++ CRYPTO_THREADID_set_callback(NULL);
+ CRYPTO_set_locking_callback(NULL);
+ for(i=0; i<CRYPTO_num_locks(); i++) {
+ lock_basic_destroy(&ub_openssl_locks[i]);
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
-PKG_FLAGS:=nonshared
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
PKG_NAME:=uwsgi-cgi
PKG_VERSION:=2.0.17.1
-PKG_RELEASE:=4
+PKG_RELEASE:=5
PKG_SOURCE_URL=https://codeload.github.com/unbit/uwsgi/tar.gz/$(PKG_VERSION)?
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
strict = true
socket = /var/run/uwsgi.sock
cgi-mode = true
-cgi = /www/cgi-bin/luci
+cgi = /www/
chdir = /usr/lib/lua/luci/
master = true
buffer-size = 10000
PKG_NAME:=wavemon
PKG_VERSION:=0.8.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_MIRROR_HASH:=412ced9e59677532cde388cf329ccbe8c3dbdd505855f1ef298af9894fd6561c
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_URL:=https://github.com/uoaerg/wavemon.git
-PKG_SOURCE_VERSION:=v$(PKG_VERSION)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/uoaerg/wavemon/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=4199e2ad11a036f4289f5ad42a8b0fe518f2b5ff77447f4c366dbcf3f23e91d5
PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=COPYING
PKG_MAINTAINER:=Jonathan McCrohan <jmccrohan@gmail.com>
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
PKG_NAME:=wifidog
PKG_VERSION:=1.3.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_LICENSE:=GPL-2.0
--- /dev/null
+diff --git a/configure.in b/configure.in
+index bf5463a..43ec27c 100644
+--- a/configure.in
++++ b/configure.in
+@@ -96,8 +96,8 @@ if test "x$enable_cyassl" = xyes; then
+ # the use the new naming scheme below as cyassl/ssl.h is not available for
+ # AC_SEARCH_LIBS
+ AC_CHECK_HEADERS(cyassl/ssl.h)
+- AC_SEARCH_LIBS([CyaTLSv1_client_method], [cyassl], [], [
+- AC_SEARCH_LIBS([wolfTLSv1_client_method], [wolfssl], [], [
++ AC_SEARCH_LIBS([CyaSSLv23_client_method], [cyassl], [], [
++ AC_SEARCH_LIBS([wolfSSLv23_client_method], [wolfssl], [], [
+ AC_MSG_ERROR([unable to locate SSL lib: either wolfSSL or CyaSSL needed.])
+ ])
+ ])
+@@ -110,7 +110,7 @@ if test "x$enable_cyassl" = xyes; then
+ ]], [[
+ CYASSL_CTX *ctx;
+ CyaSSL_Init();
+- ctx = CyaSSL_CTX_new(CyaTLSv1_client_method());
++ ctx = CyaSSL_CTX_new(CyaSSLv23_client_method());
+ CyaSSL_CTX_UseSNI(ctx, CYASSL_SNI_HOST_NAME, "wifidog.org", 11);
+ ]])], [enabled_sni=yes], [enabled_sni=no])
+
+diff --git a/src/simple_http.c b/src/simple_http.c
+index f0e27ee..7271021 100644
+--- a/src/simple_http.c
++++ b/src/simple_http.c
+@@ -162,8 +162,7 @@ get_cyassl_ctx(const char *hostname)
+ if (NULL == cyassl_ctx) {
+ CyaSSL_Init();
+ /* Create the CYASSL_CTX */
+- /* Allow TLSv1.0 up to TLSv1.2 */
+- if ((cyassl_ctx = CyaSSL_CTX_new(CyaTLSv1_client_method())) == NULL) {
++ if ((cyassl_ctx = CyaSSL_CTX_new(CyaSSLv23_client_method())) == NULL) {
+ debug(LOG_ERR, "Could not create CYASSL context.");
+ UNLOCK_CYASSL_CTX();
+ return NULL;
include $(TOPDIR)/rules.mk
PKG_NAME:=wsdd2
-PKG_RELEASE:=1
+PKG_RELEASE:=3
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/Andy2244/wsdd2.git
procd_set_param file /var/etc/smb.conf
procd_close_instance
}
+
+service_triggers() {
+ PROCD_RELOAD_DELAY=3000
+ procd_add_reload_trigger "dhcp" "system" "samba4"
+}
---- a/wsd.c 2018-07-20
-+++ b/wsd.c 2018-07-20
-@@ -97,12 +97,17 @@ static void uuid_endpoint(char *uuid, si
+--- a/wsd.c 2018-07-24
++++ b/wsd.c 2018-09-10
+@@ -96,13 +96,19 @@ static void uuid_endpoint(char *uuid, si
+ {
FILE *fp = fopen("/etc/machine-id", "r");
int c, i = 0;
-
++
+ if (!fp) {
-+ DEBUG(0, W, "Can't open '/etc/machine-id', trying '/proc/sys/kernel/random/boot_id'");
+ fp = fopen("/proc/sys/kernel/random/boot_id", "r");
+ }
-+
- if (!fp)
+
+- if (!fp)
++ if (!fp) {
++ DEBUG(0, W, "Can't open required '/etc/machine-id' or '/proc/sys/kernel/random/boot_id'");
return;
++ }
while (i < 36 && (c = getc(fp)) != EOF &&
- (isdigit(c) || (islower(c) && isxdigit(c)))) {
PKG_NAME:=xtables-addons
PKG_VERSION:=2.14
-PKG_RELEASE:=4
+PKG_RELEASE:=5
PKG_HASH:=d215a9a8b8e66aae04b982fa2e1228e8a71e7dfe42320df99e34e5000cbdf152
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+#endif /* _NETFILTER_MIME_H */
--- /dev/null
+++ b/extensions/rtsp/nf_conntrack_rtsp.c
-@@ -0,0 +1,732 @@
+@@ -0,0 +1,761 @@
+/*
+ * RTSP extension for IP connection tracking
+ * (C) 2003 by Tom Marshall <tmarshall at real.com>
+ * 2018-04-18: Hans Dedecker <dedeckeh at gmail.com>
+ * - update RTP expected connection source IP based on SOURCE
+ * in the SETUP reply message
++ * 2018-08-03: Alin Nastac <alin.nastac at gmail.com>
++ * Hans Dedecker <dedeckeh at gmail.com>
++ * - parse non-standard destination=address:port format
+ *
+ * based on ip_conntrack_irc.c
+ *
+#include <net/netfilter/nf_conntrack.h>
+#include <net/netfilter/nf_conntrack_expect.h>
+#include <net/netfilter/nf_conntrack_helper.h>
++#include <net/netfilter/nf_conntrack_zones.h>
+#include "nf_conntrack_rtsp.h"
+
+#define NF_NEED_STRNCASECMP
+ -1, NULL))
+ pr_debug("source found : %pI4\n",
+ &prtspexp->srvaddr.ip);
++ } else if (nextfieldoff - off > 12 && strncmp(ptran+off, "destination=", 12) == 0) {
++ const char *psep;
++ u_int16_t port;
++
++ off += 12;
++
++ if (in4_pton(ptran+off, nextfieldoff - off - 1, (u8 *)&prtspexp->cltaddr.in, -1, NULL)) {
++ pr_debug("destination found : %pI4\n", &prtspexp->cltaddr.ip);
++
++ /*
++ * Some RTSP clients(mostly STBs) use non-standard destination parameters:
++ * destination=address:port
++ */
++ psep = memchr(ptran+off, ':', nextfieldoff-off);
++ if (psep != NULL && nf_strtou16(psep + 1, &port)) {
++ if (prtspexp->loport != 0 && prtspexp->loport != port)
++ pr_debug("multiple ports found, port %hu ignored\n", port);
++ else {
++ pr_debug("lo port found : %hu\n", port);
++ prtspexp->loport = prtspexp->hiport = port;
++ }
++ }
++ }
+ }
+
+ /*
+ ret = help_in(skb, rb_ptr, datalen, ct, ctinfo);
+#endif
+ break;
++ default:
++ break;
+ }
+
+ spin_unlock_bh(&rtsp_buffer_lock);
+module_exit(fini);
--- /dev/null
+++ b/extensions/rtsp/nf_conntrack_rtsp.h
-@@ -0,0 +1,73 @@
+@@ -0,0 +1,74 @@
+/*
+ * RTSP extension for IP connection tracking.
+ * (C) 2003 by Tom Marshall <tmarshall at real.com>
+ u_int16_t loport; /* Port that was requested, low or first */
+ u_int16_t hiport; /* Port that was requested, high or second */
+ union nf_inet_addr srvaddr; /* src address in SETUP reply */
++ union nf_inet_addr cltaddr; /* destination address */
+#if 0
+ uint method; /* RTSP method */
+ uint cseq; /* CSeq from request */
+#endif /* _IP_CONNTRACK_RTSP_H */
--- /dev/null
+++ b/extensions/rtsp/nf_nat_rtsp.c
-@@ -0,0 +1,617 @@
+@@ -0,0 +1,634 @@
+/*
+ * RTSP extension for TCP NAT alteration
+ * (C) 2003 by Tom Marshall <tmarshall at real.com>
+ struct nf_conntrack_tuple *rtp_t;
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
-+ char szextaddr[INET6_ADDRSTRLEN];
++ char szextaddr[INET6_ADDRSTRLEN + 16];
+#else
-+ char szextaddr[INET_ADDRSTRLEN];
++ char szextaddr[INET_ADDRSTRLEN + 16];
+#endif
+ uint extaddrlen;
+ int is_stun;
+
+ pfieldend = memchr(ptran+off, ';', nextparamoff-off);
+ nextfieldoff = (pfieldend == NULL) ? nextparamoff : pfieldend-ptran+1;
++ SKIP_WSPACE(ptran, nextfieldoff, off);
+
-+ if (dstact != DSTACT_NONE && strncmp(ptran+off, "destination=", 12) == 0) {
++ if (dstact != DSTACT_NONE && nextfieldoff - off > 12 && strncmp(ptran+off, "destination=", 12) == 0) {
+ if (strncmp(ptran+off+12, szextaddr, extaddrlen) == 0)
+ is_stun = 1;
+
+ uint dstreplen = 0;
+ diff = dstlen;
+ if (dstact == DSTACT_AUTO && !is_stun) {
-+ pr_debug("RTSP: replace dst addr\n");
++ const char* psep = memchr(ptran+off, ':', dstlen);
++ u_int16_t port;
++
+ dstoff += 12;
+ dstlen -= 13;
+ pdstrep = szextaddr;
-+ dstreplen = extaddrlen;
-+ diff = nextfieldoff-off-13-extaddrlen;
++
++ if (psep != NULL && nf_strtou16(psep + 1, &port)) {
++ pr_debug("RTSP: replace dst addr&port\n");
++
++ if (port != prtspexp->loport) {
++ pr_debug("multiple ports found, port %hu ignored\n", port);
++ dstreplen = extaddrlen;
++ } else {
++ sprintf(szextaddr+extaddrlen, ":%s", rbuf1);
++ dstreplen = extaddrlen+1+rbuf1len;
++ }
++ } else {
++ pr_debug("RTSP: replace dst addr\n");
++ dstreplen = extaddrlen;
++ }
++ diff = nextfieldoff-off-13-dstreplen;
+ }
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
+ pfieldend = memchr(ptran+off, ';', nextparamoff-off);
+ nextfieldoff = (pfieldend == NULL) ? nextparamoff : pfieldend-ptran+1;
+
-+ if (strncmp(ptran+off, "client_port=", 12) == 0) {
++ if (nextfieldoff - off > 12 && strncmp(ptran+off, "client_port=", 12) == 0) {
+ u_int16_t port;
+ uint numlen;
+ uint origoff;
PKG_NAME:=zerotier
PKG_VERSION:=1.2.12
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_LICENSE:=GPL-3.0
$(INSTALL_BIN) $(PKG_BUILD_DIR)/zerotier-selftest $(1)/usr/bin/
endif
- $(INSTALL_DIR) $(1)/etc/init.d/
- $(INSTALL_BIN) files/zerotier.init $(1)/etc/init.d/zerotier
- $(INSTALL_DIR) $(1)/etc/config
- $(INSTALL_CONF) files/zerotier.config $(1)/etc/config/zerotier
+ $(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,zerotier))
--- /dev/null
+
+config zerotier sample_config
+ option enabled 0
+
+ # persistent configuration folder (for ZT controller mode)
+ #option config_path '/etc/zerotier'
+
+ #option port '9993'
+
+ # Generate secret on first start
+ option secret ''
+
+ # Join a public network called Earth
+ list join '8056c2e21c000001'
+ #list join '<other_network>'
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=90
+
+USE_PROCD=1
+
+PROG=/usr/bin/zerotier-one
+CONFIG_PATH=/var/lib/zerotier-one
+
+section_enabled() {
+ config_get_bool enabled "$1" 'enabled' 0
+ [ $enabled -ne 0 ]
+}
+
+start_instance() {
+ local cfg="$1"
+ local port secret config_path path
+ local args=""
+
+ if ! section_enabled "$cfg"; then
+ echo "disabled in config"
+ return 1
+ fi
+
+ config_get config_path $cfg 'config_path'
+ config_get port $cfg 'port'
+ config_get secret $cfg 'secret'
+
+ path=${CONFIG_PATH}_$cfg
+
+ # Remove existing link or folder
+ rm -rf $path
+
+ # Create link from CONFIG_PATH to config_path
+ if [ -n "$config_path" -a "$config_path" != "$path" ]; then
+ if [ ! -d "$config_path" ]; then
+ echo "ZeroTier config_path does not exist: $config_path" 1>&2
+ return
+ fi
+
+ ln -s $config_path $path
+ fi
+
+ mkdir -p $path/networks.d
+
+ # link latest default config path to latest config path
+ rm -f $CONFIG_PATH
+ ln -s $path $CONFIG_PATH
+
+ if [ -n "$port" ]; then
+ args="$args -p${port}"
+ fi
+
+ if [ -z "$secret" ]; then
+ echo "Generate secret - please wait..."
+ local sf="/tmp/zt.$cfg.secret"
+
+ zerotier-idtool generate "$sf" > /dev/null
+ [ $? -ne 0 ] && return 1
+
+ secret="$(cat $sf)"
+ rm "$sf"
+
+ uci set zerotier.$cfg.secret="$secret"
+ uci commit zerotier
+ fi
+
+ if [ -n "$secret" ]; then
+ echo "$secret" > $path/identity.secret
+ # make sure there is not previous identity.public
+ rm -f $path/identity.public
+ fi
+
+ add_join() {
+ # an (empty) config file will cause ZT to join a network
+ touch $path/networks.d/$1.conf
+ }
+
+ config_list_foreach $cfg 'join' add_join
+
+ procd_open_instance
+ procd_set_param command $PROG $args $path
+ procd_set_param stderr 1
+ procd_close_instance
+}
+
+start_service() {
+ config_load 'zerotier'
+ config_foreach start_instance 'zerotier'
+}
+
+stop_instance() {
+ local cfg="$1"
+
+ # Remove existing link or folder
+ rm -rf ${CONFIG_PATH}_${cfg}
+}
+
+stop_service() {
+ config_load 'zerotier'
+ config_foreach stop_instance 'zerotier'
+ rm -f ${CONFIG_PATH}
+}
+++ /dev/null
-
-config zerotier sample_config
- option enabled 0
-
- # persistent configuration folder (for ZT controller mode)
- #option config_path '/etc/zerotier'
-
- #option port '9993'
-
- # Generate secret on first start
- option secret 'generate'
-
- # Join a public network called Earth
- list join '8056c2e21c000001'
+++ /dev/null
-#!/bin/sh /etc/rc.common
-
-START=90
-
-USE_PROCD=1
-
-PROG=/usr/bin/zerotier-one
-CONFIG_PATH=/var/lib/zerotier-one
-
-section_enabled() {
- config_get_bool enabled "$1" 'enabled' 0
- [ $enabled -gt 0 ]
-}
-
-start_instance() {
- local cfg="$1"
- local port secret config_path
- local ARGS=""
-
- if ! section_enabled "$cfg"; then
- echo "disabled in config"
- return 1
- fi
-
- config_get config_path $cfg 'config_path'
- config_get_bool port $cfg 'port'
- config_get secret $cfg 'secret'
-
- # Remove existing link or folder
- rm -rf $CONFIG_PATH
-
- # Create link from CONFIG_PATH to config_path
- if [ -n "$config_path" -a "$config_path" != $CONFIG_PATH ]; then
- if [ ! -d "$config_path" ]; then
- echo "ZeroTier config_path does not exist: $config_path"
- return
- fi
-
- ln -s $config_path $CONFIG_PATH
- fi
-
- mkdir -p $CONFIG_PATH/networks.d
-
- if [ -n "$port" ]; then
- ARGS="$ARGS -p$port"
- fi
-
- if [ "$secret" = "generate" ]; then
- echo "Generate secret - please wait..."
- local sf="/tmp/zt.$cfg.secret"
-
- zerotier-idtool generate "$sf" > /dev/null
- [ $? -ne 0 ] && return 1
-
- secret="$(cat $sf)"
- rm "$sf"
-
- uci set zerotier.$cfg.secret="$secret"
- uci commit zerotier
- fi
-
- if [ -n "$secret" ]; then
- echo "$secret" > $CONFIG_PATH/identity.secret
- # make sure there is not previous identity.public
- rm -f $CONFIG_PATH/identity.public
- fi
-
- add_join() {
- # an (empty) config file will cause ZT to join a network
- touch $CONFIG_PATH/networks.d/$1.conf
- }
-
- config_list_foreach $cfg 'join' add_join
-
- procd_open_instance
- procd_set_param command $PROG $ARGS $CONFIG_PATH
- procd_set_param stderr 1
- procd_close_instance
-}
-
-start_service() {
- config_load 'zerotier'
- config_foreach start_instance 'zerotier'
-}
-
-stop_instance() {
- local cfg="$1"
-
- # Remove existing link or folder
- rm -rf $CONFIG_PATH
-}
-
-stop_service() {
- config_load 'zerotier'
- config_foreach stop_instance 'zerotier'
-}
PKG_NAME:=znc
PKG_VERSION:=1.7.1
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://znc.in/releases \
--disable-perl \
--enable-poll \
--disable-python \
- --enable-ssl \
+ --enable-openssl \
--disable-swig \
--disable-tcl \
--enable-tdns \
--- /dev/null
+diff --git a/configure b/configure
+index 18c5005..908fc09 100755
+--- a/configure
++++ b/configure
+@@ -4746,6 +4746,7 @@ $as_echo_n "checking whether openssl is usable... " >&6; }
+
+
+ #include <openssl/ssl.h>
++ #include <openssl/dh.h>
+
+ int
+ main ()
+diff --git a/configure.ac b/configure.ac
+index c94833e..b46a53d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -368,6 +368,7 @@ if test "x$SSL" != "xno"; then
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([[
+ #include <openssl/ssl.h>
++ #include <openssl/dh.h>
+ ]], [[
+ SSL_CTX* ctx = SSL_CTX_new(TLSv1_method());
+ SSL* ssl = SSL_new(ctx);
+diff --git a/src/Utils.cpp b/src/Utils.cpp
+index cced568..425831a 100644
+--- a/src/Utils.cpp
++++ b/src/Utils.cpp
+@@ -27,6 +27,8 @@
+ #include <znc/Message.h>
+ #ifdef HAVE_LIBSSL
+ #include <openssl/ssl.h>
++#include <openssl/bn.h>
++#include <openssl/rsa.h>
+ #endif /* HAVE_LIBSSL */
+ #include <memory>
+ #include <unistd.h>
+diff --git a/src/main.cpp b/src/main.cpp
+index 7d4e209..8d458a9 100644
+--- a/src/main.cpp
++++ b/src/main.cpp
+@@ -46,8 +46,8 @@ static void locking_callback(int mode, int type, const char* file, int line) {
+ }
+ }
+
+-static unsigned long thread_id_callback() {
+- return (unsigned long)pthread_self();
++static void thread_id_callback(CRYPTO_THREADID *id) {
++ CRYPTO_THREADID_set_numeric(id, (unsigned long)pthread_self());
+ }
+
+ static CRYPTO_dynlock_value* dyn_create_callback(const char* file, int line) {
+@@ -78,7 +78,7 @@ static void thread_setup() {
+ for (std::unique_ptr<CMutex>& mtx : lock_cs)
+ mtx = std::unique_ptr<CMutex>(new CMutex());
+
+- CRYPTO_set_id_callback(&thread_id_callback);
++ CRYPTO_THREADID_set_callback(&thread_id_callback);
+ CRYPTO_set_locking_callback(&locking_callback);
+
+ CRYPTO_set_dynlock_create_callback(&dyn_create_callback);
+diff --git a/third_party/Csocket/Csocket.cc b/third_party/Csocket/Csocket.cc
+index 46a3bfd..017d22f 100644
+--- a/third_party/Csocket/Csocket.cc
++++ b/third_party/Csocket/Csocket.cc
+@@ -47,10 +47,16 @@
+ #include <stdio.h>
+ #include <openssl/ssl.h>
+ #include <openssl/conf.h>
+-#include <openssl/engine.h>
++#include <openssl/bn.h>
++#include <openssl/dh.h>
++#include <openssl/dsa.h>
++#include <openssl/rsa.h>
+ #ifndef OPENSSL_NO_COMP
+ #include <openssl/comp.h>
+ #endif
++#ifndef OPENSSL_NO_ENGINE
++#include <openssl/engine.h>
++#endif
+ #define HAVE_ERR_REMOVE_STATE
+ #ifdef OPENSSL_VERSION_NUMBER
+ # if OPENSSL_VERSION_NUMBER >= 0x10000000
include $(TOPDIR)/rules.mk
PKG_NAME:=alsa-utils
-PKG_VERSION:=1.1.6
-PKG_RELEASE:=2
+PKG_VERSION:=1.1.7
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/utils/ \
http://distfiles.gentoo.org/distfiles/
-PKG_HASH:=155caecc40b2220f686f34ba3655a53e3bdbc0586adb1056733949feaaf7d36e
+PKG_HASH:=1db27fb54ab7fdeb54b00d68b8a174808ffea198cfbd67e3c959482194e1540a
PKG_INSTALL:=1
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
#
-# Copyright (C) 2014 OpenWrt.org
-#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
PKG_NAME:=espeak
PKG_VERSION:=1.48.04
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-source.zip
PKG_SOURCE_URL:=@SF/espeak
MAKE_PATH:=./src
+# Use system header for portaudio
+define Build/Prepare
+ $(call Build/Prepare/Default)
+ rm $(PKG_BUILD_DIR)/src/portaudio.h
+endef
+
define Package/espeak/install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/espeak $(1)/usr/bin/
--- /dev/null
+--- a/src/tr_languages.cpp
++++ b/src/tr_languages.cpp
+@@ -198,7 +198,7 @@ static const unsigned short chars_ignore
+ 0x200d, 1, // zero width joiner
+ 0, 0 };
+
+-const char string_ordinal[] = {0xc2,0xba,0}; // masculine ordinal character, UTF-8
++const unsigned char string_ordinal[] = {0xc2,0xba,0}; // masculine ordinal character, UTF-8
+
+
+ static Translator* NewTranslator(void)
+@@ -758,7 +758,7 @@ Translator *SelectTranslator(const char
+ tr->langopts.stress_flags = S_FINAL_SPANISH | S_FINAL_DIM_ONLY | S_FINAL_NO_2;
+ tr->langopts.numbers = NUM_SINGLE_STRESS | NUM_DECIMAL_COMMA | NUM_AND_UNITS | NUM_OMIT_1_HUNDRED | NUM_OMIT_1_THOUSAND | NUM_ROMAN | NUM_ROMAN_ORDINAL;
+ tr->langopts.numbers2 = NUM2_ORDINAL_NO_AND;
+- tr->langopts.roman_suffix = string_ordinal;
++ tr->langopts.roman_suffix = (const char *)string_ordinal;
+ }
+ else
+ if(name2 == L_pap)
+++ /dev/null
---- a/src/portaudio.h
-+++ /dev/null
-@@ -1,466 +0,0 @@
--// NOTE: Copy this file to portaudio.h in order to compile with V18 portaudio
--
--
--#ifndef PORT_AUDIO_H
--#define PORT_AUDIO_H
--
--#ifdef __cplusplus
--extern "C"
--{
--#endif /* __cplusplus */
--
--/*
-- * $Id: portaudio.h,v 1.5 2002/03/26 18:04:22 philburk Exp $
-- * PortAudio Portable Real-Time Audio Library
-- * PortAudio API Header File
-- * Latest version available at: http://www.audiomulch.com/portaudio/
-- *
-- * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
-- *
-- * Permission is hereby granted, free of charge, to any person obtaining
-- * a copy of this software and associated documentation files
-- * (the "Software"), to deal in the Software without restriction,
-- * including without limitation the rights to use, copy, modify, merge,
-- * publish, distribute, sublicense, and/or sell copies of the Software,
-- * and to permit persons to whom the Software is furnished to do so,
-- * subject to the following conditions:
-- *
-- * The above copyright notice and this permission notice shall be
-- * included in all copies or substantial portions of the Software.
-- *
-- * Any person wishing to distribute modifications to the Software is
-- * requested to send the modifications to the original developer so that
-- * they can be incorporated into the canonical version.
-- *
-- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
-- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
-- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-- *
-- */
--
--typedef int PaError;
--typedef enum {
-- paNoError = 0,
--
-- paHostError = -10000,
-- paInvalidChannelCount,
-- paInvalidSampleRate,
-- paInvalidDeviceId,
-- paInvalidFlag,
-- paSampleFormatNotSupported,
-- paBadIODeviceCombination,
-- paInsufficientMemory,
-- paBufferTooBig,
-- paBufferTooSmall,
-- paNullCallback,
-- paBadStreamPtr,
-- paTimedOut,
-- paInternalError,
-- paDeviceUnavailable
--} PaErrorNum;
--
--/*
-- Pa_Initialize() is the library initialisation function - call this before
-- using the library.
--
--*/
--
--PaError Pa_Initialize( void );
--
--/*
-- Pa_Terminate() is the library termination function - call this after
-- using the library.
--
--*/
--
--PaError Pa_Terminate( void );
--
--/*
-- Pa_GetHostError() returns a host specific error code.
-- This can be called after receiving a PortAudio error code of paHostError.
--
--*/
--
--long Pa_GetHostError( void );
--
--/*
-- Pa_GetErrorText() translates the supplied PortAudio error number
-- into a human readable message.
--
--*/
--
--const char *Pa_GetErrorText( PaError errnum );
--
--/*
-- Sample formats
--
-- These are formats used to pass sound data between the callback and the
-- stream. Each device has a "native" format which may be used when optimum
-- efficiency or control over conversion is required.
--
-- Formats marked "always available" are supported (emulated) by all
-- PortAudio implementations.
--
-- The floating point representation (paFloat32) uses +1.0 and -1.0 as the
-- maximum and minimum respectively.
--
-- paUInt8 is an unsigned 8 bit format where 128 is considered "ground"
--
--*/
--
--typedef unsigned long PaSampleFormat;
--#define paFloat32 ((PaSampleFormat) (1<<0)) /*always available*/
--#define paInt16 ((PaSampleFormat) (1<<1)) /*always available*/
--#define paInt32 ((PaSampleFormat) (1<<2)) /*always available*/
--#define paInt24 ((PaSampleFormat) (1<<3))
--#define paPackedInt24 ((PaSampleFormat) (1<<4))
--#define paInt8 ((PaSampleFormat) (1<<5))
--#define paUInt8 ((PaSampleFormat) (1<<6))
--#define paCustomFormat ((PaSampleFormat) (1<<16))
--
--/*
-- Device enumeration mechanism.
--
-- Device ids range from 0 to Pa_CountDevices()-1.
--
-- Devices may support input, output or both.
--
--*/
--
--typedef int PaDeviceID;
--#define paNoDevice -1
--
--int Pa_CountDevices( void );
--
--typedef struct
--{
-- int structVersion;
-- const char *name;
-- int maxInputChannels;
-- int maxOutputChannels;
-- /* Number of discrete rates, or -1 if range supported. */
-- int numSampleRates;
-- /* Array of supported sample rates, or {min,max} if range supported. */
-- const double *sampleRates;
-- PaSampleFormat nativeSampleFormats;
--}
--PaDeviceInfo;
--
--/*
-- Pa_GetDefaultInputDeviceID(), Pa_GetDefaultOutputDeviceID() return the
-- default device ids for input and output respectively, or paNoDevice if
-- no device is available.
-- The result can be passed to Pa_OpenStream().
--
-- On the PC, the user can specify a default device by
-- setting an environment variable. For example, to use device #1.
--
-- set PA_RECOMMENDED_OUTPUT_DEVICE=1
--
-- The user should first determine the available device ids by using
-- the supplied application "pa_devs".
--
--*/
--
--PaDeviceID Pa_GetDefaultInputDeviceID( void );
--PaDeviceID Pa_GetDefaultOutputDeviceID( void );
--
--
--
--/*
-- Pa_GetDeviceInfo() returns a pointer to an immutable PaDeviceInfo structure
-- for the device specified.
-- If the device parameter is out of range the function returns NULL.
--
-- PortAudio manages the memory referenced by the returned pointer, the client
-- must not manipulate or free the memory. The pointer is only guaranteed to be
-- valid between calls to Pa_Initialize() and Pa_Terminate().
--
--*/
--
--const PaDeviceInfo* Pa_GetDeviceInfo( PaDeviceID device );
--
--/*
-- PaTimestamp is used to represent a continuous sample clock with arbitrary
-- start time that can be used for syncronization. The type is used for the
-- outTime argument to the PortAudioCallback and as the result of Pa_StreamTime()
--
--*/
--
--typedef double PaTimestamp;
--
--/*
-- PortAudioCallback is implemented by PortAudio clients.
--
-- inputBuffer and outputBuffer are arrays of interleaved samples,
-- the format, packing and number of channels used by the buffers are
-- determined by parameters to Pa_OpenStream() (see below).
--
-- framesPerBuffer is the number of sample frames to be processed by the callback.
--
-- outTime is the time in samples when the buffer(s) processed by
-- this callback will begin being played at the audio output.
-- See also Pa_StreamTime()
--
-- userData is the value of a user supplied pointer passed to Pa_OpenStream()
-- intended for storing synthesis data etc.
--
-- return value:
-- The callback can return a non-zero value to stop the stream. This may be
-- useful in applications such as soundfile players where a specific duration
-- of output is required. However, it is not necessary to utilise this mechanism
-- as StopStream() will also terminate the stream. A callback returning a
-- non-zero value must fill the entire outputBuffer.
--
-- NOTE: None of the other stream functions may be called from within the
-- callback function except for Pa_GetCPULoad().
--
--*/
--
--typedef int (PortAudioCallback)(
-- void *inputBuffer, void *outputBuffer,
-- unsigned long framesPerBuffer,
-- PaTimestamp outTime, void *userData );
--
--
--/*
-- Stream flags
--
-- These flags may be supplied (ored together) in the streamFlags argument to
-- the Pa_OpenStream() function.
--
--*/
--
--#define paNoFlag (0)
--#define paClipOff (1<<0) /* disable default clipping of out of range samples */
--#define paDitherOff (1<<1) /* disable default dithering */
--#define paPlatformSpecificFlags (0x00010000)
--typedef unsigned long PaStreamFlags;
--
--/*
-- A single PortAudioStream provides multiple channels of real-time
-- input and output audio streaming to a client application.
-- Pointers to PortAudioStream objects are passed between PortAudio functions.
--*/
--
--typedef void PortAudioStream;
--#define PaStream PortAudioStream
--
--/*
-- Pa_OpenStream() opens a stream for either input, output or both.
--
-- stream is the address of a PortAudioStream pointer which will receive
-- a pointer to the newly opened stream.
--
-- inputDevice is the id of the device used for input (see PaDeviceID above.)
-- inputDevice may be paNoDevice to indicate that an input device is not required.
--
-- numInputChannels is the number of channels of sound to be delivered to the
-- callback. It can range from 1 to the value of maxInputChannels in the
-- PaDeviceInfo record for the device specified by the inputDevice parameter.
-- If inputDevice is paNoDevice numInputChannels is ignored.
--
-- inputSampleFormat is the sample format of inputBuffer provided to the callback
-- function. inputSampleFormat may be any of the formats described by the
-- PaSampleFormat enumeration (see above). PortAudio guarantees support for
-- the device's native formats (nativeSampleFormats in the device info record)
-- and additionally 16 and 32 bit integer and 32 bit floating point formats.
-- Support for other formats is implementation defined.
--
-- inputDriverInfo is a pointer to an optional driver specific data structure
-- containing additional information for device setup or stream processing.
-- inputDriverInfo is never required for correct operation. If not used
-- inputDriverInfo should be NULL.
--
-- outputDevice is the id of the device used for output (see PaDeviceID above.)
-- outputDevice may be paNoDevice to indicate that an output device is not required.
--
-- numOutputChannels is the number of channels of sound to be supplied by the
-- callback. See the definition of numInputChannels above for more details.
--
-- outputSampleFormat is the sample format of the outputBuffer filled by the
-- callback function. See the definition of inputSampleFormat above for more
-- details.
--
-- outputDriverInfo is a pointer to an optional driver specific data structure
-- containing additional information for device setup or stream processing.
-- outputDriverInfo is never required for correct operation. If not used
-- outputDriverInfo should be NULL.
--
-- sampleRate is the desired sampleRate. For full-duplex streams it is the
-- sample rate for both input and output
--
-- framesPerBuffer is the length in sample frames of all internal sample buffers
-- used for communication with platform specific audio routines. Wherever
-- possible this corresponds to the framesPerBuffer parameter passed to the
-- callback function.
--
-- numberOfBuffers is the number of buffers used for multibuffered communication
-- with the platform specific audio routines. If you pass zero, then an optimum
-- value will be chosen for you internally. This parameter is provided only
-- as a guide - and does not imply that an implementation must use multibuffered
-- i/o when reliable double buffering is available (such as SndPlayDoubleBuffer()
-- on the Macintosh.)
--
-- streamFlags may contain a combination of flags ORed together.
-- These flags modify the behaviour of the streaming process. Some flags may only
-- be relevant to certain buffer formats.
--
-- callback is a pointer to a client supplied function that is responsible
-- for processing and filling input and output buffers (see above for details.)
--
-- userData is a client supplied pointer which is passed to the callback
-- function. It could for example, contain a pointer to instance data necessary
-- for processing the audio buffers.
--
-- return value:
-- Upon success Pa_OpenStream() returns PaNoError and places a pointer to a
-- valid PortAudioStream in the stream argument. The stream is inactive (stopped).
-- If a call to Pa_OpenStream() fails a non-zero error code is returned (see
-- PaError above) and the value of stream is invalid.
--
--*/
--
--PaError Pa_OpenStream( PortAudioStream** stream,
-- PaDeviceID inputDevice,
-- int numInputChannels,
-- PaSampleFormat inputSampleFormat,
-- void *inputDriverInfo,
-- PaDeviceID outputDevice,
-- int numOutputChannels,
-- PaSampleFormat outputSampleFormat,
-- void *outputDriverInfo,
-- double sampleRate,
-- unsigned long framesPerBuffer,
-- unsigned long numberOfBuffers,
-- PaStreamFlags streamFlags,
-- PortAudioCallback *callback,
-- void *userData );
--
--
--/*
-- Pa_OpenDefaultStream() is a simplified version of Pa_OpenStream() that opens
-- the default input and/or output devices. Most parameters have identical meaning
-- to their Pa_OpenStream() counterparts, with the following exceptions:
--
-- If either numInputChannels or numOutputChannels is 0 the respective device
-- is not opened. This has the same effect as passing paNoDevice in the device
-- arguments to Pa_OpenStream().
--
-- sampleFormat applies to both the input and output buffers.
--
--*/
--
--PaError Pa_OpenDefaultStream( PortAudioStream** stream,
-- int numInputChannels,
-- int numOutputChannels,
-- PaSampleFormat sampleFormat,
-- double sampleRate,
-- unsigned long framesPerBuffer,
-- unsigned long numberOfBuffers,
-- PortAudioCallback *callback,
-- void *userData );
--
--/*
-- Pa_CloseStream() closes an audio stream, flushing any pending buffers.
--
--*/
--
--PaError Pa_CloseStream( PortAudioStream* );
--
--/*
-- Pa_StartStream() and Pa_StopStream() begin and terminate audio processing.
-- Pa_StopStream() waits until all pending audio buffers have been played.
-- Pa_AbortStream() stops playing immediately without waiting for pending
-- buffers to complete.
--
--*/
--
--PaError Pa_StartStream( PortAudioStream *stream );
--
--PaError Pa_StopStream( PortAudioStream *stream );
--
--PaError Pa_AbortStream( PortAudioStream *stream );
--
--/*
-- Pa_StreamActive() returns one (1) when the stream is active (ie playing
-- or recording audio), zero (0) when not playing, or a negative error number
-- if the stream is invalid.
-- The stream is active between calls to Pa_StartStream() and Pa_StopStream(),
-- but may also become inactive if the callback returns a non-zero value.
-- In the latter case, the stream is considered inactive after the last
-- buffer has finished playing.
--
--*/
--
--PaError Pa_StreamActive( PortAudioStream *stream );
--
--/*
-- Pa_StreamTime() returns the current output time in samples for the stream.
-- This time may be used as a time reference (for example synchronizing audio to
-- MIDI).
--
--*/
--
--PaTimestamp Pa_StreamTime( PortAudioStream *stream );
--
--/*
-- Pa_GetCPULoad() returns the CPU Load for the stream.
-- The "CPU Load" is a fraction of total CPU time consumed by the stream's
-- audio processing routines including, but not limited to the client supplied
-- callback.
-- A value of 0.5 would imply that PortAudio and the sound generating
-- callback was consuming roughly 50% of the available CPU time.
-- This function may be called from the callback function or the application.
--
--*/
--
--double Pa_GetCPULoad( PortAudioStream* stream );
--
--/*
-- Pa_GetMinNumBuffers() returns the minimum number of buffers required by
-- the current host based on minimum latency.
-- On the PC, for the DirectSound implementation, latency can be optionally set
-- by user by setting an environment variable.
-- For example, to set latency to 200 msec, put:
--
-- set PA_MIN_LATENCY_MSEC=200
--
-- in the AUTOEXEC.BAT file and reboot.
-- If the environment variable is not set, then the latency will be determined
-- based on the OS. Windows NT has higher latency than Win95.
--
--*/
--
--int Pa_GetMinNumBuffers( int framesPerBuffer, double sampleRate );
--
--/*
-- Pa_Sleep() puts the caller to sleep for at least 'msec' milliseconds.
-- You may sleep longer than the requested time so don't rely on this for
-- accurate musical timing.
--
-- Pa_Sleep() is provided as a convenience for authors of portable code (such as
-- the tests and examples in the PortAudio distribution.)
--
--*/
--
--void Pa_Sleep( long msec );
--
--/*
-- Pa_GetSampleSize() returns the size in bytes of a single sample in the
-- supplied PaSampleFormat, or paSampleFormatNotSupported if the format is
-- no supported.
--
--*/
--
--PaError Pa_GetSampleSize( PaSampleFormat format );
--
--
--#ifdef __cplusplus
--}
--#endif /* __cplusplus */
--#endif /* PORT_AUDIO_H */
---- a/src/portaudio18.h
-+++ /dev/null
-@@ -1,466 +0,0 @@
--// NOTE: Copy this file to portaudio.h in order to compile with V18 portaudio
--
--
--#ifndef PORT_AUDIO_H
--#define PORT_AUDIO_H
--
--#ifdef __cplusplus
--extern "C"
--{
--#endif /* __cplusplus */
--
--/*
-- * $Id: portaudio.h,v 1.5 2002/03/26 18:04:22 philburk Exp $
-- * PortAudio Portable Real-Time Audio Library
-- * PortAudio API Header File
-- * Latest version available at: http://www.audiomulch.com/portaudio/
-- *
-- * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
-- *
-- * Permission is hereby granted, free of charge, to any person obtaining
-- * a copy of this software and associated documentation files
-- * (the "Software"), to deal in the Software without restriction,
-- * including without limitation the rights to use, copy, modify, merge,
-- * publish, distribute, sublicense, and/or sell copies of the Software,
-- * and to permit persons to whom the Software is furnished to do so,
-- * subject to the following conditions:
-- *
-- * The above copyright notice and this permission notice shall be
-- * included in all copies or substantial portions of the Software.
-- *
-- * Any person wishing to distribute modifications to the Software is
-- * requested to send the modifications to the original developer so that
-- * they can be incorporated into the canonical version.
-- *
-- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
-- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
-- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-- *
-- */
--
--typedef int PaError;
--typedef enum {
-- paNoError = 0,
--
-- paHostError = -10000,
-- paInvalidChannelCount,
-- paInvalidSampleRate,
-- paInvalidDeviceId,
-- paInvalidFlag,
-- paSampleFormatNotSupported,
-- paBadIODeviceCombination,
-- paInsufficientMemory,
-- paBufferTooBig,
-- paBufferTooSmall,
-- paNullCallback,
-- paBadStreamPtr,
-- paTimedOut,
-- paInternalError,
-- paDeviceUnavailable
--} PaErrorNum;
--
--/*
-- Pa_Initialize() is the library initialisation function - call this before
-- using the library.
--
--*/
--
--PaError Pa_Initialize( void );
--
--/*
-- Pa_Terminate() is the library termination function - call this after
-- using the library.
--
--*/
--
--PaError Pa_Terminate( void );
--
--/*
-- Pa_GetHostError() returns a host specific error code.
-- This can be called after receiving a PortAudio error code of paHostError.
--
--*/
--
--long Pa_GetHostError( void );
--
--/*
-- Pa_GetErrorText() translates the supplied PortAudio error number
-- into a human readable message.
--
--*/
--
--const char *Pa_GetErrorText( PaError errnum );
--
--/*
-- Sample formats
--
-- These are formats used to pass sound data between the callback and the
-- stream. Each device has a "native" format which may be used when optimum
-- efficiency or control over conversion is required.
--
-- Formats marked "always available" are supported (emulated) by all
-- PortAudio implementations.
--
-- The floating point representation (paFloat32) uses +1.0 and -1.0 as the
-- maximum and minimum respectively.
--
-- paUInt8 is an unsigned 8 bit format where 128 is considered "ground"
--
--*/
--
--typedef unsigned long PaSampleFormat;
--#define paFloat32 ((PaSampleFormat) (1<<0)) /*always available*/
--#define paInt16 ((PaSampleFormat) (1<<1)) /*always available*/
--#define paInt32 ((PaSampleFormat) (1<<2)) /*always available*/
--#define paInt24 ((PaSampleFormat) (1<<3))
--#define paPackedInt24 ((PaSampleFormat) (1<<4))
--#define paInt8 ((PaSampleFormat) (1<<5))
--#define paUInt8 ((PaSampleFormat) (1<<6))
--#define paCustomFormat ((PaSampleFormat) (1<<16))
--
--/*
-- Device enumeration mechanism.
--
-- Device ids range from 0 to Pa_CountDevices()-1.
--
-- Devices may support input, output or both.
--
--*/
--
--typedef int PaDeviceID;
--#define paNoDevice -1
--
--int Pa_CountDevices( void );
--
--typedef struct
--{
-- int structVersion;
-- const char *name;
-- int maxInputChannels;
-- int maxOutputChannels;
-- /* Number of discrete rates, or -1 if range supported. */
-- int numSampleRates;
-- /* Array of supported sample rates, or {min,max} if range supported. */
-- const double *sampleRates;
-- PaSampleFormat nativeSampleFormats;
--}
--PaDeviceInfo;
--
--/*
-- Pa_GetDefaultInputDeviceID(), Pa_GetDefaultOutputDeviceID() return the
-- default device ids for input and output respectively, or paNoDevice if
-- no device is available.
-- The result can be passed to Pa_OpenStream().
--
-- On the PC, the user can specify a default device by
-- setting an environment variable. For example, to use device #1.
--
-- set PA_RECOMMENDED_OUTPUT_DEVICE=1
--
-- The user should first determine the available device ids by using
-- the supplied application "pa_devs".
--
--*/
--
--PaDeviceID Pa_GetDefaultInputDeviceID( void );
--PaDeviceID Pa_GetDefaultOutputDeviceID( void );
--
--
--
--/*
-- Pa_GetDeviceInfo() returns a pointer to an immutable PaDeviceInfo structure
-- for the device specified.
-- If the device parameter is out of range the function returns NULL.
--
-- PortAudio manages the memory referenced by the returned pointer, the client
-- must not manipulate or free the memory. The pointer is only guaranteed to be
-- valid between calls to Pa_Initialize() and Pa_Terminate().
--
--*/
--
--const PaDeviceInfo* Pa_GetDeviceInfo( PaDeviceID device );
--
--/*
-- PaTimestamp is used to represent a continuous sample clock with arbitrary
-- start time that can be used for syncronization. The type is used for the
-- outTime argument to the PortAudioCallback and as the result of Pa_StreamTime()
--
--*/
--
--typedef double PaTimestamp;
--
--/*
-- PortAudioCallback is implemented by PortAudio clients.
--
-- inputBuffer and outputBuffer are arrays of interleaved samples,
-- the format, packing and number of channels used by the buffers are
-- determined by parameters to Pa_OpenStream() (see below).
--
-- framesPerBuffer is the number of sample frames to be processed by the callback.
--
-- outTime is the time in samples when the buffer(s) processed by
-- this callback will begin being played at the audio output.
-- See also Pa_StreamTime()
--
-- userData is the value of a user supplied pointer passed to Pa_OpenStream()
-- intended for storing synthesis data etc.
--
-- return value:
-- The callback can return a non-zero value to stop the stream. This may be
-- useful in applications such as soundfile players where a specific duration
-- of output is required. However, it is not necessary to utilise this mechanism
-- as StopStream() will also terminate the stream. A callback returning a
-- non-zero value must fill the entire outputBuffer.
--
-- NOTE: None of the other stream functions may be called from within the
-- callback function except for Pa_GetCPULoad().
--
--*/
--
--typedef int (PortAudioCallback)(
-- void *inputBuffer, void *outputBuffer,
-- unsigned long framesPerBuffer,
-- PaTimestamp outTime, void *userData );
--
--
--/*
-- Stream flags
--
-- These flags may be supplied (ored together) in the streamFlags argument to
-- the Pa_OpenStream() function.
--
--*/
--
--#define paNoFlag (0)
--#define paClipOff (1<<0) /* disable default clipping of out of range samples */
--#define paDitherOff (1<<1) /* disable default dithering */
--#define paPlatformSpecificFlags (0x00010000)
--typedef unsigned long PaStreamFlags;
--
--/*
-- A single PortAudioStream provides multiple channels of real-time
-- input and output audio streaming to a client application.
-- Pointers to PortAudioStream objects are passed between PortAudio functions.
--*/
--
--typedef void PortAudioStream;
--#define PaStream PortAudioStream
--
--/*
-- Pa_OpenStream() opens a stream for either input, output or both.
--
-- stream is the address of a PortAudioStream pointer which will receive
-- a pointer to the newly opened stream.
--
-- inputDevice is the id of the device used for input (see PaDeviceID above.)
-- inputDevice may be paNoDevice to indicate that an input device is not required.
--
-- numInputChannels is the number of channels of sound to be delivered to the
-- callback. It can range from 1 to the value of maxInputChannels in the
-- PaDeviceInfo record for the device specified by the inputDevice parameter.
-- If inputDevice is paNoDevice numInputChannels is ignored.
--
-- inputSampleFormat is the sample format of inputBuffer provided to the callback
-- function. inputSampleFormat may be any of the formats described by the
-- PaSampleFormat enumeration (see above). PortAudio guarantees support for
-- the device's native formats (nativeSampleFormats in the device info record)
-- and additionally 16 and 32 bit integer and 32 bit floating point formats.
-- Support for other formats is implementation defined.
--
-- inputDriverInfo is a pointer to an optional driver specific data structure
-- containing additional information for device setup or stream processing.
-- inputDriverInfo is never required for correct operation. If not used
-- inputDriverInfo should be NULL.
--
-- outputDevice is the id of the device used for output (see PaDeviceID above.)
-- outputDevice may be paNoDevice to indicate that an output device is not required.
--
-- numOutputChannels is the number of channels of sound to be supplied by the
-- callback. See the definition of numInputChannels above for more details.
--
-- outputSampleFormat is the sample format of the outputBuffer filled by the
-- callback function. See the definition of inputSampleFormat above for more
-- details.
--
-- outputDriverInfo is a pointer to an optional driver specific data structure
-- containing additional information for device setup or stream processing.
-- outputDriverInfo is never required for correct operation. If not used
-- outputDriverInfo should be NULL.
--
-- sampleRate is the desired sampleRate. For full-duplex streams it is the
-- sample rate for both input and output
--
-- framesPerBuffer is the length in sample frames of all internal sample buffers
-- used for communication with platform specific audio routines. Wherever
-- possible this corresponds to the framesPerBuffer parameter passed to the
-- callback function.
--
-- numberOfBuffers is the number of buffers used for multibuffered communication
-- with the platform specific audio routines. If you pass zero, then an optimum
-- value will be chosen for you internally. This parameter is provided only
-- as a guide - and does not imply that an implementation must use multibuffered
-- i/o when reliable double buffering is available (such as SndPlayDoubleBuffer()
-- on the Macintosh.)
--
-- streamFlags may contain a combination of flags ORed together.
-- These flags modify the behaviour of the streaming process. Some flags may only
-- be relevant to certain buffer formats.
--
-- callback is a pointer to a client supplied function that is responsible
-- for processing and filling input and output buffers (see above for details.)
--
-- userData is a client supplied pointer which is passed to the callback
-- function. It could for example, contain a pointer to instance data necessary
-- for processing the audio buffers.
--
-- return value:
-- Upon success Pa_OpenStream() returns PaNoError and places a pointer to a
-- valid PortAudioStream in the stream argument. The stream is inactive (stopped).
-- If a call to Pa_OpenStream() fails a non-zero error code is returned (see
-- PaError above) and the value of stream is invalid.
--
--*/
--
--PaError Pa_OpenStream( PortAudioStream** stream,
-- PaDeviceID inputDevice,
-- int numInputChannels,
-- PaSampleFormat inputSampleFormat,
-- void *inputDriverInfo,
-- PaDeviceID outputDevice,
-- int numOutputChannels,
-- PaSampleFormat outputSampleFormat,
-- void *outputDriverInfo,
-- double sampleRate,
-- unsigned long framesPerBuffer,
-- unsigned long numberOfBuffers,
-- PaStreamFlags streamFlags,
-- PortAudioCallback *callback,
-- void *userData );
--
--
--/*
-- Pa_OpenDefaultStream() is a simplified version of Pa_OpenStream() that opens
-- the default input and/or output devices. Most parameters have identical meaning
-- to their Pa_OpenStream() counterparts, with the following exceptions:
--
-- If either numInputChannels or numOutputChannels is 0 the respective device
-- is not opened. This has the same effect as passing paNoDevice in the device
-- arguments to Pa_OpenStream().
--
-- sampleFormat applies to both the input and output buffers.
--
--*/
--
--PaError Pa_OpenDefaultStream( PortAudioStream** stream,
-- int numInputChannels,
-- int numOutputChannels,
-- PaSampleFormat sampleFormat,
-- double sampleRate,
-- unsigned long framesPerBuffer,
-- unsigned long numberOfBuffers,
-- PortAudioCallback *callback,
-- void *userData );
--
--/*
-- Pa_CloseStream() closes an audio stream, flushing any pending buffers.
--
--*/
--
--PaError Pa_CloseStream( PortAudioStream* );
--
--/*
-- Pa_StartStream() and Pa_StopStream() begin and terminate audio processing.
-- Pa_StopStream() waits until all pending audio buffers have been played.
-- Pa_AbortStream() stops playing immediately without waiting for pending
-- buffers to complete.
--
--*/
--
--PaError Pa_StartStream( PortAudioStream *stream );
--
--PaError Pa_StopStream( PortAudioStream *stream );
--
--PaError Pa_AbortStream( PortAudioStream *stream );
--
--/*
-- Pa_StreamActive() returns one (1) when the stream is active (ie playing
-- or recording audio), zero (0) when not playing, or a negative error number
-- if the stream is invalid.
-- The stream is active between calls to Pa_StartStream() and Pa_StopStream(),
-- but may also become inactive if the callback returns a non-zero value.
-- In the latter case, the stream is considered inactive after the last
-- buffer has finished playing.
--
--*/
--
--PaError Pa_StreamActive( PortAudioStream *stream );
--
--/*
-- Pa_StreamTime() returns the current output time in samples for the stream.
-- This time may be used as a time reference (for example synchronizing audio to
-- MIDI).
--
--*/
--
--PaTimestamp Pa_StreamTime( PortAudioStream *stream );
--
--/*
-- Pa_GetCPULoad() returns the CPU Load for the stream.
-- The "CPU Load" is a fraction of total CPU time consumed by the stream's
-- audio processing routines including, but not limited to the client supplied
-- callback.
-- A value of 0.5 would imply that PortAudio and the sound generating
-- callback was consuming roughly 50% of the available CPU time.
-- This function may be called from the callback function or the application.
--
--*/
--
--double Pa_GetCPULoad( PortAudioStream* stream );
--
--/*
-- Pa_GetMinNumBuffers() returns the minimum number of buffers required by
-- the current host based on minimum latency.
-- On the PC, for the DirectSound implementation, latency can be optionally set
-- by user by setting an environment variable.
-- For example, to set latency to 200 msec, put:
--
-- set PA_MIN_LATENCY_MSEC=200
--
-- in the AUTOEXEC.BAT file and reboot.
-- If the environment variable is not set, then the latency will be determined
-- based on the OS. Windows NT has higher latency than Win95.
--
--*/
--
--int Pa_GetMinNumBuffers( int framesPerBuffer, double sampleRate );
--
--/*
-- Pa_Sleep() puts the caller to sleep for at least 'msec' milliseconds.
-- You may sleep longer than the requested time so don't rely on this for
-- accurate musical timing.
--
-- Pa_Sleep() is provided as a convenience for authors of portable code (such as
-- the tests and examples in the PortAudio distribution.)
--
--*/
--
--void Pa_Sleep( long msec );
--
--/*
-- Pa_GetSampleSize() returns the size in bytes of a single sample in the
-- supplied PaSampleFormat, or paSampleFormatNotSupported if the format is
-- no supported.
--
--*/
--
--PaError Pa_GetSampleSize( PaSampleFormat format );
--
--
--#ifdef __cplusplus
--}
--#endif /* __cplusplus */
--#endif /* PORT_AUDIO_H */
---- a/src/portaudio19.h
-+++ /dev/null
-@@ -1,1127 +0,0 @@
--// NOTE: Copy this file to portaudio.h in order to compile with V19 portaudio
--
--#ifndef PORTAUDIO_H
--#define PORTAUDIO_H
--/*
-- * $Id: portaudio.h 1061 2006-06-19 22:46:41Z lschwardt $
-- * PortAudio Portable Real-Time Audio Library
-- * PortAudio API Header File
-- * Latest version available at: http://www.portaudio.com/
-- *
-- * Copyright (c) 1999-2002 Ross Bencina and Phil Burk
-- *
-- * Permission is hereby granted, free of charge, to any person obtaining
-- * a copy of this software and associated documentation files
-- * (the "Software"), to deal in the Software without restriction,
-- * including without limitation the rights to use, copy, modify, merge,
-- * publish, distribute, sublicense, and/or sell copies of the Software,
-- * and to permit persons to whom the Software is furnished to do so,
-- * subject to the following conditions:
-- *
-- * The above copyright notice and this permission notice shall be
-- * included in all copies or substantial portions of the Software.
-- *
-- * Any person wishing to distribute modifications to the Software is
-- * requested to send the modifications to the original developer so that
-- * they can be incorporated into the canonical version.
-- *
-- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
-- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
-- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-- */
--
--/** @file
-- @brief The PortAudio API.
--*/
--
--
--#ifdef __cplusplus
--extern "C"
--{
--#endif /* __cplusplus */
--
--
--/** Retrieve the release number of the currently running PortAudio build,
-- eg 1900.
--*/
--int Pa_GetVersion( void );
--
--
--/** Retrieve a textual description of the current PortAudio build,
-- eg "PortAudio V19-devel 13 October 2002".
--*/
--const char* Pa_GetVersionText( void );
--
--
--/** Error codes returned by PortAudio functions.
-- Note that with the exception of paNoError, all PaErrorCodes are negative.
--*/
--
--typedef int PaError;
--typedef enum PaErrorCode
--{
-- paNoError = 0,
--
-- paNotInitialized = -10000,
-- paUnanticipatedHostError,
-- paInvalidChannelCount,
-- paInvalidSampleRate,
-- paInvalidDevice,
-- paInvalidFlag,
-- paSampleFormatNotSupported,
-- paBadIODeviceCombination,
-- paInsufficientMemory,
-- paBufferTooBig,
-- paBufferTooSmall,
-- paNullCallback,
-- paBadStreamPtr,
-- paTimedOut,
-- paInternalError,
-- paDeviceUnavailable,
-- paIncompatibleHostApiSpecificStreamInfo,
-- paStreamIsStopped,
-- paStreamIsNotStopped,
-- paInputOverflowed,
-- paOutputUnderflowed,
-- paHostApiNotFound,
-- paInvalidHostApi,
-- paCanNotReadFromACallbackStream, /**< @todo review error code name */
-- paCanNotWriteToACallbackStream, /**< @todo review error code name */
-- paCanNotReadFromAnOutputOnlyStream, /**< @todo review error code name */
-- paCanNotWriteToAnInputOnlyStream, /**< @todo review error code name */
-- paIncompatibleStreamHostApi,
-- paBadBufferPtr
--} PaErrorCode;
--
--
--/** Translate the supplied PortAudio error code into a human readable
-- message.
--*/
--const char *Pa_GetErrorText( PaError errorCode );
--
--
--/** Library initialization function - call this before using PortAudio.
-- This function initialises internal data structures and prepares underlying
-- host APIs for use. This function MUST be called before using any other
-- PortAudio API functions.
--
-- If Pa_Initialize() is called multiple times, each successful
-- call must be matched with a corresponding call to Pa_Terminate().
-- Pairs of calls to Pa_Initialize()/Pa_Terminate() may overlap, and are not
-- required to be fully nested.
--
-- Note that if Pa_Initialize() returns an error code, Pa_Terminate() should
-- NOT be called.
--
-- @return paNoError if successful, otherwise an error code indicating the cause
-- of failure.
--
-- @see Pa_Terminate
--*/
--PaError Pa_Initialize( void );
--
--
--/** Library termination function - call this when finished using PortAudio.
-- This function deallocates all resources allocated by PortAudio since it was
-- initializied by a call to Pa_Initialize(). In cases where Pa_Initialise() has
-- been called multiple times, each call must be matched with a corresponding call
-- to Pa_Terminate(). The final matching call to Pa_Terminate() will automatically
-- close any PortAudio streams that are still open.
--
-- Pa_Terminate() MUST be called before exiting a program which uses PortAudio.
-- Failure to do so may result in serious resource leaks, such as audio devices
-- not being available until the next reboot.
--
-- @return paNoError if successful, otherwise an error code indicating the cause
-- of failure.
--
-- @see Pa_Initialize
--*/
--PaError Pa_Terminate( void );
--
--
--
--/** The type used to refer to audio devices. Values of this type usually
-- range from 0 to (Pa_DeviceCount-1), and may also take on the PaNoDevice
-- and paUseHostApiSpecificDeviceSpecification values.
--
-- @see Pa_DeviceCount, paNoDevice, paUseHostApiSpecificDeviceSpecification
--*/
--typedef int PaDeviceIndex;
--
--
--/** A special PaDeviceIndex value indicating that no device is available,
-- or should be used.
--
-- @see PaDeviceIndex
--*/
--#define paNoDevice ((PaDeviceIndex)-1)
--
--
--/** A special PaDeviceIndex value indicating that the device(s) to be used
-- are specified in the host api specific stream info structure.
--
-- @see PaDeviceIndex
--*/
--#define paUseHostApiSpecificDeviceSpecification ((PaDeviceIndex)-2)
--
--
--/* Host API enumeration mechanism */
--
--/** The type used to enumerate to host APIs at runtime. Values of this type
-- range from 0 to (Pa_GetHostApiCount()-1).
--
-- @see Pa_GetHostApiCount
--*/
--typedef int PaHostApiIndex;
--
--
--/** Retrieve the number of available host APIs. Even if a host API is
-- available it may have no devices available.
--
-- @return A non-negative value indicating the number of available host APIs
-- or, a PaErrorCode (which are always negative) if PortAudio is not initialized
-- or an error is encountered.
--
-- @see PaHostApiIndex
--*/
--PaHostApiIndex Pa_GetHostApiCount( void );
--
--
--/** Retrieve the index of the default host API. The default host API will be
-- the lowest common denominator host API on the current platform and is
-- unlikely to provide the best performance.
--
-- @return A non-negative value ranging from 0 to (Pa_GetHostApiCount()-1)
-- indicating the default host API index or, a PaErrorCode (which are always
-- negative) if PortAudio is not initialized or an error is encountered.
--*/
--PaHostApiIndex Pa_GetDefaultHostApi( void );
--
--
--/** Unchanging unique identifiers for each supported host API. This type
-- is used in the PaHostApiInfo structure. The values are guaranteed to be
-- unique and to never change, thus allowing code to be written that
-- conditionally uses host API specific extensions.
--
-- New type ids will be allocated when support for a host API reaches
-- "public alpha" status, prior to that developers should use the
-- paInDevelopment type id.
--
-- @see PaHostApiInfo
--*/
--typedef enum PaHostApiTypeId
--{
-- paInDevelopment=0, /* use while developing support for a new host API */
-- paDirectSound=1,
-- paMME=2,
-- paASIO=3,
-- paSoundManager=4,
-- paCoreAudio=5,
-- paOSS=7,
-- paALSA=8,
-- paAL=9,
-- paBeOS=10,
-- paWDMKS=11,
-- paJACK=12,
-- paWASAPI=13,
-- paAudioScienceHPI=14
--} PaHostApiTypeId;
--
--
--/** A structure containing information about a particular host API. */
--
--typedef struct PaHostApiInfo
--{
-- /** this is struct version 1 */
-- int structVersion;
-- /** The well known unique identifier of this host API @see PaHostApiTypeId */
-- PaHostApiTypeId type;
-- /** A textual description of the host API for display on user interfaces. */
-- const char *name;
--
-- /** The number of devices belonging to this host API. This field may be
-- used in conjunction with Pa_HostApiDeviceIndexToDeviceIndex() to enumerate
-- all devices for this host API.
-- @see Pa_HostApiDeviceIndexToDeviceIndex
-- */
-- int deviceCount;
--
-- /** The default input device for this host API. The value will be a
-- device index ranging from 0 to (Pa_GetDeviceCount()-1), or paNoDevice
-- if no default input device is available.
-- */
-- PaDeviceIndex defaultInputDevice;
--
-- /** The default output device for this host API. The value will be a
-- device index ranging from 0 to (Pa_GetDeviceCount()-1), or paNoDevice
-- if no default output device is available.
-- */
-- PaDeviceIndex defaultOutputDevice;
--
--} PaHostApiInfo;
--
--
--/** Retrieve a pointer to a structure containing information about a specific
-- host Api.
--
-- @param hostApi A valid host API index ranging from 0 to (Pa_GetHostApiCount()-1)
--
-- @return A pointer to an immutable PaHostApiInfo structure describing
-- a specific host API. If the hostApi parameter is out of range or an error
-- is encountered, the function returns NULL.
--
-- The returned structure is owned by the PortAudio implementation and must not
-- be manipulated or freed. The pointer is only guaranteed to be valid between
-- calls to Pa_Initialize() and Pa_Terminate().
--*/
--const PaHostApiInfo * Pa_GetHostApiInfo( PaHostApiIndex hostApi );
--
--
--/** Convert a static host API unique identifier, into a runtime
-- host API index.
--
-- @param type A unique host API identifier belonging to the PaHostApiTypeId
-- enumeration.
--
-- @return A valid PaHostApiIndex ranging from 0 to (Pa_GetHostApiCount()-1) or,
-- a PaErrorCode (which are always negative) if PortAudio is not initialized
-- or an error is encountered.
--
-- The paHostApiNotFound error code indicates that the host API specified by the
-- type parameter is not available.
--
-- @see PaHostApiTypeId
--*/
--PaHostApiIndex Pa_HostApiTypeIdToHostApiIndex( PaHostApiTypeId type );
--
--
--/** Convert a host-API-specific device index to standard PortAudio device index.
-- This function may be used in conjunction with the deviceCount field of
-- PaHostApiInfo to enumerate all devices for the specified host API.
--
-- @param hostApi A valid host API index ranging from 0 to (Pa_GetHostApiCount()-1)
--
-- @param hostApiDeviceIndex A valid per-host device index in the range
-- 0 to (Pa_GetHostApiInfo(hostApi)->deviceCount-1)
--
-- @return A non-negative PaDeviceIndex ranging from 0 to (Pa_GetDeviceCount()-1)
-- or, a PaErrorCode (which are always negative) if PortAudio is not initialized
-- or an error is encountered.
--
-- A paInvalidHostApi error code indicates that the host API index specified by
-- the hostApi parameter is out of range.
--
-- A paInvalidDevice error code indicates that the hostApiDeviceIndex parameter
-- is out of range.
--
-- @see PaHostApiInfo
--*/
--PaDeviceIndex Pa_HostApiDeviceIndexToDeviceIndex( PaHostApiIndex hostApi,
-- int hostApiDeviceIndex );
--
--
--
--/** Structure used to return information about a host error condition.
--*/
--typedef struct PaHostErrorInfo{
-- PaHostApiTypeId hostApiType; /**< the host API which returned the error code */
-- long errorCode; /**< the error code returned */
-- const char *errorText; /**< a textual description of the error if available, otherwise a zero-length string */
--}PaHostErrorInfo;
--
--
--/** Return information about the last host error encountered. The error
-- information returned by Pa_GetLastHostErrorInfo() will never be modified
-- asyncronously by errors occurring in other PortAudio owned threads
-- (such as the thread that manages the stream callback.)
--
-- This function is provided as a last resort, primarily to enhance debugging
-- by providing clients with access to all available error information.
--
-- @return A pointer to an immutable structure constaining information about
-- the host error. The values in this structure will only be valid if a
-- PortAudio function has previously returned the paUnanticipatedHostError
-- error code.
--*/
--const PaHostErrorInfo* Pa_GetLastHostErrorInfo( void );
--
--
--
--/* Device enumeration and capabilities */
--
--/** Retrieve the number of available devices. The number of available devices
-- may be zero.
--
-- @return A non-negative value indicating the number of available devices or,
-- a PaErrorCode (which are always negative) if PortAudio is not initialized
-- or an error is encountered.
--*/
--PaDeviceIndex Pa_GetDeviceCount( void );
--
--
--/** Retrieve the index of the default input device. The result can be
-- used in the inputDevice parameter to Pa_OpenStream().
--
-- @return The default input device index for the default host API, or paNoDevice
-- if no default input device is available or an error was encountered.
--*/
--PaDeviceIndex Pa_GetDefaultInputDevice( void );
--
--
--/** Retrieve the index of the default output device. The result can be
-- used in the outputDevice parameter to Pa_OpenStream().
--
-- @return The default output device index for the defualt host API, or paNoDevice
-- if no default output device is available or an error was encountered.
--
-- @note
-- On the PC, the user can specify a default device by
-- setting an environment variable. For example, to use device #1.
--<pre>
-- set PA_RECOMMENDED_OUTPUT_DEVICE=1
--</pre>
-- The user should first determine the available device ids by using
-- the supplied application "pa_devs".
--*/
--PaDeviceIndex Pa_GetDefaultOutputDevice( void );
--
--
--/** The type used to represent monotonic time in seconds that can be used
-- for syncronisation. The type is used for the outTime argument to the
-- PaStreamCallback and as the result of Pa_GetStreamTime().
--
-- @see PaStreamCallback, Pa_GetStreamTime
--*/
--typedef double PaTime;
--
--
--/** A type used to specify one or more sample formats. Each value indicates
-- a possible format for sound data passed to and from the stream callback,
-- Pa_ReadStream and Pa_WriteStream.
--
-- The standard formats paFloat32, paInt16, paInt32, paInt24, paInt8
-- and aUInt8 are usually implemented by all implementations.
--
-- The floating point representation (paFloat32) uses +1.0 and -1.0 as the
-- maximum and minimum respectively.
--
-- paUInt8 is an unsigned 8 bit format where 128 is considered "ground"
--
-- The paNonInterleaved flag indicates that a multichannel buffer is passed
-- as a set of non-interleaved pointers.
--
-- @see Pa_OpenStream, Pa_OpenDefaultStream, PaDeviceInfo
-- @see paFloat32, paInt16, paInt32, paInt24, paInt8
-- @see paUInt8, paCustomFormat, paNonInterleaved
--*/
--typedef unsigned long PaSampleFormat;
--
--
--#define paFloat32 ((PaSampleFormat) 0x00000001) /**< @see PaSampleFormat */
--#define paInt32 ((PaSampleFormat) 0x00000002) /**< @see PaSampleFormat */
--#define paInt24 ((PaSampleFormat) 0x00000004) /**< Packed 24 bit format. @see PaSampleFormat */
--#define paInt16 ((PaSampleFormat) 0x00000008) /**< @see PaSampleFormat */
--#define paInt8 ((PaSampleFormat) 0x00000010) /**< @see PaSampleFormat */
--#define paUInt8 ((PaSampleFormat) 0x00000020) /**< @see PaSampleFormat */
--#define paCustomFormat ((PaSampleFormat) 0x00010000)/**< @see PaSampleFormat */
--
--#define paNonInterleaved ((PaSampleFormat) 0x80000000)
--
--/** A structure providing information and capabilities of PortAudio devices.
-- Devices may support input, output or both input and output.
--*/
--typedef struct PaDeviceInfo
--{
-- int structVersion; /* this is struct version 2 */
-- const char *name;
-- PaHostApiIndex hostApi; /* note this is a host API index, not a type id*/
--
-- int maxInputChannels;
-- int maxOutputChannels;
--
-- /* Default latency values for interactive performance. */
-- PaTime defaultLowInputLatency;
-- PaTime defaultLowOutputLatency;
-- /* Default latency values for robust non-interactive applications (eg. playing sound files). */
-- PaTime defaultHighInputLatency;
-- PaTime defaultHighOutputLatency;
--
-- double defaultSampleRate;
--} PaDeviceInfo;
--
--
--/** Retrieve a pointer to a PaDeviceInfo structure containing information
-- about the specified device.
-- @return A pointer to an immutable PaDeviceInfo structure. If the device
-- parameter is out of range the function returns NULL.
--
-- @param device A valid device index in the range 0 to (Pa_GetDeviceCount()-1)
--
-- @note PortAudio manages the memory referenced by the returned pointer,
-- the client must not manipulate or free the memory. The pointer is only
-- guaranteed to be valid between calls to Pa_Initialize() and Pa_Terminate().
--
-- @see PaDeviceInfo, PaDeviceIndex
--*/
--const PaDeviceInfo* Pa_GetDeviceInfo( PaDeviceIndex device );
--
--
--/** Parameters for one direction (input or output) of a stream.
--*/
--typedef struct PaStreamParameters
--{
-- /** A valid device index in the range 0 to (Pa_GetDeviceCount()-1)
-- specifying the device to be used or the special constant
-- paUseHostApiSpecificDeviceSpecification which indicates that the actual
-- device(s) to use are specified in hostApiSpecificStreamInfo.
-- This field must not be set to paNoDevice.
-- */
-- PaDeviceIndex device;
--
-- /** The number of channels of sound to be delivered to the
-- stream callback or accessed by Pa_ReadStream() or Pa_WriteStream().
-- It can range from 1 to the value of maxInputChannels in the
-- PaDeviceInfo record for the device specified by the device parameter.
-- */
-- int channelCount;
--
-- /** The sample format of the buffer provided to the stream callback,
-- a_ReadStream() or Pa_WriteStream(). It may be any of the formats described
-- by the PaSampleFormat enumeration.
-- */
-- PaSampleFormat sampleFormat;
--
-- /** The desired latency in seconds. Where practical, implementations should
-- configure their latency based on these parameters, otherwise they may
-- choose the closest viable latency instead. Unless the suggested latency
-- is greater than the absolute upper limit for the device implementations
-- should round the suggestedLatency up to the next practial value - ie to
-- provide an equal or higher latency than suggestedLatency wherever possibe.
-- Actual latency values for an open stream may be retrieved using the
-- inputLatency and outputLatency fields of the PaStreamInfo structure
-- returned by Pa_GetStreamInfo().
-- @see default*Latency in PaDeviceInfo, *Latency in PaStreamInfo
-- */
-- PaTime suggestedLatency;
--
-- /** An optional pointer to a host api specific data structure
-- containing additional information for device setup and/or stream processing.
-- hostApiSpecificStreamInfo is never required for correct operation,
-- if not used it should be set to NULL.
-- */
-- void *hostApiSpecificStreamInfo;
--
--} PaStreamParameters;
--
--
--/** Return code for Pa_IsFormatSupported indicating success. */
--#define paFormatIsSupported (0)
--
--/** Determine whether it would be possible to open a stream with the specified
-- parameters.
--
-- @param inputParameters A structure that describes the input parameters used to
-- open a stream. The suggestedLatency field is ignored. See PaStreamParameters
-- for a description of these parameters. inputParameters must be NULL for
-- output-only streams.
--
-- @param outputParameters A structure that describes the output parameters used
-- to open a stream. The suggestedLatency field is ignored. See PaStreamParameters
-- for a description of these parameters. outputParameters must be NULL for
-- input-only streams.
--
-- @param sampleRate The required sampleRate. For full-duplex streams it is the
-- sample rate for both input and output
--
-- @return Returns 0 if the format is supported, and an error code indicating why
-- the format is not supported otherwise. The constant paFormatIsSupported is
-- provided to compare with the return value for success.
--
-- @see paFormatIsSupported, PaStreamParameters
--*/
--PaError Pa_IsFormatSupported( const PaStreamParameters *inputParameters,
-- const PaStreamParameters *outputParameters,
-- double sampleRate );
--
--
--
--/* Streaming types and functions */
--
--
--/**
-- A single PaStream can provide multiple channels of real-time
-- streaming audio input and output to a client application. A stream
-- provides access to audio hardware represented by one or more
-- PaDevices. Depending on the underlying Host API, it may be possible
-- to open multiple streams using the same device, however this behavior
-- is implementation defined. Portable applications should assume that
-- a PaDevice may be simultaneously used by at most one PaStream.
--
-- Pointers to PaStream objects are passed between PortAudio functions that
-- operate on streams.
--
-- @see Pa_OpenStream, Pa_OpenDefaultStream, Pa_OpenDefaultStream, Pa_CloseStream,
-- Pa_StartStream, Pa_StopStream, Pa_AbortStream, Pa_IsStreamActive,
-- Pa_GetStreamTime, Pa_GetStreamCpuLoad
--
--*/
--typedef void PaStream;
--
--
--/** Can be passed as the framesPerBuffer parameter to Pa_OpenStream()
-- or Pa_OpenDefaultStream() to indicate that the stream callback will
-- accept buffers of any size.
--*/
--#define paFramesPerBufferUnspecified (0)
--
--
--/** Flags used to control the behavior of a stream. They are passed as
-- parameters to Pa_OpenStream or Pa_OpenDefaultStream. Multiple flags may be
-- ORed together.
--
-- @see Pa_OpenStream, Pa_OpenDefaultStream
-- @see paNoFlag, paClipOff, paDitherOff, paNeverDropInput,
-- paPrimeOutputBuffersUsingStreamCallback, paPlatformSpecificFlags
--*/
--typedef unsigned long PaStreamFlags;
--
--/** @see PaStreamFlags */
--#define paNoFlag ((PaStreamFlags) 0)
--
--/** Disable default clipping of out of range samples.
-- @see PaStreamFlags
--*/
--#define paClipOff ((PaStreamFlags) 0x00000001)
--
--/** Disable default dithering.
-- @see PaStreamFlags
--*/
--#define paDitherOff ((PaStreamFlags) 0x00000002)
--
--/** Flag requests that where possible a full duplex stream will not discard
-- overflowed input samples without calling the stream callback. This flag is
-- only valid for full duplex callback streams and only when used in combination
-- with the paFramesPerBufferUnspecified (0) framesPerBuffer parameter. Using
-- this flag incorrectly results in a paInvalidFlag error being returned from
-- Pa_OpenStream and Pa_OpenDefaultStream.
--
-- @see PaStreamFlags, paFramesPerBufferUnspecified
--*/
--#define paNeverDropInput ((PaStreamFlags) 0x00000004)
--
--/** Call the stream callback to fill initial output buffers, rather than the
-- default behavior of priming the buffers with zeros (silence). This flag has
-- no effect for input-only and blocking read/write streams.
--
-- @see PaStreamFlags
--*/
--#define paPrimeOutputBuffersUsingStreamCallback ((PaStreamFlags) 0x00000008)
--
--/** A mask specifying the platform specific bits.
-- @see PaStreamFlags
--*/
--#define paPlatformSpecificFlags ((PaStreamFlags)0xFFFF0000)
--
--/**
-- Timing information for the buffers passed to the stream callback.
--*/
--typedef struct PaStreamCallbackTimeInfo{
-- PaTime inputBufferAdcTime;
-- PaTime currentTime;
-- PaTime outputBufferDacTime;
--} PaStreamCallbackTimeInfo;
--
--
--/**
-- Flag bit constants for the statusFlags to PaStreamCallback.
--
-- @see paInputUnderflow, paInputOverflow, paOutputUnderflow, paOutputOverflow,
-- paPrimingOutput
--*/
--typedef unsigned long PaStreamCallbackFlags;
--
--/** In a stream opened with paFramesPerBufferUnspecified, indicates that
-- input data is all silence (zeros) because no real data is available. In a
-- stream opened without paFramesPerBufferUnspecified, it indicates that one or
-- more zero samples have been inserted into the input buffer to compensate
-- for an input underflow.
-- @see PaStreamCallbackFlags
--*/
--#define paInputUnderflow ((PaStreamCallbackFlags) 0x00000001)
--
--/** In a stream opened with paFramesPerBufferUnspecified, indicates that data
-- prior to the first sample of the input buffer was discarded due to an
-- overflow, possibly because the stream callback is using too much CPU time.
-- Otherwise indicates that data prior to one or more samples in the
-- input buffer was discarded.
-- @see PaStreamCallbackFlags
--*/
--#define paInputOverflow ((PaStreamCallbackFlags) 0x00000002)
--
--/** Indicates that output data (or a gap) was inserted, possibly because the
-- stream callback is using too much CPU time.
-- @see PaStreamCallbackFlags
--*/
--#define paOutputUnderflow ((PaStreamCallbackFlags) 0x00000004)
--
--/** Indicates that output data will be discarded because no room is available.
-- @see PaStreamCallbackFlags
--*/
--#define paOutputOverflow ((PaStreamCallbackFlags) 0x00000008)
--
--/** Some of all of the output data will be used to prime the stream, input
-- data may be zero.
-- @see PaStreamCallbackFlags
--*/
--#define paPrimingOutput ((PaStreamCallbackFlags) 0x00000010)
--
--/**
-- Allowable return values for the PaStreamCallback.
-- @see PaStreamCallback
--*/
--typedef enum PaStreamCallbackResult
--{
-- paContinue=0,
-- paComplete=1,
-- paAbort=2
--} PaStreamCallbackResult;
--
--
--/**
-- Functions of type PaStreamCallback are implemented by PortAudio clients.
-- They consume, process or generate audio in response to requests from an
-- active PortAudio stream.
--
-- @param input and @param output are arrays of interleaved samples,
-- the format, packing and number of channels used by the buffers are
-- determined by parameters to Pa_OpenStream().
--
-- @param frameCount The number of sample frames to be processed by
-- the stream callback.
--
-- @param timeInfo The time in seconds when the first sample of the input
-- buffer was received at the audio input, the time in seconds when the first
-- sample of the output buffer will begin being played at the audio output, and
-- the time in seconds when the stream callback was called.
-- See also Pa_GetStreamTime()
--
-- @param statusFlags Flags indicating whether input and/or output buffers
-- have been inserted or will be dropped to overcome underflow or overflow
-- conditions.
--
-- @param userData The value of a user supplied pointer passed to
-- Pa_OpenStream() intended for storing synthesis data etc.
--
-- @return
-- The stream callback should return one of the values in the
-- PaStreamCallbackResult enumeration. To ensure that the callback continues
-- to be called, it should return paContinue (0). Either paComplete or paAbort
-- can be returned to finish stream processing, after either of these values is
-- returned the callback will not be called again. If paAbort is returned the
-- stream will finish as soon as possible. If paComplete is returned, the stream
-- will continue until all buffers generated by the callback have been played.
-- This may be useful in applications such as soundfile players where a specific
-- duration of output is required. However, it is not necessary to utilise this
-- mechanism as Pa_StopStream(), Pa_AbortStream() or Pa_CloseStream() can also
-- be used to stop the stream. The callback must always fill the entire output
-- buffer irrespective of its return value.
--
-- @see Pa_OpenStream, Pa_OpenDefaultStream
--
-- @note With the exception of Pa_GetStreamCpuLoad() it is not permissable to call
-- PortAudio API functions from within the stream callback.
--*/
--typedef int PaStreamCallback(
-- const void *input, void *output,
-- unsigned long frameCount,
-- const PaStreamCallbackTimeInfo* timeInfo,
-- PaStreamCallbackFlags statusFlags,
-- void *userData );
--
--
--/** Opens a stream for either input, output or both.
--
-- @param stream The address of a PaStream pointer which will receive
-- a pointer to the newly opened stream.
--
-- @param inputParameters A structure that describes the input parameters used by
-- the opened stream. See PaStreamParameters for a description of these parameters.
-- inputParameters must be NULL for output-only streams.
--
-- @param outputParameters A structure that describes the output parameters used by
-- the opened stream. See PaStreamParameters for a description of these parameters.
-- outputParameters must be NULL for input-only streams.
--
-- @param sampleRate The desired sampleRate. For full-duplex streams it is the
-- sample rate for both input and output
--
-- @param framesPerBuffer The number of frames passed to the stream callback
-- function, or the preferred block granularity for a blocking read/write stream.
-- The special value paFramesPerBufferUnspecified (0) may be used to request that
-- the stream callback will recieve an optimal (and possibly varying) number of
-- frames based on host requirements and the requested latency settings.
-- Note: With some host APIs, the use of non-zero framesPerBuffer for a callback
-- stream may introduce an additional layer of buffering which could introduce
-- additional latency. PortAudio guarantees that the additional latency
-- will be kept to the theoretical minimum however, it is strongly recommended
-- that a non-zero framesPerBuffer value only be used when your algorithm
-- requires a fixed number of frames per stream callback.
--
-- @param streamFlags Flags which modify the behaviour of the streaming process.
-- This parameter may contain a combination of flags ORed together. Some flags may
-- only be relevant to certain buffer formats.
--
-- @param streamCallback A pointer to a client supplied function that is responsible
-- for processing and filling input and output buffers. If this parameter is NULL
-- the stream will be opened in 'blocking read/write' mode. In blocking mode,
-- the client can receive sample data using Pa_ReadStream and write sample data
-- using Pa_WriteStream, the number of samples that may be read or written
-- without blocking is returned by Pa_GetStreamReadAvailable and
-- Pa_GetStreamWriteAvailable respectively.
--
-- @param userData A client supplied pointer which is passed to the stream callback
-- function. It could for example, contain a pointer to instance data necessary
-- for processing the audio buffers. This parameter is ignored if streamCallback
-- is NULL.
--
-- @return
-- Upon success Pa_OpenStream() returns paNoError and places a pointer to a
-- valid PaStream in the stream argument. The stream is inactive (stopped).
-- If a call to Pa_OpenStream() fails, a non-zero error code is returned (see
-- PaError for possible error codes) and the value of stream is invalid.
--
-- @see PaStreamParameters, PaStreamCallback, Pa_ReadStream, Pa_WriteStream,
-- Pa_GetStreamReadAvailable, Pa_GetStreamWriteAvailable
--*/
--PaError Pa_OpenStream( PaStream** stream,
-- const PaStreamParameters *inputParameters,
-- const PaStreamParameters *outputParameters,
-- double sampleRate,
-- unsigned long framesPerBuffer,
-- PaStreamFlags streamFlags,
-- PaStreamCallback *streamCallback,
-- void *userData );
--
--
--/** A simplified version of Pa_OpenStream() that opens the default input
-- and/or output devices.
--
-- @param stream The address of a PaStream pointer which will receive
-- a pointer to the newly opened stream.
--
-- @param numInputChannels The number of channels of sound that will be supplied
-- to the stream callback or returned by Pa_ReadStream. It can range from 1 to
-- the value of maxInputChannels in the PaDeviceInfo record for the default input
-- device. If 0 the stream is opened as an output-only stream.
--
-- @param numOutputChannels The number of channels of sound to be delivered to the
-- stream callback or passed to Pa_WriteStream. It can range from 1 to the value
-- of maxOutputChannels in the PaDeviceInfo record for the default output dvice.
-- If 0 the stream is opened as an output-only stream.
--
-- @param sampleFormat The sample format of both the input and output buffers
-- provided to the callback or passed to and from Pa_ReadStream and Pa_WriteStream.
-- sampleFormat may be any of the formats described by the PaSampleFormat
-- enumeration.
--
-- @param sampleRate Same as Pa_OpenStream parameter of the same name.
-- @param framesPerBuffer Same as Pa_OpenStream parameter of the same name.
-- @param streamCallback Same as Pa_OpenStream parameter of the same name.
-- @param userData Same as Pa_OpenStream parameter of the same name.
--
-- @return As for Pa_OpenStream
--
-- @see Pa_OpenStream, PaStreamCallback
--*/
--PaError Pa_OpenDefaultStream( PaStream** stream,
-- int numInputChannels,
-- int numOutputChannels,
-- PaSampleFormat sampleFormat,
-- double sampleRate,
-- unsigned long framesPerBuffer,
-- PaStreamCallback *streamCallback,
-- void *userData );
--
--
--/** Closes an audio stream. If the audio stream is active it
-- discards any pending buffers as if Pa_AbortStream() had been called.
--*/
--PaError Pa_CloseStream( PaStream *stream );
--
--
--/** Functions of type PaStreamFinishedCallback are implemented by PortAudio
-- clients. They can be registered with a stream using the Pa_SetStreamFinishedCallback
-- function. Once registered they are called when the stream becomes inactive
-- (ie once a call to Pa_StopStream() will not block).
-- A stream will become inactive after the stream callback returns non-zero,
-- or when Pa_StopStream or Pa_AbortStream is called. For a stream providing audio
-- output, if the stream callback returns paComplete, or Pa_StopStream is called,
-- the stream finished callback will not be called until all generated sample data
-- has been played.
--
-- @param userData The userData parameter supplied to Pa_OpenStream()
--
-- @see Pa_SetStreamFinishedCallback
--*/
--typedef void PaStreamFinishedCallback( void *userData );
--
--
--/** Register a stream finished callback function which will be called when the
-- stream becomes inactive. See the description of PaStreamFinishedCallback for
-- further details about when the callback will be called.
--
-- @param stream a pointer to a PaStream that is in the stopped state - if the
-- stream is not stopped, the stream's finished callback will remain unchanged
-- and an error code will be returned.
--
-- @param streamFinishedCallback a pointer to a function with the same signature
-- as PaStreamFinishedCallback, that will be called when the stream becomes
-- inactive. Passing NULL for this parameter will un-register a previously
-- registered stream finished callback function.
--
-- @return on success returns paNoError, otherwise an error code indicating the cause
-- of the error.
--
-- @see PaStreamFinishedCallback
--*/
--PaError Pa_SetStreamFinishedCallback( PaStream *stream, PaStreamFinishedCallback* streamFinishedCallback );
--
--
--/** Commences audio processing.
--*/
--PaError Pa_StartStream( PaStream *stream );
--
--
--/** Terminates audio processing. It waits until all pending
-- audio buffers have been played before it returns.
--*/
--PaError Pa_StopStream( PaStream *stream );
--
--
--/** Terminates audio processing immediately without waiting for pending
-- buffers to complete.
--*/
--PaError Pa_AbortStream( PaStream *stream );
--
--
--/** Determine whether the stream is stopped.
-- A stream is considered to be stopped prior to a successful call to
-- Pa_StartStream and after a successful call to Pa_StopStream or Pa_AbortStream.
-- If a stream callback returns a value other than paContinue the stream is NOT
-- considered to be stopped.
--
-- @return Returns one (1) when the stream is stopped, zero (0) when
-- the stream is running or, a PaErrorCode (which are always negative) if
-- PortAudio is not initialized or an error is encountered.
--
-- @see Pa_StopStream, Pa_AbortStream, Pa_IsStreamActive
--*/
--PaError Pa_IsStreamStopped( PaStream *stream );
--
--
--/** Determine whether the stream is active.
-- A stream is active after a successful call to Pa_StartStream(), until it
-- becomes inactive either as a result of a call to Pa_StopStream() or
-- Pa_AbortStream(), or as a result of a return value other than paContinue from
-- the stream callback. In the latter case, the stream is considered inactive
-- after the last buffer has finished playing.
--
-- @return Returns one (1) when the stream is active (ie playing or recording
-- audio), zero (0) when not playing or, a PaErrorCode (which are always negative)
-- if PortAudio is not initialized or an error is encountered.
--
-- @see Pa_StopStream, Pa_AbortStream, Pa_IsStreamStopped
--*/
--PaError Pa_IsStreamActive( PaStream *stream );
--
--
--
--/** A structure containing unchanging information about an open stream.
-- @see Pa_GetStreamInfo
--*/
--
--typedef struct PaStreamInfo
--{
-- /** this is struct version 1 */
-- int structVersion;
--
-- /** The input latency of the stream in seconds. This value provides the most
-- accurate estimate of input latency available to the implementation. It may
-- differ significantly from the suggestedLatency value passed to Pa_OpenStream().
-- The value of this field will be zero (0.) for output-only streams.
-- @see PaTime
-- */
-- PaTime inputLatency;
--
-- /** The output latency of the stream in seconds. This value provides the most
-- accurate estimate of output latency available to the implementation. It may
-- differ significantly from the suggestedLatency value passed to Pa_OpenStream().
-- The value of this field will be zero (0.) for input-only streams.
-- @see PaTime
-- */
-- PaTime outputLatency;
--
-- /** The sample rate of the stream in Hertz (samples per second). In cases
-- where the hardware sample rate is inaccurate and PortAudio is aware of it,
-- the value of this field may be different from the sampleRate parameter
-- passed to Pa_OpenStream(). If information about the actual hardware sample
-- rate is not available, this field will have the same value as the sampleRate
-- parameter passed to Pa_OpenStream().
-- */
-- double sampleRate;
--
--} PaStreamInfo;
--
--
--/** Retrieve a pointer to a PaStreamInfo structure containing information
-- about the specified stream.
-- @return A pointer to an immutable PaStreamInfo structure. If the stream
-- parameter invalid, or an error is encountered, the function returns NULL.
--
-- @param stream A pointer to an open stream previously created with Pa_OpenStream.
--
-- @note PortAudio manages the memory referenced by the returned pointer,
-- the client must not manipulate or free the memory. The pointer is only
-- guaranteed to be valid until the specified stream is closed.
--
-- @see PaStreamInfo
--*/
--const PaStreamInfo* Pa_GetStreamInfo( PaStream *stream );
--
--
--/** Determine the current time for the stream according to the same clock used
-- to generate buffer timestamps. This time may be used for syncronising other
-- events to the audio stream, for example synchronizing audio to MIDI.
--
-- @return The stream's current time in seconds, or 0 if an error occurred.
--
-- @see PaTime, PaStreamCallback
--*/
--PaTime Pa_GetStreamTime( PaStream *stream );
--
--
--/** Retrieve CPU usage information for the specified stream.
-- The "CPU Load" is a fraction of total CPU time consumed by a callback stream's
-- audio processing routines including, but not limited to the client supplied
-- stream callback. This function does not work with blocking read/write streams.
--
-- This function may be called from the stream callback function or the
-- application.
--
-- @return
-- A floating point value, typically between 0.0 and 1.0, where 1.0 indicates
-- that the stream callback is consuming the maximum number of CPU cycles possible
-- to maintain real-time operation. A value of 0.5 would imply that PortAudio and
-- the stream callback was consuming roughly 50% of the available CPU time. The
-- return value may exceed 1.0. A value of 0.0 will always be returned for a
-- blocking read/write stream, or if an error occurrs.
--*/
--double Pa_GetStreamCpuLoad( PaStream* stream );
--
--
--/** Read samples from an input stream. The function doesn't return until
-- the entire buffer has been filled - this may involve waiting for the operating
-- system to supply the data.
--
-- @param stream A pointer to an open stream previously created with Pa_OpenStream.
--
-- @param buffer A pointer to a buffer of sample frames. The buffer contains
-- samples in the format specified by the inputParameters->sampleFormat field
-- used to open the stream, and the number of channels specified by
-- inputParameters->numChannels. If non-interleaved samples were requested,
-- buffer is a pointer to the first element of an array of non-interleaved
-- buffer pointers, one for each channel.
--
-- @param frames The number of frames to be read into buffer. This parameter
-- is not constrained to a specific range, however high performance applications
-- will want to match this parameter to the framesPerBuffer parameter used
-- when opening the stream.
--
-- @return On success PaNoError will be returned, or PaInputOverflowed if input
-- data was discarded by PortAudio after the previous call and before this call.
--*/
--PaError Pa_ReadStream( PaStream* stream,
-- void *buffer,
-- unsigned long frames );
--
--
--/** Write samples to an output stream. This function doesn't return until the
-- entire buffer has been consumed - this may involve waiting for the operating
-- system to consume the data.
--
-- @param stream A pointer to an open stream previously created with Pa_OpenStream.
--
-- @param buffer A pointer to a buffer of sample frames. The buffer contains
-- samples in the format specified by the outputParameters->sampleFormat field
-- used to open the stream, and the number of channels specified by
-- outputParameters->numChannels. If non-interleaved samples were requested,
-- buffer is a pointer to the first element of an array of non-interleaved
-- buffer pointers, one for each channel.
--
-- @param frames The number of frames to be written from buffer. This parameter
-- is not constrained to a specific range, however high performance applications
-- will want to match this parameter to the framesPerBuffer parameter used
-- when opening the stream.
--
-- @return On success PaNoError will be returned, or paOutputUnderflowed if
-- additional output data was inserted after the previous call and before this
-- call.
--*/
--PaError Pa_WriteStream( PaStream* stream,
-- const void *buffer,
-- unsigned long frames );
--
--
--/** Retrieve the number of frames that can be read from the stream without
-- waiting.
--
-- @return Returns a non-negative value representing the maximum number of frames
-- that can be read from the stream without blocking or busy waiting or, a
-- PaErrorCode (which are always negative) if PortAudio is not initialized or an
-- error is encountered.
--*/
--signed long Pa_GetStreamReadAvailable( PaStream* stream );
--
--
--/** Retrieve the number of frames that can be written to the stream without
-- waiting.
--
-- @return Returns a non-negative value representing the maximum number of frames
-- that can be written to the stream without blocking or busy waiting or, a
-- PaErrorCode (which are always negative) if PortAudio is not initialized or an
-- error is encountered.
--*/
--signed long Pa_GetStreamWriteAvailable( PaStream* stream );
--
--
--/* Miscellaneous utilities */
--
--
--/** Retrieve the size of a given sample format in bytes.
--
-- @return The size in bytes of a single sample in the specified format,
-- or paSampleFormatNotSupported if the format is not supported.
--*/
--PaError Pa_GetSampleSize( PaSampleFormat format );
--
--
--/** Put the caller to sleep for at least 'msec' milliseconds. This function is
-- provided only as a convenience for authors of portable code (such as the tests
-- and examples in the PortAudio distribution.)
--
-- The function may sleep longer than requested so don't rely on this for accurate
-- musical timing.
--*/
--void Pa_Sleep( long msec );
--
--
--
--#ifdef __cplusplus
--}
--#endif /* __cplusplus */
--#endif /* PORTAUDIO_H */
---- a/src/wave.cpp
-+++ b/src/wave.cpp
-@@ -31,7 +31,10 @@
- #include <sys/time.h>
- #include <time.h>
-
--#include "portaudio.h"
-+#ifdef USE_PORTAUDIO
-+#include <portaudio.h>
-+#endif
-+
- #ifdef PLATFORM_WINDOWS
- #include <windows.h>
- #else
---- a/src/wavegen.cpp
-+++ b/src/wavegen.cpp
-@@ -40,7 +40,7 @@
- #endif
-
- #ifdef USE_PORTAUDIO
--#include "portaudio.h"
-+#include <portaudio.h>
- #undef USE_PORTAUDIO
- // determine portaudio version by looking for a #define which is not in V18
- #ifdef paNeverDropInput
include $(TOPDIR)/rules.mk
PKG_NAME:=forked-daapd
-PKG_VERSION:=26.1
+PKG_VERSION:=26.4
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/ejurgensen/$(PKG_NAME)/releases/download/$(PKG_VERSION)/
-PKG_HASH:=dec7a6b5879c43726ceeb40cb16b77f7bb3148ab4e0afec0947629b11f302720
+PKG_HASH:=c37012faf56238544fc7274ad0ade7bf16c15a9ae6af9ef4ba56ba88e508fffa
PKG_FIXUP:=autoreconf
PKG_USE_MIPS16:=0
--enable-mpd \
--enable-chromecast \
--enable-verification \
+ --enable-webinterface \
--disable-spotify \
--with-libplist \
--with-libwebsockets \
include $(TOPDIR)/rules.mk
PKG_NAME:=mpd
-PKG_VERSION:=0.20.20
+PKG_VERSION:=0.20.21
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://www.musicpd.org/download/mpd/0.20/
-PKG_HASH:=a9e458c6e07cdf62649de7722e1e5a7f13aa82eeb397bfbbebc07cf5cf273584
+PKG_HASH:=8322764dc265c20f05c8c8fdfdd578b0722e74626bef56fcd8eebfb01acc58dc
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
PKG_LICENSE:=GPL-2.0
--disable-vorbis-encoder \
--enable-wave-encoder \
--disable-wavpack \
- --disable-webdav \
- --disable-wildmidi \
+ --enable-webdav \
--disable-zzip \
--with-zeroconf=no \
--disable-soxr \
include $(TOPDIR)/rules.mk
PKG_NAME:=pianod
-PKG_VERSION:=174.07
+PKG_VERSION:=174.09
PKG_RELEASE:=1
PKG_SOURCE_URL:=https://github.com/thess/pianod-sc/releases/download/$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_HASH:=eee969926c095497893fbd28711258a31efb2d2301da87563dbcd101d8771bff
+PKG_HASH:=744c833ee17a7c95068c6925f4301f342bcad838ad8e48b40a19fd6739533eac
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
include $(TOPDIR)/rules.mk
PKG_NAME:=portaudio
-PKG_VERSION:=19_20140130
-PKG_RELEASE:=2
+PKG_VERSION:=190600_20161030
+PKG_RELEASE:=1
PKG_SOURCE:=pa_stable_v$(PKG_VERSION).tgz
PKG_SOURCE_URL:=http://www.portaudio.com/archives/
-PKG_HASH:=8fe024a5f0681e112c6979808f684c3516061cc51d3acc0b726af98fc96c8d57
+PKG_HASH:=f5a21d7dcd6ee84397446fa1fa1a0675bb2e8a4a6dceb4305a8404698d8d1513
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE.txt
PKG_NAME:=shairport-sync
PKG_VERSION:=3.2.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/mikebrady/shairport-sync.git
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/shairport-sync.init $(1)/etc/init.d/shairport-sync
$(INSTALL_DIR) $(1)/etc/config
- $(INSTALL_DATA) ./files/shairport-sync.config $(1)/etc/config/shairport-sync
+ $(INSTALL_CONF) ./files/shairport-sync.config $(1)/etc/config/shairport-sync
endef
Package/shairport-sync-openssl/install = $(Package/shairport-sync/default/install)
include $(TOPDIR)/rules.mk
PKG_NAME:=acpica-unix
-PKG_VERSION:=20180629
+PKG_VERSION:=20180927
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://acpica.org/sites/$(patsubst %-unix,%,$(PKG_NAME))/files/$(PKG_SOURCE_URL)
-PKG_HASH:=70d11f3f2adbdc64a5b33753e1889918af811ec8050722fbee0fdfc3bfd29a4f
+PKG_HASH:=dc408d11889bcbedcfe9cc5b7ed23f65e857ca8fd5125f8c7a9e075e0b282db1
PKG_MAINTAINER:=Philip Prindeville <philipp@redfish-solutions.com>
PKG_LICENSE:=GPL-2.0
include $(TOPDIR)/rules.mk
PKG_NAME:=at
-PKG_VERSION:=3.1.20
+PKG_VERSION:=3.1.23
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/a/at
-PKG_HASH:=0871923cab73050b98ace020664eb2ddc1e669e4166b5abb64d864d02fcefab9
+PKG_HASH:=97450aa954aaa8a70218cc8e61a33df9fee9f86527e9f861de302fb7a3c81710
PKG_LICENSE:=GPL-2.0+ GPL-3.0+ ISC
PKG_LICENSE_FILES:=COPYING Copyright
PKG_NAME:=bandwidthd
PKG_VERSION:=2.0.1-35
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/NethServer/bandwidthd/tar.gz/$(PKG_VERSION)?
ac_cv_lib_sqlite3_sqlite3_open=no
endif
-EXTRA_CFLAGS+= $(TARGET_CPPFLAGS)
+EXTRA_CFLAGS+= $(TARGET_CPPFLAGS) -fgnu89-inline
EXTRA_LDFLAGS+= $(TARGET_LDFLAGS) -Wl,-rpath-link,$(STAGING_DIR)/usr/lib
define Package/bandwidthd/install
PKG_NAME:=bluelog
PKG_VERSION:=1.1.2
-PKG_RELEASE:=2
+PKG_RELEASE:=4
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=ftp://ftp.digifail.com/software/bluelog
-PKG_HASH:=9750b007daffaffecea3b8dd2332bf74cc24955c307861197a20d04d845bc412
+PKG_SOURCE:=Bluelog-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/MS3FGX/Bluelog/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=ebbc1357e14bc46cbddd8390cdbd29c0131b09b8ab680a1c382164ef076cb53e
+PKG_BUILD_DIR:=$(BUILD_DIR)/Bluelog-$(PKG_VERSION)
OUI_SOURCE:=oui-2016-05-30.txt.gz
-OUI_URL:=http://sources.lede-project.org/
+OUI_URL:=https://sources.openwrt.org/
OUI_MD5SUM:=38048729fdb5a7a7e0c5db6a51dc2dd1
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Bluetooth scanner and logger
- URL:=http://www.digifail.com/software/bluelog.shtml
+ URL:=https://github.com/MS3FGX/Bluelog
DEPENDS:=+bluez-libs +kmod-bluetooth
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=bluez
-PKG_VERSION:=5.49
-PKG_RELEASE:=2
+PKG_VERSION:=5.50
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/linux/bluetooth/
-PKG_HASH:=33301d7a514c73d535ee1f91c2aed1af1f2e53efe11d3ac06bcf0d7abed2ce95
+PKG_HASH:=5ffcaae18bbb6155f1591be8c24898dc12f062075a40b538b745bfd477481911
PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
+PKG_MAINTAINER:=
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
$(CP) $(PKG_INSTALL_DIR)/usr/lib/bluetooth/bluetoothd $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/bluetoothctl $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/bluetooth/obexd $(1)/usr/bin/
- $(INSTALL_DIR) $(1)/etc/config
- $(INSTALL_DATA) ./files/bluetooth.config $(1)/etc/config/bluetooth
$(INSTALL_DIR) $(1)/etc/dbus-1/system.d/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/bluetooth.conf $(1)/etc/dbus-1/system.d/bluetooth.conf
$(INSTALL_DIR) $(1)/etc/bluetooth
+++ /dev/null
-config bluetoothd
-# option config /etc/bluetooth/main.conf
- option enabled 1
-
-config hciattach
- option initspeed 115200
- option tty ttyS1
- option type csr
- option speed 115200
- option flow noflow
- option enabled 0
-
-config rfcomm
-# option config /etc/bluetooth/rfcomm.conf
- option enabled 0
---- a/Makefile.in 2017-09-14 11:47:06.000000000 +0200
-+++ b/Makefile.in 2017-09-15 02:52:39.315926972 +0200
-@@ -2472,7 +2472,7 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -2547,7 +2547,7 @@ unit_tests = $(am__append_52) unit/test-
@CLIENT_TRUE@ client/gatt.h client/gatt.c
@CLIENT_TRUE@client_bluetoothctl_LDADD = gdbus/libgdbus-internal.la src/libshared-glib.la \
@MESH_TRUE@mesh_meshctl_SOURCES = mesh/main.c \
@MESH_TRUE@ mesh/mesh-net.h \
-@@ -2491,7 +2491,7 @@
+@@ -2566,7 +2566,7 @@ unit_tests = $(am__append_52) unit/test-
@MESH_TRUE@mesh_meshctl_LDADD = gdbus/libgdbus-internal.la src/libshared-glib.la \
@MESH_TRUE@ lib/libbluetooth-internal.la \
@MONITOR_TRUE@monitor_btmon_SOURCES = monitor/main.c monitor/bt.h \
@MONITOR_TRUE@ monitor/display.h monitor/display.c \
-@@ -2747,7 +2747,7 @@
+@@ -2827,7 +2827,7 @@ unit_tests = $(am__append_52) unit/test-
@READLINE_TRUE@ tools/obex-client-tool.c
@READLINE_TRUE@tools_obex_client_tool_LDADD = lib/libbluetooth-internal.la \
@READLINE_TRUE@tools_obex_server_tool_SOURCES = $(gobex_sources) $(btio_sources) \
@READLINE_TRUE@ tools/obex-server-tool.c
-@@ -2756,15 +2756,15 @@
+@@ -2836,15 +2836,15 @@ unit_tests = $(am__append_52) unit/test-
@READLINE_TRUE@tools_bluetooth_player_SOURCES = tools/bluetooth-player.c
@READLINE_TRUE@tools_bluetooth_player_LDADD = gdbus/libgdbus-internal.la \
@READLINE_TRUE@ src/libshared-glib.la \
@DEPRECATED_TRUE@@READLINE_TRUE@attrib_gatttool_SOURCES = attrib/gatttool.c attrib/att.c attrib/gatt.c \
@DEPRECATED_TRUE@@READLINE_TRUE@ attrib/gattrib.c btio/btio.c \
-@@ -2773,7 +2773,7 @@
+@@ -2853,7 +2853,7 @@ unit_tests = $(am__append_52) unit/test-
@DEPRECATED_TRUE@@READLINE_TRUE@ client/display.h
@DEPRECATED_TRUE@@READLINE_TRUE@attrib_gatttool_LDADD = lib/libbluetooth-internal.la \
---- a/src/shared/util.h.old 2016-09-26 07:29:00.000000000 -0500
-+++ b/src/shared/util.h 2017-12-27 22:49:50.538716424 -0600
+--- a/src/shared/util.h
++++ b/src/shared/util.h
@@ -26,6 +26,7 @@
#include <alloca.h>
#include <byteswap.h>
delete mode 100644 obexd/src/org.bluez.obex.service
create mode 100644 obexd/src/org.bluez.obex.service.in
-diff --git a/Makefile.obexd b/Makefile.obexd
-index 3760867..142e7c3 100644
--- a/Makefile.obexd
+++ b/Makefile.obexd
-@@ -2,12 +2,12 @@
+@@ -1,12 +1,12 @@
if SYSTEMD
systemduserunitdir = @SYSTEMD_USERUNITDIR@
systemduserunit_DATA = obexd/src/obex.service
-EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service
+EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service.in
- obex_plugindir = $(libdir)/obex/plugins
+ if OBEX
-diff --git a/obexd/src/org.bluez.obex.service b/obexd/src/org.bluez.obex.service
-deleted file mode 100644
-index a538088..0000000
--- a/obexd/src/org.bluez.obex.service
+++ /dev/null
@@ -1,4 +0,0 @@
-Name=org.bluez.obex
-Exec=/bin/false
-SystemdService=dbus-org.bluez.obex.service
-diff --git a/obexd/src/org.bluez.obex.service.in b/obexd/src/org.bluez.obex.service.in
-new file mode 100644
-index 0000000..9c815f2
--- /dev/null
+++ b/obexd/src/org.bluez.obex.service.in
@@ -0,0 +1,4 @@
+Name=org.bluez.obex
+Exec=@libexecdir@/obexd
+SystemdService=dbus-org.bluez.obex.service
---
-1.8.3.1
-
-
-diff --git a/src/bluetooth.conf b/src/bluetooth.conf
-index 0c0b221..013cf97 100644
--- a/src/bluetooth.conf
+++ b/src/bluetooth.conf
@@ -26,10 +26,10 @@
--- /dev/null
+From 2c3bba7b38be03834162e34069156f1fd49f0528 Mon Sep 17 00:00:00 2001
+From: "antoine.belvire@laposte.net" <antoine.belvire@laposte.net>
+Date: Tue, 27 Mar 2018 20:30:26 +0200
+Subject: adapter: Don't refresh adv_manager for non-LE devices
+
+btd_adv_manager_refresh is called upon MGMT_SETTING_DISCOVERABLE setting change
+but as only LE adapters have an adv_manager, this leads to segmentation fault
+for non-LE devices:
+
+0 btd_adv_manager_refresh (manager=0x0) at src/advertising.c:1176
+1 0x0000556fe45fcb02 in settings_changed (settings=<optimized out>,
+ adapter=0x556fe53f7c70) at src/adapter.c:543
+2 new_settings_callback (index=<optimized out>, length=<optimized out>,
+ param=<optimized out>, user_data=0x556fe53f7c70) at src/adapter.c:573
+3 0x0000556fe462c278 in request_complete (mgmt=mgmt@entry=0x556fe53f20c0,
+ status=<optimized out>, opcode=opcode@entry=7, index=index@entry=0,
+ length=length@entry=4, param=0x556fe53eb5f9) at src/shared/mgmt.c:261
+4 0x0000556fe462cd9d in can_read_data (io=<optimized out>,
+ user_data=0x556fe53f20c0) at src/shared/mgmt.c:353
+5 0x0000556fe46396e3 in watch_callback (channel=<optimized out>,
+ cond=<optimized out>, user_data=<optimized out>)
+ at src/shared/io-glib.c:170
+6 0x00007fe351c980e5 in g_main_context_dispatch ()
+ from /usr/lib64/libglib-2.0.so.0
+7 0x00007fe351c984b0 in ?? () from /usr/lib64/libglib-2.0.so.0
+8 0x00007fe351c987c2 in g_main_loop_run () from /usr/lib64/libglib-2.0.so.0
+9 0x0000556fe45abc75 in main (argc=<optimized out>, argv=<optimized out>)
+ at src/main.c:770
+
+This commit prevents the call to btd_adv_manager_refresh for non-LE devices.
+---
+ src/adapter.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/src/adapter.c
++++ b/src/adapter.c
+@@ -540,7 +540,8 @@ static void settings_changed(struct btd_
+ g_dbus_emit_property_changed(dbus_conn, adapter->path,
+ ADAPTER_INTERFACE, "Discoverable");
+ store_adapter_info(adapter);
+- btd_adv_manager_refresh(adapter->adv_manager);
++ if (adapter->supported_settings & MGMT_SETTING_LE)
++ btd_adv_manager_refresh(adapter->adv_manager);
+ }
+
+ if (changed_mask & MGMT_SETTING_BONDABLE) {
include $(TOPDIR)/rules.mk
PKG_NAME:=bonnie++
-PKG_VERSION:=1.97
+PKG_VERSION:=1.97.3
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
-PKG_SOURCE_URL:=http://www.coker.com.au/bonnie++/experimental/
-PKG_HASH:=44f5a05937648a6526ba99354555d7d15f2dd392e55d3436f6746da6f6c35982
+PKG_SOURCE_URL:=http://www.coker.com.au/bonnie++/
+PKG_HASH:=e27b386ae0dc054fa7b530aab6bdead7aea6337a864d1f982bc9ebacb320746e
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=copyright.txt
PKG_MAINTAINER:=Florian Fainelli <florian@openwrt.org>
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION).1
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
-Index: bonnie++-1.97.1/configure
+Index: bonnie++-1.97.3/configure
===================================================================
---- bonnie++-1.97.1.orig/configure
-+++ bonnie++-1.97.1/configure
+--- bonnie++-1.97.3.orig/configure
++++ bonnie++-1.97.3/configure
@@ -3955,9 +3955,7 @@ rm -f core conftest.err conftest.$ac_obj
if test "$cross_compiling" = yes; then :
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-Index: bonnie++-1.97.1/Makefile
+Index: bonnie++-1.97.3/Makefile
===================================================================
---- bonnie++-1.97.1.orig/Makefile
-+++ bonnie++-1.97.1/Makefile
+--- bonnie++-1.97.3.orig/Makefile
++++ bonnie++-1.97.3/Makefile
@@ -1,5 +1,7 @@
EXES=bonnie++ zcav getc_putc getc_putc_helper
EXE=bon_csv2html generate_randfile
include $(TOPDIR)/rules.mk
PKG_NAME:=btrfs-progs
-PKG_VERSION:=4.17
+PKG_VERSION:=4.19
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=@KERNEL/linux/kernel/people/kdave/btrfs-progs/
-PKG_HASH:=82ca0ecf76350a1e3c6543fe220c0910e240511e663d51fc79c32bd0052c117c
-PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
+PKG_SOURCE_URL:=@KERNEL/linux/kernel/people/kdave/btrfs-progs
+PKG_HASH:=d591fbe586cf83741fcf9df51859f8e9058ef5187c002b50d6fe84309e5ea349
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION)
+PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
PKG_BUILD_PARALLEL:=1
PKG_BUILD_DEPENDS:=acl
-PKG_FIXUP:=autoreconf
-
include $(INCLUDE_DIR)/package.mk
define Package/btrfs-progs
SUBMENU:=Filesystem
DEPENDS:=+libattr +libuuid +zlib +libblkid +liblzo +libpthread
TITLE:=Btrfs filesystems utilities
- URL:=http://btrfs.wiki.kernel.org/
+ URL:=https://btrfs.wiki.kernel.org/
endef
define Package/btrfs-progs/description
--- /dev/null
+diff --git a/btrfs.c b/btrfs.c
+index 2d39f2c..78c468d 100644
+--- a/btrfs.c
++++ b/btrfs.c
+@@ -210,7 +210,7 @@ static int handle_global_options(int argc, char **argv)
+ return shift;
+ }
+
+-void handle_special_globals(int shift, int argc, char **argv)
++static void handle_special_globals(int shift, int argc, char **argv)
+ {
+ int has_help = 0;
+ int has_full = 0;
+diff --git a/extent-tree.c b/extent-tree.c
+index cd98633..8c9cdef 100644
+--- a/extent-tree.c
++++ b/extent-tree.c
+@@ -3749,7 +3749,7 @@ static void __get_extent_size(struct btrfs_root *root, struct btrfs_path *path,
+ * Return >0 for not found.
+ * Return <0 for err
+ */
+-int btrfs_search_overlap_extent(struct btrfs_root *root,
++static int btrfs_search_overlap_extent(struct btrfs_root *root,
+ struct btrfs_path *path, u64 bytenr, u64 len)
+ {
+ struct btrfs_key key;
+diff --git a/free-space-tree.c b/free-space-tree.c
+index 6641cdf..65d101f 100644
+--- a/free-space-tree.c
++++ b/free-space-tree.c
+@@ -780,7 +780,7 @@ out:
+ return ret;
+ }
+
+-int __remove_from_free_space_tree(struct btrfs_trans_handle *trans,
++static int __remove_from_free_space_tree(struct btrfs_trans_handle *trans,
+ struct btrfs_block_group_cache *block_group,
+ struct btrfs_path *path, u64 start, u64 size)
+ {
+@@ -1420,7 +1420,7 @@ out:
+ return ret;
+ }
+
+-struct btrfs_root *btrfs_create_tree(struct btrfs_trans_handle *trans,
++static struct btrfs_root *btrfs_create_tree(struct btrfs_trans_handle *trans,
+ struct btrfs_fs_info *fs_info,
+ u64 objectid)
+ {
+diff --git a/kernel-lib/bitops.h b/kernel-lib/bitops.h
+index b1fd6f5..4aadf91 100644
+--- a/kernel-lib/bitops.h
++++ b/kernel-lib/bitops.h
+@@ -178,9 +178,9 @@ static inline unsigned long find_next_zero_bit(const unsigned long *addr,
+ static inline unsigned long ext2_swab(const unsigned long y)
+ {
+ #if BITS_PER_LONG == 64
+- return (unsigned long) bswap64((u64) y);
++ return (unsigned long) bswap_64((u64) y);
+ #elif BITS_PER_LONG == 32
+- return (unsigned long) bswap32((u32) y);
++ return (unsigned long) bswap_32((u32) y);
+ #else
+ #error BITS_PER_LONG not defined
+ #endif
+@@ -218,14 +218,14 @@ static inline unsigned long _find_next_bit_le(const unsigned long *addr1,
+ return min(start + __ffs(ext2_swab(tmp)), nbits);
+ }
+
+-unsigned long find_next_zero_bit_le(const void *addr, unsigned long size,
++static unsigned long find_next_zero_bit_le(const void *addr, unsigned long size,
+ unsigned long offset)
+ {
+ return _find_next_bit_le(addr, NULL, size, offset, ~0UL);
+ }
+
+
+-unsigned long find_next_bit_le(const void *addr, unsigned long size,
++static unsigned long find_next_bit_le(const void *addr, unsigned long size,
+ unsigned long offset)
+ {
+ return _find_next_bit_le(addr, NULL, size, offset, 0UL);
+diff --git a/kernel-lib/rbtree.h b/kernel-lib/rbtree.h
+index 47b662a..ebb4145 100644
+--- a/kernel-lib/rbtree.h
++++ b/kernel-lib/rbtree.h
+@@ -52,7 +52,7 @@ struct rb_root {
+
+ #define rb_parent(r) ((struct rb_node *)((r)->__rb_parent_color & ~3))
+
+-#define RB_ROOT (struct rb_root) { NULL, }
++#define RB_ROOT (struct rb_root) {}
+ #define rb_entry(ptr, type, member) container_of(ptr, type, member)
+
+ #define RB_EMPTY_ROOT(root) ((root)->rb_node == NULL)
+diff --git a/utils.h b/utils.h
+index b6c00cf..7c5eb79 100644
+--- a/utils.h
++++ b/utils.h
+@@ -29,6 +29,7 @@
+ #include "sizes.h"
+ #include "messages.h"
+ #include "ioctl.h"
++#include "fsfeatures.h"
+
+ #define BTRFS_SCAN_MOUNTED (1ULL << 0)
+ #define BTRFS_SCAN_LBLKID (1ULL << 1)
include $(TOPDIR)/rules.mk
PKG_NAME:=ccid
-PKG_VERSION:=1.4.29
+PKG_VERSION:=1.4.30
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://ccid.apdu.fr/files/
-PKG_HASH:=a5432ae845730493c04e59304b5c0c6103cd0e2c8827df57d69469a3eaaab84d
+PKG_HASH:=ac17087be08880a0cdf99a8a2799a4ef004dc6ffa08b4d9b0ad995f39a53ff7c
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_LICENSE:=LGPL-2.1+
PKG_LICENSE_FILES:=COPYING
PKG_NAME:=cmdpad
PKG_VERSION:=0.0.3
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
PKG_SOURCE_URL:=@SF/cmdpad
URL:=http://cmdpad.sourceforge.net/index.php
endef
+TARGET_CFLAGS += -std=gnu89
+
CONFIGURE_ARGS += \
--enable-static \
--enable-shared
include $(TOPDIR)/rules.mk
PKG_NAME:=collectd
-PKG_VERSION:=5.8.0
-PKG_RELEASE:=6
+PKG_VERSION:=5.8.1
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://collectd.org/files/ \
https://github.com/collectd/collectd/releases/download/collectd-$(PKG_VERSION)
-PKG_HASH:=b06ff476bbf05533cb97ae6749262cc3c76c9969f032bd8496690084ddeb15c9
+PKG_HASH:=e796fda27ce06377f491ad91aa286962a68c2b54076aa77a29673d53204453da
PKG_FIXUP:=autoreconf
PKG_REMOVE_FILES:=aclocal.m4 libltdl/aclocal.m4
select PACKAGE_collectd-mod-network
endef
-ifneq ($(CONFIG_avr32),)
- TARGET_CFLAGS += -fsigned-char
-endif
-
# common configure args
CONFIGURE_ARGS+= \
--disable-werror \
$(eval $(call BuildPlugin,tail-csv,tail CSV input,tail_csv,))
$(eval $(call BuildPlugin,table,table-like structured file input,table,))
$(eval $(call BuildPlugin,teamspeak2,TeamSpeak2 input,teamspeak2,))
-$(eval $(call BuildPlugin,ted,The Energy Detective input,ted,@((!TARGET_avr32)||BROKEN))) # fails on avr32 because of warnings treated as errors
+$(eval $(call BuildPlugin,ted,The Energy Detective input,ted,))
$(eval $(call BuildPlugin,tcpconns,TCP connection tracking input,tcpconns,))
$(eval $(call BuildPlugin,thermal,system temperatures input,thermal,))
$(eval $(call BuildPlugin,unixsock,unix socket output,unixsock,))
index dfd785a2c8..e9715126e6 100644
--- a/src/collectd.conf.pod
+++ b/src/collectd.conf.pod
-@@ -4128,11 +4128,19 @@ Configures the base register to read from the device. If the option
+@@ -4139,11 +4139,19 @@ Configures the base register to read from the device. If the option
B<RegisterType> has been set to B<Uint32> or B<Float>, this and the next
register will be read (the register number is increased by one).
/* consolidation_functions = */ NULL,
/* consolidation_functions_num = */ 0,
-@@ -950,6 +953,12 @@ static int rrd_config(const char *key, c
+@@ -949,6 +952,12 @@ static int rrd_config(const char *key, c
/* compar = */ rrd_compare_numeric);
free(value_copy);
#@BUILD_PLUGIN_JAVA_TRUE@LoadPlugin java
@BUILD_PLUGIN_LOAD_TRUE@@BUILD_PLUGIN_LOAD_TRUE@LoadPlugin load
#@BUILD_PLUGIN_LPAR_TRUE@LoadPlugin lpar
-@@ -720,6 +721,12 @@
+@@ -721,6 +722,12 @@
# IgnoreSelected true
#</Plugin>
# JVMArg "-Djava.class.path=@prefix@/share/collectd/java/collectd-api.jar"
--- a/src/collectd.conf.pod
+++ b/src/collectd.conf.pod
-@@ -3503,6 +3503,27 @@ and all other interrupts are collected.
+@@ -3521,6 +3521,27 @@ and all other interrupts are collected.
=back
# Legacy types
--- a/Makefile.am
+++ b/Makefile.am
-@@ -983,6 +983,14 @@ irq_la_LDFLAGS = $(PLUGIN_LDFLAGS)
+@@ -997,6 +997,14 @@ irq_la_LDFLAGS = $(PLUGIN_LDFLAGS)
irq_la_LIBADD = libignorelist.la
endif
--- a/src/ping.c
+++ b/src/ping.c
-@@ -635,7 +635,7 @@ static int ping_read(void) /* {{{ */
+@@ -633,7 +633,7 @@ static int ping_read(void) /* {{{ */
((double)(pkg_recv * (pkg_recv - 1))));
/* Calculate drop rate. */
include $(TOPDIR)/rules.mk
PKG_NAME:=crelay
-PKG_VERSION:=0.12
+PKG_VERSION:=0.13
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/ondrej1024/crelay/tar.gz/V$(PKG_VERSION)?
-PKG_HASH:=84b2523107bb3e7263d0be1c3c367de1956b41711293e108f4ce483f5e66913f
+PKG_HASH:=d9919fe91e8641352f0b4705a37acc7ba4b3c4286ca78a629968f16f343cfdc4
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
PKG_LICENSE:=GPL-2.0
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=cryptodev-linux
-PKG_VERSION:=1.9.git-2017-10-04
+PKG_VERSION:=1.9.git-2018-11-02
PKG_RELEASE:=1
PKG_SOURCE_URL:=https://github.com/cryptodev-linux/cryptodev-linux
PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=0a54e38b264d9a3bed74c642a61b88191660d0f8
-PKG_MIRROR_HASH:=af3c303afe7ff995b120add6101261a652a6478a2a69018dd740f49a8b14ed09
+PKG_SOURCE_VERSION:=f1a693000d116718379f8b53ed7bc6b9c0f7de27
+PKG_MIRROR_HASH:=340d314e2a88bf2449ccee906b141e085d376f6e2a94a64e36254e8376323169
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
include $(TOPDIR)/rules.mk
PKG_NAME:=cryptsetup
-PKG_VERSION:=2.0.3
+PKG_VERSION:=2.0.5
PKG_RELEASE:=1
-PKG_LICENSE:=GPL-2.0+ LGPL-2.1+
-PKG_LICENSE_FILES:=COPYING COPYING.LGPL
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/linux/utils/cryptsetup/v2.0
-PKG_HASH:=4d6cca04c1f5ff4a68d045d190efb2623087eda0274ded92f92a4b6911e501d4
+PKG_HASH:=a0f72ca2c824a5a555dc8924413dfe947eca23ab2e30bcff54eaafefe5fe301d
+
+PKG_LICENSE:=GPL-2.0+ LGPL-2.1+
+PKG_LICENSE_FILES:=COPYING COPYING.LGPL
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
SUBMENU:=Encryption
TITLE:=Cryptsetup
DEPENDS:=+libblkid +libuuid +libpopt +lvm2 +libdevmapper +libjson-c +@KERNEL_DIRECT_IO
- URL:=http://code.google.com/p/cryptsetup/
+ URL:=https://gitlab.com/cryptsetup/cryptsetup/
endef
define Package/cryptsetup
include $(TOPDIR)/rules.mk
PKG_NAME:=dbus
-PKG_VERSION:=1.12.8
+PKG_VERSION:=1.12.10
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://dbus.freedesktop.org/releases/dbus/
-PKG_HASH:=e2dc99e7338303393b6663a98320aba6a63421bcdaaf571c8022f815e5896eb3
-PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
+PKG_HASH:=4b693d24976258c3f2fa9cc33ad9288c5fbfa7a16481dbd9a8a429f7aa8cdcf7
+PKG_MAINTAINER:=
PKG_LICENSE:=AFL-2.1
PKG_BUILD_PARALLEL:=1
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=device-observatory
+PKG_VERSION:=1.2.0
+PKG_RELEASE:=1
+
+PKG_LICENSE:=GPL-3.0+
+
+PKG_SOURCE_URL:=https://codeload.github.com/mwarning/device-observatory/tar.gz/v$(PKG_VERSION)?
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=83b3f362f154a427abbd3af31b3c2dda9983cdc15f6b833d804727ef0fbdc72e
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/device-observatory
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=device-observatory
+ MAINTAINER:=Moritz Warning <moritzwarning@web.de>
+ URL:=https://github.com/mwarning/device-observatory/
+ DEPENDS:=+iw +libpcap +libmicrohttpd-no-ssl
+endef
+
+define Package/device-observatory/description
+ Show information about connected devices and connections to increase security awareness.
+endef
+
+define Package/device-observatory/install
+ $(CP) files/* $(1)
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/device-observatory $(1)/usr/bin/
+ $(INSTALL_DIR) $(1)/usr/share/device-observatory
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/macdb.txt $(1)/usr/share/device-observatory/macdb.txt
+endef
+
+$(eval $(call BuildPackage,device-observatory))
--- /dev/null
+
+config setup
+ list dev 'wlan0'
+ list mdev 'mon0'
+
+ option mac_db '/usr/share/device-observatory/macdb.txt'
+ option port_db '/etc/services'
+
+ # Optional JSON output into file
+# option json_output '/tmp/device-observatory.json'
+
+ # Time after which a device is removed from the record
+ option device_timeout 3600
+
+ # Create monitoring interface mon0 based on physical interface wifi phy0.
+ # See 'iw dev' output for a list of interfaces.
+ list create_monitor 'mon0'
+
+ # Track router itself as device
+ option track_localhost 0
+
+ # Set to 0 to disable webserver
+ option webserver_port 8080
+
+ # Not needed, all necessary files are included
+# option webserver_path '/www'
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=90
+USE_PROCD=1
+PROG=/usr/bin/device-observatory
+OPTS=""
+
+
+boot() {
+ local dev="$(uci get -q device-observatory.@setup[0].dev | cut -d ' ' -f 1)"
+
+ # Wait for interface to be up
+ ubus -t 15 wait_for network.interface network.${dev:-localhost} 2>/dev/null
+ rc_procd start_service
+}
+
+xappend() {
+ local name="$2" value="$1"
+ OPTS="$OPTS --${name//_/-} ${value//'/\\'}"
+}
+
+append_opts() {
+ local name value cfg="$1"; shift
+ for name in $*; do
+ config_get value "$cfg" "$name"
+ [ -n "$value" ] && xappend "$value" "$name"
+ done
+}
+
+append_opts_list() {
+ local name cfg="$1"; shift
+ for name in $*; do
+ config_list_foreach "$cfg" "$name" xappend "$name"
+ done
+}
+
+create_monitor_interface() {
+ local ifce="$1" n=$(echo -n "$1" | tail -c 1)
+
+ if [ ! -d "/sys/class/net/$ifce/" ]; then
+ iw phy "phy$n" interface add "$ifce" type monitor
+ ip link set dev "$ifce" up
+ fi
+}
+
+start_instance() {
+ local cfg="$1"
+
+ OPTS=""
+
+ config_list_foreach "$cfg" "create_monitor" create_monitor_interface "create_monitor"
+
+ append_opts_list "$cfg" dev mdev
+ append_opts "$cfg" mac_db port_db json_output device_timeout webserver_port webserver_path track_localhost
+
+ procd_open_instance
+ procd_set_param command $PROG $OPTS
+ procd_set_param stderr 1
+ procd_set_param stdout 0
+ procd_close_instance
+}
+
+start_service() {
+ config_load 'device-observatory'
+ config_foreach start_instance 'setup'
+}
PKG_NAME:=digitemp
PKG_VERSION:=3.7.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/bcl/digitemp/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=6fa4d965350d5501b6ca73ee8a09276ca4f65b6d85dae62f0a796239bae5000e
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_URL:=https://github.com/bcl/digitemp.git
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=be824bbbc81189931bf4b130a8acc39288d75662
PKG_MAINTAINER:=Jasper Scholte <NightNL@outlook.com>
PKG_LICENSE:=GPL-2.0+
-PKG_MIRROR_HASH:=490f9c94c671aa74ce0ef4fbc95231644f3aa7023d2b947714ed55fd712672f2
include $(INCLUDE_DIR)/package.mk
SECTION:=utils
CATEGORY:=Utilities
TITLE:=DigiTemp is a simple to use program for reading values from 1-wire devices.
- URL:=http://www.digitemp.com
+ URL:=https://www.digitemp.com
endef
define Package/digitemp/Default/description
include $(TOPDIR)/rules.mk
PKG_NAME:=dmidecode
-PKG_VERSION:=3.1
+PKG_VERSION:=3.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@SAVANNAH/$(PKG_NAME)
-PKG_HASH:=d766ce9b25548c59b1e7e930505b4cad9a7bb0b904a1a391fbb604d529781ac0
+PKG_HASH:=077006fa2da0d06d6383728112f2edef9684e9c8da56752e97cd45a11f838edd
PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
PKG_LICENSE:=GPL-2.0
CATEGORY:=Utilities
DEPENDS:=@(TARGET_x86||TARGET_x86_64)
TITLE:=Displays BIOS informations.
- URL:=http://www.nongnu.org/dmidecode/
+ URL:=https://www.nongnu.org/dmidecode/
endef
define Package/dmidecode/description
include $(TOPDIR)/rules.mk
PKG_NAME:=evtest
-PKG_REV:=ab140a2dab1547f7deb5233be6d94a388cf08b26
PKG_VERSION:=1.33
PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MIRROR_HASH:=9716be17dadc496f15861e41e17980be9d444de856bc2e5b9a732f9ce826b8dd
-PKG_SOURCE_URL:=git://anongit.freedesktop.org/evtest
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=$(PKG_REV)
-
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=https://cgit.freedesktop.org/evtest/snapshot
+PKG_HASH:=5037d1162f4c407053cd97e85763ba03150a0c35f929ee9bf9a360abd32ef1c1
PKG_MAINTAINER:=Pushpal Sidhu <psidhu.devel@gmail.com>
+
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
include $(TOPDIR)/rules.mk
PKG_NAME:=fio
-PKG_VERSION:=3.7
+PKG_VERSION:=3.12
PKG_RELEASE:=1
-PKG_MAINTAINER:=Dragan Stancevic <ds@codeminutia.com>
-PKG_LICENSE:=GPL-2.0+
-PKG_LICENSE_FILES:=COPYING
PKG_SOURCE_URL:=http://brick.kernel.dk/snaps
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=73aba1b307f084ba5ec3ac3084233e3a0ef297a2991e904ab391cc95f07f003c
+PKG_HASH:=f73ec0a84834a058adcaf9964eb7e9a7af0a6e41a4e5eff781438c12b99b3b9d
+
+PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
+PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE_FILES:=COPYING
include $(INCLUDE_DIR)/package.mk
--disable-numa \
--disable-rdma \
--disable-rados \
+ --disable-http \
--disable-rbd \
--disable-gfapi \
--disable-lex \
--- /dev/null
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=fish
+PKG_VERSION:=2.7.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/fish-shell/fish-shell/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=eb43ea2eb9accf76661c487dd530a5fd345fa40a3201bd22cef2c52be39fb474
+PKG_MAINTAINER:=Curtis Jiang <jqqqqqqqqqq@gmail.com>
+PKG_LICENSE:=GPL-2.0
+
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+PKG_BUILD_DIR:=$(BUILD_DIR)/fish-shell-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/fish
+ SECTION:=utils
+ CATEGORY:=Utilities
+ SUBMENU:=Shells
+ TITLE:=A smart and user-friendly command line shell
+ DEPENDS:=+libncurses +libstdcpp +librt +libpcre2-32
+ URL:=https://fishshell.com
+endef
+
+define Package/fish/description
+ Fish is a smart and user-friendly command line shell for OS X, Linux, and the
+ rest of the family. Fish includes features like syntax highlighting,
+ autosuggest-as-you-type, and fancy tab completions that just work, with no
+ configuration required.
+endef
+
+CONFIGURE_VARS += ac_cv_file__proc_self_stat=yes
+TARGET_CXXFLAGS += -std=c++0x
+
+define Package/fish/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fish $(1)/usr/bin
+ $(INSTALL_DIR) $(1)/usr/share/fish
+ $(CP) $(PKG_INSTALL_DIR)/usr/share/fish/* $(1)/usr/share/fish/
+ rm -rf $(1)/usr/share/fish/groff
+ rm -rf $(1)/usr/share/fish/man
+ rm -rf $(1)/usr/share/fish/tools
+endef
+
+define Package/fish/postinst
+#!/bin/sh
+grep fish $${IPKG_INSTROOT}/etc/shells || \
+ echo "/usr/bin/fish" >> $${IPKG_INSTROOT}/etc/shells
+
+ # Backwards compatibility
+ if [[ -e /bin/fish ]] && ([[ ! -L /bin/fish ]] || [[ "$(readlink -fn $${IPKG_INSTROOT}/bin/fish)" != "../$(CONFIGURE_PREFIX)/bin/fish" ]]); then
+ ln -fs "../$(CONFIGURE_PREFIX)/bin/fish" "$${IPKG_INSTROOT}/bin/fish"
+ fi
+endef
+
+define Package/fish/postrm
+ rm -rf "$${IPKG_INSTROOT}/$(CONFIGURE_PREFIX)/share/fish/$(PKG_VERSION)"
+endef
+
+$(eval $(call BuildPackage,fish))
--- /dev/null
+diff --git a/share/functions/prompt_hostname.fish b/share/functions/prompt_hostname.fish
+index 4348bce2..8502ce3f 100644
+--- a/share/functions/prompt_hostname.fish
++++ b/share/functions/prompt_hostname.fish
+@@ -2,7 +2,7 @@
+ # hostname command uses. So cache the answer so including it in the prompt doesn't make fish seem
+ # slow.
+ if not set -q __fish_prompt_hostname
+- set -g __fish_prompt_hostname (hostname | string split '.')[1]
++ set -g __fish_prompt_hostname (uname -n | string split '.')[1]
+ end
+
+ function prompt_hostname
+diff --git a/share/tools/web_config/sample_prompts/pythonista.fish b/share/tools/web_config/sample_prompts/pythonista.fish
+index 9529035c..57ffaf86 100644
+--- a/share/tools/web_config/sample_prompts/pythonista.fish
++++ b/share/tools/web_config/sample_prompts/pythonista.fish
+@@ -7,7 +7,7 @@ function fish_prompt
+ set -g VIRTUAL_ENV_DISABLE_PROMPT true
+ end
+ set_color yellow
+- printf '%s' (whoami)
++ printf '%s' (id -un)
+ set_color normal
+ printf ' at '
+
+diff --git a/share/tools/web_config/sample_prompts/screen_savvy.fish b/share/tools/web_config/sample_prompts/screen_savvy.fish
+index 411a5501..5cdcfb69 100644
+--- a/share/tools/web_config/sample_prompts/screen_savvy.fish
++++ b/share/tools/web_config/sample_prompts/screen_savvy.fish
+@@ -2,8 +2,8 @@
+ # author: Matthias
+ function fish_prompt -d "Write out the prompt"
+ if test -z $WINDOW
+- printf '%s%s@%s%s%s%s%s> ' (set_color yellow) (whoami) (set_color purple) (prompt_hostname) (set_color $fish_color_cwd) (prompt_pwd) (set_color normal)
++ printf '%s%s@%s%s%s%s%s> ' (set_color yellow) (id -un) (set_color purple) (prompt_hostname) (set_color $fish_color_cwd) (prompt_pwd) (set_color normal)
+ else
+- printf '%s%s@%s%s%s(%s)%s%s%s> ' (set_color yellow) (whoami) (set_color purple) (prompt_hostname) (set_color white) (echo $WINDOW) (set_color $fish_color_cwd) (prompt_pwd) (set_color normal)
++ printf '%s%s@%s%s%s(%s)%s%s%s> ' (set_color yellow) (id -un) (set_color purple) (prompt_hostname) (set_color white) (echo $WINDOW) (set_color $fish_color_cwd) (prompt_pwd) (set_color normal)
+ end
+ end
+diff --git a/share/tools/web_config/sample_prompts/terlar.fish b/share/tools/web_config/sample_prompts/terlar.fish
+index d49ef340..59b3d267 100644
+--- a/share/tools/web_config/sample_prompts/terlar.fish
++++ b/share/tools/web_config/sample_prompts/terlar.fish
+@@ -6,7 +6,7 @@ function fish_prompt --description 'Write out the prompt'
+
+ # User
+ set_color $fish_color_user
+- echo -n (whoami)
++ echo -n (id -un)
+ set_color normal
+
+ echo -n '@'
include $(TOPDIR)/rules.mk
PKG_NAME:=gammu
-PKG_VERSION:=1.38.4
-PKG_RELEASE:=2
+PKG_VERSION:=1.39.0
+PKG_RELEASE:=1
-PKG_SOURCE_URL:=http://dl.cihar.com/gammu/releases/
+PKG_SOURCE_URL:=https://dl.cihar.com/gammu/releases
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_HASH:=a8ba1dc52ee82562abd57e9546c409f2f887f45187aae012fe43af0b730611ae
+PKG_HASH:=66d1d991d7a993fdf254d4c425f0fdd38c9cca15b1735936695a486067a6a9f8
+
PKG_MAINTAINER:=Vitaly Protsko <villy@sft.ru>
PKG_LICENCE:=GPL-2.0
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Cell phone/modem SMS and control tool
- URL:=http://dl.cihar.com/gammu/releases/
+ URL:=https://wammu.eu/gammu/
DEPENDS:=+libpthread +libcurl +glib2 $(ICONV_DEPENDS) $(INTL_DEPENDS)
DEPENDS+=+PACKAGE_python:python +PACKAGE_bluez-libs:bluez-libs
DEPENDS+=+PACKAGE_libmariadb:libmariadb +PACKAGE_unixodbc:unixodbc +PACKAGE_libpq:libpq
+diff --git a/cmake/FindIconv.cmake b/cmake/FindIconv.cmake
+index 3ec0493..f716700 100644
--- a/cmake/FindIconv.cmake
+++ b/cmake/FindIconv.cmake
-@@ -34,9 +34,9 @@ string(REGEX REPLACE "(.*)/include/?" "\
+@@ -9,10 +9,10 @@
+ include(CheckCCompilerFlag)
+ include(CheckCSourceCompiles)
- FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv c HINTS "${ICONV_INCLUDE_BASE_DIR}/lib" PATHS /opt/local/lib)
-
--IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
-+IF(NOT DISABLE_ICONV AND ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
- SET(ICONV_FOUND TRUE)
--ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
-+ENDIF(NOT DISABLE_ICONV AND ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
+-IF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
++IF(NOT DISABLE_ICONV AND ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
+ # Already in cache, be silent
+ SET(ICONV_FIND_QUIETLY TRUE)
+-ENDIF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
++ENDIF(NOT DISABLE_ICONV AND ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
- set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR})
- set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES})
+ IF(APPLE)
+ FIND_PATH(ICONV_INCLUDE_DIR iconv.h
+diff --git a/configure b/configure
+index 4f51ca7..5b0d993 100755
--- a/configure
+++ b/configure
-@@ -31,6 +31,7 @@ Usage: ./configure [options]
+@@ -33,6 +33,7 @@ Usage: ./configure [options]
--enable-backup enable backup support
--enable-win32 enable mingw crosscomilation
--enable-protection enable compile time protections
+--disable-iconv disable iconv support
- --with-python=<path> path to Python interpreter
--without-gnapplet disable installation of gnapplet
--without-completion disable installation of bash completion script
-@@ -57,6 +58,7 @@ CMAKE_PROTECTION=
- CMAKE_PYTHON=
+
+@@ -57,6 +58,7 @@ CMAKE_CROSS=
+ CMAKE_PROTECTION=
CMAKE_GNAP=
CMAKE_COMPLETE=
+CMAKE_ICONV=
# process command line
while [ "$#" -gt 0 ] ; do
-@@ -94,6 +96,12 @@ while [ "$#" -gt 0 ] ; do
+@@ -91,6 +93,12 @@ while [ "$#" -gt 0 ] ; do
--disable-protection)
CMAKE_PROTECTION="-DENABLE_PROTECTION=OFF"
;;
--enable-debug)
CMAKE_DEBUG="-DCMAKE_BUILD_TYPE=Debug"
;;
-@@ -142,4 +150,4 @@ fi
+@@ -139,4 +147,4 @@ fi
cd "$BUILD_DIR"
# invoke cmake to do configuration
--cmake $SOURCE_DIR $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_PYTHON $CMAKE_GNAP $CMAKE_COMPLETE
-+cmake $SOURCE_DIR $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_PYTHON $CMAKE_GNAP $CMAKE_COMPLETE $CMAKE_ICONV
+-cmake $SOURCE_DIR $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_GNAP $CMAKE_COMPLETE
++cmake $SOURCE_DIR $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_GNAP $CMAKE_COMPLETE $CMAKE_ICONV
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -537,8 +537,6 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMP
+@@ -511,8 +511,6 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMP
# MACRO_TUNE_LINKER("-pie")
# These do not work on Windows right now
if (NOT WIN32)
+SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
--- a/configure
+++ b/configure
-@@ -25,6 +25,7 @@ Usage: ./configure [options]
+@@ -27,6 +27,7 @@ Usage: ./configure [options]
--help|-h shows this help
--prefix=<path> installation prefix
--enable-shared enables shared build
--enable-debug enables debug build
--enable-tiger enables Mac OS X 10.4 (Tiger) build
-@@ -50,6 +51,7 @@ SOURCE_DIR=`pwd`
+@@ -51,6 +52,7 @@ SOURCE_DIR=`pwd`
# cmake parameters
CMAKE_PREFIX=
+ CMAKE_ROOT="-DCMAKE_TOOLCHAIN_FILE=$SOURCE_DIR/cmake/Toolchain-cross.cmake"
+ echo "SET(CMAKE_FIND_ROOT_PATH ${1##--cross-root=})" >> $SOURCE_DIR/cmake/Toolchain-cross.cmake
+ ;;
- --with-python=*)
- CMAKE_PYTHON="-DBUILD_PYTHON=${1##--with-python=}"
+ --enable-backup)
+ CMAKE_BACKUP="-DWITH_BACKUP=ON"
;;
-@@ -150,4 +156,4 @@ fi
+@@ -147,4 +153,4 @@ fi
cd "$BUILD_DIR"
# invoke cmake to do configuration
--cmake $SOURCE_DIR $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_PYTHON $CMAKE_GNAP $CMAKE_COMPLETE $CMAKE_ICONV
-+cmake $SOURCE_DIR $CMAKE_ROOT $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_PYTHON $CMAKE_GNAP $CMAKE_COMPLETE $CMAKE_ICONV
+-cmake $SOURCE_DIR $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_GNAP $CMAKE_COMPLETE $CMAKE_ICONV
++cmake $SOURCE_DIR $CMAKE_ROOT $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_GNAP $CMAKE_COMPLETE $CMAKE_ICONV
--- a/configure
+++ b/configure
-@@ -36,6 +36,7 @@ Usage: ./configure [options]
- --with-python=<path> path to Python interpreter
+@@ -37,6 +37,7 @@ Usage: ./configure [options]
+ --disable-iconv disable iconv support
--without-gnapplet disable installation of gnapplet
--without-completion disable installation of bash completion script
+--without-libdbi disable libdbi support
# process command line
while [ "$#" -gt 0 ] ; do
-@@ -120,6 +122,9 @@ while [ "$#" -gt 0 ] ; do
+@@ -117,6 +119,9 @@ while [ "$#" -gt 0 ] ; do
--without-completion)
CMAKE_COMPLETE="-DINSTALL_BASH_COMPLETION=OFF"
;;
--build=*)
;;
--disable-dependency-tracking)
-@@ -156,4 +161,4 @@ fi
+@@ -153,4 +158,4 @@ fi
cd "$BUILD_DIR"
# invoke cmake to do configuration
--cmake $SOURCE_DIR $CMAKE_ROOT $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_PYTHON $CMAKE_GNAP $CMAKE_COMPLETE $CMAKE_ICONV
-+cmake $SOURCE_DIR $CMAKE_ROOT $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_PYTHON $CMAKE_GNAP $CMAKE_COMPLETE $CMAKE_ICONV $CMAKE_LIBDBI
+-cmake $SOURCE_DIR $CMAKE_ROOT $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_GNAP $CMAKE_COMPLETE $CMAKE_ICONV
++cmake $SOURCE_DIR $CMAKE_ROOT $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_GNAP $CMAKE_COMPLETE $CMAKE_ICONV $CMAKE_LIBDBI
include $(TOPDIR)/rules.mk
PKG_NAME:=grep
-PKG_VERSION:=2.26
+PKG_VERSION:=3.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/grep
-PKG_HASH:=246a8fb37e82aa33d495b07c22fdab994c039ab0f818538eac81b01e78636870
+PKG_HASH:=db625c7ab3bb3ee757b3926a5cfa8d9e1c3991ad24707a83dde8a5ef2bf7a07e
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=COPYING
include $(INCLUDE_DIR)/package.mk
-TARGET_CFLAGS+=--std=gnu99
-
define Package/grep
SECTION:=utils
CATEGORY:=Utilities
TITLE:=grep search utility - full version
DEPENDS:=+libpcre
- URL:=http://www.gnu.org/software/grep/
+ URL:=https://www.gnu.org/software/grep/
endef
define Package/grep/description
include $(TOPDIR)/rules.mk
PKG_NAME:=gzip
-PKG_VERSION:=1.7
+PKG_VERSION:=1.9
PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/gzip
-PKG_HASH:=eccbaa178c7801618c887956f1668d45bb57863a9d2678bfc3e36d01fb951904
+PKG_HASH:=ae506144fc198bd8f81f1f4ad19ce63d5a2d65e42333255977cf1dcf1479089a
PKG_LICENSE:=GPL-3.0+
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/rules.mk
PKG_NAME:=hamlib
-PKG_VERSION:=3.0.1
+PKG_VERSION:=3.3
PKG_RELEASE:=1
-PKG_HASH:=3fec97ea326d02aa8f35834c4af34194a3f544e6212f391397d788c566b44e32
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/hamlib
-PKG_FIXUP:=autoreconf
-PKG_INSTALL:=1
+PKG_HASH:=c90b53949c767f049733b442cd6e0a48648b55d99d4df5ef3f852d985f45e880
+PKG_MAINTAINER:=Vasilis Tsiligiannis <acinonyx@openwrt.gr>
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Vasilis Tsiligiannis <acinonyx@openwrt.gr>
+PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/rules.mk
PKG_NAME:=haveged
-PKG_VERSION:=1.9.2
-PKG_RELEASE:=2
+PKG_VERSION:=1.9.4
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=@SF/haveged \
- http://www.issihosts.com/$(PKG_NAME)
-PKG_HASH:=f77d9adbdf421b61601fa29faa9ce3b479d910f73c66b9e364ba8642ccbfbe70
+PKG_SOURCE_URL:=https://codeload.github.com/jirka-h/haveged/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=c4959d3cb1fa6391d16a3aa1ba4d82cd3a0d497206ae4b87d638088c0664e5aa
+PKG_BUILD_DIR:=$(BUILD_DIR)/haveged-$(PKG_VERSION)
PKG_LICENSE:=GPLv3
PKG_MAINTAINER:=Hannu Nyman <hannu.nyman@iki.fi>
include $(TOPDIR)/rules.mk
PKG_NAME:=hdparm
-PKG_VERSION:=9.56
+PKG_VERSION:=9.58
PKG_RELEASE:=1
PKG_USE_MIPS16:=0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/$(PKG_NAME)
-PKG_HASH:=6ff9ed695f1017396eec4101f990f114b7b0e0a04c5aa6369c0394053d16e4da
-PKG_MAINTAINER:=Richard Kunze <richard.kunze@web.de>
+PKG_HASH:=9ae78e883f3ce071d32ee0f1b9a2845a634fc4dd94a434e653fdbef551c5e10f
+
+PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
PKG_LICENSE:=BSD-Style Open Source License
include $(INCLUDE_DIR)/package.mk
CATEGORY:=Utilities
SUBMENU:=Disc
TITLE:=Hard disk drive configuration utilitity
- URL:=http://sourceforge.net/projects/hdparm/
+ URL:=https://sourceforge.net/projects/hdparm/
endef
define Package/hdparm/description
--- /dev/null
+#
+# Copyright (C) 2006-2011 OpenWrt.org
+# Copyright (C) 2017-2018 Luiz Angelo Daros de Luca <luizluca@gmail.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=hplip
+PKG_VERSION:=3.18.10
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@SF/hplip
+PKG_HASH:=50d3c645f4ba5ae4a10c0f87cedcd0c0fd1598b412c9511476a9bb3b13101901
+
+PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
+PKG_LICENSE:=GPL-2.0 GPL-2.0+
+PKG_LICENSE_FILES:=COPYING LICENSE
+
+PKG_BUILD_PARALLEL:=1
+PKG_BUILD_DEPENDS:= python libcups
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/hplip/Default
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=HP Linux Imaging and Printing
+ URL:=https://sourceforge.net/projects/hplip/
+endef
+
+define Package/hplip/Default/description
+ HPLIP is an HP developed solution for printing, scanning, and faxing with HP inkjet and laser based printers in Linux.
+endef
+
+define Package/hplip-common
+$(call Package/hplip/Default)
+ TITLE+= (common files)
+ DEPENDS+=+libusb-1.0
+endef
+
+define Package/hplip-common/description
+$(call Package/hplip/Default/description)
+
+These are common files shared between subpackages
+endef
+
+define Package/hplip-sane
+$(call Package/hplip/Default)
+ TITLE+= (scanner drivers)
+ DEPENDS+=+libsane +hplip-common
+endef
+
+define Package/hplip-sane/description
+$(call Package/hplip/Default/description)
+
+S.A.N.E backend for HP Scanners
+endef
+
+CONFIGURE_ARGS += \
+ --disable-gui-build \
+ --disable-network-build \
+ --disable-fax-build \
+ --disable-pp-build \
+ --disable-doc-build \
+ --disable-dbus-build \
+ --disable-hpijs-only-build \
+ --disable-hpcups-install \
+ --disable-hpps-install \
+ --disable-cups-drv-install \
+ --enable-lite-build
+
+define Package/hplip-common/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/.libs/libhpip.so* $(1)/usr/lib/
+ $(CP) $(PKG_BUILD_DIR)/.libs/libhpmud.so* $(1)/usr/lib/
+
+ $(INSTALL_DIR) $(1)/etc/hp
+ $(CP) $(PKG_BUILD_DIR)/hplip.conf $(1)/etc/hp/hplip.conf
+
+ $(INSTALL_DIR) $(1)/usr/share/hplip/data/models/
+ $(CP) $(PKG_BUILD_DIR)/data/models/models.dat $(1)/usr/share/hplip/data/models/
+
+ $(INSTALL_DIR) $(1)/etc/hotplug.d/usb/
+ $(INSTALL_BIN) ./files/20-hplip $(1)/etc/hotplug.d/usb/
+endef
+
+define Package/hplip-sane/install
+ $(INSTALL_DIR) $(1)/usr/lib/sane
+ $(CP) $(PKG_BUILD_DIR)/.libs/libsane-hpaio.so* $(1)/usr/lib/sane
+
+ $(INSTALL_DIR) $(1)/etc/sane.d/dll.d/
+ $(INSTALL_DATA) ./files/hplib.conf $(1)/etc/sane.d/dll.d/hplib
+endef
+
+define Package/hplip-common/conffiles
+/etc/hp/hplip.conf
+endef
+
+define Package/hplip-sane/conffiles
+/etc/sane.d/dll.d/hplib
+endef
+
+$(eval $(call BuildPackage,hplip-common))
+$(eval $(call BuildPackage,hplip-sane))
--- /dev/null
+#!/bin/sh
+
+# Copyright (C) 2009 OpenWrt.org
+
+
+case "$ACTION" in
+ add)
+ # You have to figure out your PRODUCT id. Uncomment the line below,
+ # attach and detach your HP USB printer to find your id in /tmp/hplip.test.
+ # It will look like "Found 3f0/1717/100 on /proc/bus/usb/002/009"
+ # Replace 3f0/1717/100 below with your id.
+ #
+ # echo "Found $PRODUCT on $DEVICE" > /tmp/hplip.test
+
+ [ "$PRODUCT" = "3f0/1717/100" ] && chown nobody $DEVICE && chmod 666 $DEVICE
+ ;;
+ remove)
+ # device is gone
+ ;;
+esac
--- /dev/null
+# Load the hplib driver
+hpaio
--- /dev/null
+--- a/configure.in
++++ b/configure.in
+@@ -598,6 +598,10 @@ if test "$class_driver" = "no" && test "$hpijs_only_build" = "no" && test "$hpcu
+ else
+ AC_CHECK_LIB([usb-1.0], [libusb_init], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libusb 1.0 support], 2)])
+ AC_CHECK_HEADERS(libusb-1.0/libusb.h, ,[AC_MSG_ERROR([cannot find libusb-1.0-devel support], 11)])
++ PKG_CHECK_MODULES(LIBUSB_1_0, [ libusb-1.0 >= 1.0.0 ], have_libusb_1_0=yes, have_libusb_1_0=no)
++ if test "$have_libusb_1_0" = "yes"; then
++ CFLAGS="$CFLAGS $LIBUSB_1_0_CFLAGS"
++ fi
+ fi
+ fi
+
--- /dev/null
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -71,7 +71,7 @@ else
+ libsane_hpaio_la_LDFLAGS = -version-info 1:0:0
+ endif
+ # The following is a interlibrary dependency that must be compiled first.
+-libsane_hpaio_la_LIBADD = libhpip.la libhpmud.la libhpipp.la $(DBUS_LIBS) -lcups -ldl
++libsane_hpaio_la_LIBADD = libhpip.la libhpmud.la libhpipp.la $(DBUS_LIBS) -ldl
+ #libsane_hpaio_la_CFLAGS = -DWITH_NONAMESPACES -DSOAP_DEBUG
+ libsane_hpaio_la_CFLAGS = $(DBUS_CFLAGS) -Iprotocol
+
+--- a/scan/sane/hpaio.c
++++ b/scan/sane/hpaio.c
+@@ -34,7 +34,6 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <cups/cups.h>
+ #include "hpmud.h"
+ #include "hp_ipp.h"
+ #include "soap.h"
+@@ -145,98 +144,6 @@ static int GetUriLine(char *buf, char *uri, char **tail)
+ return i;
+ }
+
+-static int AddCupsList(char *uri, char ***printer)
+-{
+- int i, stat=1;
+-
+- /* Look for hp network URIs only. */
+- if (strncasecmp(uri, "hp:/net/", 8) !=0)
+- goto bugout;
+-
+- if (*printer == NULL)
+- {
+- /* Allocate array of string pointers. */
+- *printer = malloc(sizeof(char *) * MAX_DEVICE);
+- memset(*printer, 0, sizeof(char *) * MAX_DEVICE);
+- }
+-
+- /* Ignor duplicates (ie: printer queues using the same device). */
+- for (i=0; (*printer)[i] != NULL && i<MAX_DEVICE; i++)
+- {
+- if (strcmp((*printer)[i], uri) == 0)
+- goto bugout;
+- }
+-
+- /* Find empty slot in array of pointers. */
+- for (i=0; i<MAX_DEVICE; i++)
+- {
+- if ((*printer)[i] == NULL)
+- {
+- (*printer)[i] = strdup(uri);
+- break;
+- }
+- }
+-
+- stat = 0;
+-
+-bugout:
+-
+- return stat;
+-}
+-
+-
+-static int GetCupsPrinters(char ***printer)
+-{
+- http_t *http=NULL; /* HTTP object */
+- ipp_t *request=NULL; /* IPP request object */
+- ipp_t *response=NULL; /* IPP response object */
+- ipp_attribute_t *attr; /* Current IPP attribute */
+- int cnt=0;
+-
+- /* Connect to the HTTP server */
+- if ((http = httpConnectEncrypt(cupsServer(), ippPort(), cupsEncryption())) == NULL)
+- goto bugout;
+-
+- /* Assemble the IPP request */
+- request = ippNew();
+-
+- ippSetOperation( request, CUPS_GET_PRINTERS );
+- ippSetRequestId( request, 1 );
+-
+- ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_CHARSET, "attributes-charset", NULL, "utf-8");
+- ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE, "attributes-natural-language", NULL, "en");
+- ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "requested-attributes", NULL, "device-uri");
+-
+- /* Send the request and get a response. */
+- if ((response = cupsDoRequest(http, request, "/")) == NULL)
+- goto bugout;
+-
+- for (attr = ippFirstAttribute ( response ); attr != NULL; attr = ippNextAttribute( response ))
+- {
+- /* Skip leading attributes until we hit a printer. */
+- while (attr != NULL && ippGetGroupTag( attr ) != IPP_TAG_PRINTER)
+- attr = ippNextAttribute( response );
+-
+- if (attr == NULL)
+- break;
+-
+- while (attr != NULL && ippGetGroupTag( attr ) == IPP_TAG_PRINTER)
+- {
+- if (strcmp(ippGetName( attr ), "device-uri") == 0 && ippGetValueTag( attr ) == IPP_TAG_URI && AddCupsList(ippGetString( attr, 0, NULL ), printer) == 0)
+- cnt++;
+- attr = ippNextAttribute( response );
+- }
+-
+- if (attr == NULL)
+- break;
+- }
+-
+- ippDelete(response);
+-
+- bugout:
+- return cnt;
+-}
+-
+ static int AddDevice(char *uri)
+ {
+ struct hpmud_model_attributes ma;
+@@ -289,7 +196,6 @@ static int DevDiscovery(int localOnly)
+ char uri[HPMUD_LINE_SIZE];
+ char *tail = message;
+ int i, scan_type, cnt=0, total=0, bytes_read;
+- char **cups_printer=NULL; /* list of printers */
+ char* token = NULL;
+ enum HPMUD_RESULT stat;
+
+@@ -304,34 +210,6 @@ static int DevDiscovery(int localOnly)
+ total += AddDevice(uri);
+ }
+
+- /* Look for Network Scan devices if localonly flag if FALSE. */
+- if (!localOnly)
+- {
+- /* Look for all-in-one scan devices for which print queue created */
+- cnt = GetCupsPrinters(&cups_printer);
+- for (i=0; i<cnt; i++)
+- {
+- total += AddDevice(cups_printer[i]);
+- free(cups_printer[i]);
+- }
+- if (cups_printer)
+- free(cups_printer);
+-#ifdef HAVE_LIBNETSNMP
+- /* Discover NW scanners using Bonjour*/
+- bytes_read = mdns_probe_nw_scanners(message, sizeof(message), &cnt);
+- token = strtok(message, ";");
+- while (token)
+- {
+- total += AddDevice(token);
+- token = strtok(NULL, ";");
+- }
+-#endif
+- if(!total)
+- {
+- SendScanEvent("hpaio:/net/HP_Scan_Devices?ip=1.1.1.1", EVENT_ERROR_NO_PROBED_DEVICES_FOUND);
+- }
+- }
+-
+ bugout:
+ return total;
+ }
--- /dev/null
+https://bugs.launchpad.net/hplip/+bug/1672256
+
+memcpy should never be used with overlapping memory regions
+
+--- a/io/hpmud/musb.c
++++ b/io/hpmud/musb.c
+@@ -775,7 +775,7 @@ static int device_id(int fd, unsigned char *buffer, int size)
+ len = size-1; /* leave byte for zero termination */
+ if (len > 2)
+ len -= 2;
+- memcpy(buffer, buffer+2, len); /* remove length */
++ memmove(buffer, buffer+2, len); /* remove length */
+ buffer[len]=0;
+ DBG("read actual device_id successfully fd=%d len=%d\n", fd, len);
+
--- /dev/null
+https://bugs.launchpad.net/hplip/+bug/1778626
+
+--- a/prnt/hpcups/genPCLm.cpp
++++ b/prnt/hpcups/genPCLm.cpp
+@@ -171,7 +171,7 @@ Defines
+ #define rgb_2_gray(r,g,b) (ubyte)(0.299*(double)r+0.587*(double)g+0.114*(double)b)
+
+ // Note: this is required for debugging
+-boolean writeOutputFile(int numBytes, ubyte *ptr, char *user_name);
++bool writeOutputFile(int numBytes, ubyte *ptr, char *user_name);
+
+ /*
+ ********************************************* Helper Routines **************************
+@@ -343,7 +343,7 @@ bool PCLmGenerator::addKids(sint32 kidObj)
+ return(true);
+ }
+
+-boolean writeOutputFile(int numBytes, ubyte *ptr, char *user_name)
++bool writeOutputFile(int numBytes, ubyte *ptr, char *user_name)
+ {
+ FILE *outputFile;
+ char outFileName[MAX_FILE_PATH_LEN];
+@@ -1074,7 +1074,7 @@ void PCLmGenerator::writePDFGrammarPage(int imageWidth, int imageHeight, int num
+ * Limitations:
+ * -
+ *****************************************************************************************/
+-boolean prepImageForBacksideDuplex(ubyte *imagePtr, sint32 imageHeight, sint32 imageWidth, sint32 numComponents)
++bool prepImageForBacksideDuplex(ubyte *imagePtr, sint32 imageHeight, sint32 imageWidth, sint32 numComponents)
+ {
+ sint32 numBytes=imageHeight*imageWidth*numComponents;
+ ubyte *head, *tail, t0, t1, t2;
--- /dev/null
+diff --git a/scan/sane/OrbliteScan/LinuxCommon.h b/scan/sane/OrbliteScan/LinuxCommon.h
+index 6605dd9..55c7110 100644
+--- a/scan/sane/OrbliteScan/LinuxCommon.h
++++ b/scan/sane/OrbliteScan/LinuxCommon.h
+@@ -18,10 +18,8 @@ typedef u_int32_t UInt32;
+ typedef int32_t SInt32;\r
+ //typedef unsigned long UInt32;\r
+ //typedef signed long SInt32;\r
+-typedef __S64_TYPE SInt64;\r
+-typedef __U64_TYPE UInt64;\r
+-typedef __S64_TYPE int64_t;\r
+-typedef __U64_TYPE uint64_t;\r
++typedef int64_t SInt64;\r
++typedef uint64_t UInt64;\r
+ \r
+ //typedef unsigned long ULONG;\r
+ //typedef void* LPVOID;\r
include $(TOPDIR)/rules.mk
PKG_NAME:=joe
-PKG_VERSION:=4.4
+PKG_VERSION:=4.6
PKG_RELEASE:=1
-PKG_SOURCE_URL:=@SF/joe-editor
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=a5704828bbca29acb9e200414fef522c66cdf9ce28150f402d6767da43460979
-PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_URL:=@SF/joe-editor
+PKG_HASH:=495a0a61f26404070fe8a719d80406dc7f337623788e445b92a9f6de512ab9de
+
PKG_MAINTAINER:=Vitaly Protsko <villy@sft.ru>
PKG_LICENCE:=GPL-2.0
CATEGORY:=Utilities
SUBMENU:=Editors
TITLE:=JOE - Joes own editor
- URL:=http://sourceforge.net/projects/joe-editor/
+ URL:=https://sourceforge.net/projects/joe-editor/
DEPENDS:=+libncurses
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=jq
-PKG_VERSION:=1.5
-PKG_RELEASE:=2
+PKG_VERSION:=1.6
+PKG_RELEASE:=1
PKG_LICENSE:=BSD
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/stedolan/jq/releases/download/jq-$(PKG_VERSION)/
-PKG_HASH:=c4d2bfec6436341113419debf479d833692cc5cdab7eb0326b5a4d4fbe9f493c
+PKG_HASH:=9625784cf2e4fd9842f1d407681ce4878b5b0dcddbcd31c6135114a30c71e6a8
PKG_INSTALL:=1
TARGET_CFLAGS += -std=c99
+CONFIGURE_ARGS+= \
+ --disable-docs \
+ --disable-valgrind \
+ --without-oniguruma
+
define Package/jq
SECTION:=utils
CATEGORY:=Utilities
+++ /dev/null
-From 2d38a12d686a5156d4e7afb1fed7851805590582 Mon Sep 17 00:00:00 2001
-From: W-Mark Kubacki <wmark@hurrikane.de>
-Date: Fri, 19 Aug 2016 19:50:39 +0200
-Subject: [PATCH] Skip printing at MAX_DEPTH and deeper
-
-This addresses #1136, and mitigates a stack exhaustion when printing
-a very deeply nested term.
----
- src/jv_print.c | 8 +++++++-
- 1 file changed, 7 insertions(+), 1 deletion(-)
-
-diff --git a/src/jv_print.c b/src/jv_print.c
-index 5f4f234..cf6651b 100644
---- src/jv_print.c
-+++ src/jv_print.c
-@@ -13,6 +13,10 @@
- #include "jv_dtoa.h"
- #include "jv_unicode.h"
-
-+#ifndef MAX_DEPTH
-+#define MAX_DEPTH 256
-+#endif
-+
- #define ESC "\033"
- #define COL(c) (ESC "[" c "m")
- #define COLRESET (ESC "[0m")
-@@ -150,7 +154,9 @@ static void jv_dump_term(struct dtoa_context* C, jv x, int flags, int indent, FI
- }
- }
- }
-- switch (jv_get_kind(x)) {
-+ if (indent > MAX_DEPTH) {
-+ put_str("<stripped: exceeds max depth>", F, S, flags & JV_PRINT_ISATTY);
-+ } else switch (jv_get_kind(x)) {
- default:
- case JV_KIND_INVALID:
- if (flags & JV_PRINT_INVALID) {
+++ /dev/null
-From 8eb1367ca44e772963e704a700ef72ae2e12babd Mon Sep 17 00:00:00 2001
-From: Nicolas Williams <nico@cryptonector.com>
-Date: Sat, 24 Oct 2015 17:24:57 -0500
-Subject: [PATCH] Heap buffer overflow in tokenadd() (fix #105)
-
-This was an off-by one: the NUL terminator byte was not allocated on
-resize. This was triggered by JSON-encoded numbers longer than 256
-bytes.
----
- src/jv_parse.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/jv_parse.c b/src/jv_parse.c
-index 3102ed4..84245b8 100644
---- src/jv_parse.c
-+++ src/jv_parse.c
-@@ -383,7 +383,7 @@ static pfunc stream_token(struct jv_parser* p, char ch) {
-
- static void tokenadd(struct jv_parser* p, char c) {
- assert(p->tokenpos <= p->tokenlen);
-- if (p->tokenpos == p->tokenlen) {
-+ if (p->tokenpos >= (p->tokenlen - 1)) {
- p->tokenlen = p->tokenlen*2 + 256;
- p->tokenbuf = jv_mem_realloc(p->tokenbuf, p->tokenlen);
- }
-@@ -485,7 +485,7 @@ static pfunc check_literal(struct jv_parser* p) {
- TRY(value(p, v));
- } else {
- // FIXME: better parser
-- p->tokenbuf[p->tokenpos] = 0; // FIXME: invalid
-+ p->tokenbuf[p->tokenpos] = 0;
- char* end = 0;
- double d = jvp_strtod(&p->dtoa, p->tokenbuf, &end);
- if (end == 0 || *end != 0)
include $(TOPDIR)/rules.mk
PKG_NAME:=less
-PKG_VERSION:=487
+PKG_VERSION:=530
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.greenwoodsoftware.com/less
-PKG_HASH:=f3dc8455cb0b2b66e0c6b816c00197a71bf6d1787078adeee0bcf2aea4b12706
+PKG_HASH:=503f91ab0af4846f34f0444ab71c4b286123f0044a4964f1ae781486c617f2e2
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=COPYING
include $(TOPDIR)/rules.mk
PKG_NAME:=logrotate
-PKG_VERSION:=3.10.0
-PKG_RELEASE:=2
+PKG_VERSION:=3.14.0
+PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:= https://github.com/logrotate/logrotate/releases/download/$(PKG_VERSION)
-PKG_HASH:=dbc76cae5d4912455b5221654bb6114e43d91a3a0879ce3e20a62a157532912e
+PKG_HASH:=4703bdc0e2df3b322f9dff0aafc99aa9172c9e4acae28b7c924cc7d4e5b29d55
PKG_LICENSE:=GPL-2.0
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=lsof
-PKG_VERSION:=4.89
-PKG_RELEASE:=2
+PKG_VERSION:=4.91
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=https://www.mirrorservice.org/sites/lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://sunsite.ualberta.ca/pub/Mirror/lsof/ ftp://ftp.fu-berlin.de/pub/unix/tools/lsof
-PKG_HASH:=81ac2fc5fdc944793baf41a14002b6deb5a29096b387744e28f8c30a360a3718
+PKG_SOURCE_URL:=https://www.mirrorservice.org/sites/lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.fu-berlin.de/pub/unix/tools/lsof
+PKG_HASH:=c9da946a525fbf82ff80090b6d1879c38df090556f3fe0e6d782cb44172450a3
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION)
+
PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
PKG_LICENSE:=Unique
PKG_LICENSE_FILES:=00README
include $(INCLUDE_DIR)/package.mk
-TARGET_LDFLAGS += $(LIBRPC)
-
define Package/lsof
SECTION:=utils
CATEGORY:=Utilities
- DEPENDS:=$(LIBRPC_DEPENDS)
+ DEPENDS:=+libtirpc
TITLE:=LiSt Open Files - a diagnostic tool
URL:=http://people.freebsd.org/~abe/
endef
LINUX_CLIB_IPV6=
endif
+TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/tirpc
+TARGET_LDFLAGS += -ltirpc
+
define Build/Prepare
$(PKG_UNPACK)
(cd $(PKG_BUILD_DIR) && tar -xf $(PKG_NAME)_$(PKG_VERSION)_src.tar && mv $(PKG_NAME)_$(PKG_VERSION)_src/* .)
endef
define Build/Configure
+ $(SED) 's/rpc\/rpc/\/tirpc\/rpc\/rpc/g' $(PKG_BUILD_DIR)/Configure
cd $(PKG_BUILD_DIR); \
LINUX_CLIB="-DGLIBCV=2 $(LINUX_CLIB_IPV6)" \
LSOF_CC="$(TARGET_CC)" \
LSOF_CFGL="$(TARGET_LDFLAGS)" \
LSOF_AR="$(TARGET_CROSS)ar cr" \
LSOF_RANLIB="$(TARGET_CROSS)ranlib" \
+ LSOF_INCLUDE="$(STAGING_DIR)/usr/include" \
./Configure -n linux
endef
-define Build/Compile
+define Build/Compile
LSOF_HOST="none" \
LSOF_LOGNAME="none" \
LSOF_SYSINFO="none" \
$(MAKE) -C $(PKG_BUILD_DIR)
endef
-define Package/lsof/install
+define Package/lsof/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lsof $(1)/usr/bin
endef
index e4a25a2..3a6e78b 100755
--- a/Configure
+++ b/Configure
-@@ -2923,7 +2923,7 @@ return(0); }
+@@ -2976,7 +2976,7 @@ return(0); }
LSOF_TMP1=1
fi # }
fi # }
index 3a6e78b..a2946c6 100755
--- a/Configure
+++ b/Configure
-@@ -2788,6 +2788,9 @@ LOCKF_OWNER4
+@@ -2841,6 +2841,9 @@ LOCKF_OWNER4
if test "X$LSOF_CC" = "X" # {
then
LSOF_CC=cc
include $(TOPDIR)/rules.mk
PKG_NAME:=LVM2
-PKG_VERSION:=2.02.177
-PKG_RELEASE:=2
+PKG_VERSION:=2.02.181
+PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0 LGPL-2.1
PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz
-PKG_SOURCE_URL:=ftp://sources.redhat.com/pub/lvm2/releases \
- http://ftp.gwdg.de/pub/linux/sources.redhat.com/lvm2/
-PKG_HASH:=4025a23ec9b15c2cb7486d151c29dc953b75efc4d452cfe9dbbc7c0fac8e80f2
+PKG_SOURCE_URL:=https://sourceware.org/pub/lvm2
+PKG_HASH:=400fead33b3abc2d82bd631b63f644b646e83040699f2e8f91ff5779119bb89e
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME).$(PKG_VERSION)
SECTION:=libs
CATEGORY:=Libraries
TITLE:=The Linux Kernel Device Mapper userspace library
- URL:=http://sourceware.org/dm/
+ URL:=https://sourceware.org/dm/
DEPENDS:=+kmod-dm +libpthread +libuuid +librt
endef
CATEGORY:=Utilities
SUBMENU:=Disc
TITLE:=The Linux Logical Volume Manager
- URL:=http://sourceware.org/lvm2/
- DEPENDS:=+libdevmapper +libblkid +libreadline +libncurses
+ URL:=https://sourceware.org/lvm2/
+ DEPENDS:=+libdevmapper +libblkid +libreadline +libncurses +libaio
endef
define Package/lvm2/description
--- a/make.tmpl.in
+++ b/make.tmpl.in
-@@ -19,7 +19,7 @@ SHELL = @SHELL@
+@@ -25,7 +25,7 @@ SHELL = @SHELL@
# Allow environment to override any built-in default value for CC.
# If there is a built-in default, CC is NOT set to @CC@ here.
--- a/lib/device/dev-type.c
+++ b/lib/device/dev-type.c
-@@ -22,7 +22,7 @@
+@@ -24,7 +24,7 @@
#include <ctype.h>
#ifdef BLKID_WIPING_SUPPORT
--- a/lib/commands/toolcontext.c
+++ b/lib/commands/toolcontext.c
-@@ -1869,7 +1869,7 @@ struct cmd_context *create_toolcontext(u
+@@ -1860,7 +1860,7 @@ struct cmd_context *create_toolcontext(unsigned is_clvmd,
/* FIXME Make this configurable? */
reset_lvm_errno(1);
-#ifndef VALGRIND_POOL
+#if defined(__GLIBC__) && !defined(VALGRIND_POOL)
/* Set in/out stream buffering before glibc */
- if (set_buffering) {
- /* Allocate 2 buffers */
-@@ -2249,7 +2249,7 @@ void destroy_toolcontext(struct cmd_cont
+ if (set_buffering
+ #ifdef SYS_gettid
+@@ -2254,7 +2254,7 @@ void destroy_toolcontext(struct cmd_context *cmd)
if (cmd->libmem)
dm_pool_destroy(cmd->libmem);
if (is_valid_fd(STDIN_FILENO) &&
--- a/tools/lvmcmdline.c
+++ b/tools/lvmcmdline.c
-@@ -3074,6 +3074,7 @@ int lvm_split(char *str, int *argc, char
+@@ -3109,6 +3109,7 @@ int lvm_split(char *str, int *argc, char **argv, int max)
/* Make sure we have always valid filedescriptors 0,1,2 */
static int _check_standard_fds(void)
{
int err = is_valid_fd(STDERR_FILENO);
if (!is_valid_fd(STDIN_FILENO) &&
-@@ -3100,6 +3101,12 @@ static int _check_standard_fds(void)
+@@ -3135,6 +3136,12 @@ static int _check_standard_fds(void)
strerror(errno));
return 0;
}
--- a/lib/mm/memlock.c
+++ b/lib/mm/memlock.c
-@@ -174,12 +174,15 @@ static void _allocate_memory(void)
+@@ -183,12 +183,15 @@ static void _allocate_memory(void)
* memory on free(), this is good enough for our purposes.
*/
while (missing > 0) {
inf = mallinfo();
if (hblks < inf.hblks) {
-@@ -189,9 +192,12 @@ static void _allocate_memory(void)
+@@ -198,9 +201,12 @@ static void _allocate_memory(void)
free(areas[area]);
_size_malloc_tmp /= 2;
} else {
if (area == max_areas && missing > 0) {
/* Too bad. Warn the user and proceed, as things are
-@@ -480,8 +486,13 @@ static void _lock_mem(struct cmd_context
+@@ -521,8 +527,13 @@ static void _lock_mem(struct cmd_context
* will not block memory locked thread
* Note: assuming _memlock_count_daemon is updated before _memlock_count
*/
--- a/lib/device/dev-io.c
+++ b/lib/device/dev-io.c
-@@ -529,7 +529,7 @@ int dev_open_flags(struct device *dev, i
+@@ -570,7 +570,7 @@ int dev_open_flags(struct device *dev, i
return 0;
}
include $(TOPDIR)/rules.mk
PKG_NAME:=mariadb
-PKG_VERSION:=10.2.16
-PKG_RELEASE:=3
+PKG_VERSION:=10.2.17
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL := \
https://ftp.yz.yamagata-u.ac.jp/pub/dbms/mariadb/$(PKG_NAME)-$(PKG_VERSION)/source \
https://downloads.mariadb.org/interstitial/$(PKG_NAME)-$(PKG_VERSION)/source
-PKG_HASH:=c182ee93bacee9c1395a4cece56acfc433bc5153ec627c4898927b93eee54dc4
+PKG_HASH:=e7b3078f8de874a4d451242a8a3eed49bf6f916dcd52fc3efa55886f5f35be27
PKG_MAINTAINER:=Sebastian Kemper <sebastian_ml@gmx.net>
PKG_LICENSE:=GPL-2.0 LGPL-2.1
PKG_LICENSE_FILES:=COPYING libmariadb/COPYING.LIB
--- a/scripts/mysql_install_db.sh
+++ b/scripts/mysql_install_db.sh
-@@ -383,7 +383,7 @@ fi
+@@ -388,7 +388,7 @@ fi
# Try to determine the hostname
--- /dev/null
+From c45b4a774b6d1404a080a1c1759f780fa78f223b Mon Sep 17 00:00:00 2001
+From: Sergey Vojtovich <svoj@mariadb.org>
+Date: Fri, 21 Sep 2018 16:04:16 +0400
+Subject: [PATCH] MDEV-17200 - pthread_detach called for already detached
+ threads
+
+pthread_detach_this_thread() was intended to be defined to something
+meaningful only on some ancient unixes, which don't have
+pthread_attr_setdetachstate() defined. Otherwise, on normal unixes,
+threads are created detached in the first place.
+
+This was broken in 0f01bf267680244ec488adaf65a42838756ed48e so that
+we started calling pthread_detach() for already detached threads.
+Intention was to detach aria checkpoint thread.
+
+However in 87007dc2f71634cc460271eb277ad851ec69c04b aria service threads
+were made joinable with appropriate handling, which makes breaking
+revision unneccessary.
+
+Revert remnants of 0f01bf267680244ec488adaf65a42838756ed48e, so that
+pthread_detach_this_thread() is meaningful only on some ancient unixes
+again.
+---
+ include/my_pthread.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/my_pthread.h b/include/my_pthread.h
+index 6b830ca36d24..ae2f912f979b 100644
+--- a/include/my_pthread.h
++++ b/include/my_pthread.h
+@@ -184,7 +184,7 @@ int pthread_cancel(pthread_t thread);
+ #define pthread_key(T,V) pthread_key_t V
+ #define my_pthread_getspecific_ptr(T,V) my_pthread_getspecific(T,(V))
+ #define my_pthread_setspecific_ptr(T,V) pthread_setspecific(T,(void*) (V))
+-#define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthread_detach(tmp); }
++#define pthread_detach_this_thread()
+ #define pthread_handler_t EXTERNC void *
+ typedef void *(* pthread_handler)(void *);
+
config MC_VFS
bool "Enable virtual filesystem support"
- default n
+ default y
help
This option enables the Virtual File System switch code to get
transparent access to the following file systems:
- cpio, tar, fish, sfs, ftp, sftp, extfs, smb.
- Disabled by default.
+ cpio, tar, fish, sfs, ftp, sftp, extfs.
+ Enabled by default.
endmenu
PKG_NAME:=mc
PKG_VERSION:=4.8.21
-PKG_RELEASE:=1
+PKG_RELEASE:=3
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
PKG_LICENSE:=GPL-3.0+
PKG_HASH:=8f37e546ac7c31c9c203a03b1c1d6cb2d2f623a300b86badfd367e5559fe148c
PKG_BUILD_PARALLEL:=1
PKG_FIXUP:=autoreconf gettext-version
+PKG_BUILD_DEPENDS:=MC_VFS:libtirpc
PKG_CONFIG_DEPENDS := \
CONFIG_PACKAGE_MC \
define Package/mc
SECTION:=utils
CATEGORY:=Utilities
- DEPENDS:=+glib2 +libncurses +libmount +MC_VFS:libssh2 $(LIBRPC_DEPENDS) $(ICONV_DEPENDS)
+ DEPENDS:=+glib2 +libncurses +libmount +MC_VFS:libssh2 $(ICONV_DEPENDS)
TITLE:=Midnight Commander - a powerful visual file manager
URL:=https://www.midnight-commander.org/
MENU:=1
--disable-doxygen-doc \
--with-homedir=/etc/mc \
--with-screen=ncurses \
- --without-gpm-mouse \
--without-x \
CONFIGURE_VARS += \
ifeq ($(CONFIG_MC_VFS),)
CONFIGURE_ARGS += --disable-vfs
+else
+TARGET_CPPFLAGS += -I$(STAGING_DIR)/usr/include/tirpc
endif
define Package/mc/install
include $(TOPDIR)/rules.mk
PKG_NAME:=moreutils
-PKG_VERSION:=0.60
+PKG_VERSION:=0.62
PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.xz
-PKG_SOURCE_URL:=http://http.debian.net/debian/pool/main/m/moreutils/
-PKG_HASH:=e42d18bacbd2d003779a55fb3542befa5d1d217ee37c1874e8c497581ebc17c5
+PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://git.kitenet.net/index.cgi/moreutils.git/snapshot
+PKG_HASH:=812ac4e9e09dbfb812c64fb1929ed5275c279312d78e3fe1c30b01380c902db9
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION)
PKG_MAINTAINER:=Nikil Mehta <nikil.mehta@gmail.com>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
+PKG_BUILD_PARALLEL:=0
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
--- a/Makefile
+++ b/Makefile
-@@ -13,7 +13,7 @@
+@@ -13,7 +13,7 @@ endif
DOCBOOK2XMAN=xsltproc --param man.authors.section.enabled 0 $(DOCBOOKXSL)/manpages/docbook.xsl
+all: $(BINS)
clean:
- rm -f $(BINS) $(MANS) dump.c errnos.h errno.o
-@@ -27,9 +27,6 @@
+ rm -f $(BINS) $(MANS) dump.c errnos.h errno.o \
+@@ -28,9 +28,6 @@ install:
$(INSTALL_BIN) $(BINS) $(DESTDIR)$(PREFIX)/bin
install $(PERLSCRIPTS) $(DESTDIR)$(PREFIX)/bin
--- a/Makefile
+++ b/Makefile
-@@ -2,7 +2,7 @@
+@@ -2,7 +2,7 @@ BINS=isutf8 ifdata ifne pee sponge mispipe lckdo parallel errno
PERLSCRIPTS=vidir vipe ts combine zrun chronic
MANS=sponge.1 vidir.1 vipe.1 isutf8.1 ts.1 combine.1 ifdata.1 ifne.1 pee.1 zrun.1 chronic.1 mispipe.1 lckdo.1 parallel.1 errno.1
CFLAGS?=-O2 -g -Wall
include $(TOPDIR)/rules.mk
PKG_NAME:=nano
-PKG_VERSION:=2.9.8
+PKG_VERSION:=3.1
PKG_RELEASE:=1
PKG_LICENSE:=GPL-3.0+
PKG_LICENSE_FILES:=COPYING
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/nano
-PKG_HASH:=c2deac31ba4d3fd27a42fafcc47ccf499296cc69a422bbecab63f2933ea85488
+PKG_HASH:=14c02ca40a5bc61c580ce2f9cb7f9fc72d5ccc9da17ad044f78f6fb3fdb7719e
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
--- /dev/null
+From 368ec04870a366b19f1c5801a6868786547968b0 Mon Sep 17 00:00:00 2001
+From: Benno Schulenberg <bensberg@telfort.nl>
+Date: Wed, 19 Sep 2018 20:36:39 +0200
+Subject: build: fix compilation again when configured with --enable-tiny
+
+Reported-by: Jordi Mallach <jordi@mallach.net>
+---
+ src/nano.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/nano.c b/src/nano.c
+index ebb1f11..01f92a1 100644
+--- a/src/nano.c
++++ b/src/nano.c
+@@ -1756,7 +1756,10 @@ int do_input(bool allow_funcs)
+ if (shortcut == NULL)
+ pletion_line = NULL;
+ else {
+- if (ISSET(VIEW_MODE) && shortcut->func != do_toggle_void &&
++ if (ISSET(VIEW_MODE) &&
++#ifndef NANO_TINY
++ shortcut->func != do_toggle_void &&
++#endif
+ !okay_for_view(shortcut)) {
+ print_view_warning();
+ return ERR;
+--
+cgit v1.0-41-gc330
+
PKG_NAME:=oath-toolkit
PKG_VERSION:=2.6.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
+
PKG_SOURCE:=oath-toolkit-$(PKG_VERSION).tar.gz
-PKG_HASH:=b03446fa4b549af5ebe4d35d7aba51163442d255660558cd861ebce536824aa0
PKG_SOURCE_URL:=@SAVANNAH/oath-toolkit
+PKG_HASH:=b03446fa4b549af5ebe4d35d7aba51163442d255660558cd861ebce536824aa0
+
+PKG_MAINTAINER:=Fam Zheng <fam@euphon.net>
PKG_LICENSE:=LGPL-2.0+ GPL-3.0+
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:nongnu:oath_toolkit
+
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
-PKG_MAINTAINER:=Fam Zheng <fam@euphon.net>
include $(INCLUDE_DIR)/package.mk
--- /dev/null
+diff --git a/liboath/gl/fflush.c b/liboath/gl/fflush.c
+index 3664842..a140b7a 100644
+--- a/liboath/gl/fflush.c
++++ b/liboath/gl/fflush.c
+@@ -1,18 +1,18 @@
+ /* fflush.c -- allow flushing input streams
+- Copyright (C) 2007-2016 Free Software Foundation, Inc.
++ Copyright (C) 2007-2018 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+- it under the terms of the GNU Lesser General Public License as published by
+- the Free Software Foundation; either version 2.1 of the License, or
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- GNU Lesser General Public License for more details.
++ GNU General Public License for more details.
+
+- You should have received a copy of the GNU Lesser General Public License
+- along with this program. If not, see <http://www.gnu.org/licenses/>. */
++ You should have received a copy of the GNU General Public License
++ along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+ /* Written by Eric Blake. */
+
+@@ -33,7 +33,8 @@
+ #undef fflush
+
+
+-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
++#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
++/* GNU libc, BeOS, Haiku, Linux libc5 */
+
+ /* Clear the stream's ungetc buffer, preserving the value of ftello (fp). */
+ static void
+@@ -51,7 +52,7 @@ static void
+ clear_ungetc_buffer (FILE *fp)
+ {
+ # if defined __sferror || defined __DragonFly__ || defined __ANDROID__
+- /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
++ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
+ if (HASUB (fp))
+ {
+ fp_->_p += fp_->_r;
+@@ -63,7 +64,7 @@ clear_ungetc_buffer (FILE *fp)
+ fp->_ungetc_count = 0;
+ fp->_rcount = - fp->_rcount;
+ }
+-# elif defined _IOERR /* Minix, AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */
++# elif defined _IOERR /* Minix, AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel, OpenVMS */
+ /* Nothing to do. */
+ # else /* other implementations */
+ fseeko (fp, 0, SEEK_CUR);
+@@ -72,10 +73,11 @@ clear_ungetc_buffer (FILE *fp)
+
+ #endif
+
+-#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */)
++#if ! (defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1)
++/* GNU libc, BeOS, Haiku, Linux libc5 */
+
+ # if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) && defined __SNPT
+-/* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
++/* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
+
+ static int
+ disable_seek_optimization (FILE *fp)
+@@ -98,7 +100,7 @@ update_fpos_cache (FILE *fp _GL_UNUSED_PARAMETER,
+ off_t pos _GL_UNUSED_PARAMETER)
+ {
+ # if defined __sferror || defined __DragonFly__ || defined __ANDROID__
+- /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
++ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
+ # if defined __CYGWIN__
+ /* fp_->_offset is typed as an integer. */
+ fp_->_offset = pos;
+@@ -148,7 +150,8 @@ rpl_fflush (FILE *stream)
+ if (stream == NULL || ! freading (stream))
+ return fflush (stream);
+
+-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
++#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
++ /* GNU libc, BeOS, Haiku, Linux libc5 */
+
+ clear_ungetc_buffer_preserving_position (stream);
+
+@@ -199,7 +202,7 @@ rpl_fflush (FILE *stream)
+ }
+
+ # if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) && defined __SNPT
+- /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
++ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
+
+ {
+ /* Disable seek optimization for the next fseeko call. This tells the
+diff --git a/liboath/gl/fpurge.c b/liboath/gl/fpurge.c
+index acf5905..f9c2d25 100644
+--- a/liboath/gl/fpurge.c
++++ b/liboath/gl/fpurge.c
+@@ -62,7 +62,7 @@ fpurge (FILE *fp)
+ /* Most systems provide FILE as a struct and the necessary bitmask in
+ <stdio.h>, because they need it for implementing getc() and putc() as
+ fast macros. */
+-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
++# if defined _IO_ftrylockfile || __GNU_LIBRARY__ /* GNU libc, BeOS, Haiku, Linux libc5 */
+ fp->_IO_read_end = fp->_IO_read_ptr;
+ fp->_IO_write_ptr = fp->_IO_write_base;
+ /* Avoid memory leak when there is an active ungetc buffer. */
+diff --git a/liboath/gl/freading.c b/liboath/gl/freading.c
+index 8ab19fd..54c3d5a 100644
+--- a/liboath/gl/freading.c
++++ b/liboath/gl/freading.c
+@@ -31,7 +31,7 @@ freading (FILE *fp)
+ /* Most systems provide FILE as a struct and the necessary bitmask in
+ <stdio.h>, because they need it for implementing getc() and putc() as
+ fast macros. */
+-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
++# if defined _IO_ftrylockfile || __GNU_LIBRARY__ /* GNU libc, BeOS, Haiku, Linux libc5 */
+ return ((fp->_flags & _IO_NO_WRITES) != 0
+ || ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0
+ && fp->_IO_read_base != NULL));
+diff --git a/liboath/gl/fseeko.c b/liboath/gl/fseeko.c
+index 67bb9ec..5616221 100644
+--- a/liboath/gl/fseeko.c
++++ b/liboath/gl/fseeko.c
+@@ -47,7 +47,7 @@ fseeko (FILE *fp, off_t offset, int whence)
+ #endif
+
+ /* These tests are based on fpurge.c. */
+-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
++#if defined _IO_ftrylockfile || __GNU_LIBRARY__ /* GNU libc, BeOS, Haiku, Linux libc5 */
+ if (fp->_IO_read_end == fp->_IO_read_ptr
+ && fp->_IO_write_ptr == fp->_IO_write_base
+ && fp->_IO_save_base == NULL)
+@@ -123,7 +123,7 @@ fseeko (FILE *fp, off_t offset, int whence)
+ return -1;
+ }
+
+-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
++#if defined _IO_ftrylockfile || __GNU_LIBRARY__ /* GNU libc, BeOS, Haiku, Linux libc5 */
+ fp->_flags &= ~_IO_EOF_SEEN;
+ fp->_offset = pos;
+ #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
+diff --git a/liboath/gl/stdio-impl.h b/liboath/gl/stdio-impl.h
+index 4c02c9f..393ef0c 100644
+--- a/liboath/gl/stdio-impl.h
++++ b/liboath/gl/stdio-impl.h
+@@ -1,23 +1,29 @@
+ /* Implementation details of FILE streams.
+- Copyright (C) 2007-2008, 2010-2016 Free Software Foundation, Inc.
++ Copyright (C) 2007-2008, 2010-2018 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+- it under the terms of the GNU Lesser General Public License as published by
+- the Free Software Foundation; either version 2.1 of the License, or
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- GNU Lesser General Public License for more details.
++ GNU General Public License for more details.
+
+- You should have received a copy of the GNU Lesser General Public License
+- along with this program. If not, see <http://www.gnu.org/licenses/>. */
++ You should have received a copy of the GNU General Public License
++ along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+ /* Many stdio implementations have the same logic and therefore can share
+ the same implementation of stdio extension API, except that some fields
+ have different naming conventions, or their access requires some casts. */
+
++/* Glibc 2.28 made _IO_IN_BACKUP private. For now, work around this
++ problem by defining it ourselves. FIXME: Do not rely on glibc
++ internals. */
++#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN
++# define _IO_IN_BACKUP 0x100
++#endif
+
+ /* BSD stdio derived implementations. */
+
+@@ -29,10 +35,10 @@
+ #include <errno.h> /* For detecting Plan9. */
+
+ #if defined __sferror || defined __DragonFly__ || defined __ANDROID__
+- /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
++ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
+
+ # if defined __DragonFly__ /* DragonFly */
+- /* See <http://www.dragonflybsd.org/cvsweb/src/lib/libc/stdio/priv_stdio.h?rev=HEAD&content-type=text/x-cvsweb-markup>. */
++ /* See <https://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/lib/libc/stdio/priv_stdio.h>. */
+ # define fp_ ((struct { struct __FILE_public pub; \
+ struct { unsigned char *_base; int _size; } _bf; \
+ void *cookie; \
+@@ -49,30 +55,84 @@
+ fpos_t _offset; \
+ /* More fields, not relevant here. */ \
+ } *) fp)
+- /* See <http://www.dragonflybsd.org/cvsweb/src/include/stdio.h?rev=HEAD&content-type=text/x-cvsweb-markup>. */
++ /* See <https://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/include/stdio.h>. */
+ # define _p pub._p
+ # define _flags pub._flags
+ # define _r pub._r
+ # define _w pub._w
++# elif defined __ANDROID__ /* Android */
++ /* Up to this commit from 2015-10-12
++ <https://android.googlesource.com/platform/bionic.git/+/f0141dfab10a4b332769d52fa76631a64741297a>
++ the innards of FILE were public, and fp_ub could be defined like for OpenBSD,
++ see <https://android.googlesource.com/platform/bionic.git/+/e78392637d5086384a5631ddfdfa8d7ec8326ee3/libc/stdio/fileext.h>
++ and <https://android.googlesource.com/platform/bionic.git/+/e78392637d5086384a5631ddfdfa8d7ec8326ee3/libc/stdio/local.h>.
++ After this commit, the innards of FILE are hidden. */
++# define fp_ ((struct { unsigned char *_p; \
++ int _r; \
++ int _w; \
++ int _flags; \
++ int _file; \
++ struct { unsigned char *_base; size_t _size; } _bf; \
++ int _lbfsize; \
++ void *_cookie; \
++ void *_close; \
++ void *_read; \
++ void *_seek; \
++ void *_write; \
++ struct { unsigned char *_base; size_t _size; } _ext; \
++ unsigned char *_up; \
++ int _ur; \
++ unsigned char _ubuf[3]; \
++ unsigned char _nbuf[1]; \
++ struct { unsigned char *_base; size_t _size; } _lb; \
++ int _blksize; \
++ fpos_t _offset; \
++ /* More fields, not relevant here. */ \
++ } *) fp)
+ # else
+ # define fp_ fp
+ # endif
+
+-# if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ || defined __ANDROID__ /* NetBSD >= 1.5ZA, OpenBSD, Android */
++# if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ || defined __minix /* NetBSD >= 1.5ZA, OpenBSD, Minix 3 */
+ /* See <http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup>
+- and <http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup> */
++ and <https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup>
++ and <https://github.com/Stichting-MINIX-Research-Foundation/minix/blob/master/lib/libc/stdio/fileext.h> */
+ struct __sfileext
+ {
+ struct __sbuf _ub; /* ungetc buffer */
+ /* More fields, not relevant here. */
+ };
+ # define fp_ub ((struct __sfileext *) fp->_ext._base)->_ub
+-# else /* FreeBSD, NetBSD <= 1.5Z, DragonFly, Mac OS X, Cygwin, Android */
++# elif defined __ANDROID__ /* Android */
++ struct __sfileext
++ {
++ struct { unsigned char *_base; size_t _size; } _ub; /* ungetc buffer */
++ /* More fields, not relevant here. */
++ };
++# define fp_ub ((struct __sfileext *) fp_->_ext._base)->_ub
++# else /* FreeBSD, NetBSD <= 1.5Z, DragonFly, Mac OS X, Cygwin */
+ # define fp_ub fp_->_ub
+ # endif
+
+ # define HASUB(fp) (fp_ub._base != NULL)
+
++# if defined __ANDROID__ /* Android */
++ /* Needed after this commit from 2016-01-25
++ <https://android.googlesource.com/platform/bionic.git/+/e70e0e9267d069bf56a5078c99307e08a7280de7> */
++# ifndef __SEOF
++# define __SLBF 1
++# define __SNBF 2
++# define __SRD 4
++# define __SWR 8
++# define __SRW 0x10
++# define __SEOF 0x20
++# define __SERR 0x40
++# endif
++# ifndef __SOFF
++# define __SOFF 0x1000
++# endif
++# endif
++
+ #endif
+
+
+@@ -81,7 +141,7 @@
+ #ifdef __TANDEM /* NonStop Kernel */
+ # ifndef _IOERR
+ /* These values were determined by the program 'stdioext-flags' at
+- <http://lists.gnu.org/archive/html/bug-gnulib/2010-12/msg00165.html>. */
++ <https://lists.gnu.org/r/bug-gnulib/2010-12/msg00165.html>. */
+ # define _IOERR 0x40
+ # define _IOREAD 0x80
+ # define _IOWRT 0x4
+@@ -99,6 +159,8 @@
+ int _file; \
+ unsigned int _flag; \
+ } *) fp)
++# elif defined __VMS /* OpenVMS */
++# define fp_ ((struct _iobuf *) fp)
+ # else
+ # define fp_ fp
+ # endif
+@@ -110,4 +172,31 @@
+ # define _flag __flag
+ # endif
+
++#elif defined _WIN32 && ! defined __CYGWIN__ /* newer Windows with MSVC */
++
++/* <stdio.h> does not define the innards of FILE any more. */
++# define WINDOWS_OPAQUE_FILE
++
++struct _gl_real_FILE
++{
++ /* Note: Compared to older Windows and to mingw, it has the fields
++ _base and _cnt swapped. */
++ unsigned char *_ptr;
++ unsigned char *_base;
++ int _cnt;
++ int _flag;
++ int _file;
++ int _charbuf;
++ int _bufsiz;
++};
++# define fp_ ((struct _gl_real_FILE *) fp)
++
++/* These values were determined by a program similar to the one at
++ <https://lists.gnu.org/r/bug-gnulib/2010-12/msg00165.html>. */
++# define _IOREAD 0x1
++# define _IOWRT 0x2
++# define _IORW 0x4
++# define _IOEOF 0x8
++# define _IOERR 0x10
++
+ #endif
+diff --git a/libpskc/gl/intprops.h b/libpskc/gl/intprops.h
+index feb02c3..af456ff 100644
+--- a/libpskc/gl/intprops.h
++++ b/libpskc/gl/intprops.h
+@@ -1,6 +1,6 @@
+ /* intprops.h -- properties of integer types
+
+- Copyright (C) 2001-2016 Free Software Foundation, Inc.
++ Copyright (C) 2001-2018 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published
+@@ -13,7 +13,7 @@
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+- along with this program. If not, see <http://www.gnu.org/licenses/>. */
++ along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+ /* Written by Paul Eggert. */
+
+@@ -21,13 +21,12 @@
+ #define _GL_INTPROPS_H
+
+ #include <limits.h>
+-#include <verify.h>
+
+ /* Return a value with the common real type of E and V and the value of V. */
+ #define _GL_INT_CONVERT(e, v) (0 * (e) + (v))
+
+ /* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see
+- <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00406.html>. */
++ <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00406.html>. */
+ #define _GL_INT_NEGATE_CONVERT(e, v) (0 * (e) - (v))
+
+ /* The extra casts in the following macros work around compiler bugs,
+@@ -47,12 +46,16 @@
+
+ /* Minimum and maximum values for integer types and expressions. */
+
++/* The width in bits of the integer type or expression T.
++ Padding bits are not supported; this is checked at compile-time below. */
++#define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT)
++
+ /* The maximum and minimum values for the integer type T. */
+ #define TYPE_MINIMUM(t) ((t) ~ TYPE_MAXIMUM (t))
+ #define TYPE_MAXIMUM(t) \
+ ((t) (! TYPE_SIGNED (t) \
+ ? (t) -1 \
+- : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
++ : ((((t) 1 << (TYPE_WIDTH (t) - 2)) - 1) * 2 + 1)))
+
+ /* The maximum and minimum values for the type of the expression E,
+ after integer promotion. E should not have side effects. */
+@@ -65,29 +68,23 @@
+ ? _GL_SIGNED_INT_MAXIMUM (e) \
+ : _GL_INT_NEGATE_CONVERT (e, 1))
+ #define _GL_SIGNED_INT_MAXIMUM(e) \
+- (((_GL_INT_CONVERT (e, 1) << (sizeof ((e) + 0) * CHAR_BIT - 2)) - 1) * 2 + 1)
++ (((_GL_INT_CONVERT (e, 1) << (TYPE_WIDTH ((e) + 0) - 2)) - 1) * 2 + 1)
++
++/* Work around OpenVMS incompatibility with C99. */
++#if !defined LLONG_MAX && defined __INT64_MAX
++# define LLONG_MAX __INT64_MAX
++# define LLONG_MIN __INT64_MIN
++#endif
+
+ /* This include file assumes that signed types are two's complement without
+ padding bits; the above macros have undefined behavior otherwise.
+ If this is a problem for you, please let us know how to fix it for your host.
+- As a sanity check, test the assumption for some signed types that
+- <limits.h> bounds. */
+-verify (TYPE_MINIMUM (signed char) == SCHAR_MIN);
+-verify (TYPE_MAXIMUM (signed char) == SCHAR_MAX);
+-verify (TYPE_MINIMUM (short int) == SHRT_MIN);
+-verify (TYPE_MAXIMUM (short int) == SHRT_MAX);
+-verify (TYPE_MINIMUM (int) == INT_MIN);
+-verify (TYPE_MAXIMUM (int) == INT_MAX);
+-verify (TYPE_MINIMUM (long int) == LONG_MIN);
+-verify (TYPE_MAXIMUM (long int) == LONG_MAX);
+-#ifdef LLONG_MAX
+-verify (TYPE_MINIMUM (long long int) == LLONG_MIN);
+-verify (TYPE_MAXIMUM (long long int) == LLONG_MAX);
+-#endif
++ This assumption is tested by the intprops-tests module. */
+
+ /* Does the __typeof__ keyword work? This could be done by
+ 'configure', but for now it's easier to do it by hand. */
+-#if (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
++#if (2 <= __GNUC__ \
++ || (1210 <= __IBMC__ && defined __IBM__TYPEOF__) \
+ || (0x5110 <= __SUNPRO_C && !__STDC__))
+ # define _GL_HAVE___TYPEOF__ 1
+ #else
+@@ -116,8 +113,7 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX);
+ signed, this macro may overestimate the true bound by one byte when
+ applied to unsigned types of size 2, 4, 16, ... bytes. */
+ #define INT_STRLEN_BOUND(t) \
+- (INT_BITS_STRLEN_BOUND (sizeof (t) * CHAR_BIT \
+- - _GL_SIGNED_TYPE_OR_EXPR (t)) \
++ (INT_BITS_STRLEN_BOUND (TYPE_WIDTH (t) - _GL_SIGNED_TYPE_OR_EXPR (t)) \
+ + _GL_SIGNED_TYPE_OR_EXPR (t))
+
+ /* Bound on buffer size needed to represent an integer type or expression T,
+@@ -183,7 +179,7 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX);
+ /* Return 1 if A * B would overflow in [MIN,MAX] arithmetic.
+ See above for restrictions. Avoid && and || as they tickle
+ bugs in Sun C 5.11 2010/08/13 and other compilers; see
+- <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00401.html>. */
++ <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00401.html>. */
+ #define INT_MULTIPLY_RANGE_OVERFLOW(a, b, min, max) \
+ ((b) < 0 \
+ ? ((a) < 0 \
+@@ -222,20 +218,27 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX);
+ ? (a) < (min) >> (b) \
+ : (max) >> (b) < (a))
+
+-/* True if __builtin_add_overflow (A, B, P) works when P is null. */
+-#define _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL (7 <= __GNUC__)
++/* True if __builtin_add_overflow (A, B, P) works when P is non-null. */
++#if 5 <= __GNUC__ && !defined __ICC
++# define _GL_HAS_BUILTIN_OVERFLOW 1
++#else
++# define _GL_HAS_BUILTIN_OVERFLOW 0
++#endif
++
++/* True if __builtin_add_overflow_p (A, B, C) works. */
++#define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__)
+
+ /* The _GL*_OVERFLOW macros have the same restrictions as the
+ *_RANGE_OVERFLOW macros, except that they do not assume that operands
+ (e.g., A and B) have the same type as MIN and MAX. Instead, they assume
+ that the result (e.g., A + B) has that type. */
+-#if _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL
+-# define _GL_ADD_OVERFLOW(a, b, min, max)
+- __builtin_add_overflow (a, b, (__typeof__ ((a) + (b)) *) 0)
+-# define _GL_SUBTRACT_OVERFLOW(a, b, min, max)
+- __builtin_sub_overflow (a, b, (__typeof__ ((a) - (b)) *) 0)
+-# define _GL_MULTIPLY_OVERFLOW(a, b, min, max)
+- __builtin_mul_overflow (a, b, (__typeof__ ((a) * (b)) *) 0)
++#if _GL_HAS_BUILTIN_OVERFLOW_P
++# define _GL_ADD_OVERFLOW(a, b, min, max) \
++ __builtin_add_overflow_p (a, b, (__typeof__ ((a) + (b))) 0)
++# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \
++ __builtin_sub_overflow_p (a, b, (__typeof__ ((a) - (b))) 0)
++# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \
++ __builtin_mul_overflow_p (a, b, (__typeof__ ((a) * (b))) 0)
+ #else
+ # define _GL_ADD_OVERFLOW(a, b, min, max) \
+ ((min) < 0 ? INT_ADD_RANGE_OVERFLOW (a, b, min, max) \
+@@ -315,7 +318,7 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX);
+ _GL_BINARY_OP_OVERFLOW (a, b, _GL_ADD_OVERFLOW)
+ #define INT_SUBTRACT_OVERFLOW(a, b) \
+ _GL_BINARY_OP_OVERFLOW (a, b, _GL_SUBTRACT_OVERFLOW)
+-#if _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL
++#if _GL_HAS_BUILTIN_OVERFLOW_P
+ # define INT_NEGATE_OVERFLOW(a) INT_SUBTRACT_OVERFLOW (0, a)
+ #else
+ # define INT_NEGATE_OVERFLOW(a) \
+@@ -349,10 +352,6 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX);
+ #define INT_MULTIPLY_WRAPV(a, b, r) \
+ _GL_INT_OP_WRAPV (a, b, r, *, __builtin_mul_overflow, INT_MULTIPLY_OVERFLOW)
+
+-#ifndef __has_builtin
+-# define __has_builtin(x) 0
+-#endif
+-
+ /* Nonzero if this compiler has GCC bug 68193 or Clang bug 25390. See:
+ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68193
+ https://llvm.org/bugs/show_bug.cgi?id=25390
+@@ -369,17 +368,17 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX);
+ the operation. BUILTIN is the builtin operation, and OVERFLOW the
+ overflow predicate. Return 1 if the result overflows. See above
+ for restrictions. */
+-#if 5 <= __GNUC__ || __has_builtin (__builtin_add_overflow)
++#if _GL_HAS_BUILTIN_OVERFLOW
+ # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) builtin (a, b, r)
+ #elif 201112 <= __STDC_VERSION__ && !_GL__GENERIC_BOGUS
+ # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \
+ (_Generic \
+ (*(r), \
+ signed char: \
+- _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned char, \
++ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+ signed char, SCHAR_MIN, SCHAR_MAX), \
+ short int: \
+- _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned short int, \
++ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+ short int, SHRT_MIN, SHRT_MAX), \
+ int: \
+ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+@@ -393,10 +392,10 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX);
+ #else
+ # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \
+ (sizeof *(r) == sizeof (signed char) \
+- ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned char, \
++ ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+ signed char, SCHAR_MIN, SCHAR_MAX) \
+ : sizeof *(r) == sizeof (short int) \
+- ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned short int, \
++ ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+ short int, SHRT_MIN, SHRT_MAX) \
+ : sizeof *(r) == sizeof (int) \
+ ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+@@ -412,15 +411,14 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX);
+ # else
+ # define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \
+ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
+- long int, LONG_MIN, LONG_MAX))
++ long int, LONG_MIN, LONG_MAX)
+ # endif
+ #endif
+
+ /* Store the low-order bits of A <op> B into *R, where the operation
+ is given by OP. Use the unsigned type UT for calculation to avoid
+- overflow problems. *R's type is T, with extremal values TMIN and
+- TMAX. T must be a signed integer type. Return 1 if the result
+- overflows. */
++ overflow problems. *R's type is T, with extrema TMIN and TMAX.
++ T must be a signed integer type. Return 1 if the result overflows. */
+ #define _GL_INT_OP_CALC(a, b, r, op, overflow, ut, t, tmin, tmax) \
+ (sizeof ((a) op (b)) < sizeof (t) \
+ ? _GL_INT_OP_CALC1 ((t) (a), (t) (b), r, op, overflow, ut, t, tmin, tmax) \
+@@ -429,17 +427,27 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX);
+ ((overflow (a, b) \
+ || (EXPR_SIGNED ((a) op (b)) && ((a) op (b)) < (tmin)) \
+ || (tmax) < ((a) op (b))) \
+- ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t, tmin, tmax), 1) \
+- : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t, tmin, tmax), 0))
+-
+-/* Return A <op> B, where the operation is given by OP. Use the
+- unsigned type UT for calculation to avoid overflow problems.
+- Convert the result to type T without overflow by subtracting TMIN
+- from large values before converting, and adding it afterwards.
+- Compilers can optimize all the operations except OP. */
+-#define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, ut, t, tmin, tmax) \
+- (((ut) (a) op (ut) (b)) <= (tmax) \
+- ? (t) ((ut) (a) op (ut) (b)) \
+- : ((t) (((ut) (a) op (ut) (b)) - (tmin)) + (tmin)))
++ ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 1) \
++ : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 0))
++
++/* Return the low-order bits of A <op> B, where the operation is given
++ by OP. Use the unsigned type UT for calculation to avoid undefined
++ behavior on signed integer overflow, and convert the result to type T.
++ UT is at least as wide as T and is no narrower than unsigned int,
++ T is two's complement, and there is no padding or trap representations.
++ Assume that converting UT to T yields the low-order bits, as is
++ done in all known two's-complement C compilers. E.g., see:
++ https://gcc.gnu.org/onlinedocs/gcc/Integers-implementation.html
++
++ According to the C standard, converting UT to T yields an
++ implementation-defined result or signal for values outside T's
++ range. However, code that works around this theoretical problem
++ runs afoul of a compiler bug in Oracle Studio 12.3 x86. See:
++ https://lists.gnu.org/r/bug-gnulib/2017-04/msg00049.html
++ As the compiler bug is real, don't try to work around the
++ theoretical problem. */
++
++#define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, ut, t) \
++ ((t) ((ut) (a) op (ut) (b)))
+
+ #endif /* _GL_INTPROPS_H */
+diff --git a/oathtool/gl/intprops.h b/oathtool/gl/intprops.h
+index e1fce5c..af456ff 100644
+--- a/oathtool/gl/intprops.h
++++ b/oathtool/gl/intprops.h
+@@ -1,19 +1,19 @@
+ /* intprops.h -- properties of integer types
+
+- Copyright (C) 2001-2016 Free Software Foundation, Inc.
++ Copyright (C) 2001-2018 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify it
+- under the terms of the GNU General Public License as published
+- by the Free Software Foundation; either version 3 of the License, or
++ under the terms of the GNU Lesser General Public License as published
++ by the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- GNU General Public License for more details.
++ GNU Lesser General Public License for more details.
+
+- You should have received a copy of the GNU General Public License
+- along with this program. If not, see <http://www.gnu.org/licenses/>. */
++ You should have received a copy of the GNU Lesser General Public License
++ along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+ /* Written by Paul Eggert. */
+
+@@ -21,13 +21,12 @@
+ #define _GL_INTPROPS_H
+
+ #include <limits.h>
+-#include <verify.h>
+
+ /* Return a value with the common real type of E and V and the value of V. */
+ #define _GL_INT_CONVERT(e, v) (0 * (e) + (v))
+
+ /* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see
+- <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00406.html>. */
++ <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00406.html>. */
+ #define _GL_INT_NEGATE_CONVERT(e, v) (0 * (e) - (v))
+
+ /* The extra casts in the following macros work around compiler bugs,
+@@ -47,12 +46,16 @@
+
+ /* Minimum and maximum values for integer types and expressions. */
+
++/* The width in bits of the integer type or expression T.
++ Padding bits are not supported; this is checked at compile-time below. */
++#define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT)
++
+ /* The maximum and minimum values for the integer type T. */
+ #define TYPE_MINIMUM(t) ((t) ~ TYPE_MAXIMUM (t))
+ #define TYPE_MAXIMUM(t) \
+ ((t) (! TYPE_SIGNED (t) \
+ ? (t) -1 \
+- : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
++ : ((((t) 1 << (TYPE_WIDTH (t) - 2)) - 1) * 2 + 1)))
+
+ /* The maximum and minimum values for the type of the expression E,
+ after integer promotion. E should not have side effects. */
+@@ -65,29 +68,23 @@
+ ? _GL_SIGNED_INT_MAXIMUM (e) \
+ : _GL_INT_NEGATE_CONVERT (e, 1))
+ #define _GL_SIGNED_INT_MAXIMUM(e) \
+- (((_GL_INT_CONVERT (e, 1) << (sizeof ((e) + 0) * CHAR_BIT - 2)) - 1) * 2 + 1)
++ (((_GL_INT_CONVERT (e, 1) << (TYPE_WIDTH ((e) + 0) - 2)) - 1) * 2 + 1)
++
++/* Work around OpenVMS incompatibility with C99. */
++#if !defined LLONG_MAX && defined __INT64_MAX
++# define LLONG_MAX __INT64_MAX
++# define LLONG_MIN __INT64_MIN
++#endif
+
+ /* This include file assumes that signed types are two's complement without
+ padding bits; the above macros have undefined behavior otherwise.
+ If this is a problem for you, please let us know how to fix it for your host.
+- As a sanity check, test the assumption for some signed types that
+- <limits.h> bounds. */
+-verify (TYPE_MINIMUM (signed char) == SCHAR_MIN);
+-verify (TYPE_MAXIMUM (signed char) == SCHAR_MAX);
+-verify (TYPE_MINIMUM (short int) == SHRT_MIN);
+-verify (TYPE_MAXIMUM (short int) == SHRT_MAX);
+-verify (TYPE_MINIMUM (int) == INT_MIN);
+-verify (TYPE_MAXIMUM (int) == INT_MAX);
+-verify (TYPE_MINIMUM (long int) == LONG_MIN);
+-verify (TYPE_MAXIMUM (long int) == LONG_MAX);
+-#ifdef LLONG_MAX
+-verify (TYPE_MINIMUM (long long int) == LLONG_MIN);
+-verify (TYPE_MAXIMUM (long long int) == LLONG_MAX);
+-#endif
++ This assumption is tested by the intprops-tests module. */
+
+ /* Does the __typeof__ keyword work? This could be done by
+ 'configure', but for now it's easier to do it by hand. */
+-#if (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
++#if (2 <= __GNUC__ \
++ || (1210 <= __IBMC__ && defined __IBM__TYPEOF__) \
+ || (0x5110 <= __SUNPRO_C && !__STDC__))
+ # define _GL_HAVE___TYPEOF__ 1
+ #else
+@@ -116,8 +113,7 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX);
+ signed, this macro may overestimate the true bound by one byte when
+ applied to unsigned types of size 2, 4, 16, ... bytes. */
+ #define INT_STRLEN_BOUND(t) \
+- (INT_BITS_STRLEN_BOUND (sizeof (t) * CHAR_BIT \
+- - _GL_SIGNED_TYPE_OR_EXPR (t)) \
++ (INT_BITS_STRLEN_BOUND (TYPE_WIDTH (t) - _GL_SIGNED_TYPE_OR_EXPR (t)) \
+ + _GL_SIGNED_TYPE_OR_EXPR (t))
+
+ /* Bound on buffer size needed to represent an integer type or expression T,
+@@ -183,7 +179,7 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX);
+ /* Return 1 if A * B would overflow in [MIN,MAX] arithmetic.
+ See above for restrictions. Avoid && and || as they tickle
+ bugs in Sun C 5.11 2010/08/13 and other compilers; see
+- <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00401.html>. */
++ <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00401.html>. */
+ #define INT_MULTIPLY_RANGE_OVERFLOW(a, b, min, max) \
+ ((b) < 0 \
+ ? ((a) < 0 \
+@@ -222,20 +218,27 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX);
+ ? (a) < (min) >> (b) \
+ : (max) >> (b) < (a))
+
+-/* True if __builtin_add_overflow (A, B, P) works when P is null. */
+-#define _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL (7 <= __GNUC__)
++/* True if __builtin_add_overflow (A, B, P) works when P is non-null. */
++#if 5 <= __GNUC__ && !defined __ICC
++# define _GL_HAS_BUILTIN_OVERFLOW 1
++#else
++# define _GL_HAS_BUILTIN_OVERFLOW 0
++#endif
++
++/* True if __builtin_add_overflow_p (A, B, C) works. */
++#define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__)
+
+ /* The _GL*_OVERFLOW macros have the same restrictions as the
+ *_RANGE_OVERFLOW macros, except that they do not assume that operands
+ (e.g., A and B) have the same type as MIN and MAX. Instead, they assume
+ that the result (e.g., A + B) has that type. */
+-#if _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL
+-# define _GL_ADD_OVERFLOW(a, b, min, max)
+- __builtin_add_overflow (a, b, (__typeof__ ((a) + (b)) *) 0)
+-# define _GL_SUBTRACT_OVERFLOW(a, b, min, max)
+- __builtin_sub_overflow (a, b, (__typeof__ ((a) - (b)) *) 0)
+-# define _GL_MULTIPLY_OVERFLOW(a, b, min, max)
+- __builtin_mul_overflow (a, b, (__typeof__ ((a) * (b)) *) 0)
++#if _GL_HAS_BUILTIN_OVERFLOW_P
++# define _GL_ADD_OVERFLOW(a, b, min, max) \
++ __builtin_add_overflow_p (a, b, (__typeof__ ((a) + (b))) 0)
++# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \
++ __builtin_sub_overflow_p (a, b, (__typeof__ ((a) - (b))) 0)
++# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \
++ __builtin_mul_overflow_p (a, b, (__typeof__ ((a) * (b))) 0)
+ #else
+ # define _GL_ADD_OVERFLOW(a, b, min, max) \
+ ((min) < 0 ? INT_ADD_RANGE_OVERFLOW (a, b, min, max) \
+@@ -315,7 +318,7 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX);
+ _GL_BINARY_OP_OVERFLOW (a, b, _GL_ADD_OVERFLOW)
+ #define INT_SUBTRACT_OVERFLOW(a, b) \
+ _GL_BINARY_OP_OVERFLOW (a, b, _GL_SUBTRACT_OVERFLOW)
+-#if _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL
++#if _GL_HAS_BUILTIN_OVERFLOW_P
+ # define INT_NEGATE_OVERFLOW(a) INT_SUBTRACT_OVERFLOW (0, a)
+ #else
+ # define INT_NEGATE_OVERFLOW(a) \
+@@ -349,10 +352,6 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX);
+ #define INT_MULTIPLY_WRAPV(a, b, r) \
+ _GL_INT_OP_WRAPV (a, b, r, *, __builtin_mul_overflow, INT_MULTIPLY_OVERFLOW)
+
+-#ifndef __has_builtin
+-# define __has_builtin(x) 0
+-#endif
+-
+ /* Nonzero if this compiler has GCC bug 68193 or Clang bug 25390. See:
+ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68193
+ https://llvm.org/bugs/show_bug.cgi?id=25390
+@@ -369,17 +368,17 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX);
+ the operation. BUILTIN is the builtin operation, and OVERFLOW the
+ overflow predicate. Return 1 if the result overflows. See above
+ for restrictions. */
+-#if 5 <= __GNUC__ || __has_builtin (__builtin_add_overflow)
++#if _GL_HAS_BUILTIN_OVERFLOW
+ # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) builtin (a, b, r)
+ #elif 201112 <= __STDC_VERSION__ && !_GL__GENERIC_BOGUS
+ # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \
+ (_Generic \
+ (*(r), \
+ signed char: \
+- _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned char, \
++ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+ signed char, SCHAR_MIN, SCHAR_MAX), \
+ short int: \
+- _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned short int, \
++ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+ short int, SHRT_MIN, SHRT_MAX), \
+ int: \
+ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+@@ -393,10 +392,10 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX);
+ #else
+ # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \
+ (sizeof *(r) == sizeof (signed char) \
+- ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned char, \
++ ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+ signed char, SCHAR_MIN, SCHAR_MAX) \
+ : sizeof *(r) == sizeof (short int) \
+- ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned short int, \
++ ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+ short int, SHRT_MIN, SHRT_MAX) \
+ : sizeof *(r) == sizeof (int) \
+ ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+@@ -412,15 +411,14 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX);
+ # else
+ # define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \
+ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
+- long int, LONG_MIN, LONG_MAX))
++ long int, LONG_MIN, LONG_MAX)
+ # endif
+ #endif
+
+ /* Store the low-order bits of A <op> B into *R, where the operation
+ is given by OP. Use the unsigned type UT for calculation to avoid
+- overflow problems. *R's type is T, with extremal values TMIN and
+- TMAX. T must be a signed integer type. Return 1 if the result
+- overflows. */
++ overflow problems. *R's type is T, with extrema TMIN and TMAX.
++ T must be a signed integer type. Return 1 if the result overflows. */
+ #define _GL_INT_OP_CALC(a, b, r, op, overflow, ut, t, tmin, tmax) \
+ (sizeof ((a) op (b)) < sizeof (t) \
+ ? _GL_INT_OP_CALC1 ((t) (a), (t) (b), r, op, overflow, ut, t, tmin, tmax) \
+@@ -429,17 +427,27 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX);
+ ((overflow (a, b) \
+ || (EXPR_SIGNED ((a) op (b)) && ((a) op (b)) < (tmin)) \
+ || (tmax) < ((a) op (b))) \
+- ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t, tmin, tmax), 1) \
+- : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t, tmin, tmax), 0))
+-
+-/* Return A <op> B, where the operation is given by OP. Use the
+- unsigned type UT for calculation to avoid overflow problems.
+- Convert the result to type T without overflow by subtracting TMIN
+- from large values before converting, and adding it afterwards.
+- Compilers can optimize all the operations except OP. */
+-#define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, ut, t, tmin, tmax) \
+- (((ut) (a) op (ut) (b)) <= (tmax) \
+- ? (t) ((ut) (a) op (ut) (b)) \
+- : ((t) (((ut) (a) op (ut) (b)) - (tmin)) + (tmin)))
++ ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 1) \
++ : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 0))
++
++/* Return the low-order bits of A <op> B, where the operation is given
++ by OP. Use the unsigned type UT for calculation to avoid undefined
++ behavior on signed integer overflow, and convert the result to type T.
++ UT is at least as wide as T and is no narrower than unsigned int,
++ T is two's complement, and there is no padding or trap representations.
++ Assume that converting UT to T yields the low-order bits, as is
++ done in all known two's-complement C compilers. E.g., see:
++ https://gcc.gnu.org/onlinedocs/gcc/Integers-implementation.html
++
++ According to the C standard, converting UT to T yields an
++ implementation-defined result or signal for values outside T's
++ range. However, code that works around this theoretical problem
++ runs afoul of a compiler bug in Oracle Studio 12.3 x86. See:
++ https://lists.gnu.org/r/bug-gnulib/2017-04/msg00049.html
++ As the compiler bug is real, don't try to work around the
++ theoretical problem. */
++
++#define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, ut, t) \
++ ((t) ((ut) (a) op (ut) (b)))
+
+ #endif /* _GL_INTPROPS_H */
include $(TOPDIR)/rules.mk
PKG_NAME:=open-plc-utils
-PKG_VERSION:=2017-12-03
+PKG_VERSION:=2018-11-03
PKG_RELEASE:=$(PKG_SOURCE_VERSION)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/qca/open-plc-utils.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=18b7e2a9a17f043fe8ac8b457680aafb1c249c55
+PKG_SOURCE_VERSION:=32408520fcebe785983a68e39ec83830a3005779
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
-PKG_MIRROR_HASH:=8ccbee8a6eb9a9be97bab74e02033cdb57456ae5f78fd3b19a3661352b89e259
+PKG_MIRROR_HASH:=1c5a2bb75550f1d7069f857c30f1f45ccfd3b0b0e9abadbca10f4df582f51d1c
PKG_MAINTAINER:=Florian Fainelli <florian@openwrt.org>
+++ /dev/null
-Index: open-plc-utils-2017-01-15/docbook/version.h.html
-===================================================================
---- open-plc-utils-2017-01-15.orig/docbook/version.h.html 2017-01-13 19:44:27.000000000 +0100
-+++ open-plc-utils-2017-01-15/docbook/version.h.html 2017-12-03 03:46:31.119387280 +0100
-@@ -40,7 +40,6 @@
- #define PROJECT "open-plc-utils"
- #define VERSION "0.0.6"
- #define RELEASE "OSRQCA-929"
--#define COMPILE __TIME__ " " __DATE__
- #define CONTACT "cmaier@qca.qualcomm.com"
- #define LICENSE "Clear BSD"
-
-Index: open-plc-utils-2017-01-15/tools/version.c
-===================================================================
---- open-plc-utils-2017-01-15.orig/tools/version.c 2017-01-13 19:44:27.000000000 +0100
-+++ open-plc-utils-2017-01-15/tools/version.c 2017-12-03 03:45:57.358690651 +0100
-@@ -30,7 +30,6 @@
- printf (RELEASE " ");
- printf ("ISO C ");
-- printf (COMPANY " ");
-+ printf (COMPANY "\n");
-- printf (COMPILE "\n");
- return;
- }
-
-Index: open-plc-utils-2017-01-15/tools/version.h
-===================================================================
---- open-plc-utils-2017-01-15.orig/tools/version.h 2017-01-13 19:44:27.000000000 +0100
-+++ open-plc-utils-2017-01-15/tools/version.h 2017-12-03 03:46:08.902929217 +0100
-@@ -20,7 +20,6 @@
- #define PROJECT "open-plc-utils"
- #define VERSION "0.0.6"
- #define RELEASE "OSRQCA-929"
--#define COMPILE __TIME__ " " __DATE__
- #define CONTACT "https://github.com/qca/open-plc-utils"
- #define LICENSE "Clear BSD"
-
include $(TOPDIR)/rules.mk
PKG_NAME:=openobex
-PKG_VERSION:=1.7.1
+PKG_VERSION:=1.7.2
PKG_RELEASE:=1
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-Source
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-Source.tar.gz
PKG_SOURCE_URL:=@SF/openobex
-PKG_HASH:=3b264665d90901ea4ff720332ffb9b6d1d8f67187463d3a3279caddc7205ea57
+PKG_HASH:=158860aaea52f0fce0c8e4b64550daaae06df2689e05834697b7e8c7d73dd4fc
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-Source
+PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
PKG_LICENSE:=GPL-2.0+ LGPL-2.1+
PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
+PKG_CPE_ID:=cpe:/a:openobex:openobex
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 813f900..a0942e8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -1,6 +1,6 @@
- cmake_minimum_required ( VERSION 2.8.5 FATAL_ERROR )\r
+@@ -1,7 +1,7 @@
+ cmake_minimum_required ( VERSION 3.1 FATAL_ERROR )\r
\r
--project ( openobex C )\r
-+project ( openobex C CXX )\r
+ project ( openobex\r
+- LANGUAGES C\r
++ LANGUAGES C CXX\r
+ VERSION 1.7.2\r
+ )\r
\r
- #\r
- # The project version\r
define Package/owshell
$(call Package/owfs/Utility)
TITLE:=OWFS - shell utilities
- DEPENDS+= +USE_UCLIBC:librpc
endef
define Package/owshell/description
PKG_NAME:=picocom
PKG_VERSION:=3.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/npat-efault/picocom/tar.gz/$(PKG_VERSION)?
PKG_HASH:=e6761ca932ffc6d09bd6b11ff018bdaf70b287ce518b3282d29e0270e88420bb
-PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
+PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
PKG_LICENSE:=GPL-2.0+
include $(INCLUDE_DIR)/package.mk
--- /dev/null
+From 6fad89a36968fe1bf6aed63f44b7e2e375271e76 Mon Sep 17 00:00:00 2001
+From: Nick Patavalis <npat@efault.net>
+Date: Thu, 12 Apr 2018 15:16:04 +0300
+Subject: [PATCH] Compile with libc's without cispeed / cospeed
+
+Some libc implementations (e.g. musl) do not define the cispeed and
+cospeed struct termios fields. So we have to check the
+_HAVE_STRUCT_TERMIOS_C_ISPEED and _HAVE_STRUCT_TERMIOS_C_OSPEED
+macros. If not defined, we disable custom baudrate support.
+---
+ custbaud.h | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/custbaud.h b/custbaud.h
+index 48151a4..ae4ae8d 100644
+--- a/custbaud.h
++++ b/custbaud.h
+@@ -26,6 +26,8 @@
+ #ifndef CUSTBAUD_H
+ #define CUSTBAUD_H
+
++#include <termios.h>
++
+ #ifndef NO_CUSTOM_BAUD
+
+ #if defined (__linux__)
+@@ -33,7 +35,13 @@
+ /* Enable by-default for kernels > 2.6.0 on x86 and x86_64 only */
+ #include <linux/version.h>
+ #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)
+-#if defined (__i386__) || defined (__x86_64__) || defined (USE_CUSTOM_BAUD)
++/* Some libc implementations (e.g. musl) do not define the cispeed and
++ cospeed struct termios fields. We do not support custom baudrates
++ on them. */
++#if ( (defined (__i386__) || defined (__x86_64__)) \
++ && defined (_HAVE_STRUCT_TERMIOS_C_ISPEED) \
++ && defined (_HAVE_STRUCT_TERMIOS_C_OSPEED) ) \
++ || defined (USE_CUSTOM_BAUD)
+ #ifndef USE_CUSTOM_BAUD
+ #define USE_CUSTOM_BAUD
+ #endif
+--
+2.19.1
+
include $(TOPDIR)/rules.mk
PKG_NAME:=procps-ng
-PKG_VERSION:=3.3.11
-PKG_RELEASE:=4
-PKG_LICENSE:=GPL-2.0
-PKG_LICENSE_FILES:=COPYING COPYING.LIB
+PKG_VERSION:=3.3.15
+PKG_RELEASE:=1
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://gitlab.com/procps-ng/procps.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=8a198e3eafbde0b627e9992b41d26e6762e4f8c7
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=60da7bd78e834112494e4019998c9de8d61f747eab244ef3c42cadc7fd0958cc
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=@SF/procps-ng
+PKG_HASH:=10bd744ffcb3de2d591d2f6acf1a54a7ba070fdcc432a855931a5057149f0465
PKG_MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=COPYING COPYING.LIB
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
--- a/Makefile.am
+++ b/Makefile.am
-@@ -13,10 +13,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
+@@ -14,10 +14,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = \
LDADD = ./proc/libprocps.la $(CYGWINFLAGS)
--- a/configure.ac
+++ b/configure.ac
-@@ -256,8 +256,5 @@ AC_CHECK_FUNCS([__fpending alarm atexit
+@@ -292,8 +292,5 @@ AC_CHECK_FUNCS([__fpending alarm atexit dup2 gethostname getpagesize gettimeofda
AC_CONFIG_FILES([Makefile
include/Makefile
include $(TOPDIR)/rules.mk
PKG_NAME:=progress
-PKG_VERSION:=0.13.1
+PKG_VERSION:=0.14
PKG_RELEASE:=1
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/Xfennec/progress.git
-PKG_SOURCE_VERSION:=f6894b827c638af5cf8c5c622e66491c179ba2eb
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
-PKG_MIRROR_HASH:=143047dd44f78c10763446097bcadc551e99a7a8fefc484ef5a65d7bcbe8c181
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/Xfennec/progress/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=214a0d84b3ee5dde57ec9952ec9aa68ad9261fb336ef025324b344ed7ab48af1
PKG_MAINTAINER:=Nikil Mehta <nikil.mehta@gmail.com>
PKG_LICENSE:=GPL-3.0
---- a/Makefile 2016-11-26 01:24:23.392903433 -0800
-+++ b/Makefile 2016-11-26 01:24:41.084939184 -0800
-@@ -1,19 +1,6 @@
+--- a/Makefile
++++ b/Makefile
+@@ -1,21 +1,7 @@
OBJ = progress
- override CFLAGS += -g -Wall -D_FILE_OFFSET_BITS=64
+ CFLAGS ?= -g
+ override CFLAGS += -Wall -D_FILE_OFFSET_BITS=64
-override LDFLAGS += -lm
-UNAME := $(shell uname)
+-PKG_CONFIG ?= pkg-config
-ifeq ($(UNAME), Linux)
-- ifeq (, $(shell which pkg-config 2> /dev/null))
+- ifeq (, $(shell which $(PKG_CONFIG) 2> /dev/null))
- $(error "pkg-config command not found")
- endif
-- ifeq (, $(shell pkg-config ncurses --libs 2> /dev/null))
+- ifeq (, $(shell $(PKG_CONFIG) ncurses --libs 2> /dev/null))
- $(error "ncurses package not found")
- endif
-- override LDFLAGS += $(shell pkg-config ncurses --libs)
+- override LDFLAGS += $(shell $(PKG_CONFIG) ncurses --libs)
-endif
-ifeq ($(UNAME), Darwin)
- override LDFLAGS += -lncurses
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=prometheus
+PKG_VERSION:=2.3.2
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/prometheus/prometheus/tar.gz/v${PKG_VERSION}?
+PKG_HASH:=008282497e2e85de6fb17a698dfdae4a942026f623d8a9d45b911a765442cb58
+
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Paul Spooren <spooren@informatik.uni-leipzig.de>
+
+PKG_BUILD_DEPENDS:=golang/host
+PKG_BUILD_PARALLEL:=1
+PKG_USE_MIPS16:=0
+
+GO_PKG:=github.com/prometheus/prometheus/
+GO_PKG_BUILD_PKG:=github.com/prometheus/prometheus/cmd/prometheus/
+
+include $(INCLUDE_DIR)/package.mk
+include ../../lang/golang/golang-package.mk
+
+define Package/prometheus/Default
+ TITLE:=Monitoring system & time series database
+ USERID:=prometheus=112:prometheus=112
+ URL:=http://prometheus.io
+ DEPENDS:=$(GO_ARCH_DEPENDS)
+endef
+
+define Package/prometheus
+$(call Package/prometheus/Default)
+ SECTION:=utils
+ CATEGORY:=Utilities
+endef
+
+define Package/prometheus/description
+Prometheus, a Cloud Native Computing Foundation project, is a systems and
+service monitoring system. It collects metrics from configured targets at given
+intervals, evaluates rule expressions, displays the results, and can trigger
+alerts if some condition is observed to be true.
+endef
+
+define Package/prometheus/install
+ $(call GoPackage/Package/Install/Bin,$(1))
+
+ $(CP) ./files/* $(1)/
+endef
+
+define Package/prometheus/conffiles
+/etc/prometheus.yml
+endef
+
+$(eval $(call GoBinPackage,prometheus))
+$(eval $(call BuildPackage,prometheus))
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=70
+
+USE_PROCD=1
+PROG=/usr/bin/prometheus
+CONFFILE=/etc/prometheus.yml
+
+start_service() {
+ local config_file
+ local storage_tsdb_path
+ local web_listen_address
+ config_load "prometheus"
+ config_get config_file prometheus config_file "$CONFFILE"
+ config_get storage_tsdb_path prometheus storage_tsdb_path "/data"
+ config_get web_listen_address prometheus web_listen_address "127.0.0.1:9090"
+
+ procd_open_instance
+ procd_set_param command "$PROG"
+ procd_append_param command --config.file="$config_file"
+ procd_append_param command --storage.tsdb.path="$storage_tsdb_path"
+ procd_append_param command --web.listen-address="$web_listen_address"
+ procd_append_param user "prometheus"
+ procd_set_param file "$config_file"
+ procd_set_param respawn
+ procd_close_instance
+}
--- /dev/null
+# my global config
+global:
+ scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
+ evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
+ # scrape_timeout is set to the global default (10s).
+
+# Alertmanager configuration
+alerting:
+ alertmanagers:
+ - static_configs:
+ - targets:
+ # - alertmanager:9093
+
+# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
+rule_files:
+ # - "first_rules.yml"
+ # - "second_rules.yml"
+
+# A scrape configuration containing exactly one endpoint to scrape:
+# Here it's Prometheus itself.
+scrape_configs:
+ # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
+ - job_name: 'prometheus'
+
+ # metrics_path defaults to '/metrics'
+ # scheme defaults to 'http'.
+
+ static_configs:
+ - targets: ['localhost:9090']
--- /dev/null
+#!/bin/sh
+
+[ -e /etc/config/prometheus ] || touch /etc/config/prometheus
+
+uci -q get prometheus.prometheus || {
+ uci -q batch <<EOF
+ set prometheus.prometheus=prometheus
+ set prometheus.prometheus.config_file='/etc/prometheus.yml'
+ set prometheus.prometheus.storage_tsdb_path='/data'
+ set prometheus.prometheus.web_listen_address='127.0.0.1:9090'
+ commit prometheus
+EOF
+}
--- /dev/null
+# my global config
+global:
+ scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
+ evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
+ # scrape_timeout is set to the global default (10s).
+
+# Alertmanager configuration
+alerting:
+ alertmanagers:
+ - static_configs:
+ - targets:
+ # - alertmanager:9093
+
+# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
+rule_files:
+ # - "first_rules.yml"
+ # - "second_rules.yml"
+
+# A scrape configuration containing exactly one endpoint to scrape:
+# Here it's Prometheus itself.
+scrape_configs:
+ # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
+ - job_name: 'prometheus'
+
+ # metrics_path defaults to '/metrics'
+ # scheme defaults to 'http'.
+
+ static_configs:
+ - targets: ['localhost:9090']
+++ /dev/null
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=qemu
-PKG_VERSION:=3.0.0-rc2
-PKG_RELEASE:=1
-
-PKG_SOURCE_URL:=https://download.qemu.org/
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_HASH:=b02b30c7d460996835416ef09161f6faef2700e339cf11cd99481ca51b5954f2
-PKG_LICENSE:=GPL-2.0
-
-PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
-
-HOST_BUILD_PARALLEL:=1
-PKG_BUILD_PARALLEL:=1
-PKG_INSTALL:=1
-
-include $(INCLUDE_DIR)/host-build.mk
-include $(INCLUDE_DIR)/package.mk
-
-HOST_BUILD_DEPENDS:=glib2/host
-
-define Package/qemu-userspace
- SECTION:=utils
- CATEGORY:=Utilities
- SUBMENU:=Virtualization
- TITLE:=qemu $(PKG_VERSION) (Linux/BSD User space emulation)
- URL:=https://www.qemu.org
- DEPENDS:=+glib2 +zlib +libpthread @BROKEN
-endef
-
-define Package/qemu-userspace/description
- QEMU is a generic and open source machine emulator and virtualizer.
- (This package version is for user space emulation only, not full system.)
-endef
-
-HOST_CONFIGURE_ARGS += \
- --audio-drv-list='' \
- --disable-slirp \
- --disable-debug-info \
- --disable-modules \
- --disable-sdl \
- --disable-qom-cast-debug \
- --disable-virtfs \
- --disable-vnc \
- --disable-debug-tcg \
- --disable-sparse \
- --disable-strip \
- --disable-vnc-sasl \
- --disable-vnc-jpeg \
- --disable-vnc-png \
- --disable-vde \
- --disable-netmap \
- --disable-xen \
- --disable-xen-pci-passthrough \
- --disable-xen-pv-domain-build \
- --disable-brlapi \
- --disable-bluez \
- --disable-tcg-interpreter \
- --disable-cap-ng \
- --disable-spice \
- --disable-libiscsi \
- --disable-libnfs \
- --disable-cocoa \
- --disable-werror \
- --disable-stack-protector \
- --disable-curl \
- --disable-crypto-afalg \
- --disable-docs \
- --disable-vhost-net \
- --disable-vhost-scsi \
- --disable-vhost-vsock \
- --disable-opengl \
- --disable-rbd \
- --disable-xfsctl \
- --disable-smartcard \
- --disable-libusb \
- --disable-usb-redir \
- --disable-zlib-test \
- --disable-lzo \
- --disable-snappy \
- --disable-bzip2 \
- --disable-guest-agent-msi \
- --without-vss-sdk \
- --without-win-sdk \
- --disable-tools \
- --disable-glusterfs \
- --disable-gtk \
- --disable-gnutls \
- --disable-nettle \
- --disable-gcrypt \
- --disable-rdma \
- --disable-vte \
- --disable-virglrenderer \
- --disable-tpm \
- --disable-libssh2 \
- --disable-strip \
- --disable-replication \
- --disable-vxhs \
- --disable-system \
- --disable-guest-agent \
- --disable-pie \
- --disable-live-block-migration \
- --disable-numa \
- --disable-libxml2 \
- --disable-capstone \
- --disable-debug-mutex \
- --disable-git-update \
- --disable-hax \
- --disable-kvm \
- --disable-hvf \
- --disable-whpx \
- --disable-blobs
-
-# --disable-tcg
-# --disable-bsd-user
-# --disable-linux-aio
-# --disable-attr
-# --disable-seccomp
-# --disable-coroutine-pool
-# --disable-tcmalloc
-# --disable-jemalloc
-# --disable-vhost-user
-
-# QEMU configure script does not recognize these options
-HOST_CONFIGURE_ARGS:=$(filter-out \
- --target=% \
- --host=% \
- --build=% \
- --program-prefix=% \
- --program-suffix=% \
- --exec-prefix=% \
- --disable-nls \
- , $(HOST_CONFIGURE_ARGS))
-
-# does this do anything in usermode?
-CONFIGURE_ARGS:=$(filter-out \
- --disable-hax \
- --disable-kvm \
- --disable-hvf \
- --disable-blobs \
- , $(HOST_CONFIGURE_ARGS))
-
-CONFIGURE_ARGS += \
- --cross-prefix=$(TARGET_CROSS) \
- --host-cc="$(HOSTCC)"
-
-$(eval $(call HostBuild))
-$(eval $(call BuildPackage,qemu-userspace))
include $(TOPDIR)/rules.mk
PKG_NAME:=qemu
-PKG_VERSION:=2.11.1
+PKG_VERSION:=3.0.0
PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=d9df2213ceed32e91dab7bc9dd19c1af83f91ba72c7aeef7605dfaaf81732ccb
-PKG_SOURCE_URL:=http://wiki.qemu-project.org/download/
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_HASH:=8d7af64fe8bd5ea5c3bdf17131a8b858491bcce1ee3839425a6d91fb821b5713
+PKG_SOURCE_URL:=http://download.qemu.org/
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=LICENSE tcg/LICENSE
PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
--disable-strip \
--disable-werror \
-QEMU_CONFIGURE_TARGET_LIST := $(foreach target,$(QEMU_TARGET_LIST),$(if $(CONFIG_PACKAGE_qemu-$(target)),$(target)))
-CONFIGURE_ARGS += --target-list='$(QEMU_CONFIGURE_TARGET_LIST)'
-
-ifneq ($(CONFIG_PACKAGE_qemu-ga),)
-CONFIGURE_ARGS += --enable-guest-agent
-endif
+CONFIGURE_ARGS += --target-list='$(foreach target,$(QEMU_TARGET_LIST),$(if $(CONFIG_PACKAGE_qemu-$(target)),$(target)))'
+CONFIGURE_ARGS += $(if $(CONFIG_PACKAGE_qemu-ga),--enable-guest-agent)
TARGET_LDFLAGS += -Wl,--as-needed
MAKE_VARS += V=s
include $(TOPDIR)/rules.mk
PKG_NAME:=rng-tools
-PKG_VERSION:=5
-PKG_RELEASE:=6
+PKG_VERSION:=6.6
+PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=@SF/gkernel/rng-tools/$(PKG_VERSION)/
-PKG_HASH:=60a102b6603bbcce2da341470cad42eeaa9564a16b4490e7867026ca11a3078e
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/nhorman/rng-tools.git
+PKG_SOURCE_VERSION:=4ebc21d6f387bb7b4b3f6badc429e27b21c0a6ee
+PKG_MIRROR_HASH:=d942283b7482337d40a4933f7b24a5d1361518dacf9c87928f5ea06d492e95b0
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
PKG_LICENSE:=GPLv2
PKG_MAINTAINER:=Nathaniel Wesley Filardo <nwfilardo@gmail.com>
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Daemon for adding entropy to kernel entropy pool
- URL:=http://sourceforge.net/projects/gkernel/
+ URL:=https://github.com/nhorman/rng-tools
+ DEPENDS:=+libsysfs
endef
define Package/rng-tools/description
endif
CONFIGURE_ARGS += \
- --without-libgcrypt
+ --without-libgcrypt \
+ --without-nistbeacon
+
+define Build/Prepare
+ $(call Build/Prepare/Default)
+ (cd $(PKG_BUILD_DIR); ln -s README.md README)
+endef
define Package/rng-tools/install
$(INSTALL_DIR) $(1)/etc/init.d
+++ /dev/null
-From d401b23149a89fc14806dc8c347f2a85205a95cd Mon Sep 17 00:00:00 2001
-From: Philip Prindeville <philipp@redfish-solutions.com>
-Date: Mon, 26 Jun 2017 18:34:04 -0600
-Subject: [PATCH v1 1/1] Cleanup calls to message() containing newlines
-To: Philipp Rumpf <prumpf@mandrakesoft.com>, Jeff Garzik <jgarzik@pobox.com>, Henrique de Moraes Holschuh <hmh@debian.org>, Andrew Morton <akpm@linux-foundation.org>
-Cc: Philip Prindeville <philipp@redfish-solutions.com>
-
-Newlines are added automatically by logging daemons, and having
-embedded newlines can cause extra blank lines in syslog-ng,
-busybox, etc.
-
-Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
----
- rngd.c | 8 ++++----
- rngd_entsource.c | 6 +++---
- rngd_linux.c | 2 +-
- rngd_rdrand.c | 6 +++---
- 4 files changed, 11 insertions(+), 11 deletions(-)
-
-diff --git a/rngd.c b/rngd.c
-index 0205d40e0abb970fb126460306398388bd7462a0..f10198682a14f2f1460100a1d274ad0d724cb326 100644
---- a/rngd.c
-+++ b/rngd.c
-@@ -271,7 +271,7 @@ static void do_loop(int random_step)
- } else if (iter->failures >= MAX_RNG_FAILURES) {
- if (!arguments->quiet)
- message(LOG_DAEMON|LOG_ERR,
-- "too many FIPS failures, disabling entropy source\n");
-+ "too many FIPS failures, disabling entropy source");
- iter->disabled = true;
- }
- }
-@@ -282,7 +282,7 @@ static void do_loop(int random_step)
-
- if (!arguments->quiet)
- message(LOG_DAEMON|LOG_ERR,
-- "No entropy sources working, exiting rngd\n");
-+ "No entropy sources working, exiting rngd");
- }
-
- static void term_signal(int signo)
-@@ -317,7 +317,7 @@ int main(int argc, char **argv)
- message(LOG_DAEMON|LOG_ERR,
- "can't open any entropy source");
- message(LOG_DAEMON|LOG_ERR,
-- "Maybe RNG device modules are not loaded\n");
-+ "Maybe RNG device modules are not loaded");
- }
- return 1;
- }
-@@ -337,7 +337,7 @@ int main(int argc, char **argv)
- && (rc_tpm || !arguments->enable_tpm)) {
- if (!arguments->quiet)
- message(LOG_DAEMON|LOG_ERR,
-- "No entropy source available, shutting down\n");
-+ "No entropy source available, shutting down");
- return 1;
- }
-
-diff --git a/rngd_entsource.c b/rngd_entsource.c
-index f0e219d7af674204e5bdcf96e9045c40717872c3..8c1d7cb33159c9a0e03a4ea83f3a3358c706e2e3 100644
---- a/rngd_entsource.c
-+++ b/rngd_entsource.c
-@@ -64,7 +64,7 @@ int xread(void *buf, size_t size, struct rng *ent_src)
- }
-
- if (size) {
-- message(LOG_DAEMON|LOG_ERR, "read error\n");
-+ message(LOG_DAEMON|LOG_ERR, "read error");
- return -1;
- }
- return 0;
-@@ -114,7 +114,7 @@ int xread_tpm(void *buf, size_t size, struct rng *ent_src)
- sizeof(rng_cmd) - r);
- if (retval < 0) {
- message(LOG_ERR|LOG_INFO,
-- "Error writing %s\n",
-+ "Error writing %s",
- ent_src->rng_name);
- retval = -1;
- goto error_out;
-@@ -123,7 +123,7 @@ int xread_tpm(void *buf, size_t size, struct rng *ent_src)
- }
- if (r < sizeof(rng_cmd)) {
- message(LOG_ERR|LOG_INFO,
-- "Error writing %s\n", ent_src->rng_name);
-+ "Error writing %s", ent_src->rng_name);
- retval = -1;
- goto error_out;
- }
-diff --git a/rngd_linux.c b/rngd_linux.c
-index c4f45dedecad0fd3bf80a35d7c240b917bf5ffdd..481c6bb15def3f06989766988b61f35d91207b58 100644
---- a/rngd_linux.c
-+++ b/rngd_linux.c
-@@ -131,7 +131,7 @@ void random_add_entropy(void *buf, size_t size)
- memcpy(entropy.data, buf, size);
-
- if (ioctl(random_fd, RNDADDENTROPY, &entropy) != 0) {
-- message(LOG_DAEMON|LOG_ERR, "RNDADDENTROPY failed: %s\n",
-+ message(LOG_DAEMON|LOG_ERR, "RNDADDENTROPY failed: %s",
- strerror(errno));
- exit(1);
- }
-diff --git a/rngd_rdrand.c b/rngd_rdrand.c
-index 4d7a5a7b3f52c3af8e677d3c4d758d4d235f1dd6..c1919d538428a8647dbce88d7d76384761e5b6cc 100644
---- a/rngd_rdrand.c
-+++ b/rngd_rdrand.c
-@@ -162,7 +162,7 @@ static inline int gcrypt_mangle(unsigned char *tmp)
-
- if (gcry_error) {
- message(LOG_DAEMON|LOG_ERR,
-- "gcry_cipher_encrypt error: %s\n",
-+ "gcry_cipher_encrypt error: %s",
- gcry_strerror(gcry_error));
- return -1;
- }
-@@ -257,7 +257,7 @@ static int init_gcrypt(const void *key)
-
- if (!gcry_check_version(MIN_GCRYPT_VERSION)) {
- message(LOG_DAEMON|LOG_ERR,
-- "libgcrypt version mismatch: have %s, require >= %s\n",
-+ "libgcrypt version mismatch: have %s, require >= %s",
- gcry_check_version(NULL), MIN_GCRYPT_VERSION);
- return 1;
- }
-@@ -278,7 +278,7 @@ static int init_gcrypt(const void *key)
-
- if (gcry_error) {
- message(LOG_DAEMON|LOG_ERR,
-- "could not set key or IV: %s\n",
-+ "could not set key or IV: %s",
- gcry_strerror(gcry_error));
- gcry_cipher_close(gcry_cipher_hd);
- return 1;
---
-2.7.4
-
include $(TOPDIR)/rules.mk
PKG_NAME:=rtl-ais
-PKG_VERSION:=20151213
+PKG_VERSION:=0.3
+PKG_RELEASE:=1
-PKG_RELEASE=$(PKG_SOURCE_VERSION)
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/dgiardini/rtl-ais.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=b805be0164475e58a73b57763a8cbbf8a2bd0ded
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=0bf15869935e4496108ade4f7e9c1f7990b11ce53c9c1e0c9e81bc7f082b33b5
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/dgiardini/rtl-ais/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=01e2b675226ec403c409cec8b55999008f5c7aa9e82d6c0ba085ef13b200ceb1
PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=COPYING
include $(TOPDIR)/rules.mk
PKG_NAME:=rtl-sdr
-PKG_VERSION:=0.5.3-20150608-$(PKG_SOURCE_VERSION)
-PKG_RELEASE:=3
+PKG_VERSION:=0.5.4
+PKG_RELEASE:=1
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=git://git.osmocom.org/rtl-sdr.git
-PKG_SOURCE_VERSION:=e3c03f738f5aef4dc51e2b741fbdb542b9cc1bb1
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://git.osmocom.org/rtl-sdr/snapshot
+PKG_HASH:=f38da8a230de5fc997f83a19cff7f8c1a66b62a9cf70ddc997d44696b97ea1df
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
-PKG_MIRROR_HASH:=6b1a3ae95e6d9e896ec4f8dcca46b7cf5741533bb549d429ac3fd46c76e2d595
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
PKG_BUILD_PARALLEL:=1
-
CMAKE_INSTALL:=1
PKG_LICENSE:=GPLv2
include $(TOPDIR)/rules.mk
PKG_NAME:=rtl_433
-PKG_VERSION:=6531ea4
-PKG_RELEASE:=$(PKG_SOURCE_VERSION)
+PKG_VERSION:=18.05
+PKG_RELEASE:=1
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=git://github.com/merbanan/rtl_433.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=6531ea48a7933ac8289724672059e54fd8aad8eb
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MIRROR_HASH:=f96301c8d7e87605b113aad4493f15b63a675fea6f00642b0606de5a3a858746
+PKG_SOURCE_URL:=https://codeload.github.com/merbanan/rtl_433/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=4710105234e3b71ae839e2d3f2628d6c12879fcda9c849fffe847d4de42a74f3
CMAKE_INSTALL:=1
include $(TOPDIR)/rules.mk
PKG_NAME:=rtty
-PKG_VERSION:=5.1.0
-PKG_RELEASE:=2
+PKG_VERSION:=6.3.1
+PKG_RELEASE:=1
-PKG_SOURCE_PROTO:=git
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
-PKG_SOURCE_URL=https://github.com/zhaojh329/rtty.git
-PKG_MIRROR_HASH:=0d81595305abae252b2914e53d0aa8e64de433357c147fd6391363a223c694d8
+PKG_SOURCE_URL=https://codeload.github.com/zhaojh329/rtty/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=1dd7852cd5a3615134dc1c6266157072652592bda847b44cc747ccfcaa27ce2f
+CMAKE_INSTALL:=1
PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_SOURCE_SUBDIR)
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
-define Package/rtty/default
+define Package/rtty/Default
+ TITLE:=Access your terminals from anywhere via the web
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Terminal
- TITLE:=A reverse proxy WebTTY
- DEPENDS:=+libprotobuf-c
+ URL:=https://github.com/zhaojh329/rtty
+ DEPENDS:=$(2)
+ VARIANT:=$(1)
+ PROVIDES:=rtty
endef
-define Package/rtty/default/description
-A reverse proxy WebTTY. This is the client part running on devices to be managed.
-endef
-
-define Package/rtty-nossl
- $(Package/rtty/default)
- TITLE += (NO SSL)
- DEPENDS += +libuwsc-nossl
- VARIANT:=nossl
- CONFLICTS:=rtty-openssl rtty-wolfssl rtty-mbedtls
-endef
-
-define Package/rtty-openssl
- $(Package/rtty/default)
- TITLE += (openssl)
- DEPENDS += +libuwsc-openssl
- VARIANT:=openssl
- CONFLICTS:=rtty-wolfssl rtty-mbedtls
-endef
-
-define Package/rtty-wolfssl
- $(Package/rtty/default)
- TITLE += (wolfssl)
- DEPENDS += +libuwsc-wolfssl
- VARIANT:=wolfssl
- CONFLICTS:=rtty-mbedtls
-endef
-
-define Package/rtty-mbedtls
- $(Package/rtty/default)
- TITLE += (mbedtls)
- DEPENDS += +libuwsc-mbedtls
- VARIANT:=mbedtls
-endef
+Package/rtty-openssl=$(call Package/rtty/Default,openssl,+PACKAGE_rtty-openssl:libuwsc-openssl)
+Package/rtty-wolfssl=$(call Package/rtty/Default,wolfssl,+PACKAGE_rtty-wolfssl:libuwsc-wolfssl)
+Package/rtty-mbedtls=$(call Package/rtty/Default,mbedtls,+PACKAGE_rtty-mbedtls:libuwsc-mbedtls)
+Package/rtty-nossl=$(call Package/rtty/Default,nossl,+PACKAGE_rtty-nossl:libuwsc-nossl)
-Package/rtty-nossl/description = $(Package/rtty/default/description)
-Package/rtty-openssl/description = $(Package/rtty/default/description)
-Package/rtty-wolfssl/description = $(Package/rtty/default/description)
-Package/rtty-mbedtls/description = $(Package/rtty/default/description)
-
-define Package/rtty/default/install
+define Package/rtty-$(BUILD_VARIANT)/install
$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d $(1)/etc/config
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/rtty $(1)/usr/sbin
$(INSTALL_BIN) ./files/rtty.init $(1)/etc/init.d/rtty
$(INSTALL_CONF) ./files/rtty.config $(1)/etc/config/rtty
endef
-Package/rtty-nossl/install = $(Package/rtty/default/install)
-Package/rtty-openssl/install = $(Package/rtty/default/install)
-Package/rtty-wolfssl/install = $(Package/rtty/default/install)
-Package/rtty-mbedtls/install = $(Package/rtty/default/install)
-
-$(eval $(call BuildPackage,rtty-nossl))
-$(eval $(call BuildPackage,rtty-mbedtls))
-$(eval $(call BuildPackage,rtty-wolfssl))
$(eval $(call BuildPackage,rtty-openssl))
-
+$(eval $(call BuildPackage,rtty-wolfssl))
+$(eval $(call BuildPackage,rtty-mbedtls))
+$(eval $(call BuildPackage,rtty-nossl))
# option host 'your-server-host' # Server host
# option port '5912' # Server Port
# option ssl 1 # Whether to use ssl
-# option ping 5 # heartbeat interval(second)
+# option keepalive 5 # keep alive in seconds for this client
'host:host' \
'port:port' \
'ssl:bool:0' \
- 'ping:uinteger:5'
+ 'keepalive:uinteger:5'
[ $? -ne 0 ] && {
echo "validation failed" >&2
}
procd_open_instance
- procd_set_param command $BIN -h $host -p $port -a -P $ping
+ procd_set_param command $BIN -h $host -p $port -a -k $keepalive
[ -n "$ifname" ] && procd_append_param command -i "$ifname"
[ -n "$id" ] && procd_append_param command -I "$id"
[ -n "$description" ] && procd_append_param command -d "$description"
PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
PKG_LICENSE:=GPL-2.0 GPL-2.0+
PKG_LICENSE_FILES:=COPYING LICENSE
+PKG_CPE_ID:=cpe:/a:sane-backends_project:sane-backends
PKG_INSTALL:=1
PKG_NAME:=setserial
PKG_VERSION:=2.17
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/setserial
--- /dev/null
+diff --git a/Makefile.in b/Makefile.in
+index 00b9eb1..2fdbae3 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -17,7 +17,7 @@ DEFS = @DEFS@
+ INCS = -I.
+ TAR = tar
+
+-all: setserial setserial.cat
++all: setserial
+
+ setserial: setserial.c
+ $(CC) $(CFLAGS) $(DEFS) $(INCS) setserial.c -o setserial
include $(TOPDIR)/rules.mk
PKG_NAME:=shadow
-PKG_VERSION:=4.2.1
-PKG_RELEASE:=8
+PKG_VERSION:=4.6
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=http://pkg-shadow.alioth.debian.org/releases
-PKG_HASH:=3b0893d1476766868cd88920f4f1231c4795652aa407569faff802bcda0f3d41
+PKG_SOURCE_URL:=https://github.com/shadow-maint/shadow/releases/download/$(PKG_VERSION)
+PKG_HASH:=0998c8d84242a231ab0acb7f8613927ff5bcff095f8aa6b79478893a03f05583
PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
PKG_LICENSE:=BSD-3-Clause
SECTION:=utils
CATEGORY:=Utilities
TITLE:=The PLD Linux shadow utilities
- URL:=http://pkg-shadow.alioth.debian.org/
+ URL:=https://github.com/shadow-maint/shadow
endef
define Package/shadow
---- a/configure.in
-+++ b/configure.in
-@@ -197,7 +197,6 @@ dnl XXX - quick hack, should disappear b
+--- a/configure.ac
++++ b/configure.ac
+@@ -200,7 +200,6 @@ dnl XXX - quick hack, should disappear b
AC_DEFINE(USE_SYSLOG, 1, [Define to use syslog().])
if test "$ac_cv_func_ruserok" = "yes"; then
AC_DEFINE(RLOGIN, 1, [Define if login should support the -r flag for rlogind.])
+++ /dev/null
-From 2cb54158b80cdbd97ca3b36df83f9255e923ae3f Mon Sep 17 00:00:00 2001
-From: James Le Cuirot <chewi@aura-online.co.uk>
-Date: Sat, 23 Aug 2014 09:46:39 +0100
-Subject: [PATCH] Check size of uid_t and gid_t using AC_CHECK_SIZEOF
-
-This built-in check is simpler than the previous method and, most
-importantly, works when cross-compiling.
-
-Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
----
- configure.in | 14 ++++----------
- 1 file changed, 4 insertions(+), 10 deletions(-)
-
---- a/configure.in
-+++ b/configure.in
-@@ -334,16 +334,10 @@ if test "$enable_subids" != "no"; then
- dnl
- dnl FIXME: check if 32 bit UIDs/GIDs are supported by libc
- dnl
-- AC_RUN_IFELSE([AC_LANG_SOURCE([
--#include <sys/types.h>
--int main(void) {
-- uid_t u;
-- gid_t g;
-- return (sizeof u < 4) || (sizeof g < 4);
--}
-- ])], [id32bit="yes"], [id32bit="no"])
-+ AC_CHECK_SIZEOF([uid_t],, [#include "sys/types.h"])
-+ AC_CHECK_SIZEOF([gid_t],, [#include "sys/types.h"])
-
-- if test "x$id32bit" = "xyes"; then
-+ if test "$ac_cv_sizeof_uid_t" -ge 4 && test "$ac_cv_sizeof_gid_t" -ge 4; then
- AC_DEFINE(ENABLE_SUBIDS, 1, [Define to support the subordinate IDs.])
- enable_subids="yes"
- else
--- a/src/su.c
+++ b/src/su.c
-@@ -1090,8 +1090,12 @@ int main (int argc, char **argv)
+@@ -1127,8 +1127,12 @@ int main (int argc, char **argv)
if (fd >= 0) {
err = ioctl (fd, TIOCNOTTY, (char *) 0);
include $(TOPDIR)/rules.mk
PKG_NAME:=spi-tools
-PKG_VERSION:=1
+PKG_VERSION:=0.8.3
+PKG_RELEASE:=1
-PKG_RELEASE=$(PKG_SOURCE_VERSION)
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/cpb-/spi-tools.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=cc6a41fdcec60610703ba6db488c621c64952898
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=3c37fde79ab09e9a590f4cdb55751083017197d0037a7c0dce56fceef5e05a21
+PKG_SOURCE_URL:=https://codeload.github.com/cpb-/spi-tools/tar.gz/$(PKG_VERSION)?
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=1f29548187c5a57ca5902d260b01ca9ce04d93e4406ff77f317e1d6423ed3610
PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
-
PKG_LICENSE:=GPL-2.0
-PKG_LICENSE_FILES:=
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk
TITLE:=Command line SPI tools
endef
-EXTRA_CFLAGS+=-DVERSION=\"$(PKG_SOURCE_VERSION)\"
-
define Build/Compile
cd $(PKG_BUILD_DIR) ; \
$(TARGET_CC) $(TARGET_CFLAGS) $(EXTRA_CFLAGS) -Wall -Werror -o spi-config src/spi-config.c ; \
include $(TOPDIR)/rules.mk
PKG_NAME:=stoken
-PKG_VERSION:=0.8
-PKG_REV:=c4d79ffbf5053e44be4b64da22b1b7fb6a51daf2
-PKG_RELEASE:=2
+PKG_VERSION:=0.92
+PKG_RELEASE:=1
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/cernekee/stoken.git
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@SF/stoken
+PKG_HASH:=aa2b481b058e4caf068f7e747a2dcf5772bcbf278a4f89bc9efcbf82bcc9ef5a
-PKG_SOURCE_VERSION:=$(PKG_REV)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz
-PKG_MIRROR_HASH:=2f77c42b14a0b6b1e4d44dfd4d66b63ce6ed7484ca97debec0344f5c966e2e5c
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_MAINTAINER:=Florian Fainelli <florian@openwrt.org>
PKG_LICENSE:=LGPL-2.1
PKG_INSTALL:=1
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
-
PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk
define Package/stoken/Default
TITLE:=tokencode generator compatible with RSA SecurID 128-bit (AES)
- URL:=http://sourceforge.net/p/stoken/
+ URL:=https://sourceforge.net/p/stoken/wiki/Home/
DEPENDS:= +libxml2 +libnettle
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=sysstat
-PKG_VERSION:=11.6.4
+PKG_VERSION:=12.0.2
PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://pagesperso-orange.fr/sebastien.godard/
-PKG_HASH:=6aa6398b200f09a2874fffc9c31eb943aea64d707a4afe5f5f1751d876157b09
+PKG_HASH:=2d30947c8fabbb5015c229fbc149f2891db4926cdf165e5f099310795d8dac80
PKG_INSTALL:=1
include $(TOPDIR)/rules.mk
PKG_NAME:=tmux
-PKG_VERSION:=2.7
-PKG_RELEASE:=2
+PKG_VERSION:=2.8
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/tmux/tmux/releases/download/$(PKG_VERSION)
-PKG_HASH:=9ded7d100313f6bc5a87404a4048b3745d61f2332f99ec1400a7c4ed9485d452
+PKG_HASH:=7f6bf335634fafecff878d78de389562ea7f73a7367f268b66d37ea13617a2ba
PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
PKG_LICENSE:=ISC
include $(TOPDIR)/rules.mk
PKG_NAME:=ttyd
-PKG_VERSION:=1.4.0
+PKG_VERSION:=1.4.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_URL:=https://codeload.github.com/tsl0922/ttyd/tar.gz/$(PKG_VERSION)?
PKG_SOURCE_VERSION=$(PKG_VERSION)
-PKG_HASH=757a9b5b5dd3de801d7db8fab6035d97ea144b02a51c78bdab28a8e07bcf05d6
+PKG_HASH=ff1a66b418df6cd741868a8ea84f69cd63f15e52e3fa117641ec57d3c37a1315
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
include $(TOPDIR)/rules.mk
PKG_NAME:=unrar
-PKG_VERSION:=5.6.5
+PKG_VERSION:=5.6.8
PKG_RELEASE:=1
PKG_SOURCE:=unrarsrc-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.rarlab.com/rar
-PKG_HASH:=eba36a421bf41491818dee9507d934064622bc0bd9db6bbb8422a4706f200898
+PKG_HASH:=a4cc0ac14a354827751912d2af4a0a09e2c2129df5766576fa7e151791dd3dff
PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>, \
Ted Hess <thess@kitschensync.net>
include $(TOPDIR)/rules.mk
PKG_NAME:=vim
-PKG_VERSION:=8.0.586
-PKG_RELEASE:=2
-VIMVER:=80
+PKG_VERSION:=8.1
+PKG_RELEASE:=1
+VIMVER:=81
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=ftp://ftp.vim.org/pub/vim/unix/
-PKG_HASH:=08bd0d1dd30ece3cb9905ccd48b82b2f81c861696377508021265177dc153a61
+PKG_SOURCE_URL:=http://ftp.vim.org/pub/vim/unix
+PKG_HASH:=8b69fbd01c877dd8ecbbeca1dc66e5e927228d631ac4c2174b9307eb5c827c86
PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
+PKG_CPE_ID:=cpe:/a:vim:vim
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)$(VIMVER)
PKG_BUILD_PARALLEL:=1
--disable-gpm \
--disable-acl \
--with-tlib=ncurses \
- --with-compiledby="non-existent-hostname-compiled" \
- --disable-darwin
+ --with-compiledby="non-existent-hostname-compiled"
CONFIGURE_VARS += \
vim_cv_getcwd_broken=no \
vim_cv_tty_group=root \
vim_cv_tty_mode=0620
+ifneq ($(HOST_OS),Linux)
+ TARGET_PATH_PKG:=$(CURDIR)/scripts:$(TARGET_PATH_PKG)
+endif
+
define Build/Prepare
$(call Build/Prepare/Default)
$(MAKE) -C $(PKG_BUILD_DIR)/src autoconf
+ AC_DEFINE_UNQUOTED(BUILD_DATE, ["$BUILD_DATE"])
+fi
+
- dnl Check for the flag that fails if stuff are missing.
-
- AC_MSG_CHECKING(--enable-fail-if-missing argument)
+ dnl Check that the C99 features that Vim uses are supported:
+ if test x"$ac_cv_prog_cc_c99" != xno; then
+ dnl If the compiler doesn't explicitly support C99, then check
diff --git a/src/version.c b/src/version.c
index 65f5a4b..9422657 100644
--- a/src/version.c
--- a/runtime/doc/Makefile
+++ b/runtime/doc/Makefile
-@@ -310,7 +310,6 @@ all: tags vim.man evim.man vimdiff.man v
+@@ -317,7 +317,6 @@ all: tags vim.man evim.man vimdiff.man v
# Use Vim to generate the tags file. Can only be used when Vim has been
# compiled and installed. Supports multiple languages.
vimtags: $(DOCS)
--- /dev/null
+#!/bin/sh
+echo "Linux"
include $(TOPDIR)/rules.mk
PKG_NAME:=yara
-PKG_VERSION:=3.7.1
+PKG_VERSION:=3.8.1
PKG_RELEASE:=1
PKG_LICENSE:=BSD-3-Clause
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://github.com/VirusTotal/yara/archive/v$(PKG_VERSION)/
-PKG_HASH:=df077a29b0fffbf4e7c575f838a440f42d09b215fcb3971e6fb6360318a64892
+PKG_SOURCE_URL:=https://codeload.github.com/VirusTotal/yara/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=283527711269354d3c60e2705f7f74b1f769d2d35ddba8f7f9ce97d0fd5cb1ca
PKG_FIXUP:=autoreconf
PKG_BUILD_PARALLEL:=1
PKG_SOURCE_URL:=https://codeload.github.com/arduino/YunBridge/tar.gz/$(PKG_VERSION)?
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_HASH:=9e5ffc7a0d0cc2c92e972e425adcc49b77cf39da075d31728e7755d316d910d8
-PKG_BUILD_DIR:=YunBridge-$(PKG_VERSION)
+PKG_BUILD_DIR:=$(BUILD_DIR)/YunBridge-$(PKG_VERSION)
PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
PKG_LICENSE:=GPL-2.0
include $(TOPDIR)/rules.mk
PKG_NAME:=zoneinfo
-PKG_VERSION:=2018e
-PKG_VERSION_CODE:=2018e
+PKG_VERSION:=2018g
PKG_RELEASE:=1
#As i couldn't find real license used "Public Domain"
PKG_LICENSE:=Public Domain
PKG_SOURCE:=tzdata$(PKG_VERSION).tar.gz
-PKG_SOURCE_CODE:=tzcode$(PKG_VERSION_CODE).tar.gz
+PKG_SOURCE_CODE:=tzcode$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.iana.org/time-zones/repository/releases
-PKG_HASH:=6b288e5926841a4cb490909fe822d85c36ae75538ad69baf20da9628b63b692e
+PKG_HASH:=02dfde534872f6513ae4553a3388fdae579441e31b862ea99170dfc447f46a16
include $(INCLUDE_DIR)/package.mk
define Download/tzcode
FILE=$(PKG_SOURCE_CODE)
URL=$(PKG_SOURCE_URL)
- HASH:=ca340cf20e80b699d6e5c49b4ba47361b3aa681f06f38a0c88a8e8308c00ebce
+ HASH:=aa53f4fb6570f02081be61dc11ade19ea5a280c23822a5b4016ce0c6be23c427
endef
$(eval $(call Download,tzcode))
TITLE:=Zone Information (India)
endef
+define Package/zoneinfo-all
+$(call Package/zoneinfo/Default)
+ TITLE:=Zone Information (all zones)
+ DEPENDS:= \
+ +zoneinfo-simple \
+ +zoneinfo-core \
+ +zoneinfo-africa \
+ +zoneinfo-northamerica \
+ +zoneinfo-southamerica \
+ +zoneinfo-poles \
+ +zoneinfo-asia \
+ +zoneinfo-atlantic \
+ +zoneinfo-australia-nz \
+ +zoneinfo-pacific \
+ +zoneinfo-europe \
+ +zoneinfo-india
+endef
+
define Build/Prepare
(cd $(PKG_BUILD_DIR) && tar -xzf $(DL_DIR)/$(PKG_SOURCE_CODE) && tar -xzf $(DL_DIR)/$(PKG_SOURCE))
endef
America/Chicago America/New_York America/Caracas \
America/Sao_Paulo Europe/London Europe/Paris \
Africa/Cairo Europe/Moscow Asia/Dubai \
- Asia/Karachi Asia/Dhaka Asia/Bankok \
+ Asia/Karachi Asia/Dhaka Asia/Bangkok \
Asia/Hong_Kong Asia/Tokyo Australia/Darwin \
Australia/Adelaide Australia/Brisbane Australia/Sydney \
Australia/Perth Pacific/Noumea ; do \
$(eval $(call BuildPackage,zoneinfo-pacific))
$(eval $(call BuildPackage,zoneinfo-europe))
$(eval $(call BuildPackage,zoneinfo-india))
+$(eval $(call BuildPackage,zoneinfo-all))
include $(TOPDIR)/rules.mk
PKG_NAME:=zsh
-PKG_VERSION:=5.5.1
+PKG_VERSION:=5.6.2
PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@SF/zsh
-PKG_HASH:=774caa89e7aea5f33c3033cbffd93e28707f72ba5149c79709e48e6c2d2ee080
+PKG_HASH:=a50bd66c0557e8eca3b8fa24e85d0de533e775d7a22df042da90488623752e9e
+
PKG_MAINTAINER:=Vadim A. Misbakh-Soloviov <openwrt-zsh@mva.name>
PKG_LICENSE:=ZSH
+PKG_LICENSE_FILES:=LICENCE
+PKG_CPE_ID:=cpe:/a:zsh_project:zsh
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
SUBMENU:=Shells
TITLE:=The Z shell
DEPENDS:=+libcap +libncurses +libncursesw +libpcre +librt
- URL:=http://www.zsh.org/
+ URL:=https://www.zsh.org/
endef
define Package/zsh/description