diff options
author | Duncan Hare | 2018-06-24 15:40:41 -0700 |
---|---|---|
committer | Joe Hershberger | 2018-10-10 12:29:02 -0500 |
commit | 5d457ecbef5eba8eaeed513c65c55453de4f3975 (patch) | |
tree | 2046aacfd0d999c3dd5d82fea12826751c1e4714 /include/net.h | |
parent | ac3f26cc15ad7e3e9efc2b0b0e18c6e84d93af77 (diff) |
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>
Diffstat (limited to 'include/net.h')
-rw-r--r-- | include/net.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/net.h b/include/net.h index e5cd52b726f..51c099dae2e 100644 --- a/include/net.h +++ b/include/net.h @@ -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); |