28
28
/* * Query a domain name server for an IP address of a given hostname
29
29
*
30
30
* @param stack Network stack as target for DNS query
31
- * @param addr Destination for the host address
32
31
* @param host Hostname to resolve
32
+ * @param addr Destination for the host address
33
33
* @param version IP version to resolve
34
34
* @return 0 on success, negative error code on failure
35
35
* NSAPI_ERROR_DNS_FAILURE indicates the host could not be found
36
36
*/
37
- int nsapi_dns_query (nsapi_stack_t *stack, nsapi_addr_t *addr ,
38
- const char *host , nsapi_version_t version);
37
+ int nsapi_dns_query (nsapi_stack_t *stack, const char *host ,
38
+ nsapi_addr_t *addr , nsapi_version_t version);
39
39
40
40
/* * Query a domain name server for multiple IP address of a given hostname
41
41
*
42
42
* @param stack Network stack as target for DNS query
43
+ * @param host Hostname to resolve
43
44
* @param addr Array for the host addresses
44
45
* @param addr_count Number of addresses allocated in the array
45
- * @param host Hostname to resolve
46
46
* @param version IP version to resolve
47
47
* @return Number of addresses found on success, negative error code on failure
48
48
* NSAPI_ERROR_DNS_FAILURE indicates the host could not be found
49
49
*/
50
- int nsapi_dns_query_multiple (nsapi_stack_t *stack,
51
- nsapi_addr_t *addr, unsigned addr_count,
52
- const char *host, nsapi_version_t version);
50
+ int nsapi_dns_query_multiple (nsapi_stack_t *stack, const char *host,
51
+ nsapi_addr_t *addr, unsigned addr_count, nsapi_version_t version);
53
52
54
53
/* * Add a domain name server to list of servers to query
55
54
*
@@ -65,88 +64,85 @@ int nsapi_dns_add_server(nsapi_addr_t addr);
65
64
/* * Query a domain name server for an IP address of a given hostname
66
65
*
67
66
* @param stack Network stack as target for DNS query
68
- * @param addr Destination for the host address
69
67
* @param host Hostname to resolve
68
+ * @param addr Destination for the host address
70
69
* @param version IP version to resolve (defaults to NSAPI_IPv4)
71
70
* @return 0 on success, negative error code on failure
72
71
* NSAPI_ERROR_DNS_FAILURE indicates the host could not be found
73
72
*/
74
- int nsapi_dns_query (NetworkStack *stack, SocketAddress *addr ,
75
- const char *host , nsapi_version_t version = NSAPI_IPv4);
73
+ int nsapi_dns_query (NetworkStack *stack, const char *host ,
74
+ SocketAddress *addr , nsapi_version_t version = NSAPI_IPv4);
76
75
77
76
/* * Query a domain name server for an IP address of a given hostname
78
77
*
79
78
* @param stack Network stack as target for DNS query
80
- * @param addr Destination for the host address
81
79
* @param host Hostname to resolve
80
+ * @param addr Destination for the host address
82
81
* @param version IP version to resolve (defaults to NSAPI_IPv4)
83
82
* @return 0 on success, negative error code on failure
84
83
* NSAPI_ERROR_DNS_FAILURE indicates the host could not be found
85
84
*/
86
- extern " C" int nsapi_dns_query (nsapi_stack_t *stack, nsapi_addr_t *addr ,
87
- const char *host , nsapi_version_t version = NSAPI_IPv4);
85
+ extern " C" int nsapi_dns_query (nsapi_stack_t *stack, const char *host ,
86
+ nsapi_addr_t *addr , nsapi_version_t version = NSAPI_IPv4);
88
87
89
88
/* * Query a domain name server for an IP address of a given hostname
90
89
*
91
90
* @param stack Network stack as target for DNS query
92
- * @param addr Destination for the host address
93
91
* @param host Hostname to resolve
92
+ * @param addr Destination for the host address
94
93
* @param version IP version to resolve (defaults to NSAPI_IPv4)
95
94
* @return 0 on success, negative error code on failure
96
95
* NSAPI_ERROR_DNS_FAILURE indicates the host could not be found
97
96
*/
98
97
template <typename S>
99
- int nsapi_dns_query (S *stack, SocketAddress *addr ,
100
- const char *host , nsapi_version_t version = NSAPI_IPv4)
98
+ int nsapi_dns_query (S *stack, const char *host ,
99
+ SocketAddress *addr , nsapi_version_t version = NSAPI_IPv4)
101
100
{
102
- return nsapi_dns_query (nsapi_create_stack (stack), addr, host , version);
101
+ return nsapi_dns_query (nsapi_create_stack (stack), host, addr , version);
103
102
}
104
103
105
104
/* * Query a domain name server for multiple IP address of a given hostname
106
105
*
107
106
* @param stack Network stack as target for DNS query
107
+ * @param host Hostname to resolve
108
108
* @param addr Array for the host addresses
109
109
* @param addr_count Number of addresses allocated in the array
110
- * @param host Hostname to resolve
111
110
* @param version IP version to resolve (defaults to NSAPI_IPv4)
112
111
* @return Number of addresses found on success, negative error code on failure
113
112
* NSAPI_ERROR_DNS_FAILURE indicates the host could not be found
114
113
*/
115
- int nsapi_dns_query_multiple (NetworkStack *stack,
116
- SocketAddress *addr, unsigned addr_count,
117
- const char *host, nsapi_version_t version = NSAPI_IPv4);
114
+ int nsapi_dns_query_multiple (NetworkStack *stack, const char *host,
115
+ SocketAddress *addr, unsigned addr_count, nsapi_version_t version = NSAPI_IPv4);
118
116
119
117
/* * Query a domain name server for multiple IP address of a given hostname
120
118
*
121
119
* @param stack Network stack as target for DNS query
120
+ * @param host Hostname to resolve
122
121
* @param addr Array for the host addresses
123
122
* @param addr_count Number of addresses allocated in the array
124
- * @param host Hostname to resolve
125
123
* @param version IP version to resolve (defaults to NSAPI_IPv4)
126
124
* @return Number of addresses found on success, negative error code on failure
127
125
* NSAPI_ERROR_DNS_FAILURE indicates the host could not be found
128
126
*/
129
- extern " C" int nsapi_dns_query_multiple (nsapi_stack_t *stack,
130
- nsapi_addr_t *addr, unsigned addr_count,
131
- const char *host, nsapi_version_t version = NSAPI_IPv4);
127
+ extern " C" int nsapi_dns_query_multiple (nsapi_stack_t *stack, const char *host,
128
+ nsapi_addr_t *addr, unsigned addr_count, nsapi_version_t version = NSAPI_IPv4);
132
129
133
130
/* * Query a domain name server for multiple IP address of a given hostname
134
131
*
135
132
* @param stack Network stack as target for DNS query
133
+ * @param host Hostname to resolve
136
134
* @param addr Array for the host addresses
137
135
* @param addr_count Number of addresses allocated in the array
138
- * @param host Hostname to resolve
139
136
* @param version IP version to resolve (defaults to NSAPI_IPv4)
140
137
* @return Number of addresses found on success, negative error code on failure
141
138
* NSAPI_ERROR_DNS_FAILURE indicates the host could not be found
142
139
*/
143
140
template <typename S>
144
- int nsapi_dns_query_multiple (S *stack,
145
- SocketAddress *addr, unsigned addr_count,
146
- const char *host, nsapi_version_t version = NSAPI_IPv4)
141
+ int nsapi_dns_query_multiple (S *stack, const char *host,
142
+ SocketAddress *addr, unsigned addr_count, nsapi_version_t version = NSAPI_IPv4)
147
143
{
148
144
return nsapi_dns_query_multiple (nsapi_create_stack (stack),
149
- addr, addr_count, host , version);
145
+ host, addr, addr_count , version);
150
146
}
151
147
152
148
/* * Add a domain name server to list of servers to query
0 commit comments