netif_utils: correctly close fd on read error
[project/ustp.git] / driver.h
1 /*
2 * driver.h Driver-specific code.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 *
9 * Authors: Vitalii Demianets <dvitasgs@gmail.com>
10 */
11
12 #ifndef _MSTP_DRIVER_H
13 #define _MSTP_DRIVER_H
14
15 #include "mstp.h"
16
17 static inline int
18 driver_set_new_state(per_tree_port_t *ptp, int new_state)
19 {
20 return new_state;
21 }
22
23 static inline void
24 driver_flush_all_fids(per_tree_port_t *ptp)
25 {
26 MSTP_IN_all_fids_flushed(ptp);
27 }
28
29 static inline unsigned int
30 driver_set_ageing_time(port_t *prt, unsigned int ageingTime)
31 {
32 return ageingTime;
33 }
34
35 static inline bool
36 driver_create_msti(bridge_t *br, __u16 mstid)
37 {
38 return true;
39 }
40
41 static inline bool
42 driver_delete_msti(bridge_t *br, __u16 mstid)
43 {
44 return true;
45 }
46
47 static inline bool
48 driver_create_bridge(bridge_t *br, __u8 *macaddr)
49 {
50 return true;
51 }
52
53 static inline bool
54 driver_create_port(port_t *prt, __u16 portno)
55 {
56 return true;
57 }
58
59 static inline void driver_delete_bridge(bridge_t *br)
60 {
61 }
62
63 static inline void driver_delete_port(port_t *prt)
64 {
65 }
66
67 #endif /* _MSTP_DRIVER_H */