In article <[EMAIL PROTECTED]> you wrote:
> I need an explanation of what exactly the 'link encap' field returned
> by ifconfig means in relationship to an interface. Information about
> how to change it and where it comes from would be a tremendous help.

It returns the hardware family of the  Interface. See:

   if (ioctl(skfd, SIOCGIFHWADDR, &ifr) < 0)
        memset(ife->hwaddr, 0, 32);
    else
        memcpy(ife->hwaddr, ifr.ifr_hwaddr.sa_data, 8);

    ife->type = ifr.ifr_hwaddr.sa_family;

Normally  you can't change  it. Or only in some limited way (different
ethernet oncoding styles). 

In case of tun interfaces it is IMHO changed by attaching it. Normally in
tun-mode the device is set up as PPP, in TAP mode it is set up as Ethernet.
In the unspec case I guess it is set up wrong, and this ImHO means the user
mode program is not matching the kernel version (i.e. expecting another
ioctl or device). 

There is also a tunctl command, not sure if it helps you.

Greetings
Bernd




-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to