Remove obsolete file.
[connman] / include / rtnl.h
1 /*
2  *
3  *  Connection Manager
4  *
5  *  Copyright (C) 2007-2009  Intel Corporation. All rights reserved.
6  *
7  *  This program is free software; you can redistribute it and/or modify
8  *  it under the terms of the GNU General Public License version 2 as
9  *  published by the Free Software Foundation.
10  *
11  *  This program is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *  GNU General Public License for more details.
15  *
16  *  You should have received a copy of the GNU General Public License
17  *  along with this program; if not, write to the Free Software
18  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19  *
20  */
21
22 #ifndef __CONNMAN_RTNL_H
23 #define __CONNMAN_RTNL_H
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29 /**
30  * SECTION:rtnl
31  * @title: RTNL premitives
32  * @short_description: Functions for registering RTNL modules
33  */
34
35 typedef void (* connman_rtnl_link_cb_t) (unsigned flags, unsigned change,
36                                                         void *user_data);
37
38 extern unsigned int connman_rtnl_add_newlink_watch(int index,
39                         connman_rtnl_link_cb_t callback, void *user_data);
40 extern void connman_rtnl_remove_watch(unsigned int id);
41
42 #define CONNMAN_RTNL_PRIORITY_LOW      -100
43 #define CONNMAN_RTNL_PRIORITY_DEFAULT     0
44 #define CONNMAN_RTNL_PRIORITY_HIGH      100
45
46 struct connman_rtnl {
47         const char *name;
48         int priority;
49         void (*newlink) (unsigned short type, int index,
50                                         unsigned flags, unsigned change);
51         void (*dellink) (unsigned short type, int index,
52                                         unsigned flags, unsigned change);
53         void (*newgateway) (int index, const char *gateway);
54         void (*delgateway) (int index, const char *gateway);
55 };
56
57 extern int connman_rtnl_register(struct connman_rtnl *rtnl);
58 extern void connman_rtnl_unregister(struct connman_rtnl *rtnl);
59
60 extern int connman_rtnl_send_getlink(void);
61 extern int connman_rtnl_send_getroute(void);
62
63 #ifdef __cplusplus
64 }
65 #endif
66
67 #endif /* __CONNMAN_RTNL_H */