#ifndef	_device_user_
#define	_device_user_

/* Module device */

#include <mach/kern_return.h>
#include <mach/port.h>
#include <mach/message.h>

#include <mach/std_types.h>
#include <mach/mach_types.h>
#include <device/device_types.h>
#include <device/net_status.h>

/* Routine device_open */
#define MIG_RPC_HAVE___DEVICE_OPEN
#define MIG_RPC_REQUEST_ID___DEVICE_OPEN 2800
#define MIG_RPC_REPLY_ID___DEVICE_OPEN 2900
#ifdef	mig_external
mig_external
#else
extern
#endif
kern_return_t __device_open
(
	mach_port_t master_port,
	dev_mode_t mode,
	const_dev_name_t name,
	mach_port_t *device
);

/* Routine device_close */
#define MIG_RPC_HAVE___DEVICE_CLOSE
#define MIG_RPC_REQUEST_ID___DEVICE_CLOSE 2801
#define MIG_RPC_REPLY_ID___DEVICE_CLOSE 2901
#ifdef	mig_external
mig_external
#else
extern
#endif
kern_return_t __device_close
(
	mach_port_t device
);

/* Routine device_write */
#define MIG_RPC_HAVE___DEVICE_WRITE
#define MIG_RPC_REQUEST_ID___DEVICE_WRITE 2802
#define MIG_RPC_REPLY_ID___DEVICE_WRITE 2902
#ifdef	mig_external
mig_external
#else
extern
#endif
kern_return_t __device_write
(
	mach_port_t device,
	dev_mode_t mode,
	recnum_t recnum,
	io_buf_ptr_t data,
	mach_msg_type_number_t dataCnt,
	int *bytes_written
);

/* Routine device_write_inband */
#define MIG_RPC_HAVE___DEVICE_WRITE_INBAND
#define MIG_RPC_REQUEST_ID___DEVICE_WRITE_INBAND 2803
#define MIG_RPC_REPLY_ID___DEVICE_WRITE_INBAND 2903
#ifdef	mig_external
mig_external
#else
extern
#endif
kern_return_t __device_write_inband
(
	mach_port_t device,
	dev_mode_t mode,
	recnum_t recnum,
	const_io_buf_ptr_inband_t data,
	mach_msg_type_number_t dataCnt,
	int *bytes_written
);

/* Routine device_read */
#define MIG_RPC_HAVE___DEVICE_READ
#define MIG_RPC_REQUEST_ID___DEVICE_READ 2804
#define MIG_RPC_REPLY_ID___DEVICE_READ 2904
#ifdef	mig_external
mig_external
#else
extern
#endif
kern_return_t __device_read
(
	mach_port_t device,
	dev_mode_t mode,
	recnum_t recnum,
	int bytes_wanted,
	io_buf_ptr_t *data,
	mach_msg_type_number_t *dataCnt
);

/* Routine device_read_inband */
#define MIG_RPC_HAVE___DEVICE_READ_INBAND
#define MIG_RPC_REQUEST_ID___DEVICE_READ_INBAND 2805
#define MIG_RPC_REPLY_ID___DEVICE_READ_INBAND 2905
#ifdef	mig_external
mig_external
#else
extern
#endif
kern_return_t __device_read_inband
(
	mach_port_t device,
	dev_mode_t mode,
	recnum_t recnum,
	int bytes_wanted,
	char *data /* max of 128 elements */,
	mach_msg_type_number_t *dataCnt
);

/* Routine device_open_new */
#define MIG_RPC_HAVE___DEVICE_OPEN_NEW
#define MIG_RPC_REQUEST_ID___DEVICE_OPEN_NEW 2806
#define MIG_RPC_REPLY_ID___DEVICE_OPEN_NEW 2906
#ifdef	mig_external
mig_external
#else
extern
#endif
kern_return_t __device_open_new
(
	mach_port_t master_port,
	dev_mode_t mode,
	const_dev_name_t name,
	mach_port_t *device
);

/* Routine device_map */
#define MIG_RPC_HAVE___DEVICE_MAP
#define MIG_RPC_REQUEST_ID___DEVICE_MAP 2809
#define MIG_RPC_REPLY_ID___DEVICE_MAP 2909
#ifdef	mig_external
mig_external
#else
extern
#endif
kern_return_t __device_map
(
	mach_port_t device,
	vm_prot_t prot,
	vm_offset_t offset,
	vm_size_t size,
	mach_port_t *pager,
	int unmap
);

/* Routine device_set_status */
#define MIG_RPC_HAVE___DEVICE_SET_STATUS
#define MIG_RPC_REQUEST_ID___DEVICE_SET_STATUS 2810
#define MIG_RPC_REPLY_ID___DEVICE_SET_STATUS 2910
#ifdef	mig_external
mig_external
#else
extern
#endif
kern_return_t __device_set_status
(
	mach_port_t device,
	dev_flavor_t flavor,
	const dev_status_t status,
	mach_msg_type_number_t statusCnt
);

/* Routine device_get_status */
#define MIG_RPC_HAVE___DEVICE_GET_STATUS
#define MIG_RPC_REQUEST_ID___DEVICE_GET_STATUS 2811
#define MIG_RPC_REPLY_ID___DEVICE_GET_STATUS 2911
#ifdef	mig_external
mig_external
#else
extern
#endif
kern_return_t __device_get_status
(
	mach_port_t device,
	dev_flavor_t flavor,
	dev_status_t status,
	mach_msg_type_number_t *statusCnt
);

/* Routine device_set_filter */
#define MIG_RPC_HAVE___DEVICE_SET_FILTER
#define MIG_RPC_REQUEST_ID___DEVICE_SET_FILTER 2812
#define MIG_RPC_REPLY_ID___DEVICE_SET_FILTER 2912
#ifdef	mig_external
mig_external
#else
extern
#endif
kern_return_t __device_set_filter
(
	mach_port_t device,
	mach_port_t receive_port,
	mach_msg_type_name_t receive_portPoly,
	int priority,
	const filter_array_t filter,
	mach_msg_type_number_t filterCnt
);

/* Routine device_intr_register */
#define MIG_RPC_HAVE___DEVICE_INTR_REGISTER
#define MIG_RPC_REQUEST_ID___DEVICE_INTR_REGISTER 2813
#define MIG_RPC_REPLY_ID___DEVICE_INTR_REGISTER 2913
#ifdef	mig_external
mig_external
#else
extern
#endif
kern_return_t __device_intr_register
(
	mach_port_t device,
	int id,
	int flags,
	mach_port_t receive_port,
	mach_msg_type_name_t receive_portPoly
);

/* Routine device_intr_ack */
#define MIG_RPC_HAVE___DEVICE_INTR_ACK
#define MIG_RPC_REQUEST_ID___DEVICE_INTR_ACK 2814
#define MIG_RPC_REPLY_ID___DEVICE_INTR_ACK 2914
#ifdef	mig_external
mig_external
#else
extern
#endif
kern_return_t __device_intr_ack
(
	mach_port_t device,
	mach_port_t receive_port,
	mach_msg_type_name_t receive_portPoly
);


/* Module device */

#include <mach/kern_return.h>
#include <mach/port.h>
#include <mach/message.h>

#include <mach/std_types.h>
#include <mach/mach_types.h>
#include <device/device_types.h>
#include <device/net_status.h>

/* Routine device_open */
#define MIG_RPC_HAVE_DEVICE_OPEN
#define MIG_RPC_REQUEST_ID_DEVICE_OPEN 2800
#define MIG_RPC_REPLY_ID_DEVICE_OPEN 2900
#ifdef	mig_external
mig_external
#else
extern
#endif
kern_return_t device_open
(
	mach_port_t master_port,
	dev_mode_t mode,
	const_dev_name_t name,
	mach_port_t *device
);

/* Routine device_close */
#define MIG_RPC_HAVE_DEVICE_CLOSE
#define MIG_RPC_REQUEST_ID_DEVICE_CLOSE 2801
#define MIG_RPC_REPLY_ID_DEVICE_CLOSE 2901
#ifdef	mig_external
mig_external
#else
extern
#endif
kern_return_t device_close
(
	mach_port_t device
);

/* Routine device_write */
#define MIG_RPC_HAVE_DEVICE_WRITE
#define MIG_RPC_REQUEST_ID_DEVICE_WRITE 2802
#define MIG_RPC_REPLY_ID_DEVICE_WRITE 2902
#ifdef	mig_external
mig_external
#else
extern
#endif
kern_return_t device_write
(
	mach_port_t device,
	dev_mode_t mode,
	recnum_t recnum,
	io_buf_ptr_t data,
	mach_msg_type_number_t dataCnt,
	int *bytes_written
);

/* Routine device_write_inband */
#define MIG_RPC_HAVE_DEVICE_WRITE_INBAND
#define MIG_RPC_REQUEST_ID_DEVICE_WRITE_INBAND 2803
#define MIG_RPC_REPLY_ID_DEVICE_WRITE_INBAND 2903
#ifdef	mig_external
mig_external
#else
extern
#endif
kern_return_t device_write_inband
(
	mach_port_t device,
	dev_mode_t mode,
	recnum_t recnum,
	const_io_buf_ptr_inband_t data,
	mach_msg_type_number_t dataCnt,
	int *bytes_written
);

/* Routine device_read */
#define MIG_RPC_HAVE_DEVICE_READ
#define MIG_RPC_REQUEST_ID_DEVICE_READ 2804
#define MIG_RPC_REPLY_ID_DEVICE_READ 2904
#ifdef	mig_external
mig_external
#else
extern
#endif
kern_return_t device_read
(
	mach_port_t device,
	dev_mode_t mode,
	recnum_t recnum,
	int bytes_wanted,
	io_buf_ptr_t *data,
	mach_msg_type_number_t *dataCnt
);

/* Routine device_read_inband */
#define MIG_RPC_HAVE_DEVICE_READ_INBAND
#define MIG_RPC_REQUEST_ID_DEVICE_READ_INBAND 2805
#define MIG_RPC_REPLY_ID_DEVICE_READ_INBAND 2905
#ifdef	mig_external
mig_external
#else
extern
#endif
kern_return_t device_read_inband
(
	mach_port_t device,
	dev_mode_t mode,
	recnum_t recnum,
	int bytes_wanted,
	char *data /* max of 128 elements */,
	mach_msg_type_number_t *dataCnt
);

/* Routine device_open_new */
#define MIG_RPC_HAVE_DEVICE_OPEN_NEW
#define MIG_RPC_REQUEST_ID_DEVICE_OPEN_NEW 2806
#define MIG_RPC_REPLY_ID_DEVICE_OPEN_NEW 2906
#ifdef	mig_external
mig_external
#else
extern
#endif
kern_return_t device_open_new
(
	mach_port_t master_port,
	dev_mode_t mode,
	const_dev_name_t name,
	mach_port_t *device
);

/* Routine device_map */
#define MIG_RPC_HAVE_DEVICE_MAP
#define MIG_RPC_REQUEST_ID_DEVICE_MAP 2809
#define MIG_RPC_REPLY_ID_DEVICE_MAP 2909
#ifdef	mig_external
mig_external
#else
extern
#endif
kern_return_t device_map
(
	mach_port_t device,
	vm_prot_t prot,
	vm_offset_t offset,
	vm_size_t size,
	mach_port_t *pager,
	int unmap
);

/* Routine device_set_status */
#define MIG_RPC_HAVE_DEVICE_SET_STATUS
#define MIG_RPC_REQUEST_ID_DEVICE_SET_STATUS 2810
#define MIG_RPC_REPLY_ID_DEVICE_SET_STATUS 2910
#ifdef	mig_external
mig_external
#else
extern
#endif
kern_return_t device_set_status
(
	mach_port_t device,
	dev_flavor_t flavor,
	const dev_status_t status,
	mach_msg_type_number_t statusCnt
);

/* Routine device_get_status */
#define MIG_RPC_HAVE_DEVICE_GET_STATUS
#define MIG_RPC_REQUEST_ID_DEVICE_GET_STATUS 2811
#define MIG_RPC_REPLY_ID_DEVICE_GET_STATUS 2911
#ifdef	mig_external
mig_external
#else
extern
#endif
kern_return_t device_get_status
(
	mach_port_t device,
	dev_flavor_t flavor,
	dev_status_t status,
	mach_msg_type_number_t *statusCnt
);

/* Routine device_set_filter */
#define MIG_RPC_HAVE_DEVICE_SET_FILTER
#define MIG_RPC_REQUEST_ID_DEVICE_SET_FILTER 2812
#define MIG_RPC_REPLY_ID_DEVICE_SET_FILTER 2912
#ifdef	mig_external
mig_external
#else
extern
#endif
kern_return_t device_set_filter
(
	mach_port_t device,
	mach_port_t receive_port,
	mach_msg_type_name_t receive_portPoly,
	int priority,
	const filter_array_t filter,
	mach_msg_type_number_t filterCnt
);

/* Routine device_intr_register */
#define MIG_RPC_HAVE_DEVICE_INTR_REGISTER
#define MIG_RPC_REQUEST_ID_DEVICE_INTR_REGISTER 2813
#define MIG_RPC_REPLY_ID_DEVICE_INTR_REGISTER 2913
#ifdef	mig_external
mig_external
#else
extern
#endif
kern_return_t device_intr_register
(
	mach_port_t device,
	int id,
	int flags,
	mach_port_t receive_port,
	mach_msg_type_name_t receive_portPoly
);

/* Routine device_intr_ack */
#define MIG_RPC_HAVE_DEVICE_INTR_ACK
#define MIG_RPC_REQUEST_ID_DEVICE_INTR_ACK 2814
#define MIG_RPC_REPLY_ID_DEVICE_INTR_ACK 2914
#ifdef	mig_external
mig_external
#else
extern
#endif
kern_return_t device_intr_ack
(
	mach_port_t device,
	mach_port_t receive_port,
	mach_msg_type_name_t receive_portPoly
);

#endif	/* not defined(_device_user_) */
