sofia-sip/su_localinfo.h

Go to the documentation of this file.
00001 /*
00002  * This file is part of the Sofia-SIP package
00003  *
00004  * Copyright (C) 2005 Nokia Corporation.
00005  *
00006  * Contact: Pekka Pessi <pekka.pessi@nokia-email.address.hidden>
00007  *
00008  * This library is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU Lesser General Public License
00010  * as published by the Free Software Foundation; either version 2.1 of
00011  * the License, or (at your option) any later version.
00012  *
00013  * This library is distributed in the hope that it will be useful, but
00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00016  * Lesser General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU Lesser General Public
00019  * License along with this library; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
00021  * 02110-1301 USA
00022  *
00023  */
00024 
00025 #ifndef SU_LOCALINFO_H
00026 
00027 #define SU_LOCALINFO_H 
00028 
00029 
00038 #ifndef SU_H
00039 #include <sofia-sip/su.h>
00040 #endif
00041 
00042 SOFIA_BEGIN_DECLS
00043 
00044 typedef struct su_localinfo_s su_localinfo_t;
00045 
00047 struct su_localinfo_s {
00049   int li_flags;
00050   int li_family;                
00051   int li_index;                 
00052   int li_scope;                 
00053   int li_addrlen;               
00054   su_sockaddr_t *li_addr;       
00055   char *li_canonname;           
00056   su_localinfo_t *li_next;      
00057   char *li_ifname;              
00058 };
00059 
00061 enum {
00063   LI_V4MAPPED     = 1,
00065   LI_CANONNAME    = 2,
00067   LI_NAMEREQD     = 6,
00069   LI_NUMERIC      = 8,
00071   LI_IFNAME       = 256
00072 };
00073 
00075 enum {
00076   LI_SCOPE_HOST   = 0x10,       
00077   LI_SCOPE_LINK   = 0x20,       
00078   LI_SCOPE_SITE   = 0x40,       
00079   LI_SCOPE_GLOBAL = 0x80        
00080 };
00081 
00083 enum {
00084   ELI_NOADDRESS  = -1,          
00085   ELI_MEMORY     = -2,          
00086   ELI_FAMILY     = -3,          
00087   ELI_RESOLVER   = -4,          
00088   ELI_SYSTEM     = -5,          
00089   ELI_BADHINTS   = -6,          
00090   ELI_NOERROR    = 0            
00091 };
00092 
00094 SOFIAPUBFUN int su_getlocalinfo(su_localinfo_t const *hints,
00095                                 su_localinfo_t **res);
00097 SOFIAPUBFUN void su_freelocalinfo(su_localinfo_t *);
00099 SOFIAPUBFUN char const *su_gli_strerror(int error);
00101 SOFIAPUBFUN su_localinfo_t *su_copylocalinfo(su_localinfo_t const *li0);
00102 
00104 SOFIAPUBFUN int su_sockaddr_scope(su_sockaddr_t const *su, socklen_t sulen);
00105 
00106 SOFIA_END_DECLS
00107 
00108 #endif /* !defined(SU_LOCALINFO_H) */

Sofia-SIP 1.12.1 - Copyright (C) 2006 Nokia Corporation. All rights reserved. Licensed under the terms of the GNU Lesser General Public License.