From owner-freebsd-hackers Thu Aug 23 8:57:40 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from crufty.research.bell-labs.com (crufty.research.bell-labs.com [204.178.16.49]) by hub.freebsd.org (Postfix) with SMTP id 58E1337B40B for ; Thu, 23 Aug 2001 08:57:35 -0700 (PDT) (envelope-from sandeepj@research.bell-labs.com) Received: from scummy.research.bell-labs.com ([135.104.2.10]) by crufty; Thu Aug 23 11:52:41 EDT 2001 Received: from aura.research.bell-labs.com (aura.research.bell-labs.com [135.104.46.10]) by scummy.research.bell-labs.com (8.11.4/8.11.4) with ESMTP id f7NFuAl07089; Thu, 23 Aug 2001 11:56:10 -0400 (EDT) Received: from research.bell-labs.com (IDENT:sandeepj@sandeepj-pcmh.research.bell-labs.com [135.104.47.90]) by aura.research.bell-labs.com (8.9.1/8.9.1) with ESMTP id LAA25560; Thu, 23 Aug 2001 11:56:09 -0400 (EDT) Message-ID: <3B852799.72A4D8CC@research.bell-labs.com> Date: Thu, 23 Aug 2001 11:56:09 -0400 From: Sandeep Joshi X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.16-3 i686) X-Accept-Language: en MIME-Version: 1.0 To: Foldi Tamas Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Kernel level inet socket handling References: <998565839.19521.19.camel@DarkSun> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I believe the functions you need are in kern/uipc_socket.c (socreate, sosend, soreceive, soclose, sosetopt..) Alternately, you could also do as follows, for each of the above functions so->so_proto->pr_usrreqs->pru_sosend(so, 0, uio, 0, 0, 0, uio->uio_procp) I am not sure if netgraph (netgraph/ng_ksocket.c) would work, since some part of ng_ksocket_rcvmsg() is not implemented (e.g. accept) For sample usage of these functions, see nfs/nfs_socket.c nfs/krpc_subr.c fifofs/fifo_vnops.c -Sandeep Foldi Tamas wrote: > > Cheers! > > My problem is the following: I want to do high level network handling > from a kernel thread (as in inet socket handling, connect/bind, etc). > I couldn't find any documentation about this, which would be of > practical help. > > If someone knows about something like this (text, sources, anything), > please reply to me. > > Thanks in advance, > Best regards > Tamas Foldi > > . . _ __ ______________________________________________________ __ _ . . > Foldi Tamas - We Are The Hashmark In The Rootshell - Security Consultant > crow@kapu.hu - PGP: finger://crow@thot.banki.hu - (+3630) 221-7477 > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message