summaryrefslogtreecommitdiffstats
path: root/share/man/man9/ifnet.9
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2010-01-14 14:43:16 +0000
committerjhb <jhb@FreeBSD.org>2010-01-14 14:43:16 +0000
commit415adcce72605af3de3a1b51cf79b94d8e099109 (patch)
treedfbb7be2b3cfc228f47b017b753d9fd3cf6ddc39 /share/man/man9/ifnet.9
parent8019b29e4fefc8bd6d9bd41bf2b23c45665c695b (diff)
downloadFreeBSD-src-415adcce72605af3de3a1b51cf79b94d8e099109.zip
FreeBSD-src-415adcce72605af3de3a1b51cf79b94d8e099109.tar.gz
- Note that if_xname, if_dname, and if_dunit are usually initialized via
if_initname(). - Document if_drv_flags and replace references to IFF_(RUNNING|OACTIVE) with references to IFF_DRV_(RUNNING|OACTIVE). - Complete truncated sentence in the description of if_transmit by copying from the description in if_qflush. - Add missing line breaks for translators. Reviewed by: brooks (1) MFC after: 3 days
Diffstat (limited to 'share/man/man9/ifnet.9')
-rw-r--r--share/man/man9/ifnet.956
1 files changed, 40 insertions, 16 deletions
diff --git a/share/man/man9/ifnet.9 b/share/man/man9/ifnet.9
index 4f0ff98..7a3a3d9 100644
--- a/share/man/man9/ifnet.9
+++ b/share/man/man9/ifnet.9
@@ -237,11 +237,15 @@ The name of the interface,
.Dq Li fxp0
or
.Dq Li lo0 ) .
-(Initialized by driver.)
+(Initialized by driver
+(usually via
+.Fn if_initname ) . )
.It Va if_dname
.Pq Vt "const char *"
The name of the driver.
-(Initialized by driver.)
+(Initialized by driver
+(usually via
+.Fn if_initname ) . )
.It Va if_dunit
.Pq Vt int
A unique number assigned to each interface managed by a particular
@@ -249,7 +253,9 @@ driver.
Drivers may choose to set this to
.Dv IF_DUNIT_NONE
if a unit number is not associated with the device.
-(Initialized by driver.)
+(Initialized by driver
+(usually via
+.Fn if_initname ) . )
.It Va if_addrhead
.Pq Vt "struct ifaddrhead"
The head of the
@@ -282,7 +288,11 @@ to refer to a particular interface by index
.It Va if_flags
.Pq Vt int
Flags describing operational parameters of this interface (see below).
-(Manipulated by both driver and generic code.)
+(Manipulated by generic code.)
+.It Va if_drv_flags
+.Pq Vt int
+Flags describing operational status of this interface (see below).
+(Manipulated by driver.)
.It Va if_capabilities
.Pq Vt int
Flags describing the capabilities the interface supports (see below).
@@ -349,18 +359,26 @@ Output a packet on interface
or queue it on the output queue if the interface is already active.
.It Fn if_transmit
Transmit a packet on an interface or queue it if the interface is
-in use. This function will return
+in use.
+This function will return
.Dv ENOBUFS
-if the devices software and hardware queues are both full. This
-function must be installed after
+if the devices software and hardware queues are both full.
+This function must be installed after
+.Fn if_attach
+to override the default implementation.
+This function is exposed in order to allow drivers to manage their own queues
+and to reduce the latency caused by a frequently gratuitous enqueue / dequeue
+pair to ifq.
+The suggested internal software queueing mechanism is buf_ring.
.It Fn if_qflush
Free mbufs in internally managed queues when the interface is marked down.
This function must be installed after
.Fn if_attach
-to override the default implementation. This function is exposed in order
-to allow drivers to manage their own queues and to reduce the latency
-caused by a frequently gratuitous enqueue / dequeue pair to ifq. The
-suggested internal software queueing mechanism is buf_ring.
+to override the default implementation.
+This function is exposed in order to allow drivers to manage their own queues
+and to reduce the latency caused by a frequently gratuitous enqueue / dequeue
+pair to ifq.
+The suggested internal software queueing mechanism is buf_ring.
.It Fn if_start
Start queued output on an interface.
This function is exposed in
@@ -369,10 +387,10 @@ order to provide for some interface classes to share a
among all drivers.
.Fn if_start
may only be called when the
-.Dv IFF_OACTIVE
+.Dv IFF_DRV_OACTIVE
flag is not set.
(Thus,
-.Dv IFF_OACTIVE
+.Dv IFF_DRV_OACTIVE
does not literally mean that output is active, but rather that the
device's internal output queue is full.) Please note that this function
will soon be deprecated.
@@ -406,7 +424,7 @@ Initialize and bring up the hardware,
e.g., reset the chip and enable the receiver unit.
Should mark the interface running,
but not active
-.Dv ( IFF_RUNNING , ~IIF_OACTIVE ) .
+.Dv ( IFF_DRV_RUNNING , ~IIF_DRV_OACTIVE ) .
.It Fn if_resolvemulti
Check the requested multicast group membership,
.Fa addr ,
@@ -425,6 +443,12 @@ Flags of the former kind are marked
.Aq S
in this table; the latter are marked
.Aq D .
+Flags which begin with
+.Dq IFF_DRV_
+are stored in
+.Va if_drv_flags ;
+all other flags are stored in
+.Va if_flags .
.Pp
The macro
.Dv IFF_CANTCHANGE
@@ -454,7 +478,7 @@ The interface is a loopback device.
The interface is point-to-point;
.Dq broadcast
address is actually the address of the other end.
-.It Dv IFF_RUNNING
+.It Dv IFF_DRV_RUNNING
.Aq D*
The interface has been configured and dynamic resources were
successfully allocated.
@@ -473,7 +497,7 @@ This interface is in the permanently promiscuous mode (implies
.It Dv IFF_ALLMULTI
.Aq D*
This interface is in all-multicasts mode (used by multicast routers).
-.It Dv IFF_OACTIVE
+.It Dv IFF_DRV_OACTIVE
.Aq D*
The interface's hardware output queue (if any) is full; output packets
are to be queued.
OpenPOWER on IntegriCloud