mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-03 14:45:12 -04:00
added whitelist system and GUI for it. Not used in pqissl yet.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8319 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
0a42b334ae
commit
f699855b7d
6 changed files with 477 additions and 235 deletions
|
@ -80,10 +80,25 @@ public:
|
|||
virtual void enableIPFiltering(bool b) =0;
|
||||
virtual bool ipFilteringEnabled() =0;
|
||||
|
||||
virtual void addIpRange(const struct sockaddr_storage& addr,int masked_bytes,const std::string& comment) =0;
|
||||
// addIpRange()/removeIpRange()
|
||||
// addr: full IPv4 address. Port is ignored.
|
||||
// masked_bytes: 0=full IP, 1="/24", 2="/16"
|
||||
// list_type: RSBANLIST_CHECKING_FLAGS_BLACKLIST or RSBANLIST_CHECKING_FLAGS_WHITELIST
|
||||
// comment: anything, user-based.
|
||||
|
||||
virtual void addIpRange(const struct sockaddr_storage& addr,int masked_bytes,uint32_t list_type,const std::string& comment) =0;
|
||||
virtual void removeIpRange(const struct sockaddr_storage& addr,int masked_bytes,uint32_t list_type) =0;
|
||||
|
||||
// isAddressAccepted()
|
||||
// addr: full IPv4 address. Port is ignored.
|
||||
// checking flags: any combination of RSBANLIST_CHECKING_FLAGS_BLACKLIST and RSBANLIST_CHECKING_FLAGS_WHITELIST
|
||||
// check_result: returned result of the check in RSBANLIST_CHECK_RESULT_*
|
||||
// returned value: true=address is accepted, false=address is rejected.
|
||||
|
||||
virtual bool isAddressAccepted(const struct sockaddr_storage& addr,uint32_t checking_flags,uint32_t& check_result) =0;
|
||||
virtual void getListOfBannedIps(std::list<BanListPeer>& list) =0;
|
||||
|
||||
virtual void getBannedIps(std::list<BanListPeer>& list) =0;
|
||||
virtual void getWhiteListedIps(std::list<BanListPeer>& list) =0;
|
||||
|
||||
virtual bool autoRangeEnabled() =0;
|
||||
virtual void enableAutoRange(bool b) =0 ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue