]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kvm tools: Introduce struct uip_udp to present UDP package
authorAsias He <asias.hejun@gmail.com>
Wed, 29 Jun 2011 08:47:11 +0000 (16:47 +0800)
committerPekka Enberg <penberg@kernel.org>
Thu, 30 Jun 2011 07:42:08 +0000 (10:42 +0300)
Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/include/kvm/uip.h

index b9fa932401ff43f6f094a37946835563fbff5274..e2204038c66646f9902394f25ef8ea9d8c6a1f4f 100644 (file)
@@ -60,6 +60,21 @@ struct uip_icmp {
        u16 seq;
 } __attribute__((packed));
 
+struct uip_udp {
+       /*
+        * FIXME: IP Options (IP hdr len > 20 bytes) are not supported
+        */
+       struct uip_ip ip;
+       u16 sport;
+       u16 dport;
+       /*
+        * len = UDP hdr +  UDP payload
+        */
+       u16 len;
+       u16 csum;
+       u8 payload[0];
+} __attribute__((packed));
+
 struct uip_info {
        struct list_head udp_socket_head;
        struct list_head tcp_socket_head;