Il 18/10/2012 16:56, Stefan Hajnoczi ha scritto:
>  
> -static NetClientInfo net_tap_win32_info = {
> -    .type = NET_CLIENT_OPTIONS_KIND_TAP,
> -    .size = sizeof(TAPState),
> -    .receive = tap_receive,
> -    .cleanup = tap_cleanup,
> +#define TYPE_TAP_WIN32_NET_CLIENT "tap-win32-net-client"
> +
> +static void tap_win32_net_client_class_init(ObjectClass *klass,
> +                                            void *class_data)
> +{
> +    NetClientClass *ncc = NET_CLIENT_CLASS(klass);
> +
> +    ncc->type_str = "tap";
> +    ncc->receive = tap_receive;
> +    ncc->cleanup = tap_cleanup;
> +}
> +
> +static TypeInfo tap_win32_net_client_info = {
> +    .name = TYPE_TAP_WIN32_NET_CLIENT,
> +    .parent = TYPE_NET_CLIENT,

Why a separate type name than TYPE_NET_CLIENT?  It doesn't really matter
if the client is Unix or Win32.

Paolo


Reply via email to