net/rndis: Define per-packet-info for RNDIS packet message

MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7708
This commit is contained in:
Sepherosa Ziehau 2016-09-01 05:40:13 +00:00
parent 2c2e52605f
commit 6f67f21938
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=305175

View File

@ -111,6 +111,26 @@ struct rndis_packet_msg {
uint32_t rm_reserved;
};
/*
* Minimum value for rm_dataoffset, rm_oobdataoffset, and
* rm_pktinfooffset.
*/
#define RNDIS_PACKET_MSG_OFFSET_MIN \
(sizeof(struct rndis_packet_msg) - \
__offsetof(struct rndis_packet_msg, rm_dataoffset))
/* Per-packet-info for RNDIS data message */
struct rndis_pktinfo {
uint32_t rm_size;
uint32_t rm_type;
uint32_t rm_pktinfooffset;
uint8_t rm_data[];
};
#define RNDIS_PKTINFO_OFFSET \
__offsetof(struct rndis_pktinfo, rm_data[0])
#define RNDIS_PKTINFO_ALIGN 4
/*
* RNDIS control messages
*/