miniupnp.tuxfamily.org Forum Index miniupnp.tuxfamily.org
The forum about miniupnp and libnatpmp
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[patch] key to List redirections

 
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpc Feature Request
View previous topic :: View next topic  
Author Message
jakov



Joined: 23 Nov 2011
Posts: 1
Location: UK

PostPosted: Wed Nov 23, 2011 12:53 am    Post subject: [patch] key to List redirections Reply with quote

I didnt know what some of the fields meant on the List redirections feature, so i added a printf() in the source code just before it prints them out.

I think this is a good idea because sometimes the field is an empty string or zero and then it's not obvious what it means, the only way I found out what they fields meant was by reading the source code.

Usually I'd post a patch but this is only into two lines.

You put this before the loops that output the list of redirections in upnpc.c
Code:

printf(" i protocol exPort->inAddr:inPort description remoteHost leaseTime\n");


Code:

./upnpc-static -l
upnpc : miniupnpc library test client. (c) 2006-2011 Thomas Bernard

[...]

 i protocol exPort->inAddr:inPort description remoteHost leaseTime
 0 TCP 27909->192.168.1.75:27909 'BitTorrent (TCP)' '' 0
 1 UDP 27909->192.168.1.75:27909 'BitTorrent (UDP)' '' 0
 2 UDP 54597->192.168.1.66:54597 'Skype UDP at 192.168.1.66:54597 (1786)' '' 0
 3 TCP 54597->192.168.1.66:54597 'Skype TCP at 192.168.1.66:54597 (1786)' '' 0
 4 TCP 46951->192.168.1.69:46951 'Skype TCP at 192.168.1.69:46951 (1786)' '' 0
 5 UDP 46952->192.168.1.69:46951 'Skype UDP at 192.168.1.69:46951 (1786)' '' 0
 6 TCP  9066->192.168.1.78:9066  'libminiupnpc' '' 0
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Wed Nov 23, 2011 5:41 pm    Post subject: Reply with quote

yep, you are right. thank you !
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpc Feature Request All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP
© 2007 Thomas Bernard, author of MiniUPNP.