* Re: [ECOS] Ethernet Link status
[not found] <3fae21000709270046v974f8d5ne0514658da35e542@mail.gmail.com>
@ 2007-09-27 11:18 ` Gary Thomas
0 siblings, 0 replies; only message in thread
From: Gary Thomas @ 2007-09-27 11:18 UTC (permalink / raw)
To: Emmanuel Coullien; +Cc: eCos patches
[-- Attachment #1: Type: text/plain, Size: 1037 bytes --]
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 ?
>
Emmanuel,
The attached patch is what was applied. Note the form and
the mailing list address - this is the acceptable way of
applying for patches/changes to eCos.
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 1547 bytes --]
Index: net/bsd_tcpip/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos-opt/net/net/bsd_tcpip/current/ChangeLog,v
retrieving revision 1.65
diff -u -5 -p -r1.65 ChangeLog
--- net/bsd_tcpip/current/ChangeLog 11 Sep 2007 16:37:53 -0000 1.65
+++ net/bsd_tcpip/current/ChangeLog 27 Sep 2007 11:13:44 -0000
@@ -1,5 +1,10 @@
+2007-09-27 Gary Thomas <gary@mlbassoc.com>
+
+ * src/sys/net/if.c (ifioctl): Add missing ioctl functions
+ (SIOCGIFSTATSUD, SIOCGIFSTATS) Reported by Emmanuel Coullien.
+
2007-09-11 Daniel Néri <daniel.neri@sigicom.se>
* include/sys/socketvar.h: Fix very old and subtle macro bug. From
FreeBSD revision 1.141.2.3 (RELENG_6 branch): "correctly return an
error if M_NOWAIT is passed to sblock() and the operation might
Index: net/bsd_tcpip/current/src/sys/net/if.c
===================================================================
RCS file: /misc/cvsfiles/ecos-opt/net/net/bsd_tcpip/current/src/sys/net/if.c,v
retrieving revision 1.7
diff -u -5 -p -r1.7 if.c
--- net/bsd_tcpip/current/src/sys/net/if.c 30 Jul 2005 11:23:30 -0000 1.7
+++ net/bsd_tcpip/current/src/sys/net/if.c 27 Sep 2007 11:13:45 -0000
@@ -1252,10 +1252,12 @@ ifioctl(so, cmd, data, p)
case SIOCGIFPSRCADDR:
case SIOCGIFPDSTADDR:
case SIOCGLIFPHYADDR:
case SIOCGIFMEDIA:
case SIOCGIFGENERIC:
+ case SIOCGIFSTATS:
+ case SIOCGIFSTATSUD:
if (ifp->if_ioctl == 0)
return (EOPNOTSUPP);
return ((*ifp->if_ioctl)(ifp, cmd, data));
case SIOCSIFLLADDR:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-09-27 11:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <3fae21000709270046v974f8d5ne0514658da35e542@mail.gmail.com>
2007-09-27 11:18 ` [ECOS] Ethernet Link status Gary Thomas
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).