kvm tools: Add two helpers to return UDP {header, total} length

Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
This commit is contained in:
Asias He
2011-06-29 16:47:14 +08:00
committed by Will Deacon
parent 4768afc6f0
commit 8df66da791
+10
View File
@@ -141,6 +141,16 @@ static inline u16 uip_ip_len(struct uip_ip *ip)
return htons(ip->len);
}
static inline u16 uip_udp_hdrlen(struct uip_udp *udp)
{
return 8;
}
static inline u16 uip_udp_len(struct uip_udp *udp)
{
return ntohs(udp->len);
}
int uip_tx_do_ipv4_icmp(struct uip_tx_arg *arg);
int uip_tx_do_ipv4(struct uip_tx_arg *arg);
int uip_tx_do_arp(struct uip_tx_arg *arg);