1 #ifndef __SWITCH_CORE_H
2 #define __SWITCH_CORE_H
4 #include <linux/list.h>
5 #define SWITCH_MAX_BUFSZ 4096
7 #define SWITCH_MEDIA_AUTO 1
8 #define SWITCH_MEDIA_100 2
9 #define SWITCH_MEDIA_FD 4
11 typedef int (*switch_handler)(char *buf, int nr);
15 switch_handler read, write;
20 struct list_head list;
24 switch_config *driver_handlers, *port_handlers, *vlan_handlers;
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);