189c1e975f0c03997808d35c7be10b244c5309f9fMattias Falk/* 289c1e975f0c03997808d35c7be10b244c5309f9fMattias Falk * Copyright (C) 2011 The Android Open Source Project 389c1e975f0c03997808d35c7be10b244c5309f9fMattias Falk * 489c1e975f0c03997808d35c7be10b244c5309f9fMattias Falk * Licensed under the Apache License, Version 2.0 (the "License"); 589c1e975f0c03997808d35c7be10b244c5309f9fMattias Falk * you may not use this file except in compliance with the License. 689c1e975f0c03997808d35c7be10b244c5309f9fMattias Falk * You may obtain a copy of the License at 789c1e975f0c03997808d35c7be10b244c5309f9fMattias Falk * 889c1e975f0c03997808d35c7be10b244c5309f9fMattias Falk * http://www.apache.org/licenses/LICENSE-2.0 989c1e975f0c03997808d35c7be10b244c5309f9fMattias Falk * 1089c1e975f0c03997808d35c7be10b244c5309f9fMattias Falk * Unless required by applicable law or agreed to in writing, software 1189c1e975f0c03997808d35c7be10b244c5309f9fMattias Falk * distributed under the License is distributed on an "AS IS" BASIS, 1289c1e975f0c03997808d35c7be10b244c5309f9fMattias Falk * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1389c1e975f0c03997808d35c7be10b244c5309f9fMattias Falk * See the License for the specific language governing permissions and 1489c1e975f0c03997808d35c7be10b244c5309f9fMattias Falk * limitations under the License. 1589c1e975f0c03997808d35c7be10b244c5309f9fMattias Falk */ 1689c1e975f0c03997808d35c7be10b244c5309f9fMattias Falk 1789c1e975f0c03997808d35c7be10b244c5309f9fMattias Falk#ifndef _RESOLVER_CONTROLLER_H_ 1889c1e975f0c03997808d35c7be10b244c5309f9fMattias Falk#define _RESOLVER_CONTROLLER_H_ 1989c1e975f0c03997808d35c7be10b244c5309f9fMattias Falk 2089c1e975f0c03997808d35c7be10b244c5309f9fMattias Falk#include <netinet/in.h> 2189c1e975f0c03997808d35c7be10b244c5309f9fMattias Falk#include <linux/in.h> 2289c1e975f0c03997808d35c7be10b244c5309f9fMattias Falk 2389c1e975f0c03997808d35c7be10b244c5309f9fMattias Falkclass ResolverController { 2489c1e975f0c03997808d35c7be10b244c5309f9fMattias Falkpublic: 2589c1e975f0c03997808d35c7be10b244c5309f9fMattias Falk ResolverController() {}; 2689c1e975f0c03997808d35c7be10b244c5309f9fMattias Falk virtual ~ResolverController() {}; 2789c1e975f0c03997808d35c7be10b244c5309f9fMattias Falk 2889c1e975f0c03997808d35c7be10b244c5309f9fMattias Falk int setDefaultInterface(const char* iface); 2989c1e975f0c03997808d35c7be10b244c5309f9fMattias Falk int setInterfaceDnsServers(const char* iface, char** servers, int numservers); 3089c1e975f0c03997808d35c7be10b244c5309f9fMattias Falk int setInterfaceAddress(const char* iface, struct in_addr* addr); 3189c1e975f0c03997808d35c7be10b244c5309f9fMattias Falk int flushDefaultDnsCache(); 3289c1e975f0c03997808d35c7be10b244c5309f9fMattias Falk int flushInterfaceDnsCache(const char* iface); 3389c1e975f0c03997808d35c7be10b244c5309f9fMattias Falk}; 3489c1e975f0c03997808d35c7be10b244c5309f9fMattias Falk 3589c1e975f0c03997808d35c7be10b244c5309f9fMattias Falk#endif /* _RESOLVER_CONTROLLER_H_ */ 36