update Bug 932 (Support IP_HDRINCL option for Ipv4RawSocket) again: regarding w/ Tom's comments.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user