* socket programming without RTnet.
@ 2004-01-08 10:34 김치환
2004-01-09 4:31 ` Q-ha Park
0 siblings, 1 reply; 4+ messages in thread
From: 김치환 @ 2004-01-08 10:34 UTC (permalink / raw)
To: linuxppc-embedded
Hi,
Well, for my socket programming on RTAI patched linux 2.4.20, I tried
to find some socket APIs. But there were any what I expected such as
socket() a standard BSD APIs.
I know I can use the RTnet. But before using it, I want to program a
socket application without the help of RTnet.
Just before I found some APIs starting sys_ net/socket.c like
sys_socket, sys_bind(). To use them I added their symbol in netsyms.c.
And I made a hello-world function using sys_xxx functions.
Oops: kernel access of bad area
But the problem is that when I loaded my hello-world app as a module
after booting. Why can't I use those APIs? I think loadable module is a
part of kernel.
If I can't use those APIs, is there any good way to make a socket
programming without the help of RTnet?
Willy.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: socket programming without RTnet.
2004-01-08 10:34 socket programming without RTnet 김치환
@ 2004-01-09 4:31 ` Q-ha Park
2004-01-09 5:30 ` 김치환
0 siblings, 1 reply; 4+ messages in thread
From: Q-ha Park @ 2004-01-09 4:31 UTC (permalink / raw)
To: '김치환', linuxppc-embedded
> If I can't use those APIs, is there any good way to make a
> socket programming without the help of RTnet?
hmmm, I'm not so sure what your intention is, but why are you trying to
play around in kernel space instead of userland if the plain network
program is what you want?
Q-ha Park
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: socket programming without RTnet.
2004-01-09 4:31 ` Q-ha Park
@ 2004-01-09 5:30 ` 김치환
2004-01-09 7:20 ` Q-ha Park
0 siblings, 1 reply; 4+ messages in thread
From: 김치환 @ 2004-01-09 5:30 UTC (permalink / raw)
To: Q-ha Park, linuxppc-embedded
Thanks your comments.
What I want is to make some network applications just as I did with vxWorks. A 'network application' means using socket/bind/sendto/recvfrom etc APIs to send and receive data to/from outside of me or between internal tasks.
I can't figure out what kernel space' and 'userland' mean. Well I am strange with embedded linux on ppc860 because I stayed with other RTOSs such as vxWorks and Nuclues. Would you explain more in detail?
Currently I patched my kernel 2.4.20 with RTAI and loaded RTAI modules after booting. Also I loaded my 'network application' using insmod.
I still wonder why there is not any standard socket APIs in the linux ppc-embedded kernel and why I can't use sys_socket/sys_bind/sys_recvfrom/sys_sendto in net/socket.c in loadable application.
Thanks.
----- Original Message -----
From: "Q-ha Park" <qha@infoeq.com>
To: "'김치환'" <willy@airpoint.co.kr>; <linuxppc-embedded@lists.linuxppc.org>
Sent: Friday, January 09, 2004 1:31 PM
Subject: RE: socket programming without RTnet.
>
> > If I can't use those APIs, is there any good way to make a
> > socket programming without the help of RTnet?
>
> hmmm, I'm not so sure what your intention is, but why are you trying to
> play around in kernel space instead of userland if the plain network
> program is what you want?
>
> Q-ha Park
>
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: socket programming without RTnet.
2004-01-09 5:30 ` 김치환
@ 2004-01-09 7:20 ` Q-ha Park
0 siblings, 0 replies; 4+ messages in thread
From: Q-ha Park @ 2004-01-09 7:20 UTC (permalink / raw)
To: '김치환', linuxppc-embedded
>
> What I want is to make some network applications just as I
> did with vxWorks. A 'network application' means using
> socket/bind/sendto/recvfrom etc APIs to send and receive data
> to/from outside of me or between internal tasks.
>
> I can't figure out what kernel space' and 'userland' mean.
> Well I am strange with embedded linux on ppc860 because I
> stayed with other RTOSs such as vxWorks and Nuclues. Would
> you explain more in detail?
I can see what you're trying to do. You're doing exactly the same thing
I've seen from embedded programmers just came to the great Linux world;
they often tend to call functions under #ifdef __KERNEL__. Don't do
that.
You should learn how to write a user application in linux environment.
i.e. You don't need {init,exit}_module, you don't define __KERNEL__ or
MODULE, you don't insmod to run your program. After that, the command
"man" should come in handy. e.g. man sendto, ...
Q-ha Park
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-01-09 7:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-08 10:34 socket programming without RTnet 김치환
2004-01-09 4:31 ` Q-ha Park
2004-01-09 5:30 ` 김치환
2004-01-09 7:20 ` Q-ha Park
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).