public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Sending raw packets on eCos
@ 2007-04-26 10:18 manesh
  2007-04-26 13:35 ` Andrew Lunn
  0 siblings, 1 reply; 13+ messages in thread
From: manesh @ 2007-04-26 10:18 UTC (permalink / raw)
  To: osdeve.mirror.rtos.ecos-discuss; +Cc: ecos-discuss

Hello,

        I am using eCos built on a Linux Synthetic Target, using a
Open BSD stack. I have mapped eth0 of eCos to eth1 of Linux.
Sending raw packets has been an issue to me. Can we send raw packets
on eCos??
I see ARP request and reply happening when the eCos is started in the
eCos capture window. From where this requests are sent and how this
requests are sent??

Regards,
Manesh


-- 
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] 13+ messages in thread

* Re: [ECOS] Sending raw packets on eCos
  2007-04-26 10:18 [ECOS] Sending raw packets on eCos manesh
@ 2007-04-26 13:35 ` Andrew Lunn
       [not found]   ` <1177738903.263455.239890@l77g2000hsb.googlegroups.com>
  2007-04-28 13:09   ` [ECOS] " manesh
  0 siblings, 2 replies; 13+ messages in thread
From: Andrew Lunn @ 2007-04-26 13:35 UTC (permalink / raw)
  To: manesh; +Cc: osdeve.mirror.rtos.ecos-discuss, ecos-discuss

On Thu, Apr 26, 2007 at 03:17:54AM -0700, manesh wrote:
> Hello,
> 
>         I am using eCos built on a Linux Synthetic Target, using a
> Open BSD stack. I have mapped eth0 of eCos to eth1 of Linux.
> Sending raw packets has been an issue to me. Can we send raw packets
> on eCos??
> I see ARP request and reply happening when the eCos is started in the
> eCos capture window. From where this requests are sent and how this
> requests are sent??

This has been discussed a few times. Did you search the archive?

     Andrew

-- 
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] 13+ messages in thread

* [ECOS] Fwd: Sending raw packets on eCos
       [not found]   ` <1177738903.263455.239890@l77g2000hsb.googlegroups.com>
@ 2007-04-28  9:53     ` manesh
  2007-04-30  8:20       ` Nick Garnett
  0 siblings, 1 reply; 13+ messages in thread
From: manesh @ 2007-04-28  9:53 UTC (permalink / raw)
  To: ecos-discuss




---------- Forwarded message ----------
From: manesh <manes...@gmail.com>
Date: Apr 28, 10:41 am
Subject: Sending raw packets on eCos
To: osdeve.mirror.rtos.ecos-discuss


Hello,
          I went through some pages of the archive, but it does'nt
give a clear picture of wether we can send ARP requests on  Linux
synthetic target??
         Actually on Linux I was able to send ARP packets since linux
network stack support "packet socket"( by which we can send and
receive the packets at the device driver level), which is not there in
eCos. Infact "rawether.c" itself sends the packet using PF_PACKET
support.

Regards,
Manesh

On Apr 26, 6:34 pm, Andrew Lunn <and...@lunn.ch> wrote:

> On Thu, Apr 26, 2007 at 03:17:54AM -0700, manesh wrote:
> > Hello,

> >         I am using eCos built on a Linux Synthetic Target, using a
> > Open BSD stack. I have mapped eth0 of eCos to eth1 of Linux.
> > Sending raw packets has been an issue to me. Can we send raw packets
> > on eCos??
> > I see ARP request and reply happening when the eCos is started in the
> > eCos capture window. From where this requests are sent and how this
> > requests are sent??

> This has been discussed a few times. Did you search the archive?

>      Andrew


-- 
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] 13+ messages in thread

* [ECOS] Re: Sending raw packets on eCos
  2007-04-26 13:35 ` Andrew Lunn
       [not found]   ` <1177738903.263455.239890@l77g2000hsb.googlegroups.com>
@ 2007-04-28 13:09   ` manesh
  1 sibling, 0 replies; 13+ messages in thread
From: manesh @ 2007-04-28 13:09 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: ecos-discuss



On Apr 26, 6:34 pm, Andrew Lunn <and...@lunn.ch> wrote:
> On Thu, Apr 26, 2007 at 03:17:54AM -0700, manesh wrote:
> > Hello,
>
> >         I am using eCos built on a Linux Synthetic Target, using a
> > Open BSD stack. I have mapped eth0 of eCos to eth1 of Linux.
> > Sending raw packets has been an issue to me. Can we send raw packets
> > on eCos??
> > I see ARP request and reply happening when the eCos is started in the
> > eCos capture window. From where this requests are sent and how this
> > requests are sent??
>
> This has been discussed a few times. Did you search the archive?
>
>      Andrew
>
> --
> Before posting, please read the FAQ:http://ecos.sourceware.org/fom/ecos
> and search the list archive:http://ecos.sourceware.org/ml/ecos-discuss


-- 
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] 13+ messages in thread

* Re: [ECOS] Fwd: Sending raw packets on eCos
  2007-04-28  9:53     ` [ECOS] Fwd: " manesh
@ 2007-04-30  8:20       ` Nick Garnett
  2007-04-30  9:53         ` [ECOS] " manesh
  0 siblings, 1 reply; 13+ messages in thread
From: Nick Garnett @ 2007-04-30  8:20 UTC (permalink / raw)
  To: manesh; +Cc: ecos-discuss

 manesh <manesh.v@gmail.com> writes:

> Hello,
>           I went through some pages of the archive, but it does'nt
> give a clear picture of wether we can send ARP requests on  Linux
> synthetic target??
>          Actually on Linux I was able to send ARP packets since linux
> network stack support "packet socket"( by which we can send and
> receive the packets at the device driver level), which is not there in
> eCos. Infact "rawether.c" itself sends the packet using PF_PACKET
> support.

Clearly, you cannot use Linux interfaces anywhere else other than the
synthetic target. On a real target you can only use the BSD stack,
which is quite different from Linux in this area.

But why do you want to send ARP requests at all? The BSD stack has its
own ARP support already built in, there is no reason for applications
to do their own ARP processing.

-- 
Nick Garnett                                     eCos Kernel Architect
eCosCentric Limited     http://www.eCosCentric.com/   The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK.    Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.


-- 
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] 13+ messages in thread

* [ECOS] Re: Fwd: Sending raw packets on eCos
  2007-04-30  8:20       ` Nick Garnett
@ 2007-04-30  9:53         ` manesh
  2007-04-30 10:16           ` Nick Garnett
  0 siblings, 1 reply; 13+ messages in thread
From: manesh @ 2007-04-30  9:53 UTC (permalink / raw)
  To: Nick Garnett; +Cc: ecos-discuss, osdeve. mirror. rtos. ecos-discuss

> Clearly, you cannot use Linux interfaces anywhere else other than the
> synthetic target. On a real target you can only use the BSD stack,
> which is quite different from Linux in this area.
>
> But why do you want to send ARP requests at all? The BSD stack has its
> own ARP support already built in, there is no reason for applications
> to do their own ARP processing.
>
> --
> Nick Garnett                                     eCos Kernel Architect
> eCosCentric Limited    http://www.eCosCentric.com/  The eCos experts
> Barnwell House, Barnwell Drive, Cambridge, UK.    Tel: +44 1223 245571
> Registered in England and Wales: Reg No 4422071.

     I need to use ARP packet, to check the host IP address if it is
already in use. This check is usually performed by the eCos network
thread, at the OS start up, but I need this to happen at periodic
intervals. Its a basic "whois" frame which I need to send. There is
another option by sending an ICMP request, but which I am not supposed
to do.
     Can I use any functions of the built in support?

Regards
Manesh


-- 
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] 13+ messages in thread

* Re: [ECOS] Re: Fwd: Sending raw packets on eCos
  2007-04-30  9:53         ` [ECOS] " manesh
@ 2007-04-30 10:16           ` Nick Garnett
       [not found]             ` <1177930381.251419.318920@y5g2000hsa.googlegroups.com>
  0 siblings, 1 reply; 13+ messages in thread
From: Nick Garnett @ 2007-04-30 10:16 UTC (permalink / raw)
  To: manesh; +Cc: ecos-discuss

 manesh <manesh.v@gmail.com> writes:

>      I need to use ARP packet, to check the host IP address if it is
> already in use. This check is usually performed by the eCos network
> thread, at the OS start up, but I need this to happen at periodic
> intervals. Its a basic "whois" frame which I need to send. There is
> another option by sending an ICMP request, but which I am not supposed
> to do.

The host's IP address should be allocated either statically, or via
DHCP. In the former case it is fixed for the network, in the latter
the DHCP thread will keep it alive. I don't see any need to continue
to probe for it with ARP requests.

>      Can I use any functions of the built in support?

I don't think so,

-- 
Nick Garnett                                     eCos Kernel Architect
eCosCentric Limited     http://www.eCosCentric.com/   The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK.    Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.


-- 
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] 13+ messages in thread

* [ECOS] Re: Fwd: Sending raw packets on eCos
       [not found]             ` <1177930381.251419.318920@y5g2000hsa.googlegroups.com>
@ 2007-04-30 11:08               ` Nick Garnett
  2007-04-30 13:52                 ` Grant Edwards
  2007-05-01 15:42                 ` manesh
  0 siblings, 2 replies; 13+ messages in thread
From: Nick Garnett @ 2007-04-30 11:08 UTC (permalink / raw)
  To: manesh, ecos-discuss



Please keep the discussion on the message board.


 manesh <manesh.v@gmail.com> writes:

> > The host's IP address should be allocated either statically, or via
> > DHCP. In the former case it is fixed for the network, in the latter
> > the DHCP thread will keep it alive. I don't see any need to continue
> > to probe for it with ARP requests.
> >
> > >      Can I use any functions of the built in support?
> >
> > I don't think so,

> 
> Thank you for the info.....


I'm still interested to know what you are trying to achieve here.


>                 So I believe the frames should be sent as raw ethernet
> frames...All the handling should be done in the application.
>                 As I ran through the archives there were some
> suggestions to use eth_drive_write() and eth_drive_read() found in
> eth_drv.c. I think these are internal functions used by eCos, which
> cannot be used in our application.
>                 Please if you can mention the names of the API's for
> raw ethernet I/O it would be very helpful..

You have already named them above. Those are the only APIs
available. However, they are closely linked in to the BSD stack and it
will be hard to use them from application level.

-- 
Nick Garnett                                     eCos Kernel Architect
eCosCentric Limited     http://www.eCosCentric.com/   The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK.    Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.


-- 
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] 13+ messages in thread

* [ECOS]  Re: Fwd: Sending raw packets on eCos
  2007-04-30 11:08               ` Nick Garnett
@ 2007-04-30 13:52                 ` Grant Edwards
  2007-04-30 13:58                   ` Andrew Lunn
  2007-05-01 15:42                 ` manesh
  1 sibling, 1 reply; 13+ messages in thread
From: Grant Edwards @ 2007-04-30 13:52 UTC (permalink / raw)
  To: ecos-discuss

On 2007-04-30, Nick Garnett <nickg@ecoscentric.com> wrote:

>>  So I believe the frames should be sent as raw ethernet
>>  frames...All the handling should be done in the application.
>>  As I ran through the archives there were some suggestions to
>>  use eth_drive_write() and eth_drive_read() found in
>>  eth_drv.c. I think these are internal functions used by eCos,
>>  which cannot be used in our application. Please if you can
>>  mention the names of the API's for raw ethernet I/O it would
>>  be very helpful..
>
> You have already named them above. Those are the only APIs
> available. However, they are closely linked in to the BSD
> stack and it will be hard to use them from application level.

I too would be interested in a way to send/receive raw Ethernet
packets.  The products I work on have to support a propritary
Ethernet protocol, and in the past we've always had to write
our own Ethernet drivers that implimented a normal
cyg_io_read/write() API in addition to the BSD network stack
API.

Obviously, some way to send/receive raw Ethernet packets (akin
to socket(AF_PACKET, SOCK_RAW, protoNumer) under Linux) would
save us a lot of work.

-- 
Grant Edwards                   grante             Yow! What's the MATTER
                                  at               Sid? ... Is your BEVERAGE
                               visi.com            unsatisfactory?


-- 
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] 13+ messages in thread

* Re: [ECOS]  Re: Fwd: Sending raw packets on eCos
  2007-04-30 13:52                 ` Grant Edwards
@ 2007-04-30 13:58                   ` Andrew Lunn
  2007-04-30 14:15                     ` Grant Edwards
  0 siblings, 1 reply; 13+ messages in thread
From: Andrew Lunn @ 2007-04-30 13:58 UTC (permalink / raw)
  To: Grant Edwards; +Cc: ecos-discuss

> Obviously, some way to send/receive raw Ethernet packets (akin
> to socket(AF_PACKET, SOCK_RAW, protoNumer) under Linux) would
> save us a lot of work.

Have you looked at porting the FreeBSD equivalent of SOCK_RAW. With
any luck you just need to drop in a few files and it runs.

    Andrew

-- 
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] 13+ messages in thread

* [ECOS]  Re: Fwd: Sending raw packets on eCos
  2007-04-30 13:58                   ` Andrew Lunn
@ 2007-04-30 14:15                     ` Grant Edwards
  0 siblings, 0 replies; 13+ messages in thread
From: Grant Edwards @ 2007-04-30 14:15 UTC (permalink / raw)
  To: ecos-discuss

On 2007-04-30, Andrew Lunn <andrew@lunn.ch> wrote:

>> Obviously, some way to send/receive raw Ethernet packets (akin
>> to socket(AF_PACKET, SOCK_RAW, protoNumer) under Linux) would
>> save us a lot of work.
>
> Have you looked at porting the FreeBSD equivalent of SOCK_RAW.
> With any luck you just need to drop in a few files and it
> runs.

No, I don't think anybody's looked into that.  It would be nice
to have standardized support, though it would mean giving up
the zero-copy feature of our current implementation. I've
always been a little surprised that there wasn't more demand
for the ability to support proprietary protocols in eCos
embedded devices.

-- 
Grant Edwards                   grante             Yow! Are you still an
                                  at               ALCOHOLIC?
                               visi.com            


-- 
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] 13+ messages in thread

* [ECOS] Re: Fwd: Sending raw packets on eCos
  2007-04-30 11:08               ` Nick Garnett
  2007-04-30 13:52                 ` Grant Edwards
@ 2007-05-01 15:42                 ` manesh
  2007-05-01 16:23                   ` Nick Garnett
  1 sibling, 1 reply; 13+ messages in thread
From: manesh @ 2007-05-01 15:42 UTC (permalink / raw)
  To: Nick Garnett; +Cc: osdeve_mirror_rtos_ecos-discuss, ecos-discuss


Nick Garnett wrote:
> Please keep the discussion on the message board.
>
>
>  manesh <manesh.v@gmail.com> writes:
>
> > > The host's IP address should be allocated either statically, or via
> > > DHCP. In the former case it is fixed for the network, in the latter
> > > the DHCP thread will keep it alive. I don't see any need to continue
> > > to probe for it with ARP requests.
> > >
> > > >      Can I use any functions of the built in support?
> > >
> > > I don't think so,
>
> >
> > Thank you for the info.....
>
>
> I'm still interested to know what you are trying to achieve here.
    We are trying to implement IPv4LL support on eCos which is used to
dynamically configure the IP address on dhcp failure. This is kept
active by sending ARP requests  at regular intervals.
>
>
> >                 So I believe the frames should be sent as raw ethernet
> > frames...All the handling should be done in the application.
> >                 As I ran through the archives there were some
> > suggestions to use eth_drive_write() and eth_drive_read() found in
> > eth_drv.c. I think these are internal functions used by eCos, which
> > cannot be used in our application.
> >                 Please if you can mention the names of the API's for
> > raw ethernet I/O it would be very helpful..
>
> You have already named them above. Those are the only APIs
> available. However, they are closely linked in to the BSD stack and it
> will be hard to use them from application level.

I received linker errors : undefined reference to eth_drive_write()
when I tried to use that.

Regards
Manesh


-- 
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] 13+ messages in thread

* Re: [ECOS] Re: Fwd: Sending raw packets on eCos
  2007-05-01 15:42                 ` manesh
@ 2007-05-01 16:23                   ` Nick Garnett
  0 siblings, 0 replies; 13+ messages in thread
From: Nick Garnett @ 2007-05-01 16:23 UTC (permalink / raw)
  To: manesh; +Cc: ecos-discuss

 manesh <manesh.v@gmail.com> writes:

> Nick Garnett wrote:

> > I'm still interested to know what you are trying to achieve here.

>     We are trying to implement IPv4LL support on eCos which is used to
> dynamically configure the IP address on dhcp failure. This is kept
> active by sending ARP requests  at regular intervals.

I evaluated IPv4LL support myself a while ago. I believe I know how to
make it work, although have not done so yet. However, since this was
in the context of a commercial contract, I'm not really at liberty to
say anything more about it here.

You can, of course, contact eCosCentric to discuss a contractual
arrangement. See the link in my sig.

> > You have already named them above. Those are the only APIs
> > available. However, they are closely linked in to the BSD stack and it
> > will be hard to use them from application level.
> 
> I received linker errors : undefined reference to eth_drive_write()
> when I tried to use that.

Even if you could link against the functions, I'm not sure they would
be usable from the application. 

-- 
Nick Garnett                                     eCos Kernel Architect
eCosCentric Limited     http://www.eCosCentric.com/   The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK.    Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.


-- 
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] 13+ messages in thread

end of thread, other threads:[~2007-05-01 16:23 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-26 10:18 [ECOS] Sending raw packets on eCos manesh
2007-04-26 13:35 ` Andrew Lunn
     [not found]   ` <1177738903.263455.239890@l77g2000hsb.googlegroups.com>
2007-04-28  9:53     ` [ECOS] Fwd: " manesh
2007-04-30  8:20       ` Nick Garnett
2007-04-30  9:53         ` [ECOS] " manesh
2007-04-30 10:16           ` Nick Garnett
     [not found]             ` <1177930381.251419.318920@y5g2000hsa.googlegroups.com>
2007-04-30 11:08               ` Nick Garnett
2007-04-30 13:52                 ` Grant Edwards
2007-04-30 13:58                   ` Andrew Lunn
2007-04-30 14:15                     ` Grant Edwards
2007-05-01 15:42                 ` manesh
2007-05-01 16:23                   ` Nick Garnett
2007-04-28 13:09   ` [ECOS] " manesh

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).