G
Guest
Guest
Archived from groups: microsoft.public.windowsnt.protocol.tcpip (More info?)
I write a program and it run in win2k,I want to get the tcp packet,look:
void main()
{
int nByte;
char buf[35565];
struct sockaddr from;
int fromlen
//start winsock;I omit them
SOCKET sk=socket(AF_INET,SOCK_RAW,IPPROTO_TCP);
while(1)
{
nByte=recvfrom(sk,buf,sizeof(buf),0,&from,&fromlen);
}
}
I can success to compile this program,when it run,the error occur,who
can help me?thank you.
I write a program and it run in win2k,I want to get the tcp packet,look:
void main()
{
int nByte;
char buf[35565];
struct sockaddr from;
int fromlen
//start winsock;I omit them
SOCKET sk=socket(AF_INET,SOCK_RAW,IPPROTO_TCP);
while(1)
{
nByte=recvfrom(sk,buf,sizeof(buf),0,&from,&fromlen);
}
}
I can success to compile this program,when it run,the error occur,who
can help me?thank you.