Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SMB Version 1 deprecation / upgrade to SMB Version 2 #72

Open
Arawn-Davies opened this issue Jul 10, 2018 · 7 comments
Open

SMB Version 1 deprecation / upgrade to SMB Version 2 #72

Arawn-Davies opened this issue Jul 10, 2018 · 7 comments

Comments

@Arawn-Davies
Copy link

Hey, figured I ought to get into PS2 development after using homebrew for quite some time and developing for other stuff but not PlayStation 2. I've noticed many threads and questions floating about the internet regarding Open PS2 Loader and other PS2 homebrew applications that are still dependent on SMB version 1, which has been phased out and removed from operating systems such as new builds of Windows 10, Windows Server, and various *nix OSes.

These OSes are using implementations of SMB versions 2/3, so I'm wondering how difficult it would be to get at least SMB v2 working on the PS2, in terms of both coding difficulty, compatibility with the IOP and what performance cost (if any) there would be

I don't mind helping out where I can, I'm new to PS2 development but not new to programming (C++, C# and others) :)

@Arawn-Davies
Copy link
Author

I can't find much lower-level documentation of SMB version 2 (didn't figure there'd be much to be honest), yet alone documentation of the protocol itself, but I was able to find this, not sure how useful it would be though:

https://wiki.wireshark.org/SMB2

@sp193
Copy link
Member

sp193 commented Jul 11, 2018

You may find information on the SMB2 protocol here: https://msdn.microsoft.com/en-us/library/cc246482.aspx
It's just a different protocol. I don't know what sort of resources it will cost, but it should be acceptable. You should try to do some research on this before beginning on such a project.

You may be able to use some code from existing implementations. But code that was made for Linux might have been tightly coupled with the Linux OS, and may be challenging to work with. You can refer to the existing driver (SMBMAN) for ideas.
The PlayStation 2 should have well-designed code written for it, especially for IOP modules that go into the SDK that everybody uses. The IOP is a 36.8MHz chip with only 2MB of memory, so keeping your code as simple as possible is also better for performance.

@TnA-Plastic
Copy link

TnA-Plastic commented Jul 11, 2018

On another note: It might be worth it, to wait for @Maximus32 's BDM ('Block Device Manager') to be more 'stable'/evolved (or possibly you can even help out there)!

This would shrink the following development to the bare protocol, or atleast a bit less than now.

Edit: It would be worth it for OPL at least, IMO.

@rickgaiser
Copy link
Member

Sorry but no, BDM is located between de block devices (like usb/hdd/ilink) and the file systems (like fat32/ext2).

smb is not a block device, but a (network) file system. There are also protocols for block devices over a network (like NBD), those can use BDM, but network filesystems like ftp/smb cannot.

@TnA-Plastic
Copy link

THX for the answer!

Well... It might still give him a hint, where he could gather some interest in. ;)

@sp193
Copy link
Member

sp193 commented Jan 26, 2019

I have started work on one, since it doesn't seem like anybody is. It will be done when I can.

@sahlberg
Copy link

sahlberg commented Aug 6, 2020

I have added PS2 support to my libsmb2 client library.
It is currently kept in the ps2 branch but will eventually merge it into master once I have tested it more.

https://github.com/sahlberg/libsmb2/tree/ps2

libsmb2 is a highly portable, small footprint, high performance smb2/3 client that runs on almost anything that has berkley socket support.
Maybe fork libsmb2 and add it into ps2sdk, replacing the smb1 client ?
If anyone wants to test it out, please do. It needs as much mileage as possible for testing on the ps2 platform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants