sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Loading...
Searching...
No Matches
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
12#ifndef __PS2SMB_H__
13#define __PS2SMB_H__
14
15#include <tamtypes.h>
16
17#define NO_PASSWORD -1
18#define PLAINTEXT_PASSWORD 0
19#define HASHED_PASSWORD 1
20
21// DEVCTL commands
22#define SMB_DEVCTL_GETPASSWORDHASHES 0xC0DE0001
23#define SMB_DEVCTL_LOGON 0xC0DE0002
24#define SMB_DEVCTL_LOGOFF 0xC0DE0003
25#define SMB_DEVCTL_GETSHARELIST 0xC0DE0004
26#define SMB_DEVCTL_OPENSHARE 0xC0DE0005
27#define SMB_DEVCTL_CLOSESHARE 0xC0DE0006
28#define SMB_DEVCTL_ECHO 0xC0DE0007
29#define SMB_DEVCTL_QUERYDISKINFO 0xC0DE0008
30
31// helpers for DEVCTL commands
32
33typedef struct
34{
35 char password[256];
37
38typedef struct
39{ // size = 32
40 u8 LMhash[16];
41 u8 NTLMhash[16];
43
44typedef struct
45{ // size = 536
46 char serverIP[16];
47 int serverPort;
48 char User[256];
49 char Password[256];
50 int PasswordType; // PLAINTEXT_PASSWORD or HASHED_PASSWORD
52
53typedef struct
54{ // size = 8
55 void *EE_addr;
56 int maxent;
58
59typedef struct
60{ // size = 520
61 char ShareName[256];
62 char Password[256];
63 int PasswordType; // PLAINTEXT_PASSWORD or HASHED_PASSWORD
65
66typedef struct
67{ // size = 260
68 char echo[256];
69 int len;
71
72typedef struct
73{ // size = 16
74 int TotalUnits;
75 int BlocksPerUnit;
76 int BlockSize;
77 int FreeUnits;
79
80typedef struct
81{ // size = 512
82 char ShareName[256];
83 char ShareComment[256];
85
86// Error codes for some DEVCTL operations.
87#define SMB_DEVCTL_LOGON_ERR_CONN 0x1001
88#define SMB_DEVCTL_LOGON_ERR_PROT 0x1002
89#define SMB_DEVCTL_LOGON_ERR_LOGON 0x1003
90
91#endif /* __PS2SMB_H__ */