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/c3a9e1c19d95
branches:  trunk
changeset: 375061:c3a9e1c19d95
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 e0fcc5cf12a6 -r c3a9e1c19d95 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_addmulti(const struct sockaddr
 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 e0fcc5cf12a6 -r c3a9e1c19d95 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
@@ -188,9 +188,8 @@ static int ether_output(struct ifnet *, 
 /*
  * 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)
 {
@@ -639,6 +638,7 @@ error:
  * 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