From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 18 09:27:40 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5A9E316A500 for ; Mon, 18 Jun 2007 09:27:40 +0000 (UTC) (envelope-from n.cormier@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.182]) by mx1.freebsd.org (Postfix) with ESMTP id 1CDAC13C448 for ; Mon, 18 Jun 2007 09:27:39 +0000 (UTC) (envelope-from n.cormier@gmail.com) Received: by py-out-1112.google.com with SMTP id a29so3033300pyi for ; Mon, 18 Jun 2007 02:27:39 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=FbQhOfm4xtpE8/UEm5lD3AeXSPLiJ+DaHtIPBHg7Bv+2MLQ/8QeyJo7jkf4GQ+6aYQI5uSUCKakldryk6MeHCnN22jF6H6jZK+eQ/48+1RTFc+lcQekHEgqwEfIpSU4U530GwNDj7n2/pGtrUZzQ0zXhUBR8/BZSCoFB0Lkw1F8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=mYA2QoqiDr5mdH2Czj5J/ScouKpJvjEPfBc+Fkjd51dwfeGOE3pnJ8fdZVTx5SApZUcD2dVN68iUFMKGZHOFaiqparm7vvi31ffkCrLUEr00RtLKlHn4EwGMeNbfYNr7SvwWQqGhO2ndqCd51CwXCDHkkL0DV0a0KmuQ2CNYg+E= Received: by 10.35.41.8 with SMTP id t8mr10356303pyj.1182158859263; Mon, 18 Jun 2007 02:27:39 -0700 (PDT) Received: by 10.35.40.18 with HTTP; Mon, 18 Jun 2007 02:27:39 -0700 (PDT) Message-ID: Date: Mon, 18 Jun 2007 11:27:39 +0200 From: "Nicolas Cormier" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: in-kernel tcp server X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jun 2007 09:27:40 -0000 Hi, I'm trying to write a little tcp-server kernel module (like tftp). I didn't find a lot of documents about the kernel network programming, just one thread which talks about netgraph. In the freebsd includes I found /usr/include/sys/socketvar.h (so*). What's the easy way to create a basic tcp server (create/bind/listen/accept/send/recv) : use netgraph's ksocket or so* ? Thanks in advance ! PS: the whole job must be done in the kernel. -- Nicolas Cormier