Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Jun 2000 10:13:26 +0530 (IST)
From:      "G.B.Naidu" <gbnaidu@sasi.com>
To:        hackers@freebsd.org
Cc:        net@freebsd.org
Subject:   [REPOST]  Re: How do I get port inside kernel.... (fwd)
Message-ID:  <Pine.LNX.4.21.0006071011570.763-100000@pcd75.sasi.com>

next in thread | raw e-mail | index | archive | help

Hi,

Have posted this question yesterday. But no reply. Hope to et a reply to
day.

thanks for your time
--gb



-- 

---------- Forwarded message ----------
Date: Tue, 6 Jun 2000 11:55:18 +0530 (IST)
From: G.B.Naidu <gbnaidu@sasi.com>
To: Alfred Perlstein <bright@wintelcom.net>
Cc: hackers@FreeBSD.ORG, Deepika Kakrania <deepika@sasi.com>,
     Madhavi Suram <madhavis@sasi.com>
Subject: Re: How do I get port inside kernel....


Hi,

Thanks a lot for your reply. It's quite useful. But I have some more
questions generated of this study of nfs code and sendfile(2) code. The
question is about getting a proc structure. Here it is.

As you all know that every system call in side kernel needs a process
structure to be passed. So to call socreate, sobind or getsocket we need a
proc structure. My doubt is which process structure to pass?

In nfs code, at some places it is passing the curproc structure which is
nothing but currently running process. At other places example for
socreate() and sobind(), it is using proc0 structure which is nothing but
of the swap process. So when I am executing the kernel, what is the
current process? Is it safe if I use proc0 to pass the proc structure to
call socreate() and sobind()? How safe it is to use curproc
structure? Somebody mentioned that it will not work in interrupt
handlers.

So somebody out there throw some light on the currently running process
when inside kernel?

thanks a lot
--gb

 On Mon, 5 Jun 2000, Alfred
Perlstein wrote:

> * G.B.Naidu <gbnaidu@sasi.com> [000605 05:37] wrote:
> > 
> > Hi,
> > 
> > If I want to get a port inside kernel, how do I do that? In user land we
> > will call socket(), bind() to get a port. But in kernel, is there any way
> > to get a new port?
> > 
> > Any ideas are appreciated.
> 
> Check the nfsd code.  src/sys/nfs
> 
> 

-- 




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.21.0006071011570.763-100000>