Addition of several utility functions:

(1) xpgp_id to extract the name/id from a certificate.
(2) dht_bootstrap to check the status of the bootstrap peers.

Various bits of code needed to be rearranged to make these utilities possible.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@394 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2008-03-21 02:02:58 +00:00
parent e1f4dc1dff
commit 7044822e1f
12 changed files with 651 additions and 31 deletions

View file

@ -99,14 +99,10 @@ int status(std::ostream &out);
private:
/* STUN handling */
bool isStunPacket(void *data, int size);
bool locked_handleStunPkt(void *data, int size, struct sockaddr_in &from);
int doStun(struct sockaddr_in stun_addr);
bool response(void *stun_pkt, int size, struct sockaddr_in &addr);
void *generate_stun_reply(struct sockaddr_in *stun_addr, int *len);
bool generate_stun_pkt(void *stun_pkt, int *len);
/* stun keepAlive */
bool locked_printStunList();
@ -137,4 +133,11 @@ bool storeStunPeer(const struct sockaddr_in &remote, const char *peerid);
};
/* generic stun functions */
bool UdpStun_isStunPacket(void *data, int size);
bool UdpStun_response(void *stun_pkt, int size, struct sockaddr_in &addr);
void *UdpStun_generate_stun_reply(struct sockaddr_in *stun_addr, int *len);
bool UdpStun_generate_stun_pkt(void *stun_pkt, int *len);
#endif