diff --git a/src/internet-node/udp-socket.cc b/src/internet-node/udp-socket.cc index 8c6c3dcfc..dd58652ad 100644 --- a/src/internet-node/udp-socket.cc +++ b/src/internet-node/udp-socket.cc @@ -30,7 +30,7 @@ UdpSocket::UdpSocket (Ptr node, Ptr udp) : m_endPoint (0), m_node (node), m_udp (udp), - m_errno (ENOTERROR), + m_errno (ERROR_NOTERROR), m_shutdownSend (false), m_shutdownRecv (false), m_connected (false) @@ -154,7 +154,7 @@ UdpSocket::DoAccept(ns3::Callback, const Ipv4Address&, uint16_ ns3::Callback > closeRequested) { // calling accept on a udp socket is a programming error. - m_errno = EOPNOTSUPP; + m_errno = ERROR_OPNOTSUPP; return -1; } int @@ -164,7 +164,7 @@ UdpSocket::DoSend (const uint8_t* buffer, { if (!m_connected) { - m_errno = ENOTCONN; + m_errno = ERROR_NOTCONN; return -1; } Packet p; @@ -193,7 +193,7 @@ UdpSocket::DoSendPacketTo (const Packet &p, Ipv4Address daddr, uint16_t dport, } if (m_shutdownSend) { - m_errno = ESHUTDOWN; + m_errno = ERROR_SHUTDOWN; return -1; } m_udp->Send (p, m_endPoint->GetLocalAddress (), daddr, @@ -213,7 +213,7 @@ UdpSocket::DoSendTo(const Ipv4Address &address, { if (m_connected) { - m_errno = EISCONN; + m_errno = ERROR_ISCONN; return -1; } Packet p; diff --git a/src/node/socket.h b/src/node/socket.h index ee710ca75..1c352e166 100644 --- a/src/node/socket.h +++ b/src/node/socket.h @@ -46,13 +46,13 @@ public: virtual ~Socket(); enum SocketErrno { - ENOTERROR, - EISCONN, - ENOTCONN, - EMSGSIZE, - EAGAIN, - ESHUTDOWN, - EOPNOTSUPP, + ERROR_NOTERROR, + ERROR_ISCONN, + ERROR_NOTCONN, + ERROR_MSGSIZE, + ERROR_AGAIN, + ERROR_SHUTDOWN, + ERROR_OPNOTSUPP, SOCKET_ERRNO_LAST };