Blame include/dev-ioctl-lib.h

Packit 8480eb
/* ----------------------------------------------------------------------- *
Packit 8480eb
 *
Packit 8480eb
 *  dev-ioctl-lib.h - autofs device control.
Packit 8480eb
 *
Packit 8480eb
 *   Copyright 2008 Red Hat, Inc. All rights reserved.
Packit 8480eb
 *   Copyright 2008 Ian Kent <raven@themaw.net>
Packit 8480eb
 *
Packit 8480eb
 *   This program is free software; you can redistribute it and/or modify
Packit 8480eb
 *   it under the terms of the GNU General Public License as published by
Packit 8480eb
 *   the Free Software Foundation, Inc., 675 Mass Ave, Cambridge MA 02139,
Packit 8480eb
 *   USA; either version 2 of the License, or (at your option) any later
Packit 8480eb
 *   version.
Packit 8480eb
 *
Packit 8480eb
 *   This program is distributed in the hope that it will be useful,
Packit 8480eb
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 8480eb
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 8480eb
 *   GNU General Public License for more details.
Packit 8480eb
 *
Packit 8480eb
 * ----------------------------------------------------------------------- */
Packit 8480eb
Packit 8480eb
#ifndef AUTOFS_DEV_IOCTL_LIB_H
Packit 8480eb
#define AUTOFS_DEV_IOCTL_LIB_H
Packit 8480eb
Packit 8480eb
#include <linux/auto_dev-ioctl.h>
Packit 8480eb
Packit 8480eb
#define CONTROL_DEVICE  "/dev/autofs"
Packit 8480eb
Packit 8480eb
#define DEV_IOCTL_IS_MOUNTED	0x0001
Packit 8480eb
#define DEV_IOCTL_IS_AUTOFS	0x0002
Packit 8480eb
#define DEV_IOCTL_IS_OTHER	0x0004
Packit 8480eb
Packit 8480eb
struct ioctl_ctl {
Packit 8480eb
	int devfd;
Packit 8480eb
	struct ioctl_ops *ops;
Packit 8480eb
};
Packit 8480eb
Packit 8480eb
struct ioctl_ops {
Packit 8480eb
	int (*version)(unsigned int, int, struct autofs_dev_ioctl *);
Packit 8480eb
	int (*protover)(unsigned int, int, unsigned int *);
Packit 8480eb
	int (*protosubver)(unsigned int, int, unsigned int *);
Packit 8480eb
	int (*mount_device)(unsigned int, const char *, unsigned int, dev_t *);
Packit 8480eb
	int (*open)(unsigned int, int *, dev_t, const char *);
Packit 8480eb
	int (*close)(unsigned int, int);
Packit 8480eb
	int (*send_ready)(unsigned int, int, unsigned int);
Packit 8480eb
	int (*send_fail)(unsigned int, int, unsigned int, int);
Packit 8480eb
	int (*setpipefd)(unsigned int, int, int);
Packit 8480eb
	int (*catatonic)(unsigned int, int);
Packit 8480eb
	int (*timeout)(unsigned int, int, time_t);
Packit 8480eb
	int (*requester)(unsigned int, int, const char *, uid_t *, gid_t *);
Packit 8480eb
	int (*expire)(unsigned int, int, const char *, unsigned int);
Packit 8480eb
	int (*askumount)(unsigned int, int, unsigned int *);
Packit 8480eb
	int (*ismountpoint)(unsigned int, int, const char *, unsigned int *);
Packit 8480eb
};
Packit 8480eb
Packit 8480eb
void init_ioctl_ctl(void);
Packit 8480eb
void close_ioctl_ctl(void);
Packit 8480eb
struct ioctl_ops *get_ioctl_ops(void);
Packit 8480eb
struct autofs_dev_ioctl *alloc_ioctl_ctl_open(const char *, unsigned int);
Packit 8480eb
void free_ioctl_ctl_open(struct autofs_dev_ioctl *);
Packit 8480eb
Packit 8480eb
#endif
Packit 8480eb