From owner-freebsd-net@FreeBSD.ORG Mon Dec 8 23:22:55 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 EC8D5106568A for ; Mon, 8 Dec 2008 23:22:55 +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 D5FBE8FC0C for ; Mon, 8 Dec 2008 23:22:55 +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 15:22:56 -0800 Message-ID: <493DAC50.5060501@elischer.org> Date: Mon, 08 Dec 2008 15:22:56 -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> <493D6F6E.4020900@elischer.org> <1228753304.4948.6.camel@mobiliare.Belkin> In-Reply-To: <1228753304.4948.6.camel@mobiliare.Belkin> 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 23:22:56 -0000 Ferner Cilloniz wrote: > Yes I am writing my own loadable kernel module such that I can send a > UDP packet when i tell it to by issuing a homemade system call. > > I have been looking at /usr/src/sys/netgraph/ng_sample.c > > Am i supposed to implement the functions in that file? I am a little > lost. I only want to send a UDP packet and in that file I see functions > concerning receiving. > > Is there any other way? > > Thanks Julian and everyone else. > If you won't receive, then just don't implement it :-) on the other hand if you are really only doing packet level output then maybe you would look at ng_source.c which simply acts as a source of packets you need to give a bit more details to what you want to do..\