PDA

View Full Version : [C++] Inviare file Windows a Linux su ethernet


Galileo83
07-05-2014, 16:14
Salve ragazzi,

mi appello a voi CyberGuru del C++.

Sto scrivendo un programma per trasferire un dato (un immagine) da una macchina con Wce a una linux embedded.

Con due sistemi linux non ho problemi utilizzo l' SCP.

ma non ho idea tra linux e windows.

Potreste darmi un punto di vista?

GRAZIE

Galileo83
08-05-2014, 10:21
A method would be to use a NFS system. Assuming that you have a windows 7 install that is pro or better.

To start you would need to install a couple packages on the linux machine assuming root access. "aptitude install nfs-kernel-server nfs-common portmap" That command would install what you need.

Now you need to edit the file "/etc/exports" to list what you would like to share

/home 192.168.1.0/24 (rw, async, insecure)
Would be a possible entry. The IP address would need to be changed to point to your networks subnet address. The location "/home" would also need to point to the location that you would like to share. Once done with editing the file you will need to save it and run

/etc/exportfs -a
This updates the NFS systems to start sharing the locations listed in the export file.

Now to set Windows to see the share. going to -> run -> cmd should bring up a command prompt.

mount [options] //nfs-server-unc-name/share-name [drive letter]
Replacing nfs-server-unc-name to the ip address of the linux machine and "share-name" to the name of the directory that you are sharing. "drive letter" would be a letter that you would like the linux machine mounted to.


CHE NE PENSATE?

tomminno
08-05-2014, 15:05
Ma ti serve inviare il file programmaticamente o ti basta un software?
Nel primo caso usa i socket nel secondo usa WinSCP