~ubuntu-branches/ubuntu/oneiric/linux-ti-omap4/oneiric

« back to all changes in this revision

Viewing changes to arch/arm/plat-omap/include/syslink/nameserver_ioctl.h

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati, Paolo Pisati
  • Date: 2011-08-16 17:55:44 UTC
  • Revision ID: james.westby@ubuntu.com-20110816175544-ieu39dvqbiyufiwb
Tags: 3.0.0-1202.6
[ Paolo Pisati ]

* [Config] Sync config
* TI BSP update: kernel-tilt/tilt-3.0 @ f95dded2534d1d5a40fa4cb833699953d5f3e4de

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
*  nameserver_ioctl.h
 
3
*
 
4
*  This provides the ioctl interface for nameserver module
 
5
*
 
6
*  Copyright (C) 2008-2009 Texas Instruments, Inc.
 
7
*
 
8
*  This package is free software; you can redistribute it and/or modify
 
9
*  it under the terms of the GNU General Public License version 2 as
 
10
*  published by the Free Software Foundation.
 
11
*
 
12
*  THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
 
13
*  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
 
14
*  WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
 
15
*  PURPOSE.
 
16
*/
 
17
 
 
18
#ifndef _NAMESERVER_IOCTL_H_
 
19
#define _NAMESERVER_IOCTL_H_
 
20
 
 
21
#include <linux/ioctl.h>
 
22
#include <linux/types.h>
 
23
 
 
24
#include <ipc_ioctl.h>
 
25
#include <nameserver.h>
 
26
 
 
27
enum CMD_NAMESERVER {
 
28
        NAMESERVER_SETUP = NAMESERVER_BASE_CMD,
 
29
        NAMESERVER_DESTROY,
 
30
        NAMESERVER_PARAMS_INIT,
 
31
        NAMESERVER_CREATE,
 
32
        NAMESERVER_DELETE,
 
33
        NAMESERVER_ADD,
 
34
        NAMESERVER_ADDUINT32,
 
35
        NAMESERVER_GET,
 
36
        NAMESERVER_GETLOCAL,
 
37
        NAMESERVER_MATCH,
 
38
        NAMESERVER_REMOVE,
 
39
        NAMESERVER_REMOVEENTRY,
 
40
        NAMESERVER_GETHANDLE,
 
41
        NAMESERVER_ISREGISTERED,
 
42
        NAMESERVER_GETCONFIG
 
43
};
 
44
 
 
45
/*
 
46
 *  IOCTL command IDs for nameserver
 
47
 *
 
48
 */
 
49
/*
 
50
 *  Command for nameserver_setup
 
51
 */
 
52
#define CMD_NAMESERVER_SETUP            _IOWR(IPC_IOC_MAGIC,            \
 
53
                                        NAMESERVER_SETUP,               \
 
54
                                        struct nameserver_cmd_args)
 
55
 
 
56
/*
 
57
 *  Command for nameserver_destroy
 
58
 */
 
59
#define CMD_NAMESERVER_DESTROY          _IOWR(IPC_IOC_MAGIC,            \
 
60
                                        NAMESERVER_DESTROY,             \
 
61
                                        struct nameserver_cmd_args)
 
62
 
 
63
/*
 
64
 *  Command for nameserver_params_init
 
65
 */
 
66
#define CMD_NAMESERVER_PARAMS_INIT      _IOWR(IPC_IOC_MAGIC,            \
 
67
                                        NAMESERVER_PARAMS_INIT,         \
 
68
                                        struct nameserver_cmd_args)
 
69
 
 
70
/*
 
71
 *  Command for nameserver_create
 
72
 */
 
73
#define CMD_NAMESERVER_CREATE           _IOWR(IPC_IOC_MAGIC,            \
 
74
                                        NAMESERVER_CREATE,              \
 
75
                                        struct nameserver_cmd_args)
 
76
 
 
77
/*
 
78
 *  Command for nameserver_delete
 
79
 */
 
80
#define CMD_NAMESERVER_DELETE           _IOWR(IPC_IOC_MAGIC,            \
 
81
                                        NAMESERVER_DELETE,              \
 
82
                                        struct nameserver_cmd_args)
 
83
 
 
84
/*
 
85
 *  Command for nameserver_add
 
86
 */
 
87
#define CMD_NAMESERVER_ADD              _IOWR(IPC_IOC_MAGIC,            \
 
88
                                        NAMESERVER_ADD,                 \
 
89
                                        struct nameserver_cmd_args)
 
90
 
 
91
/*
 
92
 *  Command for nameserver_addu32
 
93
 */
 
94
#define CMD_NAMESERVER_ADDUINT32        _IOWR(IPC_IOC_MAGIC,            \
 
95
                                        NAMESERVER_ADDUINT32,           \
 
96
                                        struct nameserver_cmd_args)
 
97
/*
 
98
 *  Command for nameserver_get
 
99
 */
 
100
#define CMD_NAMESERVER_GET              _IOWR(IPC_IOC_MAGIC,            \
 
101
                                        NAMESERVER_GET,                 \
 
102
                                        struct nameserver_cmd_args)
 
103
 
 
104
/*
 
105
 *  Command for nameserver_get_local
 
106
 */
 
107
#define CMD_NAMESERVER_GETLOCAL         _IOWR(IPC_IOC_MAGIC,            \
 
108
                                        NAMESERVER_GETLOCAL,            \
 
109
                                        struct nameserver_cmd_args)
 
110
 
 
111
/*
 
112
 *  Command for nameserver_match
 
113
 */
 
114
#define CMD_NAMESERVER_MATCH            _IOWR(IPC_IOC_MAGIC,            \
 
115
                                        NAMESERVER_MATCH,               \
 
116
                                        struct nameserver_cmd_args)
 
117
 
 
118
/*
 
119
 *  Command for nameserver_remove
 
120
 */
 
121
#define CMD_NAMESERVER_REMOVE           _IOWR(IPC_IOC_MAGIC,            \
 
122
                                        NAMESERVER_REMOVE,              \
 
123
                                        struct nameserver_cmd_args)
 
124
 
 
125
/*
 
126
 *  Command for nameserver_remove_entry
 
127
 */
 
128
#define CMD_NAMESERVER_REMOVEENTRY      _IOWR(IPC_IOC_MAGIC,            \
 
129
                                        NAMESERVER_REMOVEENTRY,         \
 
130
                                        struct nameserver_cmd_args)
 
131
 
 
132
/*
 
133
 *  Command for nameserver_get_handle
 
134
 */
 
135
#define CMD_NAMESERVER_GETHANDLE        _IOWR(IPC_IOC_MAGIC,            \
 
136
                                        NAMESERVER_GETHANDLE,           \
 
137
                                        struct nameserver_cmd_args)
 
138
 
 
139
/*
 
140
 *  Command for NameServer_isRegistered
 
141
 */
 
142
#define CMD_NAMESERVER_ISREGISTERED     _IOWR(IPC_IOC_MAGIC,            \
 
143
                                        NAMESERVER_ISREGISTERED,        \
 
144
                                        struct nameserver_cmd_args)
 
145
 
 
146
/*
 
147
 *  Command for NameServer_getConfig
 
148
 */
 
149
#define CMD_NAMESERVER_GETCONFIG        _IOWR(IPC_IOC_MAGIC,            \
 
150
                                        NAMESERVER_GETCONFIG,           \
 
151
                                        struct nameserver_cmd_args)
 
152
 
 
153
/*
 
154
 *  Command arguments for nameserver
 
155
 */
 
156
union nameserver_arg {
 
157
        struct {
 
158
                struct nameserver_config *config;
 
159
        } get_config;
 
160
 
 
161
        struct {
 
162
                struct nameserver_config *config;
 
163
        } setup;
 
164
 
 
165
        struct {
 
166
                struct nameserver_params *params;
 
167
        } params_init;
 
168
 
 
169
        struct {
 
170
                void *handle;
 
171
                char *name;
 
172
                u32 name_len;
 
173
                struct nameserver_params *params;
 
174
        } create;
 
175
 
 
176
        struct {
 
177
                void *handle;
 
178
        } delete_instance;
 
179
 
 
180
        struct {
 
181
                void *handle;
 
182
                char *name;
 
183
                u32 name_len;
 
184
                void *buf;
 
185
                s32 len;
 
186
                void *entry;
 
187
                void *node;
 
188
        } add;
 
189
 
 
190
        struct {
 
191
                void *handle;
 
192
                char *name;
 
193
                u32 name_len;
 
194
                u32 value;
 
195
                void *entry;
 
196
        } addu32;
 
197
 
 
198
        struct {
 
199
                void *handle;
 
200
                char *name;
 
201
                u32 name_len;
 
202
                void *value;
 
203
                u32 len;
 
204
                u16 *proc_id;
 
205
                u32 proc_len;
 
206
        } get;
 
207
 
 
208
        struct {
 
209
                void *handle;
 
210
                char *name;
 
211
                u32 name_len;
 
212
                void *value;
 
213
                u32 len;
 
214
        } get_local;
 
215
 
 
216
        struct {
 
217
                void *handle;
 
218
                char *name;
 
219
                u32 name_len;
 
220
                u32 value;
 
221
                u32 count;
 
222
        } match;
 
223
 
 
224
        struct {
 
225
                void *handle;
 
226
                char *name;
 
227
                u32 name_len;
 
228
        } remove;
 
229
 
 
230
        struct {
 
231
                void *handle;
 
232
                void *entry;
 
233
        } remove_entry;
 
234
 
 
235
        struct {
 
236
                void *handle;
 
237
                char *name;
 
238
                u32 name_len;
 
239
        } get_handle;
 
240
 
 
241
        struct {
 
242
                u16 proc_id;
 
243
                bool check;
 
244
        } is_registered;
 
245
};
 
246
 
 
247
/*
 
248
 *  Command arguments for nameserver
 
249
 */
 
250
struct nameserver_cmd_args {
 
251
        union nameserver_arg args;
 
252
        s32 api_status;
 
253
};
 
254
 
 
255
/*
 
256
 *  This ioctl interface for nameserver module
 
257
 */
 
258
int nameserver_ioctl(struct inode *inode, struct file *filp,
 
259
                        unsigned int cmd, unsigned long args, bool user);
 
260
 
 
261
#endif  /* _NAMESERVER_IOCTL_H_ */