RE: Sending info to user process from kernel

2002-07-10 Thread d deepak

Hi John,

Thanks for the info, it would be great it u can send
the source code that u have.

thanks
deepak

--- "Matthews, John" <[EMAIL PROTECTED]> wrote:
>   
>   I'm not sure if copy_to_user will work for what you
> want.  I think
> it might be possible to use, but I don't believe it
> would be the cleanest
> approach.  In order to use copy_to_user you will
> need to know what memory
> location to copy data to so the user process can
> read it, plus you'll need
> to know when to signal your user process to read the
> data.  I guess these
> problems could be solved, but I think you might
> prefer to use something like
> a netlink socket.  It's already been implemented in
> the kernel and there's a
> lot of sample code already using it from various
> router applications.  You
> should look at "zebra" it should give you a good
> start, along with some
> searches in google for "netlink sockets".  
> 
>   You could also look into using procfs, there's a
> good simple example
> of how to use it included with the kernel
> documentation.   
> 
> 
>   Best of luck,
>   John Matthews
> 
> P.S.  If you get really stuck with the netlink
> socket I could send you some
> of my source code I wrote when learning how to use
> it.
> 
> 
> 
> 
> -----Original Message-
> From: d deepak [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 03, 2002 10:02 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Sending info to user process from
> kernel
> 
> 
> Hi
> I am working on Bluetooth, my Bt stack is a kernel.
> I
> want to send events to a user app. this should go as
> an asynchronous event, ie, application will be doing
> something else and still it should receive my event.
> 
> deepak
> 
> --- Jonathan Bartlett <[EMAIL PROTECTED]> wrote:
> > What specifically are you trying to do?
> > 
> > The easiest way to do this is probably
> copy_to_user,
> > but it would be more
> > useful if you said what you were trying to do.
> > 
> > Jon
> > 
> > On Tue, 2 Jul 2002, d deepak wrote:
> > 
> > > Hi all,
> > >
> > > I am new to Linux, my requirement is to send
> some
> > data
> > > from kernel module to a user program
> > asynchronouslly.
> > > Colud any of u please tell me which is the
> easiest
> > way
> > > to do this. It would be great if u can send some
> > > sample code.
> > >
> > > thanks in advance
> > >
> > > deepak
> > >
> > >
> > >
> __
> > > Do You Yahoo!?
> > > Sign up for SBC Yahoo! Dial - First Month Free
> > > http://sbc.yahoo.com
> > >
> > >
> > >
> > > ___
> > > Redhat-devel-list mailing list
> > > [EMAIL PROTECTED]
> > >
> >
>
https://listman.redhat.com/mailman/listinfo/redhat-devel-list
> > >
> > 
> > 
> > 
> > ___
> > Redhat-devel-list mailing list
> > [EMAIL PROTECTED]
> >
>
https://listman.redhat.com/mailman/listinfo/redhat-devel-list
> 
> 
> __
> Do You Yahoo!?
> Sign up for SBC Yahoo! Dial - First Month Free
> http://sbc.yahoo.com
> 
> 
> 
> ___
> Redhat-devel-list mailing list
> [EMAIL PROTECTED]
>
https://listman.redhat.com/mailman/listinfo/redhat-devel-list
> 
> 
> 
> ___
> Redhat-devel-list mailing list
> [EMAIL PROTECTED]
>
https://listman.redhat.com/mailman/listinfo/redhat-devel-list


__
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com



___
Redhat-devel-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-devel-list



RE: Sending info to user process from kernel

2002-07-09 Thread Matthews, John


I'm not sure if copy_to_user will work for what you want.  I think
it might be possible to use, but I don't believe it would be the cleanest
approach.  In order to use copy_to_user you will need to know what memory
location to copy data to so the user process can read it, plus you'll need
to know when to signal your user process to read the data.  I guess these
problems could be solved, but I think you might prefer to use something like
a netlink socket.  It's already been implemented in the kernel and there's a
lot of sample code already using it from various router applications.  You
should look at "zebra" it should give you a good start, along with some
searches in google for "netlink sockets".  

You could also look into using procfs, there's a good simple example
of how to use it included with the kernel documentation.   


Best of luck,
John Matthews

P.S.  If you get really stuck with the netlink socket I could send you some
of my source code I wrote when learning how to use it.




-Original Message-
From: d deepak [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 03, 2002 10:02 AM
To: [EMAIL PROTECTED]
Subject: Re: Sending info to user process from kernel


Hi
I am working on Bluetooth, my Bt stack is a kernel. I
want to send events to a user app. this should go as
an asynchronous event, ie, application will be doing
something else and still it should receive my event.

deepak

--- Jonathan Bartlett <[EMAIL PROTECTED]> wrote:
> What specifically are you trying to do?
> 
> The easiest way to do this is probably copy_to_user,
> but it would be more
> useful if you said what you were trying to do.
> 
> Jon
> 
> On Tue, 2 Jul 2002, d deepak wrote:
> 
> > Hi all,
> >
> > I am new to Linux, my requirement is to send some
> data
> > from kernel module to a user program
> asynchronouslly.
> > Colud any of u please tell me which is the easiest
> way
> > to do this. It would be great if u can send some
> > sample code.
> >
> > thanks in advance
> >
> > deepak
> >
> >
> > __
> > Do You Yahoo!?
> > Sign up for SBC Yahoo! Dial - First Month Free
> > http://sbc.yahoo.com
> >
> >
> >
> > ___
> > Redhat-devel-list mailing list
> > [EMAIL PROTECTED]
> >
>
https://listman.redhat.com/mailman/listinfo/redhat-devel-list
> >
> 
> 
> 
> ___
> Redhat-devel-list mailing list
> [EMAIL PROTECTED]
>
https://listman.redhat.com/mailman/listinfo/redhat-devel-list


__
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com



___
Redhat-devel-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-devel-list



___
Redhat-devel-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-devel-list



Re: Sending info to user process from kernel

2002-07-03 Thread d deepak

Hi
I am working on Bluetooth, my Bt stack is a kernel. I
want to send events to a user app. this should go as
an asynchronous event, ie, application will be doing
something else and still it should receive my event.

deepak

--- Jonathan Bartlett <[EMAIL PROTECTED]> wrote:
> What specifically are you trying to do?
> 
> The easiest way to do this is probably copy_to_user,
> but it would be more
> useful if you said what you were trying to do.
> 
> Jon
> 
> On Tue, 2 Jul 2002, d deepak wrote:
> 
> > Hi all,
> >
> > I am new to Linux, my requirement is to send some
> data
> > from kernel module to a user program
> asynchronouslly.
> > Colud any of u please tell me which is the easiest
> way
> > to do this. It would be great if u can send some
> > sample code.
> >
> > thanks in advance
> >
> > deepak
> >
> >
> > __
> > Do You Yahoo!?
> > Sign up for SBC Yahoo! Dial - First Month Free
> > http://sbc.yahoo.com
> >
> >
> >
> > ___
> > Redhat-devel-list mailing list
> > [EMAIL PROTECTED]
> >
>
https://listman.redhat.com/mailman/listinfo/redhat-devel-list
> >
> 
> 
> 
> ___
> Redhat-devel-list mailing list
> [EMAIL PROTECTED]
>
https://listman.redhat.com/mailman/listinfo/redhat-devel-list


__
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com



___
Redhat-devel-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-devel-list



Re: Sending info to user process from kernel

2002-07-02 Thread Jonathan Bartlett

What specifically are you trying to do?

The easiest way to do this is probably copy_to_user, but it would be more
useful if you said what you were trying to do.

Jon

On Tue, 2 Jul 2002, d deepak wrote:

> Hi all,
>
> I am new to Linux, my requirement is to send some data
> from kernel module to a user program asynchronouslly.
> Colud any of u please tell me which is the easiest way
> to do this. It would be great if u can send some
> sample code.
>
> thanks in advance
>
> deepak
>
>
> __
> Do You Yahoo!?
> Sign up for SBC Yahoo! Dial - First Month Free
> http://sbc.yahoo.com
>
>
>
> ___
> Redhat-devel-list mailing list
> [EMAIL PROTECTED]
> https://listman.redhat.com/mailman/listinfo/redhat-devel-list
>



___
Redhat-devel-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-devel-list