Lines Matching defs:kmsg
106 ipc_kmsg_t kmsg;
112 mr = ipc_kmsg_get_from_kernel(msg, send_size, &kmsg);
116 ipc_kmsg_copyin_from_kernel(kmsg);
118 mr = ipc_kmsg_send_always(kmsg);
120 ipc_kmsg_destroy(kmsg);
133 ipc_kmsg_t kmsg;
139 mr = ipc_kmsg_get_from_kernel(msg, send_size, &kmsg);
143 ipc_kmsg_copyin_from_kernel(kmsg);
144 mr = ipc_kmsg_send(kmsg, option, timeout_val);
146 ipc_kmsg_destroy(kmsg);
175 ipc_kmsg_t kmsg;
182 mr = ipc_kmsg_get_from_kernel(msg, send_size, &kmsg);
196 kmsg->ikm_header->msgh_local_port = reply;
197 kmsg->ikm_header->msgh_bits |=
202 ipc_kmsg_copyin_from_kernel(kmsg);
204 mr = ipc_kmsg_send_always(kmsg);
206 ipc_kmsg_destroy(kmsg);
238 kmsg = self->ith_kmsg;
260 if (rcv_size >= kmsg->ikm_header->msgh_size) {
262 ((vm_offset_t)kmsg->ikm_header + kmsg->ikm_header->msgh_size);
264 if (rcv_size >= kmsg->ikm_header->msgh_size + MAX_TRAILER_SIZE) {
268 else if (rcv_size < kmsg->ikm_header->msgh_size +
274 rcv_size = kmsg->ikm_header->msgh_size + trailer->msgh_trailer_size;
286 ipc_kmsg_copyout_to_kernel(kmsg, ipc_space_reply);
287 ipc_kmsg_put_to_kernel(msg, kmsg, rcv_size);
322 ipc_kmsg_t kmsg;
338 kmsg = ipc_kmsg_alloc(msg_and_trailer_size);
340 if (kmsg == IKM_NULL)
343 (void) memcpy((void *) kmsg->ikm_header, (const void *) msg, send_size);
345 kmsg->ikm_header->msgh_size = send_size;
353 max_trailer = (mach_msg_max_trailer_t *) ((vm_offset_t)kmsg->ikm_header + send_size);
359 mr = ipc_kmsg_copyin(kmsg, space, map, MACH_PORT_NULL);
361 ipc_kmsg_free(kmsg);
366 mr = ipc_kmsg_send(kmsg, MACH_MSG_OPTION_NONE,
392 kmsg = self->ith_kmsg;
402 ((vm_offset_t)kmsg->ikm_header + kmsg->ikm_header->msgh_size);
408 if (rcv_size < (kmsg->ikm_header->msgh_size + trailer->msgh_trailer_size)) {
409 ipc_kmsg_copyout_dest(kmsg, space);
410 (void) memcpy((void *) msg, (const void *) kmsg->ikm_header, sizeof *msg);
411 ipc_kmsg_free(kmsg);
415 mr = ipc_kmsg_copyout(kmsg, space, map, MACH_PORT_NULL,
419 ipc_kmsg_put_to_kernel(msg, kmsg,
420 kmsg->ikm_header->msgh_size + trailer->msgh_trailer_size);
422 ipc_kmsg_copyout_dest(kmsg, space);
423 (void) memcpy((void *) msg, (const void *) kmsg->ikm_header, sizeof *msg);
424 ipc_kmsg_free(kmsg);
430 (void) memcpy((void *) msg, (const void *) kmsg->ikm_header,
431 kmsg->ikm_header->msgh_size + trailer->msgh_trailer_size);
432 ipc_kmsg_free(kmsg);