mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-03 06:35:08 -04:00
add/remove from lists. Load/save from user whitelist/blacklist
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8321 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
b2967418ff
commit
bb74d08f33
6 changed files with 153 additions and 32 deletions
|
@ -54,6 +54,10 @@ extern RsBanList *rsBanList ;
|
|||
#define RSBANLIST_CHECK_RESULT_NOT_WHITELISTED 0x03
|
||||
#define RSBANLIST_CHECK_RESULT_ACCEPTED 0x04
|
||||
|
||||
#define RSBANLIST_TYPE_PEERLIST 1
|
||||
#define RSBANLIST_TYPE_BLACKLIST 2
|
||||
#define RSBANLIST_TYPE_WHITELIST 3
|
||||
|
||||
class RsTlvBanListEntry ;
|
||||
|
||||
class BanListPeer
|
||||
|
@ -83,7 +87,7 @@ public:
|
|||
// 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
|
||||
// list_type: RSBANLIST_TYPE_WHITELIST or RSBANLIST_TYPE_BLACKLIST
|
||||
// comment: anything, user-based.
|
||||
|
||||
virtual void addIpRange(const struct sockaddr_storage& addr,int masked_bytes,uint32_t list_type,const std::string& comment) =0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue