diff --git a/core/api/src/main/java/org/onosproject/net/behaviour/ControllerInfo.java b/core/api/src/main/java/org/onosproject/net/behaviour/ControllerInfo.java
index 9867622..9ff808a 100644
--- a/core/api/src/main/java/org/onosproject/net/behaviour/ControllerInfo.java
+++ b/core/api/src/main/java/org/onosproject/net/behaviour/ControllerInfo.java
@@ -25,6 +25,12 @@
     public final IpAddress ip;
     public final int tcpPort;
 
+    /**
+     * Information for contacting the controller.
+     *
+     * @param ip the ip address
+     * @param tcpPort the tcp port
+     */
     public ControllerInfo(IpAddress ip, int tcpPort) {
         this.ip = ip;
         this.tcpPort = tcpPort;
diff --git a/core/api/src/main/java/org/onosproject/net/behaviour/Pipeliner.java b/core/api/src/main/java/org/onosproject/net/behaviour/Pipeliner.java
new file mode 100644
index 0000000..6d35adf
--- /dev/null
+++ b/core/api/src/main/java/org/onosproject/net/behaviour/Pipeliner.java
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2015 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.net.behaviour;
+
+import org.onlab.osgi.ServiceDirectory;
+import org.onosproject.net.DeviceId;
+import org.onosproject.net.flowobjective.FilteringObjective;
+import org.onosproject.net.flowobjective.ForwardingObjective;
+
+import java.util.Collection;
+import java.util.concurrent.Future;
+
+/**
+ * Behaviour for handling various pipelines.
+ */
+public interface Pipeliner {
+
+    /**
+     * Injecting the service directory into the driver.
+     *
+     * @param deviceId the deviceId
+     * @param serviceDirectory the service directory.
+     */
+    void init(DeviceId deviceId, ServiceDirectory serviceDirectory);
+
+    /**
+     * Installs the filtering rules onto the device.
+     *
+     * @param filters the collection of filters
+     * @return a future indicating the success of the operation
+     */
+     Future<Boolean> filter(Collection<FilteringObjective> filters);
+
+    /**
+     * Installs the forwarding rules onto the device.
+     *
+     * @param forwardings the collection of forwarding objectives
+     * @return a future indicating the success of the operation
+     */
+    Future<Boolean> forward(Collection<ForwardingObjective> forwardings);
+
+}
diff --git a/core/api/src/main/java/org/onosproject/net/flowobjective/DefaultFilteringObjective.java b/core/api/src/main/java/org/onosproject/net/flowobjective/DefaultFilteringObjective.java
new file mode 100644
index 0000000..4c1b71f
--- /dev/null
+++ b/core/api/src/main/java/org/onosproject/net/flowobjective/DefaultFilteringObjective.java
@@ -0,0 +1,186 @@
+/*
+ * Copyright 2015 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.net.flowobjective;
+
+import com.google.common.collect.ImmutableList;
+import org.onosproject.core.ApplicationId;
+import org.onosproject.net.flow.criteria.Criterion;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Objects;
+
+import static com.google.common.base.Preconditions.checkArgument;
+import static com.google.common.base.Preconditions.checkNotNull;
+
+/**
+ * Default implementation of a filtering objective.
+ */
+public final class DefaultFilteringObjective implements FilteringObjective {
+
+
+    private final Criterion key;
+    private final boolean permanent;
+    private final int timeout;
+    private final ApplicationId appId;
+    private final int priority;
+    private final List<Criterion> conditions;
+    private final int id;
+    private final Operation op;
+
+    private DefaultFilteringObjective(Criterion key, boolean permanent, int timeout,
+                                      ApplicationId appId, int priority,
+                                      List<Criterion> conditions, Operation op) {
+        this.key = key;
+        this.permanent = permanent;
+        this.timeout = timeout;
+        this.appId = appId;
+        this.priority = priority;
+        this.conditions = conditions;
+        this.op = op;
+
+        this.id = Objects.hash(key, conditions, permanent,
+                               timeout, appId, priority);
+    }
+
+
+    @Override
+    public Criterion key() {
+        return key;
+    }
+
+    @Override
+    public Collection<Criterion> conditions() {
+        return conditions;
+    }
+
+    @Override
+    public int id() {
+        return id;
+    }
+
+    @Override
+    public int priority() {
+        return priority;
+    }
+
+    @Override
+    public ApplicationId appId() {
+        return appId;
+    }
+
+    @Override
+    public int timeout() {
+        return timeout;
+    }
+
+    @Override
+    public boolean permanent() {
+        return permanent;
+    }
+
+    @Override
+    public Operation op() {
+        return op;
+    }
+
+    /**
+     * Returns a new builder.
+     *
+     * @return new builder
+     */
+    public static Builder builder() {
+        return new Builder();
+    }
+
+
+    public static final class Builder implements FilteringObjective.Builder {
+        private final ImmutableList.Builder<Criterion> listBuilder
+                = ImmutableList.builder();
+
+        private Criterion key;
+        private boolean permanent = DEFAULT_PERMANENT;
+        private int timeout = DEFAULT_TIMEOUT;
+        private ApplicationId appId;
+        private int priority = DEFAULT_PRIORITY;
+
+        @Override
+        public Builder addCondition(Criterion criterion) {
+            listBuilder.add(criterion);
+            return this;
+        }
+
+        @Override
+        public Builder withKey(Criterion criterion) {
+            key = criterion;
+            return this;
+        }
+
+        @Override
+        public Builder makeTemporary(int timeout) {
+            this.timeout = timeout;
+            permanent = false;
+            return this;
+        }
+
+        @Override
+        public Builder makePermanent() {
+            permanent = true;
+            return this;
+        }
+
+        @Override
+        public Builder fromApp(ApplicationId appId) {
+            this.appId = appId;
+            return this;
+        }
+
+        @Override
+        public Builder withPriority(int priority) {
+            this.priority = priority;
+            return this;
+        }
+
+        @Override
+        public FilteringObjective add() {
+            List<Criterion> conditions = listBuilder.build();
+            checkNotNull(key, "Must have a key.");
+            checkArgument(!conditions.isEmpty(), "Must have at least one condition.");
+            checkNotNull(appId, "Must supply an application id");
+
+            return new DefaultFilteringObjective(key, permanent, timeout,
+                                                appId, priority, conditions,
+                                                Operation.ADD);
+
+        }
+
+        @Override
+        public FilteringObjective remove() {
+            List<Criterion> conditions = listBuilder.build();
+            checkNotNull(key, "Must have a key.");
+            checkArgument(!conditions.isEmpty(), "Must have at least one condition.");
+            checkNotNull(appId, "Must supply an application id");
+
+            return new DefaultFilteringObjective(key, permanent, timeout,
+                                                 appId, priority, conditions,
+                                                 Operation.REMOVE);
+
+        }
+
+
+    }
+
+}
diff --git a/core/api/src/main/java/org/onosproject/net/flowobjective/DefaultForwardingObjective.java b/core/api/src/main/java/org/onosproject/net/flowobjective/DefaultForwardingObjective.java
new file mode 100644
index 0000000..d110e07
--- /dev/null
+++ b/core/api/src/main/java/org/onosproject/net/flowobjective/DefaultForwardingObjective.java
@@ -0,0 +1,209 @@
+/*
+ * Copyright 2015 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.net.flowobjective;
+
+import org.onosproject.core.ApplicationId;
+import org.onosproject.net.flow.TrafficSelector;
+import org.onosproject.net.flow.TrafficTreatment;
+
+import java.util.Objects;
+
+import static com.google.common.base.Preconditions.checkArgument;
+import static com.google.common.base.Preconditions.checkNotNull;
+
+/**
+ * Default implementation of a forwarding objective.
+ */
+public final class DefaultForwardingObjective implements ForwardingObjective {
+
+    private final TrafficSelector selector;
+    private final Flag flag;
+    private final boolean permanent;
+    private final int timeout;
+    private final ApplicationId appId;
+    private final int priority;
+    private final int nextId;
+    private final TrafficTreatment treatment;
+    private final Operation op;
+
+    private final int id;
+
+    private DefaultForwardingObjective(TrafficSelector selector,
+                                      Flag flag, boolean permanent,
+                                      int timeout, ApplicationId appId,
+                                      int priority, int nextId,
+                                      TrafficTreatment treatment, Operation op) {
+        this.selector = selector;
+        this.flag = flag;
+        this.permanent = permanent;
+        this.timeout = timeout;
+        this.appId = appId;
+        this.priority = priority;
+        this.nextId = nextId;
+        this.treatment = treatment;
+        this.op = op;
+
+        this.id = Objects.hash(selector, flag, permanent,
+                               timeout, appId, priority, nextId,
+                               treatment, op);
+    }
+
+
+    @Override
+    public TrafficSelector selector() {
+        return selector;
+    }
+
+    @Override
+    public Integer nextId() {
+        return nextId;
+    }
+
+    @Override
+    public TrafficTreatment treatment() {
+        return treatment;
+    }
+
+
+    @Override
+    public Flag flag() {
+        return flag;
+    }
+
+    @Override
+    public int id() {
+        return id;
+    }
+
+    @Override
+    public int priority() {
+        return priority;
+    }
+
+    @Override
+    public ApplicationId appId() {
+        return appId;
+    }
+
+    @Override
+    public int timeout() {
+        return timeout;
+    }
+
+    @Override
+    public boolean permanent() {
+        return permanent;
+    }
+
+    @Override
+    public Operation op() {
+        return op;
+    }
+
+    /**
+     * Returns a new builder.
+     *
+     * @return new builder
+     */
+    public static Builder builder() {
+        return new Builder();
+    }
+
+    public static final class Builder implements ForwardingObjective.Builder {
+
+        private TrafficSelector selector;
+        private Flag flag;
+        private boolean permanent = DEFAULT_PERMANENT;
+        private int timeout = DEFAULT_TIMEOUT;
+        private int priority = DEFAULT_PRIORITY;
+        private ApplicationId appId;
+        private Integer nextId;
+        private TrafficTreatment treatment;
+
+        @Override
+        public Builder withSelector(TrafficSelector selector) {
+            this.selector = selector;
+            return this;
+        }
+
+        @Override
+        public Builder nextStep(int nextId) {
+            this.nextId = nextId;
+            return this;
+        }
+
+        @Override
+        public Builder withTreatment(TrafficTreatment treatment) {
+            this.treatment = treatment;
+            return this;
+        }
+
+        @Override
+        public Builder withFlag(Flag flag) {
+            this.flag = flag;
+            return this;
+        }
+
+        @Override
+        public Builder makeTemporary(int timeout) {
+            this.timeout = timeout;
+            this.permanent = false;
+            return this;
+        }
+
+        @Override
+        public Builder makePermanent() {
+            this.permanent = true;
+            return this;
+        }
+
+        @Override
+        public Builder fromApp(ApplicationId appId) {
+            this.appId = appId;
+            return this;
+        }
+
+        @Override
+        public Builder withPriority(int priority) {
+            this.priority = priority;
+            return this;
+        }
+
+        @Override
+        public ForwardingObjective add() {
+            checkNotNull(selector, "Must have a selector");
+            checkNotNull(flag, "A flag must be set");
+            checkArgument(nextId != null && treatment != null, "Must supply at " +
+                    "least a treatment and/or a nextId");
+            checkNotNull(appId, "Must supply an application id");
+            return new DefaultForwardingObjective(selector, flag, permanent,
+                                                  timeout, appId, priority,
+                                                  nextId, treatment, Operation.ADD);
+        }
+
+        @Override
+        public ForwardingObjective remove() {
+            checkNotNull(selector, "Must have a selector");
+            checkNotNull(flag, "A flag must be set");
+            checkArgument(nextId != null && treatment != null, "Must supply at " +
+                    "least a treatment and/or a nextId");
+            checkNotNull(appId, "Must supply an application id");
+            return new DefaultForwardingObjective(selector, flag, permanent,
+                                                   timeout, appId, priority,
+                                                   nextId, treatment, Operation.REMOVE);
+        }
+    }
+}
diff --git a/core/api/src/main/java/org/onosproject/net/flowobjective/DefaultNextObjective.java b/core/api/src/main/java/org/onosproject/net/flowobjective/DefaultNextObjective.java
new file mode 100644
index 0000000..4ab79ff
--- /dev/null
+++ b/core/api/src/main/java/org/onosproject/net/flowobjective/DefaultNextObjective.java
@@ -0,0 +1,173 @@
+/*
+ * Copyright 2015 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.net.flowobjective;
+
+import com.google.common.collect.ImmutableList;
+import org.onosproject.core.ApplicationId;
+import org.onosproject.net.flow.TrafficTreatment;
+
+import java.util.Collection;
+import java.util.List;
+
+import static com.google.common.base.Preconditions.checkArgument;
+import static com.google.common.base.Preconditions.checkNotNull;
+
+/**
+ * Default implementation of a next objective.
+ */
+public final class DefaultNextObjective implements NextObjective {
+
+    private final List<TrafficTreatment> treatments;
+    private final ApplicationId appId;
+    private final Type type;
+    private final Integer id;
+
+    private DefaultNextObjective(Integer id, List<TrafficTreatment> treatments,
+                                ApplicationId appId, Type type) {
+        this.treatments = treatments;
+        this.appId = appId;
+        this.type = type;
+        this.id = id;
+    }
+
+    @Override
+    public Collection<TrafficTreatment> next() {
+        return treatments;
+    }
+
+    @Override
+    public Type type() {
+        return type;
+    }
+
+    @Override
+    public int id() {
+        return id;
+    }
+
+    @Override
+    public int priority() {
+        return 0;
+    }
+
+    @Override
+    public ApplicationId appId() {
+        return appId;
+    }
+
+    @Override
+    public int timeout() {
+        return 0;
+    }
+
+    @Override
+    public boolean permanent() {
+        return false;
+    }
+
+    @Override
+    public Operation op() {
+        throw new UnsupportedOperationException("Next Objective has no operation");
+    }
+
+    /**
+     * Returns a new builder.
+     *
+     * @return new builder
+     */
+    public static Builder builder() {
+        return new Builder();
+    }
+
+    public static final class Builder implements NextObjective.Builder {
+
+        private ApplicationId appId;
+        private Type type;
+        private Integer id;
+
+        private final ImmutableList.Builder<TrafficTreatment> listBuilder
+                = ImmutableList.builder();
+
+
+
+        @Override
+        public NextObjective.Builder withId(int nextId) {
+            this.id = nextId;
+            return this;
+        }
+
+        @Override
+        public Builder withType(Type type) {
+            this.type = type;
+            return this;
+        }
+
+        @Override
+        public Builder addTreatment(TrafficTreatment treatment) {
+            listBuilder.add(treatment);
+            return this;
+        }
+
+        /**
+         * Noop. This method has no effect.
+         *
+         * @param timeout a timeout
+         * @return a next objective builder
+         */
+        @Override
+        public Builder makeTemporary(int timeout) {
+            return this;
+        }
+
+        /**
+         * Noop. This method has no effect.
+         *
+         * @return a next objective builder
+         */
+        @Override
+        public Builder makePermanent() {
+            return this;
+        }
+
+        @Override
+        public Builder fromApp(ApplicationId appId) {
+            this.appId = appId;
+            return this;
+        }
+
+        /**
+         * Noop. This method has no effect.
+         *
+         * @param priority an integer
+         * @return a next objective builder
+         */
+        @Override
+        public Builder withPriority(int priority) {
+            return this;
+        }
+
+        @Override
+        public NextObjective build() {
+            List<TrafficTreatment> treatments = listBuilder.build();
+            checkNotNull(appId, "Must supply an application id");
+            checkNotNull(id, "id cannot be null");
+            checkNotNull(type, "The type cannot be null");
+            checkArgument(!treatments.isEmpty(), "Must have at least one treatment");
+
+            return new DefaultNextObjective(id, treatments, appId, type);
+        }
+    }
+}
diff --git a/core/api/src/main/java/org/onosproject/net/flowobjective/FilteringObjective.java b/core/api/src/main/java/org/onosproject/net/flowobjective/FilteringObjective.java
new file mode 100644
index 0000000..93f62ac9
--- /dev/null
+++ b/core/api/src/main/java/org/onosproject/net/flowobjective/FilteringObjective.java
@@ -0,0 +1,82 @@
+/*
+ * Copyright 2015 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.net.flowobjective;
+
+import org.onosproject.net.flow.criteria.Criterion;
+
+import java.util.Collection;
+
+/**
+ * Represents a filtering flow objective. Each filter is mapping
+ * from a criterion to a collection of criteria. The mapping will
+ * be used by a device driver to construct the actual flow rules to
+ * be installed on the device.
+ */
+public interface FilteringObjective extends Objective {
+
+    /**
+     * Represents filtering key used in this filter.
+     *
+     * @return a criterion
+     */
+    Criterion key();
+
+    /**
+     * The set of conditions the filter must provision at the device.
+     *
+     * @return a collection of criteria
+     */
+    Collection<Criterion> conditions();
+
+    /**
+     * Builder of Filtering objective entities.
+     */
+    public interface Builder extends Objective.Builder {
+
+        /**
+         * Add a filtering condition.
+         *
+         * @param criterion new criterion
+         * @return a filtering builder
+         */
+        public Builder addCondition(Criterion criterion);
+
+        /**
+         * Add a filtering key.
+         *
+         * @param criterion new criterion
+         * @return a filtering builder.
+         */
+        public Builder withKey(Criterion criterion);
+
+        /**
+         * Builds the filtering objective that will be added.
+         *
+         * @return a filtering objective
+         */
+        public FilteringObjective add();
+
+        /**
+         * Builds the filtering objective that will be removed.
+         *
+         * @return a filtering objective.
+         */
+        public FilteringObjective remove();
+
+
+    }
+
+}
diff --git a/core/api/src/main/java/org/onosproject/net/flowobjective/ForwardingObjective.java b/core/api/src/main/java/org/onosproject/net/flowobjective/ForwardingObjective.java
new file mode 100644
index 0000000..4fecc54
--- /dev/null
+++ b/core/api/src/main/java/org/onosproject/net/flowobjective/ForwardingObjective.java
@@ -0,0 +1,125 @@
+/*
+ * Copyright 2015 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.net.flowobjective;
+
+import org.onosproject.net.flow.TrafficSelector;
+import org.onosproject.net.flow.TrafficTreatment;
+
+/**
+ * Represents a description of which types of traffic need to
+ * be forwarded through the device. A forwarding objective may
+ * in multiple rules at the device.
+ */
+public interface ForwardingObjective extends Objective {
+
+    /**
+     * Represents whether this objective is monolithic or
+     * may be broken down into parts.
+     */
+    enum Flag {
+        /**
+         * A decomposable objective.
+         */
+        SPECIFIC,
+
+        /**
+         * A monolithic objective.
+         */
+        VERSATILE
+    }
+
+    /**
+     * Obtain the selector for this objective.
+     *
+     * @return a traffic selector
+     */
+    TrafficSelector selector();
+
+    /**
+     * Obtain the traffic treatment for this objective. Mutually exclusive with
+     * 'treatment'.
+     *
+     * @return an integer
+     */
+    Integer nextId();
+
+    /**
+     * A traffic treatment for this forwarding objective. Mutually exclusive
+     * with a nextId.
+     *
+     * @return a traffic treatment
+     */
+    TrafficTreatment treatment();
+
+    /**
+     * Obtain the type of this objective.
+     *
+     * @return a flag type
+     */
+    Flag flag();
+
+    /**
+     * A forwarding objective builder.
+     */
+    public interface Builder extends Objective.Builder {
+
+        /**
+         * Assigns a selector to the forwarding objective.
+         *
+         * @param selector a traffic selector
+         * @return a forwarding objective builder
+         */
+        public Builder withSelector(TrafficSelector selector);
+
+        /**
+         * Assigns a next step to the forwarding objective.
+         *
+         * @param nextId a next objective id.
+         * @return a forwarding objective builder
+         */
+        public Builder nextStep(int nextId);
+
+        /**
+         * Assigns the treatment for this forwarding objective.
+         *
+         * @param treatment a traffic treatment
+         * @return a forwarding objective
+         */
+        public Builder withTreatment(TrafficTreatment treatment);
+
+        /**
+         * Assigns the flag to the forwarding objective.
+         *
+         * @param flag a flag
+         * @return a forwarding objective builder
+         */
+        public Builder withFlag(Flag flag);
+
+        /**
+         * Builds the forwarding objective that will be added.
+         *
+         * @return a forwarding objective
+         */
+        public ForwardingObjective add();
+
+        /**
+         * Builds the forwarding objective that will be removed.
+         *
+         * @return a forwarding objective.
+         */
+        public ForwardingObjective remove();
+    }
+}
diff --git a/core/api/src/main/java/org/onosproject/net/flowobjective/NextObjective.java b/core/api/src/main/java/org/onosproject/net/flowobjective/NextObjective.java
new file mode 100644
index 0000000..52e79ee
--- /dev/null
+++ b/core/api/src/main/java/org/onosproject/net/flowobjective/NextObjective.java
@@ -0,0 +1,107 @@
+/*
+ * Copyright 2015 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.net.flowobjective;
+
+import org.onosproject.net.flow.TrafficTreatment;
+
+import java.util.Collection;
+
+/**
+ * Represents a nexthop which will be translated by a driver
+ * into the appropriate group or actions needed to implement
+ * the function.
+ */
+public interface NextObjective extends Objective {
+
+    /**
+     * Represents the type of next phase to build.
+     */
+    enum Type {
+        /**
+         * A hashed packet processing.
+         */
+        HASHED,
+
+        /**
+         * Broadcast packet process.
+         */
+        BROADCAST,
+
+        /**
+         * Failover handling.
+         */
+        FAILOVER,
+
+        /**
+         * Simple processing. Could be a group or a treatment.
+         */
+        SIMPLE
+    }
+
+    /**
+     * The collection of treatments that need to be applied to a set of traffic.
+     *
+     * @return a collection of traffic treatments
+     */
+    Collection<TrafficTreatment> next();
+
+    /**
+     * The type of operation that will be applied to the traffic using the collection
+     * of treatments.
+     *
+     * @return a type
+     */
+    Type type();
+
+    /**
+     * A next step builder.
+     */
+    public interface Builder extends Objective.Builder {
+
+        /**
+         * Specifies the id for this next objective.
+         *
+         * @param nextId an integer
+         * @return a next objective builder
+         */
+        public Builder withId(int nextId);
+
+        /**
+         * Sets the type of next step.
+         *
+         * @param type a type
+         * @return a next step builder
+         */
+        public Builder withType(Type type);
+
+        /**
+         * Adds a treatment to this next step.
+         *
+         * @param treatment a traffic treatment
+         * @return a next step builder
+         */
+        public Builder addTreatment(TrafficTreatment treatment);
+
+        /**
+         * Builds a next step.
+         *
+         * @return a next step
+         */
+        public NextObjective build();
+
+    }
+
+}
diff --git a/core/api/src/main/java/org/onosproject/net/flowobjective/Objective.java b/core/api/src/main/java/org/onosproject/net/flowobjective/Objective.java
new file mode 100644
index 0000000..3971b03
--- /dev/null
+++ b/core/api/src/main/java/org/onosproject/net/flowobjective/Objective.java
@@ -0,0 +1,122 @@
+/*
+ * Copyright 2015 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.net.flowobjective;
+
+import org.onosproject.core.ApplicationId;
+
+/**
+ * Base representation of an flow description.
+ */
+public interface Objective {
+
+    static final boolean DEFAULT_PERMANENT = true;
+    static final int DEFAULT_TIMEOUT = 0;
+    static final int DEFAULT_PRIORITY = 32768;
+
+    /**
+     * Type of operation.
+     */
+    enum Operation {
+        /**
+         * Adds the objective.
+         */
+        ADD,
+
+        /**
+         * Removes the objective.
+         */
+        REMOVE
+    }
+
+    /**
+     * An identifier for this objective.
+     *
+     * @return an integer
+     */
+    int id();
+
+    /**
+     * The priority for this objective.
+     *
+     * @return an integer
+     */
+    int priority();
+
+    /**
+     * The application which applied this objective.
+     *
+     * @return an application id
+     */
+    ApplicationId appId();
+
+    /**
+     * The timeout for this objective.
+     *
+     * @return an integer
+     */
+    int timeout();
+
+    /**
+     * Whether this objective is permanent.
+     *
+     * @return a boolean
+     */
+    boolean permanent();
+
+    /**
+     * The type of operation for this objective.
+     *
+     * @return an operation
+     */
+    Operation op();
+
+    /**
+     * An objective builder.
+     */
+    public interface Builder {
+        /**
+         * Makes the filtering objective temporary.
+         *
+         * @param timeout a timeout
+         * @return an objective builder
+         */
+        public Builder makeTemporary(int timeout);
+
+        /**
+         * Makes the filtering objective permanent.
+         *
+         * @return an objective builder
+         */
+        public Builder makePermanent();
+
+        /**
+         * Specifies the application which applied the filter.
+         *
+         * @param appId an application id
+         * @return an objective builder
+         */
+        public Builder fromApp(ApplicationId appId);
+
+        /**
+         * Sets the priority for this objective.
+         *
+         * @param priority an integer
+         * @return an objective builder
+         */
+        public Builder withPriority(int priority);
+    }
+
+}
diff --git a/drivers/pom.xml b/drivers/pom.xml
new file mode 100644
index 0000000..a4db521
--- /dev/null
+++ b/drivers/pom.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Copyright 2014 Open Networking Laboratory
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+
+    <parent>
+        <groupId>org.onosproject</groupId>
+        <artifactId>onos</artifactId>
+        <version>1.2.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>onos-drivers</artifactId>
+    <packaging>bundle</packaging>
+
+    <description>ONOS Default Device Drivers</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-api</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.easymock</groupId>
+            <artifactId>easymock</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+            </plugin>
+
+        </plugins>
+    </build>
+</project>
diff --git a/drivers/src/main/java/org/onosproject/driver/pipeline/DefaultSingleTablePipeline.java b/drivers/src/main/java/org/onosproject/driver/pipeline/DefaultSingleTablePipeline.java
new file mode 100644
index 0000000..8516697
--- /dev/null
+++ b/drivers/src/main/java/org/onosproject/driver/pipeline/DefaultSingleTablePipeline.java
@@ -0,0 +1,109 @@
+/*
+ * Copyright 2015 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.driver.pipeline;
+
+import com.google.common.util.concurrent.SettableFuture;
+import org.onlab.osgi.ServiceDirectory;
+import org.onosproject.core.DefaultGroupId;
+import org.onosproject.net.DeviceId;
+import org.onosproject.net.behaviour.Pipeliner;
+import org.onosproject.net.flow.DefaultFlowRule;
+import org.onosproject.net.flow.FlowRule;
+import org.onosproject.net.flow.FlowRuleOperations;
+import org.onosproject.net.flow.FlowRuleOperationsContext;
+import org.onosproject.net.flow.FlowRuleService;
+import org.onosproject.net.flow.TrafficSelector;
+import org.onosproject.net.flowobjective.FilteringObjective;
+import org.onosproject.net.flowobjective.ForwardingObjective;
+import org.slf4j.Logger;
+
+import java.util.Collection;
+import java.util.concurrent.Future;
+
+import static org.slf4j.LoggerFactory.getLogger;
+
+/**
+ * Simple single table pipeline abstraction.
+ */
+public class DefaultSingleTablePipeline implements Pipeliner {
+
+    private final Logger log = getLogger(getClass());
+
+    private ServiceDirectory serviceDirectory;
+    private FlowRuleService flowRuleService;
+    private DeviceId deviceId;
+
+    @Override
+    public void init(DeviceId deviceId, ServiceDirectory serviceDirectory) {
+        this.serviceDirectory = serviceDirectory;
+        this.deviceId = deviceId;
+
+        flowRuleService = serviceDirectory.get(FlowRuleService.class);
+
+    }
+
+    @Override
+    public Future<Boolean> filter(Collection<FilteringObjective> filters) {
+        throw new UnsupportedOperationException("Single table does not filter.");
+    }
+
+    @Override
+    public Future<Boolean> forward(Collection<ForwardingObjective> forwardings) {
+        FlowRuleOperations.Builder flowBuilder = FlowRuleOperations.builder();
+        forwardings.forEach(fwd -> {
+            if (fwd.flag() != ForwardingObjective.Flag.VERSATILE) {
+                throw new UnsupportedOperationException(
+                        "Only VERSATILE is supported.");
+            }
+
+            TrafficSelector selector = fwd.selector();
+
+            FlowRule rule = new DefaultFlowRule(deviceId, selector,
+                                                fwd.treatment(),
+                                                fwd.priority(), fwd.appId(),
+                                                new DefaultGroupId(fwd.id()),
+                                                fwd.timeout(), fwd.permanent());
+
+            switch (fwd.op()) {
+
+                case ADD:
+                    flowBuilder.add(rule);
+                    break;
+                case REMOVE:
+                    flowBuilder.remove(rule);
+                    break;
+                default:
+                log.warn("Unknown operation {}", fwd.op());
+            }
+
+        });
+
+        SettableFuture<Boolean> future = SettableFuture.create();
+
+        flowRuleService.apply(flowBuilder.build(new FlowRuleOperationsContext() {
+            @Override
+            public void onSuccess(FlowRuleOperations ops) {
+                future.set(true);
+            }
+
+            @Override
+            public void onError(FlowRuleOperations ops) {
+                future.set(false);
+            }
+        }));
+        return future;
+    }
+}
diff --git a/pom.xml b/pom.xml
index 6594c4e..7316ac8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -44,6 +44,7 @@
         <module>web</module>
         <module>cli</module>
         <module>providers</module>
+        <module>drivers</module>
         <module>openflow</module>
         <module>apps</module>
         <module>features</module>
