25 #ifndef __RTCFG_EVENT_H_
26 #define __RTCFG_EVENT_H_
28 #include <linux/if_ether.h>
29 #include <linux/netdevice.h>
31 #include <rtcfg_chrdev.h>
33 #include <rtnet_internal.h>
34 #include <rtnet_rtpc.h>
37 #define FLAG_TIMER_STARTED 0x00010000
38 #define FLAG_TIMER_SHUTDOWN 0x00020000
43 RTCFG_MAIN_SERVER_RUNNING,
46 RTCFG_MAIN_CLIENT_ANNOUNCED,
47 RTCFG_MAIN_CLIENT_ALL_KNOWN,
48 RTCFG_MAIN_CLIENT_ALL_FRAMES,
50 RTCFG_MAIN_CLIENT_READY
53 struct rtcfg_station {
54 u8 mac_addr[ETH_ALEN];
59 RTCFG_MAIN_STATE state;
63 rtdm_mutex_t dev_mutex;
64 struct list_head event_calls;
66 rtdm_task_t timer_task;
68 unsigned int burstrate;
69 #ifdef CONFIG_XENO_OPT_VFILE
70 struct xnvfile_directory proc_entry;
71 struct xnvfile_regular proc_state_vfile;
72 struct xnvfile_regular proc_stations_vfile;
77 unsigned int addr_type;
79 #if IS_ENABLED(CONFIG_XENO_DRIVERS_NET_RTIPV4)
83 u8 srv_mac_addr[MAX_ADDR_LEN];
87 unsigned int packet_counter;
89 struct rtskb *stage2_chain;
91 struct rtcfg_station *station_addr_list;
95 u32 clients_configured;
96 struct list_head conn_list;
98 u64 heartbeat_timeout;
104 extern struct rtcfg_device device[MAX_RT_DEVICES];
105 extern const char *rtcfg_event[];
106 extern const char *rtcfg_main_state[];
109 int rtcfg_do_main_event(
int ifindex, RTCFG_EVENT event_id,
void* event_data);
110 void rtcfg_next_main_state(
int ifindex, RTCFG_MAIN_STATE state);
112 void rtcfg_queue_blocking_call(
int ifindex,
struct rt_proc_call *call);
113 struct rt_proc_call *rtcfg_dequeue_blocking_call(
int ifindex);
114 void rtcfg_complete_cmd(
int ifindex, RTCFG_EVENT event_id,
int result);
115 void rtcfg_reset_device(
int ifindex);
117 void rtcfg_init_state_machines(
void);
118 void rtcfg_cleanup_state_machines(
void);
ipipe_spinlock_t rtdm_lock_t
Lock variable.
Definition: driver.h:528