Changeset 5409453 in rtems


Ignore:
Timestamp:
Apr 19, 1999, 2:54:58 PM (21 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
202d54e
Parents:
7a74b99
Message:

First cut at addition of information on macros that need to be defined.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/networking/driver.t

    r7a74b99 r5409453  
    111111@end itemize
    112112
     113@section Network Driver Makefile
     114
     115Network drivers are considered part of the BSD network package and as such
     116are to be compiled with the appropriate flags.
     117
     118@example
     119-D_COMPILING_BSD_KERNEL_ -DKERNEL -DINET -DNFS -DDIAGNOSTIC -DBOOTP_COMPAT
     120@end example
     121
     122Defining these macros tells the network header files that the driver
     123is to be compiled with extended visibility into the network stack.  This
     124is in sharp contrast to applications that simply use the network stack.
     125Applications do not require this level of visibility and should stick
     126to the portable application level API.
     127
     128As a direct result of being logically internal to the network stack,
     129network drivers use the BSD memory allocation routines   This means,
     130for example, that malloc takes three arguments.  See the SONIC
     131device driver (@code{c/src/lib/libchip/network/sonic.c}) for an example
     132of this.  Because of this, network drivers should not include
     133@code{<stdlib.h>}.  Doing so will result in conflicting definitions
     134of @code{malloc()}.
     135
     136@b{Application level} code including network servers such as the FTP
     137daemon are @b{not} part of the BSD network package and should not be
     138compiled with the BSD network flags.  They should include
     139@code{<stdlib.h>} and not define the network stack visibility
     140macros.
     141
    113142@section Write the Driver Attach Function
    114143The driver attach function is responsible for configuring the driver
Note: See TracChangeset for help on using the changeset viewer.