[Haskell-beginners] Re: ffi woes

Stephen Tetley stephen.tetley at gmail.com
Fri Feb 19 16:28:36 EST 2010


I think I've found a version 30 from Debian's archive - the essid
string is fixed length, rather than sized by essid_len (even though
essid_len is now in the struct). Is this the same as the version you

/* Structure for storing all wireless information for each device
 * This is a cut down version of the one above, containing only
 * the things *truly* needed to configure a card.
 * Don't add other junk, I'll remove it... */
typedef struct wireless_config
  char		name[IFNAMSIZ + 1];	/* Wireless/protocol name */
  int		has_nwid;
  iwparam	nwid;			/* Network ID */
  int		has_freq;
  double	freq;			/* Frequency/channel */
  int		freq_flags;
  int		has_key;
  unsigned char	key[IW_ENCODING_TOKEN_MAX];	/* Encoding key used */
  int		key_size;		/* Number of bytes */
  int		key_flags;		/* Various flags */
  int		has_essid;
  int		essid_on;
  char		essid[IW_ESSID_MAX_SIZE + 2];	/* ESSID (extended network) */
  int		essid_len;
  int		has_mode;
  int		mode;			/* Operation mode */
} wireless_config;

Best wishes


More information about the Beginners mailing list