1 /*
2  * This file is part of the Sofia-SIP package
3  *
4  * Copyright (C) 2005 Nokia Corporation.
5  *
6  * Contact: Pekka Pessi <pekka.pessi@nokia.com>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public License
10  * as published by the Free Software Foundation; either version 2.1 of
11  * the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21  * 02110-1301 USA
22  *
23  */
24 
25 #ifndef S2_LOCALINFO_H
26 /** Defined when <s2_localinfo.h> has been included. */
27 #define S2_LOCALINFO_H
28 
29 
30 /**@internal
31  * @file s2_localinfo.h - Test su_localinfo() users
32  *
33  * @author Pekka Pessi <Pekka.Pessi@nokia.com>
34  *
35  */
36 
37 #ifndef SU_LOCALINFO_H
38 #include <sofia-sip/su_localinfo.h>
39 #endif
40 
41 SOFIA_BEGIN_DECLS
42 
43 int s2_getlocalinfo(su_localinfo_t const *hints, su_localinfo_t **res);
44 void s2_freelocalinfo(su_localinfo_t *);
45 char const *s2_gli_strerror(int error);
46 su_localinfo_t *s2_copylocalinfo(su_localinfo_t const *li0);
47 int s2_sockaddr_scope(su_sockaddr_t const *su, socklen_t sulen);
48 
49 void s2_localinfo_ifaces(char const **ifaces);
50 
51 #define S2_LOCALINFO_STUBS(static)					\
52   static int su_getlocalinfo(su_localinfo_t const *hints, su_localinfo_t **res)	\
53   { return s2_getlocalinfo(hints, res); }				\
54   static void su_freelocalinfo(su_localinfo_t *li)			\
55   { s2_freelocalinfo(li); }						\
56   static char const *su_gli_strerror(int error)				\
57   { return s2_gli_strerror(error); }					\
58   static su_localinfo_t *su_copylocalinfo(su_localinfo_t const *li0)	\
59   { return s2_copylocalinfo(li0); }					\
60   static int su_sockaddr_scope(su_sockaddr_t const *su, socklen_t sulen) \
61   { return s2_sockaddr_scope(su, sulen); }				\
62   static int su_localinfo_stubs						\
63 
64 SOFIA_END_DECLS
65 
66 #endif /* !defined(S2_LOCALINFO_H) */
67