From 39b72fd01ddf277f7b63df047b0a4377541bf13b Mon Sep 17 00:00:00 2001 From: Asias He Date: Wed, 29 Jun 2011 16:47:15 +0800 Subject: [PATCH] kvm tools: Add helper to return ethernet header length Signed-off-by: Asias He Signed-off-by: Pekka Enberg --- include/kvm/uip.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/kvm/uip.h b/include/kvm/uip.h index e79cc4b..979e2b0 100644 --- a/include/kvm/uip.h +++ b/include/kvm/uip.h @@ -151,6 +151,11 @@ static inline u16 uip_udp_len(struct uip_udp *udp) return ntohs(udp->len); } +static inline u16 uip_eth_hdrlen(struct uip_eth *eth) +{ + return sizeof(*eth); +} + 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);