![]() |
ConstructTCPHeader() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Protected Function |
Declared in: TCPCrafter.h |
virtual LPTCPHeader ConstructTCPHeader( int iSourcePort, int iDestinationPort, int iHeaderLength);
Create the TCP header
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)
![]() |
Site content copyright © 2001 Barak Weichselbaum. See the About page for additional notices. This page last updated: 27 Jun 2001. |