Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am new to Linux. I want to customize/write a device driver for USB storage device that can manipulate on the data before writing it to the USB device. Can someone help me by providing samples or pointers to the USB source code which I can modify to my requirement.
Also please guide me through how to install the driver and get it running. Thanks in advance!!
I am new to Linux. I want to customize/write a device driver for USB storage device that can manipulate on the data before writing it to the USB device. Can someone help me by providing samples or pointers to the USB source code which I can modify to my requirement.
Also please guide me through how to install the driver and get it running. Thanks in advance!!
Since you're already a developer, you already know how to write code, compile it, and make a working module. To load it, just type "modprobe <your module name>".
Thanks for the reply. I am actually new to linux. I want to know if if it is possible to write a driver in C++ or is there already a USB storage device driver written in C++ which I can refer to. I tried searching in google but couldn't find anything relevant.
Thanks for the reply. I am actually new to linux. I want to know if if it is possible to write a driver in C++ or is there already a USB storage device driver written in C++ which I can refer to. I tried searching in google but couldn't find anything relevant.
Yes, and I gave you two links to the source code. There is tons of source code available with an easy Google search, and you can probably find source code for your particular distro on the installation media/repositories already.
I did some googling and found few source code for USB driver. My requirement is to enrypt/decrypt the data that is written to the USB driver. I have the code for this. I thought of plugging this in the USB driver. I read that the USB driver runs in the kernel mode. Is it possible to do the encryption/decryption from the driver code?
PS: I dont prefer to write a wrapper for the driver and use a special application to write data to the disk. I could use the legacy way of writing to the disk with encryption achieved at the device driver level.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.