mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-24 22:30:42 -04:00
Massive commit - changing from sockaddr_in => sockaddr_storage.
In preparation for making RS support IPv6. NB: This breaks the build of retroshare-gui, as the sockaddr_storage_xxx fns are only defined as prototypes for now. All the aux libraries like udp / stun / tcponudp / dht have still to be converted. These changes will probably break various things and need to be tested thoroughly. git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.6-initdev@6735 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
fd071161bf
commit
6290d8fed9
66 changed files with 1182 additions and 1046 deletions
|
@ -42,7 +42,7 @@ class BanListPeer
|
|||
{
|
||||
public:
|
||||
|
||||
struct sockaddr_in addr;
|
||||
struct sockaddr_storage addr;
|
||||
uint32_t reason; // Dup Self, Dup Friend
|
||||
int level; // LOCAL, FRIEND, FoF.
|
||||
time_t mTs;
|
||||
|
@ -54,7 +54,7 @@ class BanList
|
|||
|
||||
std::string mPeerId; /* from */
|
||||
time_t mLastUpdate;
|
||||
std::map<uint32_t, BanListPeer> mBanPeers;
|
||||
std::map<struct sockaddr_storage, BanListPeer> mBanPeers;
|
||||
};
|
||||
|
||||
|
||||
|
@ -74,7 +74,7 @@ class p3BanList: /* public RsBanList, */ public p3Service, public pqiNetAssistPe
|
|||
|
||||
/***** overloaded from pqiNetAssistPeerShare *****/
|
||||
|
||||
virtual void updatePeer(std::string id, struct sockaddr_in addr, int type, int reason, int age);
|
||||
virtual void updatePeer(std::string id, const struct sockaddr_storage &addr, int type, int reason, int age);
|
||||
|
||||
|
||||
/***** overloaded from p3Service *****/
|
||||
|
@ -93,7 +93,7 @@ class p3BanList: /* public RsBanList, */ public p3Service, public pqiNetAssistPe
|
|||
bool processIncoming();
|
||||
|
||||
bool recvBanItem(RsBanListItem *item);
|
||||
bool addBanEntry(const std::string &peerId, const struct sockaddr_in &addr,
|
||||
bool addBanEntry(const std::string &peerId, const struct sockaddr_storage &addr,
|
||||
int level, uint32_t reason, uint32_t age);
|
||||
void sendBanLists();
|
||||
int sendBanSet(std::string peerid);
|
||||
|
@ -123,7 +123,7 @@ class p3BanList: /* public RsBanList, */ public p3Service, public pqiNetAssistPe
|
|||
|
||||
time_t mSentListTime;
|
||||
std::map<std::string, BanList> mBanSources;
|
||||
std::map<uint32_t, BanListPeer> mBanSet;
|
||||
std::map<struct sockaddr_storage, BanListPeer> mBanSet;
|
||||
|
||||
p3LinkMgr *mLinkMgr;
|
||||
p3NetMgr *mNetMgr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue