Revision 2944e4ec

b/net.c
38 38
#include "hw/qdev.h"
39 39
#include "iov.h"
40 40

  
41
/* Net bridge is currently not supported for W32. */
42
#if !defined(_WIN32)
43
# define CONFIG_NET_BRIDGE
44
#endif
45

  
41 46
static QTAILQ_HEAD(, VLANState) vlans;
42 47
static QTAILQ_HEAD(, VLANClientState) non_vlan_clients;
43 48

  
......
952 957
                .type = QEMU_OPT_STRING,
953 958
                .help = "script to shut down the interface",
954 959
            }, {
960
#ifdef CONFIG_NET_BRIDGE
955 961
                .name = "helper",
956 962
                .type = QEMU_OPT_STRING,
957 963
                .help = "command to execute to configure bridge",
958 964
            }, {
965
#endif
959 966
                .name = "sndbuf",
960 967
                .type = QEMU_OPT_SIZE,
961 968
                .help = "send buffer limit"
......
1057 1064
            { /* end of list */ }
1058 1065
        },
1059 1066
    },
1067
#ifdef CONFIG_NET_BRIDGE
1060 1068
    [NET_CLIENT_TYPE_BRIDGE] = {
1061 1069
        .type = "bridge",
1062 1070
        .init = net_init_bridge,
......
1074 1082
            { /* end of list */ }
1075 1083
        },
1076 1084
    },
1085
#endif /* CONFIG_NET_BRIDGE */
1077 1086
};
1078 1087

  
1079 1088
int net_client_init(Monitor *mon, QemuOpts *opts, int is_netdev)
......
1090 1099

  
1091 1100
    if (is_netdev) {
1092 1101
        if (strcmp(type, "tap") != 0 &&
1102
#ifdef CONFIG_NET_BRIDGE
1103
            strcmp(type, "bridge") != 0 &&
1104
#endif
1093 1105
#ifdef CONFIG_SLIRP
1094 1106
            strcmp(type, "user") != 0 &&
1095 1107
#endif
1096 1108
#ifdef CONFIG_VDE
1097 1109
            strcmp(type, "vde") != 0 &&
1098 1110
#endif
1099
            strcmp(type, "socket") != 0 &&
1100
            strcmp(type, "bridge") != 0) {
1111
            strcmp(type, "socket") != 0) {
1101 1112
            qerror_report(QERR_INVALID_PARAMETER_VALUE, "type",
1102 1113
                          "a netdev backend type");
1103 1114
            return -1;
......
1161 1172
{
1162 1173
    int i;
1163 1174
    const char *valid_param_list[] = { "tap", "socket", "dump"
1175
#ifdef CONFIG_NET_BRIDGE
1176
                                       , "bridge"
1177
#endif
1164 1178
#ifdef CONFIG_SLIRP
1165 1179
                                       ,"user"
1166 1180
#endif
1167 1181
#ifdef CONFIG_VDE
1168 1182
                                       ,"vde"
1169 1183
#endif
1170
                                       , "bridge"
1171 1184
    };
1172 1185
    for (i = 0; i < sizeof(valid_param_list) / sizeof(char *); i++) {
1173 1186
        if (!strncmp(valid_param_list[i], device,

Also available in: Unified diff