summaryrefslogtreecommitdiffstats
path: root/PICA_node.c
Commit message (Collapse)AuthorAgeFilesLines
* pica-node: check interfaces with global IP's first in autoconfigure mode, ↵Anton2017-12-291-9/+25
| | | | before trying UPnP
* autoconfigure mode for announced_addr setting, updated default config file; ↵Anton2017-12-281-0/+17
| | | | UPNP autoconfiguration is implemented, enumerating network interfaces having global IP is left to be done
* moved PICA_is_reserved_addr_ipv4() to new file PICA_netconf.cAnton2017-12-021-0/+1
|
* fixed code style on all source files (*.c *.cpp *.h) using astyle ↵Anton2017-12-011-710/+710
| | | | --style=allman --lineend=linux --indent=tab --pad-oper
* Merge branch 'direct_c2c_connections'Anton2017-12-011-999/+1021
|\
| * removed excess memcmp() callsAnton2017-11-121-4/+10
| |
| * reject all-zeroes IDAnton2017-11-121-5/+12
| |
| * bugfix, prevent removing entry from client_tree by duplicate connectionAnton2017-11-121-0/+1
| |
| * use pseudorandom bytes in short fixed-length protocol messages instead of ↵Anton2016-06-241-6/+6
| | | | | | | | random in order to not drain entropy pool
| * fixed code style using "astyle --style=allman --lineend=linux --indent=tab ↵Anton2016-04-071-1709/+1717
| | | | | | | | --pad-oper *.c *.h"
| * more consistent naming, renamed conn -> c2n, channel -> c2c in function ↵Anton2015-04-111-2/+2
| | | | | | | | names and enumerations
* | updated copyright yearsAnton2016-03-031-1/+1
| |
* | updated copyright yearsAnton2015-04-131-1/+1
|/
* new config option for node - disable_reserved_addrsme_desk2014-12-051-4/+35
| | | | git-svn-id: svn://localhost/project_picapica/trunk@337 fb96df88-216d-11de-830c-f3023f12d8ac
* Updated copyright yearme_desk2014-08-101-1/+1
| | | | git-svn-id: svn://localhost/project_picapica/trunk@321 fb96df88-216d-11de-830c-f3023f12d8ac
* fixes for enabling build of pica-node on Windows using MinGWme_desk2013-09-191-4/+10
| | | | git-svn-id: svn://localhost/project_picapica/trunk@275 fb96df88-216d-11de-830c-f3023f12d8ac
* switched to TLS 1.2 and DHE-RSA-CAMELLIA256-SHA. DH parameters file is ↵me_desk2013-09-131-1/+1
| | | | | | created on first start git-svn-id: svn://localhost/project_picapica/trunk@273 fb96df88-216d-11de-830c-f3023f12d8ac
* updated pica-client to make it handle new id format. quint32 type for id is ↵me_desk2013-08-301-6/+34
| | | | | | replaced with QByteArray in most places. Implemented verification callbacks in client and node that allow self-signed certificates git-svn-id: svn://localhost/project_picapica/trunk@266 fb96df88-216d-11de-830c-f3023f12d8ac
* fixed NEWCONN_BUFSIZE to make it equal to CONNID packet size in order to ↵me_desk2013-08-221-6/+13
| | | | | | prevent interpreting TLS session data that follows this packet as some PICA protocol message. This is workaround, problem must be fixed in more proper way git-svn-id: svn://localhost/project_picapica/trunk@265 fb96df88-216d-11de-830c-f3023f12d8ac
* pica-node modified to handle new id format, new files PICA_id.c PICA_id.h ↵me_desk2013-08-211-98/+110
| | | | | | containing functions for working with id git-svn-id: svn://localhost/project_picapica/trunk@263 fb96df88-216d-11de-830c-f3023f12d8ac
* bugfix: nfds argument of select was not reset from max value on each loop ↵me_desk2013-08-051-1/+3
| | | | | | iteration git-svn-id: svn://localhost/project_picapica/trunk@260 fb96df88-216d-11de-830c-f3023f12d8ac
* debug message in wrong placeme_desk2013-08-031-1/+1
| | | | git-svn-id: svn://localhost/project_picapica/trunk@257 fb96df88-216d-11de-830c-f3023f12d8ac
* removed calls to log functions from nodewait_resolve_thread() and ↵me_desk2013-08-031-0/+2
| | | | | | nodewait_connect_thread(), log functions are not thread safe, calling them caused segfaults git-svn-id: svn://localhost/project_picapica/trunk@256 fb96df88-216d-11de-830c-f3023f12d8ac
* set SO_REUSEADDR on listening socketme_desk2013-07-311-1/+8
| | | | git-svn-id: svn://localhost/project_picapica/trunk@254 fb96df88-216d-11de-830c-f3023f12d8ac
* debug log messages for opening and closing socket eventsme_desk2013-07-311-5/+9
| | | | git-svn-id: svn://localhost/project_picapica/trunk@253 fb96df88-216d-11de-830c-f3023f12d8ac
* nodewait_start_connection() is split to the two functions, ↵me_desk2013-07-071-5/+54
| | | | | | nodewait_start_resolve() and nodewait_start_connect(), each starts new thread for resolving and connecting. Between resolving and connecting check for existing connections with resolved address is performed git-svn-id: svn://localhost/project_picapica/trunk@251 fb96df88-216d-11de-830c-f3023f12d8ac
* version bumpme_desk2013-05-261-1/+1
| | | | git-svn-id: svn://localhost/project_picapica/trunk@250 fb96df88-216d-11de-830c-f3023f12d8ac
* changed loglevel to debug1me_desk2013-05-261-1/+1
| | | | git-svn-id: svn://localhost/project_picapica/trunk@249 fb96df88-216d-11de-830c-f3023f12d8ac
* fixed casting to in_addr; skynet_refresh_tmst now is updated at the ↵me_desk2013-05-261-3/+3
| | | | | | beginning of the PICA_join_skynet in order to prevent refreshing nodelist database in each main loop iteration when nodes database is empty git-svn-id: svn://localhost/project_picapica/trunk@248 fb96df88-216d-11de-830c-f3023f12d8ac
* debug messageme_desk2013-05-261-0/+1
| | | | git-svn-id: svn://localhost/project_picapica/trunk@247 fb96df88-216d-11de-830c-f3023f12d8ac
* disconnect nodelink if more than one connection to the same node is detectedme_desk2013-05-261-1/+28
| | | | git-svn-id: svn://localhost/project_picapica/trunk@246 fb96df88-216d-11de-830c-f3023f12d8ac
* updated version info, displaying protocol version in nodeme_desk2013-03-101-1/+2
| | | | git-svn-id: svn://localhost/project_picapica/trunk@234 fb96df88-216d-11de-830c-f3023f12d8ac
* check declared AND real node address from sockaddr_in structme_desk2012-12-301-5/+4
| | | | git-svn-id: svn://localhost/project_picapica/trunk@219 fb96df88-216d-11de-830c-f3023f12d8ac
* periodically refresh node list, try to connect previously unavailable nodes. ↵me_desk2012-12-301-4/+46
| | | | | | On NODELIST receive, immediate connection start is disabled. Connections are started on next PICA_node_joinskynet() call by timeout git-svn-id: svn://localhost/project_picapica/trunk@218 fb96df88-216d-11de-830c-f3023f12d8ac
* do not connect to loaded node address if it equals to self adressme_desk2012-12-271-2/+8
| | | | git-svn-id: svn://localhost/project_picapica/trunk@217 fb96df88-216d-11de-830c-f3023f12d8ac
* bugfixes: invalid argument to nodewait_list_delete() and minor protocol ↵me_desk2012-12-271-2/+3
| | | | | | version was written in the same byte as major version git-svn-id: svn://localhost/project_picapica/trunk@216 fb96df88-216d-11de-830c-f3023f12d8ac
* nodewait - asynchronous DNS resolve and connect to nodes using threadsme_desk2012-12-271-17/+106
| | | | git-svn-id: svn://localhost/project_picapica/trunk@215 fb96df88-216d-11de-830c-f3023f12d8ac
* version bump to 0.5.3me_desk2012-10-171-1/+1
| | | | git-svn-id: svn://localhost/project_picapica/trunk@214 fb96df88-216d-11de-830c-f3023f12d8ac
* n2n timeouts processing - ping between nodesme_desk2012-09-301-0/+59
| | | | git-svn-id: svn://localhost/project_picapica/trunk@212 fb96df88-216d-11de-830c-f3023f12d8ac
* sending PINGREP from client, bugfix in sending PINGREQ from nodeme_desk2012-09-291-2/+9
| | | | git-svn-id: svn://localhost/project_picapica/trunk@210 fb96df88-216d-11de-830c-f3023f12d8ac
* protocol version bump; PINGREP and PINGREQ processing, sending PINGREPme_desk2012-09-251-5/+91
| | | | git-svn-id: svn://localhost/project_picapica/trunk@209 fb96df88-216d-11de-830c-f3023f12d8ac
* log warnings about incompatible protocol versionsme_desk2012-09-241-0/+21
| | | | git-svn-id: svn://localhost/project_picapica/trunk@208 fb96df88-216d-11de-830c-f3023f12d8ac
* log disconnect reason - user with this ID is already connectedme_desk2012-09-241-1/+4
| | | | git-svn-id: svn://localhost/project_picapica/trunk@207 fb96df88-216d-11de-830c-f3023f12d8ac
* dynamic buffer allocation for client structme_desk2012-09-231-13/+62
| | | | git-svn-id: svn://localhost/project_picapica/trunk@206 fb96df88-216d-11de-830c-f3023f12d8ac
* disconnect client from node if he does not reply to messages in ↵me_desk2012-09-161-0/+50
| | | | | | NOREPLY_TIMEOUT seconds git-svn-id: svn://localhost/project_picapica/trunk@203 fb96df88-216d-11de-830c-f3023f12d8ac
* changes required to build pica pica on Windows in MSVS2008me_desk2012-09-131-2/+0
| | | | git-svn-id: svn://localhost/project_picapica/trunk@202 fb96df88-216d-11de-830c-f3023f12d8ac
* bugfix: unitialized variable nfsd was passed as maxfd argument to select()me_laptop2012-09-031-1/+1
| | | | git-svn-id: svn://localhost/project_picapica/trunk@198 fb96df88-216d-11de-830c-f3023f12d8ac
* removed printf() and puts() debug outputme_desk2012-08-191-48/+27
| | | | git-svn-id: svn://localhost/project_picapica/trunk@173 fb96df88-216d-11de-830c-f3023f12d8ac
* default nodelist database location based on localstatedir variable; fail if ↵me_desk2012-08-191-2/+6
| | | | | | announced_addr is not properly configured git-svn-id: svn://localhost/project_picapica/trunk@171 fb96df88-216d-11de-830c-f3023f12d8ac
* default config location - sysconfdir. Fail if unable to open config fileme_desk2012-08-191-2/+5
| | | | git-svn-id: svn://localhost/project_picapica/trunk@170 fb96df88-216d-11de-830c-f3023f12d8ac