Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F178109130
D51747.1795984731.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
859 B
Referenced Files
None
Subscribers
None
D51747.1795984731.diff
View Options
diff --git a/sys/net/ethernet.h b/sys/net/ethernet.h
--- a/sys/net/ethernet.h
+++ b/sys/net/ethernet.h
@@ -447,6 +447,7 @@
#ifdef _KERNEL
#include <sys/_eventhandler.h>
+#include <sys/systm.h>
struct ifnet;
struct mbuf;
@@ -479,10 +480,18 @@
static __inline struct mbuf *ether_vlanencap(struct mbuf *m, uint16_t tag)
{
-
return ether_vlanencap_proto(m, tag, ETHERTYPE_VLAN);
}
+/* Create an ether_addr from an array of u_char (or uint8_t). */
+__nodiscard static __inline __unused struct ether_addr
+make_ether_addr(const u_char *__octets)
+{
+ struct ether_addr __ret;
+ memcpy(&__ret.octet[0], __octets, ETHER_ADDR_LEN);
+ return (__ret);
+}
+
/* new ethernet interface attached event */
typedef void (*ether_ifattach_event_handler_t)(void *, struct ifnet *);
EVENTHANDLER_DECLARE(ether_ifattach_event, ether_ifattach_event_handler_t);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 29, 8:38 PM (7 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42096155
Default Alt Text
D51747.1795984731.diff (859 B)
Attached To
Mode
D51747: net/ethernet.h: Add make_ether_addr()
Attached
Detach File
Event Timeline