From owner-freebsd-questions@FreeBSD.ORG Wed Nov 16 18:07:35 2005 Return-Path: X-Original-To: freebsd-questions@FreeBSD.ORG Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4400316A420 for ; Wed, 16 Nov 2005 18:07:35 +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 03E0C43D73 for ; Wed, 16 Nov 2005 18:07:25 +0000 (GMT) (envelope-from marwos@sbcglobal.net) Received: (qmail 18979 invoked from network); 16 Nov 2005 18:07:25 -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:25 -0000 From: "Martin" To: Date: Wed, 16 Nov 2005 10:06:32 -0800 Message-ID: <000701c5ead8$7a059970$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 Cc: Subject: egress interface index lookup through a route SACK_RAW socket call X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Nov 2005 18:07:35 -0000 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 (RTA_GATEWAY) for the route then recursively call the same function passing the gateway IP and the sock_addr_in ->s_port would return with the interface index. But this does not work with PPP interfaces or other non-Ethernet interfaces. Any insight to what i am lacking in the route request would be appreciated. Thanks, _Martin