Expand PMF_FN_* macros.
[netbsd-mini2440.git] / external / ibm-public / postfix / dist / src / global / wildcard_inet_addr.c
bloba9656d3ac8e027133b3671e6bb488160bcb215a3
1 /* $NetBSD$ */
3 /*++
4 /* NAME
5 /* wildcard_inet_addr 3
6 /* SUMMARY
7 /* expand wild-card address
8 /* SYNOPSIS
9 /* #include <wildcard_inet_addr.h>
11 /* INET_ADDR_LIST *wildcard_inet_addr(void)
12 /* DESCRIPTION
13 /* wildcard_inet_addr() determines all wild-card addresses
14 /* for all supported address families.
15 /* DIAGNOSTICS
16 /* Fatal errors: out of memory.
17 /* SEE ALSO
18 /* inet_addr_list(3) address list management
19 /* LICENSE
20 /* .ad
21 /* .fi
22 /* The Secure Mailer license must be distributed with this software.
23 /* AUTHOR(S)
24 /* Wietse Venema
25 /* IBM T.J. Watson Research
26 /* P.O. Box 704
27 /* Yorktown Heights, NY 10598, USA
29 /* Dean C. Strik
30 /* Department ICT
31 /* Eindhoven University of Technology
32 /* P.O. Box 513
33 /* 5600 MB Eindhoven, Netherlands
34 /* E-mail: <dean@ipnet6.org>
35 /*--*/
37 /* System library. */
39 #include <sys_defs.h>
41 /* Utility library. */
43 #include <msg.h>
44 #include <inet_addr_list.h>
45 #include <inet_addr_host.h>
47 /* Global library. */
49 #include <wildcard_inet_addr.h>
51 /* Application-specific. */
53 static INET_ADDR_LIST wild_addr_list;
55 static void wildcard_inet_addr_init(INET_ADDR_LIST *addr_list)
57 inet_addr_list_init(addr_list);
58 if (inet_addr_host(addr_list, "") == 0)
59 msg_fatal("could not get list of wildcard addresses");
62 /* wildcard_inet_addr_list - return list of addresses */
64 INET_ADDR_LIST *wildcard_inet_addr_list(void)
66 if (wild_addr_list.used == 0)
67 wildcard_inet_addr_init(&wild_addr_list);
69 return (&wild_addr_list);