Xenomai 3.3.2
Loading...
Searching...
No Matches
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
34typedef enum {
35 RTCFG_CONN_SEARCHING,
36 RTCFG_CONN_STAGE_1,
37 RTCFG_CONN_STAGE_2,
38 RTCFG_CONN_READY,
39 RTCFG_CONN_DEAD
40} RTCFG_CONN_STATE;
41
42struct rtcfg_connection {
43 struct list_head entry;
44 int ifindex;
45 RTCFG_CONN_STATE state;
46 u8 mac_addr[MAX_ADDR_LEN];
47 unsigned int addr_type;
48 union {
49#if IS_ENABLED(CONFIG_XENO_DRIVERS_NET_RTIPV4)
50 u32 ip_addr;
51#endif
52 } addr;
53 void *stage1_data;
54 size_t stage1_size;
55 struct rtcfg_file *stage2_file;
56 u32 cfg_offs;
57 unsigned int flags;
58 unsigned int burstrate;
59 nanosecs_abs_t last_frame;
60 u64 cfg_timeout;
61#ifdef CONFIG_XENO_OPT_VFILE
62 struct xnvfile_regular proc_entry;
63#endif
64};
65
66int rtcfg_do_conn_event(struct rtcfg_connection *conn, RTCFG_EVENT event_id,
67 void *event_data);
68
69#endif /* __RTCFG_CONN_EVENT_H_ */
uint64_t nanosecs_abs_t
RTDM type for representing absolute dates.
Definition rtdm.h:43