fix switch driver makefile
[openwrt.git] / target / linux / package / switch / src / switch-core.h
1 #ifndef __SWITCH_CORE_H
2 #define __SWITCH_CORE_H
3
4 #include <linux/list.h>
5 #define SWITCH_MAX_BUFSZ 4096
6
7 #define SWITCH_MEDIA_AUTO 1
8 #define SWITCH_MEDIA_100 2
9 #define SWITCH_MEDIA_FD 4
10
11 typedef int (*switch_handler)(char *buf, int nr);
12
13 typedef struct {
14 char *name;
15 switch_handler read, write;
16 } switch_config;
17
18
19 typedef struct {
20 struct list_head list;
21 char *name;
22 int ports;
23 int vlans;
24 switch_config *driver_handlers, *port_handlers, *vlan_handlers;
25 void *data;
26 } switch_driver;
27
28
29 extern int switch_register_driver(switch_driver *driver);
30 extern void switch_unregister_driver(char *name);
31 extern int switch_parse_vlan(char *buf);
32 extern int switch_parse_media(char *buf);
33 extern int switch_print_media(char *buf, int media);
34
35 #endif
This page took 0.039482 seconds and 5 git commands to generate.