summaryrefslogtreecommitdiffstats
path: root/libc/inet
Commit message (Collapse)AuthorAgeFilesLines
* resolv: DEBUG-print nameserver we talk toBernhard Reutner-Fischer2010-03-301-2/+18
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* prettify make cleanBernhard Reutner-Fischer2010-03-252-4/+4
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* /etc/resolv.conf: support "timeout:n" and "attempts:n" optionsDenys Vlasenko2010-02-031-13/+41
| | | | | | | | | | | | | | text data bss dec hex filename - 1745 2 4 1751 6d7 libc/inet/dnslookup.o + 1760 2 4 1766 6e6 libc/inet/dnslookup.o - 962 0 4 966 3c6 libc/inet/opennameservers.o + 1099 0 4 1103 44f libc/inet/opennameservers.o - 462 4 472 938 3aa libc/inet/res_init.o + 454 4 468 926 39e libc/inet/res_init.o - 870 0 0 870 366 libc/inet/res_query.o + 867 0 0 867 363 libc/inet/res_query.o Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* errno: hide __libc_resp, __libc_errno, and __libc_h_errnoKhem Raj2010-02-011-1/+1
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* gethostid: switch to getaddrinfo and shrinkBernhard Reutner-Fischer2010-01-241-41/+26
| | | | | | | | text data bss dec hex filename 382 0 0 382 17e libc/inet/hostid.os.old 326 0 0 326 146 libc/inet/hostid.os Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* getprotoent_r: use correct define for return valueBernhard Reutner-Fischer2010-01-231-1/+1
| | | | | | Doesn't correctly set result=NULL on error or EOF. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* libc/inet: mark other odd /etc/conf/ spotBernhard Reutner-Fischer2010-01-231-0/+2
| | | | | | and wrap it in FALLBACK_TO_CONFIG_RESOLVCONF too. -24b Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* libc/inet: set path to resolver file via CPPBernhard Reutner-Fischer2010-01-2334-33/+34
| | | | | | No objcode changes. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* libc/inet: convert to foo-y kbuild styleBernhard Reutner-Fischer2010-01-231-33/+19
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* fix typo in version mismatch msgBernhard Reutner-Fischer2010-01-211-1/+1
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* ether_line: fix build for socket && !ipBernhard Reutner-Fischer2010-01-211-2/+2
| | | | | | The internal __ether_line helper needs ether_ntoa_r() Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* Include bits/libc-lock.h to get __libc_once_defineKhem Raj2009-12-111-0/+1
| | | | | Signed-off-by: Khem Raj <raj.khem@gmail.com> Acked-by: Austin Foxley <austinf@cetoncorp.com>
* inet_ntop4: avoid inline initializationMike Frysinger2009-10-221-1/+3
| | | | | | | We only need to set the first byte to 0, but gcc likes to zero out the rest of the string with memset() when using this initialization style. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* check stat("/etc/resolv.conf") for errorsDenys Vlasenko2009-10-141-1/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libc/inet/resolv.c: reread resolv.conf if its mtime was changedBernhard Reutner-Fischer2009-10-131-6/+9
| | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* link-time warning for obsolescent/removed network funcsBernhard Reutner-Fischer2009-10-081-0/+4
| | | | Signed-off-by: aldot <rep.dot.nop@gmail.com>
* resolv.c: add support for per thread res_stateAustin Foxley2009-09-263-5/+62
| | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* convert // comments to /**/; remove empty #if/#endif pairs. no code changesDenys Vlasenko2009-09-188-29/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* trim Experimentally off and uncommented hiddenBernhard Reutner-Fischer2009-09-1859-596/+1
| | | | | | | | sed -i -e '/Experimentally off - /d' $(grep -rl "Experimentally off - " *) sed -i -e '/^\/\*[[:space:]]*libc_hidden_proto(/d' $(grep -rl "libc_hidden_proto" *) should be a nop Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* rexec.c: style fixes, no code chages (verified with objdump)Denys Vlasenko2009-09-061-44/+23
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* rexec.c: small code shrinkDenys Vlasenko2009-09-061-2/+6
| | | | | | | | text data bss dec hex filename - 1223 0 0 1223 4c7 libc/inet/rpc/rexec.o + 1214 0 0 2239 8bf libc/inet/rpc/rexec.o Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* comment out "int rexecoptions"; make "char ahostbuf[]" static (was hidden)Denys Vlasenko2009-09-061-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* do not save/restore errno around free() callsDenys Vlasenko2009-09-052-15/+5
| | | | | | | | In any non-buggy program free() does not fail. And when it fails in a buggy program, the failure is usually fatal (heap corruption and segfault). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* opensock: work correctly on IPv6-only configDenys Vlasenko2009-09-051-9/+9
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* support building out-of-treeBernhard Reutner-Fischer2009-08-172-0/+4
| | | | | | Handle O= Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* add hidden aliases for ntoh/hton functionsMike Frysinger2009-07-221-4/+10
| | | | | | | Sometimes references for these functions show up (like when debugging is enabled), so add hidden aliases for them if needed. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Avoid type-punned pointers that break strict-aliasingRon2009-07-051-3/+6
| | | | | Signed-off-by: Ron Lee <ron@debian.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* libc/inet/resolv.c:Denis Vlasenko2009-04-182-278/+467
| | | | | | | | | | | | | | | | Collapse __length_dotted into __length_question (the sole user of it). Make __length_question and __decode_answer static, they are used only once by only one function. Delete __decode_question, it is unused. All in all, four less .o files in libc.a. Document what __dns_lookup returns (length of the packet). Propagate packet len into __decode_answer, __length_question, __decode_dotted and check that we do not use data past the end of the packet. Rename some variables/parameters to better names (len -> packet_len, data -> packet etc). Add mini-doc how DNS packets look like. Style cleanup.
* resolver:Denis Vlasenko2009-03-101-63/+7
| | | | | | | res_query: do not unconditionally set h_errno to TRY_AGAIN (closes bug 173). cleanups: s/__dn_expand/dn_expand/, remove superfluous dn_expand declaration, remove libc_hidden_proto junk
* Reinstate __libc_foo's needed for linuxthreads.old.Denis Vlasenko2009-02-251-29/+66
| | | | | Now they are only enabled if linuxthreads.old are selected.
* - fix comment style to make it compile againBernhard Reutner-Fischer2009-02-131-27/+37
| | | | - add note about "/etc/config/" and the resolver code per se.
* - ethers only make sense if we want to play with ethernet addressesBernhard Reutner-Fischer2008-12-291-5/+7
| | | | | as in /etc/ethers (man 5 ethers) Assume that any of socket- or IP support indicate that need.
* docs/defines.txt: document _extern_inlineDenis Vlasenko2008-12-222-74/+64
| | | | | | | | | | | | | libc/inet/ether_addr.c: optimize tolower, we ever use it on 0-9a-f libc/inet/ntop.c: optimize tolower, we ever use it on 0-9a-f with locale support on, code size change is: text data bss dec hex filename - 396 0 24 420 1a4 libc/inet/ether_addr.os + 306 0 24 330 14a libc/inet/ether_addr.os - 1453 0 0 1453 5ad libc/inet/ntop.os + 1430 0 0 1430 596 libc/inet/ntop.os
* Deal with a few data fields which may be made constant.Denis Vlasenko2008-12-201-1/+1
| | | | | | | | | text data bss dec hex filename - 1237 9 28 1274 4fa libc/inet/rpc/getrpcent.os + 1246 0 28 1274 4fa libc/inet/rpc/getrpcent.os - 773 24 0 797 31d libc/misc/time/_time_localtime_tzi.os + 772 16 0 788 314 libc/misc/time/_time_localtime_tzi.os
* resolv: fix testcase failureDenis Vlasenko2008-12-171-2/+2
| | | | | test/regex/tst-regex2.c: fix testcase to compile with just "gcc <file>.c"
* heed compiler warnings about checking non-defined variables in #if directivesDenis Vlasenko2008-12-141-2/+2
|
* *: remove some __libc_XXX functions:Denis Vlasenko2008-12-101-57/+26
| | | | | | | | | | | | __libc_accept __libc_close __libc_connect __libc_creat __libc_creat64 __libc_fsync __libc_lseek __libc_lseek64 __libc_msync __libc_nanosleep __libc_open __libc_open64 __libc_pause __libc_read __libc_readv __libc_recv __libc_recvfrom __libc_recvmsg __libc_send __libc_sendmsg __libc_sendto __libc_tcdrain __libc_wait __libc_waitpid __libc_write __libc_writev They were removed from glibc 1 May 2004: http://sources.redhat.com/ml/libc-hacker/2004-05/msg00001.html
* remove __libc_getdomainname alias. google says only we have it.Denis Vlasenko2008-12-101-6/+1
|
* getaddrinfo: runp->ifa_addr indeed can be NULL, don't dereference itDenis Vlasenko2008-12-092-4/+3
| | | | | ifaddrs.c: cosmetics, no code changes
* getaddrinfo: remove superfluout indentation, fix incorrect one.Denis Vlasenko2008-12-081-61/+64
| | | | | remove one superfluous statement.
* - fix loop for checking ifaddr on both IPv4 and IPv6Bernhard Reutner-Fischer2008-12-081-2/+2
|
* resolver: make new name resolutions reread /etc/resolv.confDenis Vlasenko2008-12-061-219/+197
| | | | | | | | | | | | | | | | if 256+ seconds passed since last read; fix cases where we switch to next search domain instead of switching to new server optimize ip4/ip6 combined cases; rewrite for(;;) loops so that it's clearer what's going on; document buffer usage; add TODOs and FIXMEs (for one, gethostbyname2 does not fill ->h_aliases field in the result AT ALL, and is iffy in general) text data bss dec hex filename - 245898 1403 11904 259205 3f485 libuClibc-0.9.30-svn.so + 245785 1403 11904 259092 3f414 libuClibc-0.9.30-svn.so
* hostid: improve extremely unreadable partsDenis Vlasenko2008-12-011-16/+15
| | | | | | | | | | | | | | | | | | | | *: remove checks of sigaction and sigprocmask results in cases where they clearly can't fail: sigaction(known_good_sig) sigprocmask(known_good_how) text data bss dec hex filename - 393 4 0 397 18d libc/pwd_grp/lckpwdf.o + 382 4 0 386 182 libc/pwd_grp/lckpwdf.o - 56 0 0 56 38 libc/signal/sigblock.o + 44 0 0 44 2c libc/signal/sigblock.o - 211 0 0 211 d3 libc/signal/sigset.o + 202 0 0 202 ca libc/signal/sigset.o - 56 0 0 56 38 libc/signal/sigsetmask.o + 44 0 0 44 2c libc/signal/sigsetmask.o - 309 0 0 309 135 libc/unistd/sleep.o + 256 0 0 256 100 libc/unistd/sleep.o
* constify more dataDenis Vlasenko2008-12-013-3/+3
| | | | | | | | | | | text+data text+rodata rwdata bss filename - 2534 2510 24 0 libc/inet/rpc/clnt_udp.o + 2534 2534 0 0 libc/inet/rpc/clnt_udp.o - 1904 1880 24 0 libc/inet/rpc/clnt_tcp.o + 1904 1904 0 0 libc/inet/rpc/clnt_tcp.o - 770 746 24 4 libc/inet/rpc/clnt_raw.o + 770 770 0 4 libc/inet/rpc/clnt_raw.o
* rpc: constify data, localize unnecessarily static dataDenis Vlasenko2008-12-011-2/+2
| | | | | | | text+data text+rodata rwdata bss filename - 2308 2284 24 24 libc/inet/rpc/clnt_unix.o + 2308 2308 0 0 libc/inet/rpc/clnt_unix.o
* random: use smaller data fields where appropriateDenis Vlasenko2008-12-011-0/+1
| | | | | | | | | text data bss dec hex filename - 130 156 0 286 11e libc/stdlib/random.o + 130 148 0 278 116 libc/stdlib/random.o - 586 0 0 586 24a libc/stdlib/random_r.o + 570 0 0 570 23a libc/stdlib/random_r.o
* gethostbyname can use gethostbyname2, saving one nearly 0.5k static bufferDenis Vlasenko2008-12-011-15/+20
| | | | | | | text data bss dec hex filename - 45 0 480 525 20d libc/inet/gethostbyname.o + 18 0 0 18 12 libc/inet/gethostbyname.o
* rpc: should check against max for int32, not intDenis Vlasenko2008-12-011-4/+4
|
* rpc: ifdef out xdrrec_{get,put}long if int32 == long,Denis Vlasenko2008-12-014-76/+54
| | | | | | | otherwise use xdrrec_{get,put}int32 + trivial transform. eliminate warnings. des: small shrink + eliminate a warning
* Last portion of libc_hidden_proto removal.Denis Vlasenko2008-11-2060-404/+405
| | | | | Appears to build fine (several .configs tried)