vswitch: Don't pass null pointer to stat().
[sliver-openvswitch.git] / secchan / discovery.h
1 /*
2  * Copyright (c) 2008, 2009 Nicira Networks.
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 DISCOVERY_H
18 #define DISCOVERY_H 1
19
20 #include <stdbool.h>
21
22 struct dpif;
23 struct discovery;
24 struct settings;
25 struct switch_status;
26
27 int discovery_create(const char *accept_controller_re, bool update_resolv_conf,
28                      struct dpif *, struct switch_status *,
29                      struct discovery **);
30 void discovery_destroy(struct discovery *);
31 void discovery_set_update_resolv_conf(struct discovery *,
32                                       bool update_resolv_conf);
33 int discovery_set_accept_controller_re(struct discovery *, const char *re);
34 void discovery_question_connectivity(struct discovery *);
35 bool discovery_run(struct discovery *, char **controller_name);
36 void discovery_wait(struct discovery *);
37
38 #endif /* discovery.h */