Changeset d389819 in rtems-docs for networking/networking_driver.rst


Ignore:
Timestamp:
01/18/16 05:37:40 (7 years ago)
Author:
Amar Takhar <amar@…>
Branches:
4.11, 5, am, master
Children:
f916fca
Parents:
11e1a6f
git-author:
Amar Takhar <amar@…> (01/18/16 05:37:40)
git-committer:
Amar Takhar <verm@…> (05/03/16 00:51:24)
Message:

Convert all Unicode to ASCII(128)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • networking/networking_driver.rst

    r11e1a6f rd389819  
    77This chapter is intended to provide an introduction to the
    88procedure for writing RTEMS network device drivers.
    9 The example code is taken from the ‘Generic 68360’ network device
     9The example code is taken from the 'Generic 68360' network device
    1010driver.  The source code for this driver is located in the``c/src/lib/libbsp/m68k/gen68360/network`` directory in the RTEMS
    1111source code distribution.  Having a copy of this driver at
     
    1616
    1717Before starting to write the network driver become completely
    18 familiar with the programmer’s view of the device.
     18familiar with the programmer's view of the device.
    1919The following points list some of the details of the
    2020device that must be understood before a driver can be written.
     
    7171execute only when they hold the network semaphore (``rtems_bsdnet_semaphore``).
    7272The transmit and receive tasks must abide by this protocol.  Be very
    73 careful to avoid ‘deadly embraces’ with the other network tasks.
     73careful to avoid 'deadly embraces' with the other network tasks.
    7474A number of routines are provided to make it easier for the network
    7575driver code to conform to the network task scheduling conventions.
     
    161161``ifp->if_unit``
    162162    The device number.  The network stack uses this number and the
    163     device name for device name lookups.  For example, if``ifp->if_name`` is ‘``scc``’ and ``ifp->if_unit`` is ‘``1``’,
    164     the full device name would be ‘``scc1``’.  The unit number should be
    165     obtained from the ‘name’ entry in the configuration structure.
     163    device name for device name lookups.  For example, if``ifp->if_name`` is '``scc``' and ``ifp->if_unit`` is '``1``',
     164    the full device name would be '``scc1``'.  The unit number should be
     165    obtained from the 'name' entry in the configuration structure.
    166166
    167167``ifp->if_mtu``
     
    212212calling ``if_attach``.  Ethernet devices should then
    213213call ``ether_ifattach``.  Both functions take a pointer to the
    214 device’s ``ifnet`` structure as their only argument.
     214device's ``ifnet`` structure as their only argument.
    215215
    216216The attach function should return a non-zero value to indicate that
     
    222222This function is called each time the network stack wants to start the
    223223transmitter.  This occures whenever the network stack adds a packet
    224 to a device’s send queue and the ``IFF_OACTIVE`` bit in the
    225 device’s ``if_flags`` is not set.
     224to a device's send queue and the ``IFF_OACTIVE`` bit in the
     225device's ``if_flags`` is not set.
    226226
    227227For many devices this function need only set the ``IFF_OACTIVE`` bit in the``if_flags`` and send an event to the transmit task
Note: See TracChangeset for help on using the changeset viewer.