5 # Needed for ifreq/ifmediareq
6 #include <sys/socket.h>
9 #include <dev/etherswitch/etherswitch.h>
11 INTERFACE etherswitch;
14 # Default implementation
18 null_etherswitch_lock(device_t dev)
23 null_etherswitch_unlock(device_t dev)
28 null_etherswitch_getconf(device_t dev, etherswitch_conf_t *conf)
34 null_etherswitch_setconf(device_t dev, etherswitch_conf_t *conf)
40 null_etherswitch_flush_all(device_t dev)
47 null_etherswitch_flush_port(device_t dev, int port)
54 null_etherswitch_flush_mac(device_t dev,
55 etherswitch_atu_flush_macentry_t *e)
62 null_etherswitch_fetch_table(device_t dev,
63 etherswitch_atu_table_t *table)
71 null_etherswitch_fetch_entry(device_t dev,
72 etherswitch_atu_entry_t *e)
82 METHOD etherswitch_info_t* getinfo {
87 # Lock access to switch registers
91 } DEFAULT null_etherswitch_lock;
94 # Unlock access to switch registers
98 } DEFAULT null_etherswitch_unlock;
101 # Read switch register
109 # Write switch register
111 METHOD int writereg {
120 METHOD int readphyreg {
129 METHOD int writephyreg {
137 # Get port configuration
141 etherswitch_port_t *vg;
145 # Set port configuration
149 etherswitch_port_t *vg;
153 # Get VLAN group configuration
155 METHOD int getvgroup {
157 etherswitch_vlangroup_t *vg;
161 # Set VLAN group configuration
163 METHOD int setvgroup {
165 etherswitch_vlangroup_t *vg;
169 # Get the Switch configuration
173 etherswitch_conf_t *conf;
174 } DEFAULT null_etherswitch_getconf;
177 # Set the Switch configuration
181 etherswitch_conf_t *conf;
182 } DEFAULT null_etherswitch_setconf;
185 # Flush all of the programmed/learnt MAC addresses
187 METHOD int flush_all {
189 } DEFAULT null_etherswitch_flush_all;
192 # Flush a single MAC address entry
194 METHOD int flush_mac {
196 etherswitch_atu_flush_macentry_t *entry;
197 } DEFAULT null_etherswitch_flush_mac;
200 # Flush all of the dynamic MAC addresses on a given port
202 METHOD int flush_port {
205 } DEFAULT null_etherswitch_flush_port;
208 # Fetch the address table from the ethernet switch.
210 METHOD int fetch_table {
212 etherswitch_atu_table_t *table;
213 } DEFAULT null_etherswitch_fetch_table;
216 # Fetch a single entry from the ethernet switch table.
218 METHOD int fetch_table_entry {
220 etherswitch_atu_entry_t *entry;
221 } DEFAULT null_etherswitch_fetch_entry;