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 */