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/
From: Q-ha Park <hidden> Date: 2004-01-09 04:31:50
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/
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" <redacted>
To: "'김치환'" <redacted>; <redacted>
Sent: Friday, January 09, 2004 1:31 PM
Subject: RE: socket programming without RTnet.
quoted
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
From: Q-ha Park <hidden> Date: 2004-01-09 07:20:16
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/