ABL electronic PIC16 Personal Computer User Manual


 
MikroElektronika:
Development
tools
-
Books
-
Compilers
18 3
page
mikroC
- C Compiler for Microchip PIC microcontrollers
mikroC
making it simple...
Prototype
unsigned short Eth_Get_Tcp_Flags(void);
Returns Returns the flags data from the header of the received TCP packet.
Description The function returns the flags data from the header of the received TCP packet. TCP
flags show various information, e.g. SYN (syncronize request), ACK (acknowledge
receipt), and similar. It is upon these flags that, for example, a proper HTTP communi-
cation is established.
Requires This function must be called after the Eth_Load_Tcp_Header, since it initializes the
private variables used for this function.
Example
flags = Eth_Get_Tcp_Flags();
Eth_Get_Tcp_Flags
Prototype
unsigned short Eth_Get_Tcp_Hdr_Offset(void);
Returns Returns the length (or offset) of the TCP packet header in bytes.
Description The function returns the length (or offset) of the TCP packet header in bytes. Upon
receiving a valid TCP packet, its header is to be analyzed in order to respond properly
(e.g. respond to other's request, merge several packets into the message, etc.). The head-
er length is important to know in order to be able to extract the information contained in
it.
Requires This function must be called after the Eth_Load_Tcp_Header, since it initializes the
private variables used for this function.
Example
// calculate offset (TCP header length)
tcp_options = Eth_Get_Tcp_Hdr_Offset() - 20;
Eth_Get_Tcp_Hdr_Offset