After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 128719 - [PATCH] Add basic FreeBSD support
[PATCH] Add basic FreeBSD support
Status: RESOLVED FIXED
Product: gnome-network
Classification: Deprecated
Component: Network information
1.99.x
Other FreeBSD
: High major
: ---
Assigned To: Germán Poo-Caamaño
Germán Poo-Caamaño
Depends on:
Blocks:
 
 
Reported: 2003-12-07 06:55 UTC by Joe Marcus Clarke
Modified: 2005-08-15 01:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add FreeBSD support (1.87 KB, patch)
2003-12-07 06:55 UTC, Joe Marcus Clarke
none Details | Review
Add FreeBSD support (8.36 KB, patch)
2003-12-07 06:57 UTC, Joe Marcus Clarke
none Details | Review
Modified diff based on developer feedback (7.74 KB, patch)
2003-12-18 03:42 UTC, Joe Marcus Clarke
none Details | Review

Description Joe Marcus Clarke 2003-12-07 06:55:07 UTC
The attached patches add basic FreeBSD support to gnome-network.  They
mainly focus on the netinfo app.  The one thing I know doesn't work is the
interface stats.  Everything else now works pretty well.

Some things you'll notice in the code are I axed the MII stuff since that
was highly Linux-specific.  I think those ifdef's are pretty safe for Linux
users, though, so no functionality lost on that end.  I also fixed what I
think is a universal bug that would cause netinfo to go into an infinite
loop if G_IO_IN was set, but the input was NULL (i.e. G_IO_HUP was also
set).  Everything else is mainly just ifdef's to parse the various
commands' output on FreeBSD.

I hope these patches can be committed in some form, plus I hope you'll keep
me  (or freebsd-gnome@freebsd.org) in mind when future porting is required.

All in all, this is a cool suite.  Thanks.
Comment 1 Joe Marcus Clarke 2003-12-07 06:55:49 UTC
Created attachment 22170 [details] [review]
Add FreeBSD support
Comment 2 Joe Marcus Clarke 2003-12-07 06:57:19 UTC
Created attachment 22171 [details] [review]
Add FreeBSD support
Comment 3 Joe Marcus Clarke 2003-12-07 06:58:02 UTC
Please ignore incomplete patch upload in attachment 22170 [details] [review].  Sorry.
Comment 4 Joe Marcus Clarke 2003-12-07 07:01:34 UTC
Forgot one other thing.  There is some string breakage in netstat.c. 
FreeBSD's netstat doesn't ouput a separate column for netmask, so I
changed the header of the Destination column to be Destination/Prefix.
 I can upload an i18n patch for this if needed.  Sorry.
Comment 5 Rodrigo Moya 2003-12-07 17:48:30 UTC
The gnome-remote-shell part looks ok and has been committed to CVS.
The rest, I'll leave that to Germán.
Comment 6 William Jon McCann 2003-12-15 22:03:15 UTC
I think using memset is preferable to using bzero.

Why do you change the socket from DGRAM to STREAM?

We are not in string freeze so you should mark the new string for
translation (if the string is actually necessary).

Could you please update your patch?  Thanks.
Comment 7 Joe Marcus Clarke 2003-12-15 22:05:17 UTC
Okay, I thought there were some other bzero instances in the code. 
I'll use memset instead.

Sorry about the SOCK_STREAM thing.  That was from some _very_ early
debugging, and somehow crept into the final patch.  I'll remove it.

How do I mark a string for translation?

Thanks.
Comment 8 Joe Marcus Clarke 2003-12-18 03:42:28 UTC
Created attachment 22529 [details] [review]
Modified diff based on developer feedback
Comment 9 Joe Marcus Clarke 2003-12-18 03:43:39 UTC
I fixed the diff to remove the SOCK_STREAM change, and use memset() in
places where I introduced bzero().  If there was already a bzero(), I
left it alone.  As for the translatable string, I precluded it with
the _(), but I'm not sure what else needs to be done to mark it for
translation.  Thanks.
Comment 10 Rodrigo Moya 2003-12-18 10:20:30 UTC
That code (socket, connect, etc) should really be changed to use
libgnetwork's socket interface.
Comment 11 James Cape 2003-12-30 20:40:01 UTC
Specifically, the GNetworkInterfaceInfo APIs...
Comment 12 alexander.winston 2004-01-02 22:10:27 UTC
Upgrading the priority to High due to the attached patches.
Comment 13 Jordi Mallach 2004-01-05 16:50:27 UTC
As for the new string, just doing _() is enough. The i18n tools
(intltool) will do the rest.
Comment 14 Germán Poo-Caamaño 2004-01-05 18:23:12 UTC
Applied the last patch in CVS.  I'll take a look to
GNetworkInterfaceInfo and open a new bug if it worth.