public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Pantelis Antoniou <panto@intracom.gr>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] ARP/TFTP disengagement.
Date: Tue, 22 Apr 2003 13:05:05 +0300	[thread overview]
Message-ID: <3EA513D1.6040602@intracom.gr> (raw)

Wolfang Hi.

In U-boot currently ARP is use for the single purpose, of providing
the MAC address of the TFTP server.

This make it impossible to use ARP for communicating with any other
host or protocol.

Also it muddles the tftp code since in order to begin
the TFTP request, we don't call TftpStart rather we call
ArpRequest and the tftp request is started explicitly upon
reception of the ARP reply.
 
The following patch fixes these problems.

Instead of the TFTP code using NetSendPacket it uses now
a new function called NetSendUDPPacket.

  int NetSendUDPPacket(uchar *ether, IPaddr_t dest,
                       int dport, int sport, int len);

The argument are as follows;

 uchar *ether    - pointer to MAC address of the server/or gateway.
                  
   If the MAC address is zero, an ARP request is made and the packet
   is saved for transmition upon the reception of the ARP reply.
   Must point to a global or static variable for proper operation.

 IPaddr_t dest   - destination ip address
 int dport       - destination port
 int sport       - source port
 int len         - the length of the data.

The actual contents of the transmitted packet
are expected to be at NetTxPacket + ETHER_HDR_SIZE + IP_HDR_SIZE.

The major change of this patch is the elimination of the files
arp.c & arp.h.

ARP is not really a proper protocol, and their functionality is
placed directly in net.c

Tested both in manual tftp mode and DHCP auto-start mode...

Awaiting comments...

  Regards

  Pantelis



-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: u-boot-0.3.0-arpfix.patch
Url: http://lists.denx.de/pipermail/u-boot/attachments/20030422/d31aaf9c/attachment.txt 

                 reply	other threads:[~2003-04-22 10:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3EA513D1.6040602@intracom.gr \
    --to=panto@intracom.gr \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox