4
* This provides the ioctl interface for nameserver module
6
* Copyright (C) 2008-2009 Texas Instruments, Inc.
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.
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
18
#ifndef _NAMESERVER_IOCTL_H_
19
#define _NAMESERVER_IOCTL_H_
21
#include <linux/ioctl.h>
22
#include <linux/types.h>
24
#include <ipc_ioctl.h>
25
#include <nameserver.h>
28
NAMESERVER_SETUP = NAMESERVER_BASE_CMD,
30
NAMESERVER_PARAMS_INIT,
39
NAMESERVER_REMOVEENTRY,
41
NAMESERVER_ISREGISTERED,
46
* IOCTL command IDs for nameserver
50
* Command for nameserver_setup
52
#define CMD_NAMESERVER_SETUP _IOWR(IPC_IOC_MAGIC, \
54
struct nameserver_cmd_args)
57
* Command for nameserver_destroy
59
#define CMD_NAMESERVER_DESTROY _IOWR(IPC_IOC_MAGIC, \
61
struct nameserver_cmd_args)
64
* Command for nameserver_params_init
66
#define CMD_NAMESERVER_PARAMS_INIT _IOWR(IPC_IOC_MAGIC, \
67
NAMESERVER_PARAMS_INIT, \
68
struct nameserver_cmd_args)
71
* Command for nameserver_create
73
#define CMD_NAMESERVER_CREATE _IOWR(IPC_IOC_MAGIC, \
75
struct nameserver_cmd_args)
78
* Command for nameserver_delete
80
#define CMD_NAMESERVER_DELETE _IOWR(IPC_IOC_MAGIC, \
82
struct nameserver_cmd_args)
85
* Command for nameserver_add
87
#define CMD_NAMESERVER_ADD _IOWR(IPC_IOC_MAGIC, \
89
struct nameserver_cmd_args)
92
* Command for nameserver_addu32
94
#define CMD_NAMESERVER_ADDUINT32 _IOWR(IPC_IOC_MAGIC, \
95
NAMESERVER_ADDUINT32, \
96
struct nameserver_cmd_args)
98
* Command for nameserver_get
100
#define CMD_NAMESERVER_GET _IOWR(IPC_IOC_MAGIC, \
102
struct nameserver_cmd_args)
105
* Command for nameserver_get_local
107
#define CMD_NAMESERVER_GETLOCAL _IOWR(IPC_IOC_MAGIC, \
108
NAMESERVER_GETLOCAL, \
109
struct nameserver_cmd_args)
112
* Command for nameserver_match
114
#define CMD_NAMESERVER_MATCH _IOWR(IPC_IOC_MAGIC, \
116
struct nameserver_cmd_args)
119
* Command for nameserver_remove
121
#define CMD_NAMESERVER_REMOVE _IOWR(IPC_IOC_MAGIC, \
123
struct nameserver_cmd_args)
126
* Command for nameserver_remove_entry
128
#define CMD_NAMESERVER_REMOVEENTRY _IOWR(IPC_IOC_MAGIC, \
129
NAMESERVER_REMOVEENTRY, \
130
struct nameserver_cmd_args)
133
* Command for nameserver_get_handle
135
#define CMD_NAMESERVER_GETHANDLE _IOWR(IPC_IOC_MAGIC, \
136
NAMESERVER_GETHANDLE, \
137
struct nameserver_cmd_args)
140
* Command for NameServer_isRegistered
142
#define CMD_NAMESERVER_ISREGISTERED _IOWR(IPC_IOC_MAGIC, \
143
NAMESERVER_ISREGISTERED, \
144
struct nameserver_cmd_args)
147
* Command for NameServer_getConfig
149
#define CMD_NAMESERVER_GETCONFIG _IOWR(IPC_IOC_MAGIC, \
150
NAMESERVER_GETCONFIG, \
151
struct nameserver_cmd_args)
154
* Command arguments for nameserver
156
union nameserver_arg {
158
struct nameserver_config *config;
162
struct nameserver_config *config;
166
struct nameserver_params *params;
173
struct nameserver_params *params;
248
* Command arguments for nameserver
250
struct nameserver_cmd_args {
251
union nameserver_arg args;
256
* This ioctl interface for nameserver module
258
int nameserver_ioctl(struct inode *inode, struct file *filp,
259
unsigned int cmd, unsigned long args, bool user);
261
#endif /* _NAMESERVER_IOCTL_H_ */