Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Aug 2001 11:56:09 -0400
From:      Sandeep Joshi <sandeepj@research.bell-labs.com>
To:        Foldi Tamas <crow@kapu.hu>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Kernel level inet socket handling
Message-ID:  <3B852799.72A4D8CC@research.bell-labs.com>
References:  <998565839.19521.19.camel@DarkSun>

next in thread | previous in thread | raw e-mail | index | archive | help

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B852799.72A4D8CC>