--- a/src/internet-stack/icmpv4-l4-protocol.cc Fri Jun 19 07:50:05 2009 -0700
+++ b/src/internet-stack/icmpv4-l4-protocol.cc Fri Jun 19 07:51:57 2009 -0700
@@ -83,10 +83,10 @@
NS_ASSERT (ipv4 != 0 && ipv4->GetRoutingProtocol () != 0);
Ipv4Header header;
header.SetDestination (dest);
- Socket::SocketErrno errno;
+ Socket::SocketErrno errno_;
Ptr<Ipv4Route> route;
uint32_t oif = 0; //specify non-zero if bound to a source address
- route = ipv4->GetRoutingProtocol ()->RouteOutput (header, oif, errno);
+ route = ipv4->GetRoutingProtocol ()->RouteOutput (header, oif, errno_);
if (route != 0)
{
NS_LOG_LOGIC ("Route exists");
--- a/src/internet-stack/ipv4-l3-protocol.cc Fri Jun 19 07:50:05 2009 -0700
+++ b/src/internet-stack/ipv4-l3-protocol.cc Fri Jun 19 07:51:57 2009 -0700
@@ -531,10 +531,10 @@
}
// 5) packet is not broadcast, and route is NULL (e.g., a raw socket call)
NS_LOG_LOGIC ("Ipv4L3Protocol::Send case 4: passed in with no route " << destination);
- Socket::SocketErrno errno;
+ Socket::SocketErrno errno_;
uint32_t oif = 0; // unused for now
ipHeader = BuildHeader (source, destination, protocol, packet->GetSize (), ttl, mayFragment);
- Ptr<Ipv4Route> newRoute = m_routingProtocol->RouteOutput (ipHeader, oif, errno);
+ Ptr<Ipv4Route> newRoute = m_routingProtocol->RouteOutput (ipHeader, oif, errno_);
if (newRoute)
{
SendRealOut (newRoute, packet, ipHeader);
--- a/src/internet-stack/ipv4-raw-socket-impl.cc Fri Jun 19 07:50:05 2009 -0700
+++ b/src/internet-stack/ipv4-raw-socket-impl.cc Fri Jun 19 07:51:57 2009 -0700
@@ -174,11 +174,11 @@
{
Ipv4Header header;
header.SetDestination (dst);
- SocketErrno errno = ERROR_NOTERROR;;
+ SocketErrno errno_ = ERROR_NOTERROR;//do not use errno as it is the standard C last error number
Ptr<Ipv4Route> route;
uint32_t oif = 0; //specify non-zero if bound to a source address
// TBD-- we could cache the route and just check its validity
- route = ipv4->GetRoutingProtocol ()->RouteOutput (header, oif, errno);
+ route = ipv4->GetRoutingProtocol ()->RouteOutput (header, oif, errno_);
if (route != 0)
{
NS_LOG_LOGIC ("Route exists");
--- a/src/internet-stack/tcp-l4-protocol.cc Fri Jun 19 07:50:05 2009 -0700
+++ b/src/internet-stack/tcp-l4-protocol.cc Fri Jun 19 07:51:57 2009 -0700
@@ -544,10 +544,10 @@
// should be cached.
Ipv4Header header;
header.SetDestination (daddr);
- Socket::SocketErrno errno;
+ Socket::SocketErrno errno_;
Ptr<Ipv4Route> route;
uint32_t oif = 0; //specify non-zero if bound to a source address
- route = ipv4->GetRoutingProtocol ()->RouteOutput (header, oif, errno);
+ route = ipv4->GetRoutingProtocol ()->RouteOutput (header, oif, errno_);
ipv4->Send (packet, saddr, daddr, PROT_NUMBER, route);
}
}
@@ -582,10 +582,10 @@
// should be cached.
Ipv4Header header;
header.SetDestination (daddr);
- Socket::SocketErrno errno;
+ Socket::SocketErrno errno_;
Ptr<Ipv4Route> route;
uint32_t oif = 0; //specify non-zero if bound to a source address
- route = ipv4->GetRoutingProtocol ()->RouteOutput (header, oif, errno);
+ route = ipv4->GetRoutingProtocol ()->RouteOutput (header, oif, errno_);
ipv4->Send (packet, saddr, daddr, PROT_NUMBER, route);
}
else
--- a/src/internet-stack/tcp-socket-impl.cc Fri Jun 19 07:50:05 2009 -0700
+++ b/src/internet-stack/tcp-socket-impl.cc Fri Jun 19 07:51:57 2009 -0700
@@ -350,11 +350,11 @@
{
Ipv4Header header;
header.SetDestination (m_remoteAddress);
- Socket::SocketErrno errno;
+ Socket::SocketErrno errno_;
Ptr<Ipv4Route> route;
uint32_t oif = 0; //specify non-zero if bound to a source address
// XXX here, cache the route in the endpoint?
- route = ipv4->GetRoutingProtocol ()->RouteOutput (header, oif, errno);
+ route = ipv4->GetRoutingProtocol ()->RouteOutput (header, oif, errno_);
if (route != 0)
{
NS_LOG_LOGIC ("Route exists");
@@ -363,8 +363,8 @@
else
{
NS_LOG_LOGIC ("TcpSocketImpl::Connect(): Route to " << m_remoteAddress << " does not exist");
- NS_LOG_ERROR (errno);
- m_errno = errno;
+ NS_LOG_ERROR (errno_);
+ m_errno = errno_;
return -1;
}
}
@@ -851,11 +851,11 @@
if (ipv4->GetRoutingProtocol () != 0)
{
Ipv4Header header;
- Socket::SocketErrno errno;
+ Socket::SocketErrno errno_;
Ptr<Ipv4Route> route;
uint32_t oif = 0; //specify non-zero if bound to a source address
header.SetDestination (m_remoteAddress);
- route = ipv4->GetRoutingProtocol ()->RouteOutput (header, oif, errno);
+ route = ipv4->GetRoutingProtocol ()->RouteOutput (header, oif, errno_);
if (route != 0)
{
NS_LOG_LOGIC ("Route exists");
@@ -863,8 +863,8 @@
}
else
{
- NS_LOG_ERROR (errno);
- m_errno = errno;
+ NS_LOG_ERROR (errno_);
+ m_errno = errno_;
return -1;
}
}
--- a/src/internet-stack/udp-socket-impl.cc Fri Jun 19 07:50:05 2009 -0700
+++ b/src/internet-stack/udp-socket-impl.cc Fri Jun 19 07:51:57 2009 -0700
@@ -396,11 +396,11 @@
{
Ipv4Header header;
header.SetDestination (dest);
- Socket::SocketErrno errno;
+ Socket::SocketErrno errno_;
Ptr<Ipv4Route> route;
uint32_t oif = 0; //specify non-zero if bound to a source address
// TBD-- we could cache the route and just check its validity
- route = ipv4->GetRoutingProtocol ()->RouteOutput (header, oif, errno);
+ route = ipv4->GetRoutingProtocol ()->RouteOutput (header, oif, errno_);
if (route != 0)
{
NS_LOG_LOGIC ("Route exists");
@@ -413,8 +413,8 @@
else
{
NS_LOG_LOGIC ("No route to destination");
- NS_LOG_ERROR (errno);
- m_errno = errno;
+ NS_LOG_ERROR (errno_);
+ m_errno = errno_;
return -1;
}
}