mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Rename all brXXXX APIs to follow new convention
The existing brXXX APIs in src/util/bridge.h are renamed to follow one of three different conventions - virNetDevXXX - operations for any type of interface - virNetDevBridgeXXX - operations for bridge interfaces - virNetDevTapXXX - operations for tap interfaces * src/util/bridge.h, src/util/bridge.c: Rename all APIs * src/lxc/lxc_driver.c, src/network/bridge_driver.c, src/qemu/qemu_command.c, src/uml/uml_conf.c, src/uml/uml_driver.c: Update for API renaming
This commit is contained in:
parent
4f4fd8f7ad
commit
dced27c89e
@ -1269,7 +1269,7 @@ static int lxcSetupInterfaces(virConnectPtr conn,
|
|||||||
goto error_exit;
|
goto error_exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (brAddInterface(bridge, parentVeth) < 0)
|
if (virNetDevBridgeAddPort(bridge, parentVeth) < 0)
|
||||||
goto error_exit;
|
goto error_exit;
|
||||||
|
|
||||||
if (vethInterfaceUpOrDown(parentVeth, 1) < 0)
|
if (vethInterfaceUpOrDown(parentVeth, 1) < 0)
|
||||||
|
@ -211,7 +211,7 @@ networkFindActiveConfigs(struct network_driver *driver) {
|
|||||||
|
|
||||||
/* If bridge exists, then mark it active */
|
/* If bridge exists, then mark it active */
|
||||||
if (obj->def->bridge &&
|
if (obj->def->bridge &&
|
||||||
brHasBridge(obj->def->bridge) == 0) {
|
virNetDevExists(obj->def->bridge) == 0) {
|
||||||
obj->active = 1;
|
obj->active = 1;
|
||||||
|
|
||||||
/* Try and read dnsmasq/radvd pids if any */
|
/* Try and read dnsmasq/radvd pids if any */
|
||||||
@ -1677,8 +1677,8 @@ networkAddAddrToBridge(virNetworkObjPtr network,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (brAddInetAddress(network->def->bridge,
|
if (virNetDevSetIPv4Address(network->def->bridge,
|
||||||
&ipdef->address, prefix) < 0)
|
&ipdef->address, prefix) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -1699,7 +1699,7 @@ networkStartNetworkVirtual(struct network_driver *driver,
|
|||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
/* Create and configure the bridge device */
|
/* Create and configure the bridge device */
|
||||||
if (brAddBridge(network->def->bridge) < 0)
|
if (virNetDevBridgeCreate(network->def->bridge) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (network->def->mac_specified) {
|
if (network->def->mac_specified) {
|
||||||
@ -1714,20 +1714,20 @@ networkStartNetworkVirtual(struct network_driver *driver,
|
|||||||
virReportOOMError();
|
virReportOOMError();
|
||||||
goto err0;
|
goto err0;
|
||||||
}
|
}
|
||||||
if (brAddTap(network->def->bridge,
|
if (virNetDevTapCreateInBridgePort(network->def->bridge,
|
||||||
&macTapIfName, network->def->mac, 0, false, NULL) < 0) {
|
&macTapIfName, network->def->mac, 0, false, NULL) < 0) {
|
||||||
VIR_FREE(macTapIfName);
|
VIR_FREE(macTapIfName);
|
||||||
goto err0;
|
goto err0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set bridge options */
|
/* Set bridge options */
|
||||||
if (brSetForwardDelay(network->def->bridge,
|
if (virNetDevBridgeSetSTPDelay(network->def->bridge,
|
||||||
network->def->delay) < 0)
|
network->def->delay) < 0)
|
||||||
goto err1;
|
goto err1;
|
||||||
|
|
||||||
if (brSetEnableSTP(network->def->bridge,
|
if (virNetDevBridgeSetSTP(network->def->bridge,
|
||||||
network->def->stp ? 1 : 0) < 0)
|
network->def->stp ? 1 : 0) < 0)
|
||||||
goto err1;
|
goto err1;
|
||||||
|
|
||||||
/* Disable IPv6 on the bridge if there are no IPv6 addresses
|
/* Disable IPv6 on the bridge if there are no IPv6 addresses
|
||||||
@ -1755,7 +1755,7 @@ networkStartNetworkVirtual(struct network_driver *driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Bring up the bridge interface */
|
/* Bring up the bridge interface */
|
||||||
if (brSetInterfaceUp(network->def->bridge, 1) < 0)
|
if (virNetDevSetOnline(network->def->bridge, 1) < 0)
|
||||||
goto err2;
|
goto err2;
|
||||||
|
|
||||||
/* If forwardType != NONE, turn on global IP forwarding */
|
/* If forwardType != NONE, turn on global IP forwarding */
|
||||||
@ -1804,7 +1804,7 @@ networkStartNetworkVirtual(struct network_driver *driver,
|
|||||||
err3:
|
err3:
|
||||||
if (!save_err)
|
if (!save_err)
|
||||||
save_err = virSaveLastError();
|
save_err = virSaveLastError();
|
||||||
ignore_value(brSetInterfaceUp(network->def->bridge, 0));
|
ignore_value(virNetDevSetOnline(network->def->bridge, 0));
|
||||||
|
|
||||||
err2:
|
err2:
|
||||||
if (!save_err)
|
if (!save_err)
|
||||||
@ -1815,13 +1815,13 @@ networkStartNetworkVirtual(struct network_driver *driver,
|
|||||||
if (!save_err)
|
if (!save_err)
|
||||||
save_err = virSaveLastError();
|
save_err = virSaveLastError();
|
||||||
|
|
||||||
ignore_value(brDeleteTap(macTapIfName));
|
ignore_value(virNetDevTapDelete(macTapIfName));
|
||||||
VIR_FREE(macTapIfName);
|
VIR_FREE(macTapIfName);
|
||||||
|
|
||||||
err0:
|
err0:
|
||||||
if (!save_err)
|
if (!save_err)
|
||||||
save_err = virSaveLastError();
|
save_err = virSaveLastError();
|
||||||
ignore_value(brDeleteBridge(network->def->bridge));
|
ignore_value(virNetDevBridgeDelete(network->def->bridge));
|
||||||
|
|
||||||
if (save_err) {
|
if (save_err) {
|
||||||
virSetError(save_err);
|
virSetError(save_err);
|
||||||
@ -1859,16 +1859,16 @@ static int networkShutdownNetworkVirtual(struct network_driver *driver,
|
|||||||
if (!macTapIfName) {
|
if (!macTapIfName) {
|
||||||
virReportOOMError();
|
virReportOOMError();
|
||||||
} else {
|
} else {
|
||||||
ignore_value(brDeleteTap(macTapIfName));
|
ignore_value(virNetDevTapDelete(macTapIfName));
|
||||||
VIR_FREE(macTapIfName);
|
VIR_FREE(macTapIfName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ignore_value(brSetInterfaceUp(network->def->bridge, 0));
|
ignore_value(virNetDevSetOnline(network->def->bridge, 0));
|
||||||
|
|
||||||
networkRemoveIptablesRules(driver, network);
|
networkRemoveIptablesRules(driver, network);
|
||||||
|
|
||||||
ignore_value(brDeleteBridge(network->def->bridge));
|
ignore_value(virNetDevBridgeDelete(network->def->bridge));
|
||||||
|
|
||||||
/* See if its still alive and really really kill it */
|
/* See if its still alive and really really kill it */
|
||||||
if (network->dnsmasqPid > 0 &&
|
if (network->dnsmasqPid > 0 &&
|
||||||
|
@ -279,8 +279,8 @@ qemuNetworkIfaceConnect(virDomainDefPtr def,
|
|||||||
|
|
||||||
memcpy(tapmac, net->mac, VIR_MAC_BUFLEN);
|
memcpy(tapmac, net->mac, VIR_MAC_BUFLEN);
|
||||||
tapmac[0] = 0xFE; /* Discourage bridge from using TAP dev MAC */
|
tapmac[0] = 0xFE; /* Discourage bridge from using TAP dev MAC */
|
||||||
err = brAddTap(brname, &net->ifname, tapmac,
|
err = virNetDevTapCreateInBridgePort(brname, &net->ifname, tapmac,
|
||||||
vnet_hdr, true, &tapfd);
|
vnet_hdr, true, &tapfd);
|
||||||
virDomainAuditNetDevice(def, net, "/dev/net/tun", tapfd >= 0);
|
virDomainAuditNetDevice(def, net, "/dev/net/tun", tapfd >= 0);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
if (template_ifname)
|
if (template_ifname)
|
||||||
|
@ -136,8 +136,8 @@ umlConnectTapDevice(virConnectPtr conn,
|
|||||||
|
|
||||||
memcpy(tapmac, net->mac, VIR_MAC_BUFLEN);
|
memcpy(tapmac, net->mac, VIR_MAC_BUFLEN);
|
||||||
tapmac[0] = 0xFE; /* Discourage bridge from using TAP dev MAC */
|
tapmac[0] = 0xFE; /* Discourage bridge from using TAP dev MAC */
|
||||||
if (brAddTap(bridge, &net->ifname, tapmac,
|
if (virNetDevTapCreateInBridgePort(bridge, &net->ifname, tapmac,
|
||||||
0, true, NULL) < 0) {
|
0, true, NULL) < 0) {
|
||||||
if (template_ifname)
|
if (template_ifname)
|
||||||
VIR_FREE(net->ifname);
|
VIR_FREE(net->ifname);
|
||||||
goto error;
|
goto error;
|
||||||
|
@ -962,7 +962,7 @@ static void umlCleanupTapDevices(virDomainObjPtr vm) {
|
|||||||
def->type != VIR_DOMAIN_NET_TYPE_NETWORK)
|
def->type != VIR_DOMAIN_NET_TYPE_NETWORK)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
ignore_value(brDeleteTap(def->ifname));
|
ignore_value(virNetDevTapDelete(def->ifname));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,10 +58,10 @@
|
|||||||
|
|
||||||
# define VIR_FROM_THIS VIR_FROM_NONE
|
# define VIR_FROM_THIS VIR_FROM_NONE
|
||||||
|
|
||||||
static int brSetupControlFull(const char *ifname,
|
static int virNetDevSetupControlFull(const char *ifname,
|
||||||
struct ifreq *ifr,
|
struct ifreq *ifr,
|
||||||
int domain,
|
int domain,
|
||||||
int type)
|
int type)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
@ -93,15 +93,15 @@ static int brSetupControlFull(const char *ifname,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int brSetupControl(const char *ifname,
|
static int virNetDevSetupControl(const char *ifname,
|
||||||
struct ifreq *ifr)
|
struct ifreq *ifr)
|
||||||
{
|
{
|
||||||
return brSetupControlFull(ifname, ifr, AF_PACKET, SOCK_DGRAM);
|
return virNetDevSetupControlFull(ifname, ifr, AF_PACKET, SOCK_DGRAM);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* brAddBridge:
|
* virNetDevBridgeCreate:
|
||||||
* @brname: the bridge name
|
* @brname: the bridge name
|
||||||
*
|
*
|
||||||
* This function register a new bridge
|
* This function register a new bridge
|
||||||
@ -109,13 +109,12 @@ static int brSetupControl(const char *ifname,
|
|||||||
* Returns 0 in case of success or -1 on failure
|
* Returns 0 in case of success or -1 on failure
|
||||||
*/
|
*/
|
||||||
# ifdef SIOCBRADDBR
|
# ifdef SIOCBRADDBR
|
||||||
int
|
int virNetDevBridgeCreate(const char *brname)
|
||||||
brAddBridge(const char *brname)
|
|
||||||
{
|
{
|
||||||
int fd = -1;
|
int fd = -1;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
if ((fd = brSetupControl(NULL, NULL)) < 0)
|
if ((fd = virNetDevSetupControl(NULL, NULL)) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (ioctl(fd, SIOCBRADDBR, brname) < 0) {
|
if (ioctl(fd, SIOCBRADDBR, brname) < 0) {
|
||||||
@ -131,7 +130,7 @@ cleanup:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
# else
|
# else
|
||||||
int brAddBridge(const char *brname)
|
int virNetDevBridgeCreate(const char *brname)
|
||||||
{
|
{
|
||||||
virReportSystemError(ENOSYS,
|
virReportSystemError(ENOSYS,
|
||||||
_("Unable to create bridge %s"), brname);
|
_("Unable to create bridge %s"), brname);
|
||||||
@ -141,21 +140,20 @@ int brAddBridge(const char *brname)
|
|||||||
|
|
||||||
# ifdef SIOCBRDELBR
|
# ifdef SIOCBRDELBR
|
||||||
/**
|
/**
|
||||||
* brHasBridge:
|
* virNetDevExists:
|
||||||
* @brname
|
* @ifname
|
||||||
*
|
*
|
||||||
* Check if the bridge @brname exists
|
* Check if the network device @ifname exists
|
||||||
*
|
*
|
||||||
* Returns 1 if it exists, 0 if it does not, -1 on error
|
* Returns 1 if it exists, 0 if it does not, -1 on error
|
||||||
*/
|
*/
|
||||||
int
|
int virNetDevExists(const char *ifname)
|
||||||
brHasBridge(const char *brname)
|
|
||||||
{
|
{
|
||||||
int fd = -1;
|
int fd = -1;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
struct ifreq ifr;
|
struct ifreq ifr;
|
||||||
|
|
||||||
if ((fd = brSetupControl(brname, &ifr)) < 0)
|
if ((fd = virNetDevSetupControl(ifname, &ifr)) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (ioctl(fd, SIOCGIFFLAGS, &ifr)) {
|
if (ioctl(fd, SIOCGIFFLAGS, &ifr)) {
|
||||||
@ -163,7 +161,7 @@ brHasBridge(const char *brname)
|
|||||||
ret = 0;
|
ret = 0;
|
||||||
else
|
else
|
||||||
virReportSystemError(errno,
|
virReportSystemError(errno,
|
||||||
_("Unable to get bridge %s flags"), brname);
|
_("Unable to check interface flags for %s"), ifname);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -174,17 +172,16 @@ cleanup:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
# else
|
# else
|
||||||
int
|
int virNetDevExists(const char *ifname)
|
||||||
brHasBridge(const char *brname)
|
|
||||||
{
|
{
|
||||||
virReportSystemError(ENOSYS,
|
virReportSystemError(ENOSYS,
|
||||||
_("Unable to check bridge %s"), brname);
|
_("Unable to check interface %s"), ifname);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* brDeleteBridge:
|
* virNetDevBridgeDelete:
|
||||||
* @brname: the bridge name
|
* @brname: the bridge name
|
||||||
*
|
*
|
||||||
* Remove a bridge from the layer.
|
* Remove a bridge from the layer.
|
||||||
@ -192,13 +189,12 @@ brHasBridge(const char *brname)
|
|||||||
* Returns 0 in case of success or an errno code in case of failure.
|
* Returns 0 in case of success or an errno code in case of failure.
|
||||||
*/
|
*/
|
||||||
# ifdef SIOCBRDELBR
|
# ifdef SIOCBRDELBR
|
||||||
int
|
int virNetDevBridgeDelete(const char *brname)
|
||||||
brDeleteBridge(const char *brname)
|
|
||||||
{
|
{
|
||||||
int fd = -1;
|
int fd = -1;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
if ((fd = brSetupControl(NULL, NULL)) < 0)
|
if ((fd = virNetDevSetupControl(NULL, NULL)) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (ioctl(fd, SIOCBRDELBR, brname) < 0) {
|
if (ioctl(fd, SIOCBRDELBR, brname) < 0) {
|
||||||
@ -214,8 +210,7 @@ cleanup:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
# else
|
# else
|
||||||
int
|
int virNetDevBridgeDelete(const char *brname ATTRIBUTE_UNUSED)
|
||||||
brDeleteBridge(const char *brname ATTRIBUTE_UNUSED)
|
|
||||||
{
|
{
|
||||||
virReportSystemError(ENOSYS,
|
virReportSystemError(ENOSYS,
|
||||||
_("Unable to delete bridge %s"), brname);
|
_("Unable to delete bridge %s"), brname);
|
||||||
@ -224,7 +219,7 @@ brDeleteBridge(const char *brname ATTRIBUTE_UNUSED)
|
|||||||
# endif
|
# endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* brAddInterface:
|
* virNetDevBridgeAddPort:
|
||||||
* @brname: the bridge name
|
* @brname: the bridge name
|
||||||
* @ifname: the network interface name
|
* @ifname: the network interface name
|
||||||
*
|
*
|
||||||
@ -233,15 +228,14 @@ brDeleteBridge(const char *brname ATTRIBUTE_UNUSED)
|
|||||||
* Returns 0 in case of success or an errno code in case of failure.
|
* Returns 0 in case of success or an errno code in case of failure.
|
||||||
*/
|
*/
|
||||||
# ifdef SIOCBRADDIF
|
# ifdef SIOCBRADDIF
|
||||||
int
|
int virNetDevBridgeAddPort(const char *brname,
|
||||||
brAddInterface(const char *brname,
|
const char *ifname)
|
||||||
const char *ifname)
|
|
||||||
{
|
{
|
||||||
int fd = -1;
|
int fd = -1;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
struct ifreq ifr;
|
struct ifreq ifr;
|
||||||
|
|
||||||
if ((fd = brSetupControl(brname, &ifr)) < 0)
|
if ((fd = virNetDevSetupControl(brname, &ifr)) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (!(ifr.ifr_ifindex = if_nametoindex(ifname))) {
|
if (!(ifr.ifr_ifindex = if_nametoindex(ifname))) {
|
||||||
@ -262,9 +256,8 @@ cleanup:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
# else
|
# else
|
||||||
int
|
int virNetDevBridgeAddPort(const char *brname,
|
||||||
brAddInterface(const char *brname,
|
const char *ifname)
|
||||||
const char *ifname)
|
|
||||||
{
|
{
|
||||||
virReportSystemError(ENOSYS,
|
virReportSystemError(ENOSYS,
|
||||||
_("Unable to add bridge %s port %s"), brname, ifname);
|
_("Unable to add bridge %s port %s"), brname, ifname);
|
||||||
@ -273,7 +266,7 @@ brAddInterface(const char *brname,
|
|||||||
# endif
|
# endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* brDeleteInterface:
|
* virNetDevBridgeRemovePort:
|
||||||
* @brname: the bridge name
|
* @brname: the bridge name
|
||||||
* @ifname: the network interface name
|
* @ifname: the network interface name
|
||||||
*
|
*
|
||||||
@ -282,15 +275,14 @@ brAddInterface(const char *brname,
|
|||||||
* Returns 0 in case of success or an errno code in case of failure.
|
* Returns 0 in case of success or an errno code in case of failure.
|
||||||
*/
|
*/
|
||||||
# ifdef SIOCBRDELIF
|
# ifdef SIOCBRDELIF
|
||||||
int
|
int virNetDevBridgeRemovePort(const char *brname,
|
||||||
brDeleteInterface(const char *brname,
|
const char *ifname)
|
||||||
const char *ifname)
|
|
||||||
{
|
{
|
||||||
int fd = -1;
|
int fd = -1;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
struct ifreq ifr;
|
struct ifreq ifr;
|
||||||
|
|
||||||
if ((fd = brSetupControl(brname, &ifr)) < 0)
|
if ((fd = virNetDevSetupControl(brname, &ifr)) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (!(ifr.ifr_ifindex = if_nametoindex(ifname))) {
|
if (!(ifr.ifr_ifindex = if_nametoindex(ifname))) {
|
||||||
@ -312,9 +304,8 @@ cleanup:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
# else
|
# else
|
||||||
int
|
int virNetDevBridgeRemovePort(const char *brname,
|
||||||
brDeleteInterface(const char *brname,
|
const char *ifname)
|
||||||
const char *ifname)
|
|
||||||
{
|
{
|
||||||
virReportSystemError(errno,
|
virReportSystemError(errno,
|
||||||
_("Unable to remove bridge %s port %s"), brname, ifname);
|
_("Unable to remove bridge %s port %s"), brname, ifname);
|
||||||
@ -323,7 +314,7 @@ brDeleteInterface(const char *brname,
|
|||||||
# endif
|
# endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* brSetInterfaceMac:
|
* virNetDevSetMAC:
|
||||||
* @ifname: interface name to set MTU for
|
* @ifname: interface name to set MTU for
|
||||||
* @macaddr: MAC address (VIR_MAC_BUFLEN in size)
|
* @macaddr: MAC address (VIR_MAC_BUFLEN in size)
|
||||||
*
|
*
|
||||||
@ -332,15 +323,14 @@ brDeleteInterface(const char *brname,
|
|||||||
*
|
*
|
||||||
* Returns 0 in case of success or -1 on failure
|
* Returns 0 in case of success or -1 on failure
|
||||||
*/
|
*/
|
||||||
int
|
int virNetDevSetMAC(const char *ifname,
|
||||||
brSetInterfaceMac(const char *ifname,
|
const unsigned char *macaddr)
|
||||||
const unsigned char *macaddr)
|
|
||||||
{
|
{
|
||||||
int fd = -1;
|
int fd = -1;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
struct ifreq ifr;
|
struct ifreq ifr;
|
||||||
|
|
||||||
if ((fd = brSetupControl(ifname, &ifr)) < 0)
|
if ((fd = virNetDevSetupControl(ifname, &ifr)) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
/* To fill ifr.ifr_hdaddr.sa_family field */
|
/* To fill ifr.ifr_hdaddr.sa_family field */
|
||||||
@ -368,20 +358,20 @@ cleanup:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ifGetMtu
|
* virNetDevGetMTU:
|
||||||
* @ifname: interface name get MTU for
|
* @ifname: interface name get MTU for
|
||||||
*
|
*
|
||||||
* This function gets the @mtu value set for a given interface @ifname.
|
* This function gets the @mtu value set for a given interface @ifname.
|
||||||
*
|
*
|
||||||
* Returns the MTU value in case of success, or -1 on failure.
|
* Returns the MTU value in case of success, or -1 on failure.
|
||||||
*/
|
*/
|
||||||
static int ifGetMtu(const char *ifname)
|
static int virNetDevGetMTU(const char *ifname)
|
||||||
{
|
{
|
||||||
int fd = -1;
|
int fd = -1;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
struct ifreq ifr;
|
struct ifreq ifr;
|
||||||
|
|
||||||
if ((fd = brSetupControl(ifname, &ifr)) < 0)
|
if ((fd = virNetDevSetupControl(ifname, &ifr)) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (ioctl(fd, SIOCGIFMTU, &ifr) < 0) {
|
if (ioctl(fd, SIOCGIFMTU, &ifr) < 0) {
|
||||||
@ -399,7 +389,7 @@ cleanup:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ifSetMtu:
|
* virNetDevSetMTU:
|
||||||
* @ifname: interface name to set MTU for
|
* @ifname: interface name to set MTU for
|
||||||
* @mtu: MTU value
|
* @mtu: MTU value
|
||||||
*
|
*
|
||||||
@ -408,13 +398,13 @@ cleanup:
|
|||||||
*
|
*
|
||||||
* Returns 0 in case of success, or -1 on failure
|
* Returns 0 in case of success, or -1 on failure
|
||||||
*/
|
*/
|
||||||
static int ifSetMtu(const char *ifname, int mtu)
|
static int virNetDevSetMTU(const char *ifname, int mtu)
|
||||||
{
|
{
|
||||||
int fd = -1;
|
int fd = -1;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
struct ifreq ifr;
|
struct ifreq ifr;
|
||||||
|
|
||||||
if ((fd = brSetupControl(ifname, &ifr)) < 0)
|
if ((fd = virNetDevSetupControl(ifname, &ifr)) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
ifr.ifr_mtu = mtu;
|
ifr.ifr_mtu = mtu;
|
||||||
@ -442,19 +432,19 @@ cleanup:
|
|||||||
*
|
*
|
||||||
* Returns 0 in case of success, or -1 on failure
|
* Returns 0 in case of success, or -1 on failure
|
||||||
*/
|
*/
|
||||||
static int brSetInterfaceMtu(const char *brname,
|
static int virNetDevSetMTUFromDevice(const char *brname,
|
||||||
const char *ifname)
|
const char *ifname)
|
||||||
{
|
{
|
||||||
int mtu = ifGetMtu(brname);
|
int mtu = virNetDevGetMTU(brname);
|
||||||
|
|
||||||
if (mtu < 0)
|
if (mtu < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
return ifSetMtu(ifname, mtu);
|
return virNetDevSetMTU(ifname, mtu);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* brProbeVnetHdr:
|
* virNetDevProbeVnetHdr:
|
||||||
* @tapfd: a tun/tap file descriptor
|
* @tapfd: a tun/tap file descriptor
|
||||||
*
|
*
|
||||||
* Check whether it is safe to enable the IFF_VNET_HDR flag on the
|
* Check whether it is safe to enable the IFF_VNET_HDR flag on the
|
||||||
@ -474,7 +464,7 @@ static int brSetInterfaceMtu(const char *brname,
|
|||||||
*/
|
*/
|
||||||
# ifdef IFF_VNET_HDR
|
# ifdef IFF_VNET_HDR
|
||||||
static int
|
static int
|
||||||
brProbeVnetHdr(int tapfd)
|
virNetDevProbeVnetHdr(int tapfd)
|
||||||
{
|
{
|
||||||
# if defined(IFF_VNET_HDR) && defined(TUNGETFEATURES) && defined(TUNGETIFF)
|
# if defined(IFF_VNET_HDR) && defined(TUNGETFEATURES) && defined(TUNGETIFF)
|
||||||
unsigned int features;
|
unsigned int features;
|
||||||
@ -530,15 +520,14 @@ brProbeVnetHdr(int tapfd)
|
|||||||
*
|
*
|
||||||
* Returns 0 in case of success or -1 on failure
|
* Returns 0 in case of success or -1 on failure
|
||||||
*/
|
*/
|
||||||
int
|
int virNetDevTapCreateInBridgePort(const char *brname,
|
||||||
brAddTap(const char *brname,
|
char **ifname,
|
||||||
char **ifname,
|
const unsigned char *macaddr,
|
||||||
const unsigned char *macaddr,
|
int vnet_hdr,
|
||||||
int vnet_hdr,
|
bool up,
|
||||||
bool up,
|
int *tapfd)
|
||||||
int *tapfd)
|
|
||||||
{
|
{
|
||||||
if (brCreateTap(ifname, vnet_hdr, tapfd) < 0)
|
if (virNetDevTapCreate(ifname, vnet_hdr, tapfd) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
/* We need to set the interface MAC before adding it
|
/* We need to set the interface MAC before adding it
|
||||||
@ -547,20 +536,20 @@ brAddTap(const char *brname,
|
|||||||
* seeing the kernel allocate random MAC for the TAP
|
* seeing the kernel allocate random MAC for the TAP
|
||||||
* device before we set our static MAC.
|
* device before we set our static MAC.
|
||||||
*/
|
*/
|
||||||
if (brSetInterfaceMac(*ifname, macaddr) < 0)
|
if (virNetDevSetMAC(*ifname, macaddr) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
/* We need to set the interface MTU before adding it
|
/* We need to set the interface MTU before adding it
|
||||||
* to the bridge, because the bridge will have its
|
* to the bridge, because the bridge will have its
|
||||||
* MTU adjusted automatically when we add the new interface.
|
* MTU adjusted automatically when we add the new interface.
|
||||||
*/
|
*/
|
||||||
if (brSetInterfaceMtu(brname, *ifname) < 0)
|
if (virNetDevSetMTUFromDevice(brname, *ifname) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if (brAddInterface(brname, *ifname) < 0)
|
if (virNetDevBridgeAddPort(brname, *ifname) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if (brSetInterfaceUp(*ifname, up) < 0)
|
if (virNetDevSetOnline(*ifname, up) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -571,7 +560,7 @@ error:
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int brDeleteTap(const char *ifname)
|
int virNetDevTapDelete(const char *ifname)
|
||||||
{
|
{
|
||||||
struct ifreq try;
|
struct ifreq try;
|
||||||
int fd;
|
int fd;
|
||||||
@ -614,7 +603,7 @@ cleanup:
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* brSetInterfaceUp:
|
* virNetDevSetOnline:
|
||||||
* @ifname: the interface name
|
* @ifname: the interface name
|
||||||
* @up: 1 for up, 0 for down
|
* @up: 1 for up, 0 for down
|
||||||
*
|
*
|
||||||
@ -622,16 +611,15 @@ cleanup:
|
|||||||
*
|
*
|
||||||
* Returns 0 in case of success or -1 on error.
|
* Returns 0 in case of success or -1 on error.
|
||||||
*/
|
*/
|
||||||
int
|
int virNetDevSetOnline(const char *ifname,
|
||||||
brSetInterfaceUp(const char *ifname,
|
int up)
|
||||||
int up)
|
|
||||||
{
|
{
|
||||||
int fd = -1;
|
int fd = -1;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
struct ifreq ifr;
|
struct ifreq ifr;
|
||||||
int ifflags;
|
int ifflags;
|
||||||
|
|
||||||
if ((fd = brSetupControl(ifname, &ifr)) < 0)
|
if ((fd = virNetDevSetupControl(ifname, &ifr)) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (ioctl(fd, SIOCGIFFLAGS, &ifr) < 0) {
|
if (ioctl(fd, SIOCGIFFLAGS, &ifr) < 0) {
|
||||||
@ -664,7 +652,7 @@ cleanup:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* brGetInterfaceUp:
|
* virNetDevIsOnline:
|
||||||
* @ifname: the interface name
|
* @ifname: the interface name
|
||||||
* @up: where to store the status
|
* @up: where to store the status
|
||||||
*
|
*
|
||||||
@ -672,15 +660,14 @@ cleanup:
|
|||||||
*
|
*
|
||||||
* Returns 0 in case of success or an errno code in case of failure.
|
* Returns 0 in case of success or an errno code in case of failure.
|
||||||
*/
|
*/
|
||||||
int
|
int virNetDevIsOnline(const char *ifname,
|
||||||
brGetInterfaceUp(const char *ifname,
|
int *up)
|
||||||
int *up)
|
|
||||||
{
|
{
|
||||||
int fd = -1;
|
int fd = -1;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
struct ifreq ifr;
|
struct ifreq ifr;
|
||||||
|
|
||||||
if ((fd = brSetupControl(ifname, &ifr)) < 0)
|
if ((fd = virNetDevSetupControl(ifname, &ifr)) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (ioctl(fd, SIOCGIFFLAGS, &ifr) < 0) {
|
if (ioctl(fd, SIOCGIFFLAGS, &ifr) < 0) {
|
||||||
@ -699,7 +686,7 @@ cleanup:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* brAddInetAddress:
|
* virNetDevSetIPv4Address:
|
||||||
* @ifname: the interface name
|
* @ifname: the interface name
|
||||||
* @addr: the IP address (IPv4 or IPv6)
|
* @addr: the IP address (IPv4 or IPv6)
|
||||||
* @prefix: number of 1 bits in the netmask
|
* @prefix: number of 1 bits in the netmask
|
||||||
@ -711,10 +698,9 @@ cleanup:
|
|||||||
* Returns 0 in case of success or -1 in case of error.
|
* Returns 0 in case of success or -1 in case of error.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int
|
int virNetDevSetIPv4Address(const char *ifname,
|
||||||
brAddInetAddress(const char *ifname,
|
virSocketAddr *addr,
|
||||||
virSocketAddr *addr,
|
unsigned int prefix)
|
||||||
unsigned int prefix)
|
|
||||||
{
|
{
|
||||||
virCommandPtr cmd = NULL;
|
virCommandPtr cmd = NULL;
|
||||||
char *addrstr = NULL, *bcaststr = NULL;
|
char *addrstr = NULL, *bcaststr = NULL;
|
||||||
@ -748,7 +734,7 @@ cleanup:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* brDelInetAddress:
|
* virNetDevClearIPv4Address:
|
||||||
* @ifname: the interface name
|
* @ifname: the interface name
|
||||||
* @addr: the IP address (IPv4 or IPv6)
|
* @addr: the IP address (IPv4 or IPv6)
|
||||||
* @prefix: number of 1 bits in the netmask
|
* @prefix: number of 1 bits in the netmask
|
||||||
@ -758,10 +744,9 @@ cleanup:
|
|||||||
* Returns 0 in case of success or -1 in case of error.
|
* Returns 0 in case of success or -1 in case of error.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int
|
int virNetDevClearIPv4Address(const char *ifname,
|
||||||
brDelInetAddress(const char *ifname,
|
virSocketAddr *addr,
|
||||||
virSocketAddr *addr,
|
unsigned int prefix)
|
||||||
unsigned int prefix)
|
|
||||||
{
|
{
|
||||||
virCommandPtr cmd = NULL;
|
virCommandPtr cmd = NULL;
|
||||||
char *addrstr;
|
char *addrstr;
|
||||||
@ -785,7 +770,7 @@ cleanup:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* brSetForwardDelay:
|
* virNetDevBridgeSetSTPDelay:
|
||||||
* @brname: the bridge name
|
* @brname: the bridge name
|
||||||
* @delay: delay in seconds
|
* @delay: delay in seconds
|
||||||
*
|
*
|
||||||
@ -794,9 +779,8 @@ cleanup:
|
|||||||
* Returns 0 in case of success or -1 on failure
|
* Returns 0 in case of success or -1 on failure
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int
|
int virNetDevBridgeSetSTPDelay(const char *brname,
|
||||||
brSetForwardDelay(const char *brname,
|
int delay)
|
||||||
int delay)
|
|
||||||
{
|
{
|
||||||
virCommandPtr cmd;
|
virCommandPtr cmd;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
@ -815,7 +799,7 @@ cleanup:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* brSetEnableSTP:
|
* virNetDevBridgeSetSTP:
|
||||||
* @brname: the bridge name
|
* @brname: the bridge name
|
||||||
* @enable: 1 to enable, 0 to disable
|
* @enable: 1 to enable, 0 to disable
|
||||||
*
|
*
|
||||||
@ -824,9 +808,8 @@ cleanup:
|
|||||||
*
|
*
|
||||||
* Returns 0 in case of success or -1 on failure
|
* Returns 0 in case of success or -1 on failure
|
||||||
*/
|
*/
|
||||||
int
|
int virNetDevBridgeSetSTP(const char *brname,
|
||||||
brSetEnableSTP(const char *brname,
|
int enable)
|
||||||
int enable)
|
|
||||||
{
|
{
|
||||||
virCommandPtr cmd;
|
virCommandPtr cmd;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
@ -860,10 +843,9 @@ cleanup:
|
|||||||
* Returns 0 in case of success or an errno code in case of failure.
|
* Returns 0 in case of success or an errno code in case of failure.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int
|
int virNetDevTapCreate(char **ifname,
|
||||||
brCreateTap(char **ifname,
|
int vnet_hdr ATTRIBUTE_UNUSED,
|
||||||
int vnet_hdr ATTRIBUTE_UNUSED,
|
int *tapfd)
|
||||||
int *tapfd)
|
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
struct ifreq ifr;
|
struct ifreq ifr;
|
||||||
@ -880,7 +862,7 @@ brCreateTap(char **ifname,
|
|||||||
ifr.ifr_flags = IFF_TAP|IFF_NO_PI;
|
ifr.ifr_flags = IFF_TAP|IFF_NO_PI;
|
||||||
|
|
||||||
# ifdef IFF_VNET_HDR
|
# ifdef IFF_VNET_HDR
|
||||||
if (vnet_hdr && brProbeVnetHdr(fd))
|
if (vnet_hdr && virNetDevProbeVnetHdr(fd))
|
||||||
ifr.ifr_flags |= IFF_VNET_HDR;
|
ifr.ifr_flags |= IFF_VNET_HDR;
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
@ -42,19 +42,19 @@
|
|||||||
*/
|
*/
|
||||||
# define BR_INET_ADDR_MAXLEN INET_ADDRSTRLEN
|
# define BR_INET_ADDR_MAXLEN INET_ADDRSTRLEN
|
||||||
|
|
||||||
int brAddBridge (const char *brname)
|
int virNetDevBridgeCreate(const char *brname)
|
||||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
|
||||||
int brDeleteBridge (const char *brname)
|
int virNetDevBridgeDelete(const char *brname)
|
||||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
|
||||||
int brHasBridge (const char *brname)
|
int virNetDevExists(const char *brname)
|
||||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
|
||||||
|
|
||||||
int brAddInterface (const char *brname,
|
int virNetDevBridgeAddPort(const char *brname,
|
||||||
const char *ifname)
|
const char *ifname)
|
||||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
|
||||||
|
|
||||||
int brDeleteInterface (const char *brname,
|
int virNetDevBridgeRemovePort(const char *brname,
|
||||||
const char *ifname)
|
const char *ifname)
|
||||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
@ -62,55 +62,55 @@ enum {
|
|||||||
BR_TAP_PERSIST = (1 << 1),
|
BR_TAP_PERSIST = (1 << 1),
|
||||||
};
|
};
|
||||||
|
|
||||||
int brAddTap (const char *brname,
|
int virNetDevTapCreateInBridgePort(const char *brname,
|
||||||
char **ifname,
|
char **ifname,
|
||||||
const unsigned char *macaddr,
|
const unsigned char *macaddr,
|
||||||
int vnet_hdr,
|
int vnet_hdr,
|
||||||
bool up,
|
bool up,
|
||||||
int *tapfd)
|
int *tapfd)
|
||||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
|
||||||
ATTRIBUTE_RETURN_CHECK;
|
ATTRIBUTE_RETURN_CHECK;
|
||||||
|
|
||||||
|
|
||||||
int brDeleteTap (const char *ifname)
|
int virNetDevTapDelete(const char *ifname)
|
||||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
|
||||||
|
|
||||||
int brSetInterfaceUp (const char *ifname,
|
int virNetDevSetOnline(const char *ifname,
|
||||||
int up)
|
int up)
|
||||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
|
||||||
int brGetInterfaceUp (const char *ifname,
|
int virNetDevIsOnline(const char *ifname,
|
||||||
int *up)
|
int *up)
|
||||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
|
||||||
|
|
||||||
int brAddInetAddress (const char *ifname,
|
int virNetDevSetIPv4Address(const char *ifname,
|
||||||
virSocketAddr *addr,
|
virSocketAddr *addr,
|
||||||
unsigned int prefix)
|
unsigned int prefix)
|
||||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
|
||||||
int brDelInetAddress (const char *ifname,
|
int virNetDevClearIPv4Address(const char *ifname,
|
||||||
virSocketAddr *addr,
|
virSocketAddr *addr,
|
||||||
unsigned int prefix)
|
unsigned int prefix)
|
||||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
|
||||||
|
|
||||||
int brSetForwardDelay (const char *brname,
|
int virNetDevBridgeSetSTPDelay(const char *brname,
|
||||||
int delay)
|
int delay)
|
||||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
|
||||||
int brGetForwardDelay (const char *brname,
|
int virNetDevBridgeGetSTPDelay(const char *brname,
|
||||||
int *delay)
|
int *delay)
|
||||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
|
||||||
int brSetEnableSTP (const char *brname,
|
int virNetDevBridgeSetSTP(const char *brname,
|
||||||
int enable)
|
int enable)
|
||||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
|
||||||
int brGetEnableSTP (const char *brname,
|
int virNetDevBridgeGetSTP(const char *brname,
|
||||||
int *enable)
|
int *enable)
|
||||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
|
||||||
|
|
||||||
int brCreateTap (char **ifname,
|
int virNetDevTapCreate(char **ifname,
|
||||||
int vnet_hdr,
|
int vnet_hdr,
|
||||||
int *tapfd)
|
int *tapfd)
|
||||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
|
||||||
|
|
||||||
int brSetInterfaceMac (const char *ifname,
|
int virNetDevSetMAC(const char *ifname,
|
||||||
const unsigned char *macaddr)
|
const unsigned char *macaddr)
|
||||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
|
||||||
|
|
||||||
# endif /* WITH_BRIDGE */
|
# endif /* WITH_BRIDGE */
|
||||||
|
Loading…
Reference in New Issue
Block a user