mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-08-19 11:56:28 +00:00
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:
@@ -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
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user