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.

125 lines
4.2 KiB

  1. /*
  2. * Modifications: $Header: W:/LCS/ARCHIVES/preboot/lsa2/inc/tftp_api.h_v 1.15 Apr 09 1997 21:27:50 vprabhax $
  3. *
  4. * Copyright(c) 1997 by Intel Corporation. All Rights Reserved.
  5. *
  6. */
  7. /* TFTP_API.H
  8. * Parameter structure and type definitions for TFTP API version 2.x
  9. *
  10. * PXENV.H needs to be #included before this file.
  11. *
  12. * None of the TFTP API services are available after the stack
  13. * has been unloaded.
  14. */
  15. #ifndef _TFTP_API_H
  16. #define _TFTP_API_H
  17. #include "pxe_cmn.h"
  18. /* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
  19. /* #defines and constants
  20. */
  21. /* One of the following command op-codes needs to be loaded into the
  22. * op-code register (BX) before making a call a TFTP API service.
  23. */
  24. #define PXENV_TFTP_OPEN 0x20
  25. #define PXENV_TFTP_CLOSE 0x21
  26. #define PXENV_TFTP_READ 0x22
  27. #define PXENV_TFTP_READ_FILE 0x23
  28. /* Definitions of TFTP API parameter structures.
  29. */
  30. typedef struct s_PXENV_TFTP_OPEN {
  31. UINT16 Status; /* Out: See PXENV_STATUS_xxx */
  32. /* constants. */
  33. UINT8 ServerIPAddress[4]; /* In: 32-bit server IP */
  34. /* address. Big-endian. */
  35. UINT8 GatewayIPAddress[4]; /* In: 32-bit gateway IP */
  36. /* address. Big-endian. */
  37. UINT8 FileName[128];
  38. UINT16 TFTPPort; /* In: Socket endpoint at */
  39. /* which the TFTP server is */
  40. /* listening to requests. */
  41. /* Big-endian. */
  42. } t_PXENV_TFTP_OPEN;
  43. typedef struct s_PXENV_TFTP_CLOSE {
  44. UINT16 Status; /* Out: See PXENV_STATUS_xxx */
  45. /* constants. */
  46. } t_PXENV_TFTP_CLOSE;
  47. typedef struct s_PXENV_TFTP_READ {
  48. UINT16 Status; /* Out: See PXENV_STATUS_xxx */
  49. /* constants. */
  50. UINT16 PacketNumber; /* Out: 16-bit packet number. */
  51. UINT16 BufferSize; /* In: Size of the receive */
  52. /* buffer in bytes. */
  53. /* Out: Size of the packet */
  54. /* written into the buffer. */
  55. UINT16 BufferOffset; /* In: Segment/Selector and */
  56. UINT16 BufferSegment; /* offset of the receive buffer. */
  57. /* Out: Unchanged */
  58. } t_PXENV_TFTP_READ;
  59. #include <pshpack2.h>
  60. typedef struct s_PXENV_TFTP_READ_FILE {
  61. UINT16 Status; /* Out: See PXENV_STATUS_xxx */
  62. /* constants. */
  63. UINT8 FileName[128]; /* In: file to be read */
  64. UINT32 BufferSize; /* In: Size of the receive */
  65. /* buffer in bytes. */
  66. /* Out: Size of the file */
  67. /* written into the buffer. */
  68. UINT32 BufferOffset; /* In: 32-bit physical address of the */
  69. /* buffer to load the file into. */
  70. UINT8 ServerIPAddress[4]; /* In: 32-bit server IP */
  71. /* address. Big-endian. */
  72. UINT8 GatewayIPAddress[4]; /* In: 32-bit gateway IP */
  73. /* address. Big-endian. */
  74. UINT8 McastIPAddress[4]; /* In: 32-bit multicast IP address */
  75. /* on which file can be received */
  76. /* can be null for unicast */
  77. UINT16 TFTPClntPort; /* In: Socket endpoint on the Client */
  78. /* at which the file can be */
  79. /* received in case of Multicast */
  80. UINT16 TFTPSrvPort; /* In: Socket endpoint at which */
  81. /* server listens for requests. */
  82. UINT16 TFTPOpenTimeOut; /* In: Timeout value in seconds to be */
  83. /* used for receiving data or ACK */
  84. /* packets. If zero, default */
  85. /* TFTP-timeout is used. */
  86. UINT16 TFTPReopenDelay; /* In: wait time in seconds to delay */
  87. /* a reopen request in case of */
  88. /* multicast. */
  89. } t_PXENV_TFTP_READ_FILE;
  90. #include <poppack.h>
  91. /* Note:
  92. If the McastIPAddress specifies a non-zero value, the TFTP_ReadFile call
  93. tries to listen for multicast packets on the TFTPClntPort before
  94. opening a TFTP/MTFTP connection to the server.
  95. If it receives any packets (and not all) or if does not receive any,
  96. it waits for specified time and tries to reopen a multicast connection
  97. to the server.
  98. If the server supports multicast, it notifies the acknowledging client
  99. with a unicast and starts sending (multicast) the file.
  100. If the multicast open request times out, the client tries to connect to
  101. the server at TFTP server port for a unicast transfer.
  102. */
  103. #endif /* _TFTP_API_H */
  104. /* EOF - $Workfile: tftp_api.h $ */