debuggers.hg

changeset 21970:d627f6b581b4

libxl: add a specific MAC address type.

Slightly less error prone and also more amenable to autogeneration.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
author Ian Campbell <ian.campbell@citrix.com>
date Wed Aug 04 18:08:39 2010 +0100 (2010-08-04)
parents d0469b045277
children 8992134dcfd0 baaa4b9d385f
files tools/libxl/libxl.h
line diff
     1.1 --- a/tools/libxl/libxl.h	Wed Aug 04 18:08:08 2010 +0100
     1.2 +++ b/tools/libxl/libxl.h	Wed Aug 04 18:08:39 2010 +0100
     1.3 @@ -24,6 +24,8 @@
     1.4  
     1.5  typedef uint8_t libxl_uuid[16];
     1.6  
     1.7 +typedef uint8_t libxl_mac[6];
     1.8 +
     1.9  typedef struct {
    1.10      libxl_uuid uuid;
    1.11      uint32_t domid;
    1.12 @@ -270,7 +272,7 @@ typedef struct {
    1.13      int devid;
    1.14      int mtu;
    1.15      char *model;
    1.16 -    uint8_t mac[6];
    1.17 +    libxl_mac mac;
    1.18      struct in_addr ip;
    1.19      char *bridge;
    1.20      char *ifname;
    1.21 @@ -280,8 +282,8 @@ typedef struct {
    1.22  
    1.23  typedef struct {
    1.24      int devid;
    1.25 -    uint8_t front_mac[6];
    1.26 -    uint8_t back_mac[6];
    1.27 +    libxl_mac front_mac;
    1.28 +    libxl_mac back_mac;
    1.29      uint32_t backend_domid;
    1.30      uint32_t domid;
    1.31      uint32_t trusted:1;
    1.32 @@ -498,7 +500,7 @@ typedef struct {
    1.33      int devid;
    1.34      int state;
    1.35      char *script;
    1.36 -    uint8_t mac[6];
    1.37 +    libxl_mac mac;
    1.38      int evtch;
    1.39      int rref_tx;
    1.40      int rref_rx;
    1.41 @@ -650,9 +652,9 @@ typedef struct {
    1.42      uint32_t frontend_id;
    1.43      int devid;
    1.44      int state;
    1.45 -    uint8_t mac[6];
    1.46 +    libxl_mac mac;
    1.47      int trusted;
    1.48 -    uint8_t back_mac[6];
    1.49 +    libxl_mac back_mac;
    1.50      int filter_mac;
    1.51  } libxl_net2info;
    1.52