[VOL-3744] Adding MDS support to BBSim
Change-Id: If16511922a032511084c42727c8203ab9c9e75ec
diff --git a/internal/common/omci/omci_base.go b/internal/common/omci/omci_base.go
index e74ec4a..7a9f499 100644
--- a/internal/common/omci/omci_base.go
+++ b/internal/common/omci/omci_base.go
@@ -18,6 +18,7 @@
import (
"encoding/binary"
+ "encoding/hex"
"errors"
"fmt"
"github.com/google/gopacket"
@@ -73,3 +74,10 @@
}
return p
}
+
+//HexEncode convert binary to hex
+func HexEncode(omciPkt []byte) ([]byte, error) {
+ dst := make([]byte, hex.EncodedLen(len(omciPkt)))
+ hex.Encode(dst, omciPkt)
+ return dst, nil
+}