diff --git a/apps/ipflow-monitor/sflow/api/src/main/java/org/onosproject/sflow/CounterRecord.java b/apps/ipflow-monitor/sflow/api/src/main/java/org/onosproject/sflow/CounterRecord.java
index 8b4091e..c8a7562 100644
--- a/apps/ipflow-monitor/sflow/api/src/main/java/org/onosproject/sflow/CounterRecord.java
+++ b/apps/ipflow-monitor/sflow/api/src/main/java/org/onosproject/sflow/CounterRecord.java
@@ -19,13 +19,15 @@
 import java.util.Map;
 import java.util.Optional;
 import java.util.concurrent.ConcurrentHashMap;
-
+import java.nio.ByteBuffer;
 import org.onlab.packet.BasePacket;
 import org.onlab.packet.DeserializationException;
 import org.onlab.packet.Deserializer;
 
 import com.google.common.base.MoreObjects;
 
+import java.util.function.BiPredicate;
+
 import static com.google.common.base.Preconditions.checkState;
 
 /**
@@ -33,6 +35,8 @@
  */
 public final class CounterRecord extends BasePacket {
 
+    public static final int COUNTER_RECORD_HEADER_LENGTH = 8;
+
     private Type type;
 
     private int length;
@@ -83,9 +87,9 @@
         GENERIC(1, InterfaceCounter.deserializer()),
         ETHERNET(2, EthernetCounter.deserializer()),
         TOKENRING(3, TokenRingCounter.deserializer()),
-        FDDI(4, InterfaceCounter.deserializer()),
+        FDDI(4, FddiCounter.deserializer()),
         VG(5, VgCounter.deserializer()),
-        WAN(6, InterfaceCounter.deserializer()),
+        WAN(6, WanCounter.deserializer()),
         VLAN(7, VlanCounter.deserializer());
 
 
@@ -124,9 +128,27 @@
      *
      * @return data deserializer function
      */
-    public static Deserializer<CounterSample> deserializer() {
+    public static Deserializer<CounterRecord> deserializer() {
         return (data, offset, length) -> {
-            return null;
+            BiPredicate<ByteBuffer, Integer> isValidBuffer = (b, l)
+                    -> b.hasRemaining() && b.remaining() >= l;
+
+            ByteBuffer bb = ByteBuffer.wrap(data, offset, length);
+            byte[] ifCounterBytes;
+            if (!isValidBuffer.test(bb, COUNTER_RECORD_HEADER_LENGTH)) {
+                throw new IllegalStateException("Invalid interface counter record buffer size.");
+            }
+
+            int recordLength = bb.remaining();
+            byte[] record = new byte[recordLength];
+            bb.get(record);
+
+            Builder builder = new Builder();
+            return builder.type(Type.getType(bb.getInt()))
+                    .length(bb.getInt())
+                    .counterPacket((CounterPacket) Type.getType(bb.getInt()).getDecoder()
+                            .deserialize(record, 0, recordLength))
+                    .build();
         };
     }
 
diff --git a/apps/ipflow-monitor/sflow/api/src/main/java/org/onosproject/sflow/FddiCounter.java b/apps/ipflow-monitor/sflow/api/src/main/java/org/onosproject/sflow/FddiCounter.java
new file mode 100644
index 0000000..f025ecd
--- /dev/null
+++ b/apps/ipflow-monitor/sflow/api/src/main/java/org/onosproject/sflow/FddiCounter.java
@@ -0,0 +1,95 @@
+/*
+ * Copyright 2024-present Open Networking Foundation
+ *
+ * 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.sflow;
+
+import com.google.common.base.MoreObjects;
+
+import org.onlab.packet.Deserializer;
+
+/**
+ * Represents FDDI counters for network interfaces.
+ */
+public final class FddiCounter extends CounterPacket {
+
+    private InterfaceCounter generic;
+
+    private FddiCounter(Builder builder) {
+        this.generic = builder.generic;
+    }
+
+    /**
+     * Gets the generic interface counter.
+     *
+     * @return generic interface counter.
+     */
+    public InterfaceCounter getGeneric() {
+        return generic;
+    }
+
+    @Override
+    public String toString() {
+        return MoreObjects.toStringHelper(getClass())
+                .add("generic", generic)
+                .toString();
+    }
+
+    /**
+     * Deserializer function for sFlow interface FDDI counter.
+     *
+     * @return deserializer function
+     */
+    public static Deserializer<FddiCounter> deserializer() {
+        return (data, offset, length) -> {
+
+            if (length < InterfaceCounter.INTERFACE_COUNTER_LENGTH) {
+                throw new IllegalStateException("Invalid interface FDDI counter buffer size.");
+            }
+
+            Builder builder = new Builder();
+            return builder.generic(InterfaceCounter.deserializer().deserialize(data,
+                            offset, length))
+                    .build();
+        };
+    }
+
+    /**
+     * Builder pattern to create an instance of InterfaceCounter.
+     */
+    private static class Builder {
+        private InterfaceCounter generic;
+
+        /**
+         * Sets the generic interface counter.
+         *
+         * @param generic the generic interface counter.
+         * @return this builder instance.
+         */
+        public Builder generic(InterfaceCounter generic) {
+            this.generic = generic;
+            return this;
+        }
+
+        /**
+         * Builds an instance of FDDI counter based on the configured parameters.
+         *
+         * @return an instance of FDDI counter.
+         */
+        public FddiCounter build() {
+            return new FddiCounter(this);
+        }
+
+    }
+}
diff --git a/apps/ipflow-monitor/sflow/api/src/main/java/org/onosproject/sflow/WanCounter.java b/apps/ipflow-monitor/sflow/api/src/main/java/org/onosproject/sflow/WanCounter.java
new file mode 100644
index 0000000..ba9c8e2
--- /dev/null
+++ b/apps/ipflow-monitor/sflow/api/src/main/java/org/onosproject/sflow/WanCounter.java
@@ -0,0 +1,94 @@
+/*
+ * Copyright 2024-present Open Networking Foundation
+ *
+ * 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.sflow;
+
+import com.google.common.base.MoreObjects;
+import org.onlab.packet.Deserializer;
+
+/**
+ * Represents WAN counters for network interfaces.
+ */
+public final class WanCounter extends CounterPacket {
+
+    private InterfaceCounter generic;
+
+    private WanCounter(Builder builder) {
+        this.generic = builder.generic;
+    }
+
+    /**
+     * Gets the generic interface counter.
+     *
+     * @return generic interface counter.
+     */
+    public InterfaceCounter getGeneric() {
+        return generic;
+    }
+
+    @Override
+    public String toString() {
+        return MoreObjects.toStringHelper(getClass())
+                .add("generic", generic)
+                .toString();
+    }
+
+    /**
+     * Deserializer function for sFlow interface WAN counter.
+     *
+     * @return deserializer function
+     */
+    public static Deserializer<WanCounter> deserializer() {
+        return (data, offset, length) -> {
+
+            if (length < InterfaceCounter.INTERFACE_COUNTER_LENGTH) {
+                throw new IllegalStateException("Invalid interface WAN counter buffer size.");
+            }
+
+            Builder builder = new Builder();
+            return builder.generic(InterfaceCounter.deserializer().deserialize(data,
+                            offset, length))
+                    .build();
+        };
+    }
+
+    /**
+     * Builder pattern to create an instance of InterfaceCounter.
+     */
+    private static class Builder {
+        private InterfaceCounter generic;
+
+        /**
+         * Sets the generic interface counter.
+         *
+         * @param generic the generic interface counter.
+         * @return this builder instance.
+         */
+        public Builder generic(InterfaceCounter generic) {
+            this.generic = generic;
+            return this;
+        }
+
+        /**
+         * Builds an instance of WAN counter based on the configured parameters.
+         *
+         * @return an instance of WAN counter.
+         */
+        public WanCounter build() {
+            return new WanCounter(this);
+        }
+
+    }
+}
