From 6f67f21938c4ac2613175a0352a712cddce838ac Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Thu, 1 Sep 2016 05:40:13 +0000 Subject: [PATCH] net/rndis: Define per-packet-info for RNDIS packet message MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7708 --- sys/net/rndis.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/sys/net/rndis.h b/sys/net/rndis.h index 4c82ca4961ce..ba351479de69 100644 --- a/sys/net/rndis.h +++ b/sys/net/rndis.h @@ -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 */