forked from ps2homebrew/wLaunchELF
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ps2smb.h
88 lines (72 loc) · 1.54 KB
/
ps2smb.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/*
Copyright 2009-2010, jimmikaelkael
Licenced under Academic Free License version 3.0
*/
#ifndef _PS2SMB_H
#define _PS2SMB_H
#include <tamtypes.h>
#ifdef __cplusplus
extern "C" {
#endif
#define NO_PASSWORD -1
#define PLAINTEXT_PASSWORD 0
#define HASHED_PASSWORD 1
// DEVCTL commands
#define SMB_DEVCTL_GETPASSWORDHASHES 0xC0DE0001
#define SMB_DEVCTL_LOGON 0xC0DE0002
#define SMB_DEVCTL_LOGOFF 0xC0DE0003
#define SMB_DEVCTL_GETSHARELIST 0xC0DE0004
#define SMB_DEVCTL_OPENSHARE 0xC0DE0005
#define SMB_DEVCTL_CLOSESHARE 0xC0DE0006
#define SMB_DEVCTL_ECHO 0xC0DE0007
#define SMB_DEVCTL_QUERYDISKINFO 0xC0DE0008
// helpers for DEVCTL commands
typedef struct
{
char password[256];
} smbGetPasswordHashes_in_t;
typedef struct
{ // size = 32
u8 LMhash[16];
u8 NTLMhash[16];
} smbGetPasswordHashes_out_t;
typedef struct
{ // size = 536
char serverIP[16];
int serverPort;
char User[256];
char Password[256];
int PasswordType; // PLAINTEXT_PASSWORD or HASHED_PASSWORD
} smbLogOn_in_t;
typedef struct
{ // size = 8
void *EE_addr;
int maxent;
} smbGetShareList_in_t;
typedef struct
{ // size = 520
char ShareName[256];
char Password[256];
int PasswordType; // PLAINTEXT_PASSWORD or HASHED_PASSWORD
} smbOpenShare_in_t;
typedef struct
{ // size = 260
char echo[256];
int len;
} smbEcho_in_t;
typedef struct
{ // size = 16
int TotalUnits;
int BlocksPerUnit;
int BlockSize;
int FreeUnits;
} smbQueryDiskInfo_out_t;
typedef struct
{ // size = 512
char ShareName[256];
char ShareComment[256];
} ShareEntry_t;
#ifdef __cplusplus
}
#endif
#endif