diff options
author | anonimal <anonimal@i2pmail.org> | 2018-04-19 06:28:55 +0000 |
---|---|---|
committer | anonimal <anonimal@i2pmail.org> | 2018-04-19 10:55:29 +0000 |
commit | 10685648677d9df6230b6b60a580f2ba8481d0a0 (patch) | |
tree | 25b33ba309f38f03b27c862d48bf49a8ebb9b853 /external/miniupnpc/pymoduletest3.py | |
parent | Merge pull request #3606 (diff) | |
download | monero-10685648677d9df6230b6b60a580f2ba8481d0a0.tar.xz |
Build: remove in-tree miniupnpc
Will be replaced by a submodule.
(cherry picked from commit e962216678e699a8fc7eb271a8a515f5ca65f7cb)
Diffstat (limited to 'external/miniupnpc/pymoduletest3.py')
-rwxr-xr-x | external/miniupnpc/pymoduletest3.py | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/external/miniupnpc/pymoduletest3.py b/external/miniupnpc/pymoduletest3.py deleted file mode 100755 index d4cf1e22f..000000000 --- a/external/miniupnpc/pymoduletest3.py +++ /dev/null @@ -1,52 +0,0 @@ -#! /usr/bin/python3 -# MiniUPnP project -# Author : Thomas Bernard -# This Sample code is public domain. -# website : http://miniupnp.tuxfamily.org/ - -# import the python miniupnpc module -import miniupnpc -import sys - -# create the object -u = miniupnpc.UPnP() -print('inital(default) values :') -print(' discoverdelay', u.discoverdelay) -print(' lanaddr', u.lanaddr) -print(' multicastif', u.multicastif) -print(' minissdpdsocket', u.minissdpdsocket) -u.discoverdelay = 200; -#u.minissdpdsocket = '../minissdpd/minissdpd.sock' -# discovery process, it usualy takes several seconds (2 seconds or more) -print('Discovering... delay=%ums' % u.discoverdelay) -print(u.discover(), 'device(s) detected') -# select an igd -try: - u.selectigd() -except Exception as e: - print('Exception :', e) - sys.exit(1) -# display information about the IGD and the internet connection -print('local ip address :', u.lanaddr) -print('external ip address :', u.externalipaddress()) -print(u.statusinfo(), u.connectiontype()) - -#print u.addportmapping(64000, 'TCP', -# '192.168.1.166', 63000, 'port mapping test', '') -#print u.deleteportmapping(64000, 'TCP') - -port = 0 -proto = 'UDP' -# list the redirections : -i = 0 -while True: - p = u.getgenericportmapping(i) - if p==None: - break - print(i, p) - (port, proto, (ihost,iport), desc, c, d, e) = p - #print port, desc - i = i + 1 - -print(u.getspecificportmapping(port, proto)) - |