Hello
I want you to ask a favor.
I'm incorporating the Real Time Transport Protocol(RTP) to FreeBSD
Kernel.
I want use the RTP Library API developed by Lucent
http://www.cs.columbia.edu/~hgs/rtplib/rtplib-1.0a1/rtp_api.html
First, I want try if this API can be add to Kernel as system calls.
I know this a little crazy but I think that is possible, with
corrections of course.
I compiled with the Kernel this APIs without problems. But I have
problems linking kernel. The following message is show it:
cc -c -O -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes
-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual
-fformat-extensions -ansi -nostdinc -I- -I. -I../.. -I/usr/include
-D_KERNEL -include opt_global.h -elf -mpreferred-stack-boundary=2
vers.c
linking kernel
init_sysent.o(.data+0xb8c): undefined reference to `RTPSend'
init_sysent.o(.data+0xc0c): undefined reference to `RTPSchedule'
rtp_unix.o: In function `_sys_bind':
rtp_unix.o(.text+0x141): undefined reference to `__error'
rtp_unix.o: In function `_sys_send':
rtp_unix.o(.text+0x1c8): undefined reference to `send'
rtp_unix.o: In function `random32':
rtp_unix.o(.text+0x23d): undefined reference to `clock'
rtp_unix.o(.text+0x253): undefined reference to `gethostid'
I don't understand the message "undefined reference to",
for example the function "send" is a socket API.
In the file rtp_unix.c you can see:
#include <sys/types.h>
#include <sys/socket.h>
...
int _sys_send(socktype skt, char *buf, int buflen, int flags) {
int res;
res = send(skt, buf, buflen, flags);
return(res);
}
In the Kernel Makefile:
rtp_unix.o: $S/kern/rtp/rtp_unix.c
${NORMAL_C}
In the RTPLibrary Makefile:
rtp_unix.o: rtp_unix.c rtp_unix.h rtp_api.h sysdep.h config.h
I have some questions:
1) Can I call functions level's user into kernel, as socket() or
calloc() ?
2) How must I use the global variable "errno" for value
returned for system calls ? Is sufficient with #include <sys/errno.h> ?
3) How can I solve above linking errors.
Thanks for your help.
+------------------------------------------------------------------+
| YONNY CARDENAS B. Apartado Aereo 22828 |
| Systems Engineer Santafe de Bogota D.C. |
| Colombia - South America |
| Student M.Sc. Tels: +571 6095477 |
| UNIVERSIDAD DE LOS ANDES mailto: [EMAIL PROTECTED] |
| [EMAIL PROTECTED] |
+------------------------------------------------------------------+
UNIX is BSD, and FreeBSD is an advanced 4.4BSD
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message