BLOG | DOCUMENTATION | GITHUB

Home --> Documentations --> PJLIB Reference

addr_resolv.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
3 * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19#ifndef __PJ_ADDR_RESOLV_H__
20#define __PJ_ADDR_RESOLV_H__
21
27#include <pj/sock.h>
28
30
64typedef struct pj_hostent
65{
66 char *h_name;
67 char **h_aliases;
70 char **h_addr_list;
72
74#define h_addr h_addr_list[0]
75
79typedef struct pj_addrinfo
80{
84
85
101
102
115PJ_DECL(pj_status_t) pj_gethostip(int af, pj_sockaddr *addr);
116
117
138 const pj_str_t *dst,
139 pj_sockaddr *itf_addr,
140 pj_bool_t allow_resolve,
141 pj_sockaddr *p_dst_addr);
142
157 pj_sockaddr *addr);
158
159
179PJ_DECL(pj_status_t) pj_getaddrinfo(int af, const pj_str_t *name,
180 unsigned *count, pj_addrinfo ai[]);
181
182
183
187
188#endif /* __PJ_ADDR_RESOLV_H__ */
189
int pj_bool_t
Definition: types.h:71
int pj_status_t
Definition: types.h:68
pj_status_t pj_gethostip(int af, pj_sockaddr *addr)
pj_status_t pj_getipinterface(int af, const pj_str_t *dst, pj_sockaddr *itf_addr, pj_bool_t allow_resolve, pj_sockaddr *p_dst_addr)
pj_status_t pj_gethostbyname(const pj_str_t *name, pj_hostent *he)
pj_status_t pj_getaddrinfo(int af, const pj_str_t *name, unsigned *count, pj_addrinfo ai[])
pj_status_t pj_getdefaultipinterface(int af, pj_sockaddr *addr)
#define PJ_BEGIN_DECL
Definition: config.h:1284
#define PJ_MAX_HOSTNAME
Definition: config.h:660
#define PJ_END_DECL
Definition: config.h:1285
Socket Abstraction.
Definition: addr_resolv.h:80
char ai_canonname[PJ_MAX_HOSTNAME]
Definition: addr_resolv.h:81
pj_sockaddr ai_addr
Definition: addr_resolv.h:82
Definition: addr_resolv.h:65
char ** h_aliases
Definition: addr_resolv.h:67
char ** h_addr_list
Definition: addr_resolv.h:70
int h_addrtype
Definition: addr_resolv.h:68
int h_length
Definition: addr_resolv.h:69
char * h_name
Definition: addr_resolv.h:66
Definition: types.h:120
Definition: sock.h:633

 


PJLIB Open Source, high performance, small footprint, and very very portable framework
Copyright (C) 2006-2009 Teluu Inc.