Implementing 802.11 with Microcontrollers: Wireless Networking for Embedded Systems Designers

TCP/IP The Big Ugly

The TCP/IP and supporting code contained within Code Snippet 14.2 is intimidating. Rather than tremble at it's feet, let's throw some bits at this big hunk of code and see what it will do.

Code Snippet 14.2
*****************************//********************************************************//*    TELNET SERVER BANNER STATEMENT CONSTANT//********************************************************char const telnet_banner[] = "\r\nAirDrop-P>";//********************************************************//*    Port Definitions//*    This address is used by TCP and the Telnet function.//*    This can be changed to any valid port number as long as//*    you modify your code to recognize the new port number.//********************************************************#define  MY_PORT_ADDRESS      0x981F  // 8088 DECIMAL//********************************************************//*    FLAGS//********************************************************char flags;#define synflag  0x01#define finflag  0x02#define bsynflag    flags & synflag#define bfinflag    flags & finflag<a name="633"></a><a name="IDX-286"></a>#define clr_synflag     flags &= <sup~</sup>synflag#define set_synflag     flags = synflag#define clr_finflag     flags &= <sup~</sup>finflag#define set_finflag     flags = finflag//**********************************************************//*     IP Header Layout//**********************************************************#define ip_vers_len           0x0C     //IP version and header length//#define ip_tos                       //IP type of service#define ip_pktlen             0x0D     //packet length#define ip_id  ...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Banner and Flag Making Services
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.