diff --git a/src/inet/EndPointBasis.h b/src/inet/EndPointBasis.h
index 31ed82c..f34db99 100644
--- a/src/inet/EndPointBasis.h
+++ b/src/inet/EndPointBasis.h
@@ -26,11 +26,8 @@
 
 #include <inet/InetConfig.h>
 
-#include "inet/IANAConstants.h"
-#include "inet/InetLayerBasis.h"
-#include <inet/InetError.h>
-#include <inet/InetInterface.h>
-#include <inet/InetLayerEvents.h>
+#include <inet/IPAddress.h>
+#include <inet/InetLayerBasis.h>
 
 #include <lib/support/DLLUtil.h>
 
@@ -42,58 +39,29 @@
 #include <Network/Network.h>
 #endif // CHIP_SYSTEM_CONFIG_USE_NETWORK_FRAMEWORK
 
-//--- Declaration of LWIP protocol control buffer structure names
 #if CHIP_SYSTEM_CONFIG_USE_LWIP
-#if INET_CONFIG_ENABLE_UDP_ENDPOINT
 struct udp_pcb;
-#endif // INET_CONFIG_ENABLE_UDP_ENDPOINT
-#if INET_CONFIG_ENABLE_TCP_ENDPOINT
 struct tcp_pcb;
-#endif // INET_CONFIG_ENABLE_TCP_ENDPOINT
 #endif // CHIP_SYSTEM_CONFIG_USE_LWIP
 
 namespace chip {
 namespace Inet {
 
 /**
- * @class EndPointBasis
- *
- * @brief Basis of internet transport endpoint classes
+ * Basis of internet transport endpoint classes.
  */
 class DLL_EXPORT EndPointBasis : public InetLayerBasis
 {
-public:
-    /** Common state codes */
-    enum
-    {
-        kBasisState_Closed = 0 /**< Encapsulated descriptor is not valid. */
-    };
-
-#if CHIP_SYSTEM_CONFIG_USE_NETWORK_FRAMEWORK
-    /** Test whether endpoint is a Network.framework endpoint */
-    bool IsNetworkFrameworkEndPoint(void) const;
-#endif
-
-#if CHIP_SYSTEM_CONFIG_USE_SOCKETS
-    /** Test whether endpoint is a POSIX socket */
-    bool IsSocketsEndPoint() const;
-#endif
-
-#if CHIP_SYSTEM_CONFIG_USE_LWIP
-    /** Test whether endpoint is a LwIP protocol control buffer */
-    bool IsLWIPEndPoint(void) const;
-#endif
-
-    /** Test whether endpoint has a valid descriptor. */
-    bool IsOpenEndPoint() const;
-
 protected:
+    void InitEndPointBasis(InetLayer & aInetLayer, void * aAppState = nullptr);
+
 #if CHIP_SYSTEM_CONFIG_USE_NETWORK_FRAMEWORK
     nw_parameters_t mParameters;
     IPAddressType mAddrType; /**< Protocol family, i.e. IPv4 or IPv6. */
 #endif
 
 #if CHIP_SYSTEM_CONFIG_USE_SOCKETS
+    static constexpr int kInvalidSocketFd = -1;
     int mSocket;                     /**< Encapsulated socket descriptor. */
     IPAddressType mAddrType;         /**< Protocol family, i.e. IPv4 or IPv6. */
     System::SocketWatchToken mWatch; /**< Socket event watcher */
@@ -112,63 +80,18 @@
 #endif                  // INET_CONFIG_ENABLE_TCP_ENDPOINT
     };
 
-    enum
+    enum class LwIPEndPointType : uint8_t
     {
-        kLwIPEndPointType_Unknown = 0,
+        Unknown = 0,
+        Raw     = 1,
+        UDP     = 2,
+        UCP     = 3,
+        TCP     = 4
+    } mLwIPEndPointType;
 
-        kLwIPEndPointType_Raw = 1,
-        kLwIPEndPointType_UDP = 2,
-        kLwIPEndPointType_UCP = 3,
-        kLwIPEndPointType_TCP = 4
-    };
-
-    uint8_t mLwIPEndPointType;
-
-    void DeferredFree(chip::System::Object::ReleaseDeferralErrorTactic aTactic);
+    void DeferredFree(System::Object::ReleaseDeferralErrorTactic aTactic);
 #endif // CHIP_SYSTEM_CONFIG_USE_LWIP
-
-    void InitEndPointBasis(InetLayer & aInetLayer, void * aAppState = nullptr);
 };
 
-#if CHIP_SYSTEM_CONFIG_USE_NETWORK_FRAMEWORK
-inline bool EndPointBasis::IsNetworkFrameworkEndPoint(void) const
-{
-    return mParameters != NULL;
-}
-#endif // CHIP_SYSTEM_CONFIG_USE_NETWORK_FRAMEWORK
-
-#if CHIP_SYSTEM_CONFIG_USE_SOCKETS
-inline bool EndPointBasis::IsSocketsEndPoint() const
-{
-    return mSocket != INET_INVALID_SOCKET_FD;
-}
-#endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS
-
-#if CHIP_SYSTEM_CONFIG_USE_LWIP
-inline bool EndPointBasis::IsLWIPEndPoint(void) const
-{
-    return mVoid != NULL;
-}
-#endif // CHIP_SYSTEM_CONFIG_USE_LWIP
-
-inline bool EndPointBasis::IsOpenEndPoint() const
-{
-    bool lResult = false;
-
-#if CHIP_SYSTEM_CONFIG_USE_LWIP
-    lResult = (lResult || IsLWIPEndPoint());
-#endif // CHIP_SYSTEM_CONFIG_USE_LWIP
-
-#if CHIP_SYSTEM_CONFIG_USE_SOCKETS
-    lResult = (lResult || IsSocketsEndPoint());
-#endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS
-
-#if CHIP_SYSTEM_CONFIG_USE_NETWORK_FRAMEWORK
-    lResult = (lResult || IsNetworkFrameworkEndPoint());
-#endif // CHIP_SYSTEM_CONFIG_USE_NETWORK_FRAMEWORK
-
-    return lResult;
-}
-
 } // namespace Inet
 } // namespace chip
