From owner-freebsd-net Sat Feb 16 5: 9:48 2002 Delivered-To: freebsd-net@freebsd.org Received: from rwcrmhc53.attbi.com (rwcrmhc53.attbi.com [204.127.198.39]) by hub.freebsd.org (Postfix) with ESMTP id B2C7D37B402 for ; Sat, 16 Feb 2002 05:09:46 -0800 (PST) Received: from blossom.cjclark.org ([12.234.91.48]) by rwcrmhc53.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020216130946.CTIX2951.rwcrmhc53.attbi.com@blossom.cjclark.org>; Sat, 16 Feb 2002 13:09:46 +0000 Received: (from cjc@localhost) by blossom.cjclark.org (8.11.6/8.11.6) id g1GD9jX48327; Sat, 16 Feb 2002 05:09:45 -0800 (PST) (envelope-from cjc) Date: Sat, 16 Feb 2002 05:09:45 -0800 From: "Crist J. Clark" To: Tariq Rashid Cc: freebsd-net@FreeBSD.ORG Subject: Re: kernel source for reading from divert sockets Message-ID: <20020216050945.H36782@blossom.cjclark.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from tariq@inty.net on Fri, Feb 15, 2002 at 03:29:04PM -0000 X-URL: http://people.freebsd.org/~cjc/ Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Fri, Feb 15, 2002 at 03:29:04PM -0000, Tariq Rashid wrote: > > can anyone point me to the kernel source where packets are taken from the > DIVERT socket (natd puts them there) - > > i'm finding that sendto() is taking most of the CPU - so i want to have a > look at maybe taking two or three packets from the DIVERT buffer per kernel > loop. > > (i'm not an expert at this by ny means - so useful help would be great!) Look in sys/netinet. ip_divert.c, ip_input.c, and ip_output.c are good starts. -- Crist J. Clark | cjclark@alum.mit.edu | cjclark@jhu.edu http://people.freebsd.org/~cjc/ | cjc@freebsd.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message