sending files over network
sending files over network
I am writing a simple OS that must send some logs from HDD to a FTP server but I really do not know how network works at hardware level. Which IO ports I should use to connect the PC with the remote FTP server using IP and TCP?
-
- Member
- Posts: 283
- Joined: Mon Jan 03, 2011 6:58 pm
Re: sending files over network
Maybe you should click the big link at the top of the screen that says "Search this first!" and look at the docs for "Network Hardware"
Also, you might want to read the forum rules...
- Monk
Also, you might want to read the forum rules...
- Monk
Re: sending files over network
OMG! WHY THE HELL NOBODY AT THIS FORUM WANT TTO HELP ME WHEN I MOST NEED.
PS. I'VE ALREADY SEARCHED AT THIS FORUM ABOUT "NETWORK HRDWARE" AND NOTHING FOUND... IF I'VE FOUND I DONT ASK FOR:
HOW CONNECT A PC TO A FTP SERVER USING IO PORTS?
PS. I'VE ALREADY SEARCHED AT THIS FORUM ABOUT "NETWORK HRDWARE" AND NOTHING FOUND... IF I'VE FOUND I DONT ASK FOR:
HOW CONNECT A PC TO A FTP SERVER USING IO PORTS?
- thepowersgang
- Member
- Posts: 734
- Joined: Tue Dec 25, 2007 6:03 am
- Libera.chat IRC: thePowersGang
- Location: Perth, Western Australia
- Contact:
Re: sending files over network
Please nerdboy69, calm down.
tjmonk was referring to the large link that points you to the Wiki. On the wiki there is documentation on network hardware (and a little bit on protocols too).
I'll give you this for free - Network is not just as simple as poking some IO ports and connecting to a computer on the other side of the world, it's made up of serveral layers of protocols: The card interface, the ethernet packet format, IP (v4 or v6), TCP/UDP/SCTP, and then FTP/HTTP/whatever.
If you want a hint - Look into the programming of the RTL8139 card, they're pretty common and simple to program (qemu emulates it pretty well, and if you have an old-ish 10/100 PCI network card, it's most probably an 8139)
tjmonk was referring to the large link that points you to the Wiki. On the wiki there is documentation on network hardware (and a little bit on protocols too).
I'll give you this for free - Network is not just as simple as poking some IO ports and connecting to a computer on the other side of the world, it's made up of serveral layers of protocols: The card interface, the ethernet packet format, IP (v4 or v6), TCP/UDP/SCTP, and then FTP/HTTP/whatever.
If you want a hint - Look into the programming of the RTL8139 card, they're pretty common and simple to program (qemu emulates it pretty well, and if you have an old-ish 10/100 PCI network card, it's most probably an 8139)
Kernel Development, It's the brain surgery of programming.
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
Re: sending files over network
Since you seem totally prepared and everyone helped you get your networking hardware and tcp implementation covered, all you really need is some ftp information. Unsurprisingly, there is no information (that a quick search could find) on the wiki about the ftp protocol. I found a link that has some information about the ftp protocol though. It seems to be a poorly documented spec that took substantial effort to locate and identify how it should work. Here is the link for you: http://lmgtfy.com/?q=ftp+protocol
Having no experience with networking or tcp in my OS, I found it very confusing. Of course, since you are done with your network driver and tcp stack, you should have no trouble understanding this complicated specification.
Having no experience with networking or tcp in my OS, I found it very confusing. Of course, since you are done with your network driver and tcp stack, you should have no trouble understanding this complicated specification.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: sending files over network
Is this some sort of homework?
Re: sending files over network
The answers to all of your questions, present and future, can be found here: http://lxr.linux.no/
You can also discover how to fix your keyboard problem, which you might like to address first.
You can also discover how to fix your keyboard problem, which you might like to address first.
Re: sending files over network
Everything you need to know about building the internet and the applications that communicate over it can be found at the IETF RFC homepage. However, I get the impression that you may need a good general introduction to communications before you can get going with the info at the link.
[Edit: just realised the second sentence contradicts the first! Anyway, you know what I mean]
[Edit: just realised the second sentence contradicts the first! Anyway, you know what I mean]
Every universe of discourse has its logical structure --- S. K. Langer.
Re: sending files over network
You have broken forum rules 1, 3, 4, 6, 7 and 8 so far. Please understand we wish to help you, but most people don't want to do the work for you, especially as the question you are asking takes a LOT of work. Please forgive unhelpful people that reply to a thread first, they have limited time and want to help by dropping at least a hint.
You will need to at least write a driver for a network card (probably as a pci device using memory mapped io), a implementation of the ethernet protocop (and friends), an implementation of the ip protocol, an implementation of the tcp protocol, likely an implementation of dns, and finally an implementation of ftp itself. This is a lot of work and very few hobby operating systems have done it.
Perhaps what you really want is to program the serial port, the uart. If you use a virtual machine, you can send the serial port layout to a host on your computer that used the network support in your host operating system to upload to the ftp server.
You will need to at least write a driver for a network card (probably as a pci device using memory mapped io), a implementation of the ethernet protocop (and friends), an implementation of the ip protocol, an implementation of the tcp protocol, likely an implementation of dns, and finally an implementation of ftp itself. This is a lot of work and very few hobby operating systems have done it.
Perhaps what you really want is to program the serial port, the uart. If you use a virtual machine, you can send the serial port layout to a host on your computer that used the network support in your host operating system to upload to the ftp server.
Re: sending files over network
In where src files i can find network and linux keyboard interrupt handler?iansjack wrote:The answers to all of your questions, present and future, can be found here: http://lxr.linux.no/
You can also discover how to fix your keyboard problem, which you might like to address first.
Re: sending files over network
Here ill do you a favor: http://lxr.free-electrons.com/source/dr ... /ethernet/nerdboy69 wrote:In where src files i can find network and linux keyboard interrupt handler?iansjack wrote:The answers to all of your questions, present and future, can be found here: http://lxr.linux.no/
You can also discover how to fix your keyboard problem, which you might like to address first.
Don't be afraid to google, it's amazing what you can find out when you do. A simple "Linux ethernet driver source" gives you a lot of helpful information. Your next problem is going to be understanding the complex code that is held within those directories.
Good luck, and as said above, do not expect people to do the hard work for you. Operating system development is hard, and requires lots of research and effort on your part.
- Matt
Re: sending files over network
If you can't work that out then, TBH, I think it's time that you stopped wasting your time, and that of others, and took up a less demanding hobby.nerdboy69 wrote:In where src files i can find network and linux keyboard interrupt handler?iansjack wrote:The answers to all of your questions, present and future, can be found here: http://lxr.linux.no/
You can also discover how to fix your keyboard problem, which you might like to address first.