Tom C. Barker | 1 Jul 2004 23:17

Etharp drops packets for unlisted arp entries


My dns queries get dropped if the address is not in the arp table.

    /* { packet was queued (ERR_OK), or discarded } */

Does the stack allow any knowledge that this has happened?
(We return always with a NULL.)

Thanks,
Tom

/* could not find the destination Ethernet address in ARP cache? */
if (dest == NULL) {
/* ARP query for the IP address, submit this IP packet for queueing */
/* TODO: How do we handle netif->ipaddr == ipaddr? */
etharp_query(netif, ipaddr, q);
/* { packet was queued (ERR_OK), or discarded } */
/* return nothing */
return NULL;
Leon Woestenberg | 3 Jul 2004 14:18

Re: Etharp drops packets for unlisted arp entries

Hello Tom,

Tom C. Barker wrote:

>My dns queries get dropped if the address is not in the arp table.
>
>    /* { packet was queued (ERR_OK), or discarded } */
>
>Does the stack allow any knowledge that this has happened?
>  
>
The code in CVS does, 0.7.x does not and will not as we will not break 
the API
within the stable (0.7) branch.

>(We return always with a NULL.)
>
>  
>
That's 0.7.x etharp_output() I assume.
This has changed for the better in CVS HEAD, which has a change in API:

err_t
etharp_output(struct netif *netif, struct ip_addr *ipaddr, struct pbuf *q)
{

.....

    /* queue on destination Ethernet address belonging to ipaddr */
    return etharp_query(netif, ipaddr, q);
(Continue reading)

Leon Woestenberg | 3 Jul 2004 14:19

Re: Etharp drops packets for unlisted arp entries

Hello Tom,

Tom C. Barker wrote:

>My dns queries get dropped if the address is not in the arp table.
>
>    /* { packet was queued (ERR_OK), or discarded } */
>
>  
>
Did you enable ARP_QUEUEING in your lwipopts.h?

If so, it should not really be dropped at all, but queued for 
transmission once ARP has
resolved the destination Ethernet address of the DNS server.

Leon.
Felix Nielsen | 4 Jul 2004 03:09
Picon

PPP example

Hi

I am trying to get lwIP with PPP up and running on my ARM devboard. Does 
anyone have some working PPP examples?

Thanks
Felix
Michael Broughton | 4 Jul 2004 05:24
Favicon

Re: PPP example

I don't have an example that I can show you but it's not really that 
complicated. I'm going to assume that you have lwip all set up and ready to 
go; in other words, you have all the sysarch, lwipopts, and sio stuff in 
working order. If that is the case, there a four routines that you should 
take a look at in ppp.c:

pppInit() - Call this once when you system starts. I call this from my 
sys_init() routine.
pppSetAuth() - Use this to set a user name and password for PAP or CHAP, if 
you have either of them enabled (look in your lwip opts files).
pppOpen() - Creates a new thread and tells it to start PPP. This new thread 
will let you know what's going on with the PPP connection via the callback 
that you must specify for the first argument.
pppClose() - Brings down the PPP link and ends the PPP thread.

You should be able to ignore just about everything else, unless you need to 
do some debugging. Anyway, this is basically what you need to do:

1. Initialize your system and lwip (including pppInit()).
2. Open your comm port.
3. Dial your modem and wait for it to connect.
4. call pppSetAuth() and pppOpen().
5. wait for PPP to tell you it is open (or if it failed for whatever reason).
6. now you should be on-line. do your thing.
7. call pppClose and close your comm port.

That should get you started. Just make sure you read and understand exactly 
what those four routines (the ones i outlined above) are doing.

Mike
(Continue reading)

Masta Slader | 7 Jul 2004 16:25
Picon
Favicon

Re: Etharp drops packets for unlisted arp entries

Hi!

Does LWIP implements IP Options (related to RFC 1122)?!? Is the "urgend
data" mechanism included in TCP in LWIP?

Thanks for your efforts!
Chris

----- Original Message ----- 
From: "Leon Woestenberg" <leonw@...>
To: "Mailing list for lwIP users" <lwip-users@...>
Sent: Saturday, July 03, 2004 2:19 PM
Subject: Re: [lwip-users] Etharp drops packets for unlisted arp entries

> Hello Tom,
>
> Tom C. Barker wrote:
>
> >My dns queries get dropped if the address is not in the arp table.
> >
> >    /* { packet was queued (ERR_OK), or discarded } */
> >
> >
> >
> Did you enable ARP_QUEUEING in your lwipopts.h?
>
> If so, it should not really be dropped at all, but queued for
> transmission once ARP has
> resolved the destination Ethernet address of the DNS server.
>
(Continue reading)

K.J. Mansley | 7 Jul 2004 16:49
Picon
Picon
Favicon

Re: Etharp drops packets for unlisted arp entries

On Wed, 2004-07-07 at 15:25, Masta Slader wrote:
> Hi!
> 
> Does LWIP implements IP Options (related to RFC 1122)?!? Is the "urgend
> data" mechanism included in TCP in LWIP?

I don't think so, but I'm not sure exactly what you're referring to. 
Some TCP options (such as MSS) are handled. Can you be more specific?

The listed IP Options in RFC 1122 are as follows:

                                                 |        | | | |S| |
                                                 |        | | | |H| |F
                                                 |        | | | |O|M|o
                                                 |        | |S| |U|U|o
                                                 |        | |H| |L|S|t
                                                 |        |M|O| |D|T|n
                                                 |        |U|U|M| | |o
                                                 |        |S|L|A|N|N|t
                                                 |        |T|D|Y|O|O|t
FEATURE                                          |SECTION | | | |T|T|e
-------------------------------------------------|--------|-|-|-|-|-|--
IP Options                                       |        | | | | | |
  Ignore options TCP doesn't understand          |4.2.3.8 |x| | | | |
  Time Stamp support                             |4.2.3.8 | | |x| | |
  Record Route support                           |4.2.3.8 | | |x| | |
  Source Route:                                  |        | | | | | |
    ALP can specify                              |4.2.3.8 |x| | | | |1
      Overrides src rt in datagram               |4.2.3.8 |x| | | | |
    Build return route from src rt               |4.2.3.8 |x| | | | |
(Continue reading)

Masta Slader | 7 Jul 2004 22:12
Picon
Favicon

Re: Etharp drops packets for unlisted arp entries

I am interessted in "urgend data" mechanism, which specify data that is more
important than other data in the stream.
It is also important for me to know, if all "MUST" IP-Options are included
in LWIP. I think there is no IP-Option included, but I am not sure!?!

Thanks!
Chris

----- Original Message ----- 
From: "K.J. Mansley" <kjm25@...>
To: "Mailing list for lwIP users" <lwip-users@...>
Sent: Wednesday, July 07, 2004 4:49 PM
Subject: Re: [lwip-users] Etharp drops packets for unlisted arp entries

> On Wed, 2004-07-07 at 15:25, Masta Slader wrote:
> > Hi!
> >
> > Does LWIP implements IP Options (related to RFC 1122)?!? Is the "urgend
> > data" mechanism included in TCP in LWIP?
>
> I don't think so, but I'm not sure exactly what you're referring to.
> Some TCP options (such as MSS) are handled. Can you be more specific?
>
> The listed IP Options in RFC 1122 are as follows:
>
>                                                  |        | | | |S| |
>                                                  |        | | | |H| |F
>                                                  |        | | | |O|M|o
>                                                  |        | |S| |U|U|o
>                                                  |        | |H| |L|S|t
(Continue reading)

Felix | 8 Jul 2004 11:05
Picon

Re: lwip-users Digest, Vol 11, Issue 4

Hi Mike,

For starters, I modified "sio_open(int devnum)" in "src\ecos\sio.c", so that
it connects to my GPRS ISP provider, and sleeps a while before continuing..
I think a connection is established, but I am not 100% sure.

I have enabled the debug and statistics, but the debug messages don't states
the IP assigned from the ISP.

Where can I find the IP - so I can test with ping from my windows host.

Thanks
Felix

What I did - for starters -

> I don't have an example that I can show you but it's not really that
> complicated. I'm going to assume that you have lwip all set up and ready
to
> go; in other words, you have all the sysarch, lwipopts, and sio stuff in
> working order. If that is the case, there a four routines that you should
> take a look at in ppp.c:
>
> pppInit() - Call this once when you system starts. I call this from my
> sys_init() routine.
> pppSetAuth() - Use this to set a user name and password for PAP or CHAP,
if
> you have either of them enabled (look in your lwip opts files).
> pppOpen() - Creates a new thread and tells it to start PPP. This new
thread
(Continue reading)

Tim Newsham | 8 Jul 2004 11:31
Favicon

raw api question


Some questions about the raw api:

- When doing a tcp close, when is it safe to destroy my state on
  the pcb?  It seems like some callbacks can get called after
  a tcp_close is done (ie. the tcp_sent callback seems to be
  called at times, to acknowledge the FIN?).  I need to know
  under what conditions I can destroy my state immediately
  after a tcp_close and under what conditions the state must
  be maintained until after callbacks occur, and what callbacks
  can occur.

- if a tcp_close returns an out of memory error (the only
  error that can occur, according to the documentation),
  what conditions can I rely on to trigger a retry?
  Will there be a callback that will indicate that I
  should try again, and if so, which?

- Are there any callbacks that can occur after a udp close?

Tim N.

Gmane