From owner-freebsd-questions Thu Nov 16 8: 8:28 2000 Delivered-To: freebsd-questions@freebsd.org Received: from trauco.colomsat.net.co (trauco.colomsat.net.co [200.13.195.2]) by hub.freebsd.org (Postfix) with ESMTP id 8E19237B479; Thu, 16 Nov 2000 08:08:21 -0800 (PST) Received: from yahoo.com (200.13.214.129) by trauco.colomsat.net.co (NPlex 4.0.068) id 3A13EAE100001452; Thu, 16 Nov 2000 11:01:38 -0500 Message-ID: <394A5225.AF165842@yahoo.com> Date: Fri, 16 Jun 2000 11:13:25 -0500 From: "Yonny Cardenas B." X-Mailer: Mozilla 4.61 [en] (Win98; I) X-Accept-Language: en MIME-Version: 1.0 To: hackersBSD Cc: questions , German Vega Subject: RTP as system calls. Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 #include ... 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 ? 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: y-carden@uniandes.edu.co | | ycardena@yahoo.com | +------------------------------------------------------------------+ UNIX is BSD, and FreeBSD is an advanced 4.4BSD To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message