Sony PlayStation2 Study
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.

82 lines
1.7 KiB

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*
  2. Copyright 2009-2010, jimmikaelkael
  3. Licenced under Academic Free License version 3.0
  4. */
  5. /**
  6. * @file
  7. * PS2SMB definitions.
  8. */
  9. #ifndef __PS2SMB_H__
  10. #define __PS2SMB_H__
  11. #include <tamtypes.h>
  12. #define NO_PASSWORD -1
  13. #define PLAINTEXT_PASSWORD 0
  14. #define HASHED_PASSWORD 1
  15. // DEVCTL commands
  16. #define SMB_DEVCTL_GETPASSWORDHASHES 0xC0DE0001
  17. #define SMB_DEVCTL_LOGON 0xC0DE0002
  18. #define SMB_DEVCTL_LOGOFF 0xC0DE0003
  19. #define SMB_DEVCTL_GETSHARELIST 0xC0DE0004
  20. #define SMB_DEVCTL_OPENSHARE 0xC0DE0005
  21. #define SMB_DEVCTL_CLOSESHARE 0xC0DE0006
  22. #define SMB_DEVCTL_ECHO 0xC0DE0007
  23. #define SMB_DEVCTL_QUERYDISKINFO 0xC0DE0008
  24. // helpers for DEVCTL commands
  25. typedef struct {
  26. char password[256];
  27. } smbGetPasswordHashes_in_t;
  28. typedef struct { // size = 32
  29. u8 LMhash[16];
  30. u8 NTLMhash[16];
  31. } smbGetPasswordHashes_out_t;
  32. typedef struct { // size = 536
  33. char serverIP[16];
  34. int serverPort;
  35. char User[256];
  36. char Password[256];
  37. int PasswordType; // PLAINTEXT_PASSWORD or HASHED_PASSWORD
  38. } smbLogOn_in_t;
  39. typedef struct { // size = 8
  40. void *EE_addr;
  41. int maxent;
  42. } smbGetShareList_in_t;
  43. typedef struct { // size = 520
  44. char ShareName[256];
  45. char Password[256];
  46. int PasswordType; // PLAINTEXT_PASSWORD or HASHED_PASSWORD
  47. } smbOpenShare_in_t;
  48. typedef struct { // size = 260
  49. char echo[256];
  50. int len;
  51. } smbEcho_in_t;
  52. typedef struct { // size = 16
  53. int TotalUnits;
  54. int BlocksPerUnit;
  55. int BlockSize;
  56. int FreeUnits;
  57. } smbQueryDiskInfo_out_t;
  58. typedef struct { // size = 512
  59. char ShareName[256];
  60. char ShareComment[256];
  61. } ShareEntry_t;
  62. // Error codes for some DEVCTL operations.
  63. #define SMB_DEVCTL_LOGON_ERR_CONN 0x1001
  64. #define SMB_DEVCTL_LOGON_ERR_PROT 0x1002
  65. #define SMB_DEVCTL_LOGON_ERR_LOGON 0x1003
  66. #endif /* __PS2SMB_H__ */