Added io_connect_add_client

This commit is contained in:
manu 2003-05-22 18:10:19 +00:00
parent eab3a69dca
commit 0d9cf0359a
3 changed files with 42 additions and 5 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: mach_iokit.c,v 1.17 2003/05/14 18:28:04 manu Exp $ */
/* $NetBSD: mach_iokit.c,v 1.18 2003/05/22 18:10:19 manu Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@ -38,7 +38,7 @@
#include "opt_compat_darwin.h"
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mach_iokit.c,v 1.17 2003/05/14 18:28:04 manu Exp $");
__KERNEL_RCSID(0, "$NetBSD: mach_iokit.c,v 1.18 2003/05/22 18:10:19 manu Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -980,3 +980,23 @@ mach_io_service_close(args)
*msglen = sizeof(*rep);
return 0;
}
int
mach_io_connect_add_client(args)
struct mach_trap_args *args;
{
mach_io_connect_add_client_request_t *req = args->smsg;
mach_io_connect_add_client_reply_t *rep = args->rmsg;
size_t *msglen = args->rsize;
rep->rep_msgh.msgh_bits =
MACH_MSGH_REPLY_LOCAL_BITS(MACH_MSG_TYPE_MOVE_SEND_ONCE);
rep->rep_msgh.msgh_size = sizeof(*rep) - sizeof(rep->rep_trailer);
rep->rep_msgh.msgh_local_port = req->req_msgh.msgh_local_port;
rep->rep_msgh.msgh_id = req->req_msgh.msgh_id + 100;
rep->rep_retval = 0;
rep->rep_trailer.msgh_trailer_size = 8;
*msglen = sizeof(*rep);
return 0;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: mach_iokit.h,v 1.14 2003/05/14 18:28:04 manu Exp $ */
/* $NetBSD: mach_iokit.h,v 1.15 2003/05/22 18:10:19 manu Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@ -445,6 +445,21 @@ typedef struct {
mach_msg_trailer_t rep_trailer;
} mach_io_service_close_reply_t;
/* io_connect_add_client */
typedef struct {
mach_msg_header_t req_msgh;
mach_msg_body_t req_body;
mach_msg_port_descriptor_t req_connect;
} mach_io_connect_add_client_request_t;
typedef struct {
mach_msg_header_t rep_msgh;
mach_ndr_record_t rep_ndr;
mach_kern_return_t rep_retval;
mach_msg_trailer_t rep_trailer;
} mach_io_connect_add_client_reply_t;
int mach_io_service_get_matching_services(struct mach_trap_args *);
int mach_io_iterator_next(struct mach_trap_args *);
int mach_io_service_open(struct mach_trap_args *);
@ -468,6 +483,7 @@ int mach_io_connect_set_properties(struct mach_trap_args *);
int mach_io_connect_method_scalari_structo(struct mach_trap_args *);
int mach_io_connect_method_structi_structo(struct mach_trap_args *);
int mach_io_service_close(struct mach_trap_args *);
int mach_io_connect_add_client(struct mach_trap_args *);
extern struct mach_iokit_devclass *mach_iokit_devclasses[];

View File

@ -1,4 +1,4 @@
/* $NetBSD: mach_namemap.c,v 1.27 2003/05/14 18:28:04 manu Exp $ */
/* $NetBSD: mach_namemap.c,v 1.28 2003/05/22 18:10:19 manu Exp $ */
/*-
* Copyright (c) 2002-2003 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mach_namemap.c,v 1.27 2003/05/14 18:28:04 manu Exp $");
__KERNEL_RCSID(0, "$NetBSD: mach_namemap.c,v 1.28 2003/05/22 18:10:19 manu Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -85,6 +85,7 @@ struct mach_subsystem_namemap mach_namemap[] = {
{ 2818, mach_io_connect_set_notification_port,
"io_connect_set_notification_port" },
{ 2819, mach_io_connect_map_memory, "io_connect_map_memory" },
{ 2820, mach_io_connect_add_client, "io_connect_add_client" },
{ 2821, mach_io_connect_set_properties, "io_connect_set_properties" },
{ 2822, mach_io_connect_method_scalari_scalaro,
"io_connect_method_scalari_scalaro" },