WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 2 of 8] libxl: add a specific MAC address type

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 2 of 8] libxl: add a specific MAC address type
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Tue, 03 Aug 2010 12:00:17 +0100
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Delivery-date: Tue, 03 Aug 2010 04:04:18 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1280833215@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1280829528 -3600
# Node ID 81cc53cbda33b5cd4c498c41b3eafd73f16b15e1
# Parent  cafba5708f95cf85f55bdca322d2ff6b6769bcba
libxl: add a specific MAC address type.

Slightly less error prone and also more amenable to autogeneration.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

diff -r cafba5708f95 -r 81cc53cbda33 tools/libxl/libxl.h
--- a/tools/libxl/libxl.h       Tue Aug 03 10:58:48 2010 +0100
+++ b/tools/libxl/libxl.h       Tue Aug 03 10:58:48 2010 +0100
@@ -23,6 +23,8 @@
 #include <sys/wait.h> /* for pid_t */
 
 typedef uint8_t libxl_uuid[16];
+
+typedef uint8_t libxl_mac[6];
 
 typedef struct {
     libxl_uuid uuid;
@@ -270,7 +272,7 @@ typedef struct {
     int devid;
     int mtu;
     char *model;
-    uint8_t mac[6];
+    libxl_mac mac;
     struct in_addr ip;
     char *bridge;
     char *ifname;
@@ -280,8 +282,8 @@ typedef struct {
 
 typedef struct {
     int devid;
-    uint8_t front_mac[6];
-    uint8_t back_mac[6];
+    libxl_mac front_mac;
+    libxl_mac back_mac;
     uint32_t backend_domid;
     uint32_t domid;
     uint32_t trusted:1;
@@ -498,7 +500,7 @@ typedef struct {
     int devid;
     int state;
     char *script;
-    uint8_t mac[6];
+    libxl_mac mac;
     int evtch;
     int rref_tx;
     int rref_rx;
@@ -654,9 +656,9 @@ typedef struct {
     uint32_t frontend_id;
     int devid;
     int state;
-    uint8_t mac[6];
+    libxl_mac mac;
     int trusted;
-    uint8_t back_mac[6];
+    libxl_mac back_mac;
     int filter_mac;
 } libxl_net2info;
 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel