next up previous contents
Next: 7.2 Data Structures Up: 7 Source Code Presentation Previous: 7 Source Code Presentation

7.1 Conventions

Properly documenting even the smallest engineering endeavor requires adherence to a set of typographical conventions aimed both at reducing the probability of misinterpretations and keeping the documenter honest. XUDP is just over 4,000 lines of source code. Rather than include the entire block of source code as an appendix, it will be documented and included piecemeal as required throughout this section. In the interest of maintaining a standard, many of the conventions used in this report follow those used in the TCP/IP Illustrated series by Wright and Stevens [43].

Short pieces of C code will be listed in a fixed-width font figure seperated from the main text by two horizontal rules as illustrated below. The typedefs declared here will be used throughout the XUDP source code.

typedef u_short Sequence;   /* 16-bit Sequence numbering */
typedef u_int   Timestamp;  /* 32-bit Timestampping */
typedef u_char  Options;    /* 8-bit  Options field */
typedef u_short Window;     /* 16-bit Window size */
typedef u_char  Boolean;    /* 8-bit  Boolean, why not? */

XUDP Specific typedef types.

A fixed-width font is used for most variable or function names (xudp_sendmsg()) and a slanted, fixed width font for constants (MAXPAYLOAD.)

asides or notes will be offered in this indented, smaller font size format.

Mike Andrews
Wed Mar 19 16:07:58 EST 1997