Am 15.06.2009, 11:22 Uhr, schrieb Frédéric Bron :
To fix your application, call either
struct ifconf ifc;
ifc.ifc_len = sizeof (struct ifreq) * 32;
ifc.ifc_buf = malloc (ifc.ifc_len);
if (ioctl (fd, SIOCGIFCONF, &ifc))
/* Resize ifc_buf and retry */
else
{
struct ifreq *ifr = if
On Jun 16 11:56, Fr?d?ric Bron wrote:
> > I applied a patch to Cygwin which also reports the IPv4 addresses of
> > disconnected interfaces, fetching the info from the registry. It's
> > a pity that Windows doesn't correctly report these addresses in the
> > official API.
> >
> > This won't work fo
> I applied a patch to Cygwin which also reports the IPv4 addresses of
> disconnected interfaces, fetching the info from the registry. It's
> a pity that Windows doesn't correctly report these addresses in the
> official API.
>
> This won't work for IPv6 and IPv6-only interfaces. I didn't find a
On Jun 15 13:42, Corinna Vinschen wrote:
> On Jun 15 11:22, Fr?d?ric Bron wrote:
> > > To fix your application, call either
> > >
> > > struct ifconf ifc;
> > > ifc.ifc_len = sizeof (struct ifreq) * 32;
> > > ifc.ifc_buf = malloc (ifc.ifc_len);
> > > if (ioctl (fd, SIOCGIFCONF, &ifc))
> > >
On Jun 15 11:22, Fr?d?ric Bron wrote:
> > To fix your application, call either
> >
> > struct ifconf ifc;
> > ifc.ifc_len = sizeof (struct ifreq) * 32;
> > ifc.ifc_buf = malloc (ifc.ifc_len);
> > if (ioctl (fd, SIOCGIFCONF, &ifc))
> > /* Resize ifc_buf and retry */
> > else
> > {
> >
> To fix your application, call either
>
> struct ifconf ifc;
> ifc.ifc_len = sizeof (struct ifreq) * 32;
> ifc.ifc_buf = malloc (ifc.ifc_len);
> if (ioctl (fd, SIOCGIFCONF, &ifc))
> /* Resize ifc_buf and retry */
> else
> {
> struct ifreq *ifr = ifc.ifc_req;
> struct ifreq ifr
On Jun 12 14:30, Fr?d?ric Bron wrote:
> I used the following program to obtain mac address and ip of network
> adpaters. It works fine with 1.5 but not with 1.7.
>
> Output with 1.5:
> sock=3
> trying eth0
> mac: 00.1f.3c.57.XX.XX, ip: XXX.XXX.XXX.XXX
> trying eth1
> mac: 00.1d.09.df.XX.XX, ip: XX
I used the following program to obtain mac address and ip of network
adpaters. It works fine with 1.5 but not with 1.7.
Output with 1.5:
sock=3
trying eth0
mac: 00.1f.3c.57.XX.XX, ip: XXX.XXX.XXX.XXX
trying eth1
mac: 00.1d.09.df.XX.XX, ip: XXX.XXX.XXX.XXX
trying eth2
mac: 08.00.27.00.XX.XX, ip: XX
8 matches
Mail list logo