![]() |
ConstructTCPHeader() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
| Protected Function |
Declared in: TCPCrafter.h |
Declaration
virtual LPTCPHeader ConstructTCPHeader(
int iSourcePort,
int iDestinationPort,
int iHeaderLength);
DescriptionCreate the TCP header
Function Body
try
{
//Create the initial header
LPTCPHeader lpHead;
lpHead=CTCPSocket::ConstructTCPHeader(iSourcePort,iDestinationPort,iHeaderLength);
if (!lpHead)
return NULL;
//Overide some data
lpHead->Windows=htons(m_Window);
//Set the packet number
lpHead->AcknowledgeNumber=htonl(m_AcknowledgeNumber);
//And the sequence
lpHead->SequenceNumber=htonl(m_SequenceNumber);
//Data offset
lpHead->DataOffset=m_DataOffset << 4;
//Flags
lpHead->Flags=m_Flags;
//Urgent pointer
lpHead->UrgentPointer=htons(m_UrgentPointer);
//Return it to the user
return lpHead;
}
ERROR_HANDLER_AMBIG_RETURN(CSpoofSocket,"ConstructTCPHeader",NULL)
See Also
This web site was generated
using Surveyor V4.50.811.1. Click
here
for more information. |
Site content copyright © 2001 Barak Weichselbaum. See the About page for additional notices. This page last updated: 27 Jun 2001. |