From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 9 10:02:41 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DC36316A4CE for ; Fri, 9 Apr 2004 10:02:41 -0700 (PDT) Received: from diaspar.rdsnet.ro (diaspar.rdsnet.ro [213.157.165.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id E5F2843D55 for ; Fri, 9 Apr 2004 10:02:40 -0700 (PDT) (envelope-from dudu@diaspar.rdsnet.ro) Received: (qmail 97105 invoked by uid 89); 9 Apr 2004 17:02:30 -0000 Received: from unknown (HELO diaspar.rdsnet.ro) (213.157.165.224) by 0 with AES256-SHA encrypted SMTP; 9 Apr 2004 17:02:30 -0000 Date: Fri, 9 Apr 2004 20:02:30 +0300 (EEST) From: Vlad GALU To: hackers@freebsd.org Message-ID: <20040409195541.I31321@qvnfcne.eqfarg.eb> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: passing messages to routing sockets X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: dudu@diaspar.rdsnet.ro List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2004 17:02:42 -0000 I understand that in order to add a new route to the routing table, one must fill a buffer with an ifa_msghdr header, followed by three socked adddress structures, representing the destination net/ip, the netmask and the gateway. While reading route(4) I encountered this: struct ifa_msghdr { .. u_int ifmam_addrs; /* like rtm_addrs */ .. } Now, the description for the rtm_addrs member of the rt_msghdr says that this should be a bitmask that identifies sockaddrs in the message sent to the routing socket. Could anyone provide a quick/small example on how to fill this member ? I don't really understand what I should write into it. Thanks in advance for any interest shown to my problem and any time spent on enlightening a poor soul :) ---- If it's there, and you can see it, it's real. If it's not there, and you can see it, it's virtual. If it's there, and you can't see it, it's transparent. If it's not there, and you can't see it, you erased it.