UniMRCP  1.2.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
apt_net.h
Go to the documentation of this file.
1 /*
2  * Copyright 2008-2014 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  * $Id: apt_net.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
17  */
18 
19 #ifndef APT_NET_H
20 #define APT_NET_H
21 
22 /**
23  * @file apt_net.h
24  * @brief Network Utilities
25  */
26 
27 #include "apt.h"
28 
30 
31 /**
32  * Get the IP address (in numeric address string format) by hostname.
33  * @param addr the IP address to return
34  * @param pool the pool to allocate memory from
35  */
36 apt_bool_t apt_ip_get(char **addr, apr_pool_t *pool);
37 
38 /**
39  * Get the IP address (in numeric address string format) by network interface name.
40  * @param iface_name the network interface name (eth0, Local Area Connection, etc)
41  * @param addr the IP address to return
42  * @param pool the pool to allocate memory from
43  */
44 apt_bool_t apt_ip_get_by_iface(const char *iface_name, char **addr, apr_pool_t *pool);
45 
46 /**
47  * Get current NTP time
48  * @param sec the seconds of the NTP time to return
49  * @param frac the fractions of the NTP time to return
50  */
51 void apt_ntp_time_get(apr_uint32_t *sec, apr_uint32_t *frac);
52 
54 
55 #endif /* APT_NET_H */