mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 08:42:12 +02:00
net: Consolidate UDP header functions
Make it possible to add TCP versions of the same, while reusing IP portions. This patch should not change any behavior. Signed-off-by: Duncan Hare <DH@Synoia.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
This commit is contained in:
committed by
Joe Hershberger
parent
ac3f26cc15
commit
5d457ecbef
@@ -597,7 +597,8 @@ int net_set_ether(uchar *xet, const uchar *dest_ethaddr, uint prot);
|
||||
int net_update_ether(struct ethernet_hdr *et, uchar *addr, uint prot);
|
||||
|
||||
/* Set IP header */
|
||||
void net_set_ip_header(uchar *pkt, struct in_addr dest, struct in_addr source);
|
||||
void net_set_ip_header(uchar *pkt, struct in_addr dest, struct in_addr source,
|
||||
u16 pkt_len, u8 proto);
|
||||
void net_set_udp_header(uchar *pkt, struct in_addr dest, int dport,
|
||||
int sport, int len);
|
||||
|
||||
@@ -680,6 +681,9 @@ static inline void net_send_packet(uchar *pkt, int len)
|
||||
* @param sport Source UDP port
|
||||
* @param payload_len Length of data after the UDP header
|
||||
*/
|
||||
int net_send_ip_packet(uchar *ether, struct in_addr dest, int dport, int sport,
|
||||
int payload_len, int proto, u8 action, u32 tcp_seq_num,
|
||||
u32 tcp_ack_num);
|
||||
int net_send_udp_packet(uchar *ether, struct in_addr dest, int dport,
|
||||
int sport, int payload_len);
|
||||
|
||||
|
Reference in New Issue
Block a user