<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.sysutils.netcf.devel">
    <title>gmane.comp.sysutils.netcf.devel</title>
    <link>http://blog.gmane.org/gmane.comp.sysutils.netcf.devel</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/738"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/737"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/736"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/735"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/734"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/733"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/732"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/731"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/730"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/729"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/728"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/727"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/726"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/725"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/724"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/723"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/722"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/721"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/720"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/719"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/738">
    <title>[PATCH 4/5] Wow, it compiles and everything.</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/738</link>
    <description>&lt;pre&gt;---
 src/Makefile.am   |    2 +-
 src/drv_fbsd.c    |   94 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 src/dutil_fbsd.c  |   27 ---------------
 src/dutil_fbsd.h  |   40 +++++++++--------------
 src/dutil_linux.c |   73 +++++++++++++++++++++++++++++++++--------
 5 files changed, 171 insertions(+), 65 deletions(-)
 delete mode 100644 src/dutil_fbsd.c

diff --git a/src/Makefile.am b/src/Makefile.am
index e431eff..81aaadc 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -16,7 +16,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; noinst_PROGRAMS = ncftransform
 endif
 
 DRIVER_SOURCES_COMMON = dutil.h dutil.c
-DRIVER_SOURCES_FBSD = dutil_fbsd.h dutil_fbsd.c drv_fbsd.c
+DRIVER_SOURCES_FBSD = dutil_fbsd.h drv_fbsd.c
 DRIVER_SOURCES_LINUX = dutil_linux.h dutil_linux.c
 DRIVER_SOURCES_MSWINDOWS = dutil_mswindows.h dutil_mswindows.c drv_mswindows.c
 DRIVER_SOURCES_REDHAT = drv_redhat.c
diff --git a/src/drv_fbsd.c b/src/drv_fbsd.c
index 1b3bb87..0ae2b8e 100644
--- a/src/drv_fbsd.c
+++ b/src/drv_fbsd.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -59,6 +59,32 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void drv_close(struct netcf *ncf) {
 
 }
 
+void drv_entry (struct netcf *ncf ATTRIBUTE_UNUSED) {
+}
+
+static int list_interfaces(struct netcf *ncf, char ***intf) {
+    int nint = 0, result = 0;
+    struct augeas *aug = NULL;
+FILE *hackery;
+
+    aug = get_augeas(ncf);
+    ERR_BAIL(ncf);
+
+    /* Look for all interfaces */
+    hackery = popen("r+","ifconfig|grep flags|awk '{print $1}'|wc -l"); // HACKERY
+read(&amp;amp;nint, sizeof(nint), 1, hackery);
+printf ("nint == %d\n");
+pclose(hackery);
+    ERR_BAIL(ncf);
+    result = nint;
+
+/* TODO filter out slave interfaces */
+    return result;
+ error:
+    free_matches(nint, intf);
+    return -1;
+}
+
 static int list_interface_ids(struct netcf *ncf,
                               int maxnames,
                               char **names, unsigned int flags ATTRIBUTE_UNUSED) {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -230,3 +256,71 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; drv_change_commit(struct netcf *ncf, unsigned int flags ATTRIBUTE_UNUSED)
 error:
     return result;
 }
+
+/*
+ * Test interface
+ */
+static int drv_get_aug(struct netcf *ncf, const char *ncf_xml, char **aug_xml) {
+    xmlDocPtr ncf_doc = NULL, aug_doc = NULL;
+    int result = -1;
+
+    ncf_doc = parse_xml(ncf, ncf_xml);
+    ERR_BAIL(ncf);
+
+    rng_validate(ncf, ncf_doc);
+    ERR_BAIL(ncf);
+
+    *aug_xml = apply_stylesheet_to_string(ncf, ncf-&amp;gt;driver-&amp;gt;get, ncf_doc);
+    ERR_BAIL(ncf);
+
+    /* fallthrough intentional */
+    result = 0;
+ error:
+    xmlFreeDoc(ncf_doc);
+    xmlFreeDoc(aug_doc);
+    return result;
+}
+
+/* Transform the Augeas XML AUG_XML into interface XML NCF_XML */
+static int drv_put_aug(struct netcf *ncf, const char *aug_xml, char **ncf_xml) {
+    xmlDocPtr ncf_doc = NULL, aug_doc = NULL;
+    int result = -1;
+
+    aug_doc = parse_xml(ncf, aug_xml);
+    ERR_BAIL(ncf);
+
+    *ncf_xml = apply_stylesheet_to_string(ncf, ncf-&amp;gt;driver-&amp;gt;put, aug_doc);
+    ERR_BAIL(ncf);
+
+    /* fallthrough intentional */
+    result = 0;
+ error:
+    xmlFreeDoc(ncf_doc);
+    xmlFreeDoc(aug_doc);
+    return result;
+}
+
+/*
+ * Test interface
+ */
+int ncf_get_aug(struct netcf *ncf, const char *ncf_xml, char **aug_xml) {
+    API_ENTRY(ncf);
+
+    return drv_get_aug(ncf, ncf_xml, aug_xml);
+}
+
+int ncf_put_aug(struct netcf *ncf, const char *aug_xml, char **ncf_xml) {
+    API_ENTRY(ncf);
+
+    return drv_put_aug(ncf, aug_xml, ncf_xml);
+}
+
+/*
+ * Local variables:
+ *  indent-tabs-mode: nil
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 4
+ * End:
+ */
+/* vim: set ts=4 sw=4 et: */
diff --git a/src/dutil_fbsd.c b/src/dutil_fbsd.c
deleted file mode 100644
index 3f98319..0000000
--- a/src/dutil_fbsd.c
+++ /dev/null
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,27 +0,0 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
-/*
- * dutil_mswindows.c: Windows utility functions for driver backends.
- *
- * Copyright (C) 2010 Red Hat Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
- *
- * Author: Adam Stokes &amp;lt;astokes&amp;lt; at &amp;gt;fedoraproject.org&amp;gt;
- */
-
-#include &amp;lt;config.h&amp;gt;
-#include &amp;lt;internal.h&amp;gt;
-
-#include "dutil.h"
-#include "dutil_mswindows.h"
diff --git a/src/dutil_fbsd.h b/src/dutil_fbsd.h
index 78295b5..6409099 100644
--- a/src/dutil_fbsd.h
+++ b/src/dutil_fbsd.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,30 +1,22 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 /*
- * dutil_mswindows.h: Window utility functions for driver backends.
- *
- * Copyright (C) 2010 Red Hat Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
- *
- * Author: Adam Stokes &amp;lt;astokes&amp;lt; at &amp;gt;fedoraproject.org&amp;gt;
+ * dutil_fbsd.c: FreeBSD utility functions for driver backends.
  */
 
-#ifndef DUTIL_MSWINDOWS_H_
-#define DUTIL_MSWINDOWS_H_
+#include &amp;lt;config.h&amp;gt;
+#include &amp;lt;internal.h&amp;gt;
+
+#include "dutil.h"
 
 struct driver {
-    int padding;
+    struct augeas     *augeas;
+    xsltStylesheetPtr  put;
+    xsltStylesheetPtr  get;
+    int                ioctl_fd;
+    struct nl_handle  *nl_sock;
+    struct nl_cache   *link_cache;
+    struct nl_cache   *addr_cache;
+    unsigned int       load_augeas : 1;
+    unsigned int       copy_augeas_xfm : 1;
+    unsigned int       augeas_xfm_num_tables;
+    const struct augeas_xfm_table **augeas_xfm_tables;
 };
-
-#endif /* DUTIL_MSWINDOWS_H_ */
diff --git a/src/dutil_linux.c b/src/dutil_linux.c
index e36c8e3..4651592 100644
--- a/src/dutil_linux.c
+++ b/src/dutil_linux.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -877,6 +877,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct nl_ip_callback_data {
 
 /* add all ip addresses for the given interface to the xml document
 */
+#ifdef __FreeBSD__
+static void add_ip_info_cb(struct nl_object *obj, void *arg) {
+}
+#else
 static void add_ip_info_cb(struct nl_object *obj, void *arg) {
     struct nl_ip_callback_data *cb_data = arg;
     struct rtnl_addr *addr = (struct rtnl_addr *)obj;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -955,7 +959,15 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void add_ip_info_cb(struct nl_object *obj, void *arg) {
 error:
     return;
 }
+#endif
 
+#ifdef __FreeBSD__
+static void add_ip_info(struct netcf *ncf,
+                        const char *ifname ATTRIBUTE_UNUSED, int ifindex,
+                        xmlDocPtr doc, xmlNodePtr root) {
+    return;
+}
+#else
 static void add_ip_info(struct netcf *ncf,
                         const char *ifname ATTRIBUTE_UNUSED, int ifindex,
                         xmlDocPtr doc, xmlNodePtr root) {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -975,7 +987,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; error:
         rtnl_addr_put(filter_addr);
     return;
 }
-
+#endif
 
 struct nl_ethernet_callback_data {
     xmlDocPtr doc;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1008,6 +1020,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; error:
     return;
 }
 
+#ifdef __FreeBSD__
+static void add_ethernet_info(struct netcf *ncf,
+                              const char *ifname ATTRIBUTE_UNUSED, int ifindex,
+                              xmlDocPtr doc, xmlNodePtr root) {
+    return;
+}
+#else
 static void add_ethernet_info(struct netcf *ncf,
                               const char *ifname ATTRIBUTE_UNUSED, int ifindex,
                               xmlDocPtr doc, xmlNodePtr root) {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1015,11 +1034,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void add_ethernet_info(struct netcf *ncf,
         = { doc, root, NULL, ncf };
     struct rtnl_link *filter_link = NULL;
 
-#ifndef __FreeBSD__
     /* if interface isn't currently available, nothing to add */
     if (ifindex == RTNL_LINK_NOT_FOUND)
         return;
-#endif
 
     filter_link = rtnl_link_alloc();
     ERR_NOMEM(filter_link == NULL, ncf);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1033,6 +1050,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; error:
         rtnl_link_put(filter_link);
     return;
 }
+#endif
 
 struct nl_vlan_callback_data {
     xmlDocPtr doc;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1041,6 +1059,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct nl_vlan_callback_data {
     struct netcf *ncf;
 };
 
+#ifdef __FreeBSD__
+static void add_vlan_info_cb(struct nl_object *obj, void *arg) {
+    return;
+}
+#else
 static void add_vlan_info_cb(struct nl_object *obj, void *arg) {
     struct nl_vlan_callback_data *cb_data = arg;
     struct rtnl_link *iflink = (struct rtnl_link *)obj;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1064,10 +1087,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void add_vlan_info_cb(struct nl_object *obj, void *arg) {
         return;
 
     l_link = rtnl_link_get_link(iflink);
-#ifndef __FreeBSD__
     if (l_link == RTNL_LINK_NOT_FOUND)
         return;
-#endif
 
     master_link = rtnl_link_get(nl_object_get_cache(obj), l_link);
     if (master_link == NULL)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1091,18 +1112,24 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void add_vlan_info_cb(struct nl_object *obj, void *arg) {
 
     /* Add in type-specific info of master interface */
     master_ifindex = rtnl_link_name2i(ncf-&amp;gt;driver-&amp;gt;link_cache, master_name);
-#ifndef __FreeBSD__
     ERR_THROW((master_ifindex == RTNL_LINK_NOT_FOUND), ncf, ENETLINK,
               "couldn't find ifindex for vlan master interface `%s`",
               master_name);
-#endif
     add_type_specific_info(ncf, master_name, master_ifindex,
                            cb_data-&amp;gt;doc, interface_node);
 
 error:
     return;
 }
+#endif
 
+#ifdef __FreeBSD__
+static void add_vlan_info(struct netcf *ncf,
+                          const char *ifname ATTRIBUTE_UNUSED, int ifindex,
+                          xmlDocPtr doc, xmlNodePtr root) {
+    return;
+}
+#else
 static void add_vlan_info(struct netcf *ncf,
                           const char *ifname ATTRIBUTE_UNUSED, int ifindex,
                           xmlDocPtr doc, xmlNodePtr root) {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1110,11 +1137,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void add_vlan_info(struct netcf *ncf,
         = { doc, root, NULL, ncf };
     struct rtnl_link *filter_link = NULL;
 
-#ifndef __FreeBSD__
     /* if interface isn't currently available, nothing to add */
     if (ifindex == RTNL_LINK_NOT_FOUND)
         return;
-#endif
 
     filter_link = rtnl_link_alloc();
     ERR_NOMEM(filter_link == NULL, ncf);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1129,7 +1154,15 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; error:
         rtnl_link_put(filter_link);
     return;
 }
+#endif
 
+#ifdef __FreeBSD__
+static void add_bridge_info(struct netcf *ncf,
+                            const char *ifname, int ifindex ATTRIBUTE_UNUSED,
+                            xmlDocPtr doc, xmlNodePtr root) {
+    return;
+}
+#else
 static void add_bridge_info(struct netcf *ncf,
                             const char *ifname, int ifindex ATTRIBUTE_UNUSED,
                             xmlDocPtr doc, xmlNodePtr root) {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1171,6 +1204,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; error:
         FREE(phys_names[ii]);
     FREE(phys_names);
 }
+#endif
 
 
 struct nl_bond_callback_data {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1181,6 +1215,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct nl_bond_callback_data {
     struct netcf *ncf;
 };
 
+#ifdef __FreeBSD__
+static void add_bond_info_cb(struct nl_object *obj,
+                             void *arg ATTRIBUTE_UNUSED) {
+    return;
+}
+#else
 static void add_bond_info_cb(struct nl_object *obj,
                              void *arg ATTRIBUTE_UNUSED) {
     struct nl_bond_callback_data *cb_data = arg;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1189,7 +1229,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void add_bond_info_cb(struct nl_object *obj,
 
     xmlNodePtr interface_node;
 
-#ifndef __FreeBSD__
     /* If this is a slave link, and the master is master_ifindex, add the
      * interface info to the bond.
      */
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1197,7 +1236,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void add_bond_info_cb(struct nl_object *obj,
     if (!(rtnl_link_get_flags(iflink) &amp;amp; IFF_SLAVE)
         || rtnl_link_get_master(iflink) != cb_data-&amp;gt;master_ifindex)
         return;
-#endif
 
     cb_data-&amp;gt;bond = xml_node(cb_data-&amp;gt;doc, cb_data-&amp;gt;root, "bond");
     ERR_NOMEM(cb_data-&amp;gt;bond == NULL, ncf);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1222,21 +1260,28 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void add_bond_info_cb(struct nl_object *obj,
 error:
     return;
 }
+#endif
 
+#ifdef __FreeBSD__
+static void add_bond_info(struct netcf *ncf,
+                          const char *ifname ATTRIBUTE_UNUSED, int ifindex,
+                          xmlDocPtr doc, xmlNodePtr root) {
+    return;
+}
+#else
 static void add_bond_info(struct netcf *ncf,
                           const char *ifname ATTRIBUTE_UNUSED, int ifindex,
                           xmlDocPtr doc, xmlNodePtr root) {
     struct nl_bond_callback_data cb_data
         = { doc, root, NULL, ifindex, ncf };
 
-#ifndef __FreeBSD__
     /* if interface isn't currently available, nothing to add */
     if (ifindex == RTNL_LINK_NOT_FOUND)
         return;
-#endif
 
     nl_cache_foreach(ncf-&amp;gt;driver-&amp;gt;link_cache, add_bond_info_cb, &amp;amp;cb_data);
 }
+#endif
 
 
 static void add_type_specific_info(struct netcf *ncf,
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1288,6 +1333,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void add_state_to_xml_doc(struct netcf_if *nif, xmlDocPtr doc) {
     ERR_THROW(!xmlStrEqual(root-&amp;gt;name, BAD_CAST "interface"),
               nif-&amp;gt;ncf, EINTERNAL, "root document is not an interface");
 
+#ifndef __FreeBSD__
     /* Update the caches with any recent changes */
     code = nl_cache_refill(nif-&amp;gt;ncf-&amp;gt;driver-&amp;gt;nl_sock,
                            nif-&amp;gt;ncf-&amp;gt;driver-&amp;gt;link_cache);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1299,6 +1345,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void add_state_to_xml_doc(struct netcf_if *nif, xmlDocPtr doc) {
               "failed to refill interface address cache");
 
     ifindex = rtnl_link_name2i(nif-&amp;gt;ncf-&amp;gt;driver-&amp;gt;link_cache, nif-&amp;gt;name);
+#endif
     /* We ignore an error return here, because that usually just
      * means the interface isn't currently running. The
      * type-specific functions will recognize this from the
&lt;/pre&gt;</description>
    <dc:creator>Sean Bruno</dc:creator>
    <dc:date>2012-05-18T16:38:53</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/737">
    <title>[PATCH 0/5] Initial FreeBSD Support Patches</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/737</link>
    <description>&lt;pre&gt;Its round 1 of our patchsets here in FreeBSD land.  This more or less
stubs out the code for FreeBSD support.  We will flush out that code in
following patchsets.

_______________________________________________
netcf-devel mailing list
netcf-devel&amp;lt; at &amp;gt;lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/netcf-devel
&lt;/pre&gt;</description>
    <dc:creator>Sean Bruno</dc:creator>
    <dc:date>2012-05-18T16:38:49</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/736">
    <title>[PATCH 2/5] More modifications to detect freebsd</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/736</link>
    <description>&lt;pre&gt;---
 .gitignore      |   10 +-
 INSTALL         |  365 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 configure.ac    |    9 +-
 src/Makefile.am |    7 ++
 src/drv_fbsd.c  |   71 +----------
 5 files changed, 392 insertions(+), 70 deletions(-)
 create mode 100644 INSTALL

diff --git a/.gitignore b/.gitignore
index 91b3a7c..d46b950 100644
--- a/.gitignore
+++ b/.gitignore
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -8,16 +8,16 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 *.pdf
 *.spec
 *~
-/.git-module-status
 .deps/
 .libs/
-/build-aux
+/.git-module-status
 /ChangeLog
-Makefile
-Makefile.in
 /TAGS
 /aclocal.m4
 /autom4te.cache/
+/build-aux
+Makefile
+Makefile.in
 build/
 config.guess
 config.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -43,3 +43,5 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; stamp-h1
 tests/test-debian
 tests/test-redhat
 ylwrap
+/GNUmakefile
+/maint.mk
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..7d1c323
--- /dev/null
+++ b/INSTALL
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,365 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+
+   Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.  This file is offered as-is,
+without warranty of any kind.
+
+Basic Installation
+==================
+
+   Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package.  The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.  Some packages provide this
+`INSTALL' file but do not implement all of the features documented
+below.  The lack of an optional feature in a given package is not
+necessarily a bug.  More recommendations for GNU packages can be found
+in *note Makefile Conventions: (standards)Makefile Conventions.
+
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+   It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring.  Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+   The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'.  You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
+
+   The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.
+
+     Running `configure' might take a while.  While running, it prints
+     some messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package, generally using the just-built uninstalled binaries.
+
+  4. Type `make install' to install the programs and any data files and
+     documentation.  When installing into a prefix owned by root, it is
+     recommended that the package be configured and built as a regular
+     user, and only the `make install' phase executed with root
+     privileges.
+
+  5. Optionally, type `make installcheck' to repeat any self-tests, but
+     this time using the binaries in their final installed location.
+     This target does not install anything.  Running this target as a
+     regular user, particularly if the prior `make install' required
+     root privileges, verifies that the installation completed
+     correctly.
+
+  6. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
+
+  7. Often, you can also type `make uninstall' to remove the installed
+     files again.  In practice, not all packages have tested that
+     uninstallation works correctly, even though it is required by the
+     GNU Coding Standards.
+
+  8. Some packages, particularly those that use Automake, provide `make
+     distcheck', which can by used by developers to test that all other
+     targets like `make install' and `make uninstall' work correctly.
+     This target is generally not run by end users.
+
+Compilers and Options
+=====================
+
+   Some systems require unusual options for compilation or linking that
+the `configure' script does not know about.  Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+   You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here
+is an example:
+
+     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+   *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+   You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you can use GNU `make'.  `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script.  `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.  This
+is known as a "VPATH" build.
+
+   With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory.  After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+   On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor.  Like
+this:
+
+     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CPP="gcc -E" CXXCPP="g++ -E"
+
+   This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
+
+Installation Names
+==================
+
+   By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc.  You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX', where PREFIX must be an
+absolute file name.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files.  Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.  In general, the
+default for these options is expressed in terms of `${prefix}', so that
+specifying just `--prefix' will affect all of the other directory
+specifications that were not explicitly provided.
+
+   The most portable way to affect installation locations is to pass the
+correct locations to `configure'; however, many packages provide one or
+both of the following shortcuts of passing variable assignments to the
+`make install' command line to change installation locations without
+having to reconfigure or recompile.
+
+   The first method involves providing an override variable for each
+affected directory.  For example, `make install
+prefix=/alternate/directory' will choose an alternate location for all
+directory configuration variables that were expressed in terms of
+`${prefix}'.  Any directories that were specified during `configure',
+but not in terms of `${prefix}', must each be overridden at install
+time for the entire installation to be relocated.  The approach of
+makefile variable overrides for each directory variable is required by
+the GNU Coding Standards, and ideally causes no recompilation.
+However, some platforms have known limitations with the semantics of
+shared libraries that end up requiring recompilation when using this
+method, particularly noticeable in packages that use GNU Libtool.
+
+   The second method involves providing the `DESTDIR' variable.  For
+example, `make install DESTDIR=/alternate/directory' will prepend
+`/alternate/directory' before all installation names.  The approach of
+`DESTDIR' overrides is not required by the GNU Coding Standards, and
+does not work on platforms that have drive letters.  On the other hand,
+it does better at avoiding recompilation issues, and works well even
+when some directory options were not specified in terms of `${prefix}'
+at `configure' time.
+
+Optional Features
+=================
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+   Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+   Some packages offer the ability to configure how verbose the
+execution of `make' will be.  For these packages, running `./configure
+--enable-silent-rules' sets the default to minimal output, which can be
+overridden with `make V=1'; while running `./configure
+--disable-silent-rules' sets the default to verbose, which can be
+overridden with `make V=0'.
+
+Particular systems
+==================
+
+   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `&amp;lt;wchar.h&amp;gt;' header file.  The option `-nodtk' can be used as
+a workaround.  If GNU CC is not installed, it is therefore recommended
+to try
+
+     ./configure CC="cc"
+
+and if that doesn't work, try
+
+     ./configure CC="cc -nodtk"
+
+   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
+directory contains several dysfunctional programs; working variants of
+these programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
+in your `PATH', put it _after_ `/usr/bin'.
+
+   On Haiku, software installed for all users goes in `/boot/common',
+not `/usr/local'.  It is recommended to use the following options:
+
+     ./configure --prefix=/boot/common
+
+Specifying the System Type
+==========================
+
+   There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on.  Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+     CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+     OS
+     KERNEL-OS
+
+   See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+   If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+   If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+   If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+   Variables not defined in a site shell script can be set in the
+environment passed to `configure'.  However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
+
+     ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug.  Until the bug is fixed you can use this workaround:
+
+     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+   `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+     Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+     Print a summary of the options unique to this package's
+     `configure', and exit.  The `short' variant lists options used
+     only in the top level, while the `recursive' variant lists options
+     also present in any nested packages.
+
+`--version'
+`-V'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`--cache-file=FILE'
+     Enable the cache: use and save the results of the tests in FILE,
+     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     disable caching.
+
+`--config-cache'
+`-C'
+     Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.  To
+     suppress all normal output, redirect it to `/dev/null' (any error
+     messages will still be shown).
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`--prefix=DIR'
+     Use DIR as the installation prefix.  *note Installation Names::
+     for more details, including other options available for fine-tuning
+     the installation locations.
+
+`--no-create'
+`-n'
+     Run the configure checks, but stop before creating any output
+     files.
+
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
+
diff --git a/configure.ac b/configure.ac
index c1060f3..2607a96 100644
--- a/configure.ac
+++ b/configure.ac
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -80,6 +80,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; fi
 if test "x$with_driver" = "xcheck" &amp;amp;&amp;amp; test -f /etc/suse-release ; then
   with_driver=suse
 fi
+if test "x$with_driver" = "xcheck" &amp;amp;&amp;amp; test -f /usr/include/sys/param.h ; then
+  with_driver=fbsd
+fi
 if test "x$with_driver" = "xcheck" ; then
   AC_MSG_ERROR([Cannot detect network driver, use --with-driver=NAME to select implementation])
 fi
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -91,6 +94,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; AM_CONDITIONAL([NETCF_DRIVER_REDHAT], test "x$with_driver" = "xredhat")
 AM_CONDITIONAL([NETCF_DRIVER_DEBIAN], test "x$with_driver" = "xdebian")
 AM_CONDITIONAL([NETCF_DRIVER_SUSE], test "x$with_driver" = "xsuse")
 AM_CONDITIONAL([NETCF_DRIVER_MSWINDOWS], test "x$with_driver" = "xmswindows")
+AM_CONDITIONAL([NETCF_DRIVER_FBSD], test "x$with_driver" = "xfbsd")
 
 if test "x$with_driver" = "xredhat"; then
     AC_DEFINE_UNQUOTED([NETCF_TRANSACTION],
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -103,7 +107,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; AM_CONDITIONAL([NETCF_INIT_SCRIPT_RED_HAT],
 if test "x$with_driver" != "xmswindows"
 then
     PKG_CHECK_MODULES([LIBAUGEAS], [augeas &amp;gt;= 0.5.0])
-    PKG_CHECK_MODULES([LIBNL], [libnl-1])
+    if test "x$with_driver" != "xfbsd"
+    then
+        PKG_CHECK_MODULES([LIBNL], [libnl-1])
+    fi
 fi
 
 NETCF_LIBDEPS=$(echo $LIBAUGEAS_LIBS $LIBEXSLT_LIBS $LIBXSLT_LIBS $LIBXML_LIBS $LIBNL_LIBS)
diff --git a/src/Makefile.am b/src/Makefile.am
index b5c732a..484ba97 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -16,6 +16,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; noinst_PROGRAMS = ncftransform
 endif
 
 DRIVER_SOURCES_COMMON = dutil.h dutil.c
+DRIVER_SOURCES_FBSD = dutil_fbsd.h dutil_fbsd.c drv_fbsd.c
 DRIVER_SOURCES_LINUX = dutil_linux.h dutil_linux.c
 DRIVER_SOURCES_MSWINDOWS = dutil_mswindows.h dutil_mswindows.c drv_mswindows.c
 DRIVER_SOURCES_REDHAT = drv_redhat.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -26,6 +27,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; EXTRA_DIST = netcf_public.syms \
 netcf_private.syms \
 netcf-transaction.init.sh \
 $(DRIVER_SOURCES_COMMON) \
+$(DRIVER_SOURCES_FBSD) \
 $(DRIVER_SOURCES_LINUX) \
 $(DRIVER_SOURCES_MSWINDOWS) \
 $(DRIVER_SOURCES_REDHAT) \
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -55,6 +57,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; DRIVER_SOURCES = \
 $(DRIVER_SOURCES_COMMON) \
 $(DRIVER_SOURCES_MSWINDOWS)
 endif
+if NETCF_DRIVER_FBSD
+DRIVER_SOURCES = \
+$(DRIVER_SOURCES_COMMON) \
+$(DRIVER_SOURCES_FBSD)
+endif
 
 BUILT_SOURCES = datadir.h netcf.syms
 
diff --git a/src/drv_fbsd.c b/src/drv_fbsd.c
index 64b0e98..7fd3025 100644
--- a/src/drv_fbsd.c
+++ b/src/drv_fbsd.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -22,17 +22,16 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int drv_init(struct netcf *ncf) {
 
 
 void drv_close(struct netcf *ncf) {
-    if (ncf == NULL || ncf-&amp;gt;driver == NULL)
-        return;
-    FREE(ncf-&amp;gt;driver);
-}
 
+    return;
 
-void drv_entry(struct netcf *ncf ATTRIBUTE_UNUSED) {
 }
 
-static PIP_ADAPTER_ADDRESSES build_adapter_table(struct netcf *ncf) {
-    return NULL;
+
+void build_adapter_table(struct netcf *ncf) {
+
+    return;
+
 }
 
 static int list_interface_ids(struct netcf *ncf,
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -55,78 +54,40 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int drv_num_of_interfaces(struct netcf *ncf, unsigned int flags) {
 
 struct netcf_if *drv_lookup_by_name(struct netcf *ncf, const char *name) {
     ERR_THROW(1 == 1, ncf, EOTHER, "not implemented on this platform");
-
-    return nif;
 }
 
 const char *drv_mac_string(struct netcf_if *nif) {
-    struct netcf *ncf = nif-&amp;gt;ncf;
     ERR_THROW(1 == 1, ncf, EOTHER, "not implemented on this platform");
- error:
-    free(adapter);
-    free(buf);
-    return nif-&amp;gt;mac;
 }
 
 int drv_if_down(struct netcf_if *nif) {
     ERR_THROW(1 == 1, ncf, EOTHER, "not implemented on this platform");
- error:
-    free(exe_path);
-    return -1;
 }
 
 int drv_if_up(struct netcf_if *nif) {
     ERR_THROW(1 == 1, ncf, EOTHER, "not implemented on this platform");
- error:
-    free(exe_path);
-    return -1;
 }
 
 
 struct netcf_if *drv_define(struct netcf *ncf, const char *xml_str ATTRIBUTE_UNUSED) {
-    struct netcf_if *result = NULL;
-
     ERR_THROW(1 == 1, ncf, EOTHER, "not implemented on this platform");
-
-error:
-    return result;
 }
 
 int drv_undefine(struct netcf_if *nif) {
-    int result = -1;
-
     ERR_THROW(1 == 1, nif-&amp;gt;ncf, EOTHER, "not implemented on this platform");
-    result = 0;
-error:
-    return result;
 }
 
 
 char *drv_xml_desc(struct netcf_if *nif) {
-    char *result = NULL;
-
     ERR_THROW(1 == 1, nif-&amp;gt;ncf, EOTHER, "not implemented on this platform");
-
-error:
-    return result;
 }
 
 char *drv_xml_state(struct netcf_if *nif) {
-    char *result = NULL;
-
     ERR_THROW(1 == 1, nif-&amp;gt;ncf, EOTHER, "not implemented on this platform");
-
-error:
-    return result;
 }
 
 int drv_if_status(struct netcf_if *nif, unsigned int *flags ATTRIBUTE_UNUSED) {
-    int result = -1;
-
     ERR_THROW(1 == 1, nif-&amp;gt;ncf, EOTHER, "not implemented on this platform");
-    result = 0;
-error:
-    return result;
 }
 
 int drv_lookup_by_mac_string(struct netcf *ncf,
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -134,43 +95,23 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int drv_lookup_by_mac_string(struct netcf *ncf,
                              int maxifaces ATTRIBUTE_UNUSED,
      struct netcf_if **ifaces ATTRIBUTE_UNUSED)
 {
-    int result = -1;
-
     ERR_THROW(1 == 1, ncf, EOTHER, "not implemented on this platform");
-    result = 0;
-error:
-    return result;
 }
 
 int
 drv_change_begin(struct netcf *ncf, unsigned int flags ATTRIBUTE_UNUSED)
 {
-    int result = -1;
-
     ERR_THROW(1 == 1, ncf, EOTHER, "not implemented on this platform");
-    result = 0;
-error:
-    return result;
 }
 
 int
 drv_change_rollback(struct netcf *ncf, unsigned int flags ATTRIBUTE_UNUSED)
 {
-    int result = -1;
-
     ERR_THROW(1 == 1, ncf, EOTHER, "not implemented on this platform");
-    result = 0;
-error:
-    return result;
 }
 
 int
 drv_change_commit(struct netcf *ncf, unsigned int flags ATTRIBUTE_UNUSED)
 {
-    int result = -1;
-
     ERR_THROW(1 == 1, ncf, EOTHER, "not implemented on this platform");
-    result = 0;
-error:
-    return result;
 }
&lt;/pre&gt;</description>
    <dc:creator>Sean Bruno</dc:creator>
    <dc:date>2012-05-18T16:38:51</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/735">
    <title>[PATCH 5/5] More cleanup, remove some more functions,quiesce a lot of errors.  Now the fun can begin</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/735</link>
    <description>&lt;pre&gt;---
 src/drv_fbsd.c   |   15 ++++++---------
 src/dutil_fbsd.h |    9 +++++++++
 2 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/src/drv_fbsd.c b/src/drv_fbsd.c
index 0ae2b8e..9770ed0 100644
--- a/src/drv_fbsd.c
+++ b/src/drv_fbsd.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -72,8 +72,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int list_interfaces(struct netcf *ncf, char ***intf) {
 
     /* Look for all interfaces */
     hackery = popen("r+","ifconfig|grep flags|awk '{print $1}'|wc -l"); // HACKERY
-read(&amp;amp;nint, sizeof(nint), 1, hackery);
-printf ("nint == %d\n");
+fread(&amp;amp;nint, sizeof(nint), 1, hackery);
+printf ("nint == %d\n", nint);
 pclose(hackery);
     ERR_BAIL(ncf);
     result = nint;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -144,8 +144,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int drv_num_of_interfaces(struct netcf *ncf, unsigned int flags) {
 
 
 struct netcf_if *drv_lookup_by_name(struct netcf *ncf, const char *name) {
-int result;
 
+    printf("%s: attempted to lookup %s\n", __func__, name);
     ERR_THROW(1 == 1, ncf, EOTHER, "not implemented on this platform");
 error:
     return NULL;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -175,11 +175,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; error:
 
 
 struct netcf_if *drv_define(struct netcf *ncf, const char *xml_str ATTRIBUTE_UNUSED) {
-int result = 0;
 
     ERR_THROW(1 == 1, ncf, EOTHER, "not implemented on this platform");
 error:
-    return result;
+    return NULL;
 }
 
 int drv_undefine(struct netcf_if *nif) {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -192,19 +191,17 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; error:
 
 
 char *drv_xml_desc(struct netcf_if *nif) {
-int result = 0;
 
     ERR_THROW(1 == 1, nif-&amp;gt;ncf, EOTHER, "not implemented on this platform");
 error:
-    return result;
+    return NULL;
 }
 
 char *drv_xml_state(struct netcf_if *nif) {
-int result = 0;
 
     ERR_THROW(1 == 1, nif-&amp;gt;ncf, EOTHER, "not implemented on this platform");
 error:
-    return result;
+    return NULL;
 }
 
 int drv_if_status(struct netcf_if *nif, unsigned int *flags ATTRIBUTE_UNUSED) {
diff --git a/src/dutil_fbsd.h b/src/dutil_fbsd.h
index 6409099..73b71ad 100644
--- a/src/dutil_fbsd.h
+++ b/src/dutil_fbsd.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -20,3 +20,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct driver {
     unsigned int       augeas_xfm_num_tables;
     const struct augeas_xfm_table **augeas_xfm_tables;
 };
+
+/* Get or create the augeas instance from NCF */
+struct augeas *get_augeas(struct netcf *ncf);
+
+/* Free matches from aug_match (or aug_submatch) */
+void free_matches(int nint, char ***intf);
+
+/* Check if the interface INTF is up using an ioctl call */
+int if_is_active(struct netcf *ncf, const char *intf);
&lt;/pre&gt;</description>
    <dc:creator>Sean Bruno</dc:creator>
    <dc:date>2012-05-18T16:38:54</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/734">
    <title>[PATCH 3/5] Objects now build,need to replace libnl calls with freebsdisms</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/734</link>
    <description>&lt;pre&gt;---
 src/Makefile.am   |    1 +
 src/drv_fbsd.c    |  135 +++++++++++++++++++++++++++++++++++++++++++++++++----
 src/dutil_linux.c |   28 +++++++++++
 src/dutil_linux.h |    2 +
 4 files changed, 156 insertions(+), 10 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 484ba97..e431eff 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -60,6 +60,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; endif
 if NETCF_DRIVER_FBSD
 DRIVER_SOURCES = \
 $(DRIVER_SOURCES_COMMON) \
+$(DRIVER_SOURCES_LINUX) \
 $(DRIVER_SOURCES_FBSD)
 endif
 
diff --git a/src/drv_fbsd.c b/src/drv_fbsd.c
index 7fd3025..1b3bb87 100644
--- a/src/drv_fbsd.c
+++ b/src/drv_fbsd.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,9 +1,34 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 /*
+ * Copyright (c) 2012, Sean Bruno sbruno&amp;lt; at &amp;gt;freebsd.org
+ * All rights reserved.
+
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of the &amp;lt;organization&amp;gt; nor the
+      names of its contributors may be used to endorse or promote products
+      derived from this software without specific prior written permission.
+
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL &amp;lt;COPYRIGHT HOLDER&amp;gt; BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
 #include &amp;lt;config.h&amp;gt;
 #include &amp;lt;internal.h&amp;gt;
 
+#include &amp;lt;augeas.h&amp;gt;
 #include &amp;lt;stdio.h&amp;gt;
 #include &amp;lt;stdlib.h&amp;gt;
 #include &amp;lt;spawn.h&amp;gt;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -17,27 +42,67 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "dutil_fbsd.h"
 
 int drv_init(struct netcf *ncf) {
+
+    if (ALLOC(ncf-&amp;gt;driver) &amp;lt; 0)
+return -1;
     return 0;
+
 }
 
 
 void drv_close(struct netcf *ncf) {
 
-    return;
-
-}
+if (ncf == NULL || ncf-&amp;gt;driver == NULL)
+    return;
 
-
-void build_adapter_table(struct netcf *ncf) {
-
-    return;
+FREE(ncf-&amp;gt;driver);
 
 }
 
 static int list_interface_ids(struct netcf *ncf,
                               int maxnames,
                               char **names, unsigned int flags ATTRIBUTE_UNUSED) {
+    struct augeas *aug = NULL;
+    int nint = 0, nqualified = 0, result = 0;
+    char **intf = NULL;
+
+    aug = get_augeas(ncf);
+    ERR_BAIL(ncf);
+    nint = list_interfaces(ncf, &amp;amp;intf);
+    ERR_BAIL(ncf);
+    if (!names) {
+        maxnames = nint;    /* if not returning list, ignore maxnames too */
+    }
+    for (result = 0; (result &amp;lt; nint) &amp;amp;&amp;amp; (nqualified &amp;lt; maxnames); result++) {
+            const char *name;
+            int is_qualified = ((flags &amp;amp; (NETCF_IFACE_ACTIVE|NETCF_IFACE_INACTIVE))
+                             == (NETCF_IFACE_ACTIVE|NETCF_IFACE_INACTIVE));
+
+            name = intf[result];
+
+            if (!is_qualified) {
+                int is_active = if_is_active(ncf, name);
+                if ((is_active &amp;amp;&amp;amp; (flags &amp;amp; NETCF_IFACE_ACTIVE))
+                    || ((!is_active) &amp;amp;&amp;amp; (flags &amp;amp; NETCF_IFACE_INACTIVE))) {
+
+                    is_qualified = 1;
+                }
+            }
+
+            if (is_qualified) {
+                if (names) {
+                    names[nqualified] = strdup(name);
+                    ERR_NOMEM(names[nqualified] == NULL, ncf);
+                }
+                nqualified++;
+            }
+    }
+    free_matches(nint, &amp;amp;intf);
+    return nqualified;
+ error:
+    free_matches(nint, &amp;amp;intf);
     return -1;
+
 }
 
 int drv_list_interfaces(struct netcf *ncf,
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -53,41 +118,75 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int drv_num_of_interfaces(struct netcf *ncf, unsigned int flags) {
 
 
 struct netcf_if *drv_lookup_by_name(struct netcf *ncf, const char *name) {
+int result;
+
     ERR_THROW(1 == 1, ncf, EOTHER, "not implemented on this platform");
+error:
+    return NULL;
 }
 
 const char *drv_mac_string(struct netcf_if *nif) {
-    ERR_THROW(1 == 1, ncf, EOTHER, "not implemented on this platform");
+    ERR_THROW(1 == 1, nif-&amp;gt;ncf, EOTHER, "not implemented on this platform");
+error:
+    return NULL;
 }
 
 int drv_if_down(struct netcf_if *nif) {
-    ERR_THROW(1 == 1, ncf, EOTHER, "not implemented on this platform");
+int result = 0;
+
+    ERR_THROW(1 == 1, nif-&amp;gt;ncf, EOTHER, "not implemented on this platform");
+error:
+    return result;
 }
 
 int drv_if_up(struct netcf_if *nif) {
-    ERR_THROW(1 == 1, ncf, EOTHER, "not implemented on this platform");
+int result = 0;
+
+    ERR_THROW(1 == 1, nif-&amp;gt;ncf, EOTHER, "not implemented on this platform");
+error:
+    return result;
 }
 
 
 struct netcf_if *drv_define(struct netcf *ncf, const char *xml_str ATTRIBUTE_UNUSED) {
+int result = 0;
+
     ERR_THROW(1 == 1, ncf, EOTHER, "not implemented on this platform");
+error:
+    return result;
 }
 
 int drv_undefine(struct netcf_if *nif) {
+int result = 0;
+
     ERR_THROW(1 == 1, nif-&amp;gt;ncf, EOTHER, "not implemented on this platform");
+error:
+    return result;
 }
 
 
 char *drv_xml_desc(struct netcf_if *nif) {
+int result = 0;
+
     ERR_THROW(1 == 1, nif-&amp;gt;ncf, EOTHER, "not implemented on this platform");
+error:
+    return result;
 }
 
 char *drv_xml_state(struct netcf_if *nif) {
+int result = 0;
+
     ERR_THROW(1 == 1, nif-&amp;gt;ncf, EOTHER, "not implemented on this platform");
+error:
+    return result;
 }
 
 int drv_if_status(struct netcf_if *nif, unsigned int *flags ATTRIBUTE_UNUSED) {
+int result = 0;
+
     ERR_THROW(1 == 1, nif-&amp;gt;ncf, EOTHER, "not implemented on this platform");
+error:
+    return result;
 }
 
 int drv_lookup_by_mac_string(struct netcf *ncf,
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -95,23 +194,39 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int drv_lookup_by_mac_string(struct netcf *ncf,
                              int maxifaces ATTRIBUTE_UNUSED,
      struct netcf_if **ifaces ATTRIBUTE_UNUSED)
 {
+int result = 0;
+
     ERR_THROW(1 == 1, ncf, EOTHER, "not implemented on this platform");
+error:
+    return result;
 }
 
 int
 drv_change_begin(struct netcf *ncf, unsigned int flags ATTRIBUTE_UNUSED)
 {
+int result = 0;
+
     ERR_THROW(1 == 1, ncf, EOTHER, "not implemented on this platform");
+error:
+    return result;
 }
 
 int
 drv_change_rollback(struct netcf *ncf, unsigned int flags ATTRIBUTE_UNUSED)
 {
+int result = 0;
+
     ERR_THROW(1 == 1, ncf, EOTHER, "not implemented on this platform");
+error:
+    return result;
 }
 
 int
 drv_change_commit(struct netcf *ncf, unsigned int flags ATTRIBUTE_UNUSED)
 {
+int result = 0;
+
     ERR_THROW(1 == 1, ncf, EOTHER, "not implemented on this platform");
+error:
+    return result;
 }
diff --git a/src/dutil_linux.c b/src/dutil_linux.c
index 4e05c49..e36c8e3 100644
--- a/src/dutil_linux.c
+++ b/src/dutil_linux.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -45,6 +45,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #include &amp;lt;netinet/in.h&amp;gt;
 #include &amp;lt;arpa/inet.h&amp;gt;
+#ifdef __FreeBSD__
+#include &amp;lt;net/if.h&amp;gt; // For struct ifreq
+#include &amp;lt;sys/sockio.h&amp;gt; // For SIOCGIADDR
+#endif
 
 #include "safe-alloc.h"
 #include "read-file.h"
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -54,14 +58,18 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "dutil.h"
 #include "dutil_linux.h"
 
+#ifndef __FreeBSD__
 #include &amp;lt;net/if.h&amp;gt;
 #include &amp;lt;netlink/socket.h&amp;gt;
 #include &amp;lt;netlink/cache.h&amp;gt;
 #include &amp;lt;netlink/route/addr.h&amp;gt;
 #include &amp;lt;netlink/route/link.h&amp;gt;
+#endif
 
+#ifndef __FreeBSD__
 /* For some reason, the headers for libnl vlan functions aren't installed */
 extern int rtnl_link_vlan_get_id(struct rtnl_link *link);
+#endif
 
 /*
  * Executing external programs
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -736,9 +744,15 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int if_hwaddr(struct netcf *ncf, const char *intf,
     MEMZERO(&amp;amp;ifr, 1);
     strncpy(ifr.ifr_name, intf, sizeof(ifr.ifr_name));
     ifr.ifr_name[sizeof(ifr.ifr_name) - 1] = '\0';
+#ifdef __FreeBSD__
+    ret = ioctl(ncf-&amp;gt;driver-&amp;gt;ioctl_fd, SIOCGIFADDR, &amp;amp;ifr);
+    memcpy(mac,ifr.ifr_addr.sa_data,6);
+    format_mac_addr(mac,buflen, (unsigned char *)ifr.ifr_addr.sa_data,6);
+#else
     ret = ioctl(ncf-&amp;gt;driver-&amp;gt;ioctl_fd, SIOCGIFHWADDR, &amp;amp;ifr);
     memcpy(mac,ifr.ifr_hwaddr.sa_data,6);
     format_mac_addr(mac,buflen, (unsigned char *)ifr.ifr_hwaddr.sa_data,6);
+#endif
     return ret;
 }
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -794,6 +808,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; done:
 }
 
 
+#ifndef __FreeBSD__
 int netlink_init(struct netcf *ncf) {
 
     ncf-&amp;gt;driver-&amp;gt;nl_sock = nl_handle_alloc();
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -842,6 +857,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int netlink_close(struct netcf *ncf) {
     }
     return 0;
 }
+#endif
 
 
 static void add_type_specific_info(struct netcf *ncf,
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -999,9 +1015,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void add_ethernet_info(struct netcf *ncf,
         = { doc, root, NULL, ncf };
     struct rtnl_link *filter_link = NULL;
 
+#ifndef __FreeBSD__
     /* if interface isn't currently available, nothing to add */
     if (ifindex == RTNL_LINK_NOT_FOUND)
         return;
+#endif
 
     filter_link = rtnl_link_alloc();
     ERR_NOMEM(filter_link == NULL, ncf);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1046,8 +1064,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void add_vlan_info_cb(struct nl_object *obj, void *arg) {
         return;
 
     l_link = rtnl_link_get_link(iflink);
+#ifndef __FreeBSD__
     if (l_link == RTNL_LINK_NOT_FOUND)
         return;
+#endif
 
     master_link = rtnl_link_get(nl_object_get_cache(obj), l_link);
     if (master_link == NULL)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1071,9 +1091,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void add_vlan_info_cb(struct nl_object *obj, void *arg) {
 
     /* Add in type-specific info of master interface */
     master_ifindex = rtnl_link_name2i(ncf-&amp;gt;driver-&amp;gt;link_cache, master_name);
+#ifndef __FreeBSD__
     ERR_THROW((master_ifindex == RTNL_LINK_NOT_FOUND), ncf, ENETLINK,
               "couldn't find ifindex for vlan master interface `%s`",
               master_name);
+#endif
     add_type_specific_info(ncf, master_name, master_ifindex,
                            cb_data-&amp;gt;doc, interface_node);
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1088,9 +1110,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void add_vlan_info(struct netcf *ncf,
         = { doc, root, NULL, ncf };
     struct rtnl_link *filter_link = NULL;
 
+#ifndef __FreeBSD__
     /* if interface isn't currently available, nothing to add */
     if (ifindex == RTNL_LINK_NOT_FOUND)
         return;
+#endif
 
     filter_link = rtnl_link_alloc();
     ERR_NOMEM(filter_link == NULL, ncf);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1165,6 +1189,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void add_bond_info_cb(struct nl_object *obj,
 
     xmlNodePtr interface_node;
 
+#ifndef __FreeBSD__
     /* If this is a slave link, and the master is master_ifindex, add the
      * interface info to the bond.
      */
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1172,6 +1197,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void add_bond_info_cb(struct nl_object *obj,
     if (!(rtnl_link_get_flags(iflink) &amp;amp; IFF_SLAVE)
         || rtnl_link_get_master(iflink) != cb_data-&amp;gt;master_ifindex)
         return;
+#endif
 
     cb_data-&amp;gt;bond = xml_node(cb_data-&amp;gt;doc, cb_data-&amp;gt;root, "bond");
     ERR_NOMEM(cb_data-&amp;gt;bond == NULL, ncf);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1203,9 +1229,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void add_bond_info(struct netcf *ncf,
     struct nl_bond_callback_data cb_data
         = { doc, root, NULL, ifindex, ncf };
 
+#ifndef __FreeBSD__
     /* if interface isn't currently available, nothing to add */
     if (ifindex == RTNL_LINK_NOT_FOUND)
         return;
+#endif
 
     nl_cache_foreach(ncf-&amp;gt;driver-&amp;gt;link_cache, add_bond_info_cb, &amp;amp;cb_data);
 }
diff --git a/src/dutil_linux.h b/src/dutil_linux.h
index 8b10e71..2aadbb4 100644
--- a/src/dutil_linux.h
+++ b/src/dutil_linux.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -23,7 +23,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #ifndef DUTIL_LINUX_H_
 #define DUTIL_LINUX_H_
 
+#ifndef __FreeBSD__
 #include &amp;lt;netlink/netlink.h&amp;gt;
+#endif
 
 struct driver {
     struct augeas     *augeas;
&lt;/pre&gt;</description>
    <dc:creator>Sean Bruno</dc:creator>
    <dc:date>2012-05-18T16:38:52</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/733">
    <title>[PATCH 1/5] initial checkin to fix configure andautomake/build stuffs on fbsd</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/733</link>
    <description>&lt;pre&gt;---
 src/drv_fbsd.c   |  176 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 src/dutil_fbsd.c |   27 +++++++++
 src/dutil_fbsd.h |   30 ++++++++++
 3 files changed, 233 insertions(+)
 create mode 100644 src/drv_fbsd.c
 create mode 100644 src/dutil_fbsd.c
 create mode 100644 src/dutil_fbsd.h

diff --git a/src/drv_fbsd.c b/src/drv_fbsd.c
new file mode 100644
index 0000000..64b0e98
--- /dev/null
+++ b/src/drv_fbsd.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,176 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/*
+ */
+
+#include &amp;lt;config.h&amp;gt;
+#include &amp;lt;internal.h&amp;gt;
+
+#include &amp;lt;stdio.h&amp;gt;
+#include &amp;lt;stdlib.h&amp;gt;
+#include &amp;lt;spawn.h&amp;gt;
+#include &amp;lt;stdbool.h&amp;gt;
+#include &amp;lt;string.h&amp;gt;
+
+#include "safe-alloc.h"
+#include "ref.h"
+#include "list.h"
+#include "dutil.h"
+#include "dutil_fbsd.h"
+
+int drv_init(struct netcf *ncf) {
+    return 0;
+}
+
+
+void drv_close(struct netcf *ncf) {
+    if (ncf == NULL || ncf-&amp;gt;driver == NULL)
+        return;
+    FREE(ncf-&amp;gt;driver);
+}
+
+
+void drv_entry(struct netcf *ncf ATTRIBUTE_UNUSED) {
+}
+
+static PIP_ADAPTER_ADDRESSES build_adapter_table(struct netcf *ncf) {
+    return NULL;
+}
+
+static int list_interface_ids(struct netcf *ncf,
+                              int maxnames,
+                              char **names, unsigned int flags ATTRIBUTE_UNUSED) {
+    return -1;
+}
+
+int drv_list_interfaces(struct netcf *ncf,
+                        int maxnames, char **names,
+                        unsigned int flags) {
+    return list_interface_ids(ncf, maxnames, names, flags);
+}
+
+
+int drv_num_of_interfaces(struct netcf *ncf, unsigned int flags) {
+    return list_interface_ids(ncf, 0, NULL, flags);
+}
+
+
+struct netcf_if *drv_lookup_by_name(struct netcf *ncf, const char *name) {
+    ERR_THROW(1 == 1, ncf, EOTHER, "not implemented on this platform");
+
+    return nif;
+}
+
+const char *drv_mac_string(struct netcf_if *nif) {
+    struct netcf *ncf = nif-&amp;gt;ncf;
+    ERR_THROW(1 == 1, ncf, EOTHER, "not implemented on this platform");
+ error:
+    free(adapter);
+    free(buf);
+    return nif-&amp;gt;mac;
+}
+
+int drv_if_down(struct netcf_if *nif) {
+    ERR_THROW(1 == 1, ncf, EOTHER, "not implemented on this platform");
+ error:
+    free(exe_path);
+    return -1;
+}
+
+int drv_if_up(struct netcf_if *nif) {
+    ERR_THROW(1 == 1, ncf, EOTHER, "not implemented on this platform");
+ error:
+    free(exe_path);
+    return -1;
+}
+
+
+struct netcf_if *drv_define(struct netcf *ncf, const char *xml_str ATTRIBUTE_UNUSED) {
+    struct netcf_if *result = NULL;
+
+    ERR_THROW(1 == 1, ncf, EOTHER, "not implemented on this platform");
+
+error:
+    return result;
+}
+
+int drv_undefine(struct netcf_if *nif) {
+    int result = -1;
+
+    ERR_THROW(1 == 1, nif-&amp;gt;ncf, EOTHER, "not implemented on this platform");
+    result = 0;
+error:
+    return result;
+}
+
+
+char *drv_xml_desc(struct netcf_if *nif) {
+    char *result = NULL;
+
+    ERR_THROW(1 == 1, nif-&amp;gt;ncf, EOTHER, "not implemented on this platform");
+
+error:
+    return result;
+}
+
+char *drv_xml_state(struct netcf_if *nif) {
+    char *result = NULL;
+
+    ERR_THROW(1 == 1, nif-&amp;gt;ncf, EOTHER, "not implemented on this platform");
+
+error:
+    return result;
+}
+
+int drv_if_status(struct netcf_if *nif, unsigned int *flags ATTRIBUTE_UNUSED) {
+    int result = -1;
+
+    ERR_THROW(1 == 1, nif-&amp;gt;ncf, EOTHER, "not implemented on this platform");
+    result = 0;
+error:
+    return result;
+}
+
+int drv_lookup_by_mac_string(struct netcf *ncf,
+     const char *mac ATTRIBUTE_UNUSED,
+                             int maxifaces ATTRIBUTE_UNUSED,
+     struct netcf_if **ifaces ATTRIBUTE_UNUSED)
+{
+    int result = -1;
+
+    ERR_THROW(1 == 1, ncf, EOTHER, "not implemented on this platform");
+    result = 0;
+error:
+    return result;
+}
+
+int
+drv_change_begin(struct netcf *ncf, unsigned int flags ATTRIBUTE_UNUSED)
+{
+    int result = -1;
+
+    ERR_THROW(1 == 1, ncf, EOTHER, "not implemented on this platform");
+    result = 0;
+error:
+    return result;
+}
+
+int
+drv_change_rollback(struct netcf *ncf, unsigned int flags ATTRIBUTE_UNUSED)
+{
+    int result = -1;
+
+    ERR_THROW(1 == 1, ncf, EOTHER, "not implemented on this platform");
+    result = 0;
+error:
+    return result;
+}
+
+int
+drv_change_commit(struct netcf *ncf, unsigned int flags ATTRIBUTE_UNUSED)
+{
+    int result = -1;
+
+    ERR_THROW(1 == 1, ncf, EOTHER, "not implemented on this platform");
+    result = 0;
+error:
+    return result;
+}
diff --git a/src/dutil_fbsd.c b/src/dutil_fbsd.c
new file mode 100644
index 0000000..3f98319
--- /dev/null
+++ b/src/dutil_fbsd.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,27 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/*
+ * dutil_mswindows.c: Windows utility functions for driver backends.
+ *
+ * Copyright (C) 2010 Red Hat Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
+ *
+ * Author: Adam Stokes &amp;lt;astokes&amp;lt; at &amp;gt;fedoraproject.org&amp;gt;
+ */
+
+#include &amp;lt;config.h&amp;gt;
+#include &amp;lt;internal.h&amp;gt;
+
+#include "dutil.h"
+#include "dutil_mswindows.h"
diff --git a/src/dutil_fbsd.h b/src/dutil_fbsd.h
new file mode 100644
index 0000000..78295b5
--- /dev/null
+++ b/src/dutil_fbsd.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,30 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/*
+ * dutil_mswindows.h: Window utility functions for driver backends.
+ *
+ * Copyright (C) 2010 Red Hat Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
+ *
+ * Author: Adam Stokes &amp;lt;astokes&amp;lt; at &amp;gt;fedoraproject.org&amp;gt;
+ */
+
+#ifndef DUTIL_MSWINDOWS_H_
+#define DUTIL_MSWINDOWS_H_
+
+struct driver {
+    int padding;
+};
+
+#endif /* DUTIL_MSWINDOWS_H_ */
&lt;/pre&gt;</description>
    <dc:creator>Sean Bruno</dc:creator>
    <dc:date>2012-05-18T16:38:50</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/732">
    <title>Re: netcf patches for debian (v2)</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/732</link>
    <description>&lt;pre&gt;Quoting Laine Stump (laine&amp;lt; at &amp;gt;laine.org):

No, thanks - I don't have anything blocked right now.  Just so I can
plan, do you have an approximate idea when?

-serge
_______________________________________________
netcf-devel mailing list
netcf-devel&amp;lt; at &amp;gt;lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/netcf-devel
&lt;/pre&gt;</description>
    <dc:creator>Serge Hallyn</dc:creator>
    <dc:date>2012-05-15T17:58:02</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/731">
    <title>Re: [PATCH 3/3] define NETCF_TRANSACTION as false in debian</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/731</link>
    <description>&lt;pre&gt;Quoting Laine Stump (laine&amp;lt; at &amp;gt;laine.org):

Oh, yeah, oops :)


Great, thanks Laine.

-serge
_______________________________________________
netcf-devel mailing list
netcf-devel&amp;lt; at &amp;gt;lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/netcf-devel
&lt;/pre&gt;</description>
    <dc:creator>Serge Hallyn</dc:creator>
    <dc:date>2012-05-15T17:55:48</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/730">
    <title>Re: netcf patches for debian (v2)</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/730</link>
    <description>&lt;pre&gt;
I just pushed this series (including the libnl3 support).

I'm going to see if there are some other things I can clean up quickly
before doing another release. If lack of a release with these patches is
blocking something for you, please let me know and I'll do a release
now, then another later after I make other changes.
_______________________________________________
netcf-devel mailing list
netcf-devel&amp;lt; at &amp;gt;lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/netcf-devel
&lt;/pre&gt;</description>
    <dc:creator>Laine Stump</dc:creator>
    <dc:date>2012-05-15T17:00:13</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/729">
    <title>Re: [PATCH 3/3] define NETCF_TRANSACTION as false in debian</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/729</link>
    <description>&lt;pre&gt;
No. I'm getting ready to push them all right now. My system is having
some trouble building, though (unrelated to your patches).


You mean 0.2.0? :-)

Yes, I'm going to try to do a release soon. I've been distracted away
from this for far too long...

_______________________________________________
netcf-devel mailing list
netcf-devel&amp;lt; at &amp;gt;lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/netcf-devel
&lt;/pre&gt;</description>
    <dc:creator>Laine Stump</dc:creator>
    <dc:date>2012-05-15T16:42:41</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/728">
    <title>Re: [PATCH] Add bundled(gnulib) to RPM specfile</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/728</link>
    <description>&lt;pre&gt;
ACK


Daniel
&lt;/pre&gt;</description>
    <dc:creator>Daniel P. Berrange</dc:creator>
    <dc:date>2012-05-15T15:28:11</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/727">
    <title>Re: [PATCH 3/3] define NETCF_TRANSACTION as false in debian</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/727</link>
    <description>&lt;pre&gt;Quoting Daniel P. Berrange (berrange&amp;lt; at &amp;gt;redhat.com):

Thanks, Daniel.  I don't see these in the git tree yet.  Should I
be re-sending?

Also, will there be a new (2.0) release soon (hopefully after :)?

-serge
_______________________________________________
netcf-devel mailing list
netcf-devel&amp;lt; at &amp;gt;lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/netcf-devel
&lt;/pre&gt;</description>
    <dc:creator>Serge E. Hallyn</dc:creator>
    <dc:date>2012-05-15T16:26:48</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/726">
    <title>[PATCH] Add bundled(gnulib) to RPM specfile</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/726</link>
    <description>&lt;pre&gt;According to Fedora guidelines, because we bundle gnulib we
need to add a virtual Provides: bundled(gnulib).

https://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries#Requirement_if_you_bundle
---
 netcf.spec.in |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/netcf.spec.in b/netcf.spec.in
index cec69c1..234561b 100644
--- a/netcf.spec.in
+++ b/netcf.spec.in
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -14,6 +14,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; BuildRequires:  libxml2-devel libxslt-devel
 BuildRequires:  libnl-devel
 Requires:       %{name}-libs = %{version}-%{release}
 
+Provides: bundled(gnulib)
+
 %description
 Netcf is a library used to modify the network configuration of a
 system. Network configurations are expressed in a platform-independent
&lt;/pre&gt;</description>
    <dc:creator>Laine Stump</dc:creator>
    <dc:date>2012-05-15T15:26:29</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/725">
    <title>Re: Preparing for freebsd support pull request</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/725</link>
    <description>&lt;pre&gt;
If, when you say "our repo", you mean a git repo that was initially
based from ours, then you can directly do git send-email from that.

Otherwise, here's a full synopsis of the steps that would give you
patches in the right format, while not messing up the "master" branch of
a checkout from the main repo:


   git clone git://git.fedorahosted.org/netcf.git
   cd netcf
   git checkout -b mybranch
   (make changes)
   git add [modified files]
   git commit (with useful commit log message)
   [repeat steps 4-6 as needed]
   git send email --compose -&amp;lt;number of patches&amp;gt;

(this way, you can later "git checkout master &amp;amp;&amp;amp; git pull")
_______________________________________________
netcf-devel mailing list
netcf-devel&amp;lt; at &amp;gt;lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/netcf-devel
&lt;/pre&gt;</description>
    <dc:creator>Laine Stump</dc:creator>
    <dc:date>2012-05-14T19:00:33</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/724">
    <title>Re: Preparing for freebsd support pull request</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/724</link>
    <description>&lt;pre&gt;
Pretty simple, really - just make sure your patches are on a local git
branch that's based off the fedorahosted master branch, and use git
send-email --compose -&amp;lt;# of patches&amp;gt;, giving the introductory message
the subject [PATCH 0/&amp;lt;# of patches&amp;gt;] &amp;lt;something descriptive&amp;gt; and a short
overview.

A series of small patches is much better than a single monolithic patch.
Especially - if you've done any refactoring of the existing code to make
your code fit in better, it would be better to put that first in a
separate patch (such that applying it would have 0 functional effect),
then your port-specific stuff in later patches.

_______________________________________________
netcf-devel mailing list
netcf-devel&amp;lt; at &amp;gt;lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/netcf-devel
&lt;/pre&gt;</description>
    <dc:creator>Laine Stump</dc:creator>
    <dc:date>2012-05-11T00:53:11</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/723">
    <title>Preparing for freebsd support pull request</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/723</link>
    <description>&lt;pre&gt;So, Hiren and I are approaching our first milestone, where we think that
we're feature complete for freebsd.  We're working out a few details at
the moment, but its starting to look good.

In order for you guys to pull from us, what's the standard process for
us to follow such that you can review, accept(and/or reject) and pull
from our tree.

I assume there's some kind of "generate review-able patches" guidelines
we should follow to make your lives easy.

Sean


_______________________________________________
netcf-devel mailing list
netcf-devel&amp;lt; at &amp;gt;lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/netcf-devel
&lt;/pre&gt;</description>
    <dc:creator>Sean Bruno</dc:creator>
    <dc:date>2012-05-11T00:07:25</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/722">
    <title>Re: [PATCH 4/3] support libnl-3 in addition to libnl-1</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/722</link>
    <description>&lt;pre&gt;
ACK, that is alot smaller diff than I expected

Daniel
&lt;/pre&gt;</description>
    <dc:creator>Daniel P. Berrange</dc:creator>
    <dc:date>2012-04-30T18:32:41</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/721">
    <title>[PATCH 4/3] support libnl-3 in addition to libnl-1</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/721</link>
    <description>&lt;pre&gt;configure.ac:
If libnl-1 is not found, look for libnl-3, and (the also required)
libnl-route-3.

Makefile.am:
Add cflags and libs for libnl-3 and libnl-route-3

dutil_linux.{c,h}:
Switch the libnl calls over to new api if HAVE_LINBNL3.  Also do
not include &amp;lt;net/if.h&amp;gt; in that case, because &amp;lt;linux/if.h&amp;gt; is
included from the libnl3 include files, and can conflict with net/if.h.

Signed-off-by: Serge Hallyn &amp;lt;serge.hallyn&amp;lt; at &amp;gt;canonical.com&amp;gt;
---
 configure.ac      |    6 +++++-
 src/Makefile.am   |   10 ++++++----
 src/dutil_linux.c |   25 +++++++++++++++++++++++++
 src/dutil_linux.h |    4 ++++
 4 files changed, 40 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 6705a0d..41dd49d 100644
--- a/configure.ac
+++ b/configure.ac
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -103,7 +103,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; AM_CONDITIONAL([NETCF_INIT_SCRIPT_RED_HAT],
 if test "x$with_driver" != "xmswindows"
 then
     PKG_CHECK_MODULES([LIBAUGEAS], [augeas &amp;gt;= 0.5.0])
-    PKG_CHECK_MODULES([LIBNL], [libnl-1])
+    PKG_CHECK_MODULES([LIBNL], [libnl-1],
+       [AC_DEFINE([HAVE_LIBNL], [1], [Use libnl-1])],[
+           PKG_CHECK_MODULES([LIBNL],[libnl-3.0],[AC_DEFINE([HAVE_LIBNL3],[1],[Use libnl-3.0])])
+           PKG_CHECK_MODULES([LIBNL_ROUTE3],[libnl-route-3.0])
+       ])
 fi
 
 if test "x$with_driver" = "xdebian"; then
diff --git a/src/Makefile.am b/src/Makefile.am
index b5c732a..87d18eb 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -3,7 +3,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; GNULIB= ../gnulib/lib/libgnu.la
 GNULIB_CFLAGS= -I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib
 
 AM_CFLAGS = $(NETCF_CFLAGS) $(GNULIB_CFLAGS) $(WARN_CFLAGS) \
-  $(LIBXML_CFLAGS) $(LIBXSLT_CFLAGS) $(LIBAUGEAS_CFLAGS)
+  $(LIBXML_CFLAGS) $(LIBXSLT_CFLAGS) $(LIBAUGEAS_CFLAGS) $(LIBNL_CFLAGS) $(LIBNL_ROUTE3_CFLAGS)
+
+AM_LDFLAGS = $(LIBNL_LIBS) $(LIBNL_ROUTE3_LIBS)
 
 include_HEADERS = netcf.h
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -64,15 +66,15 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; libnetcf_la_SOURCES = netcf.h netcf.c internal.h \
      ref.h list.h \
      xslt_ext.c $(DRIVER_SOURCES)
 libnetcf_la_LDFLAGS = -Wl,--version-script=netcf.syms \
-     -version-info $(LIBNETCF_VERSION_INFO) -no-undefined
-libnetcf_la_LIBADD = $(NETCF_LIBDEPS) $(GNULIB)
+     -version-info $(LIBNETCF_VERSION_INFO) -no-undefined $(LIBNL_CFLAGS) $(LIBNL_ROUTE3_CFLAGS)
+libnetcf_la_LIBADD = $(NETCF_LIBDEPS) $(GNULIB) $(LIBNL_LIBS) $(LIBNL_ROUTE3_LIBS)
 if NETCF_DRIVER_MSWINDOWS
 libnetcf_la_LIBADD += -liphlpapi
 endif
 libnetcf_la_DEPENDENCIES = $(GNULIB) netcf.syms
 
 ncftool_SOURCES = ncftool.c
-ncftool_LDADD = libnetcf.la $(READLINE_LIBS) $(GNULIB)
+ncftool_LDADD = libnetcf.la $(READLINE_LIBS) $(GNULIB) $(LIBNL_LIBS) $(LIBNL_ROUTE3_LIBS)
 
 if ! NETCF_DRIVER_MSWINDOWS
 ncftransform_SOURCES = ncftransform.c
diff --git a/src/dutil_linux.c b/src/dutil_linux.c
index 4e05c49..f4b4bf7 100644
--- a/src/dutil_linux.c
+++ b/src/dutil_linux.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -54,12 +54,18 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "dutil.h"
 #include "dutil_linux.h"
 
+#ifndef HAVE_LIBNL3
 #include &amp;lt;net/if.h&amp;gt;
+#endif
 #include &amp;lt;netlink/socket.h&amp;gt;
 #include &amp;lt;netlink/cache.h&amp;gt;
 #include &amp;lt;netlink/route/addr.h&amp;gt;
 #include &amp;lt;netlink/route/link.h&amp;gt;
 
+#ifdef HAVE_LIBNL3
+#define RTNL_LINK_NOT_FOUND 0
+#endif
+
 /* For some reason, the headers for libnl vlan functions aren't installed */
 extern int rtnl_link_vlan_get_id(struct rtnl_link *link);
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -796,21 +802,36 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; done:
 
 int netlink_init(struct netcf *ncf) {
 
+#ifdef HAVE_LIBNL
     ncf-&amp;gt;driver-&amp;gt;nl_sock = nl_handle_alloc();
+#elif HAVE_LIBNL3
+    int ret;
+    ncf-&amp;gt;driver-&amp;gt;nl_sock = nl_socket_alloc();
+#endif
     if (ncf-&amp;gt;driver-&amp;gt;nl_sock == NULL)
         goto error;
     if (nl_connect(ncf-&amp;gt;driver-&amp;gt;nl_sock, NETLINK_ROUTE) &amp;lt; 0) {
         goto error;
     }
 
+#ifdef HAVE_LIBNL
     ncf-&amp;gt;driver-&amp;gt;link_cache = rtnl_link_alloc_cache(ncf-&amp;gt;driver-&amp;gt;nl_sock);
     if (ncf-&amp;gt;driver-&amp;gt;link_cache == NULL) {
+#elif HAVE_LIBNL3
+    ret = rtnl_link_alloc_cache(ncf-&amp;gt;driver-&amp;gt;nl_sock, AF_UNSPEC, &amp;amp;ncf-&amp;gt;driver-&amp;gt;link_cache);
+    if (ret &amp;lt; 0) {
+#endif
         goto error;
     }
     nl_cache_mngt_provide(ncf-&amp;gt;driver-&amp;gt;link_cache);
 
+#ifdef HAVE_LIBNL
     ncf-&amp;gt;driver-&amp;gt;addr_cache = rtnl_addr_alloc_cache(ncf-&amp;gt;driver-&amp;gt;nl_sock);
     if (ncf-&amp;gt;driver-&amp;gt;addr_cache == NULL) {
+#elif HAVE_LIBNL3
+    ret = rtnl_addr_alloc_cache(ncf-&amp;gt;driver-&amp;gt;nl_sock, &amp;amp;ncf-&amp;gt;driver-&amp;gt;addr_cache);
+    if (ret &amp;lt; 0) {
+#endif
         goto error;
     }
     nl_cache_mngt_provide(ncf-&amp;gt;driver-&amp;gt;addr_cache);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -837,7 +858,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int netlink_close(struct netcf *ncf) {
     }
     if (ncf-&amp;gt;driver-&amp;gt;nl_sock) {
         nl_close(ncf-&amp;gt;driver-&amp;gt;nl_sock);
+#ifdef HAVE_LIBNL
         nl_handle_destroy(ncf-&amp;gt;driver-&amp;gt;nl_sock);
+#elif HAVE_LIBNL3
+        nl_socket_free(ncf-&amp;gt;driver-&amp;gt;nl_sock);
+#endif
         ncf-&amp;gt;driver-&amp;gt;nl_sock = NULL;
     }
     return 0;
diff --git a/src/dutil_linux.h b/src/dutil_linux.h
index 8b10e71..81f434b 100644
--- a/src/dutil_linux.h
+++ b/src/dutil_linux.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -30,7 +30,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct driver {
     xsltStylesheetPtr  put;
     xsltStylesheetPtr  get;
     int                ioctl_fd;
+#ifdef HAVE_LIBNL
     struct nl_handle  *nl_sock;
+#elif HAVE_LIBNL3
+    struct nl_sock     *nl_sock;
+#endif
     struct nl_cache   *link_cache;
     struct nl_cache   *addr_cache;
     unsigned int       load_augeas : 1;
&lt;/pre&gt;</description>
    <dc:creator>Serge Hallyn</dc:creator>
    <dc:date>2012-04-30T17:39:34</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/720">
    <title>Re: [PATCH 3/3] define NETCF_TRANSACTION as false in debian</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/720</link>
    <description>&lt;pre&gt;
ACK

Daniel
&lt;/pre&gt;</description>
    <dc:creator>Daniel P. Berrange</dc:creator>
    <dc:date>2012-04-30T08:26:05</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/719">
    <title>Re: [PATCH 2/3] add debian-{get,put}.xsl to Makefile</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/719</link>
    <description>&lt;pre&gt;
ACK


Daniel
&lt;/pre&gt;</description>
    <dc:creator>Daniel P. Berrange</dc:creator>
    <dc:date>2012-04-30T08:25:51</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/718">
    <title>Re: [PATCH 1/3] find ifup/ifdown in configure.ac and use in drv-debian</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.netcf.devel/718</link>
    <description>&lt;pre&gt;
ACK

Daniel
&lt;/pre&gt;</description>
    <dc:creator>Daniel P. Berrange</dc:creator>
    <dc:date>2012-04-30T08:25:36</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.sysutils.netcf.devel">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.sysutils.netcf.devel</link>
  </textinput>
</rdf:RDF>

