https://github.com/equalitie/cpp-upnp
This is a read-only mirror of: https://gitlab.com/equalitie/cpp-upnp "UPnP C++ library using Boost.Asio"
https://github.com/equalitie/cpp-upnp
asio cpp cpp14 upnp
Last synced: 8 months ago
JSON representation
This is a read-only mirror of: https://gitlab.com/equalitie/cpp-upnp "UPnP C++ library using Boost.Asio"
- Host: GitHub
- URL: https://github.com/equalitie/cpp-upnp
- Owner: equalitie
- License: bsl-1.0
- Created: 2020-01-09T17:35:08.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-10-18T01:19:48.000Z (about 2 years ago)
- Last Synced: 2025-04-20T01:33:01.166Z (8 months ago)
- Topics: asio, cpp, cpp14, upnp
- Language: C++
- Homepage:
- Size: 114 KB
- Stars: 15
- Watchers: 5
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[](https://circleci.com/gh/equalitie/cpp-upnp/tree/master)
# CPPUPnP
Boost.Asio based C++ library to implement parts of the UPnP standard.
## Status
This library is under development and the API will very likely change in a
backward incompatible way.
The current functionality includes listing, creating and deleting of TCP and
UDP port mappings on IGD (v1 and v2) devices.
## Build instructions
### Include in your project
If you have sources of CPPUPnP somewhere on your disk, simply set the
`CPPUPnP_DIR` variable to point to that CPPUPnP's directory and call
`find_package(CPPUPnP REQUIRED)` as is done in the
[example/CMakeLists.txt](example/CMakeLists.txt)
If you don't have CPPUPnP on your disk, have cmake download it prior to calling
`find_package(CPPUPnP REQUIRED)` like so:
include(FetchContent)
fetchcontent_populate(CPPUPnP GIT_REPOSITORY )
set(CPPUPnP_DIR ${CMAKE_BINARY_DIR}/cppupnp-src)
find_package(CPPUPnP REQUIRED)
### Build examples and tests
Please have a look into [.circleci/config.yml](.circleci/config.yml)
## Useful links/documents
[UPnP standards](https://openconnectivity.org/developer/specifications/upnp-resources/upnp/#standards)
[RFC6970](https://tools.ietf.org/html/rfc6970)
[UPnP IGD "A Fox in the Hen House" (pdf)](https://www.blackhat.com/presentations/bh-usa-08/Squire/BH_US_08_Squire_A_Fox_in_the_Hen_House%20White%20Paper.pdf)
[Golang code that inspired this library](https://github.com/syncthing/syncthing/tree/master/lib/upnp)