Navigation bar
  Start Previous page  21 of 35  Next page End Home  11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31  

Embedded Web Server for the CR16
National Semiconductor
Jeff Wright
21
specified destination address (defined in Section 3.2.1.3) of the corresponding ICMP Echo Request
message.  
Router Solicitations received are responded to by advertising an appropriate Router IP address. 
This router address will be based upon the same class B network address of the requester. 
Although not necessary for most applications, this feature is included for the potential uses it may
find by our audience.
 
UWORD   (*const ICMP_Table[])(void*, void*, void*) = {ICMPEchoReply,
                                        NULL,
                                        NULL,
                                        NULL,
                                        NULL,
                                        NULL,
                                        NULL,
                                        NULL,
                                        ICMPEchoReq,
                                        NULL,
    ICMPRouterSlct};
Figure 14.  Array (Table) of supported ICMP message types
Data Link Layer (SLIP/PPP)
This version of the stack includes support for the Serial Line Interface Protocol (SLIP).  SLIP
is a very simple protocol used primarily for its quick and easy implementation.  One major
drawback associated with SLIP is its lack of any accommodation for software flow control
(ASCII control characters XON and XOFF).  RAM is a precious and limited resource in most
embedded controllers, and the Cannonball is no exception.  The lack of flow control requires
that we maintain a sufficiently large Rx buffer to prevent unexpected overflows.  
Subsequent versions will include support for the Point-to-Point Protocol (PPP).  PPP affords the
user with flow control by what is termed “transparency”.  Transparency allows one to utilize
standard ASCII control characters by “escaping”, or, encoding them.  This, and various other
PPP options, is configured at the beginning of the PPP connection using the Link Control Protocol
(LCP).
typedef struct dlapi_t{    
// Common Data Link Layer API                        
    UBYTE   Cmd;
    TCP_T   *TCPTxSeg;           // Pointer to TCP Tx segment                 
    TCP_T   *TCPRxSeg;           // Pointer to TCP Rx segment                  
    UDP_T   *UDPTxSeg;           // Pointer to UDP Tx segment                         
    UDP_T   *UDPRxSeg;           // Pointer to UDP Rx segment                         
    ICMP_T  *ICMPTxSeg;          // Pointer to ICMP Tx segment                        
    ICMP_T  *ICMPRxSeg;          // Pointer to ICMP Rx segment                        
    IPv4_T  *IPTxDatagram;       // Pointer to IP Tx Header                           
    IPv4_T  *IPRxDatagram;       // Pointer to IP Rx Header                           
    UBYTE  *RxBuf;               // Pointers to the Rx and Tx buffers                 
    UWORD   RxCount;             // Number of bytes recd                              
    UWORD   RxBufLen;            // Rx buffer length                                  
Microcontroller.com White Papers Previous page Top Next page