diff options
author | Jonathan Armani <armani@cvs.openbsd.org> | 2010-03-04 20:23:46 +0000 |
---|---|---|
committer | Jonathan Armani <armani@cvs.openbsd.org> | 2010-03-04 20:23:46 +0000 |
commit | 7f273473449620f1d57b44198fdb36910d5ee856 (patch) | |
tree | b5b00e7bd135d0528ea6a96eded4d9f4d87c277d /sys/dev/usb/if_urndisreg.h | |
parent | 8052c21336bc054f214e6a69794ecdde1642bc61 (diff) |
Add defines for header and data offset, offsetof() uses from mk@.
ok mk@
Diffstat (limited to 'sys/dev/usb/if_urndisreg.h')
-rw-r--r-- | sys/dev/usb/if_urndisreg.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/dev/usb/if_urndisreg.h b/sys/dev/usb/if_urndisreg.h index a5b9134c82c..e48e6ecc787 100644 --- a/sys/dev/usb/if_urndisreg.h +++ b/sys/dev/usb/if_urndisreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_urndisreg.h,v 1.6 2010/03/03 19:01:03 mk Exp $ */ +/* $OpenBSD: if_urndisreg.h,v 1.7 2010/03/04 20:23:45 armani Exp $ */ /* * Copyright (c) 2010 Jonathan Armani <dbd@asystant.net> @@ -134,6 +134,7 @@ struct urndis_softc { */ #define REMOTE_NDIS_PACKET_MSG 0x00000001 + struct urndis_packet_msg { u_int32_t rm_type; u_int32_t rm_len; @@ -301,3 +302,9 @@ struct urndis_keepalive_comp { #define RNDIS_PACKET_TYPE_ALL_FUNCTIONAL 0x00002000 #define RNDIS_PACKET_TYPE_FUNCTIONAL 0x00004000 #define RNDIS_PACKET_TYPE_MAC_FRAME 0x00008000 + +/* Rndis offsets */ +#define RNDIS_HEADER_OFFSET (sizeof(u_int32_t) * 2) +#define RNDIS_DATA_OFFSET (sizeof(struct urndis_packet_msg) - \ + offsetof(struct urndis_packet_msg, \ + rm_dataoffset)) |