diff options
author | sephe <sephe@FreeBSD.org> | 2016-10-13 07:22:13 +0000 |
---|---|---|
committer | sephe <sephe@FreeBSD.org> | 2016-10-13 07:22:13 +0000 |
commit | e15d5a32b45ae171edbf1e2db9f221e7e0d86beb (patch) | |
tree | af3e81d5c6f1c4b664f67f49fbe7ca02b7ad5d3f /sys/net | |
parent | 72b165eb009e537095826e9941d84d98dd1e6269 (diff) | |
download | FreeBSD-src-e15d5a32b45ae171edbf1e2db9f221e7e0d86beb.zip FreeBSD-src-e15d5a32b45ae171edbf1e2db9f221e7e0d86beb.tar.gz |
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
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/rndis.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/sys/net/rndis.h b/sys/net/rndis.h index 7e75dde..0477a65 100644 --- a/sys/net/rndis.h +++ b/sys/net/rndis.h @@ -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)) |