mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 08:42:12 +02:00
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>
This commit is contained in:
committed by
Wolfgang Denk
parent
8eccee7ae7
commit
03eb129f8a
@@ -72,12 +72,17 @@
|
||||
typedef ulong IPaddr_t;
|
||||
|
||||
|
||||
/*
|
||||
* The current receive packet handler. Called with a pointer to the
|
||||
* application packet, and a protocol type (PORT_BOOTPC or PORT_TFTP).
|
||||
* All other packets are dealt with without calling the handler.
|
||||
/**
|
||||
* An incoming packet handler.
|
||||
* @param pkt pointer to the application packet
|
||||
* @param dport destination UDP port
|
||||
* @param sip source IP address
|
||||
* @param sport source UDP port
|
||||
* @param len packet length
|
||||
*/
|
||||
typedef void rxhand_f(uchar *, unsigned, unsigned, unsigned);
|
||||
typedef void rxhand_f(uchar *pkt, unsigned dport,
|
||||
IPaddr_t sip, unsigned sport,
|
||||
unsigned len);
|
||||
|
||||
/*
|
||||
* A timeout handler. Called after time interval has expired.
|
||||
|
Reference in New Issue
Block a user