From owner-freebsd-net@FreeBSD.ORG Mon Dec 8 19:32:12 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 870561065670 for ; Mon, 8 Dec 2008 19:32:12 +0000 (UTC) (envelope-from prvs=julian=2217c4452@elischer.org) Received: from smtp-outbound.ironport.com (smtp-outbound.ironport.com [63.251.108.112]) by mx1.freebsd.org (Postfix) with ESMTP id 710D98FC1A for ; Mon, 8 Dec 2008 19:32:12 +0000 (UTC) (envelope-from prvs=julian=2217c4452@elischer.org) Received: from jelischer-laptop.sfo.ironport.com (HELO julian-mac.elischer.org) ([10.251.22.38]) by smtp-outbound.ironport.com with ESMTP; 08 Dec 2008 11:03:10 -0800 Message-ID: <493D6F6E.4020900@elischer.org> Date: Mon, 08 Dec 2008 11:03:10 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.18 (Macintosh/20081105) MIME-Version: 1.0 To: Ferner Cilloniz References: <1228699701.4940.2.camel@mobiliare.Belkin> <493CD5AB.8030303@elischer.org> <1228702422.4940.7.camel@mobiliare.Belkin> <493CD98D.7000909@elischer.org> <1228740437.4956.1.camel@mobiliare> In-Reply-To: <1228740437.4956.1.camel@mobiliare> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: FreeBSD kernel module and sending udp packets X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 19:32:12 -0000 Ferner Cilloniz wrote: > Hi Julian. I'm very happy for your help. I have read the guide to > netgraph and find it very interesting :) > > I still dont understand when you say "you could give your module a > netgraph interface." > > Can you please explain this a little more please? You indicated that you were going to be writing your own module. your module should include the interface functions indicated in ng_sample.c That will allow your module to be hooked up to the other netgraph modules in whatever orrder you want, and that includes the ng_ksocket module that would allow your module to sned and receive data through the in-kernel socket. > > Thanks. > > On Mon, 2008-12-08 at 00:23 -0800, Julian Elischer wrote: >> Ferner Cilloniz wrote: >>> Thanks for the reply. I read something about that but I didn't >>> understand what was being said. >>> >>> Can you please help me in understanding. I have googled for sample code >>> and didn't find anything useful. Can you, or anyone else, please help me >>> understand this? >> http://people.freebsd.org/~julian/netgraph.html >> >>> Thanks again :) >>> >>> On Mon, 2008-12-08 at 00:07 -0800, Julian Elischer wrote: >>>> Ferner Cilloniz wrote: >>>>> Hello everyone. >>>>> >>>>> I need help with documentation concerning how to send a udp or tcp >>>>> packet from a kernel module. I have found this information for Linux but >>>>> not for FreeBSD. >>>>> >>>>> Please help me. >>>> you could give your module a netgraph interface. Then it can connect >>>> directly to the ng_ksocket node type and use that. as an in-kernel socket. >>>> >>>> >>>> >>>>> Thank you :) >>>>> >>>>> _______________________________________________ >>>>> freebsd-net@freebsd.org mailing list >>>>> http://lists.freebsd.org/mailman/listinfo/freebsd-net >>>>> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"