]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Consolidate interface related functions in interface.c
authorStefan Berger <stefanb@us.ibm.com>
Tue, 13 Apr 2010 14:57:11 +0000 (10:57 -0400)
committerStefan Berger <stefanb@us.ibm.com>
Tue, 13 Apr 2010 14:57:11 +0000 (10:57 -0400)
commit5174b02fb908c76d79d233320813966d3da8daf3
tree6722340e5c44f522e17806559ddf746924920071
parente7ebe9f35775bc968c81f9c3c16853c00facb930
Consolidate interface related functions in interface.c

Changes from v1 to v2:
- changed function name prefixes to 'iface' from previous 'Iface'

- Further to make make syntax-check pass:
 - indentation fix in interface.h
 - added entry to POTFILES.in

I am consolidating network interface related functions used in nwfilter
and macvtap code in utils/interface.c. All function names are prefixed
with 'Iface'. The following functions are now available through
interface.h:

int ifaceCtrl(const char *name, bool up);
int ifaceUp(const char *name);
int ifaceDown(const char *name);

int ifaceCheck(bool reportError, const char *ifname,
               const unsigned char *macaddr, int ifindex);

int ifaceGetIndex(bool reportError, const char *ifname, int *ifindex);

I added 'int ifindex' as parameter to ifaceCheck to the original
function and modified the code accordingly.
po/POTFILES.in
src/Makefile.am
src/libvirt_private.syms
src/nwfilter/nwfilter_gentech_driver.c
src/nwfilter/nwfilter_gentech_driver.h
src/nwfilter/nwfilter_learnipaddr.c
src/util/interface.c [new file with mode: 0644]
src/util/interface.h [new file with mode: 0644]
src/util/macvtap.c