UniMRCP  1.7.0
apt_net.h
Go to the documentation of this file.
1 /*
2  * Copyright 2008-2015 Arsen Chaloyan
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef APT_NET_H
18 #define APT_NET_H
19 
20 /**
21  * @file apt_net.h
22  * @brief Network Utilities
23  */
24 
25 #include "apt.h"
26 
28 
29 /**
30  * Get the IP address (in numeric address string format) by hostname.
31  * @param addr the IP address to return
32  * @param pool the pool to allocate memory from
33  */
34 apt_bool_t apt_ip_get(char **addr, apr_pool_t *pool);
35 
36 /**
37  * Get the IP address (in numeric address string format) by network interface name.
38  * @param iface_name the network interface name (eth0, Local Area Connection, etc)
39  * @param addr the IP address to return
40  * @param pool the pool to allocate memory from
41  */
42 apt_bool_t apt_ip_get_by_iface(const char *iface_name, char **addr, apr_pool_t *pool);
43 
44 /**
45  * Get current NTP time
46  * @param sec the seconds of the NTP time to return
47  * @param frac the fractions of the NTP time to return
48  */
49 void apt_ntp_time_get(apr_uint32_t *sec, apr_uint32_t *frac);
50 
52 
53 #endif /* APT_NET_H */
void apt_ntp_time_get(apr_uint32_t *sec, apr_uint32_t *frac)
APT_BEGIN_EXTERN_C apt_bool_t apt_ip_get(char **addr, apr_pool_t *pool)
#define APT_END_EXTERN_C
Definition: apt.h:38
int apt_bool_t
Definition: apt.h:57
apt_bool_t apt_ip_get_by_iface(const char *iface_name, char **addr, apr_pool_t *pool)
#define APT_BEGIN_EXTERN_C
Definition: apt.h:36
APR Toolkit Definitions.