From owner-freebsd-net@FreeBSD.ORG Tue Nov 23 09:05:12 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 108BF16A4CE for ; Tue, 23 Nov 2004 09:05:12 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.195]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6D41F43D31 for ; Tue, 23 Nov 2004 09:05:11 +0000 (GMT) (envelope-from martin.eugen@gmail.com) Received: by wproxy.gmail.com with SMTP id 68so283289wra for ; Tue, 23 Nov 2004 01:05:11 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:mime-version:content-type:content-transfer-encoding; b=oWWJf4W9YtoHM+OhjjwXnrBd947J0wnZ62pIyEtk/maW0hFLQXcO1fGeXXhrKAzFGibOo8MuzmdUXR7HJRPO8y+rqYWtcyppJJ7SWGSS0Q1Mdud+iwTCgHx6+Yo9o36hJIEU0GqnU0lDaGx/mMqi+1sTGIbuU7MUOiqAbbu+w50= Received: by 10.54.44.53 with SMTP id r53mr17269wrr; Tue, 23 Nov 2004 01:05:07 -0800 (PST) Received: by 10.54.11.42 with HTTP; Tue, 23 Nov 2004 01:05:06 -0800 (PST) Message-ID: <966ba91e04112301052fed8d6b@mail.gmail.com> Date: Tue, 23 Nov 2004 11:05:06 +0200 From: Martin Eugen To: freebsd-net@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org Subject: resolving routes externally X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Martin Eugen List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2004 09:05:12 -0000 Hi there, I'm currently trying to implement some networking protocols in the kernel. I would like to ask a few questions, but first, let me explain some details about those protocols: the network is composed of smaller subnets connected through gateways. Hosts have a fairly complex global addresses, and small integer subnet addresses (that are valid only in one subnet). Global routing is done at gateways, that upon reception of a packet perform some lookups based on the complex global address of the recipient in order to find the subnet and the small integer address of the next hop. May be it would be easier to understand if you imagine the internet as a network where IP addresses are not global, but hostnames are. IP packets that need to be routed outside of given subnet will carry hostnames instead of ip addresses, and gateways will do some resolving based on the domain or something of the destination hostname in order to find the next hop. At the beginning my intention was to use the routing sockets mechanisms, and say, to issue a 'missing route' message to some userland daemon capable of resolving those complex addresses (the resolving mechanism is generally a lookup in a local DB). But then I realized there is no (Am I missing it?) code in the routing modules that could make the thread handling the packet sleep until the userland daemon is looking up the route. (I'm also still not sure if a 'netisr' thread is safe to sleep?) So I started to look at the ARP code, but it of course lacks the kernel - userland communication interface. I would appreciate any ideas about what would be the easier way to implement such a thing where the kernel could wait (up to some reasonable time-out) a userland daemon to install a new route. Thanks. Regards, Martin P.S. I'm not subscribed to the list, please CC any replies.