[hpsdr] Patch for KISS Konsole and Linux

Takafumi INOUE ji3gab at yahoo.com
Sun Sep 14 07:53:33 PDT 2014


Hi All,

I tried to confirm whether John's patch for Mac OS affect  the execution
of KK on Linux.

I checked out K9TRV branch of KK. It compiled on my Ubuntu environment
(14.04, X86_64) with some warnings. It ran fine.

Then I applied John Laur's patch for Mac OS and tried to build on Linux.
Compilation was completed but it crashes when the on/off
button is pressed.

Does anybody have similar experience?

>From the error message and using monodevelp it seems that the
IPInfoTools.GetIPv4Mask() method fails to get subnetmask and returns
null.

I may be missing something, but I don't think the patched code runs on
Linux as expected.

The sockaddr (and sockaddr_in) structure is different between Linux
ans Mac OS (4.3BSD flavor).

Mac OS:

  struct sockaddr {
    u_char sa_len; /* length */
    u_char sa_family;  /* address family */
    char sa_data[14]; 
  };

Linux:

  struct sockaddr {
    u_short sa_family;
    char sa_data[14];
  }

As the value of "address family" is less than 256 and we usually run
this program on little endian machines, the second byte of the
structure on Linux is zero. So the sa_family variable in
IPInfoTools.GetIPv4Mask() is always set to zero.

I can not think of a good quick solution for this now.

Again apologize if I'm missing something obvious.

Takafumi
JI3GAB



More information about the Hpsdr mailing list