ps2sdk  1.1
A collection of Open Source libraries used for developing applications on Sony's PlayStation 2® (PS2).
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  char password[256];
35 
36 typedef struct { // size = 32
37  u8 LMhash[16];
38  u8 NTLMhash[16];
40 
41 typedef struct { // size = 536
42  char serverIP[16];
44  char User[256];
45  char Password[256];
46  int PasswordType; // PLAINTEXT_PASSWORD or HASHED_PASSWORD
48 
49 typedef struct { // size = 8
50  void *EE_addr;
51  int maxent;
53 
54 typedef struct { // size = 520
55  char ShareName[256];
56  char Password[256];
57  int PasswordType; // PLAINTEXT_PASSWORD or HASHED_PASSWORD
59 
60 typedef struct { // size = 260
61  char echo[256];
62  int len;
63 } smbEcho_in_t;
64 
65 typedef struct { // size = 16
68  int BlockSize;
69  int FreeUnits;
71 
72 typedef struct { // size = 512
73  char ShareName[256];
74  char ShareComment[256];
75 } ShareEntry_t;
76 
77 // Error codes for some DEVCTL operations.
78 #define SMB_DEVCTL_LOGON_ERR_CONN 0x1001
79 #define SMB_DEVCTL_LOGON_ERR_PROT 0x1002
80 #define SMB_DEVCTL_LOGON_ERR_LOGON 0x1003
81 
82 #endif /* __PS2SMB_H__ */
int len
Definition: ps2smb.h:62
int serverPort
Definition: ps2smb.h:43
int PasswordType
Definition: ps2smb.h:46
int PasswordType
Definition: ps2smb.h:57
unsigned char u8
Definition: tamtypes.h:23