summaryrefslogtreecommitdiffstats
path: root/avahi-core/socket.c
Commit message (Collapse)AuthorAgeFilesLines
* fix sendmsg() calls on FreeBSD and AMD64 kernels with 32bit userspace. ↵Lennart Poettering2006-05-041-16/+27
| | | | | | (Closes #35 and #19) git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1207 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* Patch from Padraig O'Briain <Padraig.Obriain@sun.com> to build avahi on SolarisSebastien Estienne2006-05-021-0/+3
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1206 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* make the construction of the ancillary data for sendmsg() a bit more robust. ↵Lennart Poettering2006-04-241-3/+5
| | | | | | (see #32) git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1199 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* Patch from sjoerd simons to close Ticket #19 (Doesn't work on 64 bit ↵Sebastien Estienne2006-03-171-3/+3
| | | | | | machines with 32 bit userspace) git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1178 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* add membership hack for IPv6, tooLennart Poettering2006-02-101-1/+7
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1132 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * fix bug where avahi-daemon wasn't working anymore after the iface went ↵Sebastien Estienne2006-02-101-0/+3
| | | | | | down/up git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1131 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* merge ia64 fixes from Jason Vas DiasLennart Poettering2006-02-091-5/+5
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1130 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * add support for IP_SENDSRCADDR on freeBSDSebastien Estienne2005-11-091-3/+25
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@945 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * set IP_MULTICAST_IF for *BSDSebastien Estienne2005-11-091-4/+7
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@943 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * small fixesSebastien Estienne2005-11-031-3/+3
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@925 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* rework and cleanup socket handling to improve support for OS that don't ↵Lennart Poettering2005-11-031-65/+102
| | | | | | support a SO_RECVIF equivalent git-svn-id: file:///home/lennart/svn/public/avahi/trunk@923 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * Always specfify the local IP address when joining mcast groups. This ↵Lennart Poettering2005-11-011-10/+13
| | | | | | increases compatibility with *BSD and is smoother on other systems, too git-svn-id: file:///home/lennart/svn/public/avahi/trunk@921 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * small fix in the #includesSebastien Estienne2005-10-311-1/+1
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@909 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * many trivial fix to make avahi compile on OpenBSDSebastien Estienne2005-10-281-3/+6
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@903 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * replace AF_UNSPEC by AVAHI_PROTO_UNSPEC in client-test.cLennart Poettering2005-10-251-1/+0
| | | | | | | | | * remove some functions from the public API in avahi-common/{domain,address}.[ch] and move them into avahi-core/{domain-util,add-util}.[ch] * properly generate CNAME responses * add some more comments to server.c git-svn-id: file:///home/lennart/svn/public/avahi/trunk@871 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* add a compiler warning that avahi_send_dns_packet_ipv4() still misses ↵Lennart Poettering2005-10-251-3/+4
| | | | | | support for setting the outgoing interface on everythng but Linux git-svn-id: file:///home/lennart/svn/public/avahi/trunk@866 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * change setsocktopt for IP_TTL to use an int instead of an uin8_t for ↵Lennart Poettering2005-10-241-3/+3
| | | | | | compatibility with non-linux systems git-svn-id: file:///home/lennart/svn/public/avahi/trunk@858 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* cleanup socket.c a littleLennart Poettering2005-10-241-111/+91
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@857 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* unrbeak IPv6 support: change ttl value size back to 32 bit for ipv6 Lennart Poettering2005-10-241-1/+1
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@853 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* fix IP_TTL/IP_RECVTTL on linuxLennart Poettering2005-10-241-3/+2
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@852 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* many cleanups in preperation of the netbsd portLennart Poettering2005-10-241-69/+83
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@851 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * correctly handle empty domain names (i.e. the root zone)Lennart Poettering2005-10-231-6/+6
| | | | | | | | | | | | | | * fix memory initialization error in wide-area.c * make server_add_xx() functions atomic, i.e. clean up half-created entries on failure * add some more validity checking macros and change everything to make use of them * clean up avahi_server_add_address() * change some functions from domain.[ch] to work on a stack buffer instead of malloced memory * update avahi-test.c a little * replace avahi_reverse_lookup_name_{ipv4,ipv6}() with a single function avahi_reverse_lookup_name() * remove avahi_server_add_dns_server_name() from public API git-svn-id: file:///home/lennart/svn/public/avahi/trunk@845 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * added a missing include in dbus-protocol.cSebastien Estienne2005-10-211-0/+8
| | | | | | | | * added REUSEPORT in socket.c * cosmetic cleaning in iface-pfroute.c git-svn-id: file:///home/lennart/svn/public/avahi/trunk@836 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * removed bogus IP_RECVIFSebastien Estienne2005-10-211-24/+3
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@835 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* remove htonl() that shouldn't be thereLennart Poettering2005-10-211-1/+1
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@833 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* handle architectures that miss "struct ip_mreq" betterLennart Poettering2005-10-201-84/+18
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@832 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * preliminary ipv6 support for BSDSebastien Estienne2005-10-201-1/+45
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@831 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * bug fix in run_versionedSebastien Estienne2005-10-201-4/+4
| | | | | | | | * bug fix in socket.c and cosmectic change * use uname instead of MACHTYPE in bootstrap.sh git-svn-id: file:///home/lennart/svn/public/avahi/trunk@830 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * replaced some ioctl by if_nametoindex and if_indextonameSebastien Estienne2005-10-191-2/+2
| | | | | | | * cosmetic fix in socket.c git-svn-id: file:///home/lennart/svn/public/avahi/trunk@829 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * handle cmsg_type IP_RECVTTLSebastien Estienne2005-10-181-0/+6
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@808 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * more portability work on socket.cSebastien Estienne2005-10-141-33/+128
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@760 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * portability function for IP_PKTINFOSebastien Estienne2005-10-121-8/+36
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@748 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * added a portability fix for IPV6_ADD/DROP_MEMBERSHIPSebastien Estienne2005-10-121-0/+13
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@736 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * replaced SOL_IP by IPPROTO_IP as it seems more portableSebastien Estienne2005-10-111-22/+22
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@730 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * add option to not enable SO_REUSEADDR for multicast sockets, effectively ↵Lennart Poettering2005-09-281-44/+54
| | | | | | | | | | disallow multiple mDNS stacks running simultaneously * add a config file option for this and enable it by default * remove some bad \n in log messages git-svn-id: file:///home/lennart/svn/public/avahi/trunk@646 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * split off lookup.h and publish.h from core.hLennart Poettering2005-09-251-59/+85
| | | | | | | | | | | | | * implement wide-area DNS-SD * if multiple clients query the same records, only start the query packet sequence once * implement recursive CNAME queries * add support for resolving services without TXT or A/AAAA records * enlarge resolving timeouts to 5s * implement new browse/resolving events CACHE_EXHAUSTED/ALL_FOR_NOW * add support for resolving services without name. (i.e. for normal SRV records) git-svn-id: file:///home/lennart/svn/public/avahi/trunk@608 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* Make AVAHI_PROTO_xxx well defined constantsLennart Poettering2005-09-161-1/+1
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@595 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * strip glib from avahi-coreLennart Poettering2005-08-131-65/+63
| | | | | | | | | | | | | | * implement glib memory allocator * add new documentation file MALLOC * initialize pseudo-RNG from /dev/urandom in avahi-daemon * remove some gcc 4.0 warnings * beef up watch system with real timeouts * move GCC __attribute__ macros into its own header avahi-common/gccmacro.h * make use of GCC's sentinel attribute where it make sense * add malloc() implementations that abort on OOM and enable them by default git-svn-id: file:///home/lennart/svn/public/avahi/trunk@308 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* Split avahi-common/util.h into Lennart Poettering2005-08-121-1/+1
| | | | | | | | | avahi-common/domain.h avahi-core/fdutil.h avahi-core/timeval.h git-svn-id: file:///home/lennart/svn/public/avahi/trunk@299 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* linux 2.4 compatLennart Poettering2005-08-031-1/+1
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@219 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * allow caller to specifiy additional CFLAGS arguments to bootstrap.shLennart Poettering2005-08-021-8/+8
| | | | | | | * fix some warnings (and some real errors) found when compiling avahi with excessive GCC warnings git-svn-id: file:///home/lennart/svn/public/avahi/trunk@209 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * implement new source address check mechanismsLennart Poettering2005-06-241-10/+14
| | | | | | | | | | * introduce new types AvahiIfIndex and AvahiProtocol to abstract underlying OS structures a bit * document string list, address and other stuff * implement qclass = ANY queries * don't make use of UTF8 collation as RFC mandates git-svn-id: file:///home/lennart/svn/public/avahi/trunk@144 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * Update configure.ac to check for the availabilty of more functionsLennart Poettering2005-06-211-2/+2
| | | | | | | | | | | * really return sensible error codes from avahi_server_add_xx() * make all users of avahi_server_add_xxx() check for the validity * check for local RR conflicts * only suppress local queries by remote queries if they have an empty known answer suppresion list * fix FIONREAD call git-svn-id: file:///home/lennart/svn/public/avahi/trunk@136 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * detect other running mDNS stacksLennart Poettering2005-06-191-20/+47
| | | | | | | | | | | | * replace more g_message()/g_warning() calls with avahi_log_xxx() * fix configuration file paths * only load configuration file when running daemon * require uid == 0 * fix static service reloading * add new command line option for reloading -r git-svn-id: file:///home/lennart/svn/public/avahi/trunk@129 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * add logging API and make all code make use of itLennart Poettering2005-06-111-43/+44
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@112 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * use FIONREAD to minimize allocated buffer size when reading incoming packetsLennart Poettering2005-06-031-4/+19
| | | | | | | * enforce a cache size limit git-svn-id: file:///home/lennart/svn/public/avahi/trunk@96 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * implement reflection (including legacy unicast reflection)Lennart Poettering2005-06-031-0/+95
| | | | | | | * implement a history in the probe scheduler git-svn-id: file:///home/lennart/svn/public/avahi/trunk@92 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * add the first bits of a mDNS reflectorLennart Poettering2005-05-231-0/+4
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@90 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * add new server state AVAHI_SERVER_SLEEPING to avoid conflicts by own responsesLennart Poettering2005-05-201-11/+28
| | | | | | | | | | | | | * Honour TC bit in incoming packets by responding immediately to packets * publish browse domain * Fix a structure size issue in iface.c revealed by running avahi on Linux 2.4 * Don't depend on IFF_RUNNING * Require a global IP addresses to consider an interface relevant * Linux 2.4 compatiblity * fix parsing of TTL from recvmsg() git-svn-id: file:///home/lennart/svn/public/avahi/trunk@79 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * abstract MTU stuff for packet generationLennart Poettering2005-05-101-12/+37
| | | | | | | | * unicast response support * legacy unicast support git-svn-id: file:///home/lennart/svn/public/avahi/trunk@66 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe