sending files over network

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
nerdboy69
Posts: 17
Joined: Wed Apr 23, 2014 1:41 am

sending files over network

Post by nerdboy69 »

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?
FallenAvatar
Member
Member
Posts: 283
Joined: Mon Jan 03, 2011 6:58 pm

Re: sending files over network

Post by FallenAvatar »

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
nerdboy69
Posts: 17
Joined: Wed Apr 23, 2014 1:41 am

Re: sending files over network

Post by nerdboy69 »

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?
User avatar
thepowersgang
Member
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

Post by thepowersgang »

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)
Kernel Development, It's the brain surgery of programming.
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
Rew
Member
Member
Posts: 28
Joined: Mon Oct 29, 2012 2:26 pm

Re: sending files over network

Post by Rew »

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.
User avatar
Combuster
Member
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

Post by Combuster »

Is this some sort of homework?
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
iansjack
Member
Member
Posts: 4711
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: sending files over network

Post by iansjack »

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.
User avatar
bwat
Member
Member
Posts: 359
Joined: Fri Jul 03, 2009 6:21 am

Re: sending files over network

Post by bwat »

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]
Every universe of discourse has its logical structure --- S. K. Langer.
User avatar
sortie
Member
Member
Posts: 931
Joined: Wed Mar 21, 2012 3:01 pm
Libera.chat IRC: sortie

Re: sending files over network

Post by sortie »

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.
nerdboy69
Posts: 17
Joined: Wed Apr 23, 2014 1:41 am

Re: sending files over network

Post by nerdboy69 »

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.
In where src files i can find network and linux keyboard interrupt handler?
PearOs
Member
Member
Posts: 194
Joined: Mon Apr 08, 2013 3:03 pm
Location: Usually at my keyboard!

Re: sending files over network

Post by PearOs »

nerdboy69 wrote:
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.
In where src files i can find network and linux keyboard interrupt handler?
Here ill do you a favor: http://lxr.free-electrons.com/source/dr ... /ethernet/

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
User avatar
iansjack
Member
Member
Posts: 4711
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: sending files over network

Post by iansjack »

nerdboy69 wrote:
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.
In where src files i can find network and linux keyboard interrupt handler?
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.
Post Reply