From owner-freebsd-net@FreeBSD.ORG Wed Nov 16 18:07:33 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 48F9B16A41F for ; Wed, 16 Nov 2005 18:07:33 +0000 (GMT) (envelope-from marwos@sbcglobal.net) Received: from smtp110.sbc.mail.mud.yahoo.com (smtp110.sbc.mail.mud.yahoo.com [68.142.198.209]) by mx1.FreeBSD.org (Postfix) with SMTP id 4C44D43D6D for ; Wed, 16 Nov 2005 18:07:25 +0000 (GMT) (envelope-from marwos@sbcglobal.net) Received: (qmail 18953 invoked from network); 16 Nov 2005 18:07:24 -0000 Received: from unknown (HELO compaq) (marwos@sbcglobal.net@71.134.228.59 with login) by smtp110.sbc.mail.mud.yahoo.com with SMTP; 16 Nov 2005 18:07:23 -0000 From: "Martin" To: Date: Wed, 16 Nov 2005 10:06:27 -0800 Message-ID: <000201c5ead8$79dded30$3be48647@compaq> MIME-Version: 1.0 X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Importance: Normal Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: egress interface index lookup through a route SACK_RAW socket call 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: Wed, 16 Nov 2005 18:07:33 -0000 What / how do I construct a routing raw socket call to retrieve the outgoing interface index for a particular route that is destined out of an interface other than Ethernet such as a point to point? With Ethernet interfaces I was able to contruct a rt_msghdr with RTM_GET and RTA_DST- retrieve the gateway IP for the route then recursively call the same function passing the gateway IP and the sock_addr_in ->sin_addr.s_port would return with the interface index. But this does not work with PPP interfaces or other non-Ethernet. Any insight to what i am lacking in the route request would be appreciated. Thanks, _Martin