public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Sending ARP packets without PF_PACKET support
@ 2003-11-07 13:47 Sebax
  2003-11-07 14:54 ` Andrew Lunn
  0 siblings, 1 reply; 3+ messages in thread
From: Sebax @ 2003-11-07 13:47 UTC (permalink / raw)
  To: ecos-discuss

Hi,
As far as I know the easiest way to forge ARP request on a Linux system is to use the PF_PACKET socket.
As this is not supported by eCOS , how can I obtain the same result ?
I have tried with a AF_INET,SOCK_RAW socket combined with a sendto but sendto always return an error "Unreachable network"

Your help will bre greatly appreciate.
Have a nice day

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

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

* Re: [ECOS] Sending ARP packets without PF_PACKET support
  2003-11-07 13:47 [ECOS] Sending ARP packets without PF_PACKET support Sebax
@ 2003-11-07 14:54 ` Andrew Lunn
       [not found]   ` <002601c3a550$efa34fd0$f408a8c0@eliosinformatique.fr>
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Lunn @ 2003-11-07 14:54 UTC (permalink / raw)
  To: Sebax; +Cc: ecos-discuss

On Fri, Nov 07, 2003 at 12:04:19PM +0100, Sebax wrote:
> Hi,

> As far as I know the easiest way to forge ARP request on a Linux
> system is to use the PF_PACKET socket.

PF_PACKET is a linux extension. You need to find out how to do the
same on FreeBSD which is what the eCos stack is.

Out of interest, why do you want to forge ARP requests anyway?

    Andrew

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

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

* [ECOS] Re: RE : [ECOS] Sending ARP packets without PF_PACKET support
       [not found]   ` <002601c3a550$efa34fd0$f408a8c0@eliosinformatique.fr>
@ 2003-11-08 12:29     ` Andrew Lunn
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2003-11-08 12:29 UTC (permalink / raw)
  To: S?bastien COURET; +Cc: eCos Disuss



On Fri, Nov 07, 2003 at 06:02:28PM +0100, S?bastien COURET wrote:
> Thanks for your quick answer,

No problem, but please don't send mail to me directly without it also
going to the list. Some people make a business out of giving support
for eCos.

> My goal is to port an open source  DHCP server (udhcp) to eCOS.
 
OK. Watch out for the licence. Its GPL, so you will have to make your
whole system GPL.

> But this server is issuing ARP request to check that the IP adress it's
> going to lease is not used in the network. 
> 
> This is originaly done through the PF_PACKET API, that's why i'm seeking
> an alternative to obtain the same result on eCOS.
> (FreeBSD is now providing this API but eCOS don't ...)

Are you sure FreeBSD has PF_PACKET? I just grep'd the FreeBSD CVS from
today for F_PACKET and there was no match!

What you want to do is look at the portable routines for doing stuff
like this, libpcap etc. But this will probably mean you need bpf, but
eCos currently does not have either. Having said that, it should not
be too hard to add this back since its a standard part of FreeBSD.

> By the way, do you know how to print routing tables and arp tables with
> eCOS ?
> 
> Call to show_network_tables() is just blocking my application ... 

Have you debugged this at all. It has worked for me in the past. Where
does it block?

You sysctl code looks interesting. I want to try that out soon.

     Andrew

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

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

end of thread, other threads:[~2003-11-08 12:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-07 13:47 [ECOS] Sending ARP packets without PF_PACKET support Sebax
2003-11-07 14:54 ` Andrew Lunn
     [not found]   ` <002601c3a550$efa34fd0$f408a8c0@eliosinformatique.fr>
2003-11-08 12:29     ` [ECOS] Re: RE : " Andrew Lunn

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