public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Ethernet Link status
@ 2007-09-27  7:46 Emmanuel Coullien
  2007-09-27 11:17 ` Gary Thomas
  0 siblings, 1 reply; 4+ messages in thread
From: Emmanuel Coullien @ 2007-09-27  7:46 UTC (permalink / raw)
  To: ecos-discuss

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ECOS] Ethernet Link status
  2007-09-27  7:46 [ECOS] Ethernet Link status Emmanuel Coullien
@ 2007-09-27 11:17 ` Gary Thomas
  0 siblings, 0 replies; 4+ messages in thread
From: Gary Thomas @ 2007-09-27 11:17 UTC (permalink / raw)
  To: Emmanuel Coullien; +Cc: ecos-discuss

Emmanuel Coullien wrote:
> 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 ?
> 

Thanks. I've applied a similar, but equivalent, change.

In the future, if you find a change that you think needs to
be made, send a proper patch, along with a ChangeLog entry,
to ecos-patches@ecos.sourceware.org.  We'll discuss and
consider the change, and apply as required.

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ECOS] ethernet link status
  2004-08-25 13:51 [ECOS] ethernet link status Ambrogio
@ 2004-08-25 15:13 ` Ambrogio
  0 siblings, 0 replies; 4+ messages in thread
From: Ambrogio @ 2004-08-25 15:13 UTC (permalink / raw)
  To: ecos-discuss; +Cc: ecos-discuss

Dear all

On application using eCos it's possible to know the ethernet phisical
link status (eth0 or eth1)? It's possible to know if the link is active
(or down) whitout send packet over the link?

I so, I think it is a stupid question but afther two working day have no
solution for this problem.

Thanks in advance
Best regard for every answer (also a ... kill me).

By
Ambrogio




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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ECOS] ethernet link status
@ 2004-08-25 13:51 Ambrogio
  2004-08-25 15:13 ` Ambrogio
  0 siblings, 1 reply; 4+ messages in thread
From: Ambrogio @ 2004-08-25 13:51 UTC (permalink / raw)
  To: ecos-discuss; +Cc: ecos-discuss

Dear all

On application using eCos it's possible to know the ethernet phisical
link status (eth0 or eth1)? It's possible to know if the link is active
(or down) whitout send packet over the link?

I so, I think it is a stupid question but afther two working day have no
solution for this problem.

Thanks in advance
Best regard for every answer (also a ... kill me).

By
Ambrogio




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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-09-27 11:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-27  7:46 [ECOS] Ethernet Link status Emmanuel Coullien
2007-09-27 11:17 ` Gary Thomas
  -- strict thread matches above, loose matches on Subject: below --
2004-08-25 13:51 [ECOS] ethernet link status Ambrogio
2004-08-25 15:13 ` Ambrogio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).