CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Web server acknowledge

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
sohailkhanonline



Joined: 06 Mar 2008
Posts: 35
Location: pakistan

View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger

Web server acknowledge
PostPosted: Thu Apr 17, 2008 3:05 am     Reply with quote

HI
I have made a webpage at 192.168.1.200 at port 21000
now i configured my controller to establish TCP connection
For it it sends request (ARP)

which is responded by
stand alone system by
ARP response and then system is ok
but
web server doesnot respond to ARP request
what could be the reason..

Thanks
_________________
sohail khan
Douglas Kennedy



Joined: 07 Sep 2003
Posts: 755
Location: Florida

View user's profile Send private message AIM Address

PostPosted: Thu Apr 17, 2008 8:42 am     Reply with quote

I would start with the basic datagrams and double check them
If the data grams look to be coded well then I would install a packet sniffer on a pC and look at the individual packets. I used Ethereal several years ago when writing a server. PIC based servers are not fully compliant. TCP expects the servers to re sequence packets that are received out of order and to request resends of missing packets. You need an expansive packet stack to store several packets of up to 1K plus bytes each. PIC based code ignores this and works on average because it often restricts use to crisp exchanges of data with limited size or to intra nets where out of sequence isn't an issue. Example sending a large jpg file may glitch occasionally if the web picks paths that allow packets to get out of sequence or even mangled.
Code:
// ********************************************************
///////////////    Datagrams    /////////////////////////////
/////////////////////////////////////////////////////////////
// PING
// 1) PIC receives MAc 806 [ ARP type 0001 protocol  800 sub type 0001]
// 2) PIC sends    MAC 806 [ ARP type 0001 protocol  800          0002] +PIC hardware address
// 3) PIC receives MAC 800 [IP  protocol 01 [ICMP type 800]           ]
// 4) PIC sends    MAC 800 [IP protocol  01 [ICMP type 000]           ]



// TCP   ...  SYN and FIN take up sequence numbers
// ------------ host requests a socket ------------------------------------------
// 1) PIC receives MAC 800 [(48 bytes)IP protocol  06 TCP [ SYN     seq x   ack --- ] options but no payload
// 2) PIC sends    MAC 800 [(48 bytes)IP           06 TCP [ SYN ACK seq y   ack x+1 ] options but  no payload
//                                                     but SYN (1) received takes up a seq# thus x+1
// 3) PIC receives MAC 800 [(40 bytes)IP           06 TCP [ ACK     seq x+1         ] no payload
//                                                          x+1 shows sender saw thePIC's SYN(see 2  above)
//  socket is now established
//                               a timer is set to timeout if no request is sent to PIC
//
//
// 4) PIC receives MAC 800 [(40+payload)IP         06 TCP [ ACK     seq x+1 ack y+1  ]
//                                                    +payload data GET HTML filename]
//
// 5) PIC sends    MAC 800 [(40+payload)IP         06 TCP [ ACK (FIN if done)
//                                                        seq y+1 ack recv'd seq# (x+1)+size of received payload
//                                                                +payload data of HTML
//
// 6) PIC continues to send packets and receive  ACKs until done (PIC sends FIN)
//                                 a timer is set to force socket to close if client
//                                 doesn't respond
//
// 7) PIC receives MAC 800 [(40 bytes)IP           06 TCP [ ACK                      ] no payload
//                                                           any remaining ACK's to sent packets
//
// 8) PIC receives MAC 800 [(40 bytes)IP           06 TCP [ FIN  ACK                 ] no payload
//                                                         this confirms receipt of our FIN
// 9) PIC sends    MAC 800 [(40 bytes)IP           06 TCP [ ACK                      ] no payload
//                                                            this is the LAST ACK
// socket is now closed
// ---------------------
//
// ----------- client sends PIC a FIN during PIC's transmission of data -----------------
//
// 1) PIC receives MAC 800 [(40 bytes)IP           06 TCP [ FIN  ACK                 ] no payload
//
// 2) PIC sends    MAC 800 [(40 bytes)IP           06 TCP [ FIN  ACK                 ] no payload
//                                                         this confirms receipt of the FIN
// socket is now closed
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group