PS2SDK
PS2 Homebrew Libraries
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#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
32typedef struct
33{
34 char password[256];
36
37typedef struct
38{ // size = 32
39 u8 LMhash[16];
40 u8 NTLMhash[16];
42
43typedef 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
52typedef struct
53{ // size = 8
54 void *EE_addr;
55 int maxent;
57
58typedef struct
59{ // size = 520
60 char ShareName[256];
61 char Password[256];
62 int PasswordType; // PLAINTEXT_PASSWORD or HASHED_PASSWORD
64
65typedef struct
66{ // size = 260
67 char echo[256];
68 int len;
70
71typedef struct
72{ // size = 16
73 int TotalUnits;
74 int BlocksPerUnit;
75 int BlockSize;
76 int FreeUnits;
78
79typedef struct
80{ // size = 512
81 char ShareName[256];
82 char ShareComment[256];
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__ */
Definition ps2smb.h:80