aboutsummaryrefslogtreecommitdiffstats
path: root/tools/vnet/vnet-module
diff options
context:
space:
mode:
authoriap10@freefall.cl.cam.ac.uk <iap10@freefall.cl.cam.ac.uk>2005-02-09 23:23:30 +0000
committeriap10@freefall.cl.cam.ac.uk <iap10@freefall.cl.cam.ac.uk>2005-02-09 23:23:30 +0000
commit8e5a6833ffa2a6b1dbbdcc6957ed1df6adb8543f (patch)
treea06019d71f5cd62c4662bea00c391c0d3724fbd3 /tools/vnet/vnet-module
parent6be18e86c3d59af8af7dd6edf995797b09ffe3ef (diff)
downloadxen-8e5a6833ffa2a6b1dbbdcc6957ed1df6adb8543f.tar.gz
xen-8e5a6833ffa2a6b1dbbdcc6957ed1df6adb8543f.tar.bz2
xen-8e5a6833ffa2a6b1dbbdcc6957ed1df6adb8543f.zip
bitkeeper revision 1.1159.223.85 (420a9b72OGag4m4sDtlxM-918tbudQ)
Subject: [Xen-devel] VNET - full update Allows vnets to compile and run under 2.6.10/xen-testing. PATCH: vnet-cleanup.patch Signed off by: bgb@nt-nv.com Signed-off-by: ian@xensource.com
Diffstat (limited to 'tools/vnet/vnet-module')
-rw-r--r--tools/vnet/vnet-module/Makefile-2.64
-rw-r--r--tools/vnet/vnet-module/if_varp.h4
-rw-r--r--tools/vnet/vnet-module/varp.c14
3 files changed, 11 insertions, 11 deletions
diff --git a/tools/vnet/vnet-module/Makefile-2.6 b/tools/vnet/vnet-module/Makefile-2.6
index 64e57ea5ff..053391e572 100644
--- a/tools/vnet/vnet-module/Makefile-2.6
+++ b/tools/vnet/vnet-module/Makefile-2.6
@@ -38,8 +38,8 @@ module modules:
.PHONY: install install-module modules_install
install install-module modules_install: module
- install -m 0755 -d $(DESTDIR)$(KERNEL_MODULE_DIR)
- install -m 0554 $(KERNEL_MODULE) $(DESTDIR)$(KERNEL_MODULE_DIR)
+ install -m 0755 -d $(DESTDIR)$(KERNEL_MODULE_DIR)/xen
+ install -m 0554 $(KERNEL_MODULE) $(DESTDIR)$(KERNEL_MODULE_DIR)/xen
.PHONY: clean
clean:
diff --git a/tools/vnet/vnet-module/if_varp.h b/tools/vnet/vnet-module/if_varp.h
index 49058471db..c4b752ac49 100644
--- a/tools/vnet/vnet-module/if_varp.h
+++ b/tools/vnet/vnet-module/if_varp.h
@@ -36,7 +36,7 @@ typedef struct VnetMsgHdr {
} __attribute__((packed)) VnetMsgHdr;
typedef struct VarpHdr {
- VnetMsgHdr;
+ VnetMsgHdr vnetmsghdr;
uint32_t vnet;
Vmac vmac;
uint32_t addr;
@@ -50,4 +50,4 @@ typedef struct VarpHdr {
-#endif /* ! _VNET_IF_VARP_H */
+#endif /* ! _VNET_IF_VARP_H */
diff --git a/tools/vnet/vnet-module/varp.c b/tools/vnet/vnet-module/varp.c
index 3b1507e045..f7bdf81d97 100644
--- a/tools/vnet/vnet-module/varp.c
+++ b/tools/vnet/vnet-module/varp.c
@@ -368,8 +368,8 @@ int varp_send(u16 opcode, struct net_device *dev, struct sk_buff *skbin,
// Varp header.
varph = (void*)skb_put(skbout, varp_n);
*varph = (VarpHdr){};
- varph->id = htons(VARP_ID);
- varph->opcode = htons(opcode);
+ varph->vnetmsghdr.id = htons(VARP_ID);
+ varph->vnetmsghdr.opcode = htons(opcode);
varph->vnet = htonl(vnet);
varph->vmac = *vmac;
varph->addr = saddr;
@@ -1076,9 +1076,9 @@ int varp_handle_message(struct sk_buff *skb){
goto exit;
}
mine = 1;
- if(varph->id != htons(VARP_ID)){
+ if(varph->vnetmsghdr.id != htons(VARP_ID)){
// It's not varp at all - ignore it.
- wprintf("> Unknown id: %d \n", ntohs(varph->id));
+ wprintf("> Unknown id: %d \n", ntohs(varph->vnetmsghdr.id));
goto exit;
}
if(1){
@@ -1086,13 +1086,13 @@ int varp_handle_message(struct sk_buff *skb){
NIPQUAD(skb->nh.iph->saddr), NIPQUAD(skb->nh.iph->daddr));
dprintf("> sport=%u dport=%u\n", ntohs(skb->h.uh->source), ntohs(skb->h.uh->dest));
dprintf("> opcode=%d vnet=%u vmac=" MACFMT " addr=" IPFMT "\n",
- ntohs(varph->opcode),
+ ntohs(varph->vnetmsghdr.opcode),
ntohl(varph->vnet),
MAC6TUPLE(varph->vmac.mac),
NIPQUAD(varph->addr));
varp_dprint();
}
- switch(ntohs(varph->opcode)){
+ switch(ntohs(varph->vnetmsghdr.opcode)){
case VARP_OP_REQUEST:
err = varp_handle_request(skb, varph);
break;
@@ -1100,7 +1100,7 @@ int varp_handle_message(struct sk_buff *skb){
err = varp_handle_announce(skb, varph);
break;
default:
- wprintf("> Unknown opcode: %d \n", ntohs(varph->opcode));
+ wprintf("> Unknown opcode: %d \n", ntohs(varph->vnetmsghdr.opcode));
break;
}
exit: