[ECOS] Ethernet Link status

Emmanuel Coullien coullien.emmanuel@gmail.com
Thu Sep 27 07:46:00 GMT 2007


Hi,

I tryed to know what was the Ethernet link status from the application
level using ioctl but I think it miss some code in the BSD_TCPIP
package to pass over this layer.
In fact, it misses the case for SIOCGSTATUS in the BSD_TCPIP layer, so
 I had to add the lines below in the if.c file and now we can get the
link status.
 	case SIOCGIFSTATUS:
	case SIOCGIFSTATS:
	case SIOCGIFSTATSUD:
		if (ifp->if_ioctl == 0)
			{
			return (EOPNOTSUPP);
			}
		return ((*ifp->if_ioctl)(ifp, cmd, data));

What do you think about these modifications. Is it possible to patch
it in eCos ?

-- 
Emmanuel Coullien

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list