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/52320e682229
branches:  trunk
changeset: 947039:52320e682229
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 |  7 ++-----
 2 files changed, 4 insertions(+), 5 deletions(-)

diffs (40 lines):

diff -r 71bb1f78e73f -r 52320e682229 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
@@ -255,6 +255,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 71bb1f78e73f -r 52320e682229 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
@@ -177,15 +177,11 @@
     { 0x01, 0x80, 0xc2, 0x00, 0x00, 0x02 };
 #define senderr(e) { error = (e); goto bad;}
 
-static int ether_output(struct ifnet *, struct mbuf *,
-    const struct sockaddr *, const struct rtentry *);
-
 /*
  * 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)
 {
@@ -630,6 +626,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