summaryrefslogtreecommitdiff
path: root/src/core/network.c
AgeCommit message (Collapse)Author
2007-11-20Remove unneeded casts.Emanuele Giaquinta
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4647 dbcabf3a-b0e7-0310-adc4-f8d773084564
2007-06-10Removed special error==1 handling from net_gethosterror(). It wasn't usedTimo Sirainen
anymore, and even when it originally was used it was wrong. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4551 dbcabf3a-b0e7-0310-adc4-f8d773084564
2007-05-08Oops. Update address correctly now.Wouter Coekaerts
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4490 dbcabf3a-b0e7-0310-adc4-f8d773084564
2007-05-08Update FSF addressWouter Coekaerts
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4489 dbcabf3a-b0e7-0310-adc4-f8d773084564
2006-03-26Removed all srand calls and added a single srand invokation in at startupJochen Eisinger
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4264 dbcabf3a-b0e7-0310-adc4-f8d773084564
2006-03-25prefixed all calls to rand() with a call to srand(time(NULL)), so we getJochen Eisinger
halfway random behaviour. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4263 dbcabf3a-b0e7-0310-adc4-f8d773084564
2005-11-19When looking up IP addresses, return random IP instead of the first one.Timo Sirainen
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4077 dbcabf3a-b0e7-0310-adc4-f8d773084564
2005-10-15Remove the inline declarations, patch by nailbiterValentin Batz
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4040 dbcabf3a-b0e7-0310-adc4-f8d773084564
2004-01-28EAI_NODATA is depricated and doesn't exist everywhere anymoreTimo Sirainen
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3224 dbcabf3a-b0e7-0310-adc4-f8d773084564
2003-10-11unsigned long -> gsizeTimo Sirainen
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3131 dbcabf3a-b0e7-0310-adc4-f8d773084564
2003-10-0664bit fixes by Stefan FentTimo Sirainen
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3129 dbcabf3a-b0e7-0310-adc4-f8d773084564
2003-07-09Network fixes. DCC fixes for IPv6 + BSDs.Timo Sirainen
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3124 dbcabf3a-b0e7-0310-adc4-f8d773084564
2002-12-10Compiler warning fixTimo Sirainen
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3054 dbcabf3a-b0e7-0310-adc4-f8d773084564
2002-11-29and remove outdated comment :)Timo Sirainen
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3033 dbcabf3a-b0e7-0310-adc4-f8d773084564
2002-11-29If bind() fails when connecting, don't fallback to default address. ShouldTimo Sirainen
make it easier to notice invalid settings or figure out why it's not working.. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3032 dbcabf3a-b0e7-0310-adc4-f8d773084564
2002-11-28net_gethostbyaddr() was pretty much broken.Timo Sirainen
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3031 dbcabf3a-b0e7-0310-adc4-f8d773084564
2002-08-26removed the stupid error-parameters from net_connect*() calls. errno can beTimo Sirainen
used just fine. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2889 dbcabf3a-b0e7-0310-adc4-f8d773084564
2002-05-26net_ip2host() and net_host2ip() now treat any IPv6 IPs as 0.0.0.0, if IPv6Timo Sirainen
support isn't enabled in irssi. Also DCC's human readable IP address is taken from DCC SEND request directly with IPv6. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2825 dbcabf3a-b0e7-0310-adc4-f8d773084564
2002-05-19net_connect*() contains now error parameter, so it can be used to properlyTimo Sirainen
check the errno if connect() fails. Added support for connecting to named UNIX sockets. Some cleanups with session handling / server connecting as well. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2819 dbcabf3a-b0e7-0310-adc4-f8d773084564
2002-02-18if gethostbyname() failed, the return value was returned incorrectlyTimo Sirainen
(accidentally cvs committed it after some of my test) git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2516 dbcabf3a-b0e7-0310-adc4-f8d773084564
2002-02-17still one isxdigit() -> i_isxdigit()Timo Sirainen
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2510 dbcabf3a-b0e7-0310-adc4-f8d773084564
2002-02-10Removed some old backwards compatibility code.Timo Sirainen
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2411 dbcabf3a-b0e7-0310-adc4-f8d773084564
2002-01-29..and of course I broke IPv4 net_gethostbyname() with it :)Timo Sirainen
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2359 dbcabf3a-b0e7-0310-adc4-f8d773084564
2002-01-29OK, looks like I was doing stupid things with IPv6 hostname lookups :) BackTimo Sirainen
when I originally wrote that code, there wasn't any man pages for them and I couldn't really find any good docs either, so I just copy&pasted some code from somewhere and it seemed to work. Anyway, it was doing reverse name lookup for uninitialized host name which really wasn't a good idea :) git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2358 dbcabf3a-b0e7-0310-adc4-f8d773084564
2002-01-29net_gethostbyname() fix for ipv6.Timo Sirainen
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2357 dbcabf3a-b0e7-0310-adc4-f8d773084564
2002-01-27toupper(), tolower(), isspace(), is..etc..() aren't safe with chars in someTimo Sirainen
systems, use our own is_...() functions now instead. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2348 dbcabf3a-b0e7-0310-adc4-f8d773084564
2002-01-04the same #ifdef { parsing problem..Timo Sirainen
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2296 dbcabf3a-b0e7-0310-adc4-f8d773084564
2001-12-14net_listen(): when socket() failed because we tried to use IPv6, we shouldTimo Sirainen
have falled back to IPv4, but wrong errno was checked. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2248 dbcabf3a-b0e7-0310-adc4-f8d773084564
2001-11-10net_listen(): if creating IPv6 socket fails because of EPROTONOSUPPORT, tryTimo Sirainen
without IPv6. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1979 dbcabf3a-b0e7-0310-adc4-f8d773084564
2001-11-07net_connect(): if bind() fails, set the address back to INADDR_ANY to make ↵Timo Sirainen
sure it doesn't leave the socket in buggy state. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1978 dbcabf3a-b0e7-0310-adc4-f8d773084564
2001-05-17Getting rid of gettext, moved some _(..) texts to themes and left some errorTimo Sirainen
messages hard coded. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1503 dbcabf3a-b0e7-0310-adc4-f8d773084564
2001-03-18moved stuff from net-internal.h to network.h. HPUX needed one of theTimo Sirainen
#includes in there to work. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1409 dbcabf3a-b0e7-0310-adc4-f8d773084564
2001-03-14net_listen() works now properly with --enable-ipv6 and a system that doesn'tTimo Sirainen
have a working IPv6 support git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1382 dbcabf3a-b0e7-0310-adc4-f8d773084564
2001-03-04union { .. } addr removed from IPADDR - it hasn't been actually usedTimo Sirainen
for a long time.. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1339 dbcabf3a-b0e7-0310-adc4-f8d773084564
2001-03-04IPv6 fixes. Everything now keeps both v4 and v6 addresses in memory andTimo Sirainen
at connect() time it's decided which one should be used. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1334 dbcabf3a-b0e7-0310-adc4-f8d773084564
2001-02-20/SET resolve_prefer_ipv6 - should we prefer IPv6 or IPv4 addresses inTimo Sirainen
host name resolving. /SERVER ADD: added options -4 and -6. Fixed crash at startup if server didn't have chat network set. "Connecting to xxx [ip]" is now displayed before calling connect(), so if it fails we'll still get the IP it's trying to connect to. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1268 dbcabf3a-b0e7-0310-adc4-f8d773084564
2001-02-09/CONNECT, /SERVER: added -4 and -6 options for specifying if we shouldTimo Sirainen
connect to IPv4 or IPv6 address of the server. If -host or /SET hostname is set irssi determines from it if it should use IPv4 or v6. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1192 dbcabf3a-b0e7-0310-adc4-f8d773084564
2001-01-18net_getservbyport() - Get name of TCP serviceTimo Sirainen
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1134 dbcabf3a-b0e7-0310-adc4-f8d773084564
2001-01-15Fixed some signedness warnings and memdebug.h should compile now fineTimo Sirainen
with -ansi. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1124 dbcabf3a-b0e7-0310-adc4-f8d773084564
2001-01-11Some signed/unsigned warnings removed. Don't call fe_exec_init/deinit in win32Timo Sirainen
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1104 dbcabf3a-b0e7-0310-adc4-f8d773084564
2001-01-02net_accept(), net_getsockname() IPv6 fixes pointed out by pv2b :)Timo Sirainen
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1050 dbcabf3a-b0e7-0310-adc4-f8d773084564
2001-01-02removed the win32 EINPROGRESS define, that wouldn't work anywayTimo Sirainen
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1049 dbcabf3a-b0e7-0310-adc4-f8d773084564
2000-12-19security fixes from 0.7.97.2Timo Sirainen
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1017 dbcabf3a-b0e7-0310-adc4-f8d773084564
2000-12-08net_receive(), net_transmit(): error handling was buggyTimo Sirainen
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@980 dbcabf3a-b0e7-0310-adc4-f8d773084564
2000-12-04Use GIOChannel instead of sockets directly. Helps porting to win32 :)Timo Sirainen
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@962 dbcabf3a-b0e7-0310-adc4-f8d773084564
2000-11-11Some sizeof() fixes to IPv6 support when connecting to IPv4 addresses.Timo Sirainen
Linux didn't seem to have any problem with these but some other OSes did. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@835 dbcabf3a-b0e7-0310-adc4-f8d773084564
2000-10-26Win32 updatesTimo Sirainen
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@784 dbcabf3a-b0e7-0310-adc4-f8d773084564
2000-10-26Some fixes for compiling with Win32 :)Timo Sirainen
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@783 dbcabf3a-b0e7-0310-adc4-f8d773084564
2000-09-27net_gethostbyaddr() fixed.Timo Sirainen
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@685 dbcabf3a-b0e7-0310-adc4-f8d773084564
2000-07-29send() - ignore EPIPE return value and just return "0 bytes sent". The brokenTimo Sirainen
connection will be noticed after recv(). git-svn-id: http://svn.irssi.org/repos/irssi/trunk@547 dbcabf3a-b0e7-0310-adc4-f8d773084564