update Bug 932 (Support IP_HDRINCL option for Ipv4RawSocket) again: regarding w/ Tom's comments.

This commit is contained in:
Hajime Tazaki
2010-06-04 10:17:51 +09:00
parent 6ec5e6e526
commit 8873e85bf5
3 changed files with 3 additions and 5 deletions

View File

@@ -524,9 +524,7 @@ Ipv4L3Protocol::Send (Ptr<Packet> packet,
Ptr<Ipv4Route> route)
{
NS_LOG_FUNCTION (this << packet << ipHeader << route);
Ipv4Header hdr;
packet->RemoveHeader (hdr);
SendRealOut (route, packet, hdr);
SendRealOut (route, packet, ipHeader);
}
void

View File

@@ -164,7 +164,7 @@ public:
Ipv4Address destination, uint8_t protocol, Ptr<Ipv4Route> route);
/**
* \param packet packet to send
* \param ipHeader IP Heeader
* \param ipHeader IP Header
* \param route route entry
*
* Higher-level layers call this method to send a packet with IPv4 Header

View File

@@ -195,7 +195,7 @@ Ipv4RawSocketImpl::SendTo (Ptr<Packet> p, uint32_t flags,
}
else
{
p->PeekHeader (header);
p->RemoveHeader (header);
dst = header.GetDestination ();
}
SocketErrno errno_ = ERROR_NOTERROR;//do not use errno as it is the standard C last error number