Changeset cdd26ca2 in rtems for doc/networking/networkapp.t


Ignore:
Timestamp:
Dec 10, 1998, 11:35:40 PM (21 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
b2e180b7
Parents:
cca4400
Message:

Document from Ian Lance Taylor <ian@…> on the tap function.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/networking/networkapp.t

    rcca4400 rcdd26ca2  
    279279
    280280@end table
     281
     282In addition, RTEMS add two new ioctls to the BSD networking code:
     283SIOCSIFTAP and SIOCGIFTAP.  These may be used to set and get a
     284@i{tap function}.  The tap function will be called for every
     285Ethernet packet received by the interface.
     286
     287These are called like other interface ioctls, such as SIOCSIFADDR.
     288When setting the tap function with SIOCSIFTAP, set the ifr_tap field
     289of the ifreq struct to the tap function.  When retrieving the tap
     290function with SIOCGIFTAP, the current tap function will be returned in
     291the ifr_tap field.  To stop tapping packets, call SIOCSIFTAP with a
     292ifr_tap field of 0.
     293
     294The tap function is called like this:
     295
     296@example
     297int tap (struct ifnet *, struct ether_header *, struct mbuf *)
     298@end example
     299
     300The tap function should return 1 if the packet was fully handled, in
     301which case the caller will simply discard the mbuf.  The tap function
     302should return 0 if the packet should be passed up to the higher
     303networking layers.
     304
     305The tap function is called with the network semaphore locked.  It must
     306not make any calls on the application levels of the networking level
     307itself.  It is safe to call other non-networking RTEMS functions.
     308
Note: See TracChangeset for help on using the changeset viewer.