From owner-freebsd-hackers Tue Jul 24 5:28:50 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from vaca.uniandes.edu.co (vaca.uniandes.edu.co [157.253.54.5]) by hub.freebsd.org (Postfix) with ESMTP id 30EFA37B401 for ; Tue, 24 Jul 2001 05:28:40 -0700 (PDT) (envelope-from y-carden@uniandes.edu.co) Received: from vaca.uniandes.edu.co (localhost [127.0.0.1]) by vaca.uniandes.edu.co (8.12.0.Beta7/8.12.0.Beta7) with SMTP id f6OCQmoQ023103 for ; Tue, 24 Jul 2001 07:26:50 -0500 (GMT+5) Received: (from webmail [157.253.54.4]) by vaca.uniandes.edu.co (NAVGW 2.5 bld 90) with SMTP id M2001072407265003947 ; Tue, 24 Jul 2001 07:26:50 -0500 From: y-carden@uniandes.edu.co To: hackers@FreeBSD.org Cc: gvega@uniandes.edu.co Subject: Re: Invoking a userland function from kernel X-Mailer: Netscape Messenger Express 3.5.2 [Mozilla/4.72 [en] (X11; I; FreeBSD 4.0-RELEASE i386)] Date: Tue, 24 Jul 2001 07:26:50 -0500 Message-Id: Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I need pass asynchronously data from kernel to a userland process, include a quantity variable of data (void *opaque). The userland process to consume the data independently (it takes the data and build some structure, perhaps a queue o link list, to consume later ). I think that this is similar to upward flow data mechanism in the network subsystem. The data received at a network interface flow upward through communications protocols until they are placed in receive queue of destination socket, the system schedules protocol processing from the network interface layer by marking a bit assigned to the protocol in the system's network interrupt status, and posting a software interrupt reserved for triggering network activity. Software interrupts are used to schedule asynchronous network activity. But I don't know how I can trigger this software interrupts from my code into the FreeBSD kernel. Thanks. +------------------------+ YONNY CARDENAS B. y-carden@uniandes.edu.co On Mon, 23 Jul 2001 Gersh wrote: >While would probally be possiable to do with some hacker >having the kernel execute some random privoded by >a userland process is not only a bad idea from a >stabality standpoint but also a horid >security mess. >The best soultion would be to port the userland function you need into > the kernel, However this might not be possiable (part of a comerical > application you dont have source code to, whatever the case im not > sure). >What is it exactally that you need to do? There is probally a better >soultion availiable to you, perhaps useing a charcter device driver > might be a better idea. On Mon, 23 Jul 2001 y-carden@uniandes.edu.co wrote: >> >> Dear Friends >> >> I'm incorporating the Real Time Protocol RTP (rfc 1889) to >> FreeBSD 4.0 kernel. >> >> Months ago, I compiled successfully the RTP Library API developed >> by Lucent into the FreeBSD kernel with the right logical and technical >> adjustments for the BSD kernel of course (copyin, copyout, malloc, etc). >> >> I have changed many of the original API library functions >> to kernel systems calls, and it works fine. >> >> Now, I need invoke a userland function with several parameters >> from the a function into the kernel. >> >> How I can do? >> >> Do you know a example? >> To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message