1 #ifndef __SWITCH_CORE_H
2 #define __SWITCH_CORE_H
4 #include <linux/version.h>
5 #include <linux/list.h>
6 #define SWITCH_MAX_BUFSZ 4096
8 #define SWITCH_MEDIA_AUTO 1
9 #define SWITCH_MEDIA_100 2
10 #define SWITCH_MEDIA_FD 4
12 #ifndef KERNEL_VERSION
13 #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
16 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
20 typedef int (*switch_handler
)(char *buf
, int nr
);
24 switch_handler read
, write
;
29 struct list_head list
;
33 switch_config
*driver_handlers
, *port_handlers
, *vlan_handlers
;
38 extern int switch_register_driver(switch_driver
*driver
);
39 extern void switch_unregister_driver(char *name
);
40 extern int switch_parse_vlan(char *buf
);
41 extern int switch_parse_media(char *buf
);
42 extern int switch_print_media(char *buf
, int media
);
This page took 0.063084 seconds and 5 git commands to generate.