From owner-freebsd-net@FreeBSD.ORG Sat Dec 20 08:00: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 14694106564A for ; Sat, 20 Dec 2008 08:00:12 +0000 (UTC) (envelope-from fernercc@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.30]) by mx1.freebsd.org (Postfix) with ESMTP id C2F238FC19 for ; Sat, 20 Dec 2008 08:00:11 +0000 (UTC) (envelope-from fernercc@gmail.com) Received: by yw-out-2324.google.com with SMTP id 9so1184565ywe.13 for ; Sat, 20 Dec 2008 00:00:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:content-type :date:message-id:mime-version:x-mailer:content-transfer-encoding; bh=exhLVU0/Pi3hJBmjDkng+QJ6y+8uDxs3AmGZfHfqq8Q=; b=ntuj1mRKONBgT8w1GWpLs2cegKPcqCsJHt8CrIAZK9UdEc8SSR04W7GzTokT9jZtiC +eVbHZ+Z2xMcK/NPfawVBpl29BHANWJhAUu+x+83qJLxzxQjFp0q4S984eaDEx0ggbW8 C3IC3wfuQ6qYsm6FyeITrXApik9XAYfPQLx6o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; b=MT/h4aj/k/nD/A6bFdRkYUrU/VAp8pDzCrKNpNveQ9Gw1+0moKFBJrucECWxGnz8eN rLsA5NF7eaVP4uPHZ3FepA0EMVjL/FWBCtR3bU0lJowz3zD7iqaf316hp7NkOVCPWIe2 ev5vmL27p4Omf+TgfD0VODGPvL57t/SC7ny/c= Received: by 10.100.41.9 with SMTP id o9mr2773377ano.49.1229760011128; Sat, 20 Dec 2008 00:00:11 -0800 (PST) Received: from ?192.168.2.2? (cpe-70-112-179-136.austin.res.rr.com [70.112.179.136]) by mx.google.com with ESMTPS id b14sm8644506ana.32.2008.12.20.00.00.09 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 20 Dec 2008 00:00:10 -0800 (PST) From: Ferner Cilloniz To: freebsd-net@freebsd.org Content-Type: text/plain Date: Sat, 20 Dec 2008 02:00:06 +0000 Message-Id: <1229738406.5614.17.camel@mobiliare.Belkin> Mime-Version: 1.0 X-Mailer: Evolution 2.24.2 Content-Transfer-Encoding: 7bit Subject: sending arbitrary UDP packets from kernel module 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: Sat, 20 Dec 2008 08:00:12 -0000 So i have done some research and reading and found that i need to call either udp_send or udp_output. Can anyone help me out with providing the proper arguments to these functions so i may call them and send arbitrary UDP packets from a kernel module? Thanks everyone :) static int udp_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, struct mbuf *control, struct thread *td);