src/util/iohelper.c
src/util/iptables.c
src/util/json.c
-src/util/netlink.c
src/util/pci.c
src/util/processinfo.c
src/util/sexpr.c
src/util/virnetdevmacvlan.c
src/util/virnetdevtap.c
src/util/virnetdevvportprofile.c
+src/util/virnetlink.c
src/util/virnodesuspend.c
src/util/virpidfile.c
src/util/virsocketaddr.c
util/json.c util/json.h \
util/logging.c util/logging.h \
util/memory.c util/memory.h \
- util/netlink.c util/netlink.h \
util/pci.c util/pci.h \
util/processinfo.c util/processinfo.h \
util/hostusb.c util/hostusb.h \
util/virnetdevtap.h util/virnetdevtap.c \
util/virnetdevveth.h util/virnetdevveth.c \
util/virnetdevvportprofile.h util/virnetdevvportprofile.c \
+ util/virnetlink.c util/virnetlink.h \
util/virrandom.h util/virrandom.c \
util/virsocketaddr.h util/virsocketaddr.c \
util/virtime.h util/virtime.c
virShrinkN;
-#netlink.h
-nlComm;
-
-
# netdev_bandwidth_conf.h
virNetDevBandwidthFormat;
virNetDevBandwidthParse;
virNetDevVPortProfileOpTypeToString;
+#virnetlink.h
+virNetlinkCommand;
+
+
# virnetmessage.h
virNetMessageClear;
virNetMessageDecodeNumFDs;
# include "logging.h"
# include "uuid.h"
# include "virfile.h"
-# include "netlink.h"
+# include "virnetlink.h"
# include "virnetdev.h"
# define MACVTAP_NAME_PREFIX "macvtap"
nla_nest_end(nl_msg, linkinfo);
- if (nlComm(nl_msg, &recvbuf, &recvbuflen, 0) < 0) {
+ if (virNetlinkCommand(nl_msg, &recvbuf, &recvbuflen, 0) < 0) {
rc = -1;
goto cleanup;
}
if (nla_put(nl_msg, IFLA_IFNAME, strlen(ifname)+1, ifname) < 0)
goto buffer_too_small;
- if (nlComm(nl_msg, &recvbuf, &recvbuflen, 0) < 0) {
+ if (virNetlinkCommand(nl_msg, &recvbuf, &recvbuflen, 0) < 0) {
rc = -1;
goto cleanup;
}
# include <linux/if.h>
# include <linux/if_tun.h>
-# include "netlink.h"
+# include "virnetlink.h"
# include "virfile.h"
# include "memory.h"
# include "logging.h"
}
}
- if (nlComm(nl_msg, recvbuf, &recvbuflen, pid) < 0) {
+ if (virNetlinkCommand(nl_msg, recvbuf, &recvbuflen, pid) < 0) {
rc = -1;
goto cleanup;
}
goto err_exit;
}
- if (nlComm(nl_msg, &recvbuf, &recvbuflen, pid) < 0)
+ if (virNetlinkCommand(nl_msg, &recvbuf, &recvbuflen, pid) < 0)
goto err_exit;
if (recvbuflen < NLMSG_LENGTH(0) || recvbuf == NULL)
/*
* Copyright (C) 2010-2011 Red Hat, Inc.
- * Copyright (C) 2010 IBM Corporation
+ * Copyright (C) 2010-2012 IBM Corporation
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
*
* Authors:
* Stefan Berger <stefanb@us.ibm.com>
+ * Dirk Herrendoerfer <herrend[at]de[dot]ibm[dot]com>
*
* Notes:
* netlink: http://lovezutto.googlepages.com/netlink.pdf
* iproute2 package
*
+ * 2012/02: Renamed from netlink.[ch] to virnetlink.[ch]
+ *
*/
#include <config.h>
#include <unistd.h>
#include <sys/types.h>
-#include "netlink.h"
+#include "virnetlink.h"
#include "memory.h"
#include "virterror_internal.h"
#define NETLINK_ACK_TIMEOUT_S 2
/**
- * nlComm:
+ * virNetlinkCommand:
* @nlmsg: pointer to netlink message
* @respbuf: pointer to pointer where response buffer will be allocated
* @respbuflen: pointer to integer holding the size of the response buffer
* buffer will be returned.
*/
#if defined(__linux__) && defined(HAVE_LIBNL)
-int nlComm(struct nl_msg *nl_msg,
- unsigned char **respbuf, unsigned int *respbuflen,
- int nl_pid)
+int virNetlinkCommand(struct nl_msg *nl_msg,
+ unsigned char **respbuf, unsigned int *respbuflen,
+ int nl_pid)
{
int rc = 0;
struct sockaddr_nl nladdr = {
#else
-int nlComm(struct nl_msg *nl_msg ATTRIBUTE_UNUSED,
+int virNetlinkCommand(struct nl_msg *nl_msg ATTRIBUTE_UNUSED,
unsigned char **respbuf ATTRIBUTE_UNUSED,
unsigned int *respbuflen ATTRIBUTE_UNUSED,
int nl_pid ATTRIBUTE_UNUSED)
{
netlinkError(VIR_ERR_INTERNAL_ERROR, "%s",
# if defined(__linux__) && !defined(HAVE_LIBNL)
- _("nlComm is not supported since libnl was not available"));
+ _("virNetlinkCommand is not supported since libnl was not available"));
# else
- _("nlComm is not supported on non-linux platforms"));
+ _("virNetlinkCommand is not supported on non-linux platforms"));
# endif
return -1;
}
/*
* Copyright (C) 2010-2011 Red Hat, Inc.
- * Copyright (C) 2010 IBM Corporation
+ * Copyright (C) 2010-2012 IBM Corporation
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
# endif /* __linux__ */
-int nlComm(struct nl_msg *nl_msg,
- unsigned char **respbuf, unsigned int *respbuflen,
- int nl_pid);
+int virNetlinkCommand(struct nl_msg *nl_msg,
+ unsigned char **respbuf, unsigned int *respbuflen,
+ int nl_pid);
#endif /* __VIR_NETLINK_H__ */