1 #ifndef fooaddrutilhfoo
2 #define fooaddrutilhfoo
7 This file is part of avahi.
9 avahi is free software; you can redistribute it and/or modify it
10 under the terms of the GNU Lesser General Public License as
11 published by the Free Software Foundation; either version 2.1 of the
12 License, or (at your option) any later version.
14 avahi is distributed in the hope that it will be useful, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
17 Public License for more details.
19 You should have received a copy of the GNU Lesser General Public
20 License along with avahi; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
26 #include <sys/socket.h>
28 #include <avahi-common/cdecl.h>
29 #include <avahi-common/address.h>
33 /** Make an address structture of a sockaddr structure */
34 AvahiAddress *avahi_address_from_sockaddr(const struct sockaddr* sa, AvahiAddress *ret_addr);
36 /** Return the port number of a sockaddr structure (either IPv4 or IPv6) */
37 uint16_t avahi_port_from_sockaddr(const struct sockaddr* sa);
39 /** Check whether the specified IPv6 address is in fact an
40 * encapsulated IPv4 address, returns 1 if yes, 0 otherwise */
41 int avahi_address_is_ipv4_in_ipv6(const AvahiAddress *a);