1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 08:42:12 +02:00

net: Refactor IP, UPD, and ICMP header writing functions

ICMP (ping) was reimplementing IP header code... it now shares code.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
Joe Hershberger
2012-05-23 07:59:07 +00:00
parent 674bb24982
commit 4b11c9166b
4 changed files with 61 additions and 56 deletions

View File

@@ -457,7 +457,9 @@ extern int NetEthHdrSize(void);
extern int NetSetEther(uchar *, uchar *, uint);
/* Set IP header */
extern void NetSetIP(uchar *, IPaddr_t, int, int, int);
extern void net_set_ip_header(uchar *pkt, IPaddr_t dest, IPaddr_t source);
extern void net_set_udp_header(uchar *pkt, IPaddr_t dest, int dport,
int sport, int len);
/* Checksum */
extern int NetCksumOk(uchar *, int); /* Return true if cksum OK */