-
- Downloads
upnp: asynchronous open/close ports
The UPnP stack now opens and closes ports with an asynchronous mechanic and with callbacks. Every time a mapping request (open or close) is sent, a callback is registered and managed by the context. When the corresponding protocol executes the request and gets an answer, the right callback is found and dispatched to its controller. A timeout of 1 second is implemented on each request. Controllers can now be tracked with a unique Id (a string that represents its location in memory). The IGD class now tracks its current active ports and manages the number of users for each port. The PMPIGD class now operates using a queue of mapping requests. Whenever a request is made to the natpmp protocol, it saves the request to its corresponding list (mapToAdd, mapToRemove or mapToRenew in the PMPIGD class) and notifies the main natpmp thread. The thread then checks if there is any pending map requests in the PMPIGD queue and treats them accordingly. Add Nat-Pmp support for windows. Fixed bug where nat-pmp wouldn't find an IGD on a new interface after a connectivity change. The problem stems from the fact that, for one, the nat-pmp handle didn't get cleared internally once a connectivity change occured. This would cause the nat- pmp library to try and send searches on a socket that was bound on the old gateway. Secondly, if you don't wait for a little period of time, the natpmp library would discover the old IGD on the old interface before the connectivity change modifications were completed. Now we restart the nat-pmp process one second after the connectivity change triggers. Change-Id: I39a9b57e237deaa65eef4464a1838eaa3c5bbb03
Showing
- MSVC/config.h 1 addition, 1 deletionMSVC/config.h
- MSVC/ring-daemon.vcxproj 11 additions, 5 deletionsMSVC/ring-daemon.vcxproj
- MSVC/ring-daemon.vcxproj.filters 15 additions, 0 deletionsMSVC/ring-daemon.vcxproj.filters
- contrib/build_all.bat 1 addition, 0 deletionscontrib/build_all.bat
- contrib/src/fetch_all.bat 1 addition, 0 deletionscontrib/src/fetch_all.bat
- contrib/src/natpmp/fetch_and_patch.bat 29 additions, 0 deletionscontrib/src/natpmp/fetch_and_patch.bat
- contrib/src/natpmp/natpmp-win32-ssize_t.patch 16 additions, 0 deletionscontrib/src/natpmp/natpmp-win32-ssize_t.patch
- src/ice_transport.cpp 53 additions, 32 deletionssrc/ice_transport.cpp
- src/ip_utils.cpp 131 additions, 0 deletionssrc/ip_utils.cpp
- src/ip_utils.h 20 additions, 2 deletionssrc/ip_utils.h
- src/jamidht/jamiaccount.cpp 26 additions, 67 deletionssrc/jamidht/jamiaccount.cpp
- src/jamidht/jamiaccount.h 5 additions, 3 deletionssrc/jamidht/jamiaccount.h
- src/sip/sipaccount.cpp 25 additions, 45 deletionssrc/sip/sipaccount.cpp
- src/sip/sipaccount.h 1 addition, 1 deletionsrc/sip/sipaccount.h
- src/sip/sipcall.cpp 15 additions, 15 deletionssrc/sip/sipcall.cpp
- src/upnp/protocol/global_mapping.h 2 additions, 2 deletionssrc/upnp/protocol/global_mapping.h
- src/upnp/protocol/igd.cpp 154 additions, 0 deletionssrc/upnp/protocol/igd.cpp
- src/upnp/protocol/igd.h 36 additions, 5 deletionssrc/upnp/protocol/igd.h
- src/upnp/protocol/mapping.cpp 93 additions, 17 deletionssrc/upnp/protocol/mapping.cpp
- src/upnp/protocol/mapping.h 20 additions, 19 deletionssrc/upnp/protocol/mapping.h
Loading
Please register or sign in to comment