kvm tools: Use macro in uip_tx_do_ipv4()

Use marcro instead of magic number in uip_tx_do_ipv4()

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-10-31 22:39:39 +08:00
committed by Will Deacon
parent de6aae9ff9
commit 7b0155fed9
2 changed files with 4 additions and 3 deletions
+1
View File
@@ -19,6 +19,7 @@
#define UIP_IP_TTL 0X40
#define UIP_IP_P_UDP 0X11
#define UIP_IP_P_TCP 0X06
#define UIP_IP_P_ICMP 0X01
#define UIP_TCP_HDR_LEN 0x50
#define UIP_TCP_WIN_SIZE 14600
+3 -3
View File
@@ -12,13 +12,13 @@ int uip_tx_do_ipv4(struct uip_tx_arg *arg)
}
switch (ip->proto) {
case 0x01: /* ICMP */
case UIP_IP_P_ICMP:
uip_tx_do_ipv4_icmp(arg);
break;
case 0x06: /* TCP */
case UIP_IP_P_TCP:
uip_tx_do_ipv4_tcp(arg);
break;
case 0x11: /* UDP */
case UIP_IP_P_UDP:
uip_tx_do_ipv4_udp(arg);
break;
default: