Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src-draft/trunk]: src/sys/net Make ether_output public (we will need it soon...



details:   https://anonhg.NetBSD.org/src-all/rev/6f8bde44d3ea
branches:  trunk
changeset: 361828:6f8bde44d3ea
user:      Martin Husemann <martin%NetBSD.org@localhost>
date:      Fri Sep 25 19:38:49 2020 +0200

description:
Make ether_output public (we will need it soon in net80211).
Fix a comment about ifp/ether_common interchangability.

diffstat:

 sys/net/if_ether.h     |  2 ++
 sys/net/if_ethersubr.c |  4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diffs (34 lines):

diff -r bf7079053e3f -r 6f8bde44d3ea sys/net/if_ether.h
--- a/sys/net/if_ether.h        Fri Sep 25 19:35:56 2020 +0200
+++ b/sys/net/if_ether.h        Fri Sep 25 19:38:49 2020 +0200
@@ -257,6 +257,8 @@
 int    ether_delmulti(const struct sockaddr *, struct ethercom *);
 int    ether_multiaddr(const struct sockaddr *, uint8_t[], uint8_t[]);
 void    ether_input(struct ifnet *, struct mbuf *);
+int    ether_output(struct ifnet *, struct mbuf *, const struct sockaddr *,
+           const struct rtentry *);
 
 /*
  * Ethernet multicast address structure.  There is one of these for each
diff -r bf7079053e3f -r 6f8bde44d3ea sys/net/if_ethersubr.c
--- a/sys/net/if_ethersubr.c    Fri Sep 25 19:35:56 2020 +0200
+++ b/sys/net/if_ethersubr.c    Fri Sep 25 19:38:49 2020 +0200
@@ -194,9 +194,8 @@
 /*
  * Ethernet output routine.
  * Encapsulate a packet of type family for the local net.
- * Assumes that ifp is actually pointer to ethercom structure.
  */
-static int
+int
 ether_output(struct ifnet * const ifp0, struct mbuf * const m0,
     const struct sockaddr * const dst, const struct rtentry *rt)
 {
@@ -645,6 +644,7 @@
  * Process a received Ethernet packet;
  * the packet is in the mbuf chain m with
  * the ether header.
+ * Assumes that ifp is actually pointer to ethercom structure.
  */
 void
 ether_input(struct ifnet *ifp, struct mbuf *m)



Home | Main Index | Thread Index | Old Index