summaryrefslogtreecommitdiffstats
path: root/sys/net/if_ethersubr.c
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>2001-01-25 23:56:13 +0000
committerluigi <luigi@FreeBSD.org>2001-01-25 23:56:13 +0000
commit611a113c0fc019a3eecfcd7406097415194f8345 (patch)
tree8bc7aec55db53e4c9a6645d698aba8a6b409ad47 /sys/net/if_ethersubr.c
parent3f4604a14ae24f6cfc3997d17d97cfa8199e4901 (diff)
downloadFreeBSD-src-611a113c0fc019a3eecfcd7406097415194f8345.zip
FreeBSD-src-611a113c0fc019a3eecfcd7406097415194f8345.tar.gz
Comment the interface to ether_input() and the way is normally
used by most ethernet drivers.
Diffstat (limited to 'sys/net/if_ethersubr.c')
-rw-r--r--sys/net/if_ethersubr.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index ebd4b37..0bbb2c3 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -390,6 +390,15 @@ ether_output_frame(ifp, m)
* the packet is in the mbuf chain m without
* the ether header, which is provided separately.
*
+ * NOTA BENE: for many drivers "eh" is a pointer into the first mbuf or
+ * cluster, right before m_data. So be very careful when working on m,
+ * as you could destroy *eh !!
+ * A (probably) more convenient and efficient interface to ether_input
+ * is to have the whole packet (with the ethernet header) into the mbuf:
+ * modules which do not need the ethernet header can easily drop it, while
+ * others (most noticeably bridge and ng_ether) do not need to do additional
+ * work to put the ethernet header back into the mbuf.
+ *
* First we perform any link layer operations, then continue
* to the upper layers with ether_demux().
*/
OpenPOWER on IntegriCloud