PS2SDK
PS2 Homebrew Libraries
ps2smb.h
Go to the documentation of this file.
1 /*
2  Copyright 2009-2010, jimmikaelkael
3  Licenced under Academic Free License version 3.0
4 */
5 
11 #ifndef __PS2SMB_H__
12 #define __PS2SMB_H__
13 
14 #include <tamtypes.h>
15 
16 #define NO_PASSWORD -1
17 #define PLAINTEXT_PASSWORD 0
18 #define HASHED_PASSWORD 1
19 
20 // DEVCTL commands
21 #define SMB_DEVCTL_GETPASSWORDHASHES 0xC0DE0001
22 #define SMB_DEVCTL_LOGON 0xC0DE0002
23 #define SMB_DEVCTL_LOGOFF 0xC0DE0003
24 #define SMB_DEVCTL_GETSHARELIST 0xC0DE0004
25 #define SMB_DEVCTL_OPENSHARE 0xC0DE0005
26 #define SMB_DEVCTL_CLOSESHARE 0xC0DE0006
27 #define SMB_DEVCTL_ECHO 0xC0DE0007
28 #define SMB_DEVCTL_QUERYDISKINFO 0xC0DE0008
29 
30 // helpers for DEVCTL commands
31 
32 typedef struct
33 {
34  char password[256];
36 
37 typedef struct
38 { // size = 32
39  u8 LMhash[16];
40  u8 NTLMhash[16];
42 
43 typedef struct
44 { // size = 536
45  char serverIP[16];
46  int serverPort;
47  char User[256];
48  char Password[256];
49  int PasswordType; // PLAINTEXT_PASSWORD or HASHED_PASSWORD
51 
52 typedef struct
53 { // size = 8
54  void *EE_addr;
55  int maxent;
57 
58 typedef struct
59 { // size = 520
60  char ShareName[256];
61  char Password[256];
62  int PasswordType; // PLAINTEXT_PASSWORD or HASHED_PASSWORD
64 
65 typedef struct
66 { // size = 260
67  char echo[256];
68  int len;
69 } smbEcho_in_t;
70 
71 typedef struct
72 { // size = 16
73  int TotalUnits;
74  int BlocksPerUnit;
75  int BlockSize;
76  int FreeUnits;
78 
79 typedef struct
80 { // size = 512
81  char ShareName[256];
82  char ShareComment[256];
83 } ShareEntry_t;
84 
85 // Error codes for some DEVCTL operations.
86 #define SMB_DEVCTL_LOGON_ERR_CONN 0x1001
87 #define SMB_DEVCTL_LOGON_ERR_PROT 0x1002
88 #define SMB_DEVCTL_LOGON_ERR_LOGON 0x1003
89 
90 #endif /* __PS2SMB_H__ */
smbEcho_in_t
Definition: ps2smb.h:65
smbLogOn_in_t
Definition: ps2smb.h:43
tamtypes.h
smbQueryDiskInfo_out_t
Definition: ps2smb.h:71
smbOpenShare_in_t
Definition: ps2smb.h:58
ShareEntry_t
Definition: ps2smb.h:79
smbGetPasswordHashes_in_t
Definition: ps2smb.h:32
smbGetShareList_in_t
Definition: ps2smb.h:52
smbGetPasswordHashes_out_t
Definition: ps2smb.h:37