Linux Kernel
3.7.1
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
include
uapi
linux
wimax.h
Go to the documentation of this file.
1
/*
2
* Linux WiMax
3
* API for user space
4
*
5
*
6
* Copyright (C) 2007-2008 Intel Corporation. All rights reserved.
7
*
8
* Redistribution and use in source and binary forms, with or without
9
* modification, are permitted provided that the following conditions
10
* are met:
11
*
12
* * Redistributions of source code must retain the above copyright
13
* notice, this list of conditions and the following disclaimer.
14
* * Redistributions in binary form must reproduce the above copyright
15
* notice, this list of conditions and the following disclaimer in
16
* the documentation and/or other materials provided with the
17
* distribution.
18
* * Neither the name of Intel Corporation nor the names of its
19
* contributors may be used to endorse or promote products derived
20
* from this software without specific prior written permission.
21
*
22
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33
*
34
*
35
* Intel Corporation <
[email protected]
>
36
* Inaky Perez-Gonzalez <
[email protected]
>
37
* - Initial implementation
38
*
39
*
40
* This file declares the user/kernel protocol that is spoken over
41
* Generic Netlink, as well as any type declaration that is to be used
42
* by kernel and user space.
43
*
44
* It is intended for user space to clone it verbatim to use it as a
45
* primary reference for definitions.
46
*
47
* Stuff intended for kernel usage as well as full protocol and stack
48
* documentation is rooted in include/net/wimax.h.
49
*/
50
51
#ifndef __LINUX__WIMAX_H__
52
#define __LINUX__WIMAX_H__
53
54
#include <linux/types.h>
55
56
enum
{
62
WIMAX_GNL_VERSION
= 01,
63
/* Generic NetLink attributes */
64
WIMAX_GNL_ATTR_INVALID
= 0x00,
65
WIMAX_GNL_ATTR_MAX
= 10,
66
};
67
68
69
/*
70
* Generic NetLink operations
71
*
72
* Most of these map to an API call; _OP_ stands for operation, _RP_
73
* for reply and _RE_ for report (aka: signal).
74
*/
75
enum
{
76
WIMAX_GNL_OP_MSG_FROM_USER
,
/* User to kernel message */
77
WIMAX_GNL_OP_MSG_TO_USER
,
/* Kernel to user message */
78
WIMAX_GNL_OP_RFKILL
,
/* Run wimax_rfkill() */
79
WIMAX_GNL_OP_RESET
,
/* Run wimax_rfkill() */
80
WIMAX_GNL_RE_STATE_CHANGE
,
/* Report: status change */
81
WIMAX_GNL_OP_STATE_GET
,
/* Request for current state */
82
};
83
84
85
/* Message from user / to user */
86
enum
{
87
WIMAX_GNL_MSG_IFIDX
= 1,
88
WIMAX_GNL_MSG_PIPE_NAME
,
89
WIMAX_GNL_MSG_DATA
,
90
};
91
92
93
/*
94
* wimax_rfkill()
95
*
96
* The state of the radio (ON/OFF) is mapped to the rfkill subsystem's
97
* switch state (DISABLED/ENABLED).
98
*/
99
enum
wimax_rf_state
{
100
WIMAX_RF_OFF
= 0,
/* Radio is off, rfkill on/enabled */
101
WIMAX_RF_ON
= 1,
/* Radio is on, rfkill off/disabled */
102
WIMAX_RF_QUERY
= 2,
103
};
104
105
/* Attributes */
106
enum
{
107
WIMAX_GNL_RFKILL_IFIDX
= 1,
108
WIMAX_GNL_RFKILL_STATE
,
109
};
110
111
112
/* Attributes for wimax_reset() */
113
enum
{
114
WIMAX_GNL_RESET_IFIDX
= 1,
115
};
116
117
/* Attributes for wimax_state_get() */
118
enum
{
119
WIMAX_GNL_STGET_IFIDX
= 1,
120
};
121
122
/*
123
* Attributes for the Report State Change
124
*
125
* For now we just have the old and new states; new attributes might
126
* be added later on.
127
*/
128
enum
{
129
WIMAX_GNL_STCH_IFIDX
= 1,
130
WIMAX_GNL_STCH_STATE_OLD
,
131
WIMAX_GNL_STCH_STATE_NEW
,
132
};
133
134
207
/*
208
* The allowed state transitions are described in the table below
209
* (states in rows can go to states in columns where there is an X):
210
*
211
* UNINI RADIO READY SCAN CONNEC CONNEC
212
* NULL DOWN QUIESCING TIALIZED OFF NING TING TED
213
* NULL - x
214
* DOWN - x x x
215
* QUIESCING x -
216
* UNINITIALIZED x - x
217
* RADIO_OFF x - x
218
* READY x x - x x x
219
* SCANNING x x x - x x
220
* CONNECTING x x x x - x
221
* CONNECTED x x x -
222
*
223
* This table not available in kernel-doc because the formatting messes it up.
224
*/
225
enum
wimax_st
{
226
__WIMAX_ST_NULL
= 0,
227
WIMAX_ST_DOWN
,
228
__WIMAX_ST_QUIESCING
,
229
WIMAX_ST_UNINITIALIZED
,
230
WIMAX_ST_RADIO_OFF
,
231
WIMAX_ST_READY
,
232
WIMAX_ST_SCANNING
,
233
WIMAX_ST_CONNECTING
,
234
WIMAX_ST_CONNECTED
,
235
__WIMAX_ST_INVALID
/* Always keep last */
236
};
237
238
239
#endif
/* #ifndef __LINUX__WIMAX_H__ */
Generated on Thu Jan 10 2013 14:53:18 for Linux Kernel by
1.8.2