Leaked source code of windows server 2003
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.4 KiB

  1. #ifndef _IOCTL
  2. #define _IOCTL
  3. //
  4. // Create a list of the ports we want to keep timestamps for
  5. // 5003 is no longer all we do.
  6. //
  7. typedef struct _PORT_ENTRY {
  8. LIST_ENTRY Linkage;
  9. USHORT Port;
  10. PFILE_OBJECT FileObject;
  11. } PORT_ENTRY, *PPORT_ENTRY;
  12. LIST_ENTRY PortList;
  13. NDIS_SPIN_LOCK PortSpinLock;
  14. // Prototypes
  15. NTSTATUS
  16. IoctlInitialize(
  17. PDRIVER_OBJECT DriverObject
  18. );
  19. NTSTATUS
  20. IoctlHandler(
  21. IN PDEVICE_OBJECT DeviceObject,
  22. IN PIRP Irp
  23. );
  24. VOID
  25. IoctlCleanup();
  26. PPORT_ENTRY
  27. CheckInPortList
  28. (USHORT Port
  29. );
  30. VOID
  31. RemoveAllPortsForFileObject(
  32. PFILE_OBJECT FileObject
  33. );
  34. // Other vars.
  35. PDEVICE_OBJECT TimestmpDeviceObject;
  36. #pragma NDIS_PAGEABLE_FUNCTION(IoctlHandler)
  37. //
  38. // Define the ioctls for adding and removing ports.
  39. #define CTRL_CODE(function, method, access) \
  40. CTL_CODE(FILE_DEVICE_NETWORK, function, method, access)
  41. #define IOCTL_TIMESTMP_REGISTER_PORT CTRL_CODE( 0x847, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  42. #define IOCTL_TIMESTMP_DEREGISTER_PORT CTRL_CODE( 0x848, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  43. UNICODE_STRING TimestmpDriverName;
  44. UNICODE_STRING symbolicLinkName;
  45. DRIVER_OBJECT TimestmpDriverObject;
  46. #endif //_IOCTL