svn commit: r307194 - stable/10/sys/net
Sepherosa Ziehau
sephe at FreeBSD.org
Thu Oct 13 07:22:14 UTC 2016
Author: sephe
Date: Thu Oct 13 07:22:13 2016
New Revision: 307194
URL: https://svnweb.freebsd.org/changeset/base/307194
Log:
MFC 305277,305278
305277
net/rndis: Add comment for rndis_comp_hdr
Reviewed by: hps
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7738
305278
net/rndis: Define common message header for RNDIS messages.
And avoid RNDIS_HEADER_OFFSET hardcoding.
Reviewed by: hps
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7739
Modified:
stable/10/sys/net/rndis.h
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/net/rndis.h
==============================================================================
--- stable/10/sys/net/rndis.h Thu Oct 13 07:17:04 2016 (r307193)
+++ stable/10/sys/net/rndis.h Thu Oct 13 07:22:13 2016 (r307194)
@@ -93,6 +93,14 @@
#define RNDIS_DF_CONNECTION_ORIENTED 0x00000002
/*
+ * Common RNDIS message header.
+ */
+struct rndis_msghdr {
+ uint32_t rm_type;
+ uint32_t rm_len;
+};
+
+/*
* RNDIS data message
*/
#define REMOTE_NDIS_PACKET_MSG 0x00000001
@@ -147,6 +155,12 @@ struct rndis_pktinfo {
/*
* RNDIS control messages
*/
+
+/*
+ * Common header for RNDIS completion messages.
+ *
+ * NOTE: It does not apply to REMOTE_NDIS_RESET_CMPLT.
+ */
struct rndis_comp_hdr {
uint32_t rm_type;
uint32_t rm_len;
@@ -316,7 +330,7 @@ struct rndis_keepalive_comp {
#define NDIS_PACKET_TYPE_MAC_FRAME 0x00008000
/* RNDIS offsets */
-#define RNDIS_HEADER_OFFSET 8 /* bytes */
+#define RNDIS_HEADER_OFFSET ((uint32_t)sizeof(struct rndis_msghdr))
#define RNDIS_DATA_OFFSET \
((uint32_t)(sizeof(struct rndis_packet_msg) - RNDIS_HEADER_OFFSET))
More information about the svn-src-all
mailing list