Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 06 Nov 2014 10:09:23 +0000
From:      bugzilla-noreply@freebsd.org
To:        mono@FreeBSD.org
Subject:   [Bug 194660] lang/mono Use netstat to get routes instead of /proc/net/route
Message-ID:  <bug-194660-23699-7cTvJYzKYz@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-194660-23699@https.bugs.freebsd.org/bugzilla/>
References:  <bug-194660-23699@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D194660

--- Comment #8 from Romain Tarti=C3=A8re <romain@FreeBSD.org> ---
The "problem" is that this implementation spawns a new process, and this ki=
nd
of situation should be avoided if possible.  Moreover, each netstat
implementation will have slight differences in it's output, so the code mig=
ht
quickly become hard to maintain=E2=80=A6


Since executing netstat look nearly unavoidable on FreeBSD (and maybe MacOS=
),
using a switch / case to detect the platform and do the right thing (read
/proc/net/route on Linux, run and parse FreeBSD's netstat output on FreeBSD,
run and parse MacOS's netstat output on MacOS, =E2=80=A6) instead of trying=
 one
solution and falling back on another would be more elegant (think about the
code you changed in attachment 149099).

While here, using a full path to the program would be more reliable (in case
$PATH does not contain a 'netstat' command or if the user has a custom
'netstat' in his PATH that takes precedence).

There may be additional things to take into account, I guess the mono team
would help formalizing this.  I'll point them here so that they may provide
further feedback.

--=20
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-194660-23699-7cTvJYzKYz>