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.

77 lines
2.5 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. nettypes.h
  5. Abstract:
  6. This header file contains type definitions for the NT TDI, NDI,
  7. DDI, and PDI interfaces which are not specific to a single interface.
  8. Revision History:
  9. --*/
  10. #ifndef _NETTYPES_
  11. #define _NETTYPES_
  12. //
  13. // The following basic type is used to provide extensibility in request
  14. // and response packets. The OFFSET type is used to contain a value which
  15. // is interpreted as a relative address consisting of a number of bytes
  16. // from the beginning of the immediate parent structure.
  17. //
  18. typedef ULONG OFFSET;
  19. //
  20. // The following basic type is used throughout all the layers to pass a
  21. // string through an I/O interface which does not allow embedded pointers.
  22. // To allocate a FLAT_STRING, one must make room for the correct number of
  23. // buffer bytes in the allocation.
  24. //
  25. typedef struct _FLAT_STRING {
  26. SHORT MaximumLength; // total size of string buffer.
  27. SHORT Length; // number of bytes represented in string.
  28. char Buffer [1]; // the buffer itself follows this struct.
  29. } FLAT_STRING, *PFLAT_STRING;
  30. //
  31. // Basic type used to represent a network name, typically as a component of
  32. // a transport address structure through the TDI. This type is also passed
  33. // through the NDI interface. This type is declared as a structure so that
  34. // it can be extended easily without modifying applications, even though it
  35. // currently only has one element.
  36. //
  37. //
  38. typedef struct _NETWORK_NAME {
  39. FLAT_STRING Name; // network name in FLAT_STRING format.
  40. } NETWORK_NAME, *PNETWORK_NAME;
  41. //
  42. // Basic type used to represent an address at the hardware level of the
  43. // network. Hardware addresses are abstract types which are mapped to
  44. // adapter addresses by the physical provider. See the Physical Driver
  45. // Interface specification for details on how this is accomplished.
  46. //
  47. #define HARDWARE_ADDRESS_LENGTH 6 // number of octets in a hardware address.
  48. typedef struct _HARDWARE_ADDRESS {
  49. UCHAR Address [HARDWARE_ADDRESS_LENGTH];
  50. } HARDWARE_ADDRESS, *PHARDWARE_ADDRESS;
  51. //
  52. // Network management variable types used by all interface levels.
  53. //
  54. #define NETMAN_VARTYPE_ULONG 0 // type is a ULONG.
  55. #define NETMAN_VARTYPE_HARDWARE_ADDRESS 1 // type is a HARDWARE_ADDRESS.
  56. #define NETMAN_VARTYPE_STRING 2 // type is a FLAT_STRING.
  57. #endif // _NETTYPES_