From owner-freebsd-mono@FreeBSD.ORG Tue Sep 23 22:56:52 2014 Return-Path: Delivered-To: freebsd-mono@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A7DDFE2 for ; Tue, 23 Sep 2014 22:56:52 +0000 (UTC) Received: from marvin.blogreen.org (marvin.blogreen.org [IPv6:2001:470:1f13:b9c::2]) by mx1.freebsd.org (Postfix) with ESMTP id 3DA097D9 for ; Tue, 23 Sep 2014 22:56:52 +0000 (UTC) Received: by marvin.blogreen.org (Postfix, from userid 1001) id 6475D18F71A; Wed, 24 Sep 2014 00:56:44 +0200 (CEST) Date: Wed, 24 Sep 2014 00:56:44 +0200 From: Romain =?iso-8859-1?Q?Tarti=E8re?= To: Ben Woods Subject: Re: Mono expecting /proc/net/route Message-ID: <20140923225644.GA73505@FreeBSD.org> Mail-Followup-To: Ben Woods , freebsd-mono@freebsd.org References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pf9I7BMVVzbSWLtt" Content-Disposition: inline In-Reply-To: X-PGP-Key: http://romain.blogreen.org/pubkey.asc User-Agent: Mutt/1.5.23 (2014-03-12) Cc: freebsd-mono@freebsd.org X-BeenThere: freebsd-mono@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Mono and C# applications on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Sep 2014 22:56:52 -0000 --pf9I7BMVVzbSWLtt Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi On Fri, Sep 19, 2014 at 11:03:27PM +0800, Ben Woods wrote: > In the process of trying to get http://mediabrowser.tv/ to work on FreeBS= D, > I have come across a bug in the port of mono to FreeBSD where it expects = to > be able to use /proc/net/route to find the IP address of the computer. >=20 > Reviewing the mono code it appears it expects a few other things from /pr= oc > which don't exist in FreeBSD, even with linprocfs (e.g. /proc/net/snmp). > https://github.com/mono/mono/search?utf8=3D%E2%9C%93&q=3D%22proc%2Fnet%22= &type=3DCode >=20 > Any ideas about the best way to resolve this? >=20 > More details with my specific issues relating to MediaBrowser can be found > here: > http://mediabrowser.tv/community/index.php?/topic/2636-mb3-on-freenas-plu= gin/page-4 Are you refering to this? https://github.com/mono/mono/blob/effa4c07ba850bedbe1ff54b2a5df281c058ebcb/= mcs/class/System/System.Net.NetworkInformation/IPInterfaceProperties.cs#L77 AFAICR, the information should be available from a sysctl (what netstat(8) does) or from a PF_ROUTE socket (what route(8) does), but it may be easier to parse the output of netstat(8) instead of reimplementing parts of netstat(8) or route(8) in managed code=E2=80=A6 If you have a patch, feel free to share it here so that I can include it ;-) --=20 Romain Tarti=C3=A8re http://people.FreeBSD.org/~romai= n/ pgp: 8234 9A78 E7C0 B807 0B59 80FF BA4D 1D95 5112 336F (ID: 0x5112336F) (plain text =3Dnon-HTML=3D PGP/GPG encrypted/signed e-mail much appreciated) --pf9I7BMVVzbSWLtt Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQGcBAEBAgAGBQJUIfqsAAoJELpNHZVREjNv40kL/2zbZYp8CuLBk+sEhZQsckEj rriMhVoQSBaxxyQRF3slMh3BjUPGwC0lZFeytMrd8Za7mYA0EGVJnlzsA6AcCI/a EN+/UGBuoqtVMg9Y+Wf657x9lWqcqoT8rsVUoGPr2DrsEiHFJoJvwT5VkYOll4Tc ZGI2i7poFjBJ3XTi1A7qk5rUDeLk4YwKUVJw3tzQdYxDXPXpNNS5jdC8/d/K7N3F lm3gf5kXNhiVpcp5Xa9G5rOSvBSTXgtgFXfQ4V9MxPplMVaSt1YtzypCka1TTawx EJ94WIHz/euFwUl4hbvfft6h14hpWYIVwclfG8s7lK/tr2RkrBR6ABY6rktppU4V cvNgw1DpXM0y6oF0xCn75uhusQM+7ba4nsfZSfFwRbBenWw5G32orA8S+K+hAs5l 7y57OLBJFo5doaj0SdOgg/ZkkXQqZA0cj70wD0objiT+TCWBz+6G0ciA+AvyqJFS hnIoxkVib8/VTn4M3eAybqWH9hIGxjnsGH8j8st14Q== =Ehtn -----END PGP SIGNATURE----- --pf9I7BMVVzbSWLtt--