Xenomai  3.0.5
rtcfg_conn_event.h
1 /***
2  *
3  * include/rtcfg/rtcfg_conn_event.h
4  *
5  * Real-Time Configuration Distribution Protocol
6  *
7  * Copyright (C) 2003-2005 Jan Kiszka <jan.kiszka@web.de>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22  *
23  */
24 
25 #ifndef __RTCFG_CONN_EVENT_H_
26 #define __RTCFG_CONN_EVENT_H_
27 
28 #include <linux/netdevice.h>
29 
30 #include <rtcfg_chrdev.h>
31 #include <rtcfg/rtcfg_file.h>
32 #include <rtnet_internal.h>
33 
34 
35 typedef enum {
36  RTCFG_CONN_SEARCHING,
37  RTCFG_CONN_STAGE_1,
38  RTCFG_CONN_STAGE_2,
39  RTCFG_CONN_READY,
40  RTCFG_CONN_DEAD
41 } RTCFG_CONN_STATE;
42 
43 struct rtcfg_connection {
44  struct list_head entry;
45  int ifindex;
46  RTCFG_CONN_STATE state;
47  u8 mac_addr[MAX_ADDR_LEN];
48  unsigned int addr_type;
49  union {
50 #if IS_ENABLED(CONFIG_XENO_DRIVERS_NET_RTIPV4)
51  u32 ip_addr;
52 #endif
53  } addr;
54  void *stage1_data;
55  size_t stage1_size;
56  struct rtcfg_file *stage2_file;
57  u32 cfg_offs;
58  unsigned int flags;
59  unsigned int burstrate;
60  nanosecs_abs_t last_frame;
61  u64 cfg_timeout;
62 #ifdef CONFIG_XENO_OPT_VFILE
63  struct xnvfile_regular proc_entry;
64 #endif
65 };
66 
67 
68 int rtcfg_do_conn_event(struct rtcfg_connection *conn, RTCFG_EVENT event_id,
69  void* event_data);
70 
71 #endif /* __RTCFG_CONN_EVENT_H_ */
uint64_t nanosecs_abs_t
RTDM type for representing absolute dates.
Definition: rtdm.h:43