[tip:tools/kvm] kvm tools: Add two helpers to return UDP {header, total} length

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit-ID:  0dcce6c05699c68179043a23fc5f79237e7852e4
Gitweb:     http://git.kernel.org/tip/0dcce6c05699c68179043a23fc5f79237e7852e4
Author:     Asias He <asias.hejun@xxxxxxxxx>
AuthorDate: Wed, 29 Jun 2011 16:47:14 +0800
Committer:  Pekka Enberg <penberg@xxxxxxxxxx>
CommitDate: Thu, 30 Jun 2011 10:42:30 +0300

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

Signed-off-by: Asias He <asias.hejun@xxxxxxxxx>
Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxx>
---
 tools/kvm/include/kvm/uip.h |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/tools/kvm/include/kvm/uip.h b/tools/kvm/include/kvm/uip.h
index 473b9c7..e79cc4b 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);
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux