netmap.c (169e4878ee96b7d6dec929e0cd400a0395865a85) netmap.c (a30ecde6e795682d1473c45acae66a60a76fca2f)
1/*
2 * netmap access for qemu
3 *
4 * Copyright (c) 2012-2013 Luigi Rizzo
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights

--- 432 unchanged lines hidden (view full) ---

441 .set_vnet_hdr_len = netmap_set_vnet_hdr_len,
442};
443
444/* The exported init function
445 *
446 * ... -net netmap,ifname="..."
447 */
448int net_init_netmap(const NetClientOptions *opts,
1/*
2 * netmap access for qemu
3 *
4 * Copyright (c) 2012-2013 Luigi Rizzo
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights

--- 432 unchanged lines hidden (view full) ---

441 .set_vnet_hdr_len = netmap_set_vnet_hdr_len,
442};
443
444/* The exported init function
445 *
446 * ... -net netmap,ifname="..."
447 */
448int net_init_netmap(const NetClientOptions *opts,
449 const char *name, NetClientState *peer)
449 const char *name, NetClientState *peer, Error **errp)
450{
450{
451 /* FIXME error_setg(errp, ...) on failure */
451 const NetdevNetmapOptions *netmap_opts = opts->netmap;
452 NetClientState *nc;
453 NetmapPriv me;
454 NetmapState *s;
455
456 pstrcpy(me.fdname, sizeof(me.fdname),
457 netmap_opts->has_devname ? netmap_opts->devname : "/dev/netmap");
458 /* Set default name for the port if not supplied. */

--- 14 unchanged lines hidden ---
452 const NetdevNetmapOptions *netmap_opts = opts->netmap;
453 NetClientState *nc;
454 NetmapPriv me;
455 NetmapState *s;
456
457 pstrcpy(me.fdname, sizeof(me.fdname),
458 netmap_opts->has_devname ? netmap_opts->devname : "/dev/netmap");
459 /* Set default name for the port if not supplied. */

--- 14 unchanged lines hidden ---