18c85a00db6da092ec3766facd49132fa4fc319a1Szymon Jakubczak/*
28c85a00db6da092ec3766facd49132fa4fc319a1Szymon Jakubczak * Copyright 2010, The Android Open Source Project
38c85a00db6da092ec3766facd49132fa4fc319a1Szymon Jakubczak *
48c85a00db6da092ec3766facd49132fa4fc319a1Szymon Jakubczak * Licensed under the Apache License, Version 2.0 (the "License");
58c85a00db6da092ec3766facd49132fa4fc319a1Szymon Jakubczak * you may not use this file except in compliance with the License.
68c85a00db6da092ec3766facd49132fa4fc319a1Szymon Jakubczak * You may obtain a copy of the License at
78c85a00db6da092ec3766facd49132fa4fc319a1Szymon Jakubczak *
88c85a00db6da092ec3766facd49132fa4fc319a1Szymon Jakubczak *     http://www.apache.org/licenses/LICENSE-2.0
98c85a00db6da092ec3766facd49132fa4fc319a1Szymon Jakubczak *
108c85a00db6da092ec3766facd49132fa4fc319a1Szymon Jakubczak * Unless required by applicable law or agreed to in writing, software
118c85a00db6da092ec3766facd49132fa4fc319a1Szymon Jakubczak * distributed under the License is distributed on an "AS IS" BASIS,
128c85a00db6da092ec3766facd49132fa4fc319a1Szymon Jakubczak * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
138c85a00db6da092ec3766facd49132fa4fc319a1Szymon Jakubczak * See the License for the specific language governing permissions and
148c85a00db6da092ec3766facd49132fa4fc319a1Szymon Jakubczak * limitations under the License.
158c85a00db6da092ec3766facd49132fa4fc319a1Szymon Jakubczak */
168c85a00db6da092ec3766facd49132fa4fc319a1Szymon Jakubczak
178c85a00db6da092ec3766facd49132fa4fc319a1Szymon Jakubczak#ifndef _NETUTILS_DHCP_H_
188c85a00db6da092ec3766facd49132fa4fc319a1Szymon Jakubczak#define _NETUTILS_DHCP_H_
198c85a00db6da092ec3766facd49132fa4fc319a1Szymon Jakubczak
208c85a00db6da092ec3766facd49132fa4fc319a1Szymon Jakubczak#include <sys/cdefs.h>
218c85a00db6da092ec3766facd49132fa4fc319a1Szymon Jakubczak#include <arpa/inet.h>
228c85a00db6da092ec3766facd49132fa4fc319a1Szymon Jakubczak
238c85a00db6da092ec3766facd49132fa4fc319a1Szymon Jakubczak__BEGIN_DECLS
248c85a00db6da092ec3766facd49132fa4fc319a1Szymon Jakubczak
258c85a00db6da092ec3766facd49132fa4fc319a1Szymon Jakubczakextern int do_dhcp(char *iname);
268c85a00db6da092ec3766facd49132fa4fc319a1Szymon Jakubczakextern int dhcp_do_request(const char *ifname,
27faab26d542740f03cbe12e44f6af1f97e8e7c12eRobert Greenwalt                          char *ipaddr,
28faab26d542740f03cbe12e44f6af1f97e8e7c12eRobert Greenwalt                          char *gateway,
29faab26d542740f03cbe12e44f6af1f97e8e7c12eRobert Greenwalt                          uint32_t *prefixLength,
30faab26d542740f03cbe12e44f6af1f97e8e7c12eRobert Greenwalt                          char *dns1,
31faab26d542740f03cbe12e44f6af1f97e8e7c12eRobert Greenwalt                          char *dns2,
32faab26d542740f03cbe12e44f6af1f97e8e7c12eRobert Greenwalt                          char *server,
330fb8ec8e9a056cd219216b1f5724d289b50dc993Jeff Sharkey                          uint32_t *lease,
340fb8ec8e9a056cd219216b1f5724d289b50dc993Jeff Sharkey                          char *vendorInfo);
358c85a00db6da092ec3766facd49132fa4fc319a1Szymon Jakubczakextern int dhcp_stop(const char *ifname);
368c85a00db6da092ec3766facd49132fa4fc319a1Szymon Jakubczakextern int dhcp_release_lease(const char *ifname);
378c85a00db6da092ec3766facd49132fa4fc319a1Szymon Jakubczakextern char *dhcp_get_errmsg();
388c85a00db6da092ec3766facd49132fa4fc319a1Szymon Jakubczak
398c85a00db6da092ec3766facd49132fa4fc319a1Szymon Jakubczak__END_DECLS
408c85a00db6da092ec3766facd49132fa4fc319a1Szymon Jakubczak
418c85a00db6da092ec3766facd49132fa4fc319a1Szymon Jakubczak#endif /* _NETUTILS_DHCP_H_ */
42