su
1.12.11devel
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerator
Macros
Groups
Pages
libsofia-sip-ua
su
sofia-sip
su_localinfo.h
Go to the documentation of this file.
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-email.address.hidden>
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 SU_LOCALINFO_H
26
27
#define SU_LOCALINFO_H
28
29
38
#ifndef SU_H
39
#include <
sofia-sip/su.h
>
40
#endif
41
42
SOFIA_BEGIN_DECLS
43
45
typedef
struct
su_localinfo_s
su_localinfo_t
;
46
48
struct
su_localinfo_s
{
52
int
li_flags
;
53
int
li_family
;
54
int
li_index
;
55
int
li_scope
;
56
socklen_t
li_addrlen
;
57
su_sockaddr_t
*
li_addr
;
58
char
*
li_canonname
;
59
su_localinfo_t
*
li_next
;
60
char
*
li_ifname
;
61
};
62
64
enum
{
66
LI_V4MAPPED
= 1,
68
LI_CANONNAME
= 2,
70
LI_NAMEREQD
= 6,
72
LI_NUMERIC
= 8,
74
LI_DOWN
= 16,
76
LI_IFNAME
= 256
77
};
78
80
enum
{
81
LI_SCOPE_HOST
= 0x10,
82
LI_SCOPE_LINK
= 0x20,
83
LI_SCOPE_SITE
= 0x40,
84
LI_SCOPE_GLOBAL
= 0x80
85
};
86
88
enum
{
89
ELI_NOADDRESS
= -1,
90
ELI_MEMORY
= -2,
91
ELI_FAMILY
= -3,
92
ELI_RESOLVER
= -4,
93
ELI_SYSTEM
= -5,
94
ELI_BADHINTS
= -6,
95
ELI_NOERROR
= 0
96
};
97
99
SOFIAPUBFUN
int
su_getlocalinfo
(
su_localinfo_t
const
*hints,
100
su_localinfo_t
**res);
102
SOFIAPUBFUN
void
su_freelocalinfo
(
su_localinfo_t
*);
104
SOFIAPUBFUN
char
const
*
su_gli_strerror
(
int
error);
106
SOFIAPUBFUN
su_localinfo_t
*
su_copylocalinfo
(
su_localinfo_t
const
*li0);
107
109
SOFIAPUBFUN
int
su_sockaddr_scope
(
su_sockaddr_t
const
*su, socklen_t sulen);
110
111
SOFIA_END_DECLS
112
113
#endif
/* !defined(SU_LOCALINFO_H) */
Sofia-SIP 1.12.11devel - Copyright (C) 2006 Nokia Corporation. All rights reserved. Licensed under the terms of the GNU Lesser General Public License.