From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 24 13:54:26 2011 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D0D81065670 for ; Mon, 24 Jan 2011 13:54:26 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from smtp2.dlr.de (smtp1.dlr.de [129.247.252.32]) by mx1.freebsd.org (Postfix) with ESMTP id 13EEE8FC13 for ; Mon, 24 Jan 2011 13:54:25 +0000 (UTC) Received: from DLREXHUB01.intra.dlr.de ([172.21.152.130]) by smtp2.dlr.de with Microsoft SMTPSVC(6.0.3790.4675); Mon, 24 Jan 2011 14:33:16 +0100 Received: from beagle.kn.op.dlr.de (129.247.178.136) by smtp.dlr.de (172.21.152.151) with Microsoft SMTP Server (TLS) id 14.1.270.1; Mon, 24 Jan 2011 14:33:15 +0100 Date: Mon, 24 Jan 2011 14:33:16 +0100 From: Harti Brandt X-X-Sender: brandt_h@beagle.kn.op.dlr.de To: Eugene Grosbein In-Reply-To: <4D3C43EE.8060307@rdtc.ru> Message-ID: <20110124143206.V47002@beagle.kn.op.dlr.de> References: <4D3C43EE.8060307@rdtc.ru> X-OpenPGP-Key: harti@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [129.247.178.136] X-OriginalArrivalTime: 24 Jan 2011 13:33:16.0427 (UTC) FILETIME=[41A4DDB0:01CBBBCB] Cc: hackers@freebsd.org, "net@freebsd.org" Subject: Re: Querying bsnmpd through /var/run/snmpd.sock X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Harti Brandt List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jan 2011 13:54:26 -0000 On Sun, 23 Jan 2011, Eugene Grosbein wrote: EG>bsnmpd running with mibII module opens local socket /var/run/snmpd.sock EG>mentioned in snmp_mibII(3) manual page: EG> EG> The mibII module opens a socket that is used to execute all network EG> related ioctl(2) functions. This socket is globally available under the EG> name mib_netsock. EG> EG>How do I use the socket? I hope to be able to call mib_find_if_sys() function EG>from another process using the socket. Is there a documentation for this? The socket works just like a UDP socket with the additional plus that the daemon knows whether you're root or not. As I said in my previous mail, easiest would be to implement an additional table with the sysindex as index and ifIndex as a row. harti