From: Asias He Date: Wed, 29 Jun 2011 08:47:14 +0000 (+0800) Subject: kvm tools: Add two helpers to return UDP {header, total} length X-Git-Tag: next-20110824~3^2~178 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0dcce6c05699c68179043a23fc5f79237e7852e4;p=karo-tx-linux.git kvm tools: Add two helpers to return UDP {header, total} length Signed-off-by: Asias He Signed-off-by: Pekka Enberg --- diff --git a/tools/kvm/include/kvm/uip.h b/tools/kvm/include/kvm/uip.h index 473b9c74c1af..e79cc4ba5cad 100644 --- a/tools/kvm/include/kvm/uip.h +++ b/tools/kvm/include/kvm/uip.h @@ -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);