| 1 | = Sending files = |
| 2 | |
| 3 | To send a file to a specific host, use the function |
| 4 | {{{ |
| 5 | send_file(int host_id, const char* file_name) |
| 6 | }}} |
| 7 | or the command line program (run from the project root directory) |
| 8 | {{{ |
| 9 | send_file -host_id X -file_name Y |
| 10 | }}} |
| 11 | send_file creates a result and initializes it with a name of the form send_FILENAME_HOSTID_TIME. |
| 12 | |
| 13 | A message is created for the host and added to the msg_to_host table. This message instructs the client to download the file and acknowledge a successful download. The download message included in the next RPC reply to the host. The message has the form: |
| 14 | |
| 15 | |
| 16 | {{{ |
| 17 | <app> |
| 18 | <name>FILE_MOVER</name> |
| 19 | </app> |
| 20 | <app_version> |
| 21 | <app_name>FILE_MOVER</app_name> |
| 22 | <version_num>n</version_num> |
| 23 | </app_version> |
| 24 | <result> |
| 25 | <wu_name>x</wu_name> |
| 26 | <name>y</name> |
| 27 | </result> |
| 28 | <file_info> |
| 29 | <name>file_name</name> |
| 30 | <url>download_dir/file_name</url> |
| 31 | <md5_cksum>md5</md5_cksum> |
| 32 | <nbytes>file->nbytes</nbytes> |
| 33 | <sticky/> |
| 34 | </file_info> |
| 35 | <workunit> |
| 36 | <name>result.name</name> |
| 37 | <app_name>FILE_MOVER</app_name> |
| 38 | <file_ref> |
| 39 | <file_name>file_name</file_name> |
| 40 | </file_ref> |
| 41 | </workunit>}}} |