Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.2 KiB

  1. /*++
  2. Copyright (c) 2001 Microsoft Corporation
  3. Module Name:
  4. tunuser.h
  5. Abstract:
  6. Constants and types to access the TUN driver.
  7. Users must also include ntddndis.h
  8. Author:
  9. Environment:
  10. User/Kernel mode.
  11. Revision History:
  12. --*/
  13. #ifndef __TUNUSER__H
  14. #define __TUNUSER__H
  15. #define OID_CUSTOM_TUNMP_INSTANCE_ID 0xff54554e
  16. #define IOCTL_TUN_GET_MEDIUM_TYPE \
  17. CTL_CODE (FILE_DEVICE_NETWORK, 0x301, METHOD_BUFFERED, FILE_WRITE_ACCESS | FILE_READ_ACCESS)
  18. #define IOCTL_TUN_GET_MTU \
  19. CTL_CODE (FILE_DEVICE_NETWORK, 0x302, METHOD_BUFFERED, FILE_WRITE_ACCESS | FILE_READ_ACCESS)
  20. #define IOCTL_TUN_GET_PACKET_FILTER \
  21. CTL_CODE (FILE_DEVICE_NETWORK, 0x303, METHOD_BUFFERED, FILE_WRITE_ACCESS | FILE_READ_ACCESS)
  22. #define IOCTL_TUN_GET_MINIPORT_NAME \
  23. CTL_CODE (FILE_DEVICE_NETWORK, 0x304, METHOD_BUFFERED, FILE_WRITE_ACCESS | FILE_READ_ACCESS)
  24. #define TUN_ETH_MAC_ADDR_LEN 6
  25. #include <pshpack1.h>
  26. typedef struct _TUN_ETH_HEADER
  27. {
  28. UCHAR DstAddr[TUN_ETH_MAC_ADDR_LEN];
  29. UCHAR SrcAddr[TUN_ETH_MAC_ADDR_LEN];
  30. USHORT EthType;
  31. } TUN_ETH_HEADER;
  32. typedef struct _TUN_ETH_HEADER UNALIGNED * PTUN_ETH_HEADER;
  33. #include <poppack.h>
  34. #endif // __TUNUSER__H