aboutsummaryrefslogtreecommitdiff
path: root/net/bootp.c
diff options
context:
space:
mode:
authorLuca Ceresoli <luca.ceresoli@comelit.it>2011-04-18 06:19:50 +0000
committerWolfgang Denk <wd@denx.de>2011-05-12 19:38:19 +0200
commit03eb129f8a37f7d7d222e02330cd806d3a0aef1d (patch)
treee1b22352233ecf254859bcc7f1abc2de8a70cdde /net/bootp.c
parent8eccee7ae77140cd9780f643d2388adb29ed1a83 (diff)
downloadu-boot-linaro-stable-03eb129f8a37f7d7d222e02330cd806d3a0aef1d.tar.gz
NET: pass source IP address to packet handlers
This is needed for the upcoming TFTP server implementation. This also simplifies PingHandler() and fixes rxhand_f documentation. Signed-off-by: Luca Ceresoli <luca.ceresoli@comelit.it> Cc: Wolfgang Denk <wd@denx.de> Acked-by: Detlev Zundel <dzu@denx.de>
Diffstat (limited to 'net/bootp.c')
-rw-r--r--net/bootp.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/net/bootp.c b/net/bootp.c
index 87b027e8f..4db63cbbe 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -44,7 +44,8 @@ ulong seed1, seed2;
dhcp_state_t dhcp_state = INIT;
unsigned long dhcp_leasetime = 0;
IPaddr_t NetDHCPServerIP = 0;
-static void DhcpHandler(uchar * pkt, unsigned dest, unsigned src, unsigned len);
+static void DhcpHandler(uchar *pkt, unsigned dest, IPaddr_t sip, unsigned src,
+ unsigned len);
/* For Debug */
#if 0
@@ -282,7 +283,8 @@ static void BootpVendorProcess (u8 * ext, int size)
* Handle a BOOTP received packet.
*/
static void
-BootpHandler(uchar * pkt, unsigned dest, unsigned src, unsigned len)
+BootpHandler(uchar *pkt, unsigned dest, IPaddr_t sip, unsigned src,
+ unsigned len)
{
Bootp_t *bp;
char *s;
@@ -858,7 +860,8 @@ static void DhcpSendRequestPkt(Bootp_t *bp_offer)
* Handle DHCP received packets.
*/
static void
-DhcpHandler(uchar * pkt, unsigned dest, unsigned src, unsigned len)
+DhcpHandler(uchar *pkt, unsigned dest, IPaddr_t sip, unsigned src,
+ unsigned len)
{
Bootp_t *bp = (Bootp_t *)pkt;