pax_global_header00006660000000000000000000000064152734227700014523gustar00rootroot0000000000000052 comment=b32b93598081c1c76246794b8111367063ff4bc4 pupnp-pupnp-216c3c7/000077500000000000000000000000001527342277000143575ustar00rootroot00000000000000pupnp-pupnp-216c3c7/.clang-format000066400000000000000000000071311527342277000167340ustar00rootroot00000000000000--- Language: Cpp # BasedOnStyle: LLVM AccessModifierOffset: -8 AlignAfterOpenBracket: DontAlign AlignConsecutiveMacros: false AlignConsecutiveAssignments: false AlignConsecutiveDeclarations: false AlignEscapedNewlines: DontAlign AlignOperands: true AlignTrailingComments: true AllowAllArgumentsOnNextLine: true AllowAllConstructorInitializersOnNextLine: true AllowAllParametersOfDeclarationOnNextLine: true AllowShortBlocksOnASingleLine: false AllowShortCaseLabelsOnASingleLine: false AllowShortFunctionsOnASingleLine: All AllowShortLambdasOnASingleLine: All AllowShortIfStatementsOnASingleLine: Never AllowShortLoopsOnASingleLine: false AlwaysBreakAfterDefinitionReturnType: None AlwaysBreakAfterReturnType: None AlwaysBreakBeforeMultilineStrings: false AlwaysBreakTemplateDeclarations: MultiLine BinPackArguments: false BinPackParameters: false BraceWrapping: AfterCaseLabel: false AfterClass: true AfterControlStatement: false AfterEnum: true AfterFunction: true AfterNamespace: true AfterObjCDeclaration: false AfterStruct: true AfterUnion: true AfterExternBlock: false BeforeCatch: false BeforeElse: false IndentBraces: false SplitEmptyFunction: true SplitEmptyRecord: true SplitEmptyNamespace: true BreakBeforeBinaryOperators: None BreakBeforeBraces: Custom BreakBeforeInheritanceComma: false BreakInheritanceList: BeforeColon BreakBeforeTernaryOperators: true BreakConstructorInitializersBeforeComma: false BreakConstructorInitializers: BeforeColon BreakAfterJavaFieldAnnotations: false BreakStringLiterals: true ColumnLimit: 80 CommentPragmas: '^ IWYU pragma:' CompactNamespaces: false ConstructorInitializerAllOnOneLineOrOnePerLine: false ConstructorInitializerIndentWidth: 4 ContinuationIndentWidth: 8 Cpp11BracedListStyle: true DerivePointerAlignment: false DisableFormat: false ExperimentalAutoDetectBinPacking: false FixNamespaceComments: true ForEachMacros: - foreach - Q_FOREACH - BOOST_FOREACH IncludeBlocks: Preserve IncludeCategories: - Regex: '^"(llvm|llvm-c|clang|clang-c)/' Priority: 2 - Regex: '^(<|"(gtest|gmock|isl|json)/)' Priority: 3 - Regex: '.*' Priority: 1 IncludeIsMainRegex: '(Test)?$' IndentCaseLabels: false IndentPPDirectives: BeforeHash IndentWidth: 8 IndentWrappedFunctionNames: false JavaScriptQuotes: Leave JavaScriptWrapImports: true KeepEmptyLinesAtTheStartOfBlocks: true MacroBlockBegin: '' MacroBlockEnd: '' MaxEmptyLinesToKeep: 1 NamespaceIndentation: None ObjCBinPackProtocolList: Auto ObjCBlockIndentWidth: 2 ObjCSpaceAfterProperty: false ObjCSpaceBeforeProtocolList: true PenaltyBreakAssignment: 2 PenaltyBreakBeforeFirstCallParameter: 19 PenaltyBreakComment: 300 PenaltyBreakFirstLessLess: 120 PenaltyBreakString: 1000 PenaltyBreakTemplateDeclaration: 10 PenaltyExcessCharacter: 1000000 PenaltyReturnTypeOnItsOwnLine: 60 PointerAlignment: Right ReflowComments: true SortIncludes: true SortUsingDeclarations: true SpaceAfterCStyleCast: false SpaceAfterLogicalNot: false SpaceAfterTemplateKeyword: true SpaceBeforeAssignmentOperators: true SpaceBeforeCpp11BracedList: false SpaceBeforeCtorInitializerColon: true SpaceBeforeInheritanceColon: true SpaceBeforeParens: ControlStatements SpaceBeforeRangeBasedForLoopColon: true SpaceInEmptyParentheses: false SpacesBeforeTrailingComments: 1 SpacesInAngles: false SpacesInContainerLiterals: true SpacesInCStyleCastParentheses: false SpacesInParentheses: false SpacesInSquareBrackets: false Standard: Cpp11 StatementMacros: - Q_UNUSED - QT_REQUIRE_VERSION TabWidth: 8 UseTab: Always pupnp-pupnp-216c3c7/.clangd000066400000000000000000000006421527342277000156120ustar00rootroot00000000000000CompileFlags: # clangd uses Clang internally but the project builds with GCC; add GCC's # C++ standard library headers so clangd can resolve etc. Add: - -isystem/usr/include/c++/15 - -isystem/usr/include/c++/15/x86_64-suse-linux - -isystem/usr/include/c++/15/backward - -isystem/usr/lib64/gcc/x86_64-suse-linux/15/include - -isystem/usr/lib64/gcc/x86_64-suse-linux/15/include-fixed pupnp-pupnp-216c3c7/.github/000077500000000000000000000000001527342277000157175ustar00rootroot00000000000000pupnp-pupnp-216c3c7/.github/dependabot.yml000066400000000000000000000003301527342277000205430ustar00rootroot00000000000000# Set update schedule for GitHub Actions version: 2 updates: - package-ecosystem: "github-actions" directory: "/" schedule: # Check for updates to GitHub Actions every week interval: "weekly" pupnp-pupnp-216c3c7/.github/workflows/000077500000000000000000000000001527342277000177545ustar00rootroot00000000000000pupnp-pupnp-216c3c7/.github/workflows/ccpp.yml000066400000000000000000000232371527342277000214330ustar00rootroot00000000000000name: Build permissions: contents: read pull-requests: write on: push: branches: - main - "branch-*" paths-ignore: - "**.md" - "docs/**" - "COPYING" - "ChangeLog" - "THANKS" pull_request: branches: - "**" - "!no_ci-*" paths-ignore: - "**.md" - "docs/**" - "COPYING" - "ChangeLog" - "THANKS" # # Some repeated stuff # env: sanitizer_autotools_flags: |- CFLAGS="-fsanitize=address,leak" \ LDFLAGS="-fsanitize=address,leak" cmake_common_flags: |- -S . \ -B build \ -DDOWNLOAD_AND_BUILD_DEPS=ON \ -DUPNP_ENABLE_OPEN_SSL=ON \ -DUPNP_ENABLE_UNSPECIFIED_SERVER=ON cmake_sanitizer_flags: |- -DCMAKE_C_FLAGS="-fsanitize=address,leak" \ -DCMAKE_CXX_FLAGS="-fsanitize=address,leak" \ -DCMAKE_SHARED_LINKER_FLAGS="-fsanitize=address,leak" cmake_tsan_flags: |- -DCMAKE_C_FLAGS="-fsanitize=thread" \ -DCMAKE_CXX_FLAGS="-fsanitize=thread" \ -DCMAKE_SHARED_LINKER_FLAGS="-fsanitize=thread" ctest_flags: |- --test-dir build \ --output-on-failure \ --timeout 30 \ --exclude-regex "^pthreads4w|_add_subdirectory_" # The *_add_subdirectory_* tests compile the whole library as a subproject, # which takes 20 seconds or more on slow machines, so they run in a separate # ctest call with a longer timeout. ctest_build_flags: |- --test-dir build \ --output-on-failure \ --timeout 300 \ --tests-regex "_add_subdirectory_" CMAKE_BUILD_PARALLEL_LEVEL: 8 jobs: # Linux builds linux: name: Build (${{ matrix.os }}) - ${{ matrix.conf }} runs-on: ${{ matrix.os }} strategy: matrix: os: [ ubuntu-latest ] conf: [ Debug, Release ] include: # Debug builds enable _FORTIFY_SOURCE=2 to catch buffer-overflow # bugs such as FD_SET with fd >= FD_SETSIZE (issue #423). # -O1 is required: _FORTIFY_SOURCE is a no-op at -O0. - conf: Debug extra_c_flags: " -O1 -D_FORTIFY_SOURCE=2" - conf: Release extra_c_flags: "" fail-fast: false steps: - uses: actions/checkout@v7 - name: Install Python test dependencies run: pip install pytest - name: Configure (create build system) run: | cmake \ ${{ env.cmake_common_flags }} \ -DCMAKE_C_FLAGS="-Wall -Wpedantic${{ matrix.extra_c_flags }}" \ -DCMAKE_BUILD_TYPE=${{ matrix.conf }} \ -DCMAKE_INSTALL_PREFIX=${{ GITHUB.WORKSPACE }}/test-install - name: Build run: cmake --build build --config ${{ matrix.conf }} - name: Test run: ctest ${{ env.ctest_flags }} -C ${{ matrix.conf }} - name: Test (build as subproject) run: ctest ${{ env.ctest_build_flags }} -C ${{ matrix.conf }} - name: Debug output run: cmake -DBUILD_DIR=build -P cmake/post-test.cmake - name: Install run: cmake --install build --config ${{ matrix.conf }} omnios: name: Build OmniOS - ${{ matrix.conf }} runs-on: ${{ matrix.os }} strategy: matrix: os: [ ubuntu-latest ] conf: [ Debug, Release ] fail-fast: false steps: - uses: actions/checkout@v7 - uses: vmactions/omnios-vm@v1 with: prepare: | pkg install cmake gcc14 make run: | cmake \ ${{ env.cmake_common_flags }} \ -DCMAKE_C_FLAGS="-Wall -Wpedantic" \ -DCMAKE_BUILD_TYPE=${{ matrix.conf }} \ -DCMAKE_INSTALL_PREFIX=${{ GITHUB.WORKSPACE }}/test-install cmake --build build --config ${{ matrix.conf }} ctest ${{ env.ctest_flags }} -C ${{ matrix.conf }} ctest ${{ env.ctest_build_flags }} -C ${{ matrix.conf }} cmake -DBUILD_DIR=build -P cmake/post-test.cmake cmake --install build --config ${{ matrix.conf }} # Windows Visual Studio builds windows-msvc: name: Build (${{ matrix.os }}) - ${{ matrix.conf }} runs-on: ${{ matrix.os }} strategy: matrix: os: [ windows-latest, macos-latest ] conf: [ Debug, Release ] fail-fast: false defaults: run: shell: bash # Fix PowerShell incompatibility steps: - uses: actions/checkout@v7 - name: Install OpenSSL (Windows) if: ${{ matrix.os == 'windows-latest' }} run: | echo "OPENSSL_ROOT_DIR=C:/Program Files/OpenSSL" >> $GITHUB_ENV - name: Install OpenSSL (macOS) if: ${{ matrix.os == 'macos-latest' }} run: | brew install openssl # Save OpenSSL path for CMake echo "OPENSSL_ROOT_DIR=$(brew --prefix openssl)" >> $GITHUB_ENV echo "OPENSSL_INCLUDE_DIR=$(brew --prefix openssl)/include" >> $GITHUB_ENV echo "OPENSSL_CRYPTO_LIBRARY=$(brew --prefix openssl)/lib/libcrypto.dylib" >> $GITHUB_ENV echo "OPENSSL_SSL_LIBRARY=$(brew --prefix openssl)/lib/libssl.dylib" >> $GITHUB_ENV - name: Configure run: | cmake \ ${{ env.cmake_common_flags }} \ -DCMAKE_BUILD_TYPE=${{ matrix.conf }} \ -DCMAKE_INSTALL_PREFIX=${{ GITHUB.WORKSPACE }}/test-install \ -DUPNP_ENABLE_TESTING_INTEGRATION=OFF \ ${OPENSSL_ROOT_DIR:+-DOPENSSL_ROOT_DIR="$OPENSSL_ROOT_DIR"} \ ${OPENSSL_INCLUDE_DIR:+-DOPENSSL_INCLUDE_DIR="$OPENSSL_INCLUDE_DIR"} \ ${OPENSSL_CRYPTO_LIBRARY:+-DOPENSSL_CRYPTO_LIBRARY="$OPENSSL_CRYPTO_LIBRARY"} \ ${OPENSSL_SSL_LIBRARY:+-DOPENSSL_SSL_LIBRARY="$OPENSSL_SSL_LIBRARY"} - name: Build run: cmake --build build --config ${{ matrix.conf }} - name: Test run: ctest ${{ env.ctest_flags }} -C ${{ matrix.conf }} - name: Debug output run: cmake -DBUILD_DIR=build -P cmake/post-test.cmake - name: Install run: cmake --install build --config ${{ matrix.conf }} # Windows msys2 builds windows-msys2: name: Build MSys ${{ matrix.sys }} - ${{ matrix.conf }} runs-on: windows-latest strategy: matrix: sys: [ mingw64, mingw32, ucrt64, clang64 ] conf: [ Release, Debug ] include: # Exercise the opt-in UPNP_ADAPTER_UUID_NAME option on one # representative toolchain/config combo. - sys: mingw64 conf: Release extra_cmake_flags: -DUPNP_ADAPTER_UUID_NAME=ON fail-fast: false defaults: run: shell: msys2 {0} steps: - name: Install sys (mingw64) uses: msys2/setup-msys2@v2 if: ${{ matrix.sys == 'mingw64' }} with: msystem: ${{ matrix.sys }} install: mingw-w64-x86_64-cmake mingw-w64-x86_64-make git mingw-w64-x86_64-gcc - name: Install sys (mingw32) uses: msys2/setup-msys2@v2 if: ${{ matrix.sys == 'mingw32' }} with: msystem: ${{ matrix.sys }} install: mingw-w64-i686-cmake mingw-w64-i686-make git mingw-w64-i686-gcc - name: Install sys (ucrt64) uses: msys2/setup-msys2@v2 if: ${{ matrix.sys == 'ucrt64' }} with: msystem: ${{ matrix.sys }} install: mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-make git mingw-w64-ucrt-x86_64-gcc - name: Install sys (clang64) uses: msys2/setup-msys2@v2 if: ${{ matrix.sys == 'clang64' }} with: msystem: ${{ matrix.sys }} install: mingw-w64-clang-x86_64-cmake mingw-w64-clang-x86_64-make git mingw-w64-clang-x86_64-gcc - uses: actions/checkout@v7 - name: Configure run: | cmake \ ${{ env.cmake_common_flags }} \ -DCMAKE_BUILD_TYPE=${{ matrix.conf }} \ -DUPNP_ENABLE_TESTING_INTEGRATION=OFF \ ${{ matrix.extra_cmake_flags }} \ -DCMAKE_INSTALL_PREFIX=${{ GITHUB.WORKSPACE }}/test-install - name: Build run: cmake --build build --config ${{ matrix.conf }} - name: Test run: ctest ${{ env.ctest_flags }} - name: Debug output run: cmake -DBUILD_DIR=build -P cmake/post-test.cmake - name: Install run: cmake --install build --config ${{ matrix.conf }} # Linux sanitizer builds build_asan: name: Sanitizer build (ubuntu-latest) runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - name: Install Python test dependencies run: pip install pytest - name: configure run: | cmake \ ${{ env.cmake_common_flags }} \ -DCMAKE_C_FLAGS="-Wall -Wpedantic" \ -DCMAKE_BUILD_TYPE=Debug \ -DUPNP_ENABLE_TESTING_INTEGRATION=OFF \ ${{ env.cmake_sanitizer_flags }} - name: build run: cmake --build build - name: ctest run: ctest ${{ env.ctest_flags }} # Linux TSan build (cmake only — TSan is incompatible with ASan/LSan) build_tsan: name: TSan build (ubuntu-latest) runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - name: Install Python test dependencies run: pip install pytest - name: configure run: | cmake \ ${{ env.cmake_common_flags }} \ -DCMAKE_BUILD_TYPE=Debug \ -DUPNP_ENABLE_TESTING_INTEGRATION=OFF \ ${{ env.cmake_tsan_flags }} - name: build run: cmake --build build - name: ctest # libtsan.so needs TLS slots that Python exhausts before dlopen(); # preloading it at process start avoids the "static TLS block" error # in the Python ctypes tests. run: | LD_PRELOAD=$(gcc -print-file-name=libtsan.so) \ ctest ${{ env.ctest_flags }} env: TSAN_OPTIONS: halt_on_error=1 pupnp-pupnp-216c3c7/.github/workflows/cifuzz.yml000066400000000000000000000043551527342277000220200ustar00rootroot00000000000000name: CIFuzz on: # CIFuzz builds every target and then fuzzes for 5 minutes, so it is too # expensive to run on every pull request. Run it on demand, and # automatically only when the fuzzing harnesses themselves change. workflow_dispatch: # The OSS-Fuzz build script is not in this repository: a monthly run notices # when a change there stops shipping the dictionaries and options. schedule: - cron: "17 4 1 * *" pull_request: branches: - "**" - "!no_ci-*" paths: - "fuzzer/**" permissions: contents: read jobs: Fuzzing: runs-on: ubuntu-latest steps: - name: Build Fuzzers id: build uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master with: oss-fuzz-project-name: "pupnp" dry-run: false - name: Run Fuzzers uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master with: oss-fuzz-project-name: "pupnp" fuzz-seconds: 300 dry-run: false - name: Upload Crash uses: actions/upload-artifact@v7 if: failure() && steps.build.outcome == 'success' with: name: artifacts path: ./out/artifacts # The fuzzing engine only uses a .dict or .options that # sits beside the binary. fuzzer/CMakeLists.txt copies them to the build # directory, from where the OSS-Fuzz build.sh takes "fuzzer/Fuzz*". - name: Checkout the sources if: (success() || failure()) && steps.build.outcome == 'success' uses: actions/checkout@v7 with: path: pupnp-src - name: Check that the dictionaries and options were shipped if: (success() || failure()) && steps.build.outcome == 'success' run: | missing=0 for f in pupnp-src/fuzzer/*.dict pupnp-src/fuzzer/*.options; do [ -e "$f" ] || continue name=$(basename "$f") if [ ! -f "build-out/$name" ]; then echo "::error file=fuzzer/$name::$name is not in the OSS-Fuzz build output, so the fuzzers run without it. Check the copy in fuzzer/CMakeLists.txt and in projects/pupnp/build.sh of google/oss-fuzz." missing=1 fi done exit $missing pupnp-pupnp-216c3c7/.github/workflows/clang-format.yml000066400000000000000000000013521527342277000230520ustar00rootroot00000000000000name: lint-clang-format on: push: branches: - main - "branch-*" paths: - "**.c" - "**.cpp" - "**.h" - "**.hpp" pull_request: branches: - "**" - "!no_ci-*" paths: - "**.c" - "**.cpp" - "**.h" - "**.hpp" permissions: contents: read jobs: lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - uses: mrjimenez/clang-format-lint-action@v0.21 #- uses: DoozyX/clang-format-lint-action@v0.20 #- uses: d-griet/clang-format-lint-action@99a106be2f3f1a92d9783ea7c744fde62d8ce1fa with: source: "./upnp ./ixml ./samples ./fuzzer" extensions: "h,c,cpp" clangFormatVersion: 19 pupnp-pupnp-216c3c7/.github/workflows/codeql-analysis.yml000066400000000000000000000127521527342277000235760ustar00rootroot00000000000000# For most projects, this workflow file will not need changing; you simply need # to commit it to your repository. # # You may wish to alter this file to override the set of languages analyzed, # or to provide custom queries or build logic. # # ******** NOTE ******** # We have attempted to detect the languages in your repository. Please check # the `language` matrix defined below to confirm you have the correct set of # supported CodeQL languages. # name: "CodeQL" permissions: # Required for all workflows to upload CodeQL results security-events: write # required to fetch internal or private CodeQL packs packages: read # only required for workflows in private repositories actions: read # Required for CodeQL on private repos / fork PRs contents: read on: push: branches: [ main, branch-* ] paths-ignore: - "**.md" - "docs/**" - "COPYING" - "ChangeLog" - "THANKS" pull_request: # The branches below must be a subset of the branches above branches: [ main ] paths-ignore: - "**.md" - "docs/**" - "COPYING" - "ChangeLog" - "THANKS" schedule: - cron: "27 18 * * 4" jobs: analyze: name: Analyze (${{ matrix.language }}) # Runner size impacts CodeQL analysis time. To learn more, please see: # - https://gh.io/recommended-hardware-resources-for-running-codeql # - https://gh.io/supported-runners-and-hardware-resources # - https://gh.io/using-larger-runners (GitHub.com only) # Consider using larger runners or machines with greater resources for possible analysis time improvements. runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} strategy: fail-fast: false matrix: include: - language: actions build-mode: none - language: c-cpp build-mode: autobuild #- language: java-kotlin # build-mode: none # This mode only analyzes Java. Set this to 'autobuild' or 'manual' to analyze Kotlin too. - language: python build-mode: none - language: javascript-typescript build-mode: none #- language: ruby # build-mode: none # CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift' # Use `c-cpp` to analyze code written in C, C++ or both # Use 'java-kotlin' to analyze code written in Java, Kotlin or both # Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis, # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning. # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages steps: - name: Checkout repository uses: actions/checkout@v7 # Add any setup steps before running the `github/codeql-action/init` action. # This includes steps like installing compilers or runtimes (`actions/setup-node` # or others). This is typically only required for manual builds. # - name: Setup runtime (example) # uses: actions/setup-example@v1 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v4 with: languages: ${{ matrix.language }} build-mode: ${{ matrix.build-mode }} # If you wish to specify custom queries, you can do so here or in a config file. # By default, queries listed here will override any specified in a config file. # Prefix the list here with "+" to use these queries and those in the config file. # For more details on CodeQL's query packs, refer to: # https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs # queries: security-extended,security-and-quality # queries: ./path/to/local/query, your-org/your-repo/queries@main # If the analyze step fails for one of the languages you are analyzing with # "We were unable to automatically build your code", modify the matrix above # to set the build mode to "manual" for that language. Then modify this step # to build your code. # â„šī¸ Command-line programs to run using the OS shell. # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - name: Run manual build steps if: matrix.build-mode == 'manual' shell: bash run: | echo 'If you are using a "manual" build mode for one or more of the' \ 'languages you are analyzing, replace this with the commands to build' \ 'your code, for example:' echo ' make bootstrap' echo ' make release' exit 1 - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v4 with: category: "/language:${{ matrix.language }}" pupnp-pupnp-216c3c7/.github/workflows/omnios.yml000066400000000000000000000041541527342277000220070ustar00rootroot00000000000000name: OmniOS test on: [ workflow_dispatch ] permissions: contents: read env: cmake_common_flags: |- -S . \ -B build \ -DBUILD_TESTING=ON \ -DDOWNLOAD_AND_BUILD_DEPS=ON \ -DUPNP_ENABLE_OPEN_SSL=ON \ -DUPNP_ENABLE_UNSPECIFIED_SERVER=ON \ -DUPNP_ENABLE_BLOCKING_TCP_CONNECTIONS=ON cmake_sanitizer_flags: |- -DCMAKE_C_FLAGS=-fsanitize=address,leak \ -DCMAKE_CXX_FLAGS=-fsanitize=address,leak \ -DCMAKE_SHARED_LINKER_FLAGS=-fsanitize=address,leak ctest_flags: |- --test-dir build \ --output-on-failure \ --timeout 30 \ --exclude-regex "_add_subdirectory_" # The *_add_subdirectory_* tests compile the whole library as a subproject, # which takes 20 seconds or more on slow machines, so they run in a separate # ctest call with a longer timeout. ctest_build_flags: |- --test-dir build \ --output-on-failure \ --timeout 300 \ --tests-regex "_add_subdirectory_" jobs: omnios: name: Build OmniOS - ${{ matrix.conf }} / ${{ matrix.os }} (VM) runs-on: ${{ matrix.os }} strategy: matrix: os: [ ubuntu-latest ] conf: [ Debug, Release ] fail-fast: false steps: - uses: actions/checkout@v7 - uses: vmactions/omnios-vm@v1 with: prepare: | pkg install cmake gcc14 make run: | cmake \ ${{ env.cmake_common_flags }} \ -DCMAKE_C_FLAGS="-Wall -Wpedantic" \ -DCMAKE_BUILD_TYPE=${{ matrix.conf }} \ -DCMAKE_INSTALL_PREFIX=${{ GITHUB.WORKSPACE }}/test-install cmake \ --build build \ --config ${{matrix.conf}} ctest \ ${{ env.ctest_flags }} \ -C ${{ matrix.conf }} echo "ctest returned status "$? ctest \ ${{ env.ctest_build_flags }} \ -C ${{ matrix.conf }} echo "ctest returned status "$? cmake \ -DBUILD_DIR=build \ -P cmake/post-test.cmake cmake \ --install build \ --config ${{matrix.conf}} pupnp-pupnp-216c3c7/.github/workflows/release.yml000066400000000000000000000111611527342277000221170ustar00rootroot00000000000000name: New Release # on: [push] on: push: tags: - "release-*" workflow_dispatch: permissions: contents: read env: DEBUG: "y" RUN_CONFIGURE: true RUN_BUILD: true RUN_RELEASE: true RUN_HOME_KEEPING: true jobs: new_release: name: Create release ${{ github.ref_name }} runs-on: [ ubuntu-latest ] permissions: contents: write steps: - name: Checkout # Checkout the repo uses: actions/checkout@v7 - name: Preparation # Prepare some useful environment variables env: TAG_NAME: ${{ github.ref_name }} run: | # # Parse the tag name # # The "next_release" variable must exist in the parent process # so that the script code may alter it. # next_release= # This is for starting the workflow manually, in which case # github.ref_name will be undefined. git branch >> "$GITHUB_STEP_SUMMARY" if [[ $DEBUG == "n" && -z $TAG_NAME ]]; then echo "Tag name is empty" >> "$GITHUB_STEP_SUMMARY" exit 1 fi # Parse the tag name and calculate the next release value DEBUG=${DEBUG} scripts/parse_release.sh "$TAG_NAME" - name: Validate tag # Guard against a tag whose version doesn't match what CMakeLists.txt # would produce. The tarball name comes from CMakeLists.txt, so a # mismatch would create a release whose title and tarball version differ. # curr_release was written to GITHUB_ENV by parse_release.sh above. run: | expected=$(grep -A2 -E '^project\(PUPNP' CMakeLists.txt | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1) if [[ "$curr_release" != "$expected" ]]; then echo "ERROR: tag version '$curr_release' does not match CMakeLists.txt version '$expected'" \ | tee -a "$GITHUB_STEP_SUMMARY" exit 1 fi echo "Tag '$curr_release' matches CMakeLists.txt version '$expected' — OK" \ | tee -a "$GITHUB_STEP_SUMMARY" - name: Configure if: ${{ env.RUN_CONFIGURE == 'true' }} run: | cmake -B build - name: Build if: ${{ env.RUN_BUILD == 'true' }} id: build timeout-minutes: 5 # # Build and run checks run: | cpack -G TBZ2 --config build/CPackSourceConfig.cmake - name: Find bz2 name id: find-bz-name # # Find out the bz2 name run: | bz2_name= DEBUG=${DEBUG} scripts/find_out_bz2_name.sh - name: SHA256 # # Calculate the SHA256 checksum run: | sha256sum ${bz2_name} > ${bz2_name}.sha256 { echo '```bash' echo "sha256sum ${bz2_name} > ${bz2_name}.sha256" echo bz2_name=${{ steps.find-bz-name.outputs.bz2_name }} echo '```' } >> "$GITHUB_STEP_SUMMARY" - name: List files in the repository root run: | { echo '```bash' #ls -la ${{ github.workspace }} #echo #ls libupnp-*.tar.bz2 #echo ls -la echo '```' } >> "$GITHUB_STEP_SUMMARY" - name: Release # # This action uploads the generated release files to GitHub # https://github.com/softprops/action-gh-release # https://docs.github.com/rest/releases/releases#generate-release-notes-content-for-a-release if: ${{ env.RUN_RELEASE == 'true' }} uses: softprops/action-gh-release@v3 with: draft: true generate_release_notes: true files: | ${{ steps.find-bz-name.outputs.bz2_name }} ${{ steps.find-bz-name.outputs.bz2_name }}.sha256 - name: Home keeping if: ${{ env.RUN_HOME_KEEPING == 'true' }} env: REF_NAME: ${{ github.ref_name }} run: | # # Edit some files DEBUG=${DEBUG} scripts/home_keeping.sh # # Configure git git config --global user.name 'GitHub Action' git config --global user.email 'github_action@users.noreply.github.com' # Commit git status >> "$GITHUB_STEP_SUMMARY" HOME_KEEPING_BRANCH=${REF_NAME}-home_keeping # Create a new branch, since the actual branch might be protected git switch -c $HOME_KEEPING_BRANCH git add ChangeLog CMakeLists.txt docs/Doxyfile git commit -m "Home keeping for the next release" git status >> "$GITHUB_STEP_SUMMARY" git push origin HEAD:$HOME_KEEPING_BRANCH pupnp-pupnp-216c3c7/.gitignore000066400000000000000000000037161527342277000163560ustar00rootroot00000000000000# # NOTE! Don't add files that are generated in specific # subdirectories here. Add them in the ".gitignore" file # in that subdirectory instead. # # NOTE! Please use 'git ls-files -i --exclude-standard' # command after changing this file, to see if there are # any tracked files which get ignored after the change. # # Normal rules # .* !.clang-format !.clangd *.o *.o.* *.a *.s *.ko *.so *.so.dbg *.mod.c *.i *.lst *.symtypes *.order modules.builtin *.elf *.bin *.gz *.bz2 *.lzma *.patch *.gcno *.sha1 # # Top-level generic files # /tags /TAGS /linux /vmlinux /vmlinuz /System.map /Module.markers /Module.symvers # # git files that we don't want to ignore even it they are dot-files # !.gitignore !.github !.mailmap # # Generated include files # include/config include/linux/version.h include/generated build/inc/autoconfig.h build/inc/upnpconfig.h # stgit generated dirs patches-* # quilt's files patches series # cscope files cscope.* ncscope.* # gnu global files GPATH GRTAGS GSYMS GTAGS # VScode files *.code-workspace .vscode # QT-Creator files *.cflags *.config *.creator *.creator.user *.creator.user.* CMakeLists.txt.user *.cxxflags *.files *.includes /*.pro /*.pro.user /Makefile.am.user *.orig *~ \#*# upnp/sample/tv_combo upnp/sample/tv_combo-1.8 upnp/sample/tv_ctrlpt upnp/sample/tv_ctrlpt-1.8 upnp/sample/tv_device upnp/sample/tv_device-1.8 upnp/test/test_url upnp/unittest/unittest upnp/unittest/unittest-1.8 upnp/unittest/*.pp.c docs/doxygen # Testing ixml/test_* ixml/poc_gh_* upnp/test_* *.trs *.log upnp/generator/generator build build.win32 tmp compile_commands.json pupnp-cppcheck-build-dir pupnp.cppcheck # CMAKE CMakeCache.txt CMakeFiles CTestTestfile.cmake cmake_install.cmake autoconfig.h.cm build.ninja IXMLConfig.cmake IXMLConfigVersion.cmake UPNPConfig.cmake UPNPConfigVersion.cmake # Fuzzer fuzzer_testcases __pycache__ # AI coding assistants *.local.md .claude/ .cursor/ .windsurf/ .copilot/ .continue/ .codeium/ .tabnine/ .gemini/ .devin/ .aider* pupnp-pupnp-216c3c7/CMakeLists.txt000066400000000000000000000230671527342277000171270ustar00rootroot00000000000000CMAKE_MINIMUM_REQUIRED(VERSION 3.11) CMAKE_POLICY(VERSION 3.13) include(cmake/CmDaB.cmake) include(cmake/test-functions.cmake) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) project(PUPNP VERSION 22.2.1 LANGUAGES C) include(GNUInstallDirs) include(cmake/options.cmake) # Only set library postfix with MSVC toolchain if(MSVC) set(CMAKE_DEBUG_POSTFIX d) set(STATIC_POSTFIX s) endif() if(EXISTS "${CMAKE_SOURCE_DIR}/.git") set(DEFAULT_BUILD_TYPE "Debug") endif() # Set the possible values of build type for cmake-gui if(CMAKE_CONFIGURATION_TYPES) set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "Semicolon separated list of supported configuration types, only supports debug and release, anything else will be ignored" FORCE ) set_property(CACHE CMAKE_CONFIGURATION_TYPES PROPERTY STRINGS "Debug" "Release" ) endif() if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) message(STATUS "Setting build type to '${DEFAULT_BUILD_TYPE}' as none was specified.") set(CMAKE_BUILD_TYPE "${DEFAULT_BUILD_TYPE}" CACHE STRING "Choose the type of build." FORCE ) endif() if(UPNP_ENABLE_OPEN_SSL) find_package(OpenSSL REQUIRED) endif() # # Checks for header files (which aren't needed on Win32) # include(CheckIncludeFile) if(NOT WIN32) set(HAVE_INET_H arpa/inet.h) set(HAVE_FCNTL_H fcntl.h) set(HAVE_INTTYPES_H inttypes.h) set(HAVE_LIMITS_H limits.h) set(HAVE_NETDB_H netdb.h) set(HAVE_IN_H netinet/in.h) set(HAVE_STDLIB_H stdlib.h) set(HAVE_STRING_H string.h) set(HAVE_IOCTL_H sys/ioctl.h) set(HAVE_TIME_H sys/time.h) set(HAVE_SYSLOG_H syslog.h) set(HAVE_UNISTD_H unistd.h) set(headers HAVE_INET_H HAVE_FCNTL_H HAVE_INTTYPES_H HAVE_LIMITS_H HAVE_NETDB_H HAVE_IN_H HAVE_STDLIB_H HAVE_STRING_H HAVE_IOCTL_H HAVE_TIME_H HAVE_SYSLOG_H HAVE_UNISTD_H ) foreach(header ${headers}) check_include_file(${${header}} ${header}) if(NOT ${header}) message(FATAL_ERROR "Header-file ${${header}} not found") endif() endforeach() endif() # # Checks for typedefs, structures, and compiler characteristics # include(TestBigEndian) test_big_endian(big_endian) check_include_file(sys/socket.h HAVE_SOCKET_H) check_include_file(ws2tcpip.h HAVE_WS2TCPIP_H) if(HAVE_SOCKET_H) list(APPEND CMAKE_EXTRA_INCLUDE_FILES sys/socket.h) elseif(HAVE_WS2TCPIP_H) list(APPEND CMAKE_EXTRA_INCLUDE_FILES ws2tcpip.h) endif() include(CheckTypeSize) check_type_size(socklen_t SOCKLEN_T) unset(CMAKE_EXTRA_INCLUDE_FILES) if(NOT SOCKLEN_T) set(socklen_t "int") endif() # # Checks for large-file-sensitivity # if(NOT HAVE_OFF_T_SIZE AND NOT MSVC) check_type_size(off_t OFF_T_SIZE) set(UPNP_LARGEFILE_SENSITIVE FALSE CACHE BOOL "whether the system defaults to 32bit off_t but can do 64bit when requested" FORCE) if(OFF_T_SIZE EQUAL 8) message(STATUS "System uses 64 bit, no flags needed") else() unset(HAVE_OFF_T_SIZE CACHE) set(CMAKE_REQUIRED_DEFINITIONS -D_FILE_OFFSET_BITS=64) check_type_size(off_t OFF_T_SIZE) if(OFF_T_SIZE EQUAL 8) message(STATUS "_FILE_OFFSET_BITS=64 needed") set(UPNP_LARGEFILE_SENSITIVE TRUE CACHE BOOL "whether the system defaults to 32bit off_t but can do 64bit when requested" FORCE) set(_FILE_OFFSET_BITS 64 CACHE BOOL "Number of bits in a file offset, on hosts where this is settable" FORCE) else() unset(HAVE_OFF_T_SIZE CACHE) set(CMAKE_REQUIRED_DEFINITIONS -D_LARGE_FILES) check_type_size(off_t OFF_T_SIZE) if(OFF_T_SIZE EQUAL 8) message(STATUS "_LARGE_FILES needed") set(_LARGE_FILES TRUE CACHE BOOL "Define for large files, on AIX-style hosts." FORCE) set(UPNP_LARGEFILE_SENSITIVE TRUE CACHE BOOL "whether the system defaults to 32bit off_t but can do 64bit when requested" FORCE) endif() endif() endif() elseif(MSVC) set(_LARGE_FILES TRUE CACHE BOOL "Define for large files, on AIX-style hosts." FORCE) set(UPNP_LARGEFILE_SENSITIVE TRUE CACHE BOOL "whether the system defaults to 32bit off_t but can do 64bit when requested" FORCE) endif() unset(CMAKE_REQUIRED_DEFINITIONS) # # Checks for library functions # include(CheckFunctionExists) check_function_exists(fseeko HAVE_FSEEKO) if(NOT HAVE_FSEEKO) set(CMAKE_REQUIRED_DEFINITIONS _LARGEFILE_SOURCE) check_function_exists(fseeko HAVE_FSEEKO) unset(CMAKE_REQUIRED_DEFINITIONS) if(HAVE_FSEEKO) set(_LARGEFILE_SOURCE TRUE CACHE BOOL "Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2)." FORCE) endif() endif() check_function_exists(strnlen HAVE_STRNLEN) check_function_exists(strndup HAVE_STRNDUP) if(UPNP_ENABLE_BACKTRACE AND NOT WIN32) check_include_file(execinfo.h HAVE_EXECINFO_H) if(HAVE_EXECINFO_H) check_function_exists(backtrace HAVE_BACKTRACE) endif() endif() include(CheckCCompilerFlag) check_c_compiler_flag(-fmacro-prefix-map=from=to HAVE_MACRO_PREFIX_MAP) if(Solaris) set(CMAKE_REQUIRED_LIBRARIES socket) check_function_exists(bind HAVE_SOCKET) set(CMAKE_REQUIRED_LIBRARIES rt) check_function_exists(sched_getparam HAVE_RT) unset(CMAKE_REQUIRED_LIBRARIES) endif() # # Checks for POSIX Threads # if(NOT MSVC) set(THREADS_PREFER_PTHREAD_FLAG TRUE) include(FindThreads) else() find_package(PTHREADS4W CONFIG REQUIRED) endif() # Threads::Shared and Threads::Static are convenience aliases used by the # upnp and test targets. They must be created in all configurations, # including DOWNLOAD_AND_BUILD_DEPS=ON (where the guard below was previously # preventing their creation and causing configure errors on all platforms). if(TARGET Threads::Threads AND NOT TARGET Threads::Shared) if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.18) add_library(Threads::Shared ALIAS Threads::Threads) add_library(Threads::Static ALIAS Threads::Threads) else() add_library(Threads::Shared INTERFACE IMPORTED) add_library(Threads::Static INTERFACE IMPORTED) # Replicate the flags/libraries from Threads::Threads if(THREADS_HAVE_PTHREAD_ARG) set_property(TARGET Threads::Shared PROPERTY INTERFACE_COMPILE_OPTIONS "$<$:SHELL:-Xcompiler -pthread>" "$<$>:-pthread>" ) set_property(TARGET Threads::Static PROPERTY INTERFACE_COMPILE_OPTIONS "$<$:SHELL:-Xcompiler -pthread>" "$<$>:-pthread>" ) endif() if(CMAKE_THREAD_LIBS_INIT) get_target_property(thread_location Threads::Threads INTERFACE_LINK_LIBRARIES) set_target_properties(Threads::Shared PROPERTIES INTERFACE_LINK_LIBRARIES ${thread_location} ) set_target_properties(Threads::Static PROPERTIES INTERFACE_LINK_LIBRARIES ${thread_location} ) endif() endif() endif() # # Determine if pthread_rwlock_t is available # if(TARGET Threads::Threads) set(CMAKE_EXTRA_INCLUDE_FILES pthread.h) if(DOWNLOAD_AND_BUILD_DEPS AND NOT PTHREADS4W_DIR) set(CMAKE_REQUIRED_INCLUDES ${PTHREADS4W_SOURCE_DIR}) else() if(NOT Threads_FOUND) get_target_property(CMAKE_REQUIRED_INCLUDES Threads::Threads INTERFACE_INCLUDE_DIRECTORIES) endif() endif() check_type_size(pthread_rwlock_t UPNP_USE_RWLOCK) unset(CMAKE_EXTRA_INCLUDE_FILES) unset(CMAKE_REQUIRED_INCLUDES) endif() configure_file(${PUPNP_SOURCE_DIR}/upnp/inc/upnpconfig.h.cm ${PUPNP_BINARY_DIR}/upnp/inc/upnpconfig.h) configure_file(${PUPNP_SOURCE_DIR}/samples/tv/common/config_sample.h.cm ${PUPNP_BINARY_DIR}/samples/tv/common/config_sample.h) if(NOT UPNP_MINISERVER_REUSEADDR) set(UPNP_MINISERVER_REUSEADDR 0) endif() configure_file(cmake/autoconfig.h.in ${PUPNP_BINARY_DIR}/autoconfig.h) add_subdirectory(ixml) add_subdirectory(upnp) add_subdirectory(samples) install(EXPORT PUPNP DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/UPNP ) include(CMakePackageConfigHelpers) configure_package_config_file( UPNP.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/UPNPConfig.cmake INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/UPNP ) write_basic_package_version_file(UPNPConfigVersion.cmake VERSION ${PUPNP_VERSION} COMPATIBILITY SameMajorVersion ) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/UPNPConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/UPNPConfigVersion.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/UPNP/ ) set(prefix ${CMAKE_INSTALL_PREFIX}) set(exec_prefix "\${prefix}") set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}") set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}") set(PTHREAD_CFLAGS ${CMAKE_THREAD_LIBS_INIT}) if(UPNP_ENABLE_OPEN_SSL) set(OPENSSL_LIBS "-lssl") endif() configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libupnp.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libupnp.pc @ONLY) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libupnp.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig ) find_package(Doxygen) if(DOXYGEN_FOUND) add_custom_target(docs COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_SOURCE_DIR}/docs/Doxyfile WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/docs COMMENT "Generating API documentation with Doxygen" VERBATIM ) endif() if(UPNP_ENABLE_TESTING) enable_testing() enable_language(CXX) find_package(GTest CONFIG) if(GTest_FOUND) add_subdirectory(gtest) endif() add_subdirectory(tests) endif() if(FUZZER) if(NOT CMAKE_C_COMPILER_ID STREQUAL "Clang") message(WARNING "CMAKE_C_COMPILER_ID = ${CMAKE_C_COMPILER_ID}") message(FATAL_ERROR "Compiling with clang is required for libFuzzer") endif() add_subdirectory(fuzzer) endif() # ------------------------------------------------------------------------------ # CPack Source Tarball Configuration (Replacement for 'make dist') # ------------------------------------------------------------------------------ set(CPACK_SOURCE_GENERATOR "TBZ2") set(CPACK_SOURCE_PACKAGE_FILE_NAME "libupnp-${PUPNP_VERSION}") set(CPACK_SOURCE_IGNORE_FILES "/.git/" "/.github/" "/build/" "/.vscode/" "\\\\.swp$" "\\\\.tar\\\\.bz2$" "\\\\.tar\\\\.gz$" "autom4te.cache/" "/install/" ) include(CPack) pupnp-pupnp-216c3c7/COPYING000066400000000000000000000027051527342277000154160ustar00rootroot00000000000000Copyright (c) 2000-2003 Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither name of Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. pupnp-pupnp-216c3c7/ChangeLog000066400000000000000000007044151527342277000161440ustar00rootroot00000000000000******************************************************************************* Version 22.2.1 ******************************************************************************* - GHSA-mrw2-788c-f6w7: Stop SSDP search results from reaching the control point after the search ended. A result was queued on the receive thread pool with a copy of the search cookie and delivered without checking the search, so a result queued before UpnpUnRegisterClient() or the search timeout arrived afterwards, with a cookie the application may have freed (use after free). Queued results of an ended search are now dropped, and UpnpUnRegisterClient() and the search timeout wait for the result callbacks that are running. A call to UpnpUnRegisterClient() from inside a search result callback does not wait. - PR #673: Use SSL_set1_dnsname() instead of SSL_set1_host() on OpenSSL 4, which deprecates the old function; the macOS CI job warned about it in sock_ssl_connect(). Older OpenSSL versions still use SSL_set1_host(), and the IP address check is unchanged. - PR #672: Keep the GHSA-323w socket test from hanging. It writes 4 MB with a blocking send() to a reader that starts late, and once hung on macOS until ctest killed it. The writing end now has a send timeout and the reader retries on EINTR, so such a case fails instead of hanging. - PR #671: Add FuzzDevice, a fuzz target for requests to a registered device. It starts the SDK on the loopback interface, registers a device with one service and a virtual directory, and feeds each input to the request dispatch, so SOAP actions, QueryStateVariable, device-side GENA and the virtual directory callbacks are now fuzzed. It found the issue fixed in PR #670. The fuzzer readme now describes every target. - PR #670: Call the thread pool jobs and free functions through their own type. RunMiniServer(), UpnpThreadDistribution(), free_advertise_arg() and free_action_arg() took a typed pointer and were registered with a cast to void (*)(void *), which is undefined behaviour (C11 6.3.2.3p8); clang's -fsanitize=function aborted as soon as UpnpInit2() started the miniserver. They now take void *, and the casts are gone, so the compiler checks the types again. - PR #669: Accept a loopback interface named explicitly in UpnpInit2(). UpnpGetIfInfo() skipped loopback interfaces even when the caller named one, so UpnpInit2("lo", 0) failed with UPNP_E_INVALID_INTERFACE. Loopback is still skipped when the interface is chosen automatically; when named, the stack serves local clients only. - PR #668: Remove the dead UPNP_ENABLE_POST_WRITE code. It was never enabled by the build, so a POST reaches only a virtual directory, as before; a test now checks it. - PR #667: Reject a NUL or a bare CR in an HTTP header field value (RFC 9110, section 5.5). The parser kept them in the value, and even classified NUL as a separator because strchr() matches the terminator of its set, so code that read the value as a C string saw a shorter value than the stored length. The server now answers 400, and a control point gets UPNP_E_BAD_HTTPMSG, for both requests and responses. ******************************************************************************* Version 22.2.0 ******************************************************************************* - GHSA-8rmx-x2cq-xh33: Authenticate the server of HTTPS connections. With UPNP_ENABLE_OPEN_SSL, the client accepted any certificate and never checked the host name, so an on-path attacker or a malicious device could intercept an https:// connection. UpnpInitSslContext() now sets SSL_VERIFY_PEER with the system's default trust store, and every connection checks that the certificate matches the host of the URL (DNS name with SNI, or IP address). SOAP actions, GENA subscriptions and NOTIFY, UpnpDownloadUrlItem() and UpnpDownloadXmlDoc() have no TLS and sent https:// requests in clear; they now return UPNP_E_INVALID_URL. NOTE: this changes the default behaviour. A server with a self-signed or otherwise untrusted certificate is now rejected; add its certificate or CA to the context returned by UpnpGetSslCtx(), e.g. with SSL_CTX_load_verify_locations(). pupnp honours the verify mode of the context: SSL_VERIFY_NONE turns server authentication off, and a context passed to UpnpSetSslCtx() must enable SSL_VERIFY_PEER and load a trust store itself. - PR #666: Cast to unsigned char before calling the functions in the URI and HTTP parsers. parse_uri(), the HTTP header matching, the Range parser and the pre-Vista inet_pton6() passed a plain char, so where char is signed a byte from 0x80 to 0xFE became a negative int, which is undefined behaviour (C11 7.4). These bytes come from the network: the request line, SSDP LOCATION, description documents and GENA Callback headers. ******************************************************************************* Version 22.1.10 ******************************************************************************* - PR #665: Reject CR and LF in the service type of a SOAP action. SoapSendAction() and SoapSendActionEx() wrote the service type into the SOAPAction header as given. A control point takes it from the serviceType of a description document served by a device, where " " decodes to CR LF, so a device could add header lines to the request it sent to the controlURL or end the header block early. UpnpSendAction(), UpnpSendActionEx() and the async variants now return UPNP_E_INVALID_PARAM. ******************************************************************************* Version 22.1.9 ******************************************************************************* - GHSA-4pw9-q67x-hfc3: Reject an HTTP response whose status code is not three digits. A device that answered a description request with status 0 made UpnpDownloadUrlItem() report success without setting the buffer, and UpnpDownloadXmlDoc() then parsed and freed an uninitialised pointer. - GHSA-323w-xv8r-6g77: Fix denial of service of the miniserver worker threads. The receive timeout of a request was charged in whole seconds and could go below zero, which the next wait took as no timeout, so a client that timed one byte just after the deadline held a worker for as long as it liked. A positive timeout now stops at zero. - GHSA-9mqx-m85r-46wh: Fix a heap over-read when sending a GENA event. A NUL byte in the Callback header of a SUBSCRIBE was kept in the delivery URL list, and the copy made for each notification was shorter than the URLs that pointed into it. Such a Callback header is now rejected with 412. - GHSA-gjgg-q6hf-2x3j: Fix a path traversal in the web server. The checks on a request path stopped at the first '?' or '#', a decoded %23 or %3f included, but the whole path was opened, so "..", a backslash or a colon after it led out of the document root (CWE-22). On Windows a literal '?' was enough; on other systems the document root needed a directory with '?' or '#' in its name. Only the checked part of the path is opened now. - PR #651: Fix a corrupted attribute list when ixmlElement_setAttributeNode() or ixmlElement_setAttributeNodeNS() was called with an attribute the element already owned and the lookup did not return that same attribute. An attribute without a namespace given twice to ixmlElement_setAttributeNodeNS() was appended again, and freeing the element then read freed memory. With ixmlElement_setAttributeNode(), another attribute of the element with the same name was replaced by the one still linked. Both calls now do nothing in that case. - PR #653: Add FuzzIxmlOps, a fuzzer for the ixml functions that build and change a DOM tree, with a seed corpus. It applies a sequence of operations to the nodes of a document and checks the child and attribute lists after each one. - PR #654: Fix the layout of IXML_Node seen by applications. The member ctag only exists with script support (IXML_HAVE_SCRIPTSUPPORT, enabled by default), but the macro was a private compile definition of libixml and nothing defined it for whoever included ixml.h. An application saw IXML_Node without ctag, so tagName in IXML_Element, and specified and ownerElement in IXML_Attr, were read at the wrong offset, and the script support functions were not declared. upnpconfig.h now defines the macro and ixml.h includes it. The library binary does not change. Also include config.h in ithread.h before the first use of UPNP_USE_RWLOCK. - PR #655: Make the FuzzIxml fuzzer return 0 for every input (issue #652). It returned 1 or the IXML error code for a document that did not parse, and libFuzzer keeps an input in the corpus only when the target returns 0, so the fuzzer could not build on inputs that reach the parser's error paths. - PR #656: Make fuzzer/build.sh work again. It looked for the libraries in the directories of the removed autotools build. It now builds the whole tree from the top level with -DFUZZER=ON, as OSS-Fuzz does, and "Run" takes the name of the target and starts from its seed corpus in fuzzer/corpus. - PR #658: Fix a false alarm of the FuzzIxmlOps fuzzer (OSS-Fuzz issue 569581919). It reports a tree with more than 4096 nodes as a cycle, and a few deep clones appended to their own source built such a tree with no cycle at all. The nodes that cloneNode may create in one run are now limited to 2048. The ixml library was not at fault and does not change. - PR #659: Fix a dangling pointer in ixmlElement_setAttributeNS() when it ran out of memory. If the element already had the attribute and the copy of the new value failed, the prefix of the attribute was freed and the pointer was left in place. The value is now copied first, and a failure leaves the attribute as it was. - PR #660: Send "Content-Range: bytes */" in the 416 response of the web server to a Range request that cannot be satisfied (RFC 7233, section 4.4), so that the client learns the length of the file. Nothing changes when the length is not known. - PR #661: Add the FuzzWebServer fuzzer, which parses its input as an HTTP request and dispatches it the way the miniserver does, to the web server, SOAP and GENA handlers. It comes with a dictionary, an options file and a seed corpus. - PR #662: Add the FuzzSsdp fuzzer, which parses its input as an SSDP datagram (a request or an M-SEARCH reply) and runs the device request handler and the header parsers of the control point handler on it. It comes with a dictionary, an options file and a seed corpus. - PR #663: Ship the dictionaries and options of the fuzzers to OSS-Fuzz. Its build script only copies "Fuzz*" from the build directory, so these files never left the source tree; CMake now copies them there. The CIFuzz workflow fails when one of them is missing from the build output, and also runs once a month, since that script is not in this repository. - PR #664: Take the Host header of client requests from the parsed URL. http_Download(), MakeGetMessageEx() and MakeGenericMessage() copied it from the URL string, from "//" up to the next '/', while the connection used the host and port parsed by parse_uri(). A URL announced by a device (an SSDP LOCATION or a URL in a description document) with CR and LF after the port added header lines to the request and could end the header block early. ******************************************************************************* Version 22.1.8 ******************************************************************************* - GHSA-8pj8-vmhq-qwvj: Cap the MX header of an incoming SSDP M-SEARCH request at 5 seconds, as UDA 1.1 recommends. The reply to a search is scheduled after a random delay in [0, MX) seconds and the queued job keeps a copy of the requester's address, but MX was only checked for being non-negative. A peer could send a stream of searches with a huge MX and pin memory in the timer queue for as long as the process ran (CWE-770). - GHSA-hwrm-c56x-fj22: Fix denial of service of the miniserver worker threads by connections that send nothing. The thread pool did not grow to its maximum for a burst of connections, a connection that sent nothing held a worker for the whole 30 second receive timeout, and a peer could open any number of connections, so a handful of idle connections left no worker for anybody else (CWE-400). The pool now grows while queued jobs outnumber idle threads, a connection has to send its first byte within MINISERVER_FIRST_BYTE_TIMEOUT (5) seconds, and a peer address is limited to MINISERVER_MAX_CONNECTIONS_PER_PEER (6) connections at a time. - GHSA-f8rh-7wq7-v4m7: Fix a path traversal in the web server on Windows. A backslash in the request path, sent as %5c, is not a separator for remove_dots() but is one for the Windows file system, so /..%5csecret.txt returned a file outside the document root without credentials, and so did NTFS alternate data streams (CWE-22). On Windows a backslash is now treated as a slash before the dots are removed, and a colon is rejected in a path that is mapped onto the file system. - PR #644: Fix twelve bugs in the ixml DOM API. Adding a second namespaced attribute with ixmlElement_setAttributeNS() or ixmlElement_setAttributeNodeNS() crashed on a NULL local name. Moving a node that already had another parent left it in two child lists and freed it twice, and ixmlNode_appendChild(e, e) made an element its own child; both are rejected or detached correctly now. ixmlNode_insertBefore() and ixmlNode_replaceChild() leave a child that is its own reference node where it is, and insertBefore() with a NULL reference appends. The attributes of an element are no longer taken for its children. Cloning an element whose attributes were added in different ways, or a text or CDATA node that has siblings, no longer crashes or drags the siblings along. ixmlElement_setAttributeNode() with an attribute the element already owns does nothing, ixmlElement_removeAttributeNode() clears the owner element and returns IXML_INVALID_PARAMETER for a NULL rtAttr, and ixmlElement_removeAttributeNS() no longer crashes on xmlns:prefix declarations. - PR #645: Fix four web server and API bugs, and a data race. A GET or HEAD of a regular file, or a HEAD of the alias, leaked a reference on the alias document, which was then still served after it was uninstalled. A Range request that starts at or after the end of the file got a 206 with an impossible Content-Range and now gets a 416. UpnpRemoveVirtualDir() accepts the same names as UpnpAddVirtualDir(), with or without the leading slash. Unregistering one of two root devices no longer stops the other one from answering searches, and UpnpFinish() now unregisters all of them. The status code tables of the HTTP layer were filled in lazily by whichever thread needed them first without any locking; this is now done under a mutex. - PR #646: Fix a hang in UpnpFinish() when miniserver workers were still serving connections while it stopped. The list of active connections was protected by a mutex that the shutdown destroyed while workers could still lock it, so a worker that finished at that moment blocked forever and UpnpFinish() waited for it. The mutex is now never destroyed, and the list is only used with it held. ******************************************************************************* Version 22.1.7 ******************************************************************************* - GHSA-h9f5-9vwp-h89q: Fix a memory leak when a GENA subscription is freed. The subscription's event queue recycles its list nodes: ListDelNode() keeps them on the list's own free list, and only ListDestroy() releases them. freeSubscription() drained the queue but never called ListDestroy(), so every subscription a device accepted leaked at least one list node when it was torn down, on UNSUBSCRIBE, on expiry or when the device unregistered (CWE-401). A remote peer could repeat SUBSCRIBE/UNSUBSCRIBE without credentials and grow the device's memory without bound. Found and fixed by Damien Plisson (@damien78). ******************************************************************************* Version 22.1.6 ******************************************************************************* - GHSA-mhhw-gm73-c57g: Fix a heap over-read when parsing the Callback header of an incoming GENA SUBSCRIBE request. is_mark() and is_reserved() used strchr(), which also matches the terminating NUL, so URI parsing did not stop at the end of the string, and create_url_list() passed parse_uri() a length two bytes too long. A Callback URL without the closing '>' read one byte past its buffer (CWE-125). Found and fixed by @las7 (#641). ******************************************************************************* Version 22.1.5 ******************************************************************************* - GHSA-ggw2-jjv9-h22c: Fix SID matching for incoming GENA NOTIFY requests. The control point compared the SID header with memcmp() over the header's length, without checking it against the length of the stored SID. A SID made of the stored one, a NUL byte and padding read past the end of the stored string (CWE-125), and any prefix of the stored SID, such as "uuid:", matched the subscription, so events could be injected without knowing the SID. The lengths must now be equal before the bytes are compared. - Remove libupnp.spec. The RPM spec still built with autotools, which this project no longer ships, so it has not worked since the move to CMake. Packagers should use their distribution's own spec. - Remove the Qt Creator project files under ide/qtcreator. They listed the autotools build files and paths such as upnp/sample that no longer exist. Qt Creator can open the CMake build directly. - Switch the VS Code tasks and launch target under ide/vscode to CMake. The build task ran make in the source root, which has no Makefile, and the debug configuration launched a test that no longer exists. There is now a configure task, build and clean go through cmake --build, and the debugger runs the tv_device sample. ******************************************************************************* Version 22.1.4 ******************************************************************************* - PR #634: Fix false HTTP 431 on header blocks under the size limit. The GHSA-f86h-hm8r-cqxr header block check ran before parsing and counted the whole receive buffer, including entity bytes that arrived in the same read as the end of the headers, so a legal header block close to g_maxHeaderSize followed by a body could be rejected. The exact header block size is now checked when the blank line ending the headers is parsed, and the buffered-size check runs only after a parse that stops while still reading headers, so an unterminated header line is still rejected. - PR #635: Fix a socket and memory leak in http_OpenHttpGetEx(), used by UpnpOpenHttpGetEx(). On a malformed response it freed the connection handle without closing the socket or destroying the response buffer. It now uses http_CloseHttpConnection() for the full teardown. ******************************************************************************* Version 22.1.3 ******************************************************************************* - GHSA-q4rx-xfwj-m2gp: Fix unbounded response header block in the streaming HTTP GET client allowing a malicious server to exhaust a control point's memory. ReadResponseLineAndHeaders(), used by UpnpOpenHttpGet(), UpnpOpenHttpGetProxy(), UpnpOpenHttpGetEx() and UpnpGetHttpResponse(), appended received data to the message buffer directly instead of going through parser_append(), so the GHSA-f86h-hm8r-cqxr header limit never applied to it. A server that sent a status line followed by an endless stream of header lines grew the client's memory without bound, and the transfer timeout never fired while data kept flowing (CWE-400). The header block check now lives in parser_check_header_size() and runs after every read in both loops, rejecting oversized responses as before. Reported by the Kimi Security Team (Moonshot AI). - GHSA-v5wv-qg6r-f87r: Fix chunked trailers and unterminated chunk-size lines bypassing both HTTP size limits, allowing pre-auth denial of service. Trailer headers are parsed after the header block, so g_maxHeaderSize did not apply to them, and g_maxContentLength only counts chunk data, so trailer bytes were never charged. A chunk-size line that never ended kept the parser waiting before the GHSA-hg5x-73vf-vfm2 chunk size check could run. Either way, every byte a peer sent stayed buffered, and a single connection could grow memory without bound on device hosts and control points alike (CWE-400). The trailer block and a pending chunk-size line are now bounded by g_maxHeaderSize inside the chunked parser, which also covers the streaming body reader http_ReadHttpResponse(), and rejected with HTTP 431. Reported by the Kimi Security Team (Moonshot AI). - GHSA-gvhr-pxx7-ch7x: Fix SUBSCRIBE renewal storm caused by a granted TIMEOUT: Second-0. The control point applied CP_MINIMUM_SUBSCRIPTION_TIME to the timeout it requested but not to the one the publisher granted, and schedules the auto-renewal AUTO_RENEW_TIME seconds before the granted timeout. A grant of Second-0 put the renewal in the past, so it fired at once, received Second-0 again, and looped: a rogue device on the local network could turn one UpnpSubscribe() into tens of thousands of SUBSCRIBE requests per second (CWE-835). Granted timeouts below CP_MINIMUM_SUBSCRIPTION_TIME are now raised to it, and that is the value reported back to the caller. Reported by the Kimi Security Team (Moonshot AI). ******************************************************************************* Version 22.1.2 ******************************************************************************* - GHSA-xr5m-v53v-jfq9: Fix quadratic-time DOM construction in ixmlParseBufferEx() allowing pre-auth denial of service. The parser appended every node by walking its parent's child list from the head, resolved the default namespace and every element prefix by walking the whole stack of open elements, and checked every attribute against all the attributes before it. A well-formed SOAP body within the 64000-byte entity limit, sent unauthenticated to any control URL, could burn up to about 2 s of CPU per request (CWE-407). Children are now appended in constant time, the default namespace in effect is recorded on each element as it is opened, and prefix lookups skip the elements that bind no prefix. Elements are limited to 256 attributes, namespace declarations included, and at most 256 namespace prefix bindings may be in scope at once; documents above either limit are rejected with IXML_SYNTAX_ERR. Reported by Denis K. ******************************************************************************* Version 22.1.1 ******************************************************************************* - GHSA-7mx2-6v7x-xhv7: Fix unauthenticated remote crash in SOAP QueryStateVariable handling. check_soap_request() passed the local name of the first child of the QueryStateVariable action node straight to strcmp(), but ixmlNode_getLocalName() returns NULL for text and CDATA nodes. A single POST to any control URL, with the QueryStateVariable SOAPACTION and a text or CDATA node where is expected, crashed the whole process (CWE-476) before the device callback ran. Fixed by adding the same NULL check the neighbouring local-name checks already use; such requests are now rejected with HTTP 400. Reported by Alex J. ******************************************************************************* Version 22.1.0 ******************************************************************************* - GHSA-f86h-hm8r-cqxr: Fix unbounded HTTP header block allowing pre-auth denial of service. g_maxContentLength constrains only the entity, so the request/response line and the header fields that follow it were accepted with no size limit at all: a single unauthenticated request could carry an unbounded number of headers, or one unbounded header value, and drive memory and CPU exhaustion before any handler ran. Header insertion also scans the existing list for a duplicate name, making the cost quadratic in header count — 100,000 small headers occupied a worker for ~34 s and ~20 MB, and a single 64 MB header value for ~34 s and ~131 MB. Both device hosts and control points were affected, since the same parser reads responses. Fixed by bounding the header block in parser_append(), gated on the parser still reading the request/response line or the header fields, so chunked trailer headers remain governed by g_maxContentLength. The limit is deliberately separate from the entity limit, defaults to DEFAULT_MAX_HEADER_SIZE = 16 KB, is adjustable with the new UpnpSetMaxHeaderSize(), and rejects with HTTP 431 Request Header Fields Too Large. Reported by the Kimi Security Team (Moonshot AI). - Size-limit rejections are now logged at UPNP_ERROR level naming the limit that was hit, the observed sizes and the API that adjusts it (UpnpSetMaxHeaderSize() or UpnpSetMaxContentLength()). Previously such a rejection reached the caller only as UPNP_E_OUTOF_BOUNDS, with nothing to search for. Only sizes are logged, never message bytes. ******************************************************************************* Version 22.0.6 ******************************************************************************* - Fix OmniOS build failure in test-upnp-ghsa-f8r2. The GHSA-279g-pwr2-f8r2 regression test calls socket()/connect()/send()/recv() directly, same as test-upnp-gh-325, but was registered without the SOCKET_LIBRARY/ NSL_LIBRARY linkage those symbols need outside glibc (e.g. Solaris/ illumos). Also fixes a stray placement bug where its registration had landed between gh-325's registration and gh-325's own linking block. ******************************************************************************* Version 22.0.5 ******************************************************************************* - GHSA-279g-pwr2-f8r2: Fix path truncation via embedded NUL byte (%00) in request paths. remove_escaped_chars() correctly decodes %00 to a literal NUL byte, but process_request() then treated the decoded buffer as a NUL-terminated C string in alias/virtual-directory routing checks, so a request for /alias%00.png was silently served as /alias, bypassing extension-based ACL/WAF filters and virtual-directory routing. Fixed by rejecting the request when the decoded string length no longer matches the tracked buffer length. - GHSA-hg5x-73vf-vfm2: Fix unbounded memory allocation and integer truncation in chunked Transfer-Encoding parsing. match_int() parsed a hex chunk size into a 64-bit long but only rejected negative values, so a declared size above INT_MAX silently wrapped (e.g. 2^32 wrapped to 0 and was misread as the chunked-entity terminator). Separately, a declared chunk size was never checked against g_maxContentLength before its bytes were buffered, allowing a single oversized chunk to exhaust memory. Fixed by rejecting out-of-range chunk sizes and rejecting a chunk size exceeding g_maxContentLength before any of its body is read. ******************************************************************************* Version 22.0.4 ******************************************************************************* - OSS-Fuzz 531780528: Stop resolving DNS during URI/GENA callback parsing. parse_hostport() called getaddrinfo() synchronously on any non-literal-IP host, and parse_uri() runs directly on untrusted input in two places: the HTTP request-line parser (embedded miniserver) and GENA SUBSCRIBE callback-URL parsing. A remote, unauthenticated peer could block a worker thread on DNS resolution (CWE-400). parse_uri()/parse_hostport() no longer perform DNS resolution; the new resolve_hostport() defers it to legitimate outbound-connection points. GENA SUBSCRIBE callback URLs now require a literal IP outright, closing a DNS-rebinding gap in the CVE-2020-12695 (CallStranger) same-subnet check as well. ******************************************************************************* Version 22.0.3 ******************************************************************************* - Breaking: Removed the deprecated UpnpSetContentLength(Hnd, contentLength). It has been marked obsolete since it entered this codebase in 2006 and never actually used the Hnd argument; its effect was always identical to the global UpnpSetMaxContentLength(contentLength), which remains the supported API. MAX_SOAP_CONTENT_LENGTH, which only existed to bound this function, was removed along with it. ******************************************************************************* Version 2.0.2 ******************************************************************************* - GHSA-gcj7-j9f7-q84c: Enforce g_maxContentLength on chunked transfer-encoded bodies. Transfer-Encoding: chunked leaves content_length at 0, bypassing the existing size limit checks. The fix adds entity.length checks alongside the content_length checks in http_RecvMessage() so chunked bodies are also rejected when they exceed the configured maximum. - GHSA-q54q-vx78-v9rq: Fix NULL dereference in ixmlNode_compare(). The function called strcmp() on nodeValue, namespaceURI, prefix, and localName without NULL guards. Non-namespaced attributes have these fields as NULL (zeroed by ixmlAttr_init), causing a crash when removeAttributeNode compared two distinct attribute objects with the same name. - GHSA-g6c2-x4r9-352g: Fix Content-Length integer truncation in raw_to_int(). The function used strtol() (returns long, 64-bit on LP64) and cast the result to int (32-bit), silently truncating Content-Length values above INT_MAX. A value such as 4294967301 (2^32+5) was stored as 5, bypassing size limits. Switched to strtoll() with an explicit INT_MAX bound check. ******************************************************************************* Version 2.0.1 ******************************************************************************* - Issue #227: Fix SSDP regression introduced by PR #579: revert SSDP socket bind address from unicast interface address back to INADDR_ANY. Linux only delivers multicast datagrams to sockets bound to INADDR_ANY; binding to a unicast address silently broke all M-SEARCH reception (device discovery). IP_ADD_MEMBERSHIP with imr_interface already scopes multicast membership to the correct interface, so the unicast bind was unnecessary. ******************************************************************************* Version 2.0.0 ******************************************************************************* - Issue #365: Remove UpnpPrintf from public API (breaking API change). - GHSA-25cx-xv8x-j247: Convert recursive ixml DOM traversal functions to iterative to prevent stack overflow on deeply nested XML documents (CWE-674). Fixed: ixmlPrintDomTreeRecursive, ixmlNode_getElementsByTagNameRecursive, ixmlNode_getElementsByTagNameNSRecursive, ixmlNode_cloneNodeTreeRecursive, ixmlNode_isAncestor. - ssdp_ctrlpt.c: Replace unsafe strcpy/strcat with bounds-checked snprintf in CreateClientRequestPacket to eliminate potential buffer overflow. - Issue #169: Add UpnpGetSslCtx() and UpnpSetSslCtx() to SSL API. - Issue #178: ThreadPool: print backtrace on first "too many jobs" via new UPNP_ENABLE_BACKTRACE CMake option (enabled by default; requires execinfo.h). - Issue #178: Raise DEFAULT_MAX_JOBS_TOTAL from 100 to 1000 to better handle networks with many UPnP devices. - Issue #410: Add UpnpGetSsdpReqPort4() and UpnpGetSsdpReqPort6() to query the OS-assigned source port used for SSDP M-SEARCH requests. - CMake: Add find_package(UPNP COMPONENTS Shared/Static) and find_package(IXML COMPONENTS Shared/Static) support. - Add UPNP_ENABLE_DEBUG CMake option; expose UPNP_HAVE_DEBUG in upnpconfig.h. - Issue #423: Replace select()/FD_SET() with poll() to fix FD_SET overflow on fd >= FD_SETSIZE (Windows keeps select()). - Issue #435: GENA: cap MaxSubscriptions per service to prevent subscription flooding; reject oversized Callback headers to prevent memory exhaustion. - Issue #434: Miniserver: disable Nagle algorithm on accepted TCP sockets. - Issue #395: Remove MSG_DONTROUTE from send() in sock_read_write(). - Issue #394: Reject oversized HTTP POST body before buffering. - Issue #379: Accept RFC 1918 cross-subnet delivery URLs in GENA subscriptions. - Issue #365: Export UpnpCloseLog and UpnpGetDebugFile from shared library. - Issue #347: Normalize HTTP response header names to title-case. - Issue #325: Make gMServState _Atomic to eliminate pre-existing data races. - Issue #272: Fix logging to stderr without user setup. - Issue #247: Prevent gIF_NAME corruption on failed UpnpGetIfInfo. - Issue #227: Bind SSDP sockets to selected interface address. - Issue #195: Make IPv6 bind failure non-fatal when IPv4 is available; clear stale gIF_IPV6 in UpnpGetIfInfo before scanning. - Issue #153: Reset gAliasDoc after last alias_release to prevent use-after-free. - PR #598: Fix IN6_IS_ADDR_GLOBAL macro to accept all 2000::/3 addresses. - Fix: Move web_server_destroy() after ThreadPoolShutdown() in UpnpFinish(). - Fix: Miniserver: fix socket and connection leak on sock_init_with_ip failure. - Fix: upnpdebug.c: Fix UB and null-pointer dereference in UpnpInitLog error path. - Fix: Prevent dangling pointer in CIfaddr4::set() by storing ifname as member. - Fix: Allow explicitly-named non-multicast interfaces in UpnpGetIfInfo. - Fix: ixmlparser.c: Fix typos and rename LETTERTABLESIZE to LETTER_TABLE_SIZE. - Fix: Guard GCC diagnostic pragmas with #if defined(__GNUC__). - Fix: Cast bufsize and byte_left to int for SSL_read/SSL_write calls. - Fix: Use INET6_ADDRSTRLEN for host buffer in getNumericHostRedirection. - Fix: Preserve UPNP_E_INTERNAL_ERROR for initial buffer check in miniserver. - Fix: Use bounded strlcpy/snprintf in tv_device.c sample. - ThreadPool: Suppress repeated "too many jobs" log spam. ******************************************************************************* Version 1.18.5 ******************************************************************************* - Fix for CVE-2026-41682 ******************************************************************************* Version 1.18.4 ******************************************************************************* - PR #537: CMake: Fix exports. Fixes: #536. - PR #539: ssdp_device.c: SO_REUSEPORT only exists from kernel 3.9 on. Fixes #538. ******************************************************************************* Version 1.18.3 ******************************************************************************* - PR #536: tarball: Fix for missing files and test compilation - Fix #535: 1.18.2: cmake builds fail ******************************************************************************* Version 1.18.2 ******************************************************************************* - PR #533: Properly handle read error ******************************************************************************* Version 1.18.1 ******************************************************************************* - Fix #529: LNK2019 on MSVC when build with UPNP_ENABLE_WEBSERVER=OFF - Fix #517: Crash when mixing ns and non-ns attributes during freeing ******************************************************************************* Version 1.18.0 ******************************************************************************* - Reapply 25d4bd0b introducing an API change. ******************************************************************************* Version 1.16.0 ******************************************************************************* - Cancelled. ******************************************************************************* Version 1.14.30 ******************************************************************************* - Revert 25d4bd0b which introduced an API change. ******************************************************************************* Version 1.14.29 ******************************************************************************* - CMake builds from the tarball now work. ******************************************************************************* Version 1.14.28 ******************************************************************************* - Hopefully we have SONAMEs right for CMake builds now. ******************************************************************************* Version 1.14.27 ******************************************************************************* - Fix OmniOS build when using POSIX compliant asctime_r by @mill1000 in #522 - remove asctime_r and gmtime_r by @neheb in #523 - cmake: link to libnsl and libsocket for SunOS by @neheb in #524 ******************************************************************************* Version 1.14.26 ******************************************************************************* - bugfix-skip-init-on-VPN-adaptors by @ss1969 in #500 - readFromSSDPSocket: Don't return error when sockets receive zero length packet by @mill1000 in #501 - Fix warning on Mac compilation by @mrjimenez in #503 - shutdown sockets in finish routine by @ss1969 in #504 - Fix segfault on ixml, thanks to Harrison Green (hgarrereyn) #506 - Crash in ixml element set attribute node ns by @mrjimenez in #507 - Add another test to ixml by @mrjimenez in #509 - fix and add omnios CI by @neheb in #511 - cmake: add missing file in Windows compilation by @robUx4 in #518 ******************************************************************************* Version 1.14.25 ******************************************************************************* - Handle multiple results of getaddrinfo by @KarlStraussberger in #496 - Tweak ssdp_device by @KarlStraussberger in #497 ******************************************************************************* Version 1.14.24 ******************************************************************************* 2025-06-11 Marcelo Roberto Jimenez Fix possible close() on non-initialized socket. 2025-06-11 Benjamin Gilbert ssdp_device.c: Fix missing casts in setsockopt() Windows thinks argument 4 of setsockopt() is a const char *. Add casts to avoid build errors with GCC. Fixes: 52cb6b52d2 ("ssdp_device.c: Bind SSDP UDP response to 1900") ******************************************************************************* Version 1.14.23 ******************************************************************************* 2025-06-07 Ryan C. Underwood Improve SSDP initialization and error handling (#486) It was possible for some uninitialized garbage to cause getaddrinfo() to fail on glibc 2.41, which would crash the client program. Instead, zero the whole struct, and gracefully handle getaddrinfo() failures. ******************************************************************************* Version 1.14.22 ******************************************************************************* 2025-06-02 KarlStraussberger Fix broken compilation on Alpine 3.21 / gcc-14.2 ******************************************************************************* Version 1.14.21 ******************************************************************************* 2025-01-23 LutzenH Fix subs not working on Windows due to missing netmask 2024-11-21 Marcelo Roberto Jimenez - Lots of IXML fuzzer fixes - ssdp_device.c: Bind SSDP UDP response to 1900 ******************************************************************************* Version 1.14.20 ******************************************************************************* 2024-10-03 Vollstrecker - ixml has its own version 2024-07-09 Karlchen - Add CORS header to avoid browser warnings - Add new API call - Add internal function - Implement setting allow-origin in header - Implement new API call - Headers do not have to be quoted - Allow setting MaxJobsTotal for ThreadPools 2024-06-29 Rosen Penev - fix formats under newer newer MSVC - fix 32-bit format warnings 2024-04-25 Marcelo Roberto Jimenez - Fixes broken cmake regex - Fixes cmake redefinition warnings ******************************************************************************* Version 1.14.19 ******************************************************************************* 2024-04-22 Steve Lhomme - disable fseeko usage on 32-bit Android older than API 24 feesko is not supported on 32-bit Android older than API 24 [1]. Older SDKs would allow the call but the 64-bit off_t was not accurate. With the NDK26 the call is hidden in that case and calling fseeko() results in a compilation error. [1] https://android.googlesource.com/platform/bionic/+/main/docs/32-bit-abi.md 2023-09-16 Marcelo Roberto Jimenez - Fixed memory allocation in `tv_device.c::TvDeviceSetContrast()`. 2023-08-31 Marcelo Roberto Jimenez - Updated some old AX macro files to fix bootstrap messages. ******************************************************************************* Version 1.14.18 ******************************************************************************* 2023-06-29 Thomas Guillem miniserver: fix busy loop on socket error In case of a socket error, the socket was not removed from the select pool, causing future select() calls to return immediately, and readFromSSDPSocket() to be called just after on the failing socket. This was causing a high CPU load. ******************************************************************************* Version 1.14.17 ******************************************************************************* 2023-04-30 Marcelo Roberto Jimenez Include fuzzer and gtest in the tarball. ******************************************************************************* Version 1.14.16 ******************************************************************************* 2023-03-19 philippe44 Fix memory leak and ActionExAsync (#426) This intends to fix #424. I've found at least 2 memory leaks 1- When sending Action(Ex)Async The ActionRequest document was not released nor was the ActionResult. I initially thought that this should be done in UpnpActionComplete::UpnpActionComplete_delete() but I was wrong because ActionRequest and ActionResult do not "belong" to the Evt object. The sets methods only set a pointer and modifying generator.c is not the right solution. The reason is that ActionRequest "belongs" to the ACTION job and should be handled as such if we want as well that, when the job is cancelled, the memory is released as well. So I've change the free_func for ACTION to reflect that. 2- When using event subscription The Event was not released upon Timer termination. So I've done as above, created a special free_func that handles that properly. In general, when something prevents the execution/submission of a job, I've also used the actual free function instead of duplicating the individual free(). Note that when terminating a timer, I'm using the job's internal structure free_func() as it was already used to access arg. One can argue that it should be an opaque structure and get/set or the option to call the free function could be use instead. Also, I realized that ActionExAsync has never been working properly because when the job is executed, only an Action is made, never an ActionEx although the Header document is in the job's argument. I've fixed that as well and stopped there to not go too deep in that rabbit hole. I've also removed the upnp_timeout.c/h files as they were not used anymore (and had a strange names anyway) 2023-01-04 Thoren Paulson Handle redundant initialization 2022-12-22 Thoren Paulson Clean up after failed initialization. Some initialization failures (such as failure in UpnpGetIfInfo) would leave resources like thread pools initialized. This change ensures if UpnpInit2 fails, we call UpnpFinish before returning to clean up those resources. To ensure UpnpFinish is effective in this way, we set UpnpSdkInit to 1 earlier in UpnpInit2. ******************************************************************************* Version 1.14.15 ******************************************************************************* 2022-11-18 Marcelo Roberto Jimenez Fix for missing CMake files in the autotools distro. ******************************************************************************* Version 1.14.14 ******************************************************************************* 2022-09-27 philippe44 don't use strxxx_s on Windows The use of these fails as 2nd argument is the same as 4th argument. Reading the cpp_reference definitions of these, it can't be right. 2022-09-20 Rex Cheung <93339127+rexcheung21(at)users.noreply.github.com> Fix #412 Skip leading UTF-8 BOM in XML document 2022-08-04 Hugo BeauzÊe-Luyssen ThreadPool: Fix non UCRT builds ******************************************************************************* Version 1.14.13 ******************************************************************************* 2021-04-28 Hugo BeauzÊe-Luyssen http: RecvMessage: Fix potential allocation failure If for whatever reason the server replies without maxing out the buffer, the code would end up doubling the buffer size nonetheless, which can quickly cause malloc to fail, once we try to allocate 2^30 or more bytes This was especially noticeable for large results. Reported as https://code.videolan.org/videolan/vlc/-/issues/27173 ******************************************************************************* Version 1.14.12 ******************************************************************************* 2021-04-28 Stephen Anthony Jones Fixes double free caused by closing a file pointer twice. 2021-09-25 Vollstrecker More soname fixes. ******************************************************************************* Version 1.14.11 ******************************************************************************* 2021-08-20 Vollstrecker More soname fixes. ******************************************************************************* Version 1.14.10 ******************************************************************************* 2021-08-17 Vollstrecker Fixes cmake build soname. ******************************************************************************* Version 1.14.9 ******************************************************************************* 2021-08-08 Marcelo Roberto Jimenez Fixes library soname. ******************************************************************************* Version 1.14.8 ******************************************************************************* 2021-08-02 Marcelo Roberto Jimenez Removes references to deprecated pthread_mutexattr_{g,s}etkind_np ******************************************************************************* Version 1.14.7 ******************************************************************************* 2021-05-08 Marcelo Roberto Jimenez Fixes broken windows build. ******************************************************************************* Version 1.14.6 ******************************************************************************* 2021-04-19 Marcelo Roberto Jimenez Fix for a DNS Rebind exploit. A special thanks for the collaboration of the following people: - Alaric Senat - Fabrice Fontaine - Gabriel Corona - Ian Whyman - Jean-Francois Dockes - Marvin Scholz - Werner Mahr 2021-04-06 Marcelo Roberto Jimenez Fix for Github #250: When upnp uses ixml to parse SOAP messages which contains too many node, services are unavailable. ******************************************************************************* Version 1.14.5 ******************************************************************************* 2021-04-06 Marcelo Roberto Jimenez Avoid potential memory leak in http_SendMessage() 2021-04-06 Marcelo Roberto Jimenez Get rid of alloca()'s. 2021-04-05 Marcelo Roberto Jimenez Non-recursive version of ixmlNode_free() avoids stack overflow attack. Fixes CVE-2021-28302. ******************************************************************************* Version 1.14.4 ******************************************************************************* 2021-03-29 Marcelo Roberto Jimenez Add more missing CMake infrastructure to the tarball. ******************************************************************************* Version 1.14.3 ******************************************************************************* 2021-03-29 Marcelo Roberto Jimenez Add CMake infrastructure to the tarball. 2021-03-13 Marcelo Roberto Jimenez Fix for gena leak. ******************************************************************************* Version 1.14.2 ******************************************************************************* 2021-02-17 Jim Broadus upnpapi.c: Fix crash in UpnpGetIfInfo Per getifaddrs documentation, the ifa_addr field of an ifaddrs structure can be null. In a real world example, an entry may be provided for the non-existent hardware address of a tunnel device. This behavior was observed with the netlink based getifaddrs implementation in glibc. 2021-02-17 Karlchen Handle interfaces without address I got a crash on gerbera startup because at least one interface did not have `ifa_addr` set. The reason is quite simple: they are the physical interfaces which are part of my channel ``` 2: eth1: mtu 1500 qdisc fq_codel master bond0 state UP group default qlen 1000 link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff 3: eth0: mtu 1500 qdisc fq_codel master bond0 state UP group default qlen 1000 link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff 4: bond0: mtu 1500 qdisc noqueue state UP group default qlen 1000 link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff ``` 2021-02-14 Vollstrecker CMake: - Fix tests for all occasions. (Hopefully) - Set right so-version and don't yell commands. Fixes #231 - Reverted libname-change till decided 2021-02-09 Fabrice Fontaine Fix IPv6 GENA subscription Use LOCAL_PORT_V6_ULA_GUA or LOCAL_PORT_V6 depending on the IPv6 address 2021-02-08 Fabrice Fontaine samples: allow the user to specify the control point interface This is useful to test UPnP on specific interface (e.g. IPv6-only). This was already possible on the device sample. 2021-02-08 Fabrice Fontaine upnp/src/api/upnpapi.c: don't set gIF_IPV4 if there is no IPv4 Don't set gIF_IPV4 if no IPv4 is found to keep the default value of '\0' otherwise SSDP will try to register IPv4 multicast with address 0.0.0.0 which will result in a runtime failure ******************************************************************************* Version 1.14.1 ******************************************************************************* 2021-02-05 Ian Whyman CMake Github Actions, including windows build. 2021-02-05 Fabrice Fontaine upnpapi.c: assume that getifaddrs is available Assume that getifaddrs is available even if it is not POSIX-compliant, this will simplify the code and, as a side effect, this allow pupnp to work on an interface that does not have an IPv4 address. 2020-12-09 Vollstrecker CMake support. 2020-11-30 Marcelo Jimenez GitHub #203 by Vollstrecker, part 2. Fixes the inclusion of alloca.h in WIN32. 2020-11-30 Marcelo Jimenez GitHub #203 by Vollstrecker, part 1. Remove the now unused file ClientSubscription.c. 2020-11-09 Thomas Mitterfellner Remove port >= 49152 restriction. ******************************************************************************* Version 1.14.0 ******************************************************************************* 2020-07-19 Marcelo Jimenez Reworked the miniserver code to deal with SO_REUSEADDR Factored the common socket code and test for EADDRINUSE returning from listen() when SO_REUSEADDR is turned on. 2020-06-17 Marcelo Jimenez Removed template classes. The files generated through template classes had some drawbacks: 1 - You could not read the code. 2 - You could not step through the code with a debugger. 3 - Doxygen was unable to document it. This patch removes the templates and creates an auto generator for these boilerplate generated code in the same spirit of the templates, but solves the above problems. Still, dealing with documentation still needs some work, but should be much easier now. 2020-06-11 Fabrice Fontaine upnpapi.c: retrieve gIF_IPV4_NETMASK with BSD GitHub #183 BSD is using getifaddrs, update the code to retrieve the IPv4 netmask (used in the CallStranger fix) Signed-off-by: Fabrice Fontaine fontaine.fabrice@gmail.com 2020-06-09 Fabrice Fontaine Drop UpnpInit GitHub #182 This function is deprecated since a long time moreover it is vulnerable to CallStranger a.k.a. CVE-2020-12695 and can't be fixed without breaking the API as HostIP only allows the user to pass an IP address and not a netmask. If we want to discover the netmask from the HostIP provided in UPnPInit, we'll have to loop through all the available interfaces to find the interface with the given IP address to finally retrieve the netmask. This is a lot of work/modification for a deprecated function. Moreover, in the end UPnPInit will be like a "deprecated" (i.e. IPv4-only) version of UPnPInit2. So it is time to remove this deprecated function. As a result, also remove getlocalhostname and DEFAULT_INTERFACE which are not needed anymore and replace UpnpInit by UpnpInit2 in comments. Signed-off-by: Fabrice Fontaine fontaine.fabrice@gmail.com 2020-06-09 Fabrice Fontaine Partial fix for CallStranger on IPv4 GitHub #181 This is a partial fix for CallStranger a.k.a. CVE-2020-12695 Check that DeliveryURLs are in the expected network segment as requested by the new UPnP UDA: https://openconnectivity.org/upnp-specs/UPnP-arch-DeviceArchitecture-v2.0-20200417.pdf. Here is an extract of the new requirement: The subscription request containing a delivery URL not on the same network segment as the fully qualified event subscription URL shall not be accepted. For private networks this means that the delivery URL provided will adhere to the following IP ranges: . 10.0.0.0 - 10.255.255.255 (10/8 prefix) . 172.16.0.0 - 172.31.255.255 (172.16/12 prefix) . 192.168.0.0 - 192.168.255.255 (192.168/16 prefix) In the context of pupnp, this means that the IPv4 netmask is now retrieved when using UPnPInit2. Then, each DeliveryURL is checked against the device's IPv4 address and netmask. If one of them are not compliant, the whole subscription is rejected. This first commit should be enhanced / updated to: . remove UPnPInit (it is deprecated for a long time) or update it so . the user can also pass the netmask . fix IPv6 . fix Windows code . retrieve the netmask in the BSD code of UPnPInit2 Signed-off-by: Fabrice Fontaine fontaine.fabrice@gmail.com 2020-06-04 Patrik Lantz pjlantz(at)github Fixes #177 NULL pointer dereference in FindServiceControlURLPath ******************************************************************************* Version 1.12.1 ******************************************************************************* 2020-04-03 Rene Nielsen setsockopt(IP_MULTICAST_IF) fails on 64-bit CPUs 2020-04-03 Rosen Penev GitHub PR #164 Do not use usleep when using newer POSIX C source. usleep is deprecated and is optionally unavailable with uClibc-ng. 2020-03-29 pamapa GitHub PR #162 Add Os/UserAgent information to UpnpActionRequest and UpnpFileInfo 2020-03-28 pamapa GitHub PR #161 Add CtrlPtIPAddr to UpnpFileInfo class 2020-01-27 Ian Whyman GitHub PR #160 List: Add extern C for C++ users ******************************************************************************* Version 1.12.0 ******************************************************************************* 2020-01-22 Stephen Bash Reduce spurious HTTP 416 errors due to ill-defined bytes header I (re)discovered this behavior trying to use the Gerbera media server with Chromecast (built in to my Vizio P55-F1 TV). Chromecast specifies "bytes:0-" with no end range, which caused pupnp to return RANGE_NOT_SATISFIABLE. Jin, the author of MediaTomb, of which Gerbera is a continuation, fixed this in 2007 in MediaTomb's fork of pupnp, see gerbera@ccd7994d45 "made sure that range requests specified as "bytes=0-" do not trigger...", but never passed the fix upstream. When restarted as Gerbera, pupnp was removed from the local tree in favor of using the upstream version, and the patch was lost which lead to me rediscovering it recently. This is Jin's original patch applied to pupnp 1.8. This teaches pupnp to ignore the bytes header if it matches "0-" and return HTTP_OK. 2020-01-22 Marcelo Jimenez GitHub issue #157 When building v1.8.6 (on GNU/Linux) with --disable-device, pupnp doesn't build: /bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I../upnp/inc -I./inc -I../ixml/inc -DNDEBUG -I./src/inc -I./src/threadutil -I/foo/contrib/x86_64-linux-gnu/include -fPIC -pthread -I/foo/contrib/x86_64-linux-gnu/include -DNDEBUG=1 -O3 -DUPNP_STATIC_LIB -Os -Wall -c -o src/genlib/util/libupnp_la-util.lo `test -f 'src/genlib/util/util.c' || echo './'`src/genlib/util/util.c In file included from src/genlib/miniserver/miniserver.c:58:0: ./src/inc/upnpapi.h:208:2: error: unknown type name 'service_info' service_info **serv_info ^~~~~~~~~~~~ This patch fixes compilation for the --disable-device case. 2019-11-20 ePirat Marvin Scholz GitHub PRs: #150: Remove unused files #149: UpnpEnableWebserver: Error correctly when web server compiled-out #148: CI: Remove .travis.yml #147: Remove TRUE/FALSE defines and BOOL typedef #146: CI: Add address sanitizer and leak sanitizer enabled test run #145: Add list test #144: Add -Wextra and -Wpedantic to get more warnings #143: More warning fixes #142: Doxygen changes #141: Remove unused headers #140: Remove IN, OUT and INOUT defines #139: Remove unused defines in uri.h #138: Use stdbool.h instead of BOOL typedef and defines #137: Various compiler warning fixes #136: configure.ac: Fix Windows detection #135: configure.ac: Enable silent rules #134: LinkedList: Simplify _WIN32 check #133: Remove checks of __OSX__ define #132: Add Github Actions based CI 2019-12-03 Jean-Francois Dockes Github PR #130: Add forgotten Windows dll export qualifiers 2019-12-01 Jean-Francois Dockes Github PR #129: Remove and replace the list.h file 2019-11-20 ePirat Marvin Scholz Github PRs: #128: Overhaul list.h to fix various issues #127: Use rand_s in get_random_info on Windows #126: Do not redeclare timezone struct if already defined in Mingw #125: Fix interface filtering for Windows - The mentioned fix is not only needed for MSVC, but when cross-compiling for Windows with mingw-w64 too. #124: config.h: Remove DEBUG_TARGET - The DEBUG_TARGET is no longer used, it was previously used in upnpdebug.c to disable logging to a file, which now is done by just not calling UpnpSetLogFileNames. #123: Check for -lpthread too - Updates pthread m4 check from upstream ******************************************************************************* Version 1.10.1 ******************************************************************************* 2019-11-20 Marcelo Jimenez Forward port of Karlchen's github #122 Fix format string for ExtraHeaders ******************************************************************************* Version 1.10.0 ******************************************************************************* 2019-07-19 Marcelo Jimenez Fix sed command for upnp patch in configure.ac 2019-04-03 Marcelo Jimenez Proper allocation for an array of structs and a check for an unlikely overflow when calling the SIOCGIFCONF ioctl(). It still bugs me the stack requirements of getlocalhostname() and UpnpGetIfInfo(). ******************************************************************************* Version 1.8.6 ******************************************************************************* 2019-11-20 Karl Straussberger (Karlchen@github) Fix format string for ExtraHeaders #122 ******************************************************************************* Version 1.8.5 ******************************************************************************* 2019-07-18 Marcelo Jimenez Fixed a wrong ifdef in ssdp_device.c that was causing problems with ipv6. Thanks to BraneDev @ Github ******************************************************************************* Version 1.8.4 ******************************************************************************* 2017-11-17 Marcelo Jimenez GitHub #57 - 1.8.3 broke ABI without changing SONAME Opened by jcowgill This change in 1.8.3 broke the ABI and therefore the SONAME should have been changed (ie: age reset to 0): EXPORT_SPEC int UpnpAddVirtualDir( /*! [in] The name of the new directory mapping to add. */ - const char *dirName); + const char *dirName, + /*! [in] The cookie to associated with this virtual directory */ + const void *cookie, + /*! [out] The cookie previously associated, if mapping is already present */ + const void **oldcookie); If only the cookie argument was added, you could probably get away with this because all that would happen is that a garbage value is passed around without being used. With the addition of oldcookie, any old programs will not initialize this value and will probably segfault when libupnp tries to write to it. ******************************************************************************* Version 1.8.3 ******************************************************************************* 2017-09-07 Dave Overton Add user data/cookie to virtualDir callbacks As with the main Device APIs (UpnpRegisterRootDevice etc), it is useful to have a user data/cookie pointer returned with each callback. This patch allows one cookie per registered path which enables a variety of functionality in client apps. 2017-09-03 Uwe Kleine-KÃļnig Fix large file system support libupnp uses large file support (if available). If a program linking to libupnp does not however it creates mismatches in call frames. See Issue #51 for the results. This simplifies LFS support by using AC_SYS_LARGEFILE_SENSITIVE instead of manually defining _LARGE_FILE_SOURCE and _FILE_OFFSET_BITS (which is useless on architectures where the size of off_t is fixed). Furthermore additional logic is introduced to catch a library user without 64 bit wide off_t on such a platform. upnp.h also makes use of off_t, but as this file includes FileInfo.h, the latter is the single right place for this check. This fixes #52 which is a generalized variant of #51. 2017-08-19 Uwe Kleine-KÃļnig configure.ac: Drop copying of include files The comment suggests this is for windows compilation. It should be easily possible to add the source directory as an include path to the windows compiler, too, so drop this. (Otherwise this should better be done using AC_CONFIG_COMMANDS.) 2017-09-03 Uwe Kleine-KÃļnig Let source code use autoconfig.h not the public upnpconfig.h The former is the one supposed to be used for internal code. upnpconfig.h is only for public stuff. 2017-08-19 Uwe Kleine-KÃļnig configure.ac: Fix typo s/optionnal/optional/ 2017-08-08 Marcelo Jimenez Fix broken samples when configured with --disable-ipv6. ******************************************************************************* Version 1.8.2 ******************************************************************************* 2017-07-24 Michael Osipov Initialize in_addr and in6_addr to avoid garbage output if never written If any of the address families isn't available in UpnpGetIfInfo(), especially IPv6, always init both structs with zero to avoid garbage output with inet_ntop() to gIF_IPV4 and gIF_IPV6. See v00d00/gerbera#112 (https://github.com/v00d00/gerbera/issues/112) for consequences: bind for IPv6 will fail. 2013-10-28 Vladimir Fedoseev Attached patch allows to register multiple clients from single app. 2014-11-14 Philippe Hi - I recently compiled libupnp on C++ Builder XE7 and had to do a few changes to make it work. In case this helps, I've generated a small patch file. 2015-04-30 Hugo BeauzÊe-Luyssen When building using a strict mode (-std=c++11 instead of -std=gnu++11, for instance), the WIN32 macro isn't defined. The attached patch fixes it by using _WIN32 instead. 2015-02-06 Jean-Francois Dockes Queue events on their subscription object instead of adding them to the thread pool immediately. Events destined for a non-responding control point would flood the thread pool and prevent correct dispatching to other clients, sometimes to the point of disabling the device. Events are now queued without allocating thread resources and properly discarded when a client is not accepting them. 2015-02-03 Jean-Francois Dockes genaInitNotify()/genaInitNotifyExt() and genaNotifyAll()/genaNotifyAllExt() are relatively complicated methods which only differ by the format of an input parameter. This update extracts the common code for easier maintenance, esp. relating to the queueing modifications to follow. ******************************************************************************* Version 1.8.1 ******************************************************************************* 2017-04-26 Marcelo Jimenez Fix some compiler warning messages on md5.c 2017-03-07 Fabrice Fontaine Enable IPv6 by default 2017-03-07 Fabrice Fontaine Move threadutil source code to libupnp With this patch, threadutil library is removed as the only public header that has been kept in 1.8.x is ithread.h which is mainly a wrapper to pthread with inline functions. threadutil source code will now be a part of libupnp library. ******************************************************************************* Version 1.8.0 ******************************************************************************* 2014-01-15 Peng Fix memory leaks. 2013-04-27 Thijs Schreijer Renamed SCRIPTSUPPORT to IXML_HAVE_SCRIPTSUPPORT for consistency. Also updated autoconfig and automake files, so it also works on non-windows. Option is enabled by default, because it adds an element to the node structure. Not using an available field is better than accidentally using an unavailable field. 2012-07-11 Thijs Schreijer Changed param to const UpnpAcceptSubscriptionExt() for consistency 2012-06-07 Thijs Schreijer updated ixmlDocument_createAttributeEx() and ixmlDocument_createAttribute() to use parameter DOMString instead of char * (same but now consistent) 2012-05-06 Thijs Schreijer Added script support (directive SCRIPTSUPPORT) for better support of garbage collected script languages. The node element gets a custom tag through ixmlNode_setCTag() and ixmlNode_getCTag(). And a callback upon releasing the node resources can be set using ixmlSetBeforeFree() See updated readme for usage. 2012-03-24 Fabrice Fontaine SF Bug Tracker id 3510595 - UpnpDownloadXmlDoc : can't get the file Submitted: Marco Virgulti ( mvirg83 ) - 2012-03-23 10:08:08 PDT There is a problem, perhaps, during downloading a document by UpnpDownloadXmlDoc. During debugging i've found that in an not exported api (unfortunately i forgot the code line...) where it is set a local variable "int timeout" to -1 then passed directly to another function for sending data through tcp socket. I patched this setting it to 0 (there is an IF section that exits if timeout < 0). It is normal behavior or it is a bug? 2012-03-08 Fabrice Fontaine Check for NULL pointer in TemplateSource.h calloc can return NULL so check for NULL pointer in CLASS##_new and CLASS##_dup. 2012-03-08 Fabrice Fontaine Replace strcpy with strncpy in get_hoststr Replace strcpy with strncpy to avoid buffer overflow. 2012-03-08 Fabrice Fontaine Memory leak fix in handle_query_variable variable was never freed. 2011-02-07 Chandra Penke Add HTTPS support using OpenSSL. HTTPS support is optional and can be enabled by passing the --enable-open-ssl argument to the configure script. The following methods are introduced to the public API: UpnpInitOpenSslContext When enabled, HTTPS can be used by using "https://" instead of "http://" when passing URLs to the HTTP Client API. 2011-02-07 Chandra Penke Refactor HTTP Client API to be more generic. The following features are added: - Support for persistent HTTP connections (reusing HTTP connections). This is still a work in progress and relies on applications to interpret the 'Connection' header appropriately. - Support for specifying request headers when making requests. Useful for interacting with web services that require custom headers. - Support for retrieving response headers (this is a API only change, some more work needs to be done to implement the actual functionality. Specifically copy_msg_headers in httpreadwrite.c needs to be implemented) - Common API for all HTTP methods. - Support for PUT, and DELETE methods. The following methods are introduced to the public HTTP Client API UpnpOpenHttpConnection, UpnpCloseHttpConnection, UpnpMakeHttpRequest, UpnpWriteHttpRequest, UpnpEndHttpRequest, UpnpGetHttpResponse, UpnpReadHttpResponse. Removed a lot of duplicate code in httpreadwrite.c 2011-01-17 Chandra Penke Include upnpconfig.h in FileInfo.h to automatically include large file macros 2011-01-17 Chandra Penke Fix for warnings Apple systems related to macros defined in list.h. In list.h, in apple systems, undefine the macros prior to defining them. 2011-01-16 Marcelo Jimenez Fix for UpnpFileInfo_get_LastModified() in http_MakeMessage(). UpnpFileInfo_get_LastModified() returns time_t, and http_MakeMessage() takes a "time_t *". Thanks to Chandra Penke for pointing the bug. 2010-11-22 Marcelo Jimenez Template object for ssdp_ResultData. 2010-11-10 Fabrice Fontaine Support for "polling" select in sock_read_write. Currently, in sock_read_write function, if the timeout is 0, pupnp realizes a "blocking" select (with an infinite timeout). With this patch, if timeout is set to 0, pupnp will realize a "polling" select and returns immediately if it can not read or write on the socket. This is very useful for GENA notifications when pupnp is trying to send events to a disconnected Control Point. "Blocking" select can now be done by putting a negative timeout value. 2010-09-18 Chandra Penke This is a minor build fix. The new Template*.h files added in the latest code need to be exported. Patch against the latest sources is attached. 2010-08-22 Marcelo Jimenez * upnp/src/api/Discovery.c: Fix a serious bug and memory leak in UpnpDiscovery_strcpy_DeviceType(). Thanks to David Blanchet for the patch. 2010-04-25 Marcelo Jimenez Separation of the ClientSubscription object. 2010-04-24 Marcelo Jimenez Protect the object destructors against null pointers on deletion, which should be something valid. 2010-03-27 Marcelo Jimenez SF Patch Tracker [ 2987390 ] upnp_debug vs. ixml_debug Thanks for the load of updates, I'm still assimilating them ! Could I make a suggestion though? The addition of printNodes(IXML_Node) to upnpdebug a dds a new dependency on ixml.h for anything using upnpdebug.h. I'm making quite a bit of use of upnpdebug in porting things to version 1.8.0, and I'd prefer it if printNodes could be added to ixmldebug.h instead. I'm attach ing a patch, what do you think ? Nick 2010-03-27 Marcelo Jimenez * Forward port of svn revision 505: SF Patch Tracker [ 2836704 ] Patch for Solaris10 compilation and usage. Submitted By: zephyrus ( zephyrus00jp ) 2010-03-20 Marcelo Jimenez * SF Patch Tracker [ 2969188 ] 1.8.0: patch for FreeBSD compilation Submitted By: Nick Leverton (leveret) Fix the order of header inclusion for FreeBSD. 2010-03-20 Marcelo Jimenez * Forward port of svn revision 502: SF Patch Tracker [ 2836704 ] Search for nested serviceList (not stopping at the first lis Submitted By: zephyrus ( zephyrus00jp ) Internet Gateway Device description contains nested serviceList (rootdevice -> servicelist, subdevice and subdevice has the lower-level serviceList, etc..) Unfortunately, the sample code sample_util.c used by tv_device sample, etc. has a code that looks for only the first top-level serviceList. This results in the failure to read all the services of an IGD xml description. Attached patch modifies this behavior and looks for the service by visiting all the serviceList in xml document in turn. With the modified patch (ad additional modification), I could simulate an IGD device and created a modified control program for that. Patch against 1.6.6 TIA. 2010-03-20 Marcelo Jimenez * SF Patch Tracker [ 2973319 ] Problem in commit 499 Submitted By: Nick Leverton (leveret) Afraid that this doesn't compile, it seems retval should be retVal in two places. 2010-03-16 Marcelo Jimenez * Fix for the ithread_mutex_unlock() logic in UpnpInit(). Thanks for Nicholas Kraft. 2010-03-15 Marcelo Jimenez * SF Patch Tracker [ 2962606 ] Autorenewal errors: invalid SID, too-short renewal interval Submitted By: Nick Leverton (leveret) Auto-renewals send an invalid SID due to a missing UpnpString_get_String call. They also send a renewal interval of 0 instead of copying it from the original subscription. 2010-03-15 Marcelo Jimenez * SF Patch Tracker [ 2964685 ] patch for avoiding inet_ntoa (1.8.0) Submitted By: Nick Leverton (leveret) Seems like SF's tracker won't let me add a patch to someone else's issue ?! This refers to https://sourceforge.net/support/tracker.php?aid=2724578 The calls to inet_ntoa are in getlocalhostname(), which is called from UpnpInit when it is returning the bound IP address. UpnpInit/getlocalhostname hasn't been updated to IPv6, I presume this is deliberate so that it doesn't start returning IPv6 addresses and overwriting the caller's IPv4-sized allocation. The attached patch just updates getlocalhostname to use inet_ntop instead of inet_ntoa, and also documents the fact that UpnpInit is IPv4 only whilst UpnpInnit2 is both IPv4 and IPv6. A fuller solution might be to change UpnpInit to use some variant on UpnpGetIfInfo. UpnpInit could still be left as IPv4 only if desired - perhaps UpnpGetIfInfo could take an option for the desired address family. getlocalhostname and its own copy of the interface scanning code would then be redundant. I don't have IPv6 capability here though so I'm reluctant to change the IPv6 code, as I have no way to test it. 2010-03-15 Marcelo Jimenez * SF Patch Tracker [ 2724578 ] patch for avoiding memory leaks when add devices each time a device been added, UpnpInit() is called, on exit, UpnpFinish() is called, but the memories allocated by ThreadPoolInit() may lost because there's no code to call ThreadPoolShutdown() to release the memories. And inet_ntoa() is not thread safe, so in my patch, I substitute inet_ntoa() with inet_ntop(). 2010-03-14 Marcelo Jimenez * SF Patch Tracker [ 2964687 ] Add new string based accessors to upnp object API As per email to pupnp-devel, this is the patch to add the _strget_ accessors for string-like objects in the interface. Will add a further patch shortly to update the sample programs. 2008-06-27 Marcelo Jimenez * Nicholas Kraft's patch to fix some IPv6 copy/paste issues. He reported to be getting infinite loops with the svn code. 2008-06-13 Marcelo Jimenez * SF Bug Tracker [ 1984541 ] ixmlDocumentToString does not render the namespace tag. Submitted By: Beliveau - belivo Undoing the patch that fixed this problem. In fact, there was no problem and the patch was wrong. 2008-06-11 Marcelo Jimenez * Ingo Hofmann's patch for "Content-Type in Subscription responses". Adds charset="utf-8" attribute to the CONTENT-TYPE header line. Hi, I have found an inconsistency regarding the text/xml content-type returned by libupnp. It looks like only subscription responses send "text/xml" where all other messages contain "text/xml; charset="utf-8"". Since I'm working on an DLNA device the latter behavior is mandatory. I changed the according lines in gena_device.c (see attached patch). I'm not sure if it would be ok for other device to have the charset field but it would help me a lot :) Best regards, Ingo 2008-06-04 Marcelo Jimenez * SF Bug Tracker [ 1984541 ] ixmlDocumentToString does not render the namespace tag. Submitted By: Beliveau - belivo The problem occurs when converting a xml document using ixmlDocumentToString containing a namespace tag created with ixmlDocument_createElementNS. The namespace tag doesn't get rendered. example: The following code fragment prints: instead of: Code: #include #include int main() { IXML_Document* wDoc = ixmlDocument_createDocument(); IXML_Element* wRoot = ixmlDocument_createElementNS(wDoc, "urn:schemas-upnp-org:device-1-0", "root"); ixmlNode_appendChild((IXML_Node *)wDoc,(IXML_Node *)wRoot); DOMString wString = ixmlDocumentToString(wDoc); printf(wString); free(wString); ixmlDocument_free(wDoc); return 0; } The problem was in the printing routine, not in the library data structure. 2008-05-31 Marcelo Jimenez * Charles Nepveu's suggestion of not allocating a thread for MiniServer when it is not compiled. 2008-05-24 Marcelo Jimenez * Ported Peter Hartley's patch to compile with mingw. 2008-05-24 Marcelo Jimenez * Added some debug capability to ixml. 2008-05-02 Marcelo Jimenez * Merged Charles Nepveu's IPv6 work. libupnp now is IPv6 enabled. 2008-02-06 Marcelo Jimenez * Breaking API so that we now hide internal data structures. 2008-02-06 Marcelo Jimenez * Rewrote Peter Hartley's patch to include a new extra header field in FileInfo. ******************************************************************************* Version 1.6.22 ******************************************************************************* 2017-07-07 James Cowgill Replace MD5 implementation with public-domain version Currently the RSA MD5 implementation is used. Unfortunately the license has some potential issues: * The license does not explicitly allow distributing derivative works. This was the original argument used in [Debian #459516](https://bugs.debian.org/459516). * The license contains an advertising clause similar to the BSD 4-clause license. This is incompatible with the GPL and if it were enforced, would require RSA to be mentioned by pretty much everyone who uses pupnp. The simple solution is to replace it with a public domain implementation. I've taken OpenBSDs implementation and tweaked it slightly for use by pupnp by: - Adjusting the includes. - Removing the __bounded__ attributes which are specific to OpenBSD. - Using the standard integer types from stdint.h. - Using memset instead of explicit_bzero. 2016-12-16 Peter Pramberger ixml/test/test_document.c is missing the string.h include, therefore the compiler complains about an implicit declaration. ******************************************************************************* Version 1.6.21 ******************************************************************************* 2016-12-16 Gabriel Burca If the error or info log files can not be created, use stderr and stdout instead. 2016-12-08 Uwe Kleine-KÃļnig Fix out-of-bound access in create_url_list() (CVE-2016-8863) If there is an invalid URL in URLS->buf after a valid one, uri_parse is called with out pointing after the allocated memory. As uri_parse writes to *out before returning an error the loop in create_url_list must be stopped early to prevent an out-of-bound access Bug: https://sourceforge.net/p/pupnp/bugs/133/ Bug-CVE: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-8863 Bug-Debian: https://bugs.debian.org/842093 Bug-Redhat: https://bugzilla.redhat.com/show_bug.cgi?id=1388771 2016-11-30 Uwe Kleine-KÃļnig miniserver: fix binding to ipv6 link-local addresses Linux requires to have sin6_scope_id hold the interface id when binding to link-local addresses. This is already in use in other parts of upnp, so portability shouldn't be in the way here. Without this bind(2) fails with errno=EINVAL (although ipv6(7) from man pages 4.08 specifies ENODEV in this case). Fixes: https://bugs.debian.org/813249 2016-09-15 Mathew Garret <(at)mjg59 (twitter)> SF Bug Tracker #132 CVE-2016-6255: write files via POST Submitted by: Balint Reczey in 2016-08-02 From Debian's BTS https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=831857 : From: Salvatore Bonaccorso carnil@debian.org To: Debian Bug Tracking System submit@bugs.debian.org Subject: libupnp: write files via POST Date: Wed, 20 Jul 2016 11:03:34 +0200 Source: libupnp Version: 1:1.6.17-1 Severity: grave Tags: security upstream Justification: user security hole Hi See http://www.openwall.com/lists/oss-security/2016/07/18/13 and https://twitter.com/mjg59/status/755062278513319936 . Proposed fix: https://github.com/mjg59/pupnp-code/commit/be0a01bdb83395d9f3a5ea09c1308a4f1a972cbd Regards, Salvatore From Mathew Garret's commit: Don't allow unhandled POSTs to write to the filesystem by default ******************************************************************************* Version 1.6.20 ******************************************************************************* 2016-02-22 Jean-Francois Dockes SF Bugs #131, Creator: Jean-Francois Dockes I know it sounds crazy that nobody ever saw this, but the CONTENT-LENGTH value in GENA NOTIFY messages is too small by one. It appears that most current control points don't notice the extra character (an LF, which is validly there but not included in Content-Length), probably because their protocol handler is reasonably lenient, and because the missing body LF does not prevent parsing the XML. But there is a least one anal CP (Linn Kazoo) which barfs, because it reads all data until connection close and the size mismatch triggers a bug. "Proof": In gena_device.c:217 (notify_send_and_recv()) ret_code = http_SendMessage(&info, &timeout, "bbb", start_msg.buf, start_msg.length, propertySet, strlen(propertySet), CRLF, strlen(CRLF)); start_msg has all the headers, including the empty line. Content-length should be strlen(propertySet) + strlen(CRLF) (2) In gena_device.c:433 (AllocGenaHeaders()) rc = snprintf(headers, headers_size, "%s%s%"PRIzu"%s%s%s", HEADER_LINE_1, HEADER_LINE_2A, strlen(propertySet) + 1, HEADER_LINE_2B, HEADER_LINE_3, HEADER_LINE_4); HEADER_LINE_2A is "CONTENT-LENGTH: ". The following value should be strlen(propertySet) + 2 2016-01-07 Marcelo Roberto Jimenez Fix for a reported integer overflow 2016-01-07 Jean-Francois Dockes 2016-01-07 Nick Leverton SF Patches #60, Creator: Jean-Francois Dockes When libupnp is configured with --enable-ipv6 but ipv6 is not available on the system (for example because the ipv6 code is not loaded in a Linux kernel as is the case by default on Raspbian), the ipv6 socket creation call will fail in miniserver.c and the library init will fail, even if the ipv4 initialization would have succeeded. Let a library configured with --enable-ipv6 initialize in ipv4-only mode if ipv6 is not available instead of failing. This can happen if no ipv6 code is configured or loaded in the kernel. Don't fail if IPv6 is unavailable. We might be an IPv6 enabled distro build running on an IPv4-only custom kernel. 2016-01-07 Nick Leverton SF Bug Tracker #128, Creator: Nick Leverton redefining strndup causes "error: expected identifier or '(' before '__extension__'" Fix redefinition of strnlen and strndup These are available when HAVE_STRNDUP and HAVE_STRNLEN are defined, but libupnp provides an extern prototype anyway. Recent versions of glibc define this prototype differently, causing the following compile error: src/api/UpnpString.c:47:15: error: expected identifier or '(' before '__extension__' extern char *strndup(__const char *__string, size_t __n); 2016-01-07 Nick Leverton SF Bug Tracker #129, Creator: Nick Leverton shutdown() on UDP sockets logs ENOTCONN message. https://sourceforge.net/p/pupnp/bugs/129/ Fix ENOTCONN "Error in shutdown: Transport endpoint is not connected" When logging is enabled, ssdpserver logs bursts of "Error in shutdown: Transport endpoint is not connected" This is because shutdown() is not supported for UDP sockets and under recent UNIX specifications it returns ENOTCONN if used. 2016-01-07 Nick Leverton SF Bug Tracker #127, Creator: Klaus Fischer Miniserver uses INADDR_ANY instead of HostIP https://sourceforge.net/p/pupnp/bugs/127/ The internal miniserver.c uses INADDR_ANY instead of the HostIP/IfName provided when initializing libupnp. But, this HostIP/IfName gets used for the UDP socket when multicasting SSDP messages. Because of this, miniserver may end up sending from different IP address than ssdpserver. This patch causes miniserver to use the already known interface address. 2016-01-07 Marcelo Roberto Jimenez SF Bug Tracker #130, Creator: Shaddy Baddah infinite loop in UpnpGetIfInfo() under WIN32 Original code makes no sense. This patch should fix it. 2015-02-04 Shaun Marko Bug tracker #124 Build fails with --enable-debug Build environment Fedora 21 X86-64 * gcc 4.9.2 How to repeat $ ./configure --enable debug $ make libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../upnp/inc -I./inc -I../threadutil/inc -I../ixml/inc -I./src/inc -pthread -g -O2 -Wall -MT src/api/libupnp_la-UpnpString.lo -MD -MP -MF src/api/.deps/libupnp_la-UpnpString.Tpo -c src/api/UpnpString.c -fPIC -DPIC -o src/api .libs/libupnp_la-UpnpString.o src/api/UpnpString.c:47:16: error: expected identifier or '(' before 'extension' extern char *strndup(const char *string, size_t __n); ^ Makefile:1016: recipe for target 'src/api/libupnp_la-UpnpString.lo' failed Reason for failure Build enables -O2 optimization flags which causes the inclusion of a macro implementation of strndup from include/bits/string2.h. Workarounds Disable optimization when configuring or making: $ configure CFLAGS='-g -pthread -O0' --enable-debug $ make or $ configure --enable-debug $ make CFLAGS='-g -pthread -O0' Define NO_STRING_INLINES $ export CFLAGS="-DNO_STRING_INLINES -O2" $ ./configure --enable-debug $ make Fix * Don't declare strndup in src/api/UpnpString.c if it exists 2015-02-01 Jean-Francois Dockes Out-of-tree builds seem to be currently broken, because ixml and threadutil files need an include path to include UpnpGlobal.h, and configure tries to copy files into a directory which it does not create. The patch fixes both issues. 2014-01-03 Peng rewrite soap_device.c 1) separate HTTP handling from SOAP handling 2) remove repeated validity check, each check is performed exactly once 3) fix HTTP status code per UPnP spec, SOAP spec and RFC 2774 ******************************************************************************* Version 1.6.19 ******************************************************************************* 2013-11-14 Marcelo Roberto Jimenez SF Bug Tracker #119, Creator: Klaus Fischer Access violation due to changed usage of pthreads-win32 Dear libupnp developers, I have experienced a crash (access violation) when using libupnp on Windows. The crash is actually located in pthreads-win32 and happens when repeatedly de-/initializing libupnp on Win32 in the same process and both libupnp and pthreads-win32 are compiled as static libraries. So I'm doing this: - UpnpInit() - UpnpFinish() - UpnpInit() <- Crash I am already in touch with Ross Johnson on the pthreads-win32 mailing list regarding this issue: http://sourceware.org/ml/pthreads-win32/2013/msg00020.html He told me the problem is that the functions pthread_win32_process_attach/detach_np() should no longer be called directly, but are invoked automatically now since version 2.9.0 of pthreads-win32, which has been released approx. 1.5 years ago. Please refer to above link for in-depth information. So for proper using of latest pthreads-win32 library, those function calls should vanish inside libupnp. Could you consider adapting libupnp in that way? I would really like to use both libraries out-of-the-box without local modifications, and this issue prevents that. Best regards, Klaus 2013-11-08 Peng Fix several minor bugs in soap_device.c 1) remove redundant free 2) avoid user-provided ErrStr being overwritten by the default one 3) eliminated memory leak possibility in handle_query_variable 2013-11-08 Peng Fix return value check of parse_uri. 2012-06-19 Yoichi NAKAYAMA SF Bug Tracker #118, Creator: T.Iwamoto tv_ctrlpt crashes after detecting a later version of tvcontrol service From: gon3456@users.sf.net Steps to reproduce: 1. Extracts and build libupnp-1.6.18 $ tar -xjf /path/to/archive/libupnp-1.6.18.tar.bz2 $ cd libupnp-1.6.18 $ ./configure $ make 2. Applies the attached patch and remake. $ patch -p1 < /path/to/patch/libupnp-1.6.18.patch $ make 3. Run tv_device. $ cd upnp/sample $ ./tv_device 4. Run tv_ctrlpt; the tv_ctrlpt crashes soon. $ ./tv_ctrlpt Segmentation fault (core dumped) This is an issue report about the sample program of control point. The tv_ctrlpt crashes after detecting a tvdevice that contains tvcontrol:2 or higher version of tvcontrol service. tv_ctrlpt should detect correctly such devices due to forward compatibility of control points with device. For more information about the compatibility, please refer the following document: DLNA Architectures and Protocols Part 1 2011 December - 7.3.2.1.3 (GUN:GZJXU) The attached patch changes the sample programs as below: - device: changes version of tvcontrol service from 1 to 2. This change may occur in the future. - cp: nothing changed: cp knows version 1 of tvcontrol service only. I know many vendors implements their control points based on the tv_ctrlpt, so I hope to fix this issue ASAP. == From: Yoichi NAKAYAMA SEGV is caused by strcpy with NULL argument. Attached patch will avoid SEGV in strcpy, but there may be other inconsistencies. > I know many vendors implements their control points based on the tv_ctrlpt, I don't think so. I think tv_ctrlpt is just a sample to be used with tv_device. 2013-10-28 Pino Toscano Fix compilation on GNU/Hurd 2013-10-28 Peng Fix return value of http_RecvPostMessage and update httpparser.c's comments 2013-10-17 Peng Fix return value of process_request and related subroutines 1) Only HTTP_XXX should be return 2) Make default return value work for process_request 2013-10-15 Peng Fix Content-Range generation bug 2013-09-10 zexian chen Hi, I had found some bugs about memory leak on libupnp-1.6.18. It may lead to memory leak when calling ThreadPoolAdd() or ThreadPoolAddPersistent() which does not return 0. See the attachment for patch. 2013-09-03 Peng Fix return value of config_description_doc. UPNP_E_XXX should not be used instead of IXML_XXX 2013-09-03 Peng Remove faulty free in GetDescDocumentAndURL. temp_str, which points to part of description, should not be freed. 2013-09-02 Peng Suppose the UPnP device is listening on 192.168.1.102:49152. Use the following to send garbage bytes to the device: while true; do echo "\""; done | netcat 192.168.1.102 49152 The device just keeps receiving these bytes and its memory usage keeps growing. Malicious client may exploit it to exhaust the device's memory. The attached patch eliminates this possibility. 2013-09-02 Peng 1) restore the scanner's original cursor position in case of insufficient input; 2) free the memories allocated for a new header in case of a failure. 2013-08-13 Peng Patch to fix behavior when char is signed it seems to me that there is still something wrong: 1) the new is_qdtext_char() is incorrect. There is a trap if char is implemented as signed char. Suppose that c is '\xFF', it will be -1 when converted to an int. By definition, c should be qdtext: qdtext = > TEXT = OCTET = 2) the character after '\\' could be either part of a quoted-pair (together with '\\'), or a normal qdtext, since '\\' itself can be treated as a qdtext. This is equivalent to saying that the character after '\\' in a quoted string could be ANY octet. A patch based on the above two observations is attached. Peng 2013-08-13 Marcelo Roberto Jimenez Enforce RFC 2616 and accept "0" after a backslash for quoted-strings. Reported by Peng 2013-08-13 Peng Patch to make scanner_get_token more robust (avoid over-reading). 2013-07-30 Zheng Peng SF ticket #116 UpnpRemoveVirtualDir wrong linked list operation What if pVirtualDirList has two nodes and what we want to delete is the first one. Patch attached. 2013-07-30 Sebastian Brandt Dear libupnp-devels, when POST'ing to the simple web server in libupnp, the application crashes. This is caused by a missing "..." argument in webserver.c:1533. Seems it has been there for a long time ... 1.6.9 and 1.6.18 have it. webserver.c:1533 calls http_MakeMessage /* Send response. */ http_MakeMessage(&headers, 1, 1, "RTLSXcCc", ret, "text/html", X_USER_AGENT); The format parameter RTLSXcCc needs four arguments - R - response code - ret, T- content type - text/html, L - struct SendInstruction * - NOT PRESENT X - user agent - X_USER_AGENT This results in a crash. Changing to http_MakeMessage(&headers, 1, 1, "RTLSXcCc", ret, "text/html", &RespInstr, X_USER_AGENT); solves the situation. Yours, Sebastian Brandt ******************************************************************************* Version 1.6.18 ******************************************************************************* 2012-12-06 Marcelo Roberto Jimenez Security fix for CERT issue VU#922681 This patch addresses three possible buffer overflows in function unique_service_name(). The three issues have the following CVE numbers: CVE-2012-5958 Issue #2: Stack buffer overflow of Tempbuf CVE-2012-5959 Issue #4: Stack buffer overflow of Event->UDN CVE-2012-5960 Issue #8: Stack buffer overflow of Event->UDN Notice that the following issues have already been dealt by previous work: CVE-2012-5961 Issue #1: Stack buffer overflow of Evt->UDN CVE-2012-5962 Issue #3: Stack buffer overflow of Evt->DeviceType CVE-2012-5963 Issue #5: Stack buffer overflow of Event->UDN CVE-2012-5964 Issue #6: Stack buffer overflow of Event->DeviceType CVE-2012-5965 Issue #7: Stack buffer overflow of Event->DeviceType 2012-06-19 Yoichi NAKAYAMA Fix memory leak and access violation in UpnpSendAction(Ex)Async. Free buffers after malloc or ixmlPrintNode failure. Free Param->Header before destructing Param. 2012-05-25 Anoop Mohan This patch fixes a bug in non blocking connect call where the sock option length for SO_ERROR was passed as 0 instead of sizeof(int). 2012-04-24 Yoichi NAKAYAMA Disable SetGenaCallback call if device is disabled. If device is disabled, SetGenaCallback definition is disabled, but its call remains. A link error will occur in Win32. 2012-04-21 Yoichi NAKAYAMA Fix condition for allocation failure in get_content_type(). At the end of get_content_type() in webserver.c, it should check return value of ixmlCloneDOMString(). 2012-04-21 Yoichi NAKAYAMA Fix problems detected as dead assignment warning by clang scan-build. Wrong assignment by shutdown result hides the real error code of NewRequestHandler() in ssdp_device.c. Fix return code description of NewRequestHandler(). Handle return code from ithread_create in sample applications. Remove unused assignments. 2012-04-20 Yoichi NAKAYAMA Avoid dereference of null pointer in ixmlNode_setNodeProperties. The problem can occur if one of the arguments is NULL. Test argument and fix assertion. 2012-04-17 Yoichi NAKAYAMA Create intermediate directory per project on vc9. Sample applications share sample_util.c and collisions of object file can occur in parallel build. Modify project files to split intermediate directories against it. Apply similar changes also to library projects, like vc10 projects. 2012-04-11 Yoichi NAKAYAMA Avoid access violation after parser_parse_chunky_headers call. In parser_parse_chunky_headers, parser->msg.msg.buf can be changed by membuffer_delete call. Therefore if we save the pointer to parser->msg.entity.buf before calling membuffer_delete, it will induce access to released memory. 2012-04-06 Yoichi NAKAYAMA Remove possibility of access violation. 1. Test Instr before dereference it in http_RecvPostMessage. (Though it never becomes NULL because NULL is not passed to the static method) 2. Avoid strdup(NULL) in ixmlElement_setAttributeNS. Those are detected by llvm scan-build. 2012-04-05 Yoichi NAKAYAMA SF Bug Tracker id 3507819 - Use of thread-unsafe gmtime() in httpreadwrite.c Submitted: zephyrus ( zephyrus00jp ) - 2012-03-18 06:31:00 PDT Define http_gmtime_r and web_server_asctime_r and use it. Those prefix are added since pthread for Win32 already has macro gmtime_r and asctime_r. 2012-04-05 Yoichi NAKAYAMA Fix type of local variable stopSock in RunMiniServer() The variable is declared as SOCKET, but it is used to store return value of int receive_from_stopSock(...). The type was changed in the commit 4b47e6a51d9c7049a862695b68de75699e023551 by mistake. 2012-04-03 Fabrice Fontaine Compilation optimization Do not compile the code related to the webserver in http_SendMessage when --disable-webserver is set ******************************************************************************* Version 1.6.17 ******************************************************************************* 2012-04-02 Fabrice Fontaine SF Bug Tracker id 3514145 - Memory leak fix in threadutil Submitted: Fabrice Fontaine ( ffontaine ) - 2012-04-02 06:49:20 PDT Put thread in a detached state when calling ithread_create otherwise in some circumstances, thread can end before the call to ithread_detach. 2012-03-30 Fabrice Fontaine Add --enable-unspecified_server Add --enable-unspecified_server configure option to set to "Unspecified" the OS name, OS version, product name and product version normally contained in the SERVER header as this could be used by an attacker. 2012-03-29 Fabrice Fontaine Removing implicit casts in miniserver.c Removing implicit integer or enum casts in miniserver.c. 2012-03-29 Fabrice Fontaine SF Bug Tracker id 3512833 - Miniserver is wrongly disabled Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-29 07:36:34 PDT Miniserver is disabled if EXCLUDE_GENA, EXCLUDE_SOAP and EXCLUDE_WEBSERVER are set. However, SSDP needs the Miniserver to answer to M-SEARCH requests. So, MiniServer should not be disabled if EXCLUDE_SSDP is not also set. 2012-03-26 Yoichi NAKAYAMA SF Bug Tracker id 3510693 - build fail with --disable-device Use INCLUDE_DEVICE_APIS instead of UPNP_HAVE_DEVICE as in other sources. Don't use soap_device_callback if INCLUDE_DEVICE_APIS is not set, otherwise link error occur on Windows. 2012-03-26 Fabrice Fontaine SF Bug Tracker id 3511149 - --disable-ssdp has no effect Submitted: Yoichi NAKAYAMA ( yoichi ) - 2012-03-25 18:14:34 PDT There are typos in upnp/src/inc/config.h "EXCLUDE_SSSDP" (should be EXCLUDE_SSDP), therefore EXCLUDE_SSDP is always 0, and --disable-ssdp has no effect. 2012-03-24 Fabrice Fontaine Remove implicit casts Cast parameters of htonl in uint32_t in IN6_IS_ADDR_GLOBAL and IN6_IS_ADDR_ULA definitions. Remove comparison with 0 in while statement of vfmatch, http_SendMessage and http_MakeMessage. 2012-03-24 Yoichi NAKAYAMA SF Bug Tracker id 3510693 - build fail with --disable-device GetDeviceHandleInfo just fail without using undefined member DeviceAf if UPNP_HAVE_DEVICE is not defined. Move ContentTypeHeader definition to soap_common.c, since it is also used in soap_ctrlpt.c. ******************************************************************************* Version 1.6.16 ******************************************************************************* 2012-03-18 Fabrice Fontaine Replace sprintf by snprintf in http_WriteHttpPost Replace sprintf by snprintf in http_WriteHttpPost to avoid buffer overflow. 2012-03-18 Fabrice Fontaine Add infoSize parameter to get_sdk_info Add infoSize parameter to get_sdk_info function to replace sprintf call by a snprintf call. 2012-03-16 Fabrice Fontaine Check return code in ixml Check return code of ixmlDocument_CreateElementEx in ixmlDocument_CreateElement. Check return code of ixmlNode_setNodeName and ixmlNode_setNodeValue in ixmlNode_cloneCDATASect and ixmlNode_cloneTextNode. 2012-03-16 Fabrice Fontaine Add more explicit casts and remove dead code Comment unused SERVER from DeviceShutdown. Comment unused max from parse_hostport. Comment unused nodeptr from ixmlNode_cloneDoc. Comment unused newNode from Parser_hasDefaultNamespace. Comment unused Parser_parseReference function Check return code of shutdown and display an error if needed. 2012-03-15 Fabrice Fontaine Fix previous commit Replace HAVE_UPNP_OPTSSDP by UPNP_HAVE_OPTSSDP in upnpapi.c. 2012-03-15 Fabrice Fontaine Add --disable-optssdp option Modify configure.ac to add --disable-optssdp option. This option will remove OPT, 01-NLS and X_USER_AGENT headers from SSDP messages as those headers are optional. If --disable-gena and disable-optssdp are both used, uuid part will not be compiled anymore. 2012-03-15 Fabrice Fontaine Bug fix in ixmlNode_allowChildren Commit d48d73720bd325062c4d3b9ce85f3944be4f562d added a bug in ixmlNode_allowChildren, this function was returning FALSE instead of TRUE when newChild->nodeName was eELEMENT_NODE. 2012-03-15 Fabrice Fontaine Improve upnp/genlib/net Change ret_code from int to parse_status_t in match. Set back return code of ReadResponseLineAndHeaders from parse_status_t to int as this function can return UPNP_E_BAD_HTTPMSG. As a result, do not cast the result of this function into parse_status_t in http_OpenHttpGetProxy and http_OpenHttpGetEx. Use switch with PARSE_OK in parsetools.c. Add missing explicit casts of integer constants in uri.c and httpreadwrite.c. Use switch, int and sa_family_t with AF_INET in uri.c. Print an error in http_Download if realloc failed. 2012-03-14 Fabrice Fontaine Use switch instead of if with enums in upnpapi.c Replace if statements with switch when using HND_DEVICE and HND_CLIENT enum constants. Correct also UpnpUnRegisterRootDeviceLowPower and UpnpUnRegisterClient as those functions were wrongly awaiting an UPNP_E_INVALID_HANDLE instead of HND_INVALID from GetHandleInfo. 2012-03-14 Fabrice Fontaine Improve ssdp part Do not compile CreateClientRequestPacketUlaGua if IPv6 is disable. Cast DestAddr->sa_family from sa_family_t into int when calling CreateServicePacket as this function has been set back to accept int in a692e591defe6ed9a617b9b4a083964a01f7bbab. Use switch instead of if with AF_INET and AF_INET6. Add missing casts from AF_INET and AF_INET6 into sa_family_t when using them to set sin_family and sin6_family. Add missing explicit casts into size_t or lu when using integer constants with strlen or unsigned long indexes. Set SSDP_PAUSE to be unsigned as it is used with usleep. 2012-03-14 Fabrice Fontaine Use switch instead of if with enums in ixml Replace if statements with switch when using enums in ixml. Remove unneeded initialization in ixmlAttr_init, Parser_init and ixmlNode_init which was added by wrongly added in commit 06660b6383c438e4e2c9ca9854077cecc4da9e5d. 2012-03-14 Fabrice Fontaine Use switch instead of if with enums in threadutil Replace if statements with switch when using enums in threadutil. 2012-03-14 Fabrice Fontaine Fix missing break in http_RecvMessage There was a missing break in PARSE_INCOMPLETE_ENTITY due to commit 2eb3e069badd5c8676738c3ead37f9551fd8448e. 2012-03-14 Yoichi NAKAYAMA Fix parse failure observed with tvdevice sample. Commit c40d2bc0c9b60c43b641ac4669c7b8bbcd6134c5 has a problem at removing the parentheses in parser_parse_responseline. Difference of pointers was used with intention, don't cast them separately. 2012-03-14 Yoichi NAKAYAMA Fix compile error on Windows. Include UpnpStdInt.h for ssize_t. Define sa_family_t in UpnpInet.h. 2012-03-14 Yoichi NAKAYAMA Avoid ambiguous change of SsdpEvent in unique_service_name. Handle overflow before changing SsdpEvent. Because the behavior of "snprintf" is platform dependent in such case. 2012-03-14 Yoichi NAKAYAMA SF Bug Tracker id 3502958 - The commit 5944960e prevents a pupnp client (amule) from receiving replies from an IGD device. Previous change broke the feature. The error of unique_service_name in ssdp_request_type should be ignored. This reverts commit 5944960e172a797a9fcc196291f4046cafa7f6ec. 2012-03-13 Marcelo Roberto Jimenez Address family is an int Reference: "man 2 socket". 2012-03-11 Fabrice Fontaine Remove more implicit casts in upnp part Remove more "implicit integer or enum conversions" errors as well as dead code. 2012-03-11 Fabrice Fontaine Remove more implicit casts in upnp part Remove more "implicit integer or enum conversions" as well as memset before snprintf. 2012-03-11 Yoichi NAKAYAMA Avoid out of range access in CheckOtherHTTPHeaders. There was a problem in HDR_ACCEPT_LANGUAGE case. It may read from TmpBuf larger amount than allocated, since condition was always true. Terminate RespInstr->AcceptLanguageHeader correctly. Skip allocation if there is already sufficient buffer. 2012-03-10 Fabrice Fontaine Remove some of the implicit cast in upnp part Remove some of the "implicit integer or enum conversions" as well as some access to NULL reference in upnp part. 2012-03-10 Fabrice Fontaine Remove lock in ThreadPoolInit If ThreadPoolInit returned EAGAIN, tp->lock was not freed. 2012-03-10 Fabrice Fontaine Improve ixml Remove "implicit integer conversions" and "dereference NULL return value" errors in ixml part. 2012-03-10 Yoichi NAKAYAMA Exclude IPv6 stuff in SearchByTarget when UPNP_ENABLE_IPV6 is not defined. 2012-03-10 Yoichi NAKAYAMA Further measures against buffer overflows. * Pass output buffer size to CreateClientRequestPacket(UlaGua) from SearchByTarget and detect overflow. * Handle SearchByTarget error in UpnpSearchAsync. * Pass output buffer size to addrToString and detect overflow. * Handle addrToString error in configure_urlbase. * Handle overflow in http_SendMessage. * Respect unique_service_name error in ssdp_request_type so as not to touch non-terminated buffer under Evt. * Treat large argument as error in UpnpAddVirtualDir. * Use strncpy with the standard way in readFromSSDPSocket. * Do not clear buffer before snprintf. * Clarify the last argument of GetDescDocumentAndURL has size LINE_SIZE. * For inet_ntop, use buffer with size INET6_ADDRSTRLEN or INET_ADDRSTRLEN. 2012-03-10 Yoichi NAKAYAMA Handle allocation error in strndup to avoid access violation. Return NULL before calling strncpy. Platforms with HAVE_STRNDUP are not affected. 2012-03-10 Yoichi NAKAYAMA Synchronize autoconfig.h with upnpconfig.h. It fixes WIN32 build where configure is not invoked. 2012-03-09 Fabrice Fontaine More compilation optimization Do not compile most of service_table.c and client_table.c if --disable-gena is used. Do not compile urlconfig.c if --disable-webserver is used. Adding new UPNP_HAVE_xxx variables in upnpconfig.h and upnpconfig.h.in. 2012-03-09 Fabrice Fontaine Optimization of --disable-webserver Do not compile webserver.c if --disable-webserver is used. 2012-03-09 Fabrice Fontaine Improve threadutil Remove "dereference NULL return" errors and implicit conversions to double or enum types. 2012-03-09 Fabrice Fontaine Optimization of --disable-webserver Do not compile miniserver.c if --disable-webserver is used. 2012-03-09 Fabrice Fontaine Adding configure options Adding --disable-ssdp, --disable-soap, --disable-gena options to configure script. 2012-03-09 Fabrice Fontaine Bug fix of last commit _snprintf was wrongly defined in ssdp_server.c 2012-03-09 Fabrice Fontaine SF Bug Tracker id 3499781 - msvc doesn't have snprintf Submitted: Yoichi NAKAYAMA ( yoichi ) - 2012-03-08 10:18:39 PST 97a17ff5add73c97844e2fa74456bab4df0800f1 commit breaks build on windows/msvc since there is no snprintf. Note: * Some existing sources use _snprintf when WIN32 is defined, but its behavior is a bit different from C99 snprintf. * snprintf does terminate the buffer, so the commit (use buffer size minus 1 as argument) changes the behavior at the boundary. * Truncation might be better than crash in some cases. But it may result in not good. 2012-03-08 Marcelo Roberto Jimenez SF Bug Tracker id 3499878 - UpnpUnSubscribeAsync(): ‘retVal’ may be used uninitialized Submitted: Marcelo Roberto Jimenez ( mroberto ) - 2012-03-08 12:38:57 PST src/api/upnpapi.c: In function ‘UpnpUnSubscribeAsync’: src/api/upnpapi.c:2060:6: warning: ‘retVal’ may be used uninitialized in this function 2012-03-08 Marcelo Roberto Jimenez SF Bug Tracker id 3175217 - Crash bug in Parser_addNamespace() Submitted: Terry Farnham ( tfarnham ) - 2011-02-07 09:25:25 PST Details: The strcmp(pNode->prefix,pCur->prefix) crashes on pCur->prefix being NULL. This occurs on invalidly formatted xml where a node uses an undefined namespace. I would expect to receive IXML_FAILED in this situation. 2012-03-08 Fabrice Fontaine Removing access to NULL pointers in node.c and element.c Check that newNode is not NULL ixmlNode_cloneNodeTree and pass newAttr as the return node in the ixmlElement_setAttributeNodeNS call of ixmlElement_setAttributeNS. 2012-03-08 Fabrice Fontaine Memory leaks correction in upnpapi.c Fix memory leaks in UpnpUnSubscribe, SendActionExAsync and RenewSubscription. 2012-03-08 Fabrice Fontaine SF Bug Tracker id 3496993 - Write after free in ixmlNode_insertBefore Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 04:54:40 PST If ixmlNode_isParent(nodeptr, newChild) returns TRUE, ixmlNode_removeChild(nodeptr, newChild, NULL) will free newChild before the modifications of newChild->nextSibling and newChild->prevSibling. 2012-03-08 Fabrice Fontaine Remove most of strcpy, sprintf and strcat Replace strcpy, sprintf and strcat by strncpy, snprintf and strncat to avoid buffer overflows. 2012-03-07 Yoichi NAKAYAMA SF Bug Tracker id 3497714 - Buffer overflows Fix compile error on WIN32. Local variables must be declared first. Remove outdated comment. 2012-03-07 Yoichi NAKAYAMA Avoid access violation in assertion. xmlParser->pCurElement was dereferenced before null check. Affects debug build only. 2012-03-07 Fabrice Fontaine Remove SIZEOF_MISTACH error in notify_send_and_recv Replace sizeof(CRLF) by strlen(CRLF) as CRLF is a const char*. 2012-03-07 Fabrice Fontaine SF Bug Tracker id 3498442 - Memory leak in get_file_info Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-07 02:44:30 PST info->contentType is not freed before being set to NULL. 2012-03-07 Fabrice Fontaine SF Bug Tracker id 3498439 - Memory leak in removeServiceTable Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-07 02:35:46 PST UDN is not freed. 2012-03-07 Fabrice Fontaine SF Bug Tracker id 3498436 - Memory leak in Parser_processAttributeName Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-07 02:30:57 PST attr is not freed if ixmlNode_setNodeProperties or ixmlNode_setAttributeNode return an error in Parser_processAttributeName. 2012-03-07 Fabrice Fontaine Fixing an error in d6db7c555d0f11856ce5e3e479b16a4cf4689107 commit Evt.Sid should not be cast into char* when calling sizeof otherwise size will be 4. 2012-03-06 Fabrice Fontaine Removing two unused variables in ssdp_server.c Removing first TempPtr allocation in unique_service_name as well as one of the dbgStr allocation in AdvertizeAndReply as those values were not used. 2012-03-06 Fabrice Fontaine SF Bug Tracker id 3497714 - Buffer overflows Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-06 07:36:08 PST Call to strcpy should be replaced by call to memset and strncpy to avoid getting buffer overflows. 2012-03-05 Marcelo Roberto Jimenez SF Bug Tracker id 2989399 - UpnpSetVirtualDirCallbacks API removal in 1.6.x Submitted: Nick Leverton ( leveret ) - 2010-04-19 07:44:10 PDT Details: The recent codebase merge has removed a significant API call which is used by several pupnp devices such as mediatomb and gmediaserver. UpnpSetVirtualDirCallbacks() has been replaced by individual routines to set each callback. Essentially this means that 1.6.7 will in fact be a major bump and 1.6.6 devices can no longer link against it. Could we have the call reinstated please, perhaps as a wrapper around the individual calls ? As it is, all distros will have to patch their 1.6.x apps, rebuild and re-link them. The other removed API calls and external variables don't seem to be used by any of the apps I have copies of, but UpnpSetVirtualDirCallbacks is important for maintaining compatibility within 1.6.x. 2012-03-05 Marcelo Roberto Jimenez SF Bug Tracker id 3325246 - Memory Leak in XML Parser Submitted: Terry Farnham ( tfarnham ) - 2011-06-23 09:45:54 PDT Details: The following bit of xml results in a memory leak from the xml parser: const char *xmlbuffer=" DMS-1.50"; When I execute the following code: IXML_Document *doc = ixmlParseBuffer(xmlbuffer); ixmlDocument_free(doc); It results in a memory leak in ixmlparser.c line 2107 where it calls safe_strdup( newElement->namespaceURI ); It's difficult to figure out why. 2012-03-05 Marcelo Roberto Jimenez SF Bug Tracker id 3417134 - Crash seen in UpnpFinish Submitted: Sunil ( sunilangadi ) - 2011-10-02 08:28:47 PDT Details: I observed crash in the below mentioned log statement in function upnpfinish(file: upnpapi.c). UpnpPrintf(UPNP_INFO, API, __FILE__, __LINE__, "Exiting UpnpFinish: UpnpSdkInit is :%d:\n", UpnpSdkInit); In particular it was crashing in ithread_self in UpnpDisplayFileAndLine(file upnpdebug.c) on WIN32. Moving the call ithread_cleanup_library() below the upnp printf call mentioned above in function upnpfinish fixed the crash but I couldn't get to the root of the problem. The problem was observed on WIN32. 2012-03-05 Fabrice Fontaine SF Bug Tracker id 3497159 - Bug fix in Parser_readFileOrBuffer Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 14:20:58 PST fileSize = ftell( xmlFilePtr ); can return a negative value, in this case the function should exit (at the moment, the function exits only if ftell returns 0). 2012-03-05 Fabrice Fontaine SF Bug Tracker id 3497140 - Bug fix in http_get_code_text Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 13:07:03 PST Replace if( statusCode < 100 && statusCode >= 600 ) which can't be true by if( statusCode < 100 || statusCode >= 600 ). 2012-03-05 Fabrice Fontaine SF Bug Tracker id 3497126 - Resource leak in http_RecvPostMessage Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 12:33:59 PST Fp is not closed when an error is raised on membuffer_append or sock_read. 2012-03-05 Fabrice Fontaine SF Bug Tracker id 3497034 - Buffer not null terminated in UpnpGetIfInfo Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 06:43:52 PST gIF_NAME might be not null terminated. 2012-03-05 Fabrice Fontaine SF Bug Tracker id 3497033 - Buffer not null terminated in UpnpInit Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 06:42:18 PST gIF_IPV4, gIF_IPV6 and gIF_IPV6_ULA_GUA might be not null terminated. Moreover, gIF_IPV4 should be 16 characters (INET_ADDRSTRLEN) and not 22 and gIF_IPV6 should be 46 characters (INET6_ADDRSTRLEN) and not 65. 2012-03-05 Fabrice Fontaine Bug fix of latest commit (parse_hostport) Missing parenthesis in memset. 2012-03-05 Fabrice Fontaine SF Bug Tracker id 3497027 - Buffer not null terminated in parse_hostport Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 06:28:38 PST workbuf might be not null terminated. 2012-03-05 Fabrice Fontaine SF Bug Tracker id 3497009 - Resource leak in http_SendMessage Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 05:51:44 PST Fp is not closed if fseeko(Fp, Instr->RangeOffset, SEEK_CUR) does not return 0. 2012-03-05 Fabrice Fontaine HInfo->ServiceTable initialization in UpnpRegisterRootDevice2 and UpnpRegisterRootDevice4 Initialize also HInfo->ServiceTable in UpnpRegisterRootDevice2 and UpnpRegisterRootDevice4 functions 2012-03-05 Fabrice Fontaine SF Bug Tracker id 3496703 - Handle_Info::ServiceList may have undefined value Submitted: Yoichi NAKAYAMA ( yoichi ) - 2012-03-03 20:49:25 PST In UpnpRegisterRootDevice(), HInfo->ServiceTable is not initialized and getServiceTable() may leave it intact. It will cause crash on freeServiceTable() called from UpnpUnRegisterRootDevice(). 2012-03-05 Fabrice Fontaine SF Bug Tracker id 3496702 - TvDeviceStop is called even if Start failed Submitted: Yoichi NAKAYAMA ( yoichi ) - 2012-03-03 20:35:08 PST In sample tvdevice, error of device_main() is not handled, and TvDeviceStop() cause crash. 2012-03-05 Fabrice Fontaine SF Bug Tracker id 3496942 - Memory leak in config_description_doc Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 01:55:54 PST element was not freed if membuffer_append_str(&url_str, "http://") does not return 0. Moreover addNew was not used. 2012-03-05 Fabrice Fontaine SF Bug Tracker id 3496938 - Missing structures initialization in some functions Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 01:31:16 PST Memsetting to 0 some of the structures: finfo in process_request, job in readFromSSDPSocket, request in http_OpenHttpGetEx, job in genaNotifyThread, job in genaNotifyAllExt, job in genaNotifyAll, job in genaInitNotifyExt, job in genaInitNotify, LocalAddr in getlocalhostname. 2012-03-05 Fabrice Fontaine SF Bug Tracker id 3496934 - Memory leaks in getlocalhostname and UpnpGetIfInfo Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 01:25:42 PST LocalSock is not closed if ioctl(LocalSock, SIOCGIFCONF, &ifConf); returns an error. 2012-03-05 Fabrice Fontaine SF Bug Tracker id 3496933 - Out-of-bounds access in CheckOtherHTTPHeaders Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 01:15:34 PST An out-of-bands access is raised because size of RespInst->AcceptLanguageHeader is 200 and TmpBuf size is 180. 2012-03-05 Fabrice Fontaine Remove unused currentDevice variable in removeServiceTable currentDevice is not used in this function. 2012-03-05 Fabrice Fontaine SF Bug Tracker id 3496581 - Memory leak in getServiceList Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-03 08:43:23 PST serviceNodeList is not freed if current->next = malloc(sizeof(service_info)); returns NULL. 2012-02-29 Fabrice Fontaine SF Bug Tracker id 3495616 - Memory leak in ixmlElement_setAttributeNS Submitted: Fabrice Fontaine ( ffontaine ) - 2012-02-29 02:09:43 PST newAttrNode is not freed if newAttr->n.nodeValue = strdup(value); returns NULL or if ixmlElement_setAttributeNodeNS(element, newAttr, NULL) does not return IXML_SUCCESS. 2012-02-28 Fabrice Fontaine SF Bug Tracker id 3495286 - Double free in get_action_node Submitted: Fabrice Fontaine ( ffontaine ) - 2012-02-28 04:27:54 PST ixmlFreeDOMString(ActNodeName); is called twice if ixmlParseBufferEx(ActNodeName, RespNode); does not return IXML_SUCCESS. 2012-02-28 Fabrice Fontaine SF Bug Tracker id 3495280 - Memory leak in ixmlDocument_createElementEx Submitted: Fabrice Fontaine ( ffontaine ) - 2012-02-28 04:01:02 PST There is a memory leak in ixmlDocument_createElementEx: newElement->tagName is not freed if newElement->n.nodeName = strdup(tagName); returns NULL. 2012-02-27 Fabrice Fontaine SF Bug Tracker id 3494865 - Use of non-initialized variable in parser_parse_requestline Submitted: Marcelo Roberto Jimenez ( mroberto ) - 2012-02-26 16:50:23 PST src/genlib/net/http/httpparser.c: In function ‘parser_parse_requestline’: src/genlib/net/http/httpparser.c:1319:28: warning: ‘index’ may be used uninitialized in this function 2012-02-24 Marcelo Roberto Jimenez SF Bug Tracker id 3489999 - UpnpString leaks in genaSubscribe() Submitted: Yoichi NAKAYAMA ( yoichi ) - 2012-02-21 07:06:35 PST In genaSubscribe() (defined in upnp/src/gena/gena_ctrlpt.c), ActualSID and EventURL will not be freed if ScheduleGenaAutoRenew returns UPNP_E_SUCCESS. This fixes the an issue introduced by the previous fix. 2012-02-23 Marcelo Roberto Jimenez SF Bug Tracker id 3489990 - some files are missing in tarball Submitted: Yoichi NAKAYAMA ( yoichi ) - 2012-02-21 06:52:57 PST Released tarball (e.g. libupnp-1.6.15.tar.bz2) does not contain some files under upnp/{inc,src} used by the project files for windows (build/vc8/libupnp. vcproj and build/vc9/libupnp.vcproj). This breaks build on Windows from tarball released after following changes http://pupnp.git.sourceforge.net/git/gitweb.cgi?p=pupnp/pupnp;a=commitdiff;h=0eba550da039be01211b56fea0d02d03f0a12343 http://pupnp.git.sourceforge.net/git/gitweb.cgi?p=pupnp/pupnp;a=commitdiff;h=7a796b264ec7d5de5876fd6a2001c2d329709e02 2012-02-23 Marcelo Roberto Jimenez SF Bug Tracker id 3489999 - UpnpString leaks in genaSubscribe() Submitted: Yoichi NAKAYAMA ( yoichi ) - 2012-02-21 07:06:35 PST In genaSubscribe() (defined in upnp/src/gena/gena_ctrlpt.c), ActualSID and EventURL will not be freed if ScheduleGenaAutoRenew returns UPNP_E_SUCCESS. This fixes the original issue. 2012-02-23 Marcelo Roberto Jimenez SF Bug Tracker: UpnpString leaks in genaSubscribe() In genaSubscribe() (defined in upnp/src/gena/gena_ctrlpt.c), ActualSID and EventURL will not be freed if ScheduleGenaAutoRenew returns UPNP_E_SUCCESS. 2012-02-23 Marcelo Roberto Jimenez Revert cb89781a55466703763c1b0ee67094eb401ddfe9 as suggested by Fabrice Fontaine. 2012-02-07 Edwin Stearns Attached is a patch that resolved an issue I found with a server that gave its device description URI without a trailing slash (e.g. `http://127.0.0.1:5555`). 2012-01-04 Fabrice Fontaine Bug fix for IPv4-mapped IPv6 addresses. Setting IPv6 sockets with IPV6_V6ONLY flag to avoid getting IP packets with IPv4-mapped IPv6 addresses on IPv6 sockets. ******************************************************************************* Version 1.6.15 ******************************************************************************* 2012-01-11 Fabrice Fontaine Bug fix on M-SEARCH for IPv6 CPs. Small bug fix on IPv6 Control Point: now CP will also send M-SEARCH on site-scope address (FF05::C) instead of only sending M-SEARCH on link-scope (FF02::C). 2012-01-11 Fabrice Fontaine Retrieve IPv6 addresses in Upnp_Discovery. Changing sockaddr_in into sockaddr_storage in Upnp_Discovery to be able to retrieve IPv6 addresses of devices in Control Points using pupnp. 2012-01-09 Marcelo Roberto Jimenez SF Bug tracker, ID: 3469344 Submitted: dimmman ( dimmman ) - 2012-01-04 01:44:29 PST Details: Looking at the code (v1.6.14, upnptools.c) for UpnpResolveURL and UpnpResolveURL2 it shows that the ExitFunction: always returns UPNP_E_SUCCESS. I'm fairly sure it's a simple mistake that should have been "return ret;" in both cases. Br, Jonny ******************************************************************************* Version 1.6.14 ******************************************************************************* 2011-10-31 Fabrice Fontaine UPnP Low Power Support. Adding two new functions (UpnpSendAdvertisementLowPower and UpnpUnRegisterRootDeviceLowPower) which can be used to specify values for the three SSDP headers defined by UPnP Low Power. Those headers are PowerState, SleepPeriod and RegistrationState. 2011-10-24 Fabrice Fontaine Bug fix in IN6_IS_ADDR_GLOBAL. Changing IN6_IS_ADDR_GLOBAL to accept all IPv6 addresses which have a 2000::/3 prefix. 2011-07-20 Marc Essayan Bug Fix on M-SEARCH. Do not answer to M-SEARCH using HTTP version 1.0 as specified by the UPnP Device Architecture. 2011-03-18 Iain Denniston Fixes for compilation under Windows (specifically MSVC). Also added MSVC supported "_inline", and fixed some WIN32 specific warnings. 2011-03-08 Iain Denniston Several fixes to correctly use SOCKET (and related) types instead of non-portable variations. ******************************************************************************* Version 1.6.13 ******************************************************************************* 2011-03-15 Fabrice Fontaine Putting ssdpReqSocks under compilation flag. Putting all access to ssdpReqSock4 and ssdpReqSock6 under INCLUDE_CLIENT_APIS compilation flag to be able to compile when client part of library is disable. 2011-03-15 Fabrice Fontaine New UpnpRegisterRootDevice4 for legacy CPs. Add a new UpnpRegisterRootDevice4 which allow user to specify a description URL to be returned for legacy CPs (for example, CPs searching for a v1 when the device is v2). Most of those CPs does not work if they found a v2 in the XML description, so this new function is only used to solve interoperability issues. 2011-03-08 Iain Denniston Fix for memory leak. 2011-03-08 Iain Denniston Fix and Update of MSVC9 solution and project files - now compile in all modes. Added x64 and static library targets. 2011-03-08 Iain Denniston Partial fix for UpnpGetIfInfo with MSVC - convert wchar string to char string (full fix requires a lot of work - potentially impacting all supported platforms) 2011-03-11 Marcelo Roberto Jimenez Created the macros PRIzd and PRIzx to deal with MSVC lack of C99. Thanks to Iain Denniston for pointing it out. 2011-03-08 Iain Denniston Fixes for headers when compiled under C++ 2011-03-08 Iain Denniston Fix for uuid_unpack incorrect shift precedence. ******************************************************************************* Version 1.6.12 ******************************************************************************* 2011-02-08 Marcelo Roberto Jimenez Undo the "incorrectly exported include files". Legacy applications like linux-igd and igd2-for-linux are using those API to create a thread pool for managing their GENA events. Leave it to be reworked in 1.8.x. ******************************************************************************* Version 1.6.11 ******************************************************************************* 2011-02-07 Marcelo Roberto Jimenez Remove PrintThreadPoolStats() from the public API. This function uses a ThreadPool object as an argument, which is not supposed to be exported. 2011-02-07 Fabrice Fontaine Major bug fix in IPv6 code. Major bug fix in miniserver.c for IPv6, bug was introduced when changing implementation of get_port in November 20th 2010 ("gena:fix several compiler warnings" commit). 2011-02-06 Marcelo Roberto Jimenez Fix for incorrectly exported include files. The files FreeList.h, LinkedList.h, ThreadPool.h and TimerThread.h from the threautil library were being installed in the include directory of the library, incorrectly exposing internal data structure of the library. 2011-01-30 Chandra Penke Fix for compilation warnings of unused variables in upnpdebug.c in release builds. 2011-01-20 Chandra Penke Fix for Race condition can hang miniserver thread. Add 'requiredThreads' field to the ThreadPool structure, to avoid a race condition when waiting for a new thread to be created. The race condition occurs when a thread is destroyed while the master thread is waiting for a new thread to be created. Thanks to Chuck Thomason for pointing the problem. Summary: Race condition can hang miniserver thread - ID: 3158591 Details: Hello, I have found a race condition in the thread pool handling of libupnp-1.6.6 that periodically results in the miniserver thread getting blocked infinitely. In my setup, I have the miniserver thread pool configured with 1 job per thread, 2 threads minimum, and 50 threads maximum. Just before the lockup occurs, the miniserver thread pool contains 2 threads: one worker thread hanging around from a previous HTTP request job (let's call that thread "old_worker") and the miniserver thread itself. A new HTTP request comes in. Accordingly, the miniserver enters schedule_request_job() and then ThreadPoolAdd(). In ThreadPoolAdd(), the job gets added to the medium-priority queue, and AddWorker() is called. In AddWorker(), jobs = 1 and threads = 1, so CreateWorker gets called. When we enter CreateWorker(), tp->totalThreads is 2, so currentThreads is 3. The function creates a new thread and then blocks on tp->start_and_shutdown. The miniserver thread expects the newly created thread to increment tp->totalThreads and then signal the condition variable to wake up the miniserver thread and let it proceed. The newly created thread starts in the WorkerThread() function. It increments tp->totalThreads to 3, does a broadcast on the start_and_shutdown condition, and starts running its job. However, before the miniserver thread wakes up, "old_worker" times out. It sees that there are no jobs in any queue and that the total number of threads (3) is more than the minimum (2). As a result, it reduces tp->totalThreads to 2 and dies. Now the miniserver thread finally wakes up. It checks tp->totalThreads and sees that its value is 2, so it blocks on tp->start_and_shutdown again. It has now "missed" seeing tp->totalThreads get incremented to 3 and will never be unblocked again. When this issue does occur for a server device, the miniserver port remains open, but becomes unresponsive since the miniserver thread is stuck. SSDP alive messages keep getting sent out, as they are handled by a separate thread. Reproducing the issue is difficult due to the timing coincidence involved, but in my environment I am presently seeing it at least once a day. I figured out the sequence described above through addition of my own debug logs. The relevant code involved in this bug has not changed substantially in libupnp-1.6.10, though I am planning to test against 1.6.10 as well in the near future. Do you have any input for an elegant fix for this issue? Thanks, Chuck Thomason 2011-01-16 Marcelo Roberto Jimenez Define _FILE_OFFSET_BITS, _LARGEFILE_SOURCE and _LARGE_FILE_SOURCE in upnpconfig.h. Make these definitions available to programs using the library. Thanks to Chandra Penke for pointing the problem. Summary: Problem with large file support in pupnp build - ID: 3158969 Submitted: Chandra ( inactiveneurons ) - 2011-01-15 16:17:02 BRST Details: First off, I apologize in advance for the length of this comment, it's the only way I could describe the problem accurately. Secondly, a brief thanks (again). The company I'm working for has been using pupnp for a massively cross-platform project which involves iphone, osx, windows, linux x86, arm, and mips hosts. It's amazing how well it works, so kudos to the maintainers! We came across a problem when compiling with the following tool-chain: http://www.codesourcery.com/sgpp/lite/mips/portal/release824. The problem is the following: In configure.ac the following lines exist to enable large file support: AC_DEFINE([_LARGE_FILE_SOURCE], [], [Large files support]) AC_DEFINE([_FILE_OFFSET_BITS], [64], [File Offset size]) Which in turn result in the following #defines in autoconfig.h: #define _LARGE_FILE_SOURCE /**/ #define _FILE_OFFSET_BITS 64 However, this file is not exported as part of the upnp build. Therefore, while the entire library gets built with large file support, it's possible that dependent libraries which only rely on the include files may not use large file support. In the particular case of the above tool-chain, the 'off_t' type is 8 bytes when large file support is enabled, but only 4 bytes when it's not. As a result part our stack built on top of pupnp, which did not have large file support (because it did not use the above autoconf directives), was relying on 'a off_t' that was 4 bytes. This caused, among many things, for the UpnpFileInfo struct to break. Since the struct is completely invisible outside of pupnp (because of some template macro magic), pupnp thought that 'FileLength' field was 8 bytes, but the header setter/getter methods being used by dependent libraries thought that it was 4, which caused some erratic behavior when going through pupnp's webserver and HTTP client API. We put in a temporary work around by adding the following preprocessor flags: -D_LARGE_FILE_SOURCE, -D_FILE_OFFSET_BITS=64 as part of our build process. However, it's a hack, and I was wondering if I'm missing something and there's a better way to approach this. Thanks, Chandra 2011-01-16 Marcelo Roberto Jimenez Use config.h to test for the availability of strndup() and strnlen(). 2011-01-14 Chandra Penke - Null termination of strndup() implementation on systems missing it. - Implementation of strnlen() on systems missing it. 2011-01-14 Chandra Penke Fixes transfer encoding in the HTTP client API, which is currently broken. The break was due to a regression caused by another fix (tracker 3056713), which fixed an out of memory crash when downloading large files. The previous fix changed the http_ReadHttpGet() implementation so that data already read by the user was discarded. However, it only worked for transfers where the content length was specified. This fix extends the previous implementation to cover chunked transfer encoding. 2011-01-14 Chandra Penke Minor change in membuffer.c to include "membuffer.h" without looking in the standard header path. This allows pupnp to build in xcode. 2010-12-18 Marcelo Roberto Jimenez SF Tracker: Patches Fedora mingw32 compilation - ID: 3138849 Details: Hello. I trying compile libupnp-1.6.10 on the Fedora 14 MinGW Environment and get many errors. I create patch to fix it. With this patch i can get static library. This patch is very raw. Submitted: Ivan Romanov (ivanromanov) - 2010-12-16 23:29:19 UTC ******************************************************************************* Version 1.6.10 ******************************************************************************* 2010-11-23 Fabrice Fontaine Major bug fix in http_SendMessage. Currently, http_SendMessage was not able to write to write a buffer due to a bad use of file_buf instead of buf. This bug was introduced by the 0197-Doxygen-reformating-compiler-warnings patch. 2010-11-23 Fabrice Fontaine Returning the Sid in Upnp_Event_Subscribe. Currently, Upnp_Event_Subscribe always contains an empty chain in the Sid parameter. This patch now saves the client Subscription ID in this parameter so Control Points can see and use the same SID in the Upnp_Event_Subscribe and in the Upnp_Event structures. 2010-11-22 Marcelo Roberto Jimenez Two fixes from Juergen Lock : 1. varargs: pass size of CRLF as size_t not as int: --- upnp/src/gena/gena_device.c.orig +++ upnp/src/gena/gena_device.c @@ -225,7 +225,7 @@ static UPNP_INLINE int notify_send_and_r "bbb", start_msg.buf, start_msg.length, propertySet, strlen(propertySet), - "\r\n", 2); + "\r\n", sizeof "\r\n" - 1); if (ret_code) { membuffer_destroy(&start_msg); sock_destroy(&info, SD_BOTH); 2. Remove "b" arg here, there is no buffer passed: (this caused a pointer to be interpreted as a buffer size to be alloc'd/copied, hence the 32 GB.) --- upnp/src/genlib/net/http/webserver.c.orig +++ upnp/src/genlib/net/http/webserver.c @@ -1262,7 +1262,7 @@ static int process_request( // Content-Range: bytes 222-3333/4000 HTTP_PARTIAL_CONTENT // Transfer-Encoding: chunked if (http_MakeMessage(headers, resp_major, resp_minor, - "R" "TLD" "s" "tcS" "b" "Xc" "sCc", + "R" "TLD" "s" "tcS" "Xc" "sCc", HTTP_OK, // status code finfo.content_type, // content type RespInstr, // language info 2010-11-15 Marcelo Roberto Jimenez Added the convenience function UpnpResolveURL2() to upnptools.c. This function avoids some unnecessary memory allocation. The memory alloc'd by this function must be freed later by the caller. 2010-11-10 Fabrice Fontaine Add GENA_NOTIFICATION_xxx_TIMEOUT variable. Currently, in notify_send_and_recv function, pupnp waits for HTTP_DEFAULT_TIMEOUT seconds when trying to send a GENA notification. When there is a lot of notifications with CPs which was disconnected without unsubscribing, all the pupnp threads are blocked on this timeout. To correct, this issue, this patch adds a new variable, GENA_NOTIFICATION_SENDING_TIMEOUT, which can be used to lower the timeout so GENA threads return quickly when writing is impossible. By the same mean, pupnp waits the CP's answer to the NOTIFY for HTTP_DEFAULT_TIMEOUT seconds, so this patch adds a new variable, GENA_NOTIFICATION_ANSWERING_TIMEOUT, to customize this value. 2010-11-10 Fabrice Fontaine Add --disable-blocking-tcp-connections flag. Currently, pupnp is using a blocking connect to sends GENA notifications. As a result, when there is a lot of notifications with CPs which were disconnected without unsubscribing, all the pupnp threads are blocked for 20s (timeout). To correct this issue, this patch replace the call to connect with a call to private_connect and add a compilation flag to disable blocking TCP connections, so if we are not able to connect to the CP, the notification is lost. 2010-11-07 Stefan Sommerfeld Several patches for windows compatibility and fixing warnings. 2010-11-07 Marcelo Roberto Jimenez PTHREAD_MUTEX_RECURSIVE on DragonFly is an enum. SF Bug Tracker - ID: 3104527 Submitted: OBATA Akio ( obache ) - 2010-11-07 07:10:28 BRST In threadutil/inc/ithread.h, it is expected that PTHREAD_MUTEX_RECURSIVE is defined as macro. But on DragonFly BSD, it is defined as enum, so not works as expected. Attachment patch treat that DragonFly BSD always have PTHREAD_MUTEX_RECURSIVE. 2010-11-07 Marcelo Roberto Jimenez ftime(3) in -lcompat should not be checked. SF Bug Tracker - ID: 3104521 Submitted: OBATA Akio ( obache ) - 2010-11-07 07:03:44 BRST In configure.ac AC_CHECK_FUNCS(ftime,, [AC_CHECK_LIB(compat, ftime)]) But since version 1.6.3, ftime(3) is not used, so it should be removed, or introduce unwanted linkage with -lcompat. ******************************************************************************* Version 1.6.9 ******************************************************************************* 2010-11-06 Marcelo Roberto Jimenez Fix for bug introduced in samples code in svn revision 502, commit git:25c908c558c8e60eb386c155a6b93add447ffec0 Sample device and combo were aborting with the message: "***** SampleUtil_Initialize was called multiple times!" 2010-11-06 Fabrice Fontaine Make multiple SSDP advertisements faster. Put the loop to send multiple copies of each SSDP advertisements in ssdp_server.c instead of ssdp_device.c so we have only one call to imillisleep ( SSDP_PAUSE ) to speed up advertisements. 2010-11-05 Fabrice Fontaine Removing unused NUM_COPY variable. Previously, NUM_COPY was used in ssdp_device.c to send multiple copies of each advertisements but also multiple replies to each M-SEARCH request. As sending multiple replies is not compliant with HTTPU/MU spec, NUM_COPY has been set to 1 in an older patch. However, as this variable is not needed and has been replaced with SSDP_COPY, it has been removed. 2010-11-05 Fabrice Fontaine Use SSDP_COPY to send multiple SSDP advertisements. Currently, SSDP_COPY is used only to send multiple M-SEARCH requests (in ssdp_ctrlpt.c). With this patch, SSDP_COPY is also used to send multiple copies of each advertisements packets (in ssdp_device.c). 2010-11-01 Carl Benson Fix for Android build. I had to do some modifications myself though, because the Android build system insists on having a file named "util.h" taking precedence in its include path, libupnp gets confused because of the same filename in upnp/src/inc/util.h ******************************************************************************* Version 1.6.8 ******************************************************************************* 2010-10-20 Marcelo Roberto Jimenez Fix a long date memory leak in webserver.c:StrStr(). 2010-10-19 Marcelo Roberto Jimenez Bug fix in select of miniserver.c Fix a bug in miniserver.c, in which maxMiniSock was wrongly declared as unsigned int and as a result it was being set to ((unsigned int)(-1)). As a result, after being incremented, it became zero, and this value was being used in the select() call. Thanks to Fabrice Fontaine for helping and testing with this issue. 2010-10-15 Marcelo Roberto Jimenez Fix for 100% CPU issue in select() in miniserv.c. I have also removed the sleep() call, it was just a workaround. SF Bug Tracker [ 3086852 ] 99% CPU loop in miniserver.c on a non ipv6 system. Submitted by: Jin ( jin_eld ) - 2010-10-13 19:29:13 UTC I cross compiled libupnp 1.6.7 for ARM9 using the --disable-ipv6 option, my system is an ipv4 only setup. I do not know why this problem only appears when running the app in the background (for instance using nohup &), but then it starts using 99% CPU. I traced the problem down to the select() call in miniserver.c in the RunMiniServer() function. Select returns code 1, but errno is set to "Socket operation on non-socket", I also see this when running my app under strace. I set all ...Sock6 variables to INVALID_SOCKET to make sure that they do not get added to the FD_SET and the problem is gone. ******************************************************************************* Version 1.6.7 ******************************************************************************* 2010-10-01 Fabrice Fontaine Adding --disable-notification-reordering option Adding a configure flag to disable GENA notification reordering as even with an imillisleep(1), this mechanism consumes too much CPU on embedded devices when there is a burst of notifications. 2010-09-30 Fabrice Fontaine Bug fix when there is no service in embedded devices When a device with embedded devices (like IGD) when created and one of the embedded devices did not have any service, there was a Segmentation Fault (see SF Tracker [ 2688125 ]). Original SF Tracker issue follows: SF Tracker [ 2688125 ] v1.6.6 crashes on sub devices without services Submitted by: Arno Willig ( akw ) - 2009-03-15 22:45:23 BRT I discovered a bug, which will make libupnp (1.6.6) segfault, when you create a upnp description document with multiple devices which have sub devices, but no own services. The crash occurs in genlib/service_table.c in line 977: end->next = getServiceList( currentDevice, &next_end, URLBase ); In this case "end" seems not to be defined, so end->next crashes. Can anyone confirm this, please? 2010-09-28 Marc Essayan Bug fix on burst of GENA notification When a lot of notifications were generated by a device in a short period of time then 100% of the CPU was used to reorder those notifications by pushing back the thread in the job queue. This mechanism has been modified so now thread sleep 1 ms before being pushed back into the job queue. Removing DEFAULT_SCHED_PARAM parameter and use sched_get_priority_min(DEFAULT_POLICY) instead. 2010-09-22 Fabrice Fontaine Bug fix on M-SEARCH response Devices must respond to M-SEARCH requests for any supported version and the response should specify the same version as was contained in the search target. Previously, the device did not answer if the M-SEARCH request did not contain the same version number than the version number of the device. 2010-09-21 Fabrice Fontaine Add Content-Language iff Accept-Language Add Content-Language header in the response if and only if there is an Accept-Language header in the request. 2010-09-21 Fabrice Fontaine Addition of WEB_SERVER_CONTENT_LANGUAGE parameter This patch adds the WEB_SERVER_CONTENT_LANGUAGE parameter so the user can specify the language used by the device during Description and Presentation steps of UPnP through the HTTP CONTENT-LANGUAGE header. By default, the WEB_SERVER_CONTENT_LANGUAGE is an empty string so no CONTENT-LANGUAGE is added. 2010-09-18 Fabrice Fontaine Customize the stack size of the threads used by pupnp through the new THREAD_STACK_SIZE variable. This patch allows a user to customize the stack size of the threads used by pupnp through the new THREAD_STACK_SIZE variable. This is especially useful on embedded systems with limited memory where the user can set THREAD_STACK_SIZE to ITHREAD_STACK_MIN. However, as this modification can have side effects, I set 0 as the default value, so threads will continue to use the default stack size of the system (which varies greatly as stated in https://computing.llnl.gov/tutorials/pthreads/). 2010-09-16 Fabrice Fontaine Broken IPv6. IPv6 is currently broken in latest release of branch-1.6.x, so find a patch attached that correct the issue (small fixes on define, undef and retVal). 2010-09-10 Warwick Harvey Patch to take notice of UPNP_USE_RWLOCK flag The configure.ac file included with UPnP checks for the presence of the pthread_rwlock_t type, and then sets the value of the UPNP_USE_RWLOCK flag appropriately. However, this flag is not referenced at all in the source code, and thus the code does not compile on systems that don't have the pthread_rwlock_t type (such as Android). Please find attached a patch (against the current 1.6.x head) that checks the value of this flag and falls back on using mutexes if read-write locks are not available. 2010-09-10 Jean Sigwald I discovered a reliable denial-of-service issue on the last stable release of libupnp (1.6.6) remotely triggerable by any unauthenticated user. The issue is related with a bad parsing of malformed XML. 2010-09-10 Chandra Penke * SF Patch Tracker [ 2854711 ] Patch for Solaris10 compilation and usage Submitted By: zephyrus ( zephyrus00jp ) Patch for Solaris10 compilation and usage. 2010-09-10 Chandra Penke Add support for conditionally enabling ipv6. 2010-09-10 Chandra Penke Fix for compilation in debug builds. Ensure internal methods are declared as static since debug builds don't inline. 2010-09-09 Chandra Penke Fix for regression in SSDP code to send/receive messages over UDP Sending messages over UDP is broken in some Apple OSes such as OS X and iOS. This might be broken in other OSes to but didn't verify. The fix is to modify the socket length argument of sendto to use the correct sockaddr length depending on whether the socket is IPV4 or IPV6. Also added some error checks and debugging related to the issue 2010-09-07 Marcelo Jimenez Using UpnpReadHttpGet to download large files causes the application to crash. This happens when the file being downloaded exceeds the device memory - entirely possible when transferring video files. The programmatic cause is that the logic implemented in the function http_ReadHttpGet (which UpnpReadHttpGet calls) reads the entire file into memory. The fix modifies the existing logic to discard data after it's been read; there's no reason to keep it around since the caller of UpnpReadHttpGet already has a copy of it. This issue exists in 1.6.6 as well as the latest sources. Patch submitted by Chandra (inactiveneurons). 2010-09-07 Marcelo Jimenez In the latest sources, http_RequestAndResponse and other methods that use connect() are broken. More specifically, connect() in these methods is returning with an EINVAL. The programmatic cause is that the address_len argument passed to connect() is different in IPV4 vs IPV6 (as described in: http://www.opengroup.org/onlinepubs/009695399/functions/connect.html). The current code always uses the IPV6 size. The fix modifies each use of connect() to use the correct size based on the address family being used. Patch submitted by Chandra (inactiveneurons). 2010-09-07 Marcelo Jimenez Fix compilation error in upnp/src/gena/gena_ctrlpt.c (this is most likely an error on all platforms). Patch submitted by Chandra (inactiveneurons). 2010-09-07 Marcelo Jimenez Fix compilation error in upnp/src/inc/ssdplib.h when compiling in OS X (the netinet/* headers are not available). Patch submitted by Chandra (inactiveneurons). 2010-09-07 Marcelo Jimenez Fix compilation error in ixml/inc/ixml.h when compiling with an Objective-C compiler (when cross-compiling for iPhone devices). Patch submitted by Chandra (inactiveneurons). 2010-08-21 Marcelo Jimenez * Issue regarding the GENA notifications. A string termination indicator was added at the end of the notification ("\r\n") in notify_send_and_recv() in upnp/src/gena/gena_device.c. Patch by Fabrice Fontaine. 2010-08-21 Marcelo Jimenez * The last part of Ronan Menard's patch. 2010-08-21 Marcelo Jimenez * upnp/src/ssdp/ssdp_device.c: Fix for IPV6 ULA/GUA issues. * upnp/src/ssdp/ssdp_ctrlpt.c: Fix for IPV6 ULA/GUA issues. * upnp/src/ssdp/ssdp_server.c: Fix for IPV6 ULA/GUA issues. Patch submitted by Ronan Menard. 2010-08-21 Marcelo Jimenez * upnp/src/genlib/miniserver/miniserver.c: Fix for IPV6 ULA/GUA issues. Patch submitted by Ronan Menard. 2010-08-21 Marcelo Jimenez * gena_subscribe(): Fix for IPV6 ULA/GUA issues. Patch submitted by Ronan Menard. 2010-08-21 Marcelo Jimenez * SOCKET ssdpSock6UlaGua: created variable for later use. Patch submitted by Ronan Menard. 2010-08-21 Marcelo Jimenez * SSDP_IPV6_SITELOCAL: new macro. Patch submitted by Ronan Menard. 2010-08-21 Marcelo Jimenez * The scope of the macro NUM_HANDLE is now restricted to upnpapi.c. 2010-08-21 Marcelo Jimenez * InitHandleList() has never been implemented, I guess no one has ever called it, so remove it. * GetFreeHandle() and FreeHandle() are now static as they should. 2010-08-21 Marcelo Jimenez * New internal buffer added to store global/ula IPV6 address. * Macros to test whether an IPV6 address is global or ula. * UpnpGetServerUlaGuaIp6Address(): added interface. * IN6_IS_ADDR_GLOBAL, IN6_IS_ADDR_ULA: new macros. * gIF_IPV6_ULA_GUA: new buffer. * UpnpRegisterRootDevice3(): Change to the test of already registered devices for IPV6. * UpnpGetIfInfo(): gua/ula issues. Patch submitted by Ronan Menard. 2010-08-19 Marcelo Jimenez * libUPnP does support IPV6 now. Patch submitted by Ronan Menard. 2010-08-19 Marcelo Jimenez * HTTP version equal to 1.0 should fail as required by the UPnP certification tool. Patch submitted by Ronan Menard. 2010-06-28 Marcelo Jimenez SF Bug Tracker [ 3022490 ] String declaration fix for patch applied in 3007407 Hello, When my patch for tracker ID 3007407 was accepted, the definition of the serviceList string was changed from #define SERVICELIST_STR "serviceList" to static const char *SERVICELIST_STR = "serviceList"; During internal code review of the final patch, it was pointed out that sizeof(SERVICELIST_STR) == 4 since SERVICELIST_STR is now declared as a pointer instead of an array. If you wish to use a variable instead of a define, I suggest the following instead: static const char SERVICELIST_STR[] = "serviceList"; Thanks, Chuck Thomason 2010-06-10 Marcelo Jimenez SF Bug Tracker [ 3007407 ] Service traversal issue in AdvertiseAndReply() Submitted: Chuck Thomason ( cyt4 ) - 2010-05-26 15:07:39 UTC When the UPnP server is started, one alive message is broadcast for each service in each device. It appears that libupnp's implementation of the alive message generation does not correctly navigate the XML description document when locating the services. This can result in the wrong UDN being used in the alive message sent for a service. In my specific case (see attached XML), the root EchoSTB device contains no services, but its embedded MediaServer device contains 2 services. When the existing libupnp code traverses the EchoSTB device in the XML, it searches the global list of serviceLists within the document instead of searching for a serviceList that is its direct child node. The ContentDirectory and ConnectionManager services are then announced with the UDN of EchoSTB1 (the root device) instead of with the UDN of MediaServer, which is actually their parent device. I discovered this behavior using libupnp-1.6.6. I have generated a patch against branch-1.6.x that corrects the XML navigation such that all services are traversed from their parent device, which results in the correct UDN being sent in the alive message for each service. I built from branch-1.6.x without this patch, tested, and confirmed that the issue still exists as I observed it in libupnp-1.6.6. I then built from branch-1.6.x with this patch, tested, and confirmed that the issue was resolved. Thanks, Chuck Thomason 2010-05-07 Marcelo Jimenez SF Bug Tracker [ 2995758 ] libupnp 1.6.6, wrong bind when reuseaddr is 1. Submitted: viallard anthony ( homer242 ) When trying to use reuseaddr option in miniserver/miniserver.c, there isn't a affectation of the port chosen (serverAddr.sin_port isn't receive listen_port variable value). 2010-04-25 Marcelo Jimenez Define PROTOTYPES to be one by default in global.h. This affects the RSA MD5 code. 2010-03-27 Nick Leverton Subscription auto-renewals copy the renewal time from old subscription. 2010-03-27 Marcelo Jimenez * Added API to ithread, created the following functions: - int ithread_initialize_library(void); - int ithread_cleanup_library(void); - int ithread_initialize_thread(void); - int ithread_cleanup_thread(void); * SF Bug Tracker [ 2876374 ] Access Violation when compiling with Visual Studio 2008 Submitted: Stulle ( stulleamgym ) - 2009-10-10 19:05 Hi, I am one of the devs of the MorphXT project and I use this lib in some other of my projects, too. When I tried to upgrade the lib earlier for one of my projects I had to realise that something did not work at first and while most of the things were reasonably ease to be fixed. Now, the last thing I encountered was not so easy to fix and I am uncertain if my fix is any good so I'll just post it here and wait for some comments. The problem was that I got an Access Violation when calling "UpnpInit". It would call "ithread_rwlock_init(&GlobalHndRWLock, NULL)" which eventually led to calling "pthread_cond_init" and I got the error notice at "EnterCriticalSection (&ptw32_cond_list_lock);". It appeared that "ptw32_cond_list_lock" was NULL. Now, I found two ways to fix this. Firstly moving the whole block after at least one of the "ThreadPoolInit" calls will fix the issue. Secondly, you could add: #ifdef WIN32 #ifdef PTW32_STATIC_LIB // to get the following working we need this... is it a good patch or not... I do not know! pthread_win32_process_attach_np(); #endif #endif right before "ithread_rwlock_init(&GlobalHndRWLock, NULL)". Just so you know, I am using libupnp 1.6.6 and libpthreads 2.8.0 and both are linked static into the binaries. I am currently using Visual Studio 2008 for development with Windows being the target OS. Any comment at your end? Regards, Stulle 2010-03-27 Marcelo Jimenez * SF Patch Tracker [ 2836704 ] Patch for Solaris10 compilation and usage. Submitted By: zephyrus ( zephyrus00jp ) This second part covers the issue on linking with -lsocket -lnsl -lrt. 2010-03-21 Marcelo Jimenez * SF Bug Tracker [ 2392166 ] ithread_detach not called for finished worker thread Submitted: Ulrik ( ulsv_enea ) - 2008-12-05 08:24 Valgrind reports a memory leak due to that the function ithread_detach is not called for finished worker threads in ThreadPool.c. ==21137== 2,176 bytes in 8 blocks are possibly lost in loss record 5 of 5 ==21137== at 0x4C20F3F: calloc (vg_replace_malloc.c:279) ==21137== by 0x4010F58: _dl_allocate_tls (in /lib/ld-2.6.1.so) ==21137== by 0x544BA92: pthread_create@@GLIBC_2.2.5 (in /lib/libpthread-2.6.1.so) ==21137== by 0x5F94592: CreateWorker (ThreadPool.c:639) ==21137== by 0x5F95079: ThreadPoolInit (ThreadPool.c:784) I'm using libupnp 1.6.6 For more info on pthread_detach, see: http://gelorakan.wordpress.com/2007/11/26/pthead_create-valgrind-memory-lea k-solved/ 2010-03-21 Marcelo Jimenez * SF Bug Tracker [ 2392304 ] Memory leak in SSDP AdvertiseAndReply Submitted: Ulrik ( ulsv_enea ) - 2008-12-05 08:24 Valgrind reports a memory leak function in AdvertiseAndReply (ssdp/ssdp_server.c) in libupnp 1.6.6 There are continue statements in many places in AdvertiseAndReply. In some of those error handling cases the variable nodelist is not freed before continuing to the next iteration. The next iteration will take care of freeing the nodelist from the previous iteration in most cases, but not when breaking out of the for loop after the last element. I believe this memory leak can be solved by making sure that the rows ixmlNodeList_free( nodeList ); nodeList = NULL; are always executed, also in the beginning of the last iteration when we found out that there are not more elements. ==29110== at 0x4C21C16: malloc (vg_replace_malloc.c:149) ==29110== by 0x5D8DE0E: ixmlNodeList_addToNodeList (nodeList.c:106) ==29110== by 0x5D8B7E2: ixmlNode_getElementsByTagNameRecursive (node.c:1438) ==29110== by 0x5D8E587: ixmlElement_getElementsByTagName (element.c:491) ==29110== by 0x5B6C0F1: AdvertiseAndReply (ssdp_server.c:201) ==29110== by 0x5B7AB74: UpnpSendAdvertisement (upnpapi.c:1495) 2010-03-21 Marcelo Jimenez * libupnp and multi-flows scenario patch Submitted by Carlo Parata from STMicroelectronics. Hi Roberto and Nektarios, after an analysis of the problem of libupnp with a multi-flows scenario, I noticed that the only cause of the freezed system is the ThreadPool management. There are not mutex problems. In practice, if all threads in the thread pool are busy executing jobs, a new worker thread should be created if a job is scheduled (I inspired to tombupnp library). So I solved the problem with a little patch in threadutil library that you can find attached in this e-mail. I hope to have helped you. 2010-03-21 Marcelo Jimenez * SF Patch Tracker [ 2964973 ] install: will not overwrite just-created ...blah... with... Submitted: Nick Leverton ( leveret ) - 2010-03-07 05:18 Full error: /usr/bin/install: will not overwrite just-created `/tmp/build/libupnp-1.6.6/debian/tmp/usr/share/doc/libupnp3-dev/examples/s ample_util.c' with `common/sample_util.c' This seems to be from Automake 1.11 which doesn't like having duplicate files in a Makefile.am. Patch attached, kindly provided by Stefan Potyra for Debian (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=543068) This fix will be needed for both 1.6.x and 1.8.x branches. 2010-03-21 Marcelo Jimenez * Backport of svn revision 504: SF Patch Tracker [ 2969188 ] 1.8.0: patch for FreeBSD compilation Submitted By: Nick Leverton (leveret) Fix the order of header inclusion for FreeBSD. 2010-03-21 Marcelo Jimenez * SF Patch Tracker [ 2836704 ] Patch for Solaris10 compilation and usage. Submitted By: zephyrus ( zephyrus00jp ) Obs by Marcelo: The issue with linking with -lsocket -lnsl -lrt is not covered in this changeset because I don't have solaris to test. I will need some help from zephyrus in this regard. The issue will be addressed in a future changeset. Compilation for solaris I have used gcc3.x and gcc4.x under solaris 10 for x86 / 64 bits. A couple of Source file fixes were necessary for successful compilation and runtime behavior. threadutil/src/ThreadPool.c POSIX sched_setschduler() returns non-negative value for success. Without the fix, UpnpInit() fails immediately. upnp/src/api/upnpapi.c There is a typo of a macro name "__sun" in one of the CPP conditional. Without the fix, the compilation aborts due to unknown constant in socket ioctl call. A few structs and an array is not properly initialized. Well, I think it may be safe as is, but when I checked it using purify evaluation version, it was reported that uninitialized iszBuffer may cause read of uninitialized memory. So play it safe. Configure issue. This has to be more of a configure magic. To link a program successfully using network, we need -lsocket and -lnsl library specifications on the link line. We also need -lrt for programs that use thread scheduling features. The sample program under upnp/sample requires -lsocket -lnsl -lrt for successful linking. I added -lsocket -lnsl -lrt to Makefile.in. configure probably needs to take care of these. I don't know much about configure, automake, etc., so I am just raising a flag here. TIA 2010-03-20 Marcelo Jimenez * SF Patch Tracker [ 2836704 ] Search for nested serviceList (not stopping at the first lis Submitted By: zephyrus ( zephyrus00jp ) Internet Gateway Device description contains nested serviceList (rootdevice -> servicelist, subdevice and subdevice has the lower-level serviceList, etc..) Unfortunately, the sample code sample_util.c used by tv_device sample, etc. has a code that looks for only the first top-level serviceList. This results in the failure to read all the services of an IGD xml description. Attached patch modifies this behavior and looks for the service by visiting all the serviceList in xml document in turn. With the modified patch (ad additional modification), I could simulate an IGD device and created a modified control program for that. Patch against 1.6.6 TIA. 2010-03-15 Marcelo Jimenez * SF Patch Tracker [ 2203721 ] timeb.h check obsolete 2010-03-15 Marcelo Jimenez * SF Patch Tracker [ 2970872 ] Update ErrorMessages for latest return code list Submitted By: Nick Leverton ( leveret ) ErrorMessage[] in upnptools.c has got a bit out of sync, the attached patch (generated from grep 'define UPNP_E_') should bring it up to date. 2010-03-15 Marcelo Jimenez * SF Patch Tracker [ 2857611 ] Declare a few functions to have proper (void) argument list. Submitted By: zephyrus ( zephyrus00jp ) In a publicly installed headers, a few functions are declared without any arguments at all, a la "()". When I used gcc's -Wimplict and -Wstrict-prototypes to check for the mismatch of function prototype declarations and their usage in my own program, some headers from libupnp-1.6.6 produced warnings. They are not strictly bugs, but pretty much annoying. This is 2009, and almost all the important compilers understand ISO-C. So the offending functions are declared as "(void") to show that they have no arguments at all. 2010-03-14 Marcelo Jimenez * SF Patch Tracker [ 2546532 ] Missing carriage return between SOAPACTION and User-Agent headers. There is something going wrong in soap_ctrlpt.c at line 931 (based on version 1.6.6 release). The http_Makemessage call looks as follows: if (http_MakeMessage( &request, 1, 1, "Q" "sbc" "N" "s" "s" "Ucc" "sss", SOAPMETHOD_POST, path.buf, path.length, "HOST: ", host.buf, host.length, content_length, ContentTypeHeader, "SOAPACTION: \"urn:schemas-upnp-org:control-1-0#QueryStateVariable\"", xml_start, var_name, xml_end ) != 0 ) { return UPNP_E_OUT_OF_MEMORY; } This will result in the SOAPACTION header to be immediately followed by the User-Agent header, while a cr-lf should separate the two. I propose to fix this by changing the second "s" to "sc" to force the addition of a cr-lf after the SOAPACTION. This looks consistent to the other Makemessage calls. 2009-03-06 Oxygenic * parameter problem fixed in soap_request_and_response(), 2nd call to http_RequestAndResponse() was wrong (thanks to Kim Kyungsan) 2008-07-25 Marcelo Jimenez * Added upnp/m4/libupnp.m4 to the distribution tarball. 2008-07-25 Marcelo Jimenez * Fixed a missing HandleUnlock() in upnp/src/gena/gena_device.c. 2008-07-24 Marcelo Jimenez * SF Bug Tracker [ 2026431 ] pupnp does not build on GNU/KfreeBSD. Submitted By: Nick Leverton - leveret Gnu/KFreeBSD is one of the Debian architectures, it includes a FreeBSD kernel with GNU user space (glibc etc). The Gnu/KfreeBSD developers provided the attached patch to test the appropriate #define and allow pupnp to build in their environment, and asked me to forward it to you. Since the test is a simple check for defined(__GLIBC__), this would presumably also help with other ports of GNU libc to non-Linux kernels. 2008-07-16 Marcelo Jimenez * Andre Sodermans (wienerschnitzel) patch for building libupnp under windows systems with VC9. This one fixes a missing include. 2008-06-30 Marcelo Jimenez * Added an m4 macro to deal with finding libupnp in the users' configure script. 2008-06-11 Marcelo Jimenez * Fixed a buffer overflow due to a bug in the calculation of the CONTENT-TYPE header line size, the length was being calculated with the wrong string, there was a missing colon. 2008-06-02 Marcelo Jimenez * SF Bug Tracker [ 1942285 ] UpnpCreatePropertySet can leak memory. Submitted By: Bob Ciora - bobciora In file upnp/src/api/upnptools.c, function UpnpCreatePropertySet can leak memory if no additional arguments are passed. This is because of the 'return' statement at (or near) line 554. The prior call to ixmlParseBufferEx may succeed. This causes a basic ixml tree to be created. The return statement at line 554 leaves this tree in memory without cleaning it up. There are two options: either add code prior to the return at 554 to clean up the tree, or simply allow a NumArg parameter of 0 to be passed. I prefer the second method -- there doesn't seem to be any need to pass *any* arguments to this function. In my local copy of upnptools.c, I have simply replaced the "return NULL" in line 554 to "return PropSet". I've attached the source file. 2008-05-26 Marcelo Jimenez * SF Bug Tracker [ 1903069 ] Subs (not services) not marked 'active' Submitted By: Bob Ciora - bobciora If the UpnpAcceptSubscription is not called, the subscription is not marked as "active", so no state variables will ever be sent. I have a "lazy" architecture where a service may not be ready to publish any state data at the time of a subscription. Subscriptions are still accepted, there's just nothing to send, so UpnpAcceptSubscription is never called. As a result, the subscription is never marked as "active" via the genaInitNotify functions. A best course of action would be to modify UpnpAcceptSubscription<...> functions so that they can accept *no* initial state information, but can still result in the subscription being marked as active. Technically, then, the "active" flag should be set here, not in the genaInitNotify<...> functions. But the UpnpAccept functions don't muck with the subscription table, and it's more work than it's worth to move that code from the gena functions to the upnpapi functions. So--- what I've done to correct this problem is to modify both UpnpAcceptSubscription<...> functions (in upnpapi.c) to accept an empty state list and still call the gena layer functions. The gena layer genaInitNotify<...> functions (gena_device.c) then mark the subscription as "active" *before* checking for an empty state set. In genaInitNotify, a check for "var_count <= 0" is added immediately after the "subs->active = 1;" line. If this occurs, then all cleanup is performed and the function returns GENA_SUCCESS (since now, an empty state list is not an error). The same check is made for "PropSet == 0" in genaInitNotifyExt (just after the "subs->active = 1;" line). I've modified my proxy layer to call UpnpAcceptSubscriptionExt even when there is no state data to send. With the suggested changes to gena_device.c, later state changes are sent correctly. This has solved my problem. 2008-04-28 Marcelo Jimenez * Fix in function SetSeed() in threadutil/src/ThreadPool.c for CYGWIN compilation. Thanks to Gary Chan. ******************************************************************************* Version 1.6.6 ******************************************************************************* 2008-04-24 Marcelo Jimenez * Added thread id's to the UpnpPrintf debug messages. Thanks to Charles Nepveu for the idea. 2008-04-24 Marcelo Jimenez * SF Bug Tracker [ 1948586 ] Uppercase U in in "xmlns:U" in Invoke Action causes seg. f. Submitted By: Thomas Norheim - kjakan_no Device no longer segfaults with the following malformed xml action: 2 2008-04-23 Marcelo Jimenez * Use -O0 in debug builds so that variables do not get optimized out. 2008-04-10 Marcelo Jimenez * Apostolos Syropoulos changes for OpenSolaris x86. 2008-03-20 Marcelo Jimenez * Andre Sodermans (wienerschnitzel) patch for building libupnp under windows systems with VC9. 2008-03-20 Marcelo Jimenez * Andre Sodermans (wienerschnitzel) patch for building libupnp under windows systems with VC8. 2008-03-08 Marcelo Jimenez * Fixed a printf format problem on the upnp_tv_device.c from both upnp/sample/tvdevice and upnp/sample/tvcombo directories. The variable port was a short int instead of an unsigned short and it was being print as a negative value. 2008-03-08 Marcelo Jimenez * SF Bug Tracker [ 1902668 ] Cannot compile on MSVC Submitted By Luke Kim - nereusuj Version 1.6.5 cannot be compiled because of some changes in 1.6.3. MSVC does not support stdint.h, gettimeofday(), sys/param.h, const int variables in array size and Windows does not define _WINDOWS_ but define _WINDOWS. * MSVC does not understand "const int"'s as declarators of array dimensions, we must use #define'd constants. * Use WIN32 instead of _WINDOWS_ or _WINDOWS. 2008-02-22 Marcelo Jimenez * No longer ignore "upnp:rootdevice" advertisement. Thanks to Bob Ciora. 2008-02-10 Marcelo Jimenez * Changed "sys_errlist[errno]", which is deprecated, by "strerror_r()", which is thread safe. 2008-02-06 Marcelo Jimenez * Slightly improved error report by showing the sys_errlist string corresponding to errno. 2008-02-06 Marcelo Jimenez * Got rid of two useless constants: UPNP_SOCKETERROR and UPNP_INVALID_SOCKET. They both mean the same, that a network API function has failed. -1 is the value to check, not an invented constant. ******************************************************************************* Version 1.6.5 ******************************************************************************* 2008-02-02 Marcelo Jimenez * Peter Hartley's fix for wrong sized variable being passed to http_MakeMessage() on 64 bit architectures. ******************************************************************************* Version 1.6.4 ******************************************************************************* 2008-01-23 Marcelo Jimenez * Workaround for a problem with the new automake AM_CONDITIONAL macro from autotools-1.10. Thanks to Ingo Hofmann for helping with debugging this one. 2008-01-22 Marcelo Jimenez * Added quoting to macros AC_CONFIG_AUX_DIR, AC_CONFIG_MACRO_DIR and AC_CONFIG_SRCDIR in configure.ac. Also changed the name of the auxiliary directory in AC_CONFIG_AUX_DIR to build-aux. 2008-01-22 Marcelo Jimenez * Fix for setsockopt() in Threadpool.c to allow more than one process to join the multicast-group on OSX. Thanks to Ingo Hofmann. 2008-01-22 Marcelo Jimenez * Using defined(__OSX__) || defined(__APPLE__) instead of just defined(__OSX__) in the code. Thanks to Ingo Hofmann and Chris Pickel. 2008-01-21 Marcelo Jimenez * Fix for isFileInVirtualDir. Thanks to Peter Hartley for the patch. 2008-01-07 Marcelo Jimenez * Putting back a "defined(__OSX__)" that has been removed in the previous *BSD patch. Thanks to Chris Pickel for pointing it out. 2008-01-07 Marcelo Jimenez * SF Patches Tracker [ 1865812 ] typo in docs comment Submitted By: Hartmut Holzgraefe - hholzgra typo in docs comment [-302] Also, the documentation file name was misspelled and was corrected in the Makefile.am. ******************************************************************************* Version 1.6.3 ******************************************************************************* 2007-12-25 Marcelo Jimenez * Using pthread flags for the whole project, not just at the places individually indicated by several Makefile.am files spread all over the directories. That was too much error prone. 2007-12-24 Marcelo Jimenez * Added a configure test to check if pthread_rwlock_t is available. Define _GNU_SOURCE if needed. The fallback behavior will only be implemented if _GNU_SOURCE proves to be insufficient on some platforms. Thanks to Jonathan Casiot (no_dice) and Robert Gingher (robsbox). 2007-12-17 Marcelo Jimenez * Removed unused iasnprintf.{c,h} files. 2007-12-17 Marcelo Jimenez * Removed STATSONLY() macro from ThreadPool.{c,h}. * Removed time() usage from ThreadPool.c. * Fixed STATS = 0 compilation. 2007-12-16 Marcelo Jimenez * Library was not compiling on FreeBSD 7. Code now no longer uses ftime(), using gettimeofday() instead. Thanks to Josh Carroll. ******************************************************************************* Version 1.6.2 ******************************************************************************* 2007-12-10 Marcelo Jimenez * Fixed a compilation error due to a missing #ifdef in upnp/src/genlib/miniserver/miniserver.c. Thanks to Eugene Christensen. 2007-11-12 Marcelo Jimenez * "make check" was failing because ixml/test/test_document.sh did not have the executable flag set. Thanks to Steve Bresson. 2007-11-12 Marcelo Jimenez * Fixed a memory leak in upnpapi.c to delete gMiniServerThreadPool in the call to UpnpFinish(). Thanks to Fabrice Fontaine. 2007-11-09 Marcelo Jimenez * Added a isleep() call to the error handler of select() in RunMiniServer(), so that it does not take 100% cpu in case select() fails repeatedly. ******************************************************************************* Version 1.6.1 ******************************************************************************* 2007-11-07 Marcelo Jimenez * SF Bug Tracker [ 1825278 ] AdvertiseAndReply sleeps with handle lock out Applied patch from Alex (afaucher) to change some write locks to read locks. 2007-11-06 Marcelo Jimenez * Adjusting libtool library numbers to reflect the last changes. 2007-11-06 Marcelo Jimenez * SF Bug Tracker [ 1825278 ] AdvertiseAndReply sleeps with handle lock out GlobalHndMutex, which was a mutex is now GlobalHndRWLock, which is a rwlock. HandleLock() is mapped to HandleWriteLock() while all other instances have not been checked. One instance in AdvertiseAndReply() has been changed to HandleReadLock(). Thanks to Alex (afaucher) for the bug report and suggestions. 2007-11-06 Marcelo Jimenez * Added support for rwlocks. 2007-11-05 Marcelo Jimenez * SF Bug Tracker [ 1825929 ] worker thread still alive after UpnpFinish() Submitted By: Luke Kim - nereusuj Worker thread still alive after calling UpnpFinish() because ThreadPoolShutdown() is in the #ifdef DEBUG block. 421 422 #ifdef DEBUG 423 ThreadPoolShutdown( &gSendThreadPool ); 424 ThreadPoolShutdown( &gRecvThreadPool ); 2007-08-28 Marcelo Jimenez * Changed the calls to virtualDirCallback.open(filename, UPNP_WRITE) to (virtualDirCallback.open)(filename, UPNP_WRITE) (notice the parenthesis) due to a change in glibc that produces compilation errors. 2007-08-28 Marcelo Jimenez * Initialization of the "randomness" struct so that valgrind does not complain. 2007-08-06 Marcelo Jimenez * Merge of patch submitted By Keith Brindley - brindlk SF Bug Tracker [ 1762758 ] Seek not working for large files Problem: Requests from the uPnP client to seek to a position beyond 2GB in a large file are handled as a request to see from the 2GB point. Impact: Varies depending on client. The Xbox 360 kills the connection when it realizes. Solution: GetNextRange function (webserver.c) is updated to handle large file sizes. Fix should also recognize when built on a 32bit platform rather than 64 and handle accordingly. 2007-08-05 Marcelo Jimenez * Merge of Mac OS X patch from StÊphane CorthÊsy (davelopper), SF Bug Tracker [ 1686420 ] Modifications for MacOSX. Some of the proposed changes were already done by Rene Hexel's patch. ******************************************************************************* Version 1.6.0 ******************************************************************************* 2007-06-10 Marcelo Jimenez * More fixes to Mac OS X and NetBSD from Rene Hexel: [pupnp-devel] NetBSD & Mac OS X packages and patches Okay, I found a couple more things. I have attached a patch file against the trunk (version 206) that make the repository code compile and run on both Mac OS X and NetBSD. This fixes the following issues: upnp/src/api/upnpapi.c: SIOCGIFCONF didn't work properly, use getifaddrs() instead (on BSD systems). threadutil/src/ThreadPool.c: priorities only work if _POSIX_PRIORITY_SCHEDULING is defined (and greater than 0). threadutil/src/LinkedList.c and threadutil/src/iasnprintf.c: use stdlib.h instead of malloc.h on all BSD systems (not just FreeBSD). This is important, because malloc.h does not exist on Darwin/Mac OS X. Cheers , Rene 2007-06-09 Marcelo Jimenez * [pupnp-devel] NetBSD & Mac OS X packages and patches. Rene Hexel's patch to compile in NetBSD and Mac OS X. 2007-05-26 Marcelo Jimenez * Updated the macro files acx_pthread.m4, ax_cflags_gcc_option.m4, ax_cflags_warn_all.m4, m4/ax_cflags_warn_all_ansi.m4, m4/type_socklen_t.m4. 2007-05-26 Marcelo Jimenez * Fixed an issue with the installation of the file upnpdebug.h. Since the last modifications that removed the macro DEBUG_ONLY, this file must be installed even on a non-debug build. 2007-05-26 Marcelo Jimenez * SF Bug Tracker [ 1711325 ] Bad DestAddr in Upnp_Discovery structure Submitted By: Bob Ciora The field DestAddr of the structure Upnp_Discovery is now a full SOCKADDRIN instead of a pointer to SOCKADDRIN. Commented code suggests that in a previous moment, the function ssdp_handle_ctrlpt_msg() did not use a postponed thread to call ctrlpt_callback(). Now the code uses a thread, and most probably the original data would get lost and the pointer would point to an invalid memory region. This fix caused an interface change in the library and the minor library version was bumped. Also, the libtool library numbers were changed accordingly. ******************************************************************************* Version 1.4.7 ******************************************************************************* 2007-05-26 Marcelo Jimenez * Added support for the Basic Device (http://www.upnp.org/standardizeddcps/basic.asp) as suggested by Titus Winters. 2007-05-25 Marcelo Jimenez * Fixed the file libupnp.pc.in to generate a correct path for the include files. 2007-05-25 Marcelo Jimenez * Removing the Dbg_Level, InitLog, SetLogFileNames and CloseLog defines. These were just aliases, no reason to keep them. 2007-05-25 Marcelo Jimenez * Changed the comments of the include files that expose the UPnP API to use only C89 comments and no C99 comments. 2007-05-24 Nektarios K. Papadopoulos * Added tvcombo sample that demonstrates coexistence of a device and a control point in the same application. 2007-05-24 Nektarios K. Papadopoulos * SF Tracker FR [ 1570020 ]. * Enable both device and control point in the same application. Resolve deadlock in the SSDP processing threads. * Fix Threadpool expansion condition. Thanks to Siva Chandran P. for the original patch. 2007-05-24 Nektarios K. Papadopoulos * Modified tvdevice (control and picture) service descriptions to make compatible with WinXP/IE control point. 'in' arguments must appear before 'out' arguments in argument list. Thanks to Martin Tremblay for pointing out the solution originally provided by MORIOKA Yasuhiro. 2007-05-21 Marcelo Jimenez * More MSVC fixes, using XINLINE instead of inline, MSVC has troubles with inline. Thanks to David Maass for reporting. * Changed XINLINE to UPNP_INLINE. 2007-05-21 Marcelo Jimenez * Added the file build/inc/msvc/inttypes.h. This file is for use with MSVC only, because it does not provide C99 compatibility. 2007-05-18 Marcelo Jimenez * Removed all uses of the DEVICEONLY(x) macro. 2007-05-17 Marcelo Jimenez * Removed all uses of the DBGONLY(x) macro. A static inline empty function now is used and the compiler takes care of optimizing it out. 2007-05-17 Marcelo Jimenez * Fixed a bug in UpnpPrintf, function could call va_start() and return before calling va_end(). 2007-05-15 Marcelo Jimenez * EXPORT_SPEC missing on some declarations in ixml/inc/ixml.h. Thanks to David Maass. 2007-05-15 Marcelo Jimenez * sizeof is unsigned, so %zu is more adequate than %zd. 2007-05-15 Marcelo Jimenez * Using an invented printf directive PRIzu that on MSVC expands to "lu", and on normal C99 compilers expands to "zu". 2007-05-15 Marcelo Jimenez * Rewrote raw_find_str. Now it no longer uses strcasestr(), but it transforms the first input buffer into lowercase. 2007-05-08 Marcelo Jimenez * Fix for debug printf format strings. size_t are not expected in a string format like "%.*s". 2007-05-08 Marcelo Jimenez * Added inttypes.h as a header requirement in configure.ac. 2007-05-11 Marcelo Jimenez * Moved upnp_tv_ctrlpt and upnp_tv_device executables from folder upnp to folder upnp/sample. Moved folder upnp/sample/tvdevice/web to folder upnp/sample/web. This way, if someone compiles the tarball and executes upnp_tv_device from its creation directory, there will be no error -108 for not finding directory web. ******************************************************************************* Version 1.4.6 ******************************************************************************* 2007-04-19 Marcelo Jimenez * Fix for freebsd host_os in configure.ac. ******************************************************************************* Version 1.4.5 ******************************************************************************* 2007-04-19 Marcelo Jimenez * Case insensitive comparison in raw_find_str() (httpparser.c) as suggested by Craig Nelson in SF Tracker [ 1689382 ] DLINK DIR-625 patch. 2007-04-07 Nektarios K. Papadopoulos * Fix for a bug in makeAction where va_arg was being called one extra time. 2007-04-28 Marcelo Jimenez * SF Tracker [ 1703533 ] Patch to make it compile under FreeBSD Submitted By: Timothy Redaelli - drittz I made some patches to make it compile under FreeBSD using gethostbyaddr_r when supported. 2007-04-28 Marcelo Jimenez * [pupnp-devel] Type mixup on x86_64 causes UPNP_E_OUT_OF_MEMORY Submitted By: Glen Masgai after an UpnpSendActionAsync() for example, i get UPNP_E_OUT_OF_MEMORY in the callback using 1.4.4 on a x86_64 system. This happens in http_MakeMessage(), which in some cases get called with wrong types (int instead of size_t) in combination with format "b" and "Q". The attached patch should fix this. ******************************************************************************* Version 1.4.4 ******************************************************************************* 2007-04-06 Marcelo Jimenez * SF Tracker [ 1695399 ] Typo in util.h Submitted By: Luke Kim - nereusuj Unix sleep is in seconds but WIN32 Sleep is in milliseconds. 2007-04-17 Marcelo Jimenez * SF Tracker [ 1652827 ] UpnpRegisterRootDevice returned -104 Submitted By: Michael Andersen - miwer Issue was found to be related to sizeof (size_t) != sizeof (int) on AMD64 systems. Emil Ljungdahl's AMD64 patch has been applied along with some other fixes. Original user report follows: When I run upnpd I get the above mentioned error (UPNP_E_OUT_OF_MEMORY). I've tried with 1.4.1 and 1.4.2-RC3, it's the same. I don't understand why, because I have plenty of RAM, and I even tried closing some applications, but it didn't help. $ upnpd eth1 br0 The following is logged in the /var/log/messages: Feb 6 01:33:47 server upnpd[6933]: Error registering the root device with descDocUrl: http://192.168.0.1:49152/gatedesc.xml Feb 6 01:33:47 server upnpd[6933]: UpnpRegisterRootDevice returned -104 I tried enabling debugging and it looks like it cannot allocate memory through the membuffer_append function. It's weird because it's only a few bytes. Please note, that I enabled some extra debugging lines that were commented, in order to get more information. See attached files. ******************************************************************************* Version 1.4.3 ******************************************************************************* 2007-03-13 Marcelo Jimenez * SF Tracker [ 1663004 ] Compile on Cygwin Submitted By: Jon Foster - jongfoster This patch gives basic support for building under Cygwin - it compiles, links, and a simple UPnP device application can initialize. I'm not sure if it actually works yet, but this is definitely a step in the right direction. Patch is against the 1.4.1 release. Changes are: * threadutil/inc/ithread.h: Fix the ithread mutex support to use documented, portable APIs (if present) rather than the Non-Portable (_NP) ones it uses now. This is required because Cygwin implements only the portable API. * threadutil/src/ThreadPool.c: Fake SetPolicyType() to do nothing on Cygwin because otherwise it fails. Should probably investigate why it fails and add a proper implementation later. * upnp/src/api/upnpapi.c: On Cygwin, zero out the GlobalHndMutex structure before initializing it. Without this, the initialization fails. This appears to be a bug in Cygwin. * upnp/src/genlib/net/uri/uri.c: Use gethostbyname() on Cygwin. 2007-03-05 Oxy * Code adapted and typedefs added to compile cleanly under Windows with Borland C++ Builder and MS Visual C++ 2007-03-03 Marcelo Jimenez * Fixed nasty segmentation fault bug on membuffer.c. ******************************************************************************* Version 1.4.2 ******************************************************************************* 2007-02-09 Marcelo Jimenez * 32/64 bits portability issues on *printf. Use %zd for size_t, and cast to (long long) for off_t. 2007-02-02 Marcelo Jimenez * Bumped the program version to 1.4.2 in config.ac. * Now requires autoconf 2.60. * Fixed docdir use. * Does not install the documentation by default. * Use dist-bzip2 to create a .bz2 distribution file. 2007-01-23 Marcelo Jimenez * SF Tracker [ 1634922 ] Support for large files (>= 2 GiB), part 2 Submitted By: Jonathan Casiot - no_dice Summary: This patch hopefully fixes the remaining types and related code to enable files >= 2 GiB to be streamed. Jonathan claims to have tested this with a patched version of ushare-0.9.8 and a D-Link DSM-520. 2007-01-09 Marcelo Jimenez * SF Tracker [ 1628629 ] Multicast interface patch Submitted By: Fredrik Svensson - svefredrik This patch fixes two problems: 1) Specify the IP address for the interface when we do setsockopt IP_ADD_MEMBERSHIP. This makes it possible to run when no default router has been configured. 2) Explicitly set the multicast interface through setsockopt IP_MULTICAST_IF. Avoids socket error -207 in some cases. * SF Tracker [ 1628590 ] XML parsing segfault patch Submitted By: Fredrik Svensson - svefredrik This patch fixes a segmentation fault problem that occurs when parsing XML code than some routers produce. 2007-01-06 Marcelo Jimenez * SF Tracker [ 1628552 ] XML white space patch Submitted By: Fredrik Svensson - svefredrik * SF Tracker [ 1628562 ] Maximum total jobs patch Submitted By: Fredrik Svensson - svefredrik Also, I incremented the library versions and included some comments in the file configure.ac so that we do not bump the library version excessively, only the necessary numbers on the next release. * SF Tracker [ 1628575 ] Linksys WRT54G patch Submitted By: Fredrik Svensson - svefredrik * SF Tracker [ 1628636 ] SSDP packet copy patch Submitted By: Fredrik Svensson - svefredrik Changed NUM_COPY to 1 since, according to section 9.2 of the HTTPU/MU spec, we should never send more than one copy of a reply to an SSDP request. Ref. section 9.2 of http://www.upnp.org/download/draft-goland-http-udp-04.txt 2006-12-23 Marcelo Jimenez * Thorough revision of every call of http_MakeMessage() due to a bug introduced in rev.79 "largefile patch added". http_MakeMessage() has a worst than brain damaged "printf" like interface. In rev.79, the "N" format parameter must be an off_t. Every call of this function with an "N" format parameter and an int passed on the stack would fail terribly. * SF Bug tracker [ 1590469 ] Typo in ixmlparser.c Submitted By: Erik Johansson - erijo * SF Bug Tracker [ 1590466 ] Invalid xml output Submitted By: Erik Johansson - erijo * SF Patch tracker [ 1581161 ] VStudio2005 patch Submitted By: David Maass - darkservant * SF Patch tracker [ 1587272 ] constified ixml Submitted By: Erik Johansson * Finished constifications as suggested by Erik Johansson in SF Patch tracker [ 1587272 ]. 2006-07-05 Nektarios K. Papadopoulos * [bug-id] 1580440 [submitted-by] Erik Johansson - erijo [patched-by] Erik Johansson - erijo The SOAP HTTP message that's generated on upnp errors is missing a \r\n\ between header and body. 2006-07-07 Oxy * support for large files (>2 GBytes) added ******************************************************************************* Version 1.4.1 ******************************************************************************* 2006-07-07 Oxy * full support for Windows added, static library and DLL are fully working, code compiles with Borland Builder C++ and MS Visual C/C++ 2006-07-05 Nektarios K. Papadopoulos * Include prebuilt documentation (html,pdf), dropping doc++ dependency. 2006-07-03 Marcelo Jimenez * Patch for FreeBSD, thanks to Markus Strobl. 2006-06-26 Marcelo Jimenez * Fix for missing "else" in httpreadwrite.c. Thanks to npapadop for the patch. 2006-06-26 Marcelo Jimenez * Fix for va_list initialization in x86_64 architectures. 2006-06-08 Oxy * Patch to fix memory leaks and reasons for crashes added (thanks to loigu) ******************************************************************************* Version 1.4.0 ******************************************************************************* 2006-05-26 Oxy * defines in iasnprintf.h changed to work with GCC-version < 3 2006-05-22 Oxy * BSD-patch added (not tested yet on an BSD system) 2006-05-19 Oxy * Patch added for bug: ixml parser collapsed on empty args (arg="") 2006-05-18 Oxy * DSM-320 patch added (fetched from project MediaTomb) * httpGet additions added, Added proxy support by introducing UpnpOpenHttpGetProxy. UpnpOpenHttpGet now just calls UpnpOpenHttpGetProxy with the proxy url set to NULL. * Bugfix for typo ("\0" / "0") in ixmlparser.c * Bugfix for M-Search packet ******************************************************************************* FORK FROM DEAD libupnp ******************************************************************************* 2006-04-29 RÊmi Turboult * THANKS: new file with list of contributors * upnp/src/gena/gena_device.c (respond_ok): add 'Content-Length: 0' in subscription response. Patch by Chaos (Bug # 1455367). 2006-04-08 RÊmi Turboult * upnp/doc/UPnP_Programming_Guide.pdf: replace this document with the one in libupnp-doc-1.2.1 because current CVS version was corrupted. 2006-04-06 * changes applied to several files to work under Sparc Solaris, temporarily requiring a define SPARC_SOLARIS 2006-04-03 RÊmi Turboult * upnp/Makefile.am: install upnp samples in $(docdir)/examples 2006-03-28 RÊmi Turboult * configure.ac: add --with-docdir option to choose where documentation is installed (or -without-docdir to not install the documentation) 2006-03-27 RÊmi Turboult * ixml/test: add simple test suite for xml parser 2006-03-26 RÊmi Turboult * ixml/src/ixmlparser.c (Parser_processCDSect): fix bug which prevents CDATA sections which contain a 0 (zero) to be parsed (instead the parsing of the whole document is aborted). Patch by Arno Willig (Patch # 1432124). * configure.ac, upnp/Makefile.am: add "--disable-samples" configure option, and move samples compilation from check_PROGRAMS to noinst_PROGRAMS 2006-03-25 RÊmi Turboult * upnp/src/genlib/miniserver/miniserver.c (get_miniserver_sockets): fix bug if new socket created has fd 0 (can only occur when stdin has been closed). Patch by Oskar Liljeblad 2004-07-02 : http://sourceforge.net/mailarchive/message.php?msg_id=8870528 2006-03-21 RÊmi Turboult * upnp/test/test_init.c: add some version checks and exit if failure 2006-03-05 RÊmi Turboult * libupnp version 1.3.1 * upnp/inc/upnpconfig.h.in: add new define UPNP_VERSION_PATCH * upnp/test/test_init.c: add simple test to run during checks * upnp/inc/upnp.h: include "upnpdebug.h" only if debug enabled in the library (else header file is not installed) * upnp/Makefile.am (libupnp_la_LDFLAGS): add inter-library libtool dependencies between upnp and ixml / threadutil, so that programs linking against upnp only still work. 2006-03-04 RÊmi Turboult * libupnp version 1.3.0 2006-03-03 RÊmi Turboult * upnp/src/genlib/net/http/httpreadwrite.c (get_sdk_info): use package version string from configure to set sdk info * upnp/Makefile.am: add sample/tvdevice/web/ files in EXTRA_DIST + do not distribute generated upnpconfig.h file. 2006-02-28 RÊmi Turboult * upnp/src/inc/config.h, configure.ac: use only new defines UPNP_HAVE_xx instead of INCLUDE_yyy_APIS and INTERNAL_WEB_SERVER * upnp/Makefile.am, ixml/Makefile.am: add -export-symbols-regex to the library LDFLAGS in order to export only the symbols defined in the API 2006-02-27 RÊmi Turboult * configure.ac: add libtool versions for the 3 libraries * ixml/src/ixml.c (copy_with_escape): add missing 'static' to function * threadutil/src/ThreadPool.c (SetSeed): add missing 'static' 2006-02-26 RÊmi Turboult * threadutil/inc/iasnprintf.h: add gcc __printf__ format attribute to "iasnprintf" * upnp/src/api/upnpapi.c: fix invalid UpnpPrintf formats * upnp/src/gena/gena_device.c: fix invalid UpnpPrintf formats * upnp/src/inc/config.h: move upnp/inc/config.h to internal sources (this file is no longer installed with the libraries) * upnp/inc/upnpdebug.h: new file created from debug definitions previously in upnp/inc/config.h * upnp/src/api/config.c: rename to upnp/src/api/upnpdebug.c * upnp/inc/upnpconfig.h.in: new file to contain information on the configuration of the installed libraries (generates installed file ) 2006-02-22 RÊmi Turboult * upnp/ : add missing include of config.h in some .c files 2006-02-21 RÊmi Turboult * upnp/inc/upnp.h: move some definitions which should not be exported into "upnp/src/inc/util.h" * import all modifications below from libupnp in djmount 0.51 into official libupnp 2006-01-17 RÊmi Turboult * threadutil/Makefile.am (libthreadutil_la_SOURCES): remove extraneous file 2006-01-15 RÊmi Turboult * configure.ac: add checks for large-file support * upnp/inc/config.h: rename to "upnpconfig.h". The new "config.h" file is the one generated by autoconf. * m4/type_socklen_t.m4: added new check for socklen_t (fallback to int if not defined) * upnp/src/genlib/miniserver/miniserver.c, upnp/src/ssdp/ssdp_server.c: use socklen_t where appropriate (instead of int) * upnp/src/genlib/net/http/httpreadwrite.c (get_sdk_info): remove XINLINE declaration (unused and too late) * ixml/src/node.c (ixmlNode_getNodeType): fix compilation warning on const return type 2006-01-12 RÊmi Turboult * upnp/src/inc/readwrite.h : suppress unused C++ header file 2006-01-11 RÊmi Turboult * upnp/inc/config.h, upnp/src/inc/upnpapi.h, upnp/src/inc/httpreadwrite.h: remove internal configuration variable MINIMUM_DELAY (no clear purpose) 2005-12-05 RÊmi Turboult * upnp/inc/upnp.h: re-declare obsolete method UpnpSetContentLength, for binary compatibility with previous libupnp version. * upnp/src/api/upnpapi.c: correct type of g_maxContentLength to size_t 2005-11-01 RÊmi Turboult * autoconfiscate library : replace all makefiles by Makefile.am for automake support, + preliminary autoconf support (generated config.h not yet used in source files) 2005-10-18 RÊmi Turboult * upnp/src/makefile: fix location of DEBUG STATIC libupnp library * upnp/sample/tvctrlpt/linux/Makefile, upnp/sample/tvdevice/linux/Makefile: fix STATIC library support 2005-10-16 RÊmi Turboult * threadutil/src/Makefile (clean): remove built library 2005-08-28 RÊmi Turboult * ixml/src/ixml.h, ixml/src/ixml.c (ixmlRelaxParser) : new function * ixml/src/ixmlparser.h, ixml/src/ixmlparser.c (Parser_setErrorChar) : new function 2005-08-02 RÊmi Turboult * ixml/src/Makefile: correct bug for static library being incorrectly stripped when building non-debug 2005-06-09 RÊmi Turboult * ixml/src/element.c (ixmlElement_removeAttributeNode): remove some compilation warning * ixml/inc/ixml.h, ixml/src/document.c : add some missing const's in public API * upnp/inc/upnptools.h, upnp/src/api/upnptools.c : add missing const's in public API 2005-05-28 RÊmi Turboult * upnp/inc/config.h: suppress HTTP_READ_BYTES (unused) and replace by DEFAULT_SOAP_CONTENT_LENGTH (previously in upnpapi.h) * upnp/inc/upnp.h, upnp/src/api/upnpapi.c : replace UpnpSetContentLength (which was not using its Handle argument) by global function UpnpSetMaxContentLength. Remove "hard" limitation to 32K (not suitable for using in UPnP AV). * upnp/src/inc/upnpapi.h : removed DEFAULT_SOAP_CONTENT_LENGTH (moved to config.h) and MAX_SOAP_CONTENT_LENGTH (now unused) * upnp/src/api/upnptools.c : add more error message strings * upnp/src/genlib/net/http/httpreadwrite.c : return OUT_OF_BOUNDS instead of BAD_HTTPMSG when allowed Content Length is exceeded. * upnp/src/genlib/net/http/httpreadwrite.c : corrected an incorrect sprintf format 2005-05-27 RÊmi Turboult * upnp/makefile, upnp/src/makefile, ixml/Makefile, ixml/src/Makefile, threadutil/Makefile, threadutil/src/Makefile : implement STATIC library support (from patch at http://sourceforge.net/tracker/?group_id=7189&atid=307189 ) 2005-05-26 RÊmi Turboult * upnp/src/api/upnpapi.c, upnp/src/soap/soap_device.c, upnp/src/soap/makefile : corrections for compilation with CLIENT=1 only * importing "libupnp-1.2.1a" as baseline -------------------------------------------------------------------------------- History of configure.ac: dnl # Release 1.4.1: dnl #AC_SUBST([LT_VERSION_IXML], [2:2:0]) dnl #AC_SUBST([LT_VERSION_THREADUTIL], [2:2:0]) dnl #AC_SUBST([LT_VERSION_UPNP], [2:2:0]) dnl # dnl ############################################################################ dnl # Release 1.4.6: dnl # "current:revision:age" dnl # dnl # - Code has changed in ixml dnl # revision: 2 -> 3 dnl # - Code has changed in threadutil dnl # revision: 2 -> 3 dnl # - Interface added in threadutil dnl # current: 2 -> 3 dnl # revision: 3 -> 0 dnl # age: 0 -> 1 dnl # - Code has changed in upnp dnl # revision: 2 -> 3 dnl # dnl #AC_SUBST([LT_VERSION_IXML], [2:3:0]) dnl #AC_SUBST([LT_VERSION_THREADUTIL], [3:0:1]) dnl #AC_SUBST([LT_VERSION_UPNP], [2:3:0]) dnl # dnl ############################################################################ dnl # Release 1.6.0: dnl # "current:revision:age" dnl # dnl # - Code has changed in ixml dnl # revision: 3 -> 4 dnl # - Code has changed in threadutil dnl # revision: 0 -> 1 dnl # - Code has changed in upnp dnl # revision: 3 -> 4 dnl # - Interface changed in upnp dnl # current: 2 -> 3 dnl # revision: 4 -> 0 dnl # - Interface removed in upnp dnl # age: 0 -> 0 dnl # dnl #AC_SUBST([LT_VERSION_IXML], [2:4:0]) dnl #AC_SUBST([LT_VERSION_THREADUTIL], [3:1:1]) dnl #AC_SUBST([LT_VERSION_UPNP], [3:0:0]) dnl # dnl ############################################################################ dnl # Release 1.6.1: dnl # "current:revision:age" dnl # dnl # - Code has changed in threadutil dnl # revision: 1 -> 2 dnl # - Interface added in threadutil dnl # current: 3 -> 4 dnl # revision: 2 -> 0 dnl # - Interface added in threadutil dnl # age: 1 -> 2 dnl # - Code has changed in upnp dnl # revision: 0 -> 1 dnl # dnl #AC_SUBST([LT_VERSION_IXML], [2:4:0]) dnl #AC_SUBST([LT_VERSION_THREADUTIL], [4:0:2]) dnl #AC_SUBST([LT_VERSION_UPNP], [3:1:0]) dnl # dnl ############################################################################ dnl # Release 1.6.2: dnl # "current:revision:age" dnl # dnl # - Code has changed in upnp dnl # revision: 1 -> 2 dnl # dnl #AC_SUBST([LT_VERSION_IXML], [2:4:0]) dnl #AC_SUBST([LT_VERSION_THREADUTIL], [4:0:2]) dnl #AC_SUBST([LT_VERSION_UPNP], [3:2:0]) dnl # dnl ############################################################################ dnl # Release 1.6.3: dnl # "current:revision:age" dnl # dnl # - Code has changed in threadutil dnl # revision: 0 -> 1 dnl # dnl #AC_SUBST([LT_VERSION_IXML], [2:4:0]) dnl #AC_SUBST([LT_VERSION_THREADUTIL], [4:1:2]) dnl #AC_SUBST([LT_VERSION_UPNP], [3:2:0]) dnl # dnl ############################################################################ dnl # Release 1.6.4: dnl # "current:revision:age" dnl # dnl # - Code has changed in threadutil dnl # revision: 1 -> 2 dnl # - Code has changed in upnp dnl # revision: 2 -> 3 dnl # dnl #AC_SUBST([LT_VERSION_IXML], [2:4:0]) dnl #AC_SUBST([LT_VERSION_THREADUTIL], [4:2:2]) dnl #AC_SUBST([LT_VERSION_UPNP], [3:3:0]) dnl # dnl ############################################################################ dnl # Release 1.6.5: dnl # "current:revision:age" dnl # dnl # - Code has changed in upnp dnl # revision: 3 -> 4 dnl # dnl #AC_SUBST([LT_VERSION_IXML], [2:4:0]) dnl #AC_SUBST([LT_VERSION_THREADUTIL], [4:2:2]) dnl #AC_SUBST([LT_VERSION_UPNP], [3:4:0]) dnl # dnl ############################################################################ dnl # Release 1.6.6: dnl # "current:revision:age" dnl # dnl # - Code has changed in threadutil dnl # revision: 2 -> 3 dnl # - Code has changed in upnp dnl # revision: 4 -> 5 dnl # dnl #AC_SUBST([LT_VERSION_IXML], [2:4:0]) dnl #AC_SUBST([LT_VERSION_THREADUTIL], [4:3:2]) dnl #AC_SUBST([LT_VERSION_UPNP], [3:5:0]) dnl # dnl ############################################################################ dnl # Release 1.6.7: dnl # "current:revision:age" dnl # dnl # - Code has changed in threadutil dnl # revision: 3 -> 4 dnl # - Code has changed in upnp dnl # revision: 5 -> 6 dnl # - Interfaces have been changed, added and removed in upnp dnl # current: 3 -> 4 dnl # revision: 6 -> 0 dnl # - Interfaces removed in upnp: dnl # age: -> 0 dnl # dnl #AC_SUBST([LT_VERSION_IXML], [2:4:0]) dnl #AC_SUBST([LT_VERSION_THREADUTIL], [5:0:2]) dnl #AC_SUBST([LT_VERSION_UPNP], [3:5:0]) dnl # dnl # Obs.: 1.6.7 was released with a version error, the correct numbers should dnl # have been: dnl #AC_SUBST([LT_VERSION_UPNP], [4:0:0]) dnl # dnl ############################################################################ dnl # Release 1.6.8: dnl # "current:revision:age" dnl # dnl # - Code has changed in ixml dnl # revision: 4 -> 5 dnl # - Code has changed in threadutil dnl # revision: 0 -> 1 dnl # - Code has changed in upnp dnl # revision: 0 -> 1 dnl # dnl #AC_SUBST([LT_VERSION_IXML], [2:5:0]) dnl #AC_SUBST([LT_VERSION_THREADUTIL], [5:1:2]) dnl #AC_SUBST([LT_VERSION_UPNP], [4:1:0]) dnl # dnl ############################################################################ dnl # Release 1.6.9: dnl # "current:revision:age" dnl # dnl # - Code has changed in threadutil dnl # revision: 1 -> 2 dnl # - Code has changed in upnp dnl # revision: 1 -> 2 dnl # dnl #AC_SUBST([LT_VERSION_IXML], [2:5:0]) dnl #AC_SUBST([LT_VERSION_THREADUTIL], [5:2:2]) dnl #AC_SUBST([LT_VERSION_UPNP], [4:2:0]) dnl # dnl ############################################################################ dnl # Release 1.6.10: dnl # "current:revision:age" dnl # dnl # - Code has changed in ixml dnl # revision: 5 -> 6 dnl # - Code has changed in threadutil dnl # revision: 2 -> 3 dnl # - Code has changed in upnp dnl # revision: 2 -> 3 dnl # - interface has changed in upnp dnl # current: 4 -> 5 dnl # revision: 3 -> 0 dnl # dnl #AC_SUBST([LT_VERSION_IXML], [2:6:0]) dnl ############################################################################ dnl # Release 1.6.11: dnl # "current:revision:age" dnl # dnl # - Code has changed in threadutil dnl # revision: 3 -> 4 dnl # - Code has changed in upnp dnl # revision: 3 -> 4 dnl # - interface has changed in upnp dnl # current: 5 -> 6 dnl # revision: 4 -> 0 dnl # dnl #AC_SUBST([LT_VERSION_IXML], [2:6:0]) dnl #AC_SUBST([LT_VERSION_THREADUTIL], [5:4:2]) dnl #AC_SUBST([LT_VERSION_UPNP], [6:0:0]) dnl # dnl ############################################################################ dnl # Release 1.6.12: dnl # "current:revision:age" dnl # dnl # - interface added in threadutil dnl # current: 5 -> 6 dnl # revision: 4 - > 0 dnl # age: 2 -> 3 dnl # - interfaces removed in threadutil dnl # age: 3 -> 0 dnl # dnl #AC_SUBST([LT_VERSION_IXML], [2:6:0]) dnl #AC_SUBST([LT_VERSION_THREADUTIL], [6:0:0]) dnl #AC_SUBST([LT_VERSION_UPNP], [6:0:0]) dnl # dnl ############################################################################ dnl # Release 1.6.13: dnl # "current:revision:age" dnl # dnl # - Code has changed in upnp dnl # revision: 0 -> 1 dnl # - interface added in upnp dnl # current: 6 -> 7 dnl # revision: 1 - > 0 dnl # age: 0 -> 1 dnl # dnl #AC_SUBST([LT_VERSION_IXML], [2:6:0]) dnl #AC_SUBST([LT_VERSION_THREADUTIL], [6:0:0]) dnl #AC_SUBST([LT_VERSION_UPNP], [7:0:1]) dnl # dnl ############################################################################ dnl # Release 1.6.14: dnl # "current:revision:age" dnl # dnl # - Code has changed in upnp dnl # revision: 0 -> 1 dnl # - interface added in upnp dnl # current: 7 -> 8 dnl # revision: 1 - > 0 dnl # age: 1 -> 2 dnl # dnl #AC_SUBST([LT_VERSION_IXML], [2:6:0]) dnl #AC_SUBST([LT_VERSION_THREADUTIL], [6:0:0]) dnl #AC_SUBST([LT_VERSION_UPNP], [8:0:2]) dnl # dnl ############################################################################ dnl # Release 1.6.15: dnl # "current:revision:age" dnl # dnl # - Code has changed in upnp dnl # revision: 0 -> 1 dnl # dnl #AC_SUBST([LT_VERSION_IXML], [2:6:0]) dnl #AC_SUBST([LT_VERSION_THREADUTIL], [6:0:0]) dnl #AC_SUBST([LT_VERSION_UPNP], [8:1:2]) dnl # dnl ############################################################################ dnl # Release 1.6.16: dnl # "current:revision:age" dnl # dnl # - Code has changed in ixml dnl # revision: 6 -> 7 dnl # - Code has changed in threadutil dnl # revision: 0 -> 1 dnl # - Code has changed in upnp dnl # revision: 1 -> 2 dnl # - interface changed/added/removed in upnp dnl # current++(9); revision = 0 dnl # - interface added in upnp dnl # age++(3) dnl # dnl #AC_SUBST([LT_VERSION_IXML], [2:7:0]) dnl #AC_SUBST([LT_VERSION_THREADUTIL], [6:1:0]) dnl #AC_SUBST([LT_VERSION_UPNP], [9:0:3]) dnl # dnl ############################################################################ dnl # Release 1.6.17: dnl # "current:revision:age" dnl # dnl # - Code has changed in threadutil dnl # revision: 1 -> 2 dnl # - Code has changed in upnp dnl # revision: 0 -> 1 dnl # dnl #AC_SUBST([LT_VERSION_IXML], [2:7:0]) dnl #AC_SUBST([LT_VERSION_THREADUTIL], [6:2:0]) dnl #AC_SUBST([LT_VERSION_UPNP], [9:1:3]) dnl # dnl ############################################################################ dnl # Release 1.6.18: dnl # "current:revision:age" dnl # dnl # - dnl # dnl #AC_SUBST([LT_VERSION_IXML], [::]) dnl #AC_SUBST([LT_VERSION_THREADUTIL], [::]) dnl #AC_SUBST([LT_VERSION_UPNP], [::]) dnl # dnl ############################################################################ dnl # Release 1.8.0: dnl # "current:revision:age" dnl # dnl # - Start from a new ground. dnl # dnl #AC_SUBST([LT_VERSION_IXML], [10:0:0]) dnl #AC_SUBST([LT_VERSION_THREADUTIL], [10:0:0]) dnl #AC_SUBST([LT_VERSION_UPNP], [10:0:0]) dnl # dnl ############################################################################ dnl # Release 1.8.1: dnl # "current:revision:age" dnl # dnl # - Code has changed in ixml dnl # revision: 0 -> 1 dnl # - Code has changed in upnp dnl # revision: 0 -> 1 dnl # - interface changed/added/removed in upnp dnl # current++(11); revision = 0 dnl # - interface added in upnp dnl # age++(1) dnl # dnl #AC_SUBST([LT_VERSION_IXML], [10:1:0]) dnl #AC_SUBST([LT_VERSION_UPNP], [11:0:1]) dnl # dnl ############################################################################ dnl # Release 1.8.2: dnl # "current:revision:age" dnl # dnl # - Code has changed in upnp dnl # revision: 0 -> 1 dnl # dnl #AC_SUBST([LT_VERSION_IXML], [10:1:0]) dnl #AC_SUBST([LT_VERSION_UPNP], [11:1:1]) dnl # dnl ############################################################################ dnl # Release 1.8.3: dnl # "current:revision:age" dnl # dnl # - Code has changed in upnp dnl # revision: 1 -> 2 dnl # - interfaces changed/added/removed: dnl # current: 11 -> 12, revision 2 -> 0 dnl # - interfaces added: dnl # age: 1 -> 2 dnl # dnl #AC_SUBST([LT_VERSION_IXML], [10:1:0]) dnl #AC_SUBST([LT_VERSION_UPNP], [12:0:2]) dnl # dnl ############################################################################ dnl # Release 1.8.4: dnl # "current:revision:age" dnl # dnl # - Code has changed in upnp dnl # revision: 0 -> 1 dnl # - interfaces changed/added/removed: dnl # current: 12 -> 13, revision 1 -> 0 dnl # - interfaces removed: dnl # age: 2 -> 0 dnl # dnl #AC_SUBST([LT_VERSION_IXML], [10:1:0]) dnl #AC_SUBST([LT_VERSION_UPNP], [13:0:0]) dnl # dnl ############################################################################ dnl # Release 1.8.5: dnl # "current:revision:age" dnl # dnl # - Code has changed in ixml dnl # revision: 1 -> 2 dnl # - Code has changed in upnp dnl # revision: 0 -> 1 dnl # - interfaces changed/added/removed: dnl # current: 13 -> 14, revision 1 -> 0 dnl # - interfaces added: dnl # age: 0 -> 1 dnl # dnl #AC_SUBST([LT_VERSION_IXML], [10:2:0]) dnl #AC_SUBST([LT_VERSION_UPNP], [14:0:1]) dnl # dnl ############################################################################ dnl # Release 1.8.6: dnl # "current:revision:age" dnl # dnl # - dnl # dnl #AC_SUBST([LT_VERSION_IXML], [::]) dnl #AC_SUBST([LT_VERSION_UPNP], [::]) dnl # dnl ############################################################################ dnl # Release 1.10.0: dnl # "current:revision:age" dnl # dnl # - First release of 1.10 dnl # dnl #AC_SUBST([LT_VERSION_IXML], [11:0:0]) dnl #AC_SUBST([LT_VERSION_UPNP], [15:0:0]) dnl # dnl ############################################################################ dnl # Release 1.10.1 dnl # "current:revision:age" dnl # dnl # - Code has changed in upnp dnl # revision: 0 -> 1 dnl # dnl #AC_SUBST([LT_VERSION_IXML], [11:0:0]) dnl #AC_SUBST([LT_VERSION_UPNP], [15:1:0]) dnl # dnl ############################################################################ dnl # Release 1.12.0 dnl # "current:revision:age" dnl # dnl # - Code has changed in upnp dnl # revision: 1 -> 2 dnl # - interfaces changed/added/removed: dnl # current: 15 -> 16 dnl # revision: 2 -> 0 dnl # - interfaces removed or changed: dnl # age: 0 -> 0 dnl # dnl #AC_SUBST([LT_VERSION_IXML], [11:0:0]) dnl #AC_SUBST([LT_VERSION_UPNP], [16:0:0]) dnl # dnl ############################################################################ pupnp-pupnp-216c3c7/README.md000066400000000000000000000713451527342277000156500ustar00rootroot00000000000000# The Portable SDK for UPnP\* Devices (libupnp) - [The GitHub project page](https://github.com/pupnp/pupnp) is where all the real action happens. - [The old Source Forge project page is linked here.](https://sourceforge.net/projects/pupnp) | branch | status | | -------------- | --------------------------------------------------------------------------------------------------- | | main (22.2.x) | ![main](https://github.com/pupnp/pupnp/actions/workflows/ccpp.yml/badge.svg?branch=main) | | branch-22.1.x | [passing at release-22.1.10](https://github.com/pupnp/pupnp/actions/runs/40946633688) | | branch-22.0.x | ![22.0.x](https://github.com/pupnp/pupnp/actions/workflows/ccpp.yml/badge.svg?branch=branch-22.0.x) | | branch-2.0.x | ![2.0.x](https://github.com/pupnp/pupnp/actions/workflows/ccpp.yml/badge.svg?branch=branch-2.0.x) | | branch-1.18.x | ![1.18.x](https://github.com/pupnp/pupnp/actions/workflows/ccpp.yml/badge.svg?branch=branch-1.18.x) | | branch-1.14.x | ![1.14.x](https://github.com/pupnp/pupnp/actions/workflows/ccpp.yml/badge.svg?branch=branch-1.14.x) | | branch-1.12.x | ![1.12.x](https://github.com/pupnp/pupnp/actions/workflows/ccpp.yml/badge.svg?branch=branch-1.12.x) | | branch-1.10.x | ![1.10.x](https://github.com/pupnp/pupnp/actions/workflows/ccpp.yml/badge.svg?branch=branch-1.10.x) | | branch-1.8.x | ![1.8.x](https://github.com/pupnp/pupnp/actions/workflows/ccpp.yml/badge.svg?branch=branch-1.8.x) | | branch-1.6.x | ![1.6.x](https://github.com/pupnp/pupnp/actions/workflows/ccpp.yml/badge.svg?branch=branch-1.6.x) | | branch-1.4.x | ![1.4.x](https://github.com/pupnp/pupnp/actions/workflows/ccpp.yml/badge.svg?branch=branch-1.4.x) | Copyright (c) 2000-2003 Intel Corporation - All Rights Reserved. Copyright (c) 2005-2006 RÊmi Turboult Copyright (c) 2006 Michel Pfeiffer and others See [LICENSE](site/LICENSE) for details. ## Table of Contents - [1. Overview](#1-overview) - [2. General Information](#2-general-information) - [3. Changelog](#3-changelog) - [4. Documentation](#4-documentation) - [4.1. Quick Start](#41-quick-start) - [5. Other projects that are using the SDK](#5-other-projects-that-are-using-the-sdk) - [6. License Conditions](#6-license-conditions) - [7. Release List](#7-release-list) - [8. Package Contents](#8-package-contents) - [9. System Requirements](#9-system-requirements) - [10. Build Instructions](#10-build-instructions) - [10.1. Pre-requisites](#101-pre-requisites) - [10.2. CMake Build](#102-cmake-build) - [11. Install/Uninstall Instructions](#11-installuninstall-instructions) - [11.1. Install](#111-install) - [11.2. Uninstall](#112-uninstall) - [12. New Features](#12-new-features) - [13. Support and Contact Information](#13-support-and-contact-information) - [14. IXML support for scripting languages](#14-ixml-support-for-scripting-languages) - [15. SourceForge Badges](#15-sourceforge-badges) - [16. Thanks](#16-thanks) ## 1. Overview The Portable SDK for UPnP™ Devices is an SDK for development of UPnP device and control point applications. It consists of the core UPnP protocols along with a UPnP-specific eXtensible Markup Language (XML) parser supporting the Document Object Model (DOM) Level 2 API and an optional, integrated mini web server for serving UPnP related documents. It provides developers with an API and open source code for building control points, devices, and bridges that are compliant with Version 1.0 of the [Universal Plug and Play Device Architecture Specification](https://openconnectivity.org/developer/specifications/upnp-resources/upnp/) and supports several operating systems like Linux, *BSD, Solaris and others. ## 2. General Information UPnP™ is an architecture that enables discovery, event notification, and control of devices on a network, independent of operating system, programming language, or physical network connection.  UPnP™ is based on common Internet standards and specifications such as TCP/IP, HTTP, and XML. For detailed information about UPnP™, including the UPnP™ Device Architecture Specification, please visit the [Open Connectivity Foundation web site](https://openconnectivity.org/), which took over the UPnP™ Forum's work in 2016. In 2000, Intel created the first version of the Linux SDK for UPnP™ Devices and subsequently released it to the open source community to foster growth of UPnP™. In 2006 this 100% compatible fork of the original project was created to support further development. This way, the project now continues using the name "Portable UPnP™" and as a project that is more open to contributions of the community. The main goal is the availability of the project for all important platforms to become a standard for UPnP™. ## 3. [Changelog](ChangeLog) ## 4. Documentation The documentation resides inside the source code itself and is generated by [Doxygen](https://www.doxygen.nl). Documentation for each function resides in a comment section immediately preceding the function. With Doxygen installed, build the docs from your build directory: ```sh cmake --build . --target docs # generates HTML under docs/doxygen/html/index.html ``` Note: the `UPnP_Programming_Guide.pdf` included in the `docs/` directory is from version 1.2 and is outdated. ### 4.1. Quick Start For a minimal, standalone example of how to use libupnp with CMake — independent of the repository's own build system — see the community-maintained **[libupnp_example](https://github.com/Zapunidi/libupnp_example)** project. It demonstrates a simple SSDP client and shows how to write a `CMakeLists.txt` that uses `find_package(upnp)` to link against an installed copy of the library. It has been tested on Linux and Windows. For a fuller reference covering a complete UPnP device and control point, see the [`samples/tv`](samples/tv) directory in this repository. ## 5. Other projects that are using the SDK This is a list of some of the projects and products that are based on the SDK for UPnP™ Devices.  Please let us know if you are working on a project and would like to see it listed here! - [aMule](http://www.amule.org) has libupnp support to perform port forwarding. - [Gerbera](https://gerbera.io) UPnP™ media server, the successor of MediaTomb. - [libmcupnp](http://sourceforge.net/projects/libmcupnp) is a Free UPnP(v1) library for easy "MediaServer:1 Client" implementations. The library is built on top of libupnp. - [eMule Morph](http://emulemorph.sourceforge.net) uses libupnp to forward ports automatically. - [PeerStream Audio Video Server](http://www.peerstream.net). - [GeeXboX uShare™](https://github.com/ddugovic/uShare) A/V media server. - The [Linux UPnP™ Internet Gateway Device](http://linux-igd.sourceforge.net) This project is a daemon that emulates Microsoft's Internet Connection Service (ICS). It implements the UPnP™ Internet Gateway Device (IGD) specification and allows UPnP™-aware clients, such as MSN Messenger, to work properly from behind a NAT firewall. - FreeBSD ports of both the [SDK for UPnP™ Devices](https://www.freshports.org/devel/upnp/) and the [Linux UPnP™ IGD](https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=41295) were contributed to the FreeBSD ports collection by [Yen-Ming Lee](http://www.leeym.com). - [IGD2 for linux](https://github.com/Orange-OpenSource/igd2-for-linux) is an updated version of [Linux-IGD implementation](http://linux-igd.sourceforge.net). This new version is created on top of UPnP IGD:2 specifications available from [https://openconnectivity.org/developer/specifications/upnp-resources/upnp/internet-gateway-device-igd-v-2-0](https://openconnectivity.org/developer/specifications/upnp-resources/upnp/internet-gateway-device-igd-v-2-0). - [gmrender-resurrect](https://github.com/hzeller/gmrender-resurrect) is a resource efficient UPnP/DLNA renderer, optimal for Raspberry Pi, CuBox or a general MediaServer. Fork of GMediaRenderer to add some features to make it usable. - [Music Player Daemon](https://github.com/MusicPlayerDaemon/MPD) uses libupnp to browse and play music stored on an UPnP Media Server. - [VLC media player](http://www.videolan.org/vlc) uses libupnp for services discovery. - [Jami](https://jami.net), the GNU distributed communication platform, uses libupnp to set up port forwarding on the local router. - [RetroShare](https://retroshare.cc), an encrypted peer-to-peer messaging and file sharing platform, can use libupnp for port forwarding. - [vdr-plugin-upnp](https://github.com/vdr-projects/vdr-plugin-upnp) turns the VDR video recorder into a UPnP™/DLNA media server. ## 6. License Conditions The Portable SDK for UPnP™ Devices is distributed under the BSD (Berkeley Standard Distribution) license. This license allows you to use the source code royalty free and does not place any restrictions on what you do with source code derived from the SDK. For full details on the license conditions, please consult the [LICENSE](site/LICENSE) file located inside the SDK distribution. ## 7. Release List | Release Number | Date | History | | -------------- | ---------- | ---------------------------------------- | | 22.2.0 | 2026-11-04 | [Portable UPnP SDK][Portable UPnP SDK] | | 22.1.10 | 2026-10-29 | [Portable UPnP SDK][Portable UPnP SDK] | | 22.1.9 | 2026-10-28 | [Portable UPnP SDK][Portable UPnP SDK] | | 22.1.8 | 2026-09-30 | [Portable UPnP SDK][Portable UPnP SDK] | | 22.1.7 | 2026-09-29 | [Portable UPnP SDK][Portable UPnP SDK] | | 22.1.6 | 2026-09-27 | [Portable UPnP SDK][Portable UPnP SDK] | | 22.1.5 | 2026-09-25 | [Portable UPnP SDK][Portable UPnP SDK] | | 22.1.4 | 2026-09-24 | [Portable UPnP SDK][Portable UPnP SDK] | | 22.1.3 | 2026-09-24 | [Portable UPnP SDK][Portable UPnP SDK] | | 22.1.2 | 2026-09-23 | [Portable UPnP SDK][Portable UPnP SDK] | | 22.1.1 | 2026-09-22 | [Portable UPnP SDK][Portable UPnP SDK] | | 22.1.0 | 2026-09-10 | [Portable UPnP SDK][Portable UPnP SDK] | | 22.0.6 | 2026-08-12 | [Portable UPnP SDK][Portable UPnP SDK] | | 22.0.5 | 2026-08-12 | [Portable UPnP SDK][Portable UPnP SDK] | | 22.0.4 | 2026-07-15 | [Portable UPnP SDK][Portable UPnP SDK] | | 22.0.3 | 2026-07-14 | [Portable UPnP SDK][Portable UPnP SDK] | | 22.0.2 | NA | Internal | | 22.0.1 | NA | Internal | | 22.0.0 | NA | Internal | | 2.0.2 | 2026-06-17 | [Portable UPnP SDK][Portable UPnP SDK] | | 2.0.1 | 2026-06-17 | [Portable UPnP SDK][Portable UPnP SDK] | | 2.0.0 | 2026-06-16 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.18.5 | 2026-04-22 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.18.4 | 2026-03-27 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.18.3 | 2026-03-16 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.18.2 | 2026-03-10 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.18.1 | 2026-03-01 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.18.0 | 2026-02-09 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.16.0 | canceled | [Portable UPnP SDK][Portable UPnP SDK] | | 1.14.31 | 2026-04-22 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.14.30 | 2026-02-09 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.14.29 | 2026-02-08 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.14.28 | 2026-02-08 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.14.27 | 2026-02-08 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.14.26 | 2026-02-06 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.14.25 | 2025-09-18 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.14.24 | 2025-06-11 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.14.23 | 2025-06-07 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.14.22 | 2025-06-02 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.14.21 | 2025-06-01 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.14.20 | 2024-10-07 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.14.19 | 2024-04-22 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.14.18 | 2023-08-21 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.14.17 | 2023-04-30 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.14.16 | 2023-03-30 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.14.15 | 2022-11-18 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.14.14 | 2022-10-05 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.14.13 | 2022-08-03 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.14.12 | 2021-09-26 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.14.11 | 2021-08-20 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.14.10 | 2021-08-17 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.14.9 | 2021-08-08 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.14.8 | 2021-08-07 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.14.7 | 2021-05-08 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.14.6 | 2021-04-19 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.14.5 | 2021-04-06 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.14.4 | 2021-03-29 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.14.3 | 2021-03-29 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.14.2 | 2021-02-28 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.14.1 | 2021-02-08 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.14.0 | 2020-07-20 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.12.1 | 2020-04-07 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.12.0 | 2020-01-22 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.10.1 | 2019-11-20 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.10.0 | 2019-11-01 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.8.7 | 2020-04-07 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.8.6 | 2019-11-20 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.8.5 | 2019-11-01 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.8.4 | 2018-10-25 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.8.3 | 2017-11-12 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.8.2 | 2017-11-12 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.8.1 | 2017-05-24 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.8.0 | 2017-01-04 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.6.25 | 2016-02-10 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.6.24 | 2017-11-19 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.6.23 | 2017-11-19 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.6.22 | 2017-05-30 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.6.21 | 2016-12-21 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.6.20 | 2016-07-07 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.6.19 | 2013-11-15 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.6.18 | 2013-01-29 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.6.17 | 2012-04-03 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.6.16 | 2012-03-21 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.6.15 | 2012-01-25 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.6.14 | 2011-11-17 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.6.13 | 2011-03-17 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.6.12 | 2011-02-08 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.6.11 | 2011-02-07 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.6.10 | 2011-01-30 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.6.9 | 2010-11-07 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.6.8 | 2010-10-21 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.6.7 | 2010-10-04 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.6.6 | 2008-04-25 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.6.5 | 2008-02-02 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.6.4 | 2008-01-26 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.6.3 | 2007-12-26 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.6.2 | 2007-12-10 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.6.1 | 2007-11-08 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.6.0 | 2007-06-23 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.4.6 | 2007-04-30 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.4.5 | 2007-04-28 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.4.4 | 2007-04-17 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.4.3 | 2007-03-06 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.4.2 | 2007-02-16 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.4.1 | 2006-08-11 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.4.0 | 2006-06-12 | [Portable UPnP SDK][Portable UPnP SDK] | | 1.3.1 | 2006-03-05 | [UPnP SDK for Linux][UPnP SDK for Linux] | | 1.3.0 | 2006-03-04 | [UPnP SDK for Linux][UPnP SDK for Linux] | | 1.2.1a | 2003-11-08 | [UPnP SDK for Linux][UPnP SDK for Linux] | | 1.2.1 | 2003-02-13 | [UPnP SDK for Linux][UPnP SDK for Linux] | | 1.0.4 | 2001-08-15 | [UPnP SDK for Linux][UPnP SDK for Linux] | | 1.0.3 | 2001-06-12 | [UPnP SDK for Linux][UPnP SDK for Linux] | | 1.0.2 | 2001-02-07 | [UPnP SDK for Linux][UPnP SDK for Linux] | | 1.0.1 | 2000-10-13 | [UPnP SDK for Linux][UPnP SDK for Linux] | | 1.0.0 | 2000-08-31 | [UPnP SDK for Linux][UPnP SDK for Linux] | | 0.9.1 | 2000-08-17 | [UPnP SDK for Linux][UPnP SDK for Linux] | | 0.9.0 | 2000-08-01 | [UPnP SDK for Linux][UPnP SDK for Linux] | [UPnP SDK for Linux]: https://sourceforge.net/projects/upnp/ [Portable UPnP SDK]: https://sourceforge.net/projects/pupnp/ ## 8. Package Contents The SDK for UPnP Devices contains the following: | Path/File | Description | | ----------- | --------------------------------------------------------------------------------- | | README.md | This file. Contains the installation and build instructions. | | COPYING | The licensing terms the SDK is distributed under. | | ChangeLog | Changes and new features. | | SECURITY.md | How to report security vulnerabilities. | | docs | The Doxygen configuration, API change notes and the old programming guide. | | ixml/inc | The public include files required to use the XML parser. | | ixml/src | The source code to the XML parser library. | | upnp/inc | The public include files required to use the SDK. | | upnp/src | The source files comprising the SDK, libupnp.so. | | samples/tv | A sample device and control point application, illustrating the usage of the SDK. | | gtest | Unit tests based on GoogleTest. | | tests | Python integration tests. | | fuzzer | Fuzzing targets. | ## 9. System Requirements The SDK for UPnP Devices is designed to compile and run under several operating systems. It does, however, have dependencies on some packages that may not be installed by default. All packages that it requires are listed below. | Dependency | Description | | ---------- | ---------------------------------------------------------------------------------------- | | libpthread | The header and library are installed as part of the glibc-devel package (or equivalent). | Additionally, the documentation for the SDK can be auto-generated from the upnp.h header file using Doxygen, a documentation system for C, C++, IDL, and Java\*. Doxygen generates the documentation in HTML and LaTeX format, and the LaTeX output can be converted into a PDF file. To generate the documentation these tools are required: | Package | Description | | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Doxygen | The homepage for Doxygen is . Doxygen is the only requirement for generating the HTML documentation. | | LaTeX | To generate the PDF documentation, a LaTeX distribution such as TeX Live is necessary. Run `make` in the generated `docs/doxygen/latex` directory to build `refman.pdf` with pdflatex. | For the UPnP library to function correctly, networking must be configured properly for multicasting. To do this: ```bash % ip route add 239.0.0.0/8 dev eth0 ``` where 'eth0' is the network adapter that the UPnP library will use. Without this addition, device advertisements and control point searches will not function. ## 10. Build Instructions ### 10.1. Pre-requisites Some packages/tools are required to build the library. Here's a minimal 'inspirational example' that builds the library using a Docker Ubuntu image. ```bash % docker run -it --rm ubuntu /bin/bash % apt update \ && apt install -y build-essential cmake pkg-config git \ && git clone http://github.com/pupnp/pupnp.git \ && cd pupnp \ && cmake -B build % cmake --build build ``` ### 10.2. CMake Build In Order to build everything using the cmake build system, you just need to install cmake for your platform. Standalone cmake is recommended, IDE's like Visual Studio have built-in support which works, but as cmake in general encourages out-of-source builds and VS writes it's config into the source, cmake-gui should be used on windows. In addition to the standard CMake options, the following options are available: - DOWNLOAD_AND_BUILD_DEPS: This option is only available if a useable git program was found on your system. With this option on, the pthread4w package will be downloaded while configuring the build-env, then it will be build and installed along with upnp. - UPNP_ENABLE_TESTING: This option activates the unit tests. - UPNP_ENABLE_TESTING_INTEGRATION: This option activates the integration tests (find_package/add_subdirectory consumption checks). If you don't want to build pthreads4w in the same build as upnp, you can download it from . Just build and install it. The libs and headers will be found, if you set CMAKE_INSTALL_PREFIX (the base install dir) to the same location. For information on general usage of the cmake build system see: ## 11. Install/Uninstall Instructions ### 11.1. Install After building, install the SDK as root with: ```bash % cmake --install build ``` The destination is set by `CMAKE_INSTALL_PREFIX` at configure time, or by passing `--prefix` to `cmake --install`. ### 11.2. Uninstall CMake does not provide an uninstall target. The installed files are listed in `build/install_manifest.txt`, so they can be removed, as root, with: ```bash % xargs rm < build/install_manifest.txt ``` The manifest lists the installed paths without any `DESTDIR` prefix. Only use it after an install done without `DESTDIR`; after a `DESTDIR` install, remove that directory instead. ## 12. New Features See [ChangeLog file](ChangeLog). ## 13. Support and Contact Information Report bugs at , and ask questions at . To report a security vulnerability, follow [SECURITY.md](SECURITY.md) instead of opening a public issue. \* Other brands, names, and trademarks are the property of their respective owners. ## 14. IXML support for scripting languages The tree structure of XML documents created by IXML is hard to maintain when creating a binding for a scripting language. Even when many elements may never be used on the script side, it requires copying the entire tree structure once you start accessing elements several levels deep.Hence scriptsupport was added. To enable it compile while IXML_HAVE_SCRIPTSUPPORT has been defined (enabled by default). This allows control using only a list instead of a tree-like structure, and only nodes actually accessed need to be created instead of all the nodes in the tree. Here's how its supposed to work: - The scriptsupport allows you to add a callback when a node is freed on the C side, so appropriate action can be taken on the script side, see function ixmlSetBeforeFree(). - Instead of recreating the tree structure, an intermediate object should be created only for the nodes actually accessed. The object should be containing a pointer to the node and a 'valid flag' which is initially set to TRUE (the valid flag, can simply be the pointer to the node being NULL or not). Before creating the intermediate object, the custom tag 'ctag' can be used to check whether one was already created. - the node object gets an extra 'void\* ctag' field, a custom tag to make a cross reference to the script side intermediate object. It can be set using ixmlNode_setCTag(), and read using ixmlNode_getCTag(). Whenever a new intermediate object is created, the ctag of the corresponding node should be set to point to this intermediate object. - The tree structure traversal is done on the C side (looking up parents, children and siblings) - Every intermediate object created should be kept in a list (preferably a key-value list, where the key is the pointer to the node and the value is the pointer to the intermediate object) - when the callback is called, the node should be looked up in the list, the flag set to false, the pointer to the C-side node be cleared and on the C-side the ctag should be cleared. - whenever the intermediate object is accessed and its flag is set to False, an error should be thrown that the XML document has been closed. Freeing resources can be done in 2 ways, C side by simply calling the free node methods, or script side by the garbage collector of the script engine. Script side steps: - if the valid flag is set to False (XML document is closed), then the intermediate object can be destroyed, no further action. - if the node has a parent, then the intermediate object can be destroyed after the ctag on the corresponding node has been cleared. Nothing needs to be freed on the C-side. - if the node has no parent, then the node must be freed on the C side by calling the corresponding free node methods. This will result in a chain of callbacks closing the node and all underlying nodes. ## 15. SourceForge Badges
oss-users-love-us oss-community-choice oss-sf-favorite oss-community-leader oss-open-source-excellence
[![Download Portable UPnP SDK](https://img.shields.io/sourceforge/dm/pupnp.svg)](https://sourceforge.net/projects/pupnp/files/latest/download) [![Download Portable UPnP SDK](https://img.shields.io/sourceforge/dw/pupnp.svg)](https://sourceforge.net/projects/pupnp/files/latest/download) [![Download Portable UPnP SDK](https://img.shields.io/sourceforge/dd/pupnp.svg)](https://sourceforge.net/projects/pupnp/files/latest/download) [![Download Portable UPnP SDK](https://img.shields.io/sourceforge/dt/pupnp.svg)](https://sourceforge.net/projects/pupnp/files/latest/download) ## 16. Thanks - To all the people listed in [the THANKS file](THANKS). - To [JetBrains](https://www.jetbrains.com/?from=pupnp) for kindly providing us with open source licenses of their amazing products. ![JetBrains Logo](site/jetbrains.svg) pupnp-pupnp-216c3c7/SECURITY.md000066400000000000000000000024251527342277000161530ustar00rootroot00000000000000# Security Policy ## Supported Versions Versions currently being supported with security updates: | Version | Supported | | -------- | ------------------ | | 22.0.x | :white_check_mark: | | < 22.0.x | :x: | ## Reporting a Vulnerability If you discover a security vulnerability, please **do not** open a public issue or PR. Instead, report it using **GitHub Private Reporting:** 1. Navigate to the "Security" tab of this repository 2. Select "Report a vulnerability". Please include: * A description of the issue. * Steps to reproduce (including a minimal code example). * Potential impact. ## Our Process This is an open source free project and as such we have our limitations. Nonetheless, we will try to provide a fix for the problem as soon as possible and request that you do not disclose the issue publicly until we have released a patch. If you would like to contribute the fix yourself, we do not accept public pull requests for an unpatched vulnerability, since that would expose the issue before a fix is available to users. Instead, we can set up a temporary private fork attached to the advisory so you can collaborate with us and submit your patch there directly. Once a fix is released, we publish the advisory and request a CVE ID through GitHub. pupnp-pupnp-216c3c7/THANKS000066400000000000000000000061041527342277000152730ustar00rootroot00000000000000# libupnp was originally written by Intel Corporation Many people further contributed to libupnp by reporting problems, suggesting various improvements or submitting actual code. Here is a list of these people. Help us keep it complete and exempt of errors. - Alaric Senat (AlaricSenat) - Alex (afaucher) - Andre Sodermans (wienerschnitzel) - Andria Sax (Candybar99) - Anoop Mohan (an00p) - Anthony Viallard (homer242) - Apostolos Syropoulos - Arno Willig - Arthur Chan (arthurscchan) - Benjamin Gilbert (bgilbert) - Bob Ciora - BraneDev (@github) - Carlo Parata - Carl Benson - Chandra Penke (inactiveneurons) - Chaos - Charles Nepveu (cnepveu) - Chris Pickel - Chuck Thomason (cyt4) - Craig Nelson - Damien Plisson (damien78) - David Blanchet - David Maass - Dirk (dirk_vdb) - Emil Ljungdahl - Erik Johansson - Eric Tanguy - Erwan Velu - Eugene Christensen - Fabrice Fontaine (ffontaine) - Fredrik Svensson - Gabriel Burca - Gabriel Corona (randomstuff) - Glen Masgai - Grolar (Grolar1337) - Gustavo Zacarias (gustavoz) - Harrison Green (hgarrereyn) - Hartmut Holzgraefe (hholzgra) - Hugo BeauzÊe-Luyssen (chouquette) - Iain Denniston (ectotropic) - Ingo Hofmann - Ivan Romanov (ivanromanov) - James Cowgill (jcowgill at GitHub) - Jean-Francois Dockes (medoc, medoc92) - Jim Broadus (jbroadus at gmail dot com) - Jiri Zouhar - John Dennis - John Smith (jsmith-mygithub at Github) - Jonathan Casiot (no_dice) - Josh Carroll - Juergen Lock - Karl Straussberger (KarlStraussberger) - Keith Brindley - Klaus Fischer (klafier) - las7 (las7) - Leuk_He - Loigu - Luke Kim (nereusuj) - Marc-Olivier Champagne (moc-sfl) - Marcelo Roberto Jimenez (mroberto, mrjimenez at github) - Markus Strobl - Martin StorsjÃļ (mstorsjo) - Marvin Scholz (ePirat at Github) - Matthew Garrett (mjg59) - Michael Osipov (michael-o) - Nektarios K. Papadopoulos (npapadop) - Nicholas Kraft - Nick Leverton (leveret) - Nikolai Merinov (nmerinov) - Obata Akio (obache) - OrbisAI Security (orbisai0security) - Oskar Liljeblad - Michael (oxygenic) - Paul Vixie - Peng - Peter Hartley - Peter Pramberger (peterpramb) - Philippe (philippe44 at github) - Philipp Matthias Hahn - Pino Toscano (pinotree) - Rene Hexel - Rene Nielsen - Rex Cheung - Robert Buckley (rbuckley) - Robert Gingher (robsbox) - Ronan Menard - Rosen Penev (neheb) - Ryan C. Underwood (runderwo) - Ryan Hope (RyanHope97) - Salvatore Bonaccorso - Sebastian Brandt - Shaddy Baddah - Shaun Marko (semarko) - Siva Chandran - ss1969 at GitHub (kiilii at hotmail.com) - Stefan Sommerfeld (zerocom) - StÊphane CorthÊsy - Stephen Anthony Jones (frobones at gmail dot com) - Stephen Bash (scbash at Github) - Steve Bresson - Steve Lhomme (robUx4 at Github) - Thijs Schreijer - Thomas Guillem (tguillem at Github) - Thomas Mitterfellner (lineinthesand at Github) - Thoren Paulson (Thoren dot Paulson at gmail dot com, thoren-d at github) - Timothy Redaelli - Titus Winters - Tucker Kern (mill1000 at GitHub) - Tom (tomdev2) - Uwe Kleine-KÃļnig - Vladimir Fedoseev (va-dos) - wangyanhai - Werner Mahr (Vollstrecker) - Yoichi Nakayama (yoichi) - zephyrus (zephyrus00jp) - zexian chen - Zheng Peng (darkelf2010) pupnp-pupnp-216c3c7/UPNP.cmake.in000066400000000000000000000052621527342277000165550ustar00rootroot00000000000000@PACKAGE_INIT@ include(CMakeFindDependencyMacro) if(@UPNP_BUILD_SHARED@) list(APPEND _upnp_available_components IXMLShared Shared) endif() if(@UPNP_BUILD_STATIC@) list(APPEND _upnp_available_components IXMLStatic Static) endif() if(UPNP_FIND_COMPONENTS) set(_valid_components IXMLShared IXMLStatic Shared Static) foreach(comp IN LISTS UPNP_FIND_COMPONENTS) if(NOT comp IN_LIST _valid_components) set(UPNP_FOUND FALSE) set(UPNP_NOT_FOUND_MESSAGE "Unknown component: ${comp}") return() endif() endforeach() if(Shared IN_LIST UPNP_FIND_COMPONENTS) list(APPEND pt4w_comps Shared) endif() if(Static IN_LIST UPNP_FIND_COMPONENTS) list(APPEND pt4w_comps Static) endif() if(MSVC) find_dependency (PTHREADS4W COMPONENTS ${pt4w_comps}) endif() else() if(MSVC) find_dependency (PTHREADS4W) endif() endif() if(NOT MSVC) find_dependency (Threads) endif() if(@UPNP_ENABLE_OPEN_SSL@) find_dependency(OpenSSL) endif() include(${CMAKE_CURRENT_LIST_DIR}/PUPNP.cmake) if(NOT UPNP_FIND_COMPONENTS) set(UPNP_FOUND TRUE) else() foreach(comp IN LISTS UPNP_FIND_COMPONENTS) list(FIND _upnp_available_components "${comp}" _idx) if(_idx EQUAL -1) set(UPNP_FOUND FALSE) set(UPNP_NOT_FOUND_MESSAGE "Component ${comp} is not available in this build") endif() endforeach() endif() set(IXML_HAVE_SCRIPTSUPPORT @IXML_HAVE_SCRIPTSUPPORT@ CACHE INTERNAL "see.upnpconfig.h") set(UPNP_ADAPTER_UUID_NAME @UPNP_ADAPTER_UUID_NAME@ CACHE INTERNAL "see.upnpconfig.h") set(UPNP_ENABLE_BLOCKING_TCP_CONNECTIONS @UPNP_ENABLE_BLOCKING_TCP_CONNECTIONS@ CACHE INTERNAL "see.upnpconfig.h") set(UPNP_ENABLE_IPV6 @UPNP_ENABLE_IPV6@ CACHE INTERNAL "see.upnpconfig.h") set(UPNP_ENABLE_OPEN_SSL @UPNP_ENABLE_OPEN_SSL@ CACHE INTERNAL "see.upnpconfig.h") set(UPNP_ENABLE_UNSPECIFIED_SERVER @UPNP_ENABLE_UNSPECIFIED_SERVER@ CACHE INTERNAL "see.upnpconfig.h") set(UPNP_HAVE_CLIENT @UPNP_HAVE_CLIENT@ CACHE INTERNAL "see.upnpconfig.h") set(UPNP_HAVE_DEBUG @UPNP_HAVE_DEBUG@ CACHE INTERNAL "see.upnpconfig.h") set(UPNP_HAVE_DEVICE @UPNP_HAVE_DEVICE@ CACHE INTERNAL "see.upnpconfig.h") set(UPNP_HAVE_GENA @UPNP_HAVE_GENA@ CACHE INTERNAL "see.upnpconfig.h") set(UPNP_HAVE_OPTSSDP @UPNP_HAVE_OPTSSDP@ CACHE INTERNAL "see.upnpconfig.h") set(UPNP_HAVE_SOAP @UPNP_HAVE_SOAP@ CACHE INTERNAL "see.upnpconfig.h") set(UPNP_HAVE_SSDP @UPNP_HAVE_SSDP@ CACHE INTERNAL "see.upnpconfig.h") set(UPNP_HAVE_TOOLS @UPNP_HAVE_TOOLS@ CACHE INTERNAL "see.upnpconfig.h") set(UPNP_HAVE_WEBSERVER @UPNP_HAVE_WEBSERVER@ CACHE INTERNAL "see.upnpconfig.h") set(UPNP_LARGEFILE_SENSITIVE @UPNP_LARGEFILE_SENSITIVE@ CACHE INTERNAL "see.upnpconfig.h") set(UPNP_MINISERVER_REUSEADDR @UPNP_MINISERVER_REUSEADDR@ CACHE INTERNAL "see.upnpconfig.h") pupnp-pupnp-216c3c7/_config.yml000066400000000000000000000000321527342277000165010ustar00rootroot00000000000000theme: jekyll-theme-hackerpupnp-pupnp-216c3c7/cmake/000077500000000000000000000000001527342277000154375ustar00rootroot00000000000000pupnp-pupnp-216c3c7/cmake/CmDaB.cmake000066400000000000000000000030711527342277000173500ustar00rootroot00000000000000 # This file is part of the CmDab Project. # # Copyright (c) 2021 Vollstrecker (werner@vollstreckernet.de) # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License Version 3as published by # the Free Software Foundation; of the License # # # You should have received a copy of the GNU General Public License # along with this program; if not, check # https://github.com/Vollstrecker/CmDaB/blob/main/LICENSE #[=======================================================================[.rst: CmDaB.cmake ------------------ .. only:: html .. contents:: Overview ^^^^^^^^ This module adds an option called DOWNLOAD_AND_BUILD_DEPS to your project. If this option is activated by the user, this module will download and include the main project files to be used within your project. #]=======================================================================] include (CMakeDependentOption) Find_Package (Git) cmake_dependent_option (DOWNLOAD_AND_BUILD_DEPS "Get all missing stuff" OFF ${Git_FOUND} OFF) if (DOWNLOAD_AND_BUILD_DEPS) include (FetchContent) FetchContent_Declare ( CmDaB GIT_REPOSITORY https://github.com/Vollstrecker/CmDaB.git GIT_TAG f079cb2 # pin to known-good commit; update when upgrading CmDaB ) FetchContent_GetProperties(CmDaB) if (NOT cmdab_POPULATED) if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.14) FetchContent_MakeAvailable (CmDaB) else() FetchContent_Populate (CmDaB) add_subdirectory (${cmdab_SOURCE_DIR} ${cmdab_BINARY_DIR} ) endif() endif() endif() pupnp-pupnp-216c3c7/cmake/autoconfig.h.in000066400000000000000000000030341527342277000203530ustar00rootroot00000000000000/* whether the system defaults to 32bit off_t but can do 64bit when requested */ #cmakedefine UPNP_LARGEFILE_SENSITIVE 1 /* see upnpconfig.h */ #cmakedefine UPNP_HAVE_DEBUG 1 /* see upnpconfig.h */ #cmakedefine UPNP_HAVE_CLIENT 1 /* see upnpconfig.h */ #cmakedefine UPNP_HAVE_DEVICE 1 /* see upnpconfig.h */ #cmakedefine UPNP_HAVE_WEBSERVER 1 /* see upnpconfig.h */ #cmakedefine UPNP_HAVE_SSDP 1 /* see upnpconfig.h */ #cmakedefine UPNP_HAVE_OPTSSDP 1 /* see upnpconfig.h */ #cmakedefine UPNP_HAVE_SOAP 1 /* see upnpconfig.h */ #cmakedefine UPNP_HAVE_GENA 1 /* see upnpconfig.h */ #cmakedefine UPNP_HAVE_TOOLS 1 /* see upnpconfig.h */ #cmakedefine UPNP_ENABLE_IPV6 1 /* see upnpconfig.h */ #cmakedefine UPNP_ENABLE_UNSPECIFIED_SERVER 1 /* see upnpconfig.h */ #cmakedefine UPNP_ENABLE_OPEN_SSL 1 /* see upnpconfig.h */ #cmakedefine UPNP_ENABLE_BLOCKING_TCP_CONNECTIONS 1 /* see upnpconfig.h */ #cmakedefine IXML_HAVE_SCRIPTSUPPORT 1 /* see upnpconfig.h */ #cmakedefine UPNP_MINISERVER_REUSEADDR 1 /* On Windows, select the network interface by its adapter name (GUID) instead * of the friendly name (see UpnpGetIfInfo in upnp/src/api/upnpapi.c). */ #cmakedefine UPNP_ADAPTER_UUID_NAME 1 /* Type for storing the length of struct sockaddr */ #cmakedefine socklen_t 1 /* Defines if strnlen is available on your system */ #cmakedefine HAVE_STRNLEN 1 /* Defines if strndup is available on your system */ #cmakedefine HAVE_STRNDUP 1 /* Define if backtrace( */ #cmakedefine HAVE_BACKTRACE 1 /* Use pthread_rwlock_t */ #cmakedefine UPNP_USE_RWLOCK 1 pupnp-pupnp-216c3c7/cmake/options.cmake000066400000000000000000000051631527342277000201410ustar00rootroot00000000000000set (testing_default ON) if(DEFINED ENABLE_TESTING AND NOT UPNP_ENABLE_TESTING) message (DEPRECATION "PUPNP now has UPNP_ENABLE_TESTING and UPNP_ENABLE_TESTING_INTEGRATION options") set (testing_default §{BUILD_TESTING}) endif() option (UPNP_IXML_ENABLE_SCRIPT_SUPPORT "script support for IXML document tree, see ixml.h" ON) option (UPNP_ADAPTER_UUID_NAME "on Windows, select the network interface by its adapter name (GUID) instead of the friendly name" OFF) option (UPNP_BUILD_SAMPLES "compilation of upnp/sample/ code" ON) option (UPNP_BUILD_SHARED "Build shared libraries" ON) option (UPNP_BUILD_STATIC "Build static libraries" ON) option (UPNP_ENABLE_BACKTRACE "Print backtrace on first thread pool overflow" ON) option (UPNP_ENABLE_BLOCKING_TCP_CONNECTIONS "blocking TCP connections" OFF) option (UPNP_ENABLE_CLIENT_API "control point code (client)" ON) option (UPNP_ENABLE_DEBUG "debug logging (UpnpInitLog/UpnpSetLogLevel/UpnpGetDebugFile)" OFF) option (UPNP_ENABLE_DEVICE_API "device specific code (implies --disable-webserver if disabled)" ON) option (UPNP_ENABLE_GENA "GENA part" ON) option (UPNP_ENABLE_HELPER_API_TOOLS "helper APIs in upnptools.h" ON) option (UPNP_ENABLE_IPV6 "ipv6 support" ON) option (UPNP_ENABLE_OPEN_SSL "open-ssl support" OFF) option (UPNP_ENABLE_OPTIONAL_SSDP_HEADERS "optional SSDP headers support" ON) option (UPNP_ENABLE_SOAP "SOAP part" ON) option (UPNP_ENABLE_SSDP "SSDP part" ON) option (UPNP_ENABLE_TESTING "enable tests for upnp" ${testing_default}) option (UPNP_ENABLE_TESTING_INTEGRATION "enable integrationtests for upnp" ${testing_default}) option (UPNP_ENABLE_UNSPECIFIED_SERVER "unspecified SERVER header" OFF) option (UPNP_ENABLE_WEBSERVER "integrated web server" ${UPNP_ENABLE_DEVICE_API}) option (UPNP_MINISERVER_REUSEADDR "Bind the miniserver socket with SO_REUSEADDR to allow clean restarts" ON) if (UPNP_ENABLE_WEBSERVER AND NOT UPNP_ENABLE_DEVICE_API) message (FATAL_ERROR "The webserver does not work without the device-api code") endif() set (IXML_HAVE_SCRIPTSUPPORT ${UPNP_IXML_ENABLE_SCRIPT_SUPPORT}) #see ixml.h set (UPNP_HAVE_CLIENT ${UPNP_ENABLE_CLIENT_API}) #see upnpconfig.h set (UPNP_HAVE_DEBUG ${UPNP_ENABLE_DEBUG}) #see upnpconfig.h set (UPNP_HAVE_DEVICE ${UPNP_ENABLE_DEVICE_API}) #see upnpconfig.h set (UPNP_HAVE_GENA ${UPNP_ENABLE_GENA}) #see upnpconfig.h set (UPNP_HAVE_OPTSSDP ${UPNP_ENABLE_OPTIONAL_SSDP_HEADERS}) #see upnpconfig.h set (UPNP_HAVE_SOAP ${UPNP_ENABLE_SOAP}) #see upnpconfig.h set (UPNP_HAVE_SSDP ${UPNP_ENABLE_SSDP}) #see upnpconfig.h set (UPNP_HAVE_TOOLS ${UPNP_ENABLE_HELPER_API_TOOLS}) #see upnpconfig.h set (UPNP_HAVE_WEBSERVER ${UPNP_ENABLE_WEBSERVER}) #see upnpconfig.h pupnp-pupnp-216c3c7/cmake/post-test.cmake000066400000000000000000000002111527342277000203750ustar00rootroot00000000000000if (EXISTS ${BUILD_DIR}/upnp/test/test_init.log) file (READ ${BUILD_DIR}/upnp/test/test_init.log logdata) message (${logdata}) endif() pupnp-pupnp-216c3c7/cmake/test-functions.cmake000066400000000000000000000121271527342277000214310ustar00rootroot00000000000000function(UPNP_addGTest testName sourceFile) cmake_parse_arguments( PARSE_ARGV 2 "agm" "" "" "ADDITIONAL_INCLUDE_DIRS" ) if(agm_UNPARSED_ARGUMENTS) message( FATAL_ERROR "Additional Arg given to ${testName}: ${agm_UNPARSED_ARGUMENTS}" ) endif() UPNP_Add_Test_Executable(${testName} ${sourceFile}) if(UPNP_BUILD_SHARED) if(agm_ADDITIONAL_INCLUDE_DIRS) target_include_directories( ${testName} PRIVATE ${agm_ADDITIONAL_INCLUDE_DIRS} ) endif() target_link_libraries(${testName} PRIVATE GTest::gmock) gtest_add_tests( TARGET ${testName} TEST_PREFIX test-upnp- TEST_LIST GTEST_${testName} ) set_tests_properties( ${GTEST_${testName}} PROPERTIES RESOURCE_LOCK upnp_stack ) if(MSVC OR MSYS OR MINGW OR CYGWIN) UPNP_Find_Test_Env(${testName} TEST_ENV) set_tests_properties( ${GTEST_${testName}} PROPERTIES ENVIRONMENT "${TEST_ENV}" ) endif() endif() if(UPNP_BUILD_STATIC) if(agm_ADDITIONAL_INCLUDE_DIRS) target_include_directories( ${testName}-static PRIVATE ${agm_ADDITIONAL_INCLUDE_DIRS} ) endif() target_link_libraries(${testName}-static PRIVATE GTest::gmock) gtest_add_tests( TARGET ${testName}-static TEST_PREFIX test-upnp- TEST_SUFFIX -static TEST_LIST GTEST_${testName}_static ) set_tests_properties( ${GTEST_${testName}_static} PROPERTIES RESOURCE_LOCK upnp_stack ) endif() endfunction() function(UPNP_Add_Test_Executable testName sourceFile) if(UPNP_BUILD_SHARED) add_executable(${testName} ${sourceFile}) target_link_libraries(${testName} PRIVATE upnp_shared) if(HAVE_MACRO_PREFIX_MAP) target_compile_options( ${testName} PRIVATE -fmacro-prefix-map=${CMAKE_SOURCE_DIR}/= ) endif() endif() if(UPNP_BUILD_STATIC) add_executable(${testName}-static ${sourceFile}) target_link_libraries(${testName}-static PRIVATE upnp_static) if(HAVE_MACRO_PREFIX_MAP) target_compile_options( ${testName}-static PRIVATE -fmacro-prefix-map=${CMAKE_SOURCE_DIR}/= ) endif() endif() endfunction() # Most of the upnp tests start the UPnP stack. Two stacks running at the same # time on one host hear each other on the SSDP multicast group and compete for # the same ports, so a parallel run (ctest -j) made tests fail at random. The # tests added here, and the others that start the stack, share the resource # lock upnp_stack: ctest never runs two of them at the same time. function(UPNP_Add_Unit_Test testName sourceFile) UPNP_Add_Test_Executable(${testName} ${sourceFile}) if(UPNP_BUILD_SHARED) add_test(NAME ${testName} COMMAND ${testName}) set_tests_properties( ${testName} PROPERTIES RESOURCE_LOCK upnp_stack ) if(MSVC OR MSYS OR MINGW OR CYGWIN ) UPNP_Find_Test_Env(${testName} TEST_ENV) set_tests_properties( ${testName} PROPERTIES ENVIRONMENT "${TEST_ENV}" ) endif() endif() if(UPNP_BUILD_STATIC) add_test(NAME ${testName}-static COMMAND ${testName}-static) set_tests_properties( ${testName}-static PROPERTIES RESOURCE_LOCK upnp_stack ) endif() endfunction() # For MSVC toolchain only function(UPNP_Find_Test_Env testName resultVar) UPNP_Find_Test_Libs(${testName} ${resultVar}) set(tempEnv "PATH=") if(MSVC OR MINGW) set(separator "\\\;") else() set(separator ":") endif() foreach(entry IN ITEMS ${${resultVar}}) string(APPEND tempEnv "${entry}${separator}") endforeach() string(APPEND tempEnv "$ENV{PATH}") set(${resultVar} ${tempEnv} PARENT_SCOPE ) endfunction() function(UPNP_Find_Test_Libs testName resultVar) unset(linkLibs) if(NOT TARGET ${testName}) set(interface TRUE) else() get_property( interface TARGET ${testName} PROPERTY IMPORTED ) endif() if(NOT ${interface}) get_property( linkLibs TARGET ${testName} PROPERTY LINK_LIBRARIES ) foreach(lib IN ITEMS ${linkLibs}) UPNP_Find_Test_Libs(${lib} ${resultVar}) if(NOT TARGET ${lib}) set(interface2 TRUE) else() get_property( interface2 TARGET ${lib} PROPERTY IMPORTED ) endif() if(NOT ${interface2}) list(FIND ${resultVar} "$" index ) if(${index} STREQUAL "-1") list(APPEND ${resultVar} "$" ) endif() endif() endforeach() endif() set(${resultVar} ${${resultVar}} PARENT_SCOPE ) endfunction() function(IXML_add_unit_test testName sourceFile parameters) if(UPNP_BUILD_SHARED) add_executable("${testName}-shared" "${sourceFile}") target_link_libraries("${testName}-shared" PRIVATE ixml_shared) if(MINGW OR MSYS) target_link_options( "${testName}-shared" PRIVATE -static-libstdc++ -static-libgcc ) endif() add_test(NAME ${testName} COMMAND "${testName}-shared" ${parameters} ) set_tests_properties( ${testName} PROPERTIES ENVIRONMENT "PATH=$\;%PATH%" ) endif() if(UPNP_BUILD_STATIC) add_executable("${testName}-static" "${sourceFile}") target_link_libraries("${testName}-static" PRIVATE ixml_static) add_test(NAME "${testName}-static" COMMAND "${testName}-static" ${parameters} ) endif() endfunction() pupnp-pupnp-216c3c7/docs/000077500000000000000000000000001527342277000153075ustar00rootroot00000000000000pupnp-pupnp-216c3c7/docs/Doxyfile000066400000000000000000003252761527342277000170340ustar00rootroot00000000000000# Doxyfile 1.8.16 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. # # All text after a double hash (##) is considered a comment and is placed in # front of the TAG it is preceding. # # All text after a single hash (#) is considered a comment and will be ignored. # The format is: # TAG = value [value, ...] # For lists, items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (\" \"). #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the configuration # file that follow. The default is UTF-8 which is also the encoding used for all # text before the first occurrence of this tag. Doxygen uses libiconv (or the # iconv built into libc) for the transcoding. See # https://www.gnu.org/software/libiconv/ for the list of possible encodings. # The default value is: UTF-8. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded by # double-quotes, unless you are using Doxywizard) that should identify the # project for which the documentation is generated. This name is used in the # title of most generated pages and in a few other places. # The default value is: My Project. PROJECT_NAME = libUPnP # The PROJECT_NUMBER tag can be used to enter a project or revision number. This # could be handy for archiving the generated documentation or if some version # control system is used. PROJECT_NUMBER = 22.2.1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a # quick idea about the purpose of the project. Keep the description short. PROJECT_BRIEF = # With the PROJECT_LOGO tag one can specify a logo or an icon that is included # in the documentation. The maximum height of the logo should not exceed 55 # pixels and the maximum width should not exceed 200 pixels. Doxygen will copy # the logo to the output directory. PROJECT_LOGO = # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path # into which the generated documentation will be written. If a relative path is # entered, it will be relative to the location where doxygen was started. If # left blank the current directory will be used. OUTPUT_DIRECTORY = doxygen # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and # will distribute the generated files over these directories. Enabling this # option can be useful when feeding doxygen a huge amount of source files, where # putting all generated files in the same directory would otherwise causes # performance problems for the file system. # The default value is: NO. CREATE_SUBDIRS = NO # If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII # characters to appear in the names of generated files. If set to NO, non-ASCII # characters will be escaped, for example _xE3_x81_x84 will be used for Unicode # U+3044. # The default value is: NO. ALLOW_UNICODE_NAMES = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, # Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), # Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, # Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), # Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, # Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, # Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, # Ukrainian and Vietnamese. # The default value is: English. OUTPUT_LANGUAGE = English # The OUTPUT_TEXT_DIRECTION tag is used to specify the direction in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all generated output in the proper direction. # Possible values are: None, LTR, RTL and Context. # The default value is: None. OUTPUT_TEXT_DIRECTION = None # If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member # descriptions after the members that are listed in the file and class # documentation (similar to Javadoc). Set to NO to disable this. # The default value is: YES. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief # description of a member or function before the detailed description # # Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. # The default value is: YES. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator that is # used to form the text in various listings. Each string in this list, if found # as the leading text of the brief description, will be stripped from the text # and the result, after processing the whole list, is used as the annotated # text. Otherwise, the brief description is used as-is. If left blank, the # following values are used ($name is automatically replaced with the name of # the entity):The $name class, The $name widget, The $name file, is, provides, # specifies, contains, represents, a, an and the. ABBREVIATE_BRIEF = # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # doxygen will generate a detailed section even if there is only a brief # description. # The default value is: NO. ALWAYS_DETAILED_SEC = YES # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. # The default value is: NO. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path # before files name in the file list and in the header files. If set to NO the # shortest path that makes the file name unique will be used # The default value is: YES. FULL_PATH_NAMES = YES # The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. # Stripping is only done if one of the specified strings matches the left-hand # part of the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the path to # strip. # # Note that you can specify absolute paths here, but also relative paths, which # will be relative from the directory where doxygen is started. # This tag requires that the tag FULL_PATH_NAMES is set to YES. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the # path mentioned in the documentation of a class, which tells the reader which # header file to include in order to use a class. If left blank only the name of # the header file containing the class definition is used. Otherwise one should # specify the list of include paths that are normally passed to the compiler # using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but # less readable) file names. This can be useful is your file systems doesn't # support long names like on DOS, Mac, or CD-ROM. # The default value is: NO. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the # first line (until the first dot) of a Javadoc-style comment as the brief # description. If set to NO, the Javadoc-style will behave just like regular Qt- # style comments (thus requiring an explicit @brief command for a brief # description.) # The default value is: NO. JAVADOC_AUTOBRIEF = NO # If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line # such as # /*************** # as being the beginning of a Javadoc-style comment "banner". If set to NO, the # Javadoc-style will behave just like regular comments and it will not be # interpreted by doxygen. # The default value is: NO. JAVADOC_BANNER = NO # If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first # line (until the first dot) of a Qt-style comment as the brief description. If # set to NO, the Qt-style will behave just like regular Qt-style comments (thus # requiring an explicit \brief command for a brief description.) # The default value is: NO. QT_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a # multi-line C++ special comment block (i.e. a block of //! or /// comments) as # a brief description. This used to be the default behavior. The new default is # to treat a multi-line C++ comment block as a detailed description. Set this # tag to YES if you prefer the old behavior instead. # # Note that setting this tag to YES also means that rational rose comments are # not recognized any more. # The default value is: NO. MULTILINE_CPP_IS_BRIEF = NO # If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the # documentation from any documented member that it re-implements. # The default value is: YES. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new # page for each member. If set to NO, the documentation of a member will be part # of the file/class/namespace that contains it. # The default value is: NO. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen # uses this value to replace tabs by spaces in code fragments. # Minimum value: 1, maximum value: 16, default value: 4. TAB_SIZE = 8 # This tag can be used to specify a number of aliases that act as commands in # the documentation. An alias has the form: # name=value # For example adding # "sideeffect=@par Side Effects:\n" # will allow you to put the command \sideeffect (or @sideeffect) in the # documentation, which will result in a user-defined paragraph with heading # "Side Effects:". You can put \n's in the value part of an alias to insert # newlines (in the resulting output). You can put ^^ in the value part of an # alias to insert a newline as if a physical newline was in the original file. # When you need a literal { or } or , in the value part of an alias you have to # escape them by means of a backslash (\), this can lead to conflicts with the # commands \{ and \} for these it is advised to use the version @{ and @} or use # a double escape (\\{ and \\}) ALIASES = # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding "class=itcl::class" # will allow you to use the command class in the itcl::class meaning. TCL_SUBST = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources # only. Doxygen will then generate output that is more tailored for C. For # instance, some of the names that are used will be different. The list of all # members will be omitted, etc. # The default value is: NO. OPTIMIZE_OUTPUT_FOR_C = YES # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or # Python sources only. Doxygen will then generate output that is more tailored # for that language. For instance, namespaces will be presented as packages, # qualified scopes will look different, etc. # The default value is: NO. OPTIMIZE_OUTPUT_JAVA = NO # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran # sources. Doxygen will then generate output that is tailored for Fortran. # The default value is: NO. OPTIMIZE_FOR_FORTRAN = NO # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL # sources. Doxygen will then generate output that is tailored for VHDL. # The default value is: NO. OPTIMIZE_OUTPUT_VHDL = NO # Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice # sources only. Doxygen will then generate output that is more tailored for that # language. For instance, namespaces will be presented as modules, types will be # separated into more groups, etc. # The default value is: NO. OPTIMIZE_OUTPUT_SLICE = NO # Doxygen selects the parser to use depending on the extension of the files it # parses. With this tag you can assign which parser to use for a given # extension. Doxygen has a built-in mapping, but you can override or extend it # using this tag. The format is ext=language, where ext is a file extension, and # language is one of the parsers supported by doxygen: IDL, Java, Javascript, # Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice, # Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: # FortranFree, unknown formatted Fortran: Fortran. In the later case the parser # tries to guess whether the code is fixed or free formatted code, this is the # default for Fortran type files), VHDL, tcl. For instance to make doxygen treat # .inc files as Fortran files (default is PHP), and .f files as C (default is # Fortran), use: inc=Fortran f=C. # # Note: For files without extension you can use no_extension as a placeholder. # # Note that for custom extensions you also need to set FILE_PATTERNS otherwise # the files are not read by doxygen. EXTENSION_MAPPING = # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments # according to the Markdown format, which allows for more readable # documentation. See https://daringfireball.net/projects/markdown/ for details. # The output of markdown processing is further processed by doxygen, so you can # mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in # case of backward compatibilities issues. # The default value is: YES. MARKDOWN_SUPPORT = YES # When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up # to that level are automatically included in the table of contents, even if # they do not have an id attribute. # Note: This feature currently applies only to Markdown headings. # Minimum value: 0, maximum value: 99, default value: 5. # This tag requires that the tag MARKDOWN_SUPPORT is set to YES. TOC_INCLUDE_HEADINGS = 5 # When enabled doxygen tries to link words that correspond to documented # classes, or namespaces to their corresponding documentation. Such a link can # be prevented in individual cases by putting a % sign in front of the word or # globally by setting AUTOLINK_SUPPORT to NO. # The default value is: YES. AUTOLINK_SUPPORT = YES # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want # to include (a tag file for) the STL sources as input, then you should set this # tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); # versus func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. # The default value is: NO. BUILTIN_STL_SUPPORT = NO # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. # The default value is: NO. CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip (see: # https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen # will parse them like normal C++ but will assume all classes use public instead # of private inheritance when no explicit protection keyword is present. # The default value is: NO. SIP_SUPPORT = NO # For Microsoft's IDL there are propget and propput attributes to indicate # getter and setter methods for a property. Setting this option to YES will make # doxygen to replace the get and set methods by a property in the documentation. # This will only work if the methods are indeed getting or setting a simple # type. If this is not the case, or you want to show the methods anyway, you # should set this option to NO. # The default value is: YES. IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. # The default value is: NO. DISTRIBUTE_GROUP_DOC = NO # If one adds a struct or class to a group and this option is enabled, then also # any nested class or struct is added to the same group. By default this option # is disabled and one has to add nested compounds explicitly via \ingroup. # The default value is: NO. GROUP_NESTED_COMPOUNDS = NO # Set the SUBGROUPING tag to YES to allow class member groups of the same type # (for instance a group of public functions) to be put as a subgroup of that # type (e.g. under the Public Functions section). Set it to NO to prevent # subgrouping. Alternatively, this can be done per class using the # \nosubgrouping command. # The default value is: YES. SUBGROUPING = YES # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions # are shown inside the group in which they are included (e.g. using \ingroup) # instead of on a separate page (for HTML and Man pages) or section (for LaTeX # and RTF). # # Note that this feature does not work in combination with # SEPARATE_MEMBER_PAGES. # The default value is: NO. INLINE_GROUPED_CLASSES = NO # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions # with only public data fields or simple typedef fields will be shown inline in # the documentation of the scope in which they are defined (i.e. file, # namespace, or group documentation), provided this scope is documented. If set # to NO, structs, classes, and unions are shown on a separate page (for HTML and # Man pages) or section (for LaTeX and RTF). # The default value is: NO. INLINE_SIMPLE_STRUCTS = NO # When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or # enum is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, # namespace, or class. And the struct will be named TypeS. This can typically be # useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. # The default value is: NO. TYPEDEF_HIDES_STRUCT = NO # The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This # cache is used to resolve symbols given their name and scope. Since this can be # an expensive process and often the same symbol appears multiple times in the # code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small # doxygen will become slower. If the cache is too large, memory is wasted. The # cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range # is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 # symbols. At the end of a run doxygen will report the cache usage and suggest # the optimal cache size from a speed point of view. # Minimum value: 0, maximum value: 9, default value: 0. LOOKUP_CACHE_SIZE = 0 #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in # documentation are documented, even if no documentation was available. Private # class members and static file members will be hidden unless the # EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. # Note: This will also disable the warnings about undocumented members that are # normally produced when WARNINGS is set to YES. # The default value is: NO. EXTRACT_ALL = NO # If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will # be included in the documentation. # The default value is: NO. EXTRACT_PRIVATE = YES # If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual # methods of a class will be included in the documentation. # The default value is: NO. EXTRACT_PRIV_VIRTUAL = NO # If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal # scope will be included in the documentation. # The default value is: NO. EXTRACT_PACKAGE = NO # If the EXTRACT_STATIC tag is set to YES, all static members of a file will be # included in the documentation. # The default value is: NO. EXTRACT_STATIC = YES # If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined # locally in source files will be included in the documentation. If set to NO, # only classes defined in header files are included. Does not have any effect # for Java sources. # The default value is: YES. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. If set to YES, local methods, # which are defined in the implementation section but not in the interface are # included in the documentation. If set to NO, only methods in the interface are # included. # The default value is: NO. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called # 'anonymous_namespace{file}', where file will be replaced with the base name of # the file that contains the anonymous namespace. By default anonymous namespace # are hidden. # The default value is: NO. EXTRACT_ANON_NSPACES = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all # undocumented members inside documented classes or files. If set to NO these # members will be included in the various overviews, but no documentation # section is generated. This option has no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. If set # to NO, these classes will be included in the various overviews. This option # has no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend # (class|struct|union) declarations. If set to NO, these declarations will be # included in the documentation. # The default value is: NO. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any # documentation blocks found inside the body of a function. If set to NO, these # blocks will be appended to the function's detailed documentation block. # The default value is: NO. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation that is typed after a # \internal command is included. If the tag is set to NO then the documentation # will be excluded. Set it to YES to include the internal documentation. # The default value is: NO. INTERNAL_DOCS = YES # If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file # names in lower-case letters. If set to YES, upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # (including Cygwin) ands Mac users are advised to set this option to NO. # The default value is: system dependent. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with # their full class and namespace scopes in the documentation. If set to YES, the # scope will be hidden. # The default value is: NO. HIDE_SCOPE_NAMES = NO # If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will # append additional text to a page's title, such as Class Reference. If set to # YES the compound reference will be hidden. # The default value is: NO. HIDE_COMPOUND_REFERENCE= NO # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of # the files that are included by a file in the documentation of that file. # The default value is: YES. SHOW_INCLUDE_FILES = YES # If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each # grouped member an include statement to the documentation, telling the reader # which file to include in order to use the member. # The default value is: NO. SHOW_GROUPED_MEMB_INC = NO # If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include # files with double quotes in the documentation rather than with sharp brackets. # The default value is: NO. FORCE_LOCAL_INCLUDES = NO # If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the # documentation for inline members. # The default value is: YES. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the # (detailed) documentation of file and class members alphabetically by member # name. If set to NO, the members will appear in declaration order. # The default value is: YES. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief # descriptions of file, namespace and class members alphabetically by member # name. If set to NO, the members will appear in declaration order. Note that # this will also influence the order of the classes in the class list. # The default value is: NO. SORT_BRIEF_DOCS = NO # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the # (brief and detailed) documentation of class members so that constructors and # destructors are listed first. If set to NO the constructors will appear in the # respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. # Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief # member documentation. # Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting # detailed member documentation. # The default value is: NO. SORT_MEMBERS_CTORS_1ST = NO # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy # of group names into alphabetical order. If set to NO the group names will # appear in their defined order. # The default value is: NO. SORT_GROUP_NAMES = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by # fully-qualified names, including namespaces. If set to NO, the class list will # be sorted only by class name, not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the alphabetical # list. # The default value is: NO. SORT_BY_SCOPE_NAME = NO # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper # type resolution of all parameters of a function it will reject a match between # the prototype and the implementation of a member function even if there is # only one candidate or it is obvious which candidate to choose by doing a # simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still # accept a match between prototype and implementation in such cases. # The default value is: NO. STRICT_PROTO_MATCHING = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo # list. This list is created by putting \todo commands in the documentation. # The default value is: YES. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test # list. This list is created by putting \test commands in the documentation. # The default value is: YES. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug # list. This list is created by putting \bug commands in the documentation. # The default value is: YES. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) # the deprecated list. This list is created by putting \deprecated commands in # the documentation. # The default value is: YES. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional documentation # sections, marked by \if ... \endif and \cond # ... \endcond blocks. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the # initial value of a variable or macro / define can have for it to appear in the # documentation. If the initializer consists of more lines than specified here # it will be hidden. Use a value of 0 to hide initializers completely. The # appearance of the value of individual variables and macros / defines can be # controlled using \showinitializer or \hideinitializer command in the # documentation regardless of this setting. # Minimum value: 0, maximum value: 10000, default value: 30. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated at # the bottom of the documentation of classes and structs. If set to YES, the # list will mention the files that were used to generate the documentation. # The default value is: YES. SHOW_USED_FILES = YES # Set the SHOW_FILES tag to NO to disable the generation of the Files page. This # will remove the Files entry from the Quick Index and from the Folder Tree View # (if specified). # The default value is: YES. SHOW_FILES = YES # Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces # page. This will remove the Namespaces entry from the Quick Index and from the # Folder Tree View (if specified). # The default value is: YES. SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via # popen()) the command command input-file, where command is the value of the # FILE_VERSION_FILTER tag, and input-file is the name of an input file provided # by doxygen. Whatever the program writes to standard output is used as the file # version. For an example see the documentation. FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated # output files in an output format independent way. To create the layout file # that represents doxygen's defaults, run doxygen with the -l option. You can # optionally specify a file name after the option, if omitted DoxygenLayout.xml # will be used as the name of the layout file. # # Note that if you run doxygen from a directory containing a file called # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE # tag is left empty. LAYOUT_FILE = # The CITE_BIB_FILES tag can be used to specify one or more bib files containing # the reference definitions. This must be a list of .bib files. The .bib # extension is automatically appended if omitted. This requires the bibtex tool # to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info. # For LaTeX the style of the bibliography can be controlled using # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the # search path. See also \cite for info how to create references. CITE_BIB_FILES = #--------------------------------------------------------------------------- # Configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated to # standard output by doxygen. If QUIET is set to YES this implies that the # messages are off. # The default value is: NO. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are # generated to standard error (stderr) by doxygen. If WARNINGS is set to YES # this implies that the warnings are on. # # Tip: Turn warnings on while writing the documentation. # The default value is: YES. WARNINGS = YES # If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate # warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag # will automatically be disabled. # The default value is: YES. WARN_IF_UNDOCUMENTED = YES # If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some parameters # in a documented function, or documenting parameters that don't exist or using # markup commands wrongly. # The default value is: YES. WARN_IF_DOC_ERROR = YES # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that # are documented, but have no documentation for their parameters or return # value. If set to NO, doxygen will only warn about wrong or incomplete # parameter documentation, but not about the absence of documentation. If # EXTRACT_ALL is set to YES then this flag will automatically be disabled. # The default value is: NO. WARN_NO_PARAMDOC = NO # If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when # a warning is encountered. # The default value is: NO. WARN_AS_ERROR = NO # The WARN_FORMAT tag determines the format of the warning messages that doxygen # can produce. The string should contain the $file, $line, and $text tags, which # will be replaced by the file and line number from which the warning originated # and the warning text. Optionally the format may contain $version, which will # be replaced by the version of the file (if it could be obtained via # FILE_VERSION_FILTER) # The default value is: $file:$line: $text. WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning and error # messages should be written. If left blank the output is written to standard # error (stderr). WARN_LOGFILE = #--------------------------------------------------------------------------- # Configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag is used to specify the files and/or directories that contain # documented source files. You may enter file names like myfile.cpp or # directories like /usr/src/myproject. Separate the files or directories with # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. INPUT = ../upnp \ ../ixml \ api_changes # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses # libiconv (or the iconv built into libc) for the transcoding. See the libiconv # documentation (see: https://www.gnu.org/software/libiconv/) for the list of # possible encodings. # The default value is: UTF-8. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and # *.h) to filter out the source-files in the directories. # # Note that for custom extensions or not directly supported extensions you also # need to set EXTENSION_MAPPING for the extension otherwise the files are not # read by doxygen. # # If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, # *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, # *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, # *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, # *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, *.qsf and *.ice. FILE_PATTERNS = *.c *.h *.md # The RECURSIVE tag can be used to specify whether or not subdirectories should # be searched for input files as well. # The default value is: NO. RECURSIVE = YES # The EXCLUDE tag can be used to specify files and/or directories that should be # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. # # Note that relative paths are relative to the directory from which doxygen is # run. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded # from the input. # The default value is: NO. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. # # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories for example use the pattern */test/* EXCLUDE_PATTERNS = */.svn \ */.deps \ */.libs \ */test # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test # # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories use the pattern */test/* EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or directories # that contain example code fragments that are included (see the \include # command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and # *.h) to filter out the source-files in the directories. If left blank all # files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude commands # irrespective of the value of the RECURSIVE tag. # The default value is: NO. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or directories # that contain images that are to be included in the documentation (see the # \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command: # # # # where is the value of the INPUT_FILTER tag, and is the # name of an input file. Doxygen will then use the output that the filter # program writes to standard output. If FILTER_PATTERNS is specified, this tag # will be ignored. # # Note that the filter must not add or remove lines; it is applied before the # code is scanned, but not when the output code is generated. If lines are added # or removed, the anchors will not be placed correctly. # # Note that for custom extensions or not directly supported extensions you also # need to set EXTENSION_MAPPING for the extension otherwise the files are not # properly processed by doxygen. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. Doxygen will compare the file name with each pattern and apply the # filter if there is a match. The filters are a list of the form: pattern=filter # (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how # filters are used. If the FILTER_PATTERNS tag is empty or if none of the # patterns match the file name, INPUT_FILTER is applied. # # Note that for custom extensions or not directly supported extensions you also # need to set EXTENSION_MAPPING for the extension otherwise the files are not # properly processed by doxygen. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will also be used to filter the input files that are used for # producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). # The default value is: NO. FILTER_SOURCE_FILES = NO # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file # pattern. A pattern will override the setting for FILTER_PATTERN (if any) and # it is also possible to disable source filtering for a specific pattern using # *.ext= (so without naming a filter). # This tag requires that the tag FILTER_SOURCE_FILES is set to YES. FILTER_SOURCE_PATTERNS = # If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that # is part of the input, its contents will be placed on the main page # (index.html). This can be useful if you have a project on for instance GitHub # and want to reuse the introduction page also for the doxygen output. USE_MDFILE_AS_MAINPAGE = #--------------------------------------------------------------------------- # Configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will be # generated. Documented entities will be cross-referenced with these sources. # # Note: To get rid of all source code in the generated output, make sure that # also VERBATIM_HEADERS is set to NO. # The default value is: NO. SOURCE_BROWSER = NO # Setting the INLINE_SOURCES tag to YES will include the body of functions, # classes and enums directly into the documentation. # The default value is: NO. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any # special comment blocks from generated source code fragments. Normal C, C++ and # Fortran comments will always remain visible. # The default value is: YES. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES then for each documented # entity all documented functions referencing it will be listed. # The default value is: NO. REFERENCED_BY_RELATION = YES # If the REFERENCES_RELATION tag is set to YES then for each documented function # all documented entities called/used by that function will be listed. # The default value is: NO. REFERENCES_RELATION = YES # If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set # to YES then the hyperlinks from functions in REFERENCES_RELATION and # REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will # link to the documentation. # The default value is: YES. REFERENCES_LINK_SOURCE = YES # If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the # source code will show a tooltip with additional information such as prototype, # brief description and links to the definition and documentation. Since this # will make the HTML file larger and loading of large files a bit slower, you # can opt to disable this feature. # The default value is: YES. # This tag requires that the tag SOURCE_BROWSER is set to YES. SOURCE_TOOLTIPS = YES # If the USE_HTAGS tag is set to YES then the references to source code will # point to the HTML generated by the htags(1) tool instead of doxygen built-in # source browser. The htags tool is part of GNU's global source tagging system # (see https://www.gnu.org/software/global/global.html). You will need version # 4.8.6 or higher. # # To use it do the following: # - Install the latest version of global # - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file # - Make sure the INPUT points to the root of the source tree # - Run doxygen as normal # # Doxygen will invoke htags (and that will in turn invoke gtags), so these # tools must be available from the command line (i.e. in the search path). # # The result: instead of the source browser generated by doxygen, the links to # source code will now point to the output of htags. # The default value is: NO. # This tag requires that the tag SOURCE_BROWSER is set to YES. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a # verbatim copy of the header file for each class for which an include is # specified. Set to NO to disable this. # See also: Section \class. # The default value is: YES. VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # Configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all # compounds will be generated. Enable this if the project contains a lot of # classes, structs, unions or interfaces. # The default value is: YES. ALPHABETICAL_INDEX = NO # The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in # which the alphabetical index list will be split. # Minimum value: 1, maximum value: 20, default value: 5. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all classes will # be put under the same header in the alphabetical index. The IGNORE_PREFIX tag # can be used to specify a prefix (or a list of prefixes) that should be ignored # while generating the index headers. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. IGNORE_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output # The default value is: YES. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of # it. # The default directory is: html. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for each # generated HTML page (for example: .htm, .php, .asp). # The default value is: .html. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a user-defined HTML header file for # each generated HTML page. If the tag is left blank doxygen will generate a # standard header. # # To get valid HTML the header file that includes any scripts and style sheets # that doxygen needs, which is dependent on the configuration options used (e.g. # the setting GENERATE_TREEVIEW). It is highly recommended to start with a # default header using # doxygen -w html new_header.html new_footer.html new_stylesheet.css # YourConfigFile # and then modify the file new_header.html. See also section "Doxygen usage" # for information on how to generate the default header that doxygen normally # uses. # Note: The header is subject to change so you typically have to regenerate the # default header when upgrading to a newer version of doxygen. For a description # of the possible markers and block names see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each # generated HTML page. If the tag is left blank doxygen will generate a standard # footer. See HTML_HEADER for more information on how to generate a default # footer and what special commands can be used inside the footer. See also # section "Doxygen usage" for information on how to generate the default footer # that doxygen normally uses. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style # sheet that is used by each HTML page. It can be used to fine-tune the look of # the HTML output. If left blank doxygen will generate a default style sheet. # See also section "Doxygen usage" for information on how to generate the style # sheet that doxygen normally uses. # Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as # it is more robust and this tag (HTML_STYLESHEET) will in the future become # obsolete. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_STYLESHEET = # The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined # cascading style sheets that are included after the standard style sheets # created by doxygen. Using this option one can overrule certain style aspects. # This is preferred over using HTML_STYLESHEET since it does not replace the # standard style sheet and is therefore more robust against future updates. # Doxygen will copy the style sheet files to the output directory. # Note: The order of the extra style sheet files is of importance (e.g. the last # style sheet in the list overrules the setting of the previous ones in the # list). For an example see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_STYLESHEET = # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note # that these files will be copied to the base HTML output directory. Use the # $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these # files. In the HTML_STYLESHEET file, use the file name only. Also note that the # files will be copied as-is; there are no commands or markers available. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen # will adjust the colors in the style sheet and background images according to # this color. Hue is specified as an angle on a colorwheel, see # https://en.wikipedia.org/wiki/Hue for more information. For instance the value # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 # purple, and 360 is red again. # Minimum value: 0, maximum value: 359, default value: 220. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_HUE = 220 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors # in the HTML output. For a value of 0 the output will use grayscales only. A # value of 255 will produce the most vivid colors. # Minimum value: 0, maximum value: 255, default value: 100. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_SAT = 100 # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the # luminance component of the colors in the HTML output. Values below 100 # gradually make the output lighter, whereas values above 100 make the output # darker. The value divided by 100 is the actual gamma applied, so 80 represents # a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not # change the gamma. # Minimum value: 40, maximum value: 240, default value: 80. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_GAMMA = 80 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML # page will contain the date and time when the page was generated. Setting this # to YES can help to show when doxygen was last run and thus if the # documentation is up to date. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_TIMESTAMP = NO # If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML # documentation will contain a main index with vertical navigation menus that # are dynamically created via Javascript. If disabled, the navigation index will # consists of multiple levels of tabs that are statically embedded in every HTML # page. Disable this option to support browsers that do not have Javascript, # like the Qt help browser. # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_DYNAMIC_MENUS = YES # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_DYNAMIC_SECTIONS = NO # With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries # shown in the various tree structured indices initially; the user can expand # and collapse entries dynamically later on. Doxygen will expand the tree to # such a level that at most the specified number of entries are visible (unless # a fully collapsed tree already exceeds this amount). So setting the number of # entries 1 will produce a full collapsed tree by default. 0 is a special value # representing an infinite number of entries and will result in a full expanded # tree by default. # Minimum value: 0, maximum value: 9999, default value: 100. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_INDEX_NUM_ENTRIES = 100 # If the GENERATE_DOCSET tag is set to YES, additional index files will be # generated that can be used as input for Apple's Xcode 3 integrated development # environment (see: https://developer.apple.com/xcode/), introduced with OSX # 10.5 (Leopard). To create a documentation set, doxygen will generate a # Makefile in the HTML output directory. Running make will produce the docset in # that directory and running make install will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at # startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy # genXcode/_index.html for more information. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_DOCSET = NO # This tag determines the name of the docset feed. A documentation feed provides # an umbrella under which multiple documentation sets from a single provider # (such as a company or product suite) can be grouped. # The default value is: Doxygen generated docs. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_FEEDNAME = "Doxygen generated docs" # This tag specifies a string that should uniquely identify the documentation # set bundle. This should be a reverse domain-name style string, e.g. # com.mycompany.MyDocSet. Doxygen will append .docset to the name. # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_BUNDLE_ID = org.doxygen.Project # The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify # the documentation publisher. This should be a reverse domain-name style # string, e.g. com.mycompany.MyDocSet.documentation. # The default value is: org.doxygen.Publisher. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_ID = org.doxygen.Publisher # The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. # The default value is: Publisher. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_NAME = Publisher # If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three # additional HTML index files: index.hhp, index.hhc, and index.hhk. The # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop # (see: https://www.microsoft.com/en-us/download/details.aspx?id=21138) on # Windows. # # The HTML Help Workshop contains a compiler that can convert all HTML output # generated by doxygen into a single compiled HTML file (.chm). Compiled HTML # files are now used as the Windows 98 help format, and will replace the old # Windows help format (.hlp) on all Windows platforms in the future. Compressed # HTML files also contain an index, a table of contents, and you can search for # words in the documentation. The HTML workshop also contains a viewer for # compressed HTML files. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_HTMLHELP = NO # The CHM_FILE tag can be used to specify the file name of the resulting .chm # file. You can add a path in front of the file if the result should not be # written to the html output directory. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_FILE = # The HHC_LOCATION tag can be used to specify the location (absolute path # including file name) of the HTML help compiler (hhc.exe). If non-empty, # doxygen will try to run the HTML help compiler on the generated index.hhp. # The file has to be specified with full path. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. HHC_LOCATION = # The GENERATE_CHI flag controls if a separate .chi index file is generated # (YES) or that it should be included in the master .chm file (NO). # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. GENERATE_CHI = NO # The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) # and project file content. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_INDEX_ENCODING = # The BINARY_TOC flag controls whether a binary table of contents is generated # (YES) or a normal table of contents (NO) in the .chm file. Furthermore it # enables the Previous and Next buttons. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members to # the table of contents of the HTML help documentation and to the tree view. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. TOC_EXPAND = NO # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that # can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help # (.qch) of the generated HTML documentation. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_QHP = NO # If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify # the file name of the resulting .qch file. The path specified is relative to # the HTML output folder. # This tag requires that the tag GENERATE_QHP is set to YES. QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help # Project output. For more information please see Qt Help Project / Namespace # (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace). # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_QHP is set to YES. QHP_NAMESPACE = org.doxygen.Project # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt # Help Project output. For more information please see Qt Help Project / Virtual # Folders (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual- # folders). # The default value is: doc. # This tag requires that the tag GENERATE_QHP is set to YES. QHP_VIRTUAL_FOLDER = doc # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom # filter to add. For more information please see Qt Help Project / Custom # Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom- # filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_NAME = # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see Qt Help Project / Custom # Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom- # filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's filter section matches. Qt Help Project / Filter Attributes (see: # https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_SECT_FILTER_ATTRS = # The QHG_LOCATION tag can be used to specify the location of Qt's # qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the # generated .qhp file. # This tag requires that the tag GENERATE_QHP is set to YES. QHG_LOCATION = # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be # generated, together with the HTML files, they form an Eclipse help plugin. To # install this plugin and make it available under the help contents menu in # Eclipse, the contents of the directory containing the HTML and XML files needs # to be copied into the plugins directory of eclipse. The name of the directory # within the plugins directory should be the same as the ECLIPSE_DOC_ID value. # After copying Eclipse needs to be restarted before the help appears. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_ECLIPSEHELP = NO # A unique identifier for the Eclipse help plugin. When installing the plugin # the directory name containing the HTML and XML files should also have this # name. Each documentation set should have its own identifier. # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. ECLIPSE_DOC_ID = org.doxygen.Project # If you want full control over the layout of the generated HTML pages it might # be necessary to disable the index and replace it with your own. The # DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top # of each HTML page. A value of NO enables the index and the value YES disables # it. Since the tabs in the index contain the same information as the navigation # tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. DISABLE_INDEX = NO # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. If the tag # value is set to YES, a side panel will be generated containing a tree-like # index structure (just like the one that is generated for HTML Help). For this # to work a browser that supports JavaScript, DHTML, CSS and frames is required # (i.e. any modern browser). Windows users are probably better off using the # HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can # further fine-tune the look of the index. As an example, the default style # sheet generated by doxygen has an example that shows how to put an image at # the root of the tree instead of the PROJECT_NAME. Since the tree basically has # the same information as the tab index, you could consider setting # DISABLE_INDEX to YES when enabling this option. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_TREEVIEW = NO # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that # doxygen will group on one line in the generated HTML documentation. # # Note that a value of 0 will completely suppress the enum values from appearing # in the overview section. # Minimum value: 0, maximum value: 20, default value: 4. # This tag requires that the tag GENERATE_HTML is set to YES. ENUM_VALUES_PER_LINE = 4 # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used # to set the initial width (in pixels) of the frame in which the tree is shown. # Minimum value: 0, maximum value: 1500, default value: 250. # This tag requires that the tag GENERATE_HTML is set to YES. TREEVIEW_WIDTH = 250 # If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to # external symbols imported via tag files in a separate window. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. EXT_LINKS_IN_WINDOW = NO # Use this tag to change the font size of LaTeX formulas included as images in # the HTML documentation. When you change the font size after a successful # doxygen run you need to manually remove any form_*.png images from the HTML # output directory to force them to be regenerated. # Minimum value: 8, maximum value: 50, default value: 10. # This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_FONTSIZE = 10 # Use the FORMULA_TRANSPARENT tag to determine whether or not the images # generated for formulas are transparent PNGs. Transparent PNGs are not # supported properly for IE 6.0, but are supported on all modern browsers. # # Note that when changing this option you need to delete any form_*.png files in # the HTML output directory before the changes have effect. # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_TRANSPARENT = YES # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see # https://www.mathjax.org) which uses client side Javascript for the rendering # instead of using pre-rendered bitmaps. Use this if you do not have LaTeX # installed or if you want to formulas look prettier in the HTML output. When # enabled you may also need to install MathJax separately and configure the path # to it using the MATHJAX_RELPATH option. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. USE_MATHJAX = NO # When MathJax is enabled you can set the default output format to be used for # the MathJax output. See the MathJax site (see: # http://docs.mathjax.org/en/latest/output.html) for more details. # Possible values are: HTML-CSS (which is slower, but has the best # compatibility), NativeMML (i.e. MathML) and SVG. # The default value is: HTML-CSS. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_FORMAT = HTML-CSS # When MathJax is enabled you need to specify the location relative to the HTML # output directory using the MATHJAX_RELPATH option. The destination directory # should contain the MathJax.js script. For instance, if the mathjax directory # is located at the same level as the HTML output directory, then # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax # Content Delivery Network so you can quickly see the result without installing # MathJax. However, it is strongly recommended to install a local copy of # MathJax from https://www.mathjax.org before deployment. # The default value is: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax # extension names that should be enabled during MathJax rendering. For example # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_EXTENSIONS = # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces # of code that will be used on startup of the MathJax code. See the MathJax site # (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an # example see the documentation. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_CODEFILE = # When the SEARCHENGINE tag is enabled doxygen will generate a search box for # the HTML output. The underlying search engine uses javascript and DHTML and # should work on any modern browser. Note that when using HTML help # (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) # there is already a search function so this one should typically be disabled. # For large projects the javascript based search engine can be slow, then # enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to # search using the keyboard; to jump to the search box use + S # (what the is depends on the OS and browser, but it is typically # , /